README

moonbit-community/moon_dagre/graphlib does not have a README file

#
Attr

pub enum Attr {
Bool(Bool)
Int(Int)
Float(Double)
String(String)
Val(Value)
Point(Point)
Points(Array[Point])
Edge(EdgeObj)
Edges(Array[EdgeObj])
Strings(Array[String])
Ints(Array[Int])
}

#
Attrs

pub struct Attrs {
map : Map[String, Attr]
}

#
Attrs::contains

fn Attrs::contains(self : Attrs, key : String) -> Bool

#
Attrs::get

fn Attrs::get(self : Attrs, key : String) -> Attr?

#
Attrs::get_bool

fn Attrs::get_bool(self : Attrs, key : String) -> Bool?

#
Attrs::get_bool_or

fn Attrs::get_bool_or(self : Attrs, key : String, fallback : Bool) -> Bool

#
Attrs::get_edge

fn Attrs::get_edge(self : Attrs, key : String) -> EdgeObj?

#
Attrs::get_edges

fn Attrs::get_edges(self : Attrs, key : String) -> Array[EdgeObj]?

#
Attrs::get_float

fn Attrs::get_float(self : Attrs, key : String) -> Double?

#
Attrs::get_float_or

fn Attrs::get_float_or(self : Attrs, key : String, fallback : Double) -> Double

#
Attrs::get_int

fn Attrs::get_int(self : Attrs, key : String) -> Int?

#
Attrs::get_int_or

fn Attrs::get_int_or(self : Attrs, key : String, fallback : Int) -> Int

#
Attrs::get_ints

fn Attrs::get_ints(self : Attrs, key : String) -> Array[Int]?

#
Attrs::get_point

fn Attrs::get_point(self : Attrs, key : String) -> Point?

#
Attrs::get_points

fn Attrs::get_points(self : Attrs, key : String) -> Array[Point]?

#
Attrs::get_string

fn Attrs::get_string(self : Attrs, key : String) -> String?

#
Attrs::get_string_or

fn Attrs::get_string_or(self : Attrs, key : String, fallback : String) -> String

#
Attrs::get_strings

fn Attrs::get_strings(self : Attrs, key : String) -> Array[String]?

#
Attrs::get_value

fn Attrs::get_value(self : Attrs, key : String) -> Value?

#
Attrs::keys

fn Attrs::keys(self : Attrs) -> Array[String]

#
Attrs::length

fn Attrs::length(self : Attrs) -> Int

#
Attrs::remove

fn Attrs::remove(self : Attrs, key : String) -> Unit

#
Attrs::set

fn Attrs::set(self : Attrs, key : String, value : Attr) -> Unit

#
Attrs::set_bool

fn Attrs::set_bool(self : Attrs, key : String, value : Bool) -> Unit

#
Attrs::set_edge

fn Attrs::set_edge(self : Attrs, key : String, value : EdgeObj) -> Unit

#
Attrs::set_edges

fn Attrs::set_edges(self : Attrs, key : String, value : Array[EdgeObj]) -> Unit

#
Attrs::set_float

fn Attrs::set_float(self : Attrs, key : String, value : Double) -> Unit

#
Attrs::set_int

fn Attrs::set_int(self : Attrs, key : String, value : Int) -> Unit

#
Attrs::set_ints

fn Attrs::set_ints(self : Attrs, key : String, value : Array[Int]) -> Unit

#
Attrs::set_point

fn Attrs::set_point(self : Attrs, key : String, value : Point) -> Unit

#
Attrs::set_points

fn Attrs::set_points(self : Attrs, key : String, value : Array[Point]) -> Unit

#
Attrs::set_string

fn Attrs::set_string(self : Attrs, key : String, value : String) -> Unit

#
Attrs::set_strings

fn Attrs::set_strings(self : Attrs, key : String, value : Array[String]) -> Unit

#
Attrs::set_value

fn Attrs::set_value(self : Attrs, key : String, value : Value) -> Unit

#
EdgeObj

pub struct EdgeObj {
v : String
w : String
name : String?
}

#
EdgeRecord

type EdgeRecord

#
Graph

pub struct Graph {
directed : Bool
multigraph : Bool
compound : Bool
graph_label : Attrs
nodes : Map[String, Attrs]
node_order : Array[String]
node_index : Map[String, Int]
node_seen :
Set
[String]
edges : Map[String, EdgeRecord]
edge_order : Array[String]
edge_seen :
Set
[String]
parent_by_node : Map[String, String]
children_by_node : Map[String,
Set
[String]]
child_seq : Int
child_add_index : Map[String, Int]
default_edge_label_fn : () -> Value
}

#
Graph::Graph

fn Graph::Graph(directed? : Bool, multigraph? : Bool, compound? : Bool) -> Graph

#
Graph::children

fn Graph::children(self : Graph, v? : String) -> Array[String]

#
Graph::edge

fn Graph::edge(self : Graph, v : String, w : String, name? : String) -> Value?

#
Graph::edge_count

fn Graph::edge_count(self : Graph) -> Int

#
Graph::edge_obj

fn Graph::edge_obj(self : Graph, e : EdgeObj) -> Value?

#
Graph::edges

fn Graph::edges(self : Graph) -> Array[EdgeObj]

#
Graph::graph

fn Graph::graph(self : Graph) -> Attrs

#
Graph::has_edge

fn Graph::has_edge(self : Graph, v : String, w : String, name? : String) -> Bool

#
Graph::has_node

fn Graph::has_node(self : Graph, v : String) -> Bool

#
Graph::in_edges

fn Graph::in_edges(self : Graph, v : String, u? : String) -> Array[EdgeObj]

#
Graph::is_compound

fn Graph::is_compound(self : Graph) -> Bool

#
Graph::is_directed

fn Graph::is_directed(self : Graph) -> Bool

#
Graph::is_multigraph

fn Graph::is_multigraph(self : Graph) -> Bool

#
Graph::neighbors

fn Graph::neighbors(self : Graph, v : String) -> Array[String]

#
Graph::new

fn Graph::new(directed? : Bool, multigraph? : Bool, compound? : Bool) -> Graph

#
Graph::node

fn Graph::node(self : Graph, v : String) -> Attrs

#
Graph::node_count

fn Graph::node_count(self : Graph) -> Int

#
Graph::node_edges

fn Graph::node_edges(self : Graph, v : String, w? : String) -> Array[EdgeObj]

#
Graph::node_opt

fn Graph::node_opt(self : Graph, v : String) -> Attrs?

#
Graph::nodes

fn Graph::nodes(self : Graph) -> Array[String]

#
Graph::out_edges

fn Graph::out_edges(self : Graph, v : String, w? : String) -> Array[EdgeObj]

#
Graph::parent

fn Graph::parent(self : Graph, v : String) -> String?

#
Graph::predecessors

fn Graph::predecessors(self : Graph, v : String) -> Array[String]

#
Graph::remove_edge

fn Graph::remove_edge(self : Graph, v : String, w : String, name? : String) -> Unit

#
Graph::remove_edge_obj

fn Graph::remove_edge_obj(self : Graph, e : EdgeObj) -> Unit

#
Graph::remove_node

fn Graph::remove_node(self : Graph, v : String) -> Unit

#
Graph::set_default_edge_label

fn Graph::set_default_edge_label(self : Graph, f : () -> Value) -> Unit

Sets the template used for edges without an explicit label.

The function is evaluated immediately. Each edge receives a clone of the resulting value, so labels remain independent without retaining the closure.

#
Graph::set_edge

fn Graph::set_edge(self : Graph, v : String, w : String, label? : Value, name? : String) -> Unit

#
Graph::set_edge_obj

fn Graph::set_edge_obj(self : Graph, e : EdgeObj, label? : Value) -> Unit

#
Graph::set_graph

fn Graph::set_graph(self : Graph, label : Attrs) -> Unit

#
Graph::set_node

fn Graph::set_node(self : Graph, v : String, label? : Attrs) -> Unit

#
Graph::set_nodes

fn Graph::set_nodes(self : Graph, vs : Array[String], label? : Attrs) -> Unit

#
Graph::set_parent

fn Graph::set_parent(self : Graph, v : String, parent? : String) -> Unit

#
Graph::set_path

fn Graph::set_path(self : Graph, vs : Array[String], label? : Value) -> Unit

#
Graph::sinks

fn Graph::sinks(self : Graph) -> Array[String]

#
Graph::sources

fn Graph::sources(self : Graph) -> Array[String]

#
Graph::successors

fn Graph::successors(self : Graph, v : String) -> Array[String]

#
Point

pub struct Point {
x : Double
y : Double
}

#
Value

pub enum Value {
VNull
VBool(Bool)
VInt(Int)
VFloat(Double)
VString(String)
VAttrs(Attrs)
}

#
attrs_value

fn attrs_value(attrs : Attrs) -> Value

#
clone_attrs

fn clone_attrs(attrs : Attrs) -> Attrs

#
clone_value

fn clone_value(value : Value) -> Value

#
components

fn components(g : Graph) -> Array[Array[String]]

#
edge_obj

fn edge_obj(v : String, w : String, name? : String) -> EdgeObj

#
empty_attrs

fn empty_attrs() -> Attrs

#
find_cycles

fn find_cycles(g : Graph) -> Array[Array[String]]

#
point

fn point(x : Double, y : Double) -> Point

#
postorder

fn postorder(g : Graph, roots : Array[String]) -> Array[String]

#
preorder

fn preorder(g : Graph, roots : Array[String]) -> Array[String]

#
value_as_attrs

fn value_as_attrs(value : Value?) -> Attrs?

#
value_as_bool

fn value_as_bool(value : Value?) -> Bool?

#
value_as_float

fn value_as_float(value : Value?) -> Double?

#
value_as_int

fn value_as_int(value : Value?) -> Int?

#
value_as_string

fn value_as_string(value : Value?) -> String?

#
value_bool

fn value_bool(v : Bool) -> Value

#
value_float

fn value_float(v : Double) -> Value

#
value_int

fn value_int(v : Int) -> Value

#
value_null

fn value_null() -> Value

#
value_string

fn value_string(v : String) -> Value

Powered by MoonBit

Site sourceReport issuePackagesBuild queueSkillsStatistics

© 2026 mooncakes.io