corneto package#
Subpackages#
- corneto.backend package
- Module contents
Backend
Backend.is_available()
Backend.version()
Backend.get_symbols()
Backend.available_solvers()
Backend.Constant()
Backend.Variable()
Backend.Parameter()
Backend.Problem()
Backend.build()
Backend.solve()
Backend.Flow()
Backend.Acyclic()
Backend.AcyclicFlow()
Backend.Indicator()
Backend.NonZeroIndicator()
Backend.Indicators()
Backend.Xor()
Backend.linear_or()
Backend.linear_and()
Backend.linear_xor()
Backend.vstack()
Backend.hstack()
Backend.zero_function()
VarType
CvxpyBackend
PicosBackend
- Module contents
- corneto.methods package
- Subpackages
- Submodules
- corneto.methods.carnival module
read_dataset()
preprocess_graph()
runVanillaCarnival()
runInverseCarnival()
heuristic_carnival()
get_result()
get_selected_edges()
reachability_graph()
bfs_search()
create_flow_carnival_v4()
create_flow_carnival_v3()
create_flow_carnival_v2()
create_flow_carnival()
runCARNIVAL_AcyclicFlow()
runCARNIVAL_Flow_Acyclic()
runCARNIVAL_Flow_Acyclic_Signal()
milp_carnival()
- corneto.methods.shortest_path module
- corneto.methods.signaling module
- corneto.methods.steiner module
- Module contents
- corneto.utils package
Module contents#
- class corneto.Attr(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)#
-
Enum class representing predefined attribute names used in the Attributes class.
- VALUE#
Represents the key for a value attribute.
- EDGE_TYPE#
Represents the key for an edge type attribute.
- SOURCE_ATTR#
Represents the key for a source attribute.
- TARGET_ATTR#
Represents the key for a target attribute.
- CUSTOM_ATTR#
Represents the key for a custom attribute.
- VALUE = '__value'#
- EDGE_TYPE = '__edge_type'#
- SOURCE_ATTR = '__source_attr'#
- TARGET_ATTR = '__target_attr'#
- CUSTOM_ATTR = '__custom_attr'#
- class corneto.EdgeType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)#
-
- DIRECTED = 'directed'#
- UNDIRECTED = 'undirected'#
- class corneto.Attributes#
Bases:
dict
A dictionary-based class to manage attributes.
Uses reserved attributes used by CORNETO Graphs.
- set_attr(key, value)#
Set an attribute in the dictionary using an Attr key.
- has_attr(key, value=None)#
Check if a given attribute exists in the dictionary, optionally with a specific value.
- get_attr(key, default=None)#
Retrieve the value of an attribute, or return a default value if not found.
- Parameters:
key (Attr) – The key for the attribute, represented as an Attr enum.
default (Any) – The default value to return if the attribute does not exist.
- Returns:
The value of the attribute, or the default value if not found.
- Return type:
Any
- class corneto.Graph(default_edge_type=EdgeType.DIRECTED, **kwargs)#
Bases:
BaseGraph
Default Graph class with support for undirected, directed, parallel and hypergedes.
- Parameters:
- get_graph_attributes()#
- Return type:
- extract_subgraph(vertices=None, edges=None)#
- reverse()#
Create a new graph and reverse the direction of all edges in the graph.
- Return type:
- filter_graph(filter_vertex=None, filter_edge=None)#
- static from_sif(sif_file, delimiter='\\t', has_header=False, discard_self_loops=True, column_order=[0, 1, 2])#
- static from_cobra_model(model)#
- Parameters:
model (CobraModel)
- static from_miom_model(model)#
- corneto.info()#
- corneto.available_backends()#