Package | Description |
---|---|
info.debatty.java.graphs | |
info.debatty.java.graphs.build |
Modifier and Type | Field and Description |
---|---|
Node |
Edge.n1 |
Node |
Edge.n2 |
Node |
Neighbor.node |
Modifier and Type | Method and Description |
---|---|
Node<T> |
Graph.first()
Get the first node in the graph.
|
Modifier and Type | Method and Description |
---|---|
Iterable<Map.Entry<Node<T>,NeighborList>> |
Graph.entrySet() |
LinkedList<Node<T>> |
Graph.findNeighbors(LinkedList<Node<T>> starting_points,
int depth)
Recursively search neighbors of neighbors, up to a given depth.
|
HashMap<Node<T>,NeighborList> |
Graph.getHashMap()
Get the underlying hash map that stores the nodes and associated
neighborlists.
|
Iterable<Node<T>> |
Graph.getNodes() |
LinkedList<Node> |
Dijkstra.getPath(Node target)
Return the path from the source to the selected target.
|
Modifier and Type | Method and Description |
---|---|
int |
Graph.add(Node<T> new_node)
Add a node to the online graph using exhaustive search approach.
|
boolean |
Graph.containsKey(Node node) |
boolean |
NeighborList.containsNode(Node node)
Returns true if this neighborlist contains a neighbor corresponding to
this node.
|
int |
Graph.fastAdd(Node<T> node)
Add a node to the online graph, using approximate online graph building
algorithm presented in "Fast Online k-nn Graph Building" by Debatty
et al.
|
int |
Graph.fastAdd(Node<T> node,
double speedup)
Add a node to the online graph, using approximate online graph building
algorithm presented in "Fast Online k-nn Graph Building" by Debatty
et al.
|
int |
Graph.fastAdd(Node<T> new_node,
double speedup,
int long_jumps,
double expansion)
Add a node to the online graph, using approximate online graph building
algorithm presented in "Fast Online k-nn Graph Building" by Debatty
et al.
|
int |
Graph.fastRemove(Node<T> node_to_remove)
Remove a node from the graph (and update the graph) using fast
approximate algorithm.
|
NeighborList |
Graph.get(Node node)
Get the neighborlist of this node.
|
LinkedList<Node> |
Dijkstra.getPath(Node target)
Return the path from the source to the selected target.
|
NeighborList |
Graph.put(Node<T> node,
NeighborList neighborlist) |
boolean |
NeighborList.removeNode(Node node)
Remove from the neighborlist the neighbor corresponding to this node.
|
Modifier and Type | Method and Description |
---|---|
static ArrayList<Edge> |
NeighborList.Convert2Edges(HashMap<Node,NeighborList> graph) |
LinkedList<Node<T>> |
Graph.findNeighbors(LinkedList<Node<T>> starting_points,
int depth)
Recursively search neighbors of neighbors, up to a given depth.
|
Constructor and Description |
---|
Dijkstra(Graph graph,
Node source)
Compute the shortest path from source node to every other node in the
graph.
|
Edge(Node n1,
Node n2,
double weight) |
Edge(Node n1,
Node n2,
double weight) |
Neighbor(Node node,
double similarity) |
Modifier and Type | Method and Description |
---|---|
protected ArrayList<Node> |
NNDescent.PickFalses(NeighborList neighborList) |
protected ArrayList<Node> |
NNDescent.PickTruesAndMark(NeighborList neighborList)
pick new neighbors with a probability of rho, and mark them as false
|
static ArrayList<Node<String>> |
GraphBuilder.readFile(String path) |
protected HashMap<Node<T>,ArrayList> |
NNDescent.Reverse(List<Node<T>> nodes,
HashMap<Node<T>,ArrayList> lists) |
protected ArrayList<Node> |
NNDescent.Sample(ArrayList<Node> nodes,
int count)
Reverse NN array R[v] is the list of elements (u) for which v is a
neighbor (v is in B[u])
|
protected ArrayList<Node> |
NNDescent.Union(ArrayList<Node> l1,
ArrayList<Node> l2) |
Modifier and Type | Method and Description |
---|---|
protected NeighborList |
NNDescent.RandomNeighborList(List<Node<T>> nodes,
Node for_node) |
protected double |
NNDescent.Similarity(Node n1,
Node n2) |
protected double |
NNDescent.Similarity(Node n1,
Node n2) |
protected int |
NNDescent.UpdateNL(NeighborList nl,
Node n,
double similarity) |
Modifier and Type | Method and Description |
---|---|
protected Graph<T> |
ThreadedBrute._computeGraph(List<Node<T>> nodes) |
protected Graph<T> |
ThreadedNNDescent._computeGraph(List<Node<T>> nodes) |
protected Graph<T> |
PartitioningGraphBuilder._computeGraph(List<Node<T>> nodes) |
protected Graph<T> |
Brute._computeGraph(List<Node<T>> nodes) |
protected Graph<T> |
NNDescent._computeGraph(List<Node<T>> nodes) |
protected abstract Graph<T> |
GraphBuilder._computeGraph(List<Node<T>> nodes) |
protected List<Node<String>>[] |
NNCTPH._partition(List<Node<String>> nodes) |
protected abstract List<Node<T>>[] |
PartitioningGraphBuilder._partition(List<Node<T>> nodes) |
Graph<T> |
GraphBuilder.computeGraph(List<Node<T>> nodes) |
protected Graph<T> |
NNDescent.MakeFullyLinked(List<Node<T>> nodes) |
protected NeighborList |
NNDescent.RandomNeighborList(List<Node<T>> nodes,
Node for_node) |
protected HashMap<Node<T>,ArrayList> |
NNDescent.Reverse(List<Node<T>> nodes,
HashMap<Node<T>,ArrayList> lists) |
protected HashMap<Node<T>,ArrayList> |
NNDescent.Reverse(List<Node<T>> nodes,
HashMap<Node<T>,ArrayList> lists) |
protected ArrayList<Node> |
NNDescent.Sample(ArrayList<Node> nodes,
int count)
Reverse NN array R[v] is the list of elements (u) for which v is a
neighbor (v is in B[u])
|
void |
GraphBuilder.test(List<Node<T>> nodes)
Build the approximate graph, then use brute-force to build the exact
graph and compare the results
|
protected ArrayList<Node> |
NNDescent.Union(ArrayList<Node> l1,
ArrayList<Node> l2) |
protected ArrayList<Node> |
NNDescent.Union(ArrayList<Node> l1,
ArrayList<Node> l2) |
Copyright © 2016. All rights reserved.