smntc
an in-memory multimodal graph database
Loading...
Searching...
No Matches
Functions
Binary.h File Reference
#include "Graph.h"
+ Include dependency graph for Binary.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

struct BinaryBinary_construct (unsigned int root, struct Graph *graph, int *error)
 ssssw
 
struct BinaryBinary_destruct (struct Binary *this)
 
unsigned int Binary_writeCode (struct Binary *this, unsigned int input, int *error)
 It writes binary value from an unsigned integer into a graph.
 
unsigned int Binary_readCode (struct Binary *this, unsigned int code, int *error)
 It reads binary value into an unsigned integer when given a vertex from a binary cluster.
 

Function Documentation

◆ Binary_construct()

struct Binary * Binary_construct ( unsigned int  root,
struct Graph graph,
int *  error 
)

ssssw

Parameters
root
graph
error
Returns
struct Binary*

Definition at line 42 of file Binary.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Binary_destruct()

struct Binary * Binary_destruct ( struct Binary this)

Definition at line 87 of file Binary.c.

+ Here is the caller graph for this function:

◆ Binary_readCode()

unsigned int Binary_readCode ( struct Binary this,
unsigned int  code,
int *  error 
)

It reads binary value into an unsigned integer when given a vertex from a binary cluster.

Parameters
thisa manager object for binary codes
codea special vertex that exists at the border of a binary layer
errorerror tracking (0 means no error)

Definition at line 211 of file Binary.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Binary_writeCode()

unsigned int Binary_writeCode ( struct Binary this,
unsigned int  input,
int *  error 
)

It writes binary value from an unsigned integer into a graph.

Leading zeros of the value container are ignored. It's expected that most significant digits are at the beginning of the container. The last bit is attached to the binary root in order to simplify reading the value back.

Returns
a special vertex that exists at the border of a binary layer. Normal binary clusters have 2 vertices. Clusters at the border have 3 vertices.
Parameters
thisa manager object for binary codes
inputa container with a binary value
errorerror tracking (0 means no error)

Definition at line 96 of file Binary.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function: