public class Graph
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Field and Description |
---|---|
protected boolean |
autoSeed |
int |
objective |
Constructor and Description |
---|
Graph()
Builder
|
Modifier and Type | Method and Description |
---|---|
void |
dropAndInsertArc(int i,
Arc a)
Deletes the indexed arc, then insert a new one
|
void |
dropArc(int i)
Deletes an arc from the graph
|
void |
dropArcLQD(int ar)
Drop arc
|
void |
dropNode(int i)
Deletes a node from the graph
|
void |
dropNodeLQD_move(int N)
Drop node
|
Arc |
getArcAt(int i)
Gets the arc at the indicated position
|
java.util.Vector |
getArcs()
Gets all the arcs in the graph
|
ExternalObjectDescription |
getExternalObjectDescription()
Gets the External Object Description which describes this graph
|
int |
getId()
Gets the id of this graph
|
int |
getMaxX()
Gets the maximum X value of the graph
|
int |
getMaxY()
Gets the maximum Y value of the graph
|
boolean |
getModified()
Gets the current modified status
|
java.lang.String |
getName()
Gets the name of this graph
|
Node |
getNodeAt(int i)
Returns the node at position indicated
|
java.util.Vector |
getNodes()
Gets all the nodes from this graph
|
long |
getSeed()
Gets the seed of this graph
|
int |
getType()
Gets the type of this graph
|
void |
insertArc(Arc a)
Inserts a new arc in the graph
|
void |
insertArc(Arc a,
int i)
Inserts a new arc at the specified position
|
void |
insertNode(Node n)
Insert a new node in the graph
|
void |
insertNode(Node n,
int i)
Insert a node at the specified position
|
int |
next_arc(int id_node)
Search for the next arc
|
int |
numArcs()
Gets the current number of arcs
|
int |
numNodes()
Gets the number of nodes of this graph
|
void |
replaceNode(int position,
Node n)
Replace a node
|
void |
restoreDataSet()
Restore the data set node from a previous backup
|
void |
setArcs(java.util.Vector _arcs)
Puts a new set of arcs
|
void |
setId(int id)
Sets a new id for this graph
|
void |
setModified(boolean valor)
Sets the modified status of this graph
|
void |
setName(java.lang.String n)
Sets the name of this graph
|
void |
setNodes(java.util.Vector _nodes)
Sets a new set of nodes
|
void |
setSeed(long _seed)
Sets the seed of the graph (i.e. the seed of the experiment)
|
void |
setType(int type)
Sets the type of the graph (experiment type)
|
void |
write()
Prints in the standard output the graph
|
public java.util.Vector getNodes()
public void setNodes(java.util.Vector _nodes)
_nodes
- the new set of nodespublic java.util.Vector getArcs()
public void setArcs(java.util.Vector _arcs)
_arcs
- the new arcs in the graph (should be consistent!)public void setType(int type)
type
- the type of the experiment represented by this graphpublic int getType()
public void setSeed(long _seed)
_seed
- the new seedpublic long getSeed()
public void insertNode(Node n)
n
- the new nodepublic void insertNode(Node n, int i)
n
- the node to be insertedi
- the position of the insertionpublic void insertArc(Arc a)
a
- the new arcpublic void insertArc(Arc a, int i)
a
- the new arci
- the position of the insertionpublic void dropNode(int i)
i
- the index of the node to be deletedpublic void dropNodeLQD_move(int N)
N
- Id of the nodepublic void restoreDataSet()
public void dropArc(int i)
i
- the index of the arc to be droppedpublic int next_arc(int id_node)
id_node
- Id of the initial nodepublic void dropArcLQD(int ar)
ar
- Arc to removepublic void dropAndInsertArc(int i, Arc a)
i
- the index of the arc to be deleteda
- the arc to be insertedpublic Node getNodeAt(int i)
i
- the index of the nodepublic Arc getArcAt(int i)
i
- the index of the arcpublic int numNodes()
public int numArcs()
public int getMaxX()
public int getMaxY()
public void setName(java.lang.String n)
n
- the new namepublic java.lang.String getName()
public void setModified(boolean valor)
valor
- the new modified statuspublic boolean getModified()
public int getId()
public void setId(int id)
id
- the new IDpublic void write()
public ExternalObjectDescription getExternalObjectDescription()
public void replaceNode(int position, Node n)
position
- Position in the graphn
- New node