id3
Class CGraph
java.lang.Object
|
+--shared.Graph
|
+--id3.CGraph
- public class CGraph
- extends Graph
CGraph is derived from LEDA's CGRAPH This allows
us to add functions.
|
Field Summary |
static int |
DEFAULT_LEVEL
The default starting level for this graph. |
|
Constructor Summary |
CGraph()
Constructor. |
| Methods inherited from class shared.Graph |
access_face,
adj_edges,
adj_nodes,
adj_pred,
adj_succ,
all_edges,
all_faces,
all_nodes,
assign,
assign,
assign,
assign,
bucket_sort_edges,
bucket_sort_edges,
bucket_sort_edges,
bucket_sort_nodes,
bucket_sort_nodes,
bucket_sort_nodes,
bucket_sort,
bucket_sort,
choose_edge,
choose_face,
choose_node,
clear_all_entries,
clear,
comment,
copy_all_entries,
copy_graph,
cyclic_adj_pred,
cyclic_adj_succ,
del_adj_edge,
del_all_edges,
del_all_faces,
del_all_nodes,
del_edge,
del_edges,
del_node,
del_nodes,
edge_type,
edgeIterator,
empty,
entry,
entry,
entry,
face_of,
face_type,
first_edge,
first_face_edge,
first_face,
first_node,
hide_edge,
inf,
inf,
inf,
ins_adj_edge,
insert_reverse_edges,
is_directed,
is_hidden,
is_undirected,
join,
last_edge,
last_face,
last_node,
make_directed,
make_map,
make_map,
make_undirected,
merge_nodes,
move_edge,
move_edge,
move_edge,
new_edge,
new_edge,
new_edge,
new_edge,
new_edge,
new_edge,
new_edge,
new_edge,
new_edge,
new_edge,
new_edge,
new_edge,
new_edge,
new_edge,
new_edge,
new_edge,
new_edge,
new_edge,
new_edge,
new_edge,
new_edge,
new_edge,
new_node,
new_node,
next_face_edge,
node_type,
nodeIterator,
number_of_edges,
number_of_faces,
number_of_nodes,
post_clear_handler,
post_del_edge_handler,
post_del_node_handler,
post_hide_edge_handler,
post_move_edge_handler,
post_new_edge_handler,
post_new_node_handler,
post_restore_edge_handler,
pre_clear_handler,
pre_del_edge_handler,
pre_del_node_handler,
pre_hide_edge_handler,
pre_move_edge_handler,
pre_new_edge_handler,
pre_new_node_handler,
pre_restore_edge_handler,
pred_edge,
pred_face,
pred_node,
print,
print,
query,
query,
query,
register_map,
restore_all_edges,
restore_edge,
rev_all_edges,
rev_edge,
rev,
reversal,
reverse,
set_edge_entry,
set_node_entry,
size,
sort_edges,
sort_edges,
sort_edges,
sort_edges,
sort_nodes,
sort_nodes,
sort_nodes,
sort_nodes,
split_edge,
split_edge,
succ_edge,
succ_face,
succ_node,
touch,
touch,
unregister_map |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
DEFAULT_LEVEL
public static int DEFAULT_LEVEL
- The default starting level for this graph.
CGraph
public CGraph()
- Constructor.
node_info
public NodeInfo node_info(Node node)
- Accesses the information on the specified Node.
- Parameters:
node - The specified node.- Returns:
- The information on the specified node.
set_used_attr
public void set_used_attr(boolean[] usedAttr)
- Sets which attributes have been used.
- Parameters:
usedAttr - The set of used attributes. The array should be the same
length as the number of attributes. Each element
corresponds to an attribute. A TRUE value indicates
that attribute was used; a FALSE value indicates it
was not.
num_leaves
public int num_leaves()
- Returns the number of leaves in this graph. The complexity of num_leaves()
takes O(N), where N is the number of nodes in the graph.
- Returns:
- The number of leaves.
num_attr
public int num_attr(LogOptions log,
int maxAttr)
- Returns the number of attributes.
- Parameters:
log - The logging options.maxAttr - The upper bound on the number of attributes.- Returns:
- The number of attributes.
get_prototype
public NodeInfo get_prototype()
- Returns information on the nodes stored in this Cgraph.
- Returns:
- The information on the nodes stored in this Cgraph.
get_child
protected Node get_child(Node parent,
AugCategory edgeLabel)
- Returns the child of the given Node, following the Edge with the given
label. Aborts if no such Edge exists.
- Parameters:
parent - The parent Node to this Edge.edgeLabel - The Edge to the child Node.- Returns:
- The child of the given Node and Edge.
edge_info
public AugCategory edge_info(Edge edge)
- Returns the categories possible for an Edge.
- Parameters:
edge - The Edge for which information is requested.- Returns:
- The information on what categories are possible for the specifed
Edge.
assign_categorizer
public void assign_categorizer(Node oldNode,
Node newNode)
- Assigns a categorizer with the new specified Node to the old specified
Node.
- Parameters:
oldNode - The old Node specified.newNode - The new Node specified.
new_node
public Node new_node(NodeInfo nodeInfo)
- Creates a new Node and stored the specified NodeInfo in the new Node.
- Parameters:
nodeInfo - The node information to be stored in the new Node.- Returns:
- The new Node created.