| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectchemaxon.struc.CGraph
Chemical graph.
CNode, 
CEdge, 
Serialized Form| Field Summary | |
protected  int[][] | 
btab
Bond table.  | 
protected  int[][] | 
ctab
Connection table.  | 
protected  int | 
edgeCount
The number of edges.  | 
protected  CEdge[] | 
edges
The edges (bonds).  | 
protected  int[] | 
fragIds
Fragment identifiers.  | 
protected  int[] | 
grinv
Graph invariants.  | 
protected  long | 
grinvCC
Graph invariant change count.  | 
protected static int | 
INITIAL_CAPACITY
Initial capacity of the nodes and edges vectors.  | 
protected  int | 
nFrags
Number of disconnected fragments.  | 
protected  int | 
nGrinv
Number of different graph invariants.  | 
protected  int | 
nodeCount
The number of nodes.  | 
protected  CNode[] | 
nodes
The nodes (atoms).  | 
protected  CGraph | 
parentGraph
The structure that contains this graph as a substructure.  | 
protected static int | 
RMCLEANUP_ALL
Perform all clean-up methods when removing a node or an edge.  | 
protected static int | 
RMCLEANUP_EDGES
When removing a node or an edge, also remove the edge(s) from the node object(s).  | 
protected static int | 
RMCLEANUP_NONE
Do not perform any clean-up methods when removing a node or an edge.  | 
protected  int[][] | 
sssr
SSSR ring node indexes.  | 
protected  CGraph | 
superGraph
Parent of all parents.  | 
| Constructor Summary | |
CGraph()
Constructs a chemical graph.  | 
|
CGraph(CGraph p)
Constructs a chemical graph.  | 
|
CGraph(CGraph p,
       int n,
       int e)
Constructs a fragment with the specified number of nodes and edges  | 
|
| Method Summary | |
 void | 
add(CEdge edge)
Adds an edge to the graph.  | 
 void | 
add(CNode node)
Adds a node to the graph.  | 
protected  void | 
addEdge0(CEdge edge)
Adds an edge.  | 
protected  int | 
addEdgeWithoutChangingIt(CEdge edge)
Adds an edge without setting its parentGraph and index fields.  | 
protected  void | 
addNode0(CNode node)
Adds a node.  | 
protected  int | 
addNodeWithoutChangingIt(CNode node)
Adds a node without setting its parentGraph and index fields.  | 
 java.lang.Object | 
clone()
Makes an identical copy of the molecule.  | 
protected  void | 
clonecopy(CGraph graph)
Copies the clones of nodes and edges of this graph to another one.  | 
 void | 
clonelesscopy(CGraph graph)
Copy to selection.  | 
 boolean | 
contains(CGraph graph)
Does the graph contain the specified fragment?  | 
 boolean | 
contains(java.lang.Object o)
Checks if the graph contains the specified node or edge.  | 
 void | 
findFrag(int i,
         CGraph frag)
Determines the subgraph connected to the specified node.  | 
 CGraph[] | 
findFrags(java.lang.Class cl)
Determines the disconnected fragments and puts them into an array.  | 
 void | 
fuse(CGraph graph)
Adds those nodes and edges of a graph to this one that are not already elements.  | 
protected  void | 
fuse0(CGraph graph)
Adds those nodes and edges of a graph to this one that are not already elements.  | 
 int[][] | 
getBtab()
Gets the edge (bond) table.  | 
 int[][] | 
getCtab()
Gets the connection table.  | 
 CEdge | 
getEdge(int i)
Gets an edge.  | 
 int | 
getEdgeCount()
Gets the number of edges.  | 
 java.util.Vector | 
getEdgeVector()
Gets the edges.  | 
 CGraph | 
getForefather()
Gets the first parent.  | 
 int | 
getFragCount()
Returns the number of fragments.  | 
 int[] | 
getFragIds()
Gets an array containing the fragment id for each node.  | 
protected  int[] | 
getGrinv()
Gets the graph invariants array.  | 
 int | 
