package prbnmcn-stats

  1. Overview
  2. Docs

Dist handles distances between vertices. The distance between two vertices is the length of a shortest path between those vertices.

type t =
  1. | Inf
  2. | Fin of int
val zero : t

The distance between two vertices is zero iff they are equal.

val one : t

The distance between two vertices is one iff they are adjacent.

val infty : t

The distance between two vertices is infty iff they are disconnected.

val (+) : t -> t -> t

Adding distances.

val (>) : t -> t -> bool

Comparing distances.

val (=) : t -> t -> bool

Testing distance for equality.

val max : t -> t -> t

Computing the max of two distances.

val pp : Format.formatter -> t -> unit

Pretty printing.

OCaml

Innovation. Community. Security.