medusa.graph
Class Graph
- java.lang.Object
-
- medusa.graph.BasicGraph
-
- medusa.graph.Graph
-
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable
public class Graph extends BasicGraph implements java.io.Serializable, java.lang.Cloneable
ClassGraph: The Graph object is basically a collection of edges with some utilities- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description Graph()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidaddGraph(BasicGraph g)voidassignColorByMap(java.util.Map<java.lang.String,java.awt.Color> map)Assigns colors to nodes according to a map of node labels and colors.voidautoFixOrientation()java.lang.Objectclone()voidcropEdges(double confidenceCutoff)voiddefaultGraph()voiddivideNodePosition(double d)Divides node positions by a double value Useful for batch operations after using FRSpringjava.util.Iterator<Edge>edgesIterator(java.lang.String lbl)java.lang.StringBuffergeneralStats()EdgegetAdjacent(java.util.ArrayList unresolved, Node node)java.util.ArrayList<Node>getFixed()Returns an ArrayList of the fixed nodesjava.lang.StringBuffergetNodeList()voidgrowSelection()doubleisOppositeEdge(Edge e1, Edge e2)java.lang.StringBuffernodesConnectivityReport()Returns a string buffer with all the connection numbers of nodesjava.util.HashMap<java.lang.String,java.lang.Integer>nodesMap()voidprintNodeAnnotation()voidremoveEdgeByLabel(java.lang.String lbl)voidremoveFixed()java.lang.StringreportUnique()voidrescaleConfidence()voidrescaleNodePercentage()Rescales nodes to 0 to 1.0, assuming they are given in values 0 to 100 %.voidrescaleNodes(double scale)voidrescaleNodes(int scale)voidrescaleNodes(int xScale, int yScale)voidsetNodeAnnotation(java.lang.String name, java.lang.String annotation)voidsetNodeColor(java.awt.Color color)voidsetNodeShape(int shape)GraphshrinkGraph(Graph g)GraphsubGraph(Node node)Get the subgraph that contains this nodeGraphsubGraph(Node[] nodes)Get the subgraph that contains all nodes in the arrayvoidsubtractGraph(BasicGraph g)voidsubtractGraph(Graph g)voidtracePath(java.util.ArrayList unresolved, Node n)-
Methods inherited from class medusa.graph.BasicGraph
addComment, addEdge, addEdge, addNode, addNode, clear, copyNodeSettings, edgesIterator, getComment, getEdges, getEdgeSize, getNode, getNodes, getNodesForEdge, getNodeSize, getUniqueEdges, getUniqueEdgeSize, isPlanar, nodesIterator, removeEdge, report, setComment, setNode, uniqueEdgesIterator
-
-
-
-
Method Detail
-
addGraph
public void addGraph(BasicGraph g)
-
subtractGraph
public void subtractGraph(BasicGraph g)
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedException- Overrides:
clonein classjava.lang.Object- Throws:
java.lang.CloneNotSupportedException
-
edgesIterator
public java.util.Iterator<Edge> edgesIterator(java.lang.String lbl)
- Parameters:
lbl-- Returns:
-
getFixed
public java.util.ArrayList<Node> getFixed()
Returns an ArrayList of the fixed nodes- Returns:
-
removeFixed
public void removeFixed()
-
rescaleNodes
public void rescaleNodes(int scale)
-
rescaleNodes
public void rescaleNodes(int xScale, int yScale)
-
nodesMap
public java.util.HashMap<java.lang.String,java.lang.Integer> nodesMap()
-
divideNodePosition
public void divideNodePosition(double d)
Divides node positions by a double value Useful for batch operations after using FRSpring
-
subtractGraph
public void subtractGraph(Graph g)
-
cropEdges
public void cropEdges(double confidenceCutoff)
-
removeEdgeByLabel
public void removeEdgeByLabel(java.lang.String lbl)
-
tracePath
public void tracePath(java.util.ArrayList unresolved, Node n)
-
reportUnique
public java.lang.String reportUnique()
-
defaultGraph
public void defaultGraph()
-
setNodeColor
public void setNodeColor(java.awt.Color color)
-
setNodeShape
public void setNodeShape(int shape)
-
setNodeAnnotation
public void setNodeAnnotation(java.lang.String name, java.lang.String annotation)
-
printNodeAnnotation
public void printNodeAnnotation()
-
getNodeList
public java.lang.StringBuffer getNodeList()
-
subGraph
public Graph subGraph(Node[] nodes)
Get the subgraph that contains all nodes in the array- Parameters:
nodes- Array of ndoes- Returns:
- subgraph
-
subGraph
public Graph subGraph(Node node)
Get the subgraph that contains this node- Parameters:
node-- Returns:
-
growSelection
public void growSelection()
-
rescaleConfidence
public void rescaleConfidence()
-
rescaleNodePercentage
public void rescaleNodePercentage()
Rescales nodes to 0 to 1.0, assuming they are given in values 0 to 100 %.
-
autoFixOrientation
public void autoFixOrientation()
-
rescaleNodes
public void rescaleNodes(double scale)
- Parameters:
scale-
-
nodesConnectivityReport
public java.lang.StringBuffer nodesConnectivityReport()
Returns a string buffer with all the connection numbers of nodes- Returns:
- report
-
generalStats
public java.lang.StringBuffer generalStats()
-
assignColorByMap
public void assignColorByMap(java.util.Map<java.lang.String,java.awt.Color> map)
Assigns colors to nodes according to a map of node labels and colors. This will be used in for instance clustering- Parameters:
map- Map
-
-
DMelt 3.0 © DataMelt by jWork.ORG