getGrinv(int[] gi)
Gets the graph invariants.  | 
 long | 
getGrinvCC()
Gets the graph invariant change count.  | 
 java.lang.Object | 
getLock()
Gets the lock object for synchronization.  | 
 CNode | 
getNode(int i)
Gets a node.  | 
 int | 
getNodeCount()
Gets the number of nodes.  | 
 java.util.Vector | 
getNodeVector()
Gets the nodes.  | 
 CGraph | 
getParent()
Gets the parent graph that contains this substructure.  | 
 int[][] | 
getSSSR()
Gets the Smallest Set of Smallest Ring node indexes array.  | 
 int | 
indexOf(CEdge edge)
Gets the index of the specified edge.  | 
 int | 
indexOf(CNode node)
Gets the index of the specified node.  | 
 boolean | 
isEmpty()
Ask if the graph is empty or not.  | 
protected  boolean | 
isRealNodeParent()
Can it be a real node parent?  | 
protected  void | 
makeItSimilar(CGraph g)
Empty method.  | 
 void | 
mergeNodes(CNode that,
           CNode a)
Merges edges of a node with another node, then adds the node to the molecule.  | 
 CGraph | 
newInstance()
Creates a new CGraph object.  | 
 void | 
pack()
Reduce memory usage.  | 
 void | 
regenEdges()
Regenerates the edge vector: remove its elements, then put the edge objects from the nodes into it.  | 
 void | 
removeAll()
Removes all the nodes and edges.  | 
 void | 
removeAllEdges()
Removes all edges.  | 
 void | 
removeEdge(CEdge edge)
Removes an edge by reference.  | 
protected  void | 
removeEdge(CEdge edge,
           int cleanupFlags)
Removes an edge by reference.  | 
 void | 
removeEdge(int i)
Removes an edge from the graph.  | 
protected  void | 
removeEdge(int i,
           int cleanupFlags)
Removes an edge from the graph.  | 
 void | 
removeNode(CNode node)
Removes a node and its edges.  | 
protected  void | 
removeNode(CNode node,
           int cleanupFlags)
Removes a node and its edges.  | 
 void | 
removeNode(int i)
Removes a node and its edges from the graph.  | 
protected  void | 
removeNode(int i,
           int cleanupFlags)
Removes a node and its edges from the graph.  | 
protected  void | 
resetCtab()
An operation performed that changed the connection table and the graph invariants.  | 
protected  void | 
resetGrinvInParents()
Graph invariants must be recalculated for this graph and all parent graphs.  | 
 void | 
setEdge(int i,
        CEdge edge)
Sets the edge at the specified index.  | 
 void | 
setNode(int i,
        CNode node)
Sets the node at the specified index.  | 
protected  void | 
setNode0(int i,
         CNode node)
Sets the node at the specified index.  | 
 java.lang.String | 
toString()
Overrides Object.toString() to ease debugging.  | 
| Methods inherited from class java.lang.Object | 
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
| Field Detail | 
protected static final int INITIAL_CAPACITY
protected static final int RMCLEANUP_NONE
removeNode(CNode, int), 
removeNode(int, int), 
removeEdge(CEdge, int), 
removeEdge(int, int), 
Constant Field Valuesprotected static final int RMCLEANUP_ALL
removeNode(CNode, int), 
removeNode(int, int), 
removeEdge(CEdge, int), 
removeEdge(int, int), 
Constant Field Valuesprotected static final int RMCLEANUP_EDGES
removeNode(CNode, int), 
removeNode(int, int), 
removeEdge(CEdge, int), 
removeEdge(int, int), 
Constant Field Valuesprotected transient CGraph superGraph
protected transient CGraph parentGraph
protected transient CNode[] nodes
protected transient int nodeCount
protected transient CEdge[] edges
protected transient int edgeCount
protected transient int[][] sssr
protected transient int[][] ctab
protected transient int[][] btab
protected transient int[] fragIds
protected transient int nFrags
protected transient int[] grinv
protected transient int nGrinv
protected transient long grinvCC
| Constructor Detail | 
public CGraph(CGraph p,
              int n,
              int e)
