Skip to content

File comp_rlitt_positivity.c

FileList > comp-rlitt_positivity > src > comp_rlitt_positivity.c

Go to the source code of this file

A rlitt_positivity module. More...

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

Public Static Attributes

Type Name
bool comp_rlitt_positivity_executed = false
The local computation status of the RLITT positivity computation module.
comp_rlitt_positivity_config_t * comp_rlitt_positivity_localcfg = NULL
The local configuration of the RLITT positivity computation module.
comp_rlitt_positivity_result_t comp_rlitt_positivity_localrestult = {}
The local result of the RLITT positivity computation module.

Public Functions

Type Name
uint8_t comp_rlitt_positivity_compute ()
A public function, calling this executes the computation on the configured tangle.
uint8_t comp_rlitt_positivity_config (comp_rlitt_positivity_config_t * config_arg)
The public configuration function.
STATIC_INLINE void comp_rlitt_positivity_proc_internal (size_t stick_length, bool stick_has_p2, bool stick_has_m2)
Processes an internal vertex (has parent and children) to determine its positivity.
STATIC_INLINE void comp_rlitt_positivity_proc_leaf (int8_t weight)
Processes a leaf vertex (has parent and no children) to determine its positivity.
const comp_rlitt_positivity_result_t * comp_rlitt_positivity_result ()
A public function, calling this retrieves the results of the last computation.
STATIC_INLINE_UINT8 comp_rlitt_positivity_walk_tree (const note_wptt_t * tree)
Walk the input tree and determine positivity of each vertex.

Macros

Type Name
define COMP_RLITT_POSITIVITY_STACK_SIZE ([**UTIL\_TANG\_DEFS\_MAX\_CROSSINGNUM**](tang__defs_8h.md#define-util_tang_defs_max_crossingnum))

Detailed Description

Author:

Joe Starr

Public Static Attributes Documentation

variable comp_rlitt_positivity_executed

The local computation status of the RLITT positivity computation module.

bool comp_rlitt_positivity_executed;


variable comp_rlitt_positivity_localcfg

The local configuration of the RLITT positivity computation module.

comp_rlitt_positivity_config_t* comp_rlitt_positivity_localcfg;


variable comp_rlitt_positivity_localrestult

The local result of the RLITT positivity computation module.

comp_rlitt_positivity_result_t comp_rlitt_positivity_localrestult;


Public Functions Documentation

function comp_rlitt_positivity_compute

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

uint8_t comp_rlitt_positivity_compute () 

Returns:

uint8_t Generation status info.


function comp_rlitt_positivity_config

The public configuration function.

uint8_t comp_rlitt_positivity_config (
    comp_rlitt_positivity_config_t * config_arg
) 

Parameters:

  • config_arg The config to set.

function comp_rlitt_positivity_proc_internal

Processes an internal vertex (has parent and children) to determine its positivity.

STATIC_INLINE void comp_rlitt_positivity_proc_internal (
    size_t stick_length,
    bool stick_has_p2,
    bool stick_has_m2
) 

Parameters:

  • stick_length The current length of the stick being traversed
  • stick_has_p2 Indicates if the stick being traversed contains a weight of +2.
  • stick_has_m2 Indicates if the stick being traversed contains a weight of -2.

function comp_rlitt_positivity_proc_leaf

Processes a leaf vertex (has parent and no children) to determine its positivity.

STATIC_INLINE void comp_rlitt_positivity_proc_leaf (
    int8_t weight
) 

Parameters:

  • weight The weight of the leaf vertex.

function comp_rlitt_positivity_result

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

const comp_rlitt_positivity_result_t * comp_rlitt_positivity_result () 

Returns:

comp_rlitt_positivity_result_t Computation results.


function comp_rlitt_positivity_walk_tree

Walk the input tree and determine positivity of each vertex.

STATIC_INLINE_UINT8 comp_rlitt_positivity_walk_tree (
    const note_wptt_t * tree
) 

Parameters:

  • tree The tree to walk.

Returns:

A status indicator for the function.


Macro Definition Documentation

define COMP_RLITT_POSITIVITY_STACK_SIZE

#define COMP_RLITT_POSITIVITY_STACK_SIZE `( UTIL_TANG_DEFS_MAX_CROSSINGNUM )`


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