net.aerith.misao.util
Class TriangleMatchingSolver.TriGraph

java.lang.Object
  |
  +--net.aerith.misao.util.TriangleMatchingSolver.TriGraph
Enclosing class:
TriangleMatchingSolver

protected class TriangleMatchingSolver.TriGraph
extends java.lang.Object

The TriGraph represents a graph which has function to create triangles from itself.


Field Summary
protected  Graph graph
          The graph to create triangles from.
 
Constructor Summary
TriangleMatchingSolver.TriGraph(Graph graph)
          Constructs a TriGraph with a Graph.
 
Method Summary
 TriangleMatchingSolver.TriIndex[] createTriangles(int steps)
          Creates triangles from the graph, only based on the nodes connected within the specified steps.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

graph

protected Graph graph
The graph to create triangles from.
Constructor Detail

TriangleMatchingSolver.TriGraph

public TriangleMatchingSolver.TriGraph(Graph graph)
Constructs a TriGraph with a Graph.
Parameters:
graph - the graph object.
Method Detail

createTriangles

public TriangleMatchingSolver.TriIndex[] createTriangles(int steps)
Creates triangles from the graph, only based on the nodes connected within the specified steps.
Parameters:
steps - the upper limit of steps to search nodes to create a triangle.
Returns:
the list of triangles, a triangle consists of three indexes of nodes in the original list of the specified graph.