Skip to content

NodeData

Tal edited this page Dec 20, 2020 · 2 revisions

NodeData

Constructor Details

  • public NodeData()

  • public NodeData​(int key)

  • public NodeData​(node_data other)

  • public NodeData​(NodeData other)

  • public NodeData​(int key,geo_location location)

Method Details

toString public String toString() - Display a vertex

Overrides:

toString in class java.lang.Object Returns: vertex display

toJSON

public String toJSON()

getKey

public int getKey() Returns the key associated with this node. Specified by: getKey in interface node_data Returns:

key

getLocation public geo_location getLocation() Returns the location of this node, if none return null. Specified by: getLocation in interface node_data Returns:

location

setLocation public void setLocation​(geo_location p) Allows changing this node's location. Specified by: setLocation in interface node_data Parameters: p - - new new location (position) of this node.

getWeight

public double getWeight() Returns the weight associated with this node. Specified by: getWeight in interface node_data Returns:

setWeight

public void setWeight​(double weight) Allows changing this node's weight. Specified by: setWeight in interface node_data Parameters: weight - - the new weight

getInfo

public java.lang.String getInfo() Returns the remark (meta data) associated with this node. Specified by:

getInfo in interface node_data

Returns:

setInfo

public void setInfo​(java.lang.String s) Allows changing the remark (meta data) associated with this node. Specified by: setInfo in interface node_data Parameters: s -

getTag

public int getTag() Temporal data (aka color: e,g, white, gray, black) which can be used be algorithms Specified by: getTag in interface node_data Returns:

setTag

public void setTag​(int t) Allows setting the "tag" value for temporal marking an node - common practice for marking by algorithms. Specified by: setTag in interface node_data Parameters: t - - the new value of the tag

getSinker

public double getSinker()

setSinker

public void setSinker​(double sinker)

hashCode

public int hashCode() Overrides: hashCode in class java.lang.Object

equals

public boolean equals​(java.lang.Object o) Overrides: equals in class java.lang.Object