Concepts
|
Concept Name: Abstract Concept |
|
Concept Name: grid_graph |
|
Concept Name: region_adjacency_graph |
|
Concept Name: hierarchy |
|
Concept Name: binary_hierarchy |
|
Concept Name: minimum_spanning_tree |
- class Concept(**kw_args)[source]
Concept Name: Abstract Concept
Description: A concept describes how a set of data elements can be considered as a coherent notion of higher semantic level. One of the data elements of the concept is the canonical element of the association that can be used to materialize the concept, ie, to assemble all the data elements associated to the canonical element in order to build a representation of the higher semantic object described by the concept. Concepts are conceptually close to Classes in object oriented programming where data elements correspond to attributes. However with concepts, one never creates or manipulates actual objects: objects exist only from the relation between their data elements.
Canonical data element: The canonical element of a concept is the data that serves as a reference to retrieve all the data elements of the Concept. The canonical element is usually chosen such that there is a natural n to 1 association between the canonical element and its data elements.
Data elements:
- classmethod construct(canonical_element, strict=True, data_cache=None)[source]
Tries to construct a dictionary holding all the data elements of the concept associated to the given canonical element.
- Parameters:
canonical_element – an object
strict – if True an exception is raised if all the data elements of the Concept cannot be recovered from the given canonical element, otherwise the missing data element is simply not included in the result.
data_cache – specify a data cache where to search for data elements. If None, the default Higra global data cache is used.
- Returns:
a dictionary
- class CptGridGraph(**kwargs)[source]
Concept Name: grid_graph
Description: A graph whose vertices correspond to points on a regular grid.
Canonical data element: graph
Data elements:
graph (canonical): a graph g
shape (attribute name: ‘shape’): the shape of the underlying grid (a 1d array of positive integers such that np.prod(shape) = g.num_vertices())
- class CptRegionAdjacencyGraph(**kwargs)[source]
Concept Name: region_adjacency_graph
Description: A graph whose vertices represented super-vertices of another graph.
Canonical data element: rag
Data elements:
rag (canonical): the region adjacency graph
pre_graph (attribute name: ‘pre_graph’): the base graph
vertex_map (attribute name: ‘vertex_map’): a map giving for each vertex of pre_graph the corresponding vertex of rag
edge_map (attribute name: ‘edge_map’): a map giving for each edge of pre_graph the corresponding edge of rag (and -1 if not such edge exists)
- class CptHierarchy(**kwargs)[source]
Concept Name: hierarchy
Description: A tree representing a hierarchy over a base graph.
Canonical data element: tree
Data elements:
tree (canonical): a tree t
leaf_graph (attribute name: ‘leaf_graph’): the graph associated to the leaves of the tree
- class CptBinaryHierarchy(**kwargs)[source]
Concept Name: binary_hierarchy
Description: A binary tree representing a hierarchy with an associated minimum spanning tree on the hierarchy leaf graph.
Canonical data element: tree
Data elements:
tree (canonical): a hierarchy h
mst (attribute name: ‘mst’): a minimum spanning tree of the leaf graph of the hierarchy
mst_edge_map (attribute name: ‘mst_edge_map’): Map each internal vertex i of the tree to the edge ‘mst_edge_map[i - tree.num_leaves()]’ of theleaf graph of the hierarchy corresponding to a minimum spanning tree edge.
leaf_graph (attribute name: ‘leaf_graph’): the graph associated to the leaves of the tree (inherited from
CptHierarchy
)
- class CptMinimumSpanningTree(**kwargs)[source]
Concept Name: minimum_spanning_tree
Description: A minimum spanning tree and its base graph.
Canonical data element: mst
Data elements:
base_graph (attribute name: ‘base_graph’): a base graph
mst (canonical): a minimum spanning tree of the base graph
mst_edge_map (attribute name: ‘mst_edge_map’): For each edge index i of the mst, gives the corresponding edge index in the base graph