Syntropy.PositionComputer (syntropy v0.1.0)

Copy Markdown

Periodic lattice position refresh using the shared contract interval.

Summary

Types

agent_ref()

@type agent_ref() :: Syntropy.ClusterInfo.agent_ref()

connection_kind()

@type connection_kind() :: :thought | :synthesis

contribution_type()

@type contribution_type() :: :solo_task | :parallel_task | :synthesis_task

ordering_signature()

@type ordering_signature() :: {[String.t()], non_neg_integer(), non_neg_integer()}

state()

@type state() :: %{
  contributions: %{optional(String.t()) => [String.t()]},
  connection_config: %{required(String.t()) => float()},
  history_limit: pos_integer(),
  last_ordering_signature: ordering_signature() | nil,
  weights: %{required(String.t()) => float()}
}

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

recompute_now(opts \\ [])

@spec recompute_now(keyword()) :: :ok

recompute_refs(agent_refs, opts \\ [])

@spec recompute_refs(
  [agent_ref()],
  keyword()
) :: :ok

record_connections(agent_ids, kind)

@spec record_connections([String.t()], connection_kind()) :: :ok

record_connections_refs(agent_refs, kind)

@spec record_connections_refs([agent_ref()], connection_kind()) :: :ok

record_contribution(agent_ids, contribution_type)

@spec record_contribution(String.t() | [String.t()], contribution_type() | String.t()) ::
  :ok

record_contribution_refs(agent_refs, contribution_type)

@spec record_contribution_refs([agent_ref()], contribution_type() | String.t()) :: :ok

record_local_contribution(agent_ids, contribution_type)

@spec record_local_contribution([String.t()], contribution_type() | String.t()) :: :ok

reset()

@spec reset() :: :ok

start_link(opts \\ [])

@spec start_link(keyword()) :: GenServer.on_start()