| java.lang.Object uk.org.ponder.intutil.dfmaxstate
dfmaxstate | class dfmaxstate (Code) | | Class dfmaxstate embodies the state of the clique-finding algorithm, together
with lower-level logic.
|
Constructor Summary | |
| dfmaxstate(int size) Initialize state with a complete level of all vertices at the bottom of the stack. |
Method Summary | |
boolean | check(intVector bestcliquesofar) Tests whether the current clique is a new best clique, and also determines whether
the pruning criterion has been met.
Parameters: bestcliquesofar - The best clique that has been found so far. | void | diagnose() | int | pop() Removes a frame from the stack, reducing clique size by one. | boolean | push(boolean[][] adjacent) Attempts to push a new frame on the stack, composed of vertices that
form a clique together with currentclique. | boolean | shove() Attempt to find a new clique by incrementing the active pointer into the top
stack frame. |
dfmaxstate | dfmaxstate(int size)(Code) | | Initialize state with a complete level of all vertices at the bottom of the stack.
Parameters: size - the number of vertices in the graph. |
check | boolean check(intVector bestcliquesofar)(Code) | | Tests whether the current clique is a new best clique, and also determines whether
the pruning criterion has been met.
Parameters: bestcliquesofar - The best clique that has been found so far. If the newly presentedclique is larger, this vector will be overwritten with the new clique. true if it is worthwhile continuing to expand the newlypresented clique |
diagnose | void diagnose()(Code) | | Dump the stack to System.out for debugging purposes
|
pop | int pop()(Code) | | Removes a frame from the stack, reducing clique size by one.
the new stack frame level. |
push | boolean push(boolean[][] adjacent)(Code) | | Attempts to push a new frame on the stack, composed of vertices that
form a clique together with currentclique. If none are found, state is
left unchanged.
Parameters: adjacent - The adjacency matrix specifying the graph. Must be squareand symmetric. true if any new vertices were found. |
shove | boolean shove()(Code) | | Attempt to find a new clique by incrementing the active pointer into the top
stack frame.
true if a new clique was found in this way. Otherwise,return false if the top stack frame was exhausted. |
|
|