p - the parent graph or nulln - no reallocation needed until the number of nodes is less than
            this valuee - no reallocation needed until the number of edges is less than
            this valuepublic CGraph(CGraph p)
p - the parent graph or nullpublic CGraph()
| Method Detail | 
protected boolean isRealNodeParent()
public java.util.Vector getNodeVector()
public java.util.Vector getEdgeVector()
public int getNodeCount()
public CNode getNode(int i)
i - node index
public void setNode(int i,
                    CNode node)
i - node indexnode - new node referencepublic int getEdgeCount()
public CEdge getEdge(int i)
i - edge index
public void setEdge(int i,
                    CEdge edge)
i - edge indexedge - the edge referencepublic void add(CNode node)
node - the node objectpublic void add(CEdge edge)
edge - the edge objectpublic void removeNode(CNode node)
node - the nodepublic void removeNode(int i)
i - the node indexpublic void removeEdge(CEdge edge)
edge - the edgepublic void removeEdge(int i)
i - the edge indexpublic void removeAllEdges()
public void removeAll()
public void regenEdges()
public int indexOf(CNode node)
node - the node
public int indexOf(CEdge edge)
edge - the edge
public boolean contains(java.lang.Object o)
o - the node or edge object
public boolean isEmpty()
protected void removeNode(CNode node,
                          int cleanupFlags)
node - the nodecleanupFlags - extra clean-up methodsRMCLEANUP_NONE, 
RMCLEANUP_ALL, 
RMCLEANUP_EDGES
protected void removeNode(int i,
                          int cleanupFlags)
i - the node indexcleanupFlags - extra clean-up methodsRMCLEANUP_NONE, 
RMCLEANUP_ALL, 
RMCLEANUP_EDGES
protected void removeEdge(CEdge edge,
                          int cleanupFlags)
edge - the edgecleanupFlags - extra clean-up methodsRMCLEANUP_NONE, 
RMCLEANUP_ALL, 
RMCLEANUP_EDGES
protected void removeEdge(int i,
                          int cleanupFlags)
i - the edge indexcleanupFlags - extra clean-up methodsRMCLEANUP_NONE, 
RMCLEANUP_ALL, 
RMCLEANUP_EDGESprotected void fuse0(CGraph graph)
graph - the graphpublic void fuse(CGraph graph)
graph - the other graph
public void mergeNodes(CNode that,
                       CNode a)
that - the nodea - the other nodepublic boolean contains(CGraph graph)
graph - the fragment
protected void clonecopy(CGraph graph)
graph - the target graphpublic void clonelesscopy(CGraph graph)
graph - the target graph (the selection)public java.lang.Object clone()
public java.lang.String toString()
@', and the unsigned
 hexadecimal representation of the hash code of the object.
public final int[][] getSSSR()
public int[][] getCtab()
public int[][] getBtab()
public int getGrinv(int[] gi)
gi - the output array
protected int[] getGrinv()
public final long getGrinvCC()
protected final void resetGrinvInParents()
public final int getFragCount()
public final int[] getFragIds()
public final CGraph[] findFrags(java.lang.Class cl)
cl - create fragment objects of this class
public final void findFrag(int i,
                           CGraph frag)
i - node indexfrag - add the nodes and edges to this CGraphpublic final java.lang.Object getLock()
public final CGraph getParent()
public final CGraph getForefather()
public void pack()
public CGraph newInstance()
protected void makeItSimilar(CGraph g)
g - a CGraph objectprotected void resetCtab()
protected void addNode0(CNode node)
node - the node referenceprotected final int addNodeWithoutChangingIt(CNode node)
node - the node reference
protected void setNode0(int i,
                        CNode node)
i - node indexnode - new node referenceprotected void addEdge0(CEdge edge)
edge - the edge referenceprotected final int addEdgeWithoutChangingIt(CEdge edge)
edge - the edge reference
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||