Parameter Make.3-Node
val init : ?age:int -> ?version:int -> ?trust:float -> ?known:bool -> ?subs:Bitv.t -> ?sim:float -> ?signature:Stdlib.Bytes.t -> nid -> tinit ?age ?version ?subs ?signature node_id
val age : t -> intage treturns the age of nodet
val version : t -> intversion treturns the version of node profilet
val trust : t -> floattrust treturns the trust value associated with nodet
val known : t -> boolknown treturns whether the nodetis known locally, and thus its trust value was set explicitly
val subs : t -> Bitv.tsubs treturns the subscriptions Bloom filter of node profilet
val sim : t -> floatsim treturns the similarity metric for nodet
val signature : t -> Stdlib.Bytes.tsignature treturns the signature of node profilet
val compare : t -> t -> intcompare a bcompares IDs of nodesa&b. SeeNode_id.compare
val distance : t -> t -> niddistance a bcalculates distance between IDs of nodesa&b. SeeNode_id.distance
val distance_ring : t -> t -> int * niddistance_ring a bcalculates distance on a ring between IDs of nodesa&b. SeeNode_id.distance_ring
val adjust_trust : t -> float -> tadjust_trust t radjusts the trust value of nodetby multiplying it withr.
val set_signature : t -> Stdlib.Bytes.t -> tset_signature t signaturesets the version of node profile tover.
val to_string : t -> stringto_string treturns a string representation of nodet
val pp : Stdlib.Format.formatter -> t -> unitpp fmt tpretty-prints nodet