package lbvs_consent

  1. Overview
  2. Docs

Source file node.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
open Printf

module IntSet = BatSet.Int

type t = { typ: string; (* atom's MOL2 type *)
           succs: IntSet.t } (* indexes of its direct successors (it is bonded to them) *)

let create typ succs =
  { typ; succs }

let dummy = create "" IntSet.empty

let add_succ (n: t) (succ: int): t =
  create n.typ (IntSet.add succ n.succs)

let to_string (n: t): string =
  sprintf "%s %s" n.typ (MyList.to_string string_of_int (IntSet.to_list n.succs))

let get_succs (n: t): IntSet.t =
  n.succs

let get_typ (n: t): string =
  n.typ