Skip to content

File comp_wptt_vertex_canonicity.c

FileList > comp-wptt_vertex_canonicity > src > comp_wptt_vertex_canonicity.c

Go to the source code of this file

  • #include "comp_wptt_vertex_canonicity.h"
  • #include "bits/stdint-uintn.h"
  • #include "computation_defs.h"
  • #include "notation_wptt.h"
  • #include "stdbool.h"
  • #include "stdio.h"
  • #include "stdlib.h"
  • #include "tang_defs.h"

Public Static Attributes

Type Name
bool comp_wptt_vert_canon_executed = false
The local computation status of the WPTT vertex canonicity module.
comp_wptt_vert_canon_config_t * comp_wptt_vert_canon_localcfg = NULL
The local configuration of the WPTT vertex canonicity module.
comp_wptt_vert_canon_result_t comp_wptt_vert_canon_localrestult = {}
The local result of the WPTT vertex canonicity module.

Public Functions

Type Name
uint8_t comp_wptt_vert_canon_compute ()
A public function, calling this executes the computation on the configured tangle.
uint8_t comp_wptt_vert_canon_config (comp_wptt_vert_canon_config_t * config_arg)
The public configuration function.
STATIC_INLINE bool comp_wptt_vert_canon_positivity (const note_wptt_node_t * vertex, const note_wptt_node_t * parent)
Compute the canonicity of the object vertex against the positivity condition.
const comp_wptt_vert_canon_result_t * comp_wptt_vert_canon_result ()
A public function, calling this retrieves the results of the last computation.
STATIC_INLINE bool comp_wptt_vert_canon_stick (const note_wptt_node_t * vertex, const note_wptt_node_t * parent, bool parent_is_root)
Compute the canonicity of the object vertex against the stick condition.
STATIC_INLINE bool comp_wptt_vert_canon_stick_child (const note_wptt_node_t * child, size_t number_of_children, int active_weight)
Check the stick condition of the vertex looking down.
STATIC_INLINE bool comp_wptt_vert_canon_stick_parent (const note_wptt_node_t * parent, int active_weight, size_t number_of_children)
Check the stick condition of the vertex looking up.
STATIC_INLINE bool comp_wptt_vert_canon_weights (const note_wptt_node_t * vertex)
Check the weight condition of the vertex.

Macros

Type Name
define COMP_WPTT_VERT_CANON_STACK_SIZE ([**UTIL\_TANG\_DEFS\_MAX\_CROSSINGNUM**](tang__defs_8h.md#define-util_tang_defs_max_crossingnum))
The local configuration of the WPTT vertex canonicity module.

Public Static Attributes Documentation

variable comp_wptt_vert_canon_executed

The local computation status of the WPTT vertex canonicity module.

bool comp_wptt_vert_canon_executed;


variable comp_wptt_vert_canon_localcfg

The local configuration of the WPTT vertex canonicity module.

comp_wptt_vert_canon_config_t* comp_wptt_vert_canon_localcfg;


variable comp_wptt_vert_canon_localrestult

The local result of the WPTT vertex canonicity module.

comp_wptt_vert_canon_result_t comp_wptt_vert_canon_localrestult;


Public Functions Documentation

function comp_wptt_vert_canon_compute

A public function, calling this executes the computation on the configured tangle.

uint8_t comp_wptt_vert_canon_compute () 

Returns:

uint8_t Generation status info.


function comp_wptt_vert_canon_config

The public configuration function.

uint8_t comp_wptt_vert_canon_config (
    comp_wptt_vert_canon_config_t * config_arg
) 

Parameters:

  • config_arg The config to set.

function comp_wptt_vert_canon_positivity

Compute the canonicity of the object vertex against the positivity condition.

STATIC_INLINE bool comp_wptt_vert_canon_positivity (
    const note_wptt_node_t * vertex,
    const note_wptt_node_t * parent
) 

Parameters:

  • vertex The object vertex.
  • parent The parent vertex.

Returns:

True if canonical false otherwise.


function comp_wptt_vert_canon_result

A public function, calling this retrieves the results of the last computation.

const comp_wptt_vert_canon_result_t * comp_wptt_vert_canon_result () 

Returns:

comp_wptt_vert_canon_result_t Computation results.


function comp_wptt_vert_canon_stick

Compute the canonicity of the object vertex against the stick condition.

STATIC_INLINE bool comp_wptt_vert_canon_stick (
    const note_wptt_node_t * vertex,
    const note_wptt_node_t * parent,
    bool parent_is_root
) 

Parameters:

  • vertex The object vertex.
  • parent The parent vertex (if any).
  • parent_is_root A flag indicating if the object vertex is near the root.

Returns:

True if canonical false otherwise.


function comp_wptt_vert_canon_stick_child

Check the stick condition of the vertex looking down.

STATIC_INLINE bool comp_wptt_vert_canon_stick_child (
    const note_wptt_node_t * child,
    size_t number_of_children,
    int active_weight
) 

Parameters:

  • child The child vertex of the object vertex.
  • number_of_children The number of children of the object vertex.
  • active_weight The weight carried by the object vertex.

Returns:

True if canonical false otherwise.


function comp_wptt_vert_canon_stick_parent

Check the stick condition of the vertex looking up.

STATIC_INLINE bool comp_wptt_vert_canon_stick_parent (
    const note_wptt_node_t * parent,
    int active_weight,
    size_t number_of_children
) 

Parameters:

  • parent The parent vertex.
  • active_weight The weight carried by the object vertex.
  • number_of_children The number of children of the object vertex.

Returns:

True if canonical false otherwise.


function comp_wptt_vert_canon_weights

Check the weight condition of the vertex.

STATIC_INLINE bool comp_wptt_vert_canon_weights (
    const note_wptt_node_t * vertex
) 

Parameters:

  • vertex The object vertex.

Returns:

True when canonical false otherwise


Macro Definition Documentation

define COMP_WPTT_VERT_CANON_STACK_SIZE

The local configuration of the WPTT vertex canonicity module.

#define COMP_WPTT_VERT_CANON_STACK_SIZE `( UTIL_TANG_DEFS_MAX_CROSSINGNUM )`



The documentation for this class was generated from the following file source/comp-wptt_vertex_canonicity/src/comp_wptt_vertex_canonicity.c