Package | Description |
---|---|
com.yworks.yfiles.algorithms | |
com.yworks.yfiles.layout |
Provides essential classes and interfaces that constitute the infrastructure for automatic graph layout generation.
|
com.yworks.yfiles.layout.hierarchic |
Provides hierarchic layout style algorithms.
|
com.yworks.yfiles.layout.labeling |
Provides algorithms for the automatic placement of node and edge labels, so called generic labeling algorithms.
|
Modifier and Type | Field and Description |
---|---|
protected INodeMap |
Dfs.stateMap
|
Modifier and Type | Method and Description |
---|---|
static INodeMap |
Maps.createHashedNodeMap()
Creates a NodeMap that is based on hashing.
|
static INodeMap |
Maps.createIndexNodeMap(boolean[] data)
Returns a NodeMap view of a boolean array defined for nodes.
|
static INodeMap |
Maps.createIndexNodeMap(double[] data)
Returns a NodeMap view of a double array defined for nodes.
|
static INodeMap |
Maps.createIndexNodeMap(double[] doubleData,
int[] intData,
boolean[] boolData,
Object[] objectData)
Returns a NodeMap view of a double, int, boolean and Object array defined for nodes.
|
static INodeMap |
Maps.createIndexNodeMap(int[] data)
Returns a NodeMap view of an int array defined for nodes.
|
static INodeMap |
Maps.createIndexNodeMap(Object[] data)
Returns a NodeMap view of an Object array defined for nodes.
|
INodeMap |
Graph.createNodeMap()
Returns a newly created node map that is valid for the nodes in this graph.
|
static INodeMap |
Maps.createNodeMap(Map<Object,Object> map)
Create a NodeMap view of the given map.
|
INodeMap[] |
Graph.getRegisteredNodeMaps()
Gets all node maps that have been created by this graph but have not yet been disposed.
|
Modifier and Type | Method and Description |
---|---|
static boolean |
ShortestPaths.acyclic(Graph graph,
Node s,
IDataProvider cost,
INodeMap dist,
INodeMap pred)
Each edge is associated with an arbitrary double value that represents the cost of that edge.
|
static boolean |
ShortestPaths.bellmanFord(Graph graph,
Node s,
boolean directed,
IDataProvider cost,
INodeMap dist,
INodeMap pred)
Solves the single-source shortest path problem for arbitrary graphs.
|
static int |
Groups.biconnectedComponentGrouping(Graph graph,
INodeMap groupIDs)
This method partitions the graph by analyzing its biconnected components.
|
static int |
GraphConnectivity.biconnectedComponents(Graph graph,
IEdgeMap compNum,
INodeMap aPoint)
Calculates the biconnected components and the articulation points of a given undirected graph and returns the number of
biconnected components.
|
static int |
NetworkFlows.calcMaxFlowMinCut(Graph graph,
Node source,
Node sink,
IDataProvider eCapDP,
IEdgeMap flowEM,
INodeMap sourceCutNM)
Solves a maximum flow problem using the preflow-push method but additionally marks all nodes that belong to the minimum
cut set that is associated with the source of the network.
|
static void |
Centrality.closenessCentrality(Graph graph,
INodeMap closeness,
boolean directed,
IDataProvider edgeCosts)
Computes the closeness centrality for the nodes of a graph.
|
static int |
GraphConnectivity.connectedComponents(Graph graph,
INodeMap compNum)
Calculates the connected components of a given graph and returns their number.
|
static void |
Centrality.degreeCentrality(Graph graph,
INodeMap centrality,
boolean considerInEdges,
boolean considerOutEdges)
Computes the degree centrality for the nodes of a given graph.
|
static void |
ShortestPaths.dijkstra(Graph graph,
Node s,
boolean directed,
IDataProvider cost,
INodeMap dist,
INodeMap pred)
Solves the single-source shortest path problem for arbitrary graphs.
|
void |
Graph.disposeNodeMap(INodeMap map)
Informs the graph that the given node map is no longer needed.
|
static int |
Groups.edgeBetweennessClustering(Graph graph,
INodeMap clusterIDs,
boolean directed,
int minGroupCount,
int maxGroupCount,
IDataProvider edgeCosts)
Partitions the graph into groups using edge betweenness centrality.
|
static int |
Groups.edgeBetweennessClustering(Graph graph,
INodeMap clusterIDs,
double qualityTimeRatio,
int minGroupCount,
int maxGroupCount,
boolean refine)
Partitions the graph into groups using edge betweenness clustering proposed by Girvan and Newman.
|
static void |
Paths.findLongestPaths(Graph graph,
Node startNode,
IEdgeMap dist,
INodeMap maxDist,
IEdgeMap predicate)
Calculates the longest path from a given node to all other node in a given directed acyclic graph.
|
static boolean |
Bipartitions.getBipartition(Graph graph,
INodeMap markMap)
Calculates a bipartition of the given graph, if one exists.
|
static NodeList[] |
Bfs.getLayers(Graph graph,
IDataProvider isCoreNode,
INodeMap layerIDMap)
Returns the layers of nodes constructed by a breadth first search.
|
static NodeList[] |
Bfs.getLayers(Graph graph,
NodeList coreNodes,
BfsDirection direction,
INodeMap layerIDMap)
Returns the layers of nodes constructed by a directed/undirected breadth first search where the maximum number of layers
is restricted.
|
static NodeList[] |
Bfs.getLayers(Graph graph,
NodeList coreNodes,
BfsDirection direction,
INodeMap layerIDMap,
int maxLayers)
Returns the layers of nodes constructed by a directed/undirected breadth first search where the maximum number of layers
is restricted.
|
static NodeList[] |
Bfs.getLayers(Graph graph,
NodeList coreNodes,
boolean directed,
INodeMap layerIDMap)
Returns the layers of nodes constructed by a directed/undirected breadth first search where the maximum number of layers
is restricted.
|
static NodeList[] |
Bfs.getLayers(Graph graph,
NodeList coreNodes,
boolean directed,
INodeMap layerIDMap,
int maxLayers)
Returns the layers of nodes constructed by a directed/undirected breadth first search where the maximum number of layers
is restricted.
|
static NodeList[] |
Bfs.getLayers(Graph graph,
NodeList coreNodes,
INodeMap layerIDMap)
Returns the layers of nodes constructed by a breadth first search.
|
static void |
Trees.getSubTreeDepths(Graph tree,
INodeMap subtreeDepthMap)
Returns the depths of each subtree of a rooted directed tree.
|
static void |
Trees.getSubTreeSizes(Graph tree,
INodeMap subtreeSizeMap)
Returns the size (number of nodes) of each subtree of a rooted directed tree.
|
static Node |
Trees.getWeightedCenterNode(Graph tree,
INodeMap intWeight)
Finds a node used by the greatest number of all (undirected) paths interconnecting all nodes with each other.
|
static void |
Centrality.graphCentrality(Graph graph,
INodeMap centrality,
boolean directed,
IDataProvider edgeCosts)
Computes the graph centrality for the nodes of a graph.
|
static int |
Groups.hierarchicalClustering(Graph graph,
INodeMap clusterIDs,
Groups.INodeDistanceProvider distances,
Linkage linkage,
double cutOff)
Partitions the graph into clusters based on hierarchical clustering, while the dendrogram is cut based on a given
cut-off value.
|
static int |
Groups.hierarchicalClustering(Graph graph,
int maxCluster,
INodeMap clusterIDs,
Groups.INodeDistanceProvider distances,
Linkage linkage)
Partitions the graph into clusters based on hierarchical clustering, while the dendrogram is cut based on a given
maximum number of clusters.
|
static int |
Groups.kMeansClustering(Graph graph,
INodeMap clusterIDs,
IDataProvider nodePositions,
DistanceMetric distanceMetric,
int k)
Partitions the graph into clusters using k-means clustering algorithm.
|
static int |
Groups.kMeansClustering(Graph graph,
INodeMap clusterIDs,
IDataProvider nodePositions,
DistanceMetric distanceMetric,
int k,
int iterations)
Partitions the graph into clusters using k-means clustering algorithm.
|
static int |
Groups.kMeansClustering(Graph graph,
INodeMap clusterIDs,
IDataProvider nodePositions,
DistanceMetric distanceMetric,
int k,
int iterations,
YPoint[] centroids)
Partitions the graph into clusters using k-means clustering algorithm.
|
static int |
NetworkFlows.minCostFlow(Graph graph,
IDataProvider lCapDP,
IDataProvider uCapDP,
IDataProvider cost0DP,
IDataProvider supplyDP,
IEdgeMap flowEM,
INodeMap dualsNM)
Solves a minimum cost flow problem with a capacity scaling algorithm.
|
static int |
NetworkFlows.minCostFlow(Graph graph,
IDataProvider uCapDP,
IDataProvider cost0DP,
IDataProvider supplyDP,
IEdgeMap flowEM,
INodeMap dualsNM)
Uses method
NetworkFlows.minCostFlow(Graph, IDataProvider, IDataProvider, IDataProvider, IDataProvider, IEdgeMap, INodeMap)
to solve a minimum cost flow problem. |
static int |
NetworkFlows.minCostFlow(Graph graph,
Node s,
Node t,
IDataProvider uCapDP,
IDataProvider cost0DP,
IEdgeMap flowEM,
INodeMap dualsNM)
Solves a minimum cost maximum flow problem.
|
static void |
Centrality.nodeBetweenness(Graph graph,
INodeMap centrality,
boolean directed,
IDataProvider edgeCosts)
Computes betweenness centrality for each node of a given graph.
|
static void |
Centrality.nodeEdgeBetweenness(Graph graph,
INodeMap nodeCentrality,
IEdgeMap edgeCentrality,
boolean directed,
IDataProvider edgeCosts)
Computes betweenness centrality for each node and edge of a given graph.
|
static void |
Centrality.normalize(Graph graph,
INodeMap map)
Normalizes the
double values of a given INodeMap by dividing each of them by the maximum of all values
(maximum norm). |
static int |
RankAssignments.simple(Graph graph,
INodeMap rank,
IEdgeMap minLength)
This method quickly calculates a tight tree given a maximum time duration for the algorithm.
|
static int |
RankAssignments.simple(Graph graph,
INodeMap rank,
IEdgeMap minLength,
long maximalDuration)
This method quickly calculates a tight tree given a maximum time duration for the algorithm.
|
static int |
RankAssignments.simplex(Graph graph,
INodeMap layer,
IDataProvider w,
IDataProvider minLength)
Solves the rank assignment problem using the simplex method given a maximum time duration for the algorithm.
|
static int |
RankAssignments.simplex(Graph graph,
INodeMap layer,
IDataProvider w,
IDataProvider minLength,
IEdgeMap tree,
Node _root,
boolean validRanking)
Similar to
RankAssignments.simplex(Graph, INodeMap, IDataProvider, IDataProvider, long) but, additionally, it is possible to
provide a valid initial tree solution for the problem. |
static int |
RankAssignments.simplex(Graph graph,
INodeMap layer,
IDataProvider w,
IDataProvider minLength,
IEdgeMap tree,
Node _root,
boolean validRanking,
long maximalDuration)
Similar to
RankAssignments.simplex(Graph, INodeMap, IDataProvider, IDataProvider, long) but, additionally, it is possible to
provide a valid initial tree solution for the problem. |
static int |
RankAssignments.simplex(Graph graph,
INodeMap layer,
IDataProvider w,
IDataProvider minLength,
long maximalDuration)
Solves the rank assignment problem using the simplex method given a maximum time duration for the algorithm.
|
static boolean |
ShortestPaths.singleSource(Graph graph,
Node s,
boolean directed,
IDataProvider cost,
INodeMap dist,
INodeMap pred)
This method solves the single-source shortest path problem for arbitrary graphs.
|
static double |
ShortestPaths.singleSourceSingleSink(Graph graph,
Node s,
Node t,
boolean directed,
IDataProvider cost,
INodeMap pred)
Like
ShortestPaths.singleSourceSingleSink(Graph, Node, Node, boolean, double[], Edge[]) but uses INodeMap s and
IDataProvider s instead of arrays. |
static int |
GraphConnectivity.stronglyConnectedComponents(Graph graph,
INodeMap compNum)
Calculates the strongly connected components of a given graph and returns their number.
|
static NodeList[] |
GraphConnectivity.toNodeListArray(Graph graph,
INodeMap compNum,
int maxCompNum)
Transforms the return values of method
GraphConnectivity.connectedComponents(Graph, INodeMap) to an array of NodeList s,
like it is returned by GraphConnectivity.connectedComponents(Graph) . |
static void |
NodeOrders.toNodeMap(Graph graph,
int[] order,
INodeMap result)
Copies an array-based result returned by a method of this class to a
INodeMap that will provide values of basic
type int . |
static void |
NodeOrders.toNodeMap(NodeList order,
INodeMap result)
|
static Edge |
Triangulator.triangulatePoints(YList points,
Graph result,
INodeMap resultMap,
IEdgeMap reverseEdgeMap)
Computes a triangulation of the given points.
|
static void |
ShortestPaths.uniform(Graph graph,
Node s,
boolean directed,
INodeMap dist,
INodeMap pred)
Like
ShortestPaths.uniform(Graph, Node, boolean, double[], Edge[]) but uses INodeMap s instead of arrays. |
static void |
Centrality.weightCentrality(Graph graph,
INodeMap centrality,
boolean considerInEdges,
boolean considerOutEdges,
IDataProvider edgeWeights)
Computes the weight centrality for the nodes of a graph.
|
Modifier and Type | Field and Description |
---|---|
protected INodeMap |
DefaultLayoutGraph.nodeLabelMap
A
INodeMap associating INodeLabelLayout s with the nodes of this graph. |
Modifier and Type | Method and Description |
---|---|
protected INodeMap |
GroupingSupport.createInfoMap(Graph graph)
Creates a
INodeMap to store hierarchy information for each node. |
<V> INodeMap |
YGraphAdapter.createNodeMap(Function<INode,V> getter)
|
<V> INodeMap |
YGraphAdapter.createNodeMap(IMapper<INode,V> mapper)
|
Modifier and Type | Method and Description |
---|---|
<T> IMapper<INode,T> |
YGraphAdapter.createMapper(INodeMap nodeMap)
|
protected void |
GroupingSupport.disposeInfoMap(Graph graph,
INodeMap infoMap)
Disposes of the
INodeMap created to store hierarchy information for each node. |
protected int |
ComponentLayout.findGraphComponents(LayoutGraph graph,
INodeMap compNumber)
Determines which nodes belong to the same graph component.
|
protected int |
IsolatedGroupComponentLayout.findIsolatedGraphComponents(LayoutGraph graph,
INodeMap compNumber)
Determines the nodes that belong to the same graph component.
|
void |
PartitionLayout.IPartitionFinder.findPartitions(LayoutGraph graph,
INodeMap partitionIDMap)
Returns a partition ID for each node of an input graph.
|
Modifier and Type | Method and Description |
---|---|
int |
WeightedLayerer.assignLayers(Graph graph,
INodeMap layerID)
Assigns all nodes of the graph to layers.
|
int |
WeightedLayerer.assignLayersFast(Graph graph,
INodeMap layerID)
Assigns all nodes of the graph to layers.
|
int |
WeightedLayerer.assignNodeLayer(LayoutGraph graph,
INodeMap layerID,
EdgeList reversedEdges)
Assigns all nodes of the graph to layers.
|
int |
TopologicalLayerer.assignNodeLayer(LayoutGraph graph,
INodeMap layerID,
EdgeList reversedEdges)
This method assigns the nodes in the graph to layers.
|
int |
GivenLayersLayerer.assignNodeLayer(LayoutGraph graph,
INodeMap layerID,
EdgeList reversedEdges)
Assigns the nodes of the graph to layers given by the
IDataProvider registered with the graph using key
GivenLayersLayerer.LAYER_ID_DPKEY . |
int |
BFSLayerer.assignNodeLayer(LayoutGraph graph,
INodeMap layerID,
EdgeList reversedEdges)
Assigns the nodes of the graph to layers.
|
int |
AsIsLayerer.assignNodeLayer(LayoutGraph graph,
INodeMap layerID,
EdgeList reversedEdges)
Assigns all nodes of the graph to layers.
|
int |
WeightedLayerer.assignNodeLayer(LayoutGraph graph,
INodeMap layerID,
EdgeList reversedEdges,
IDataProvider weight)
Assigns all nodes of the graph to layers.
|
protected void |
SimplexNodePlacer.assignNodesToSublayer(NodeList layerNodes,
ILayoutDataProvider ldp,
LayoutGraph graph,
INodeMap lowerSublayer)
Assigns the nodes of a given layer to the corresponding upper/lower sublayer if
node compaction
is enabled. |
Modifier and Type | Field and Description |
---|---|
protected INodeMap |
AbstractMISLabeling.nodesToBoxes
The mapping from each node in the
AbstractMISLabeling.conflictGraph to the corresponding LabelCandidate instance. |
protected INodeMap |
AbstractMISLabeling.nodesToID
The mapping from nodes in the
AbstractMISLabeling.conflictGraph to a corresponding integer value (ID). |
Modifier and Type | Method and Description |
---|---|
protected INodeMap |
AbstractMISLabeling.assignProfit()
Returns a
INodeMap which assigns a profit value to each node in the conflict graph . |