aarondb/algo/graph
Types
pub type TarjanState {
TarjanState(
index: Int,
indices: dict.Dict(fact.EntityId, Int),
lowlinks: dict.Dict(fact.EntityId, Int),
on_stack: set.Set(fact.EntityId),
stack: List(fact.EntityId),
components: dict.Dict(fact.EntityId, Int),
comp_id: Int,
)
}
Constructors
-
TarjanState( index: Int, indices: dict.Dict(fact.EntityId, Int), lowlinks: dict.Dict(fact.EntityId, Int), on_stack: set.Set(fact.EntityId), stack: List(fact.EntityId), components: dict.Dict(fact.EntityId, Int), comp_id: Int, )
Values
pub fn betweenness_centrality(
state: state.DbState,
edge_attr: String,
) -> dict.Dict(fact.EntityId, Float)
pub fn connected_components(
state: state.DbState,
edge_attr: String,
) -> dict.Dict(fact.EntityId, Int)
pub fn cycle_detect(
state: state.DbState,
edge_attr: String,
) -> List(List(fact.EntityId))
pub fn neighbors_khop(
state: state.DbState,
from: fact.EntityId,
edge_attr: String,
max_depth: Int,
) -> List(fact.EntityId)
pub fn pagerank(
state: state.DbState,
attr: String,
damping: Float,
iterations: Int,
) -> dict.Dict(fact.EntityId, Float)
pub fn reachable(
state: state.DbState,
from: fact.EntityId,
edge_attr: String,
) -> List(fact.EntityId)
pub fn shortest_path(
state: state.DbState,
from: fact.EntityId,
to: fact.EntityId,
edge_attr: String,
max_depth: option.Option(Int),
) -> option.Option(List(fact.EntityId))
pub fn strongly_connected_components(
state: state.DbState,
edge_attr: String,
) -> dict.Dict(fact.EntityId, Int)
pub fn topological_sort(
state: state.DbState,
edge_attr: String,
) -> Result(List(fact.EntityId), List(fact.EntityId))