medusa.graph
Class Edge
- java.lang.Object
-
- medusa.graph.BasicEdge
-
- medusa.graph.Edge
-
- All Implemented Interfaces:
- java.io.Serializable
public class Edge extends BasicEdge
Edgeobject extended fromBasicEdge- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description Edge(Edge e)Edge(java.lang.String n1, java.lang.String n2)ConstructorEdge(java.lang.String n1, java.lang.String n2, float conf)ConstructorEdge(java.lang.String n1, java.lang.String n2, float conf, int type)ConstructorEdge(java.lang.String n1, java.lang.String n2, float conf, int type, double orientation)ConstructorEdge(java.lang.String n1, java.lang.String n2, int type)ConstructorEdge(java.lang.String n1, java.lang.String n2, java.lang.Integer type, java.lang.Double orientation, java.lang.Float conf)Edge(java.lang.String n1, java.lang.String n2, java.lang.Integer type, java.lang.Float conf, java.lang.Double orientation)Edge(java.lang.String n1, java.lang.String n2, int type, float conf, double orientation)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description booleancontainsNode(Node n)booleanequals(java.lang.Object o)Compares two edgesNodegetComplement(Node n)Returns the complementary nodeNodegetComplement(java.lang.String name)if an edge contains a node, return the other nodefloatgetConf()Gets the confidence leveldoublegetOrientation()Gets the current orientationintgetType()Get the interaction typevoidrenameNode(java.lang.String oldName, java.lang.String newName)java.lang.Stringreport()Quick report of the two nodesvoidsetConf(float conf)Set confidence levelvoidsetOrientation(double orientation)voidsetType(int type)Set interaction type.java.lang.StringtoString()-
Methods inherited from class medusa.graph.BasicEdge
contains, getFromName, getNodes, getToName, oppositeName, sameName
-
-
-
-
Constructor Detail
-
Edge
public Edge(java.lang.String n1, java.lang.String n2, float conf, int type)Constructor- Parameters:
n1- Node 1n2- Node 2conf- Confidence leveltype-inttype
-
Edge
public Edge(java.lang.String n1, java.lang.String n2, float conf, int type, double orientation)Constructor- Parameters:
n1- Node 1n2- Node 2conf-floatConfidence leveltype-inttypeorientation-doubleorientation
-
Edge
public Edge(java.lang.String n1, java.lang.String n2, java.lang.Integer type, java.lang.Double orientation, java.lang.Float conf)
-
Edge
public Edge(Edge e)
-
Edge
public Edge(java.lang.String n1, java.lang.String n2, java.lang.Integer type, java.lang.Float conf, java.lang.Double orientation)
-
Edge
public Edge(java.lang.String n1, java.lang.String n2, int type, float conf, double orientation)Constructor- Parameters:
n1- Node 1n2- Node 2type-inttypeconf- Confidence levelorientation-doubleorientation
-
Edge
public Edge(java.lang.String n1, java.lang.String n2)Constructor- Parameters:
n1- Node 1n2- Node 2
-
Edge
public Edge(java.lang.String n1, java.lang.String n2, int type)Constructor- Parameters:
n1- Node 1n2- Node 2type-inttype
-
Edge
public Edge(java.lang.String n1, java.lang.String n2, float conf)Constructor- Parameters:
n1- Node 1n2- Node 2conf- Confidence level
-
-
Method Detail
-
setType
public void setType(int type)
Set interaction type. Edges with different types of interactions will be displayed as multiple edges- Parameters:
type-inttype
-
getType
public int getType()
Get the interaction type- Returns:
inttype
-
setConf
public void setConf(float conf)
Set confidence level- Parameters:
conf-floatconfidence 0.0 to 1.0
-
getConf
public float getConf()
Gets the confidence level- Returns:
floatconfidence 0.0 to 1.0
-
getComplement
public Node getComplement(java.lang.String name)
if an edge contains a node, return the other node- Parameters:
name-Stringname of node- Returns:
Stringname of other node
-
getComplement
public Node getComplement(Node n)
Returns the complementary node- Parameters:
n-Nodefirst node- Returns:
Nodeother node
-
equals
public boolean equals(java.lang.Object o)
Compares two edges- Overrides:
equalsin classjava.lang.Object- Parameters:
o- other edge- Returns:
Trueif edges are the same
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
report
public java.lang.String report()
Description copied from class:BasicEdgeQuick report of the two nodes
-
setOrientation
public void setOrientation(double orientation)
-
getOrientation
public double getOrientation()
Gets the current orientation- Returns:
doubleorientation
-
renameNode
public void renameNode(java.lang.String oldName, java.lang.String newName)
-
-
DMelt 3.0 © DataMelt by jWork.ORG