|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuchicago.src.sim.network.DefaultNode
uchicago.src.sim.network.DefaultDrawableNode
display.Node
public abstract class Node
Node class. SandboxNode extends DefaultDrawableNode and so it is both a DefaultNode and a DrawableNonGridNode. All of the important behavoir here as to do with creating new links. - This is based and with new functions on the code by Friedrich for multilayer network model ...
Nested Class Summary |
---|
Nested classes/interfaces inherited from class uchicago.src.sim.network.DefaultNode |
---|
uchicago.src.sim.network.DefaultNode.OrderedHashMap |
Field Summary | |
---|---|
private int |
ID
|
(package private) double |
initEdgeStrength
|
(package private) int |
maxDegree
|
Fields inherited from class uchicago.src.sim.network.DefaultDrawableNode |
---|
item |
Fields inherited from class uchicago.src.sim.network.DefaultNode |
---|
inEdges, inMap, label, outEdges, outMap |
Constructor Summary | |
---|---|
Node()
|
Method Summary | |
---|---|
void |
clearEdges()
Clears all the links for this node |
void |
constructEdges(java.util.ArrayList<Node> nodes)
|
void |
constructEdges(java.util.ArrayList<Node> nodes,
java.awt.Color color)
|
abstract boolean |
equals(java.lang.Object o)
|
int |
getID()
|
int |
getMaxDegree()
|
void |
init(int x,
int y)
Initialize this saNode, this takes the place of the constructor when a SandboxNode is created from a file using its no-arg constructor. |
void |
makeEdgeToFrom(uchicago.src.sim.network.DefaultNode node)
Makes an edge to the specified node and from the specifed node to this saNode if both nodes do not already have edges to each other and if adding the edge keeps their degrees less than maxDegree. |
void |
makeEdgeToFrom(uchicago.src.sim.network.DefaultNode node,
java.awt.Color color)
Makes an edge to the specified node and from the specifed node to this saNode if both nodes do not already have edges to each other and if adding the edge keeps their degrees less than maxDegree. |
void |
removeNode(uchicago.src.sim.network.DefaultNode node)
|
void |
removeRandomLink()
Remove a link randomly from this node |
void |
setID(int id)
|
void |
setMaxDegree(int maxDegree)
|
Methods inherited from class uchicago.src.sim.network.DefaultDrawableNode |
---|
allowResizing, calcSize, contains, draw, getBorderColor, getBorderWidth, getColor, getFont, getHeight, getLabelColor, getNode, getWidth, getX, getY, setBorderColor, setBorderWidth, setColor, setDrawable, setDrawableNoCopy, setFont, setHeight, setLabelColor, setNodeLabel, setWidth, setX, setX, setY, setY |
Methods inherited from class uchicago.src.sim.network.DefaultNode |
---|
addInEdge, addInEdges, addOutEdge, addOutEdges, clearInEdges, clearOutEdges, getEdgesFrom, getEdgesTo, getFromNodes, getId, getInDegree, getInEdges, getInNodes, getNodeLabel, getNumInEdges, getNumOutEdges, getOutDegree, getOutEdges, getOutNodes, getRandomFromNode, getRandomNodeIn, getRandomNodeOut, getRandomToNode, getToNodes, hasEdgeFrom, hasEdgeTo, hasEdgeToOrFrom, makeRandomInEdge, makeRandomOutEdge, removeEdgesFrom, removeEdgesTo, removeInEdge, removeOutEdge |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface uchicago.src.sim.gui.DrawableNonGridNode |
---|
getOutEdges |
Methods inherited from interface uchicago.src.sim.gui.Drawable2DGridNode |
---|
getOutEdges |
Field Detail |
---|
int maxDegree
double initEdgeStrength
private int ID
Constructor Detail |
---|
public Node()
Method Detail |
---|
public void init(int x, int y)
public void clearEdges()
public void constructEdges(java.util.ArrayList<Node> nodes)
public void constructEdges(java.util.ArrayList<Node> nodes, java.awt.Color color)
public void removeRandomLink()
public void makeEdgeToFrom(uchicago.src.sim.network.DefaultNode node)
node
- maxDegree
- public void makeEdgeToFrom(uchicago.src.sim.network.DefaultNode node, java.awt.Color color)
node
- maxDegree
- public int getMaxDegree()
public void setMaxDegree(int maxDegree)
maxDegree
- The maxDegree to set.public abstract boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public void removeNode(uchicago.src.sim.network.DefaultNode node)
public int getID()
public void setID(int id)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |