ProvSQL C/C++ API
Adding support for provenance and uncertainty management to PostgreSQL databases
Loading...
Searching...
No Matches
GateInformation Struct Reference

Per-gate metadata stored in the gates MMappedVector. More...

#include "MMappedCircuit.h"

Public Member Functions

 GateInformation (gate_type t, unsigned n, unsigned long i)
 Construct a GateInformation with mandatory fields.
 GateInformation ()
 GateInformation (gate_type t, unsigned n, unsigned long idx)

Public Attributes

gate_type type
 Kind of gate (input, plus, times, …).
unsigned nb_children
 Number of children.
unsigned long children_idx
 Start index of this gate's children in wires.
double prob
 Associated probability (default 1.0).
unsigned info1
 General-purpose integer annotation 1.
unsigned info2
 General-purpose integer annotation 2.
unsigned long extra_idx
 Start index in extra for string data.
unsigned extra_len
 Byte length of the string data in extra.

Detailed Description

Per-gate metadata stored in the gates MMappedVector.

Each gate in the persistent circuit has exactly one GateInformation record. The children_idx and nb_children fields together index into the wires MMappedVector to find the gate's children. Similarly, extra_idx and extra_len index into the extra vector for variable-length string annotations.

Definition at line 61 of file MMappedCircuit.h.

Constructor & Destructor Documentation

◆ GateInformation() [1/3]

GateInformation::GateInformation ( gate_type t,
unsigned n,
unsigned long i )
inline

Construct a GateInformation with mandatory fields.

Parameters
tGate type.
nNumber of children.
iStart index of children in the wires vector.

Definition at line 78 of file MMappedCircuit.h.

◆ GateInformation() [2/3]

GateInformation::GateInformation ( )
inline

Definition at line 89 of file provsql_migrate_mmap.cpp.

◆ GateInformation() [3/3]

GateInformation::GateInformation ( gate_type t,
unsigned n,
unsigned long idx )
inline

Definition at line 92 of file provsql_migrate_mmap.cpp.

Member Data Documentation

◆ children_idx

unsigned long GateInformation::children_idx

Start index of this gate's children in wires.

Definition at line 65 of file MMappedCircuit.h.

◆ extra_idx

unsigned long GateInformation::extra_idx

Start index in extra for string data.

Definition at line 69 of file MMappedCircuit.h.

◆ extra_len

unsigned GateInformation::extra_len

Byte length of the string data in extra.

Definition at line 70 of file MMappedCircuit.h.

◆ info1

unsigned GateInformation::info1

General-purpose integer annotation 1.

Definition at line 67 of file MMappedCircuit.h.

◆ info2

unsigned GateInformation::info2

General-purpose integer annotation 2.

Definition at line 68 of file MMappedCircuit.h.

◆ nb_children

unsigned GateInformation::nb_children

Number of children.

Definition at line 64 of file MMappedCircuit.h.

◆ prob

double GateInformation::prob

Associated probability (default 1.0).

Definition at line 66 of file MMappedCircuit.h.

◆ type

gate_type GateInformation::type

Kind of gate (input, plus, times, …).

Definition at line 63 of file MMappedCircuit.h.


The documentation for this struct was generated from the following files: