home
wiki
classes/clusters list
class information
+
Point of view
ANY
ANY
HIERARCHIC_GRAPH_NODE
INTERNALS_HANDLER
All features
class HIERARCHIC_GRAPH_NODE [E ->
HASHABLE
]
Summary
top
Direct parents
inherit list:
HASHABLE
insert list:
ANY
,
PLATFORM
Known children
inherit list:
LOADED_HIERARCHIC_GRAPH_NODE
Overview
top
creation features
make
(i: E)
exported features
make
(i: E)
item
: E
max_rank
:
INTEGER_32
min_rank
:
INTEGER_32
parents
:
FAST_ARRAY
[HIERARCHIC_GRAPH_NODE [E ->
HASHABLE
]]
children
:
FAST_ARRAY
[HIERARCHIC_GRAPH_NODE [E ->
HASHABLE
]]
set_item
(i: E)
parents_count
:
INTEGER_32
children_count
:
INTEGER_32
add_parent
(node: HIERARCHIC_GRAPH_NODE [E ->
HASHABLE
])
add_child
(node: HIERARCHIC_GRAPH_NODE [E ->
HASHABLE
])
remove_parent
(node: HIERARCHIC_GRAPH_NODE [E ->
HASHABLE
])
has_parent_edge
(id:
INTEGER_32
):
BOOLEAN
has_child_edge
(id:
INTEGER_32
):
BOOLEAN
remove_child
(node: HIERARCHIC_GRAPH_NODE [E ->
HASHABLE
])
remove_parent_edge
(id:
INTEGER_32
): HIERARCHIC_GRAPH_NODE [E ->
HASHABLE
]
Return connected node.
restore_parent_edge
(id:
INTEGER_32
, node: HIERARCHIC_GRAPH_NODE [E ->
HASHABLE
])
remove_child_edge
(id:
INTEGER_32
): HIERARCHIC_GRAPH_NODE [E ->
HASHABLE
]
Return connected node.
restore_child_edge
(id:
INTEGER_32
, node: HIERARCHIC_GRAPH_NODE [E ->
HASHABLE
])
deep_reset_edges
Set edge identifiers with values starting from 0.
parent
(i:
INTEGER_32
): HIERARCHIC_GRAPH_NODE [E ->
HASHABLE
]
child
(i:
INTEGER_32
): HIERARCHIC_GRAPH_NODE [E ->
HASHABLE
]
has_parent
(other: HIERARCHIC_GRAPH_NODE [E ->
HASHABLE
]):
BOOLEAN
has_child
(other: HIERARCHIC_GRAPH_NODE [E ->
HASHABLE
]):
BOOLEAN
parent_edge
(i:
INTEGER_32
):
INTEGER_32
child_edge
(i:
INTEGER_32
):
INTEGER_32
has_cycle
:
BOOLEAN
has_parent_cycle
:
BOOLEAN
has_children_cycle
:
BOOLEAN
is_toplevel
:
BOOLEAN
is_leaf
:
BOOLEAN
is_connected_to
(other: HIERARCHIC_GRAPH_NODE [E ->
HASHABLE
]):
BOOLEAN
distance
(other: HIERARCHIC_GRAPH_NODE [E ->
HASHABLE
]):
INTEGER_32
set_rank
add_connected_nodes_in
(list:
COLLECTION
[HIERARCHIC_GRAPH_NODE[E]])
Add in
list
all nodes belonging to the same graph as
Current
fill_path_to
(path:
COLLECTION
[
INTEGER_32
], destination: HIERARCHIC_GRAPH_NODE [E ->
HASHABLE
])
Add in
path
edges identifiers corresponding to a path from current node to
destination
node.
hash_code
:
INTEGER_32
The hash-code value of
Current
.
is_equal
(other: HIERARCHIC_GRAPH_NODE [E ->
HASHABLE
]):
BOOLEAN
Is
other
attached to an object considered equal to current object?
make
(i: E)
effective procedure
top
ensure
parents_count
= 0
children_count
= 0
item
= i
item
: E
writable attribute
top
max_rank
:
INTEGER_32
writable attribute
top
min_rank
:
INTEGER_32
writable attribute
top
parents
:
FAST_ARRAY
[HIERARCHIC_GRAPH_NODE [E ->
HASHABLE
]]
writable attribute
top
children
:
FAST_ARRAY
[HIERARCHIC_GRAPH_NODE [E ->
HASHABLE
]]
writable attribute
top
set_item
(i: E)
effective procedure
top
parents_count
:
INTEGER_32
effective function
top
children_count
:
INTEGER_32
effective function
top
add_parent
(node: HIERARCHIC_GRAPH_NODE [E ->
HASHABLE
])
effective procedure
top
require
node /= Void
add_child
(node: HIERARCHIC_GRAPH_NODE [E ->
HASHABLE
])
effective procedure
top
require
node /= Void
remove_parent
(node: HIERARCHIC_GRAPH_NODE [E ->
HASHABLE
])
effective procedure
top
require
has_parent
(node)
has_parent_edge
(id:
INTEGER_32
):
BOOLEAN
effective function
top
has_child_edge
(id:
INTEGER_32
):
BOOLEAN
effective function
top
remove_child
(node: HIERARCHIC_GRAPH_NODE [E ->
HASHABLE
])
effective procedure
top
require
has_child
(node)
remove_parent_edge
(id:
INTEGER_32
): HIERARCHIC_GRAPH_NODE [E ->
HASHABLE
]
effective function
top
Return connected node.
require
has_parent_edge
(id)
ensure
not
has_parent_edge
(id)
restore_parent_edge
(id:
INTEGER_32
, node: HIERARCHIC_GRAPH_NODE [E ->
HASHABLE
])
effective procedure
top
require
not
has_parent_edge
(id)
has_parent_edge
(-1)
has_parent
(node)
not node.
has_child_edge
(id)
node.
has_child_edge
(-1)
ensure
has_parent_edge
(id)
remove_child_edge
(id:
INTEGER_32
): HIERARCHIC_GRAPH_NODE [E ->
HASHABLE
]
effective function
top
Return connected node.
require
has_child_edge
(id)
ensure
not
has_child_edge
(id)
restore_child_edge
(id:
INTEGER_32
, node: HIERARCHIC_GRAPH_NODE [E ->
HASHABLE
])
effective procedure
top
require
not
has_child_edge
(id)
has_child_edge
(-1)
has_child
(node)
not node.
has_parent_edge
(id)
node.
has_parent_edge
(-1)
ensure
has_child_edge
(id)
deep_reset_edges
effective procedure
top
Set edge identifiers with values starting from 0.
parent
(i:
INTEGER_32
): HIERARCHIC_GRAPH_NODE [E ->
HASHABLE
]
effective function
top
require
i.in_range(1,
parents_count
)
child
(i:
INTEGER_32
): HIERARCHIC_GRAPH_NODE [E ->
HASHABLE
]
effective function
top
require
i.in_range(1,
children_count
)
has_parent
(other: HIERARCHIC_GRAPH_NODE [E ->
HASHABLE
]):
BOOLEAN
effective function
top
ensure
Result = other.
has_child
(Current)
has_child
(other: HIERARCHIC_GRAPH_NODE [E ->
HASHABLE
]):
BOOLEAN
effective function
top
ensure
Result = other.
has_parent
(Current)
parent_edge
(i:
INTEGER_32
):
INTEGER_32
effective function
top
require
i.in_range(1,
parents_count
)
child_edge
(i:
INTEGER_32
):
INTEGER_32
effective function
top
require
i.in_range(1,
children_count
)
has_cycle
:
BOOLEAN
effective function
top
has_parent_cycle
:
BOOLEAN
effective function
top
has_children_cycle
:
BOOLEAN
effective function
top
is_toplevel
:
BOOLEAN
effective function
top
ensure
Result =
parents_count
= 0
is_leaf
:
BOOLEAN
effective function
top
ensure
Result =
children_count
= 0
is_connected_to
(other: HIERARCHIC_GRAPH_NODE [E ->
HASHABLE
]):
BOOLEAN
effective function
top
require
other /= Void
distance
(other: HIERARCHIC_GRAPH_NODE [E ->
HASHABLE
]):
INTEGER_32
effective function
top
require
other /= Void
set_rank
effective procedure
top
require
not
has_cycle
TODO: no graph cycle
add_connected_nodes_in
(list:
COLLECTION
[HIERARCHIC_GRAPH_NODE[E]])
effective procedure
top
Add in
list
all nodes belonging to the same graph as
Current
require
list /= Void
fill_path_to
(path:
COLLECTION
[
INTEGER_32
], destination: HIERARCHIC_GRAPH_NODE [E ->
HASHABLE
])
effective procedure
top
Add in
path
edges identifiers corresponding to a path from current node to
destination
node.
require
is_connected_to
(destination)
destination /= Current
hash_code
:
INTEGER_32
effective function
top
The hash-code value of
Current
.
ensure
good_hash_value:
Result >= 0
is_equal
(other: HIERARCHIC_GRAPH_NODE [E ->
HASHABLE
]):
BOOLEAN
deferred function
top
Is
other
attached to an object considered equal to current object?
require
other /= Void
ensure
Result implies
hash_code
= other.
hash_code
commutative:
generating_type = other.generating_type implies Result = other.is_equal(Current)