hyparview v0.1.4 Hyparview.View View Source

Hyparview VIEW struct and functions

Link to this section Summary

Link to this section Types

Link to this type t() View Source
t() :: %Hyparview.View{
  active: MapSet.t(),
  active_size: non_neg_integer(),
  arwl: non_neg_integer(),
  passive: MapSet.t(),
  passive_size: non_neg_integer(),
  prwl: non_neg_integer()
}

Link to this section Functions

Link to this function has_free_slot_in_active_view?(view) View Source
has_free_slot_in_active_view?(t()) :: boolean()
Link to this function is_node_already_added?(node, view) View Source
is_node_already_added?(Node.t(), t()) :: boolean()
Link to this function move_active_to_passive(node, view) View Source
move_active_to_passive(Node.t(), Hyparview.View.t()) :: Hyparview.View.t()
Link to this function move_passive_to_active(view, node) View Source
move_passive_to_active(Hyparview.View.t(), Node.t()) :: Hyparview.View.t()
Link to this function trim_and_add_to_passive(view, nodes) View Source
trim_and_add_to_passive(Hyparview.View.t(), Node.t() | MapSet.t()) ::
  Hyparview.View.t()
Link to this function try_add_node_to_active(node, view) View Source
try_add_node_to_active(Node.t(), t()) ::
  {:ok, t()} | {{:error, :failed_to_connect}, t()}