kananx / java-algorithms-implementation Goto Github PK
View Code? Open in Web Editor NEWAutomatically exported from code.google.com/p/java-algorithms-implementation
License: Apache License 2.0
Automatically exported from code.google.com/p/java-algorithms-implementation
License: Apache License 2.0
What steps will reproduce the problem?
1. any graph it has cicle in prim.java
2.
3.
What is the expected output? What do you see instead?
What version of the product are you using? On what operating system?
Please provide any additional information below.
add to prim.java after "Graph.Edge e = edgesAvailable.remove();"
this "while(!unvisited.contains(e.getToVertex()) && !unvisited.contains(e.getFromVertex())){
e = edgesAvailable.remove();
}"
bye!
Original issue reported on code.google.com by [email protected]
on 6 Dec 2012 at 10:09
https://code.google.com/p/java-algorithms-implementation/source/browse/trunk/src
/com/jwetherell/algorithms/data_structures/KdTree.java#563
It looks like this was missed to the conversion to double in r351.
Original issue reported on code.google.com by [email protected]
on 3 May 2013 at 2:39
What steps will reproduce the problem?
long f = 5;
long a = 10;
long c = 30;
long g = 35;
long d = 40;
long b = 45;
long e = 50;
IntervalTree.IntervalData<String> intervalEF = new IntervalTree.IntervalData(f, e, "Interval FE");
IntervalTree.IntervalData<String> intervalCG = new IntervalTree.IntervalData(c, g, "Interval CG");
IntervalTree.IntervalData<String> intervalCD = new IntervalTree.IntervalData(c, d, "Interval CD");
IntervalTree.IntervalData<String> intervalDE = new IntervalTree.IntervalData(d, e, "Interval DE");
List<IntervalTree.IntervalData<String>> intervals = new ArrayList<>();
intervals.add(intervalEF);
intervals.add(intervalCG);
intervals.add(intervalCD);
intervals.add(intervalDE);
IntervalTree<String> tree = new IntervalTree(intervals);
IntervalTree.IntervalData<String> abquery = tree.query(a, b);
What is the expected output? What do you see instead?
abquery should contain all intervals within the tree but instead it does not
contain intervalCD.
What version of the product are you using? On what operating system?
I am using the code from November 11, 2013 on Windows.
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 14 Nov 2013 at 9:50
What steps will reproduce the problem?
public void test() {
BTree<Integer> t = new BTree<Integer>();
int[] values = new int[10];
for (int i = 0; i < values.length; i++)
values[i] = i;
for (int i = 0; i < 100; i++)
t.add(values[i % values.length]);
}
What is the expected output? What do you see instead?
The test does not return, it enters an infinite loop
What version of the product are you using? On what operating system?
Linux with latest remotes/origin/master 531f287
Original issue reported on code.google.com by [email protected]
on 11 Jun 2014 at 6:29
Line 598 (599 after my comment) can be removed, just added a comment to
describe that it can be removed, and why it can be removed. Didn't change any
code
Original issue reported on code.google.com by [email protected]
on 22 Nov 2012 at 6:39
Attachments:
What steps will reproduce the problem?
1. The problem is that dijkstra implementation doesn't remove an element from
priority queue after cost update hence queue is not up-to-date
2.you can use attached undirected graph as an example
2. try to search path 1->7 using Graph.CostPathPair<Integer> shortestPath =
Dijkstra.getShortestPath(g, gverticies.get(0), gverticies.get(6));
3. shortestPath.getCost() == Integer.MAX_INT, which is not correct
What is the expected output? What do you see instead?
path exists with a cost 2599
What version of the product are you using? On what operating system?
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 8 Jun 2014 at 7:01
Attachments:
What steps will reproduce the problem?
1. run the following sample code.
ArrayQueue<Integer> queue = new ArrayQueue<Integer>();
queue.offer(1);
queue.offer(2);
queue.offer(3);
queue.offer(4);
queue.offer(5);
queue.poll();
queue.offer(6);
queue.offer(7);
queue.offer(8);
queue.poll();
queue.offer(9);
queue.offer(10);
queue.offer(11);
queue.offer(12);
queue.offer(13);
as you are increasing the lastIndex by 1 after it reaches the last postion it
has to set to 0 start position
eg: size is 5.
1,-,-,-,-
1,2,-,-,-
1,2,3,-,-
1,2,3,4,-
1,2,3,4,5
now take on
-,2,3,4,5
now size is 4 we have the space to one more element but that should go at
position 0 not at 6.
What is the expected output? What do you see instead?
What version of the product are you using? On what operating system?
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 24 Feb 2013 at 7:13
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.