Skip to content

File generator_rlitt.c

FileList > gen-rlitt > src > generator_rlitt.c

Go to the source code of this file

generator module for rlitt. More...

  • #include "generator_rlitt.h"
  • #include "bits/stdint-uintn.h"
  • #include "comp_rlitt_grafting.h"
  • #include "comp_wptt_vertex_canonicity.h"
  • #include "comp_rlitt_positivity.h"
  • #include "mut_rlitt_ringshift.h"
  • #include "computation_defs.h"
  • #include "generator_defs.h"
  • #include "notation_wptt.h"
  • #include "stdbool.h"
  • #include "stdlib.h"

Public Static Attributes

Type Name
bool gen_rlitt_executed = false
The local configuration of the rlitt gen module.
gen_rlitt_config_t * gen_rlitt_localcfg = NULL
The local configuration of the rlitt gen module.

Public Functions

Type Name
uint8_t gen_rlitt_config (gen_rlitt_config_t * config_arg)
The public configuration function.
uint8_t gen_rlitt_generate ()
The public generation function. When called the module will work against the current config.
STATIC_INLINE const char * gen_rlitt_get_posstr (comp_rlitt_positivity_flvrs_e positivity)
Compute the string representation for the positivity of a tree.
STATIC_INLINE_UINT8 gen_rlitt_grafting_handler (size_t rootstock_idx, size_t scion_idx)
Process the grafting of a rootstock and a scion into one or two resulting trees.
STATIC_INLINE bool gen_rlitt_root_canon (const note_wptt_node_t * root, comp_wptt_vert_canon_positivity_e positivity)
Determine if the vertices adjacent to the root are canonical.
STATIC_INLINE_UINT8 gen_rlitt_store_tangle (const note_wptt_t * result, const note_wptt_t * rootstock, const note_wptt_t * scion, const char * positivity)
Store the grafted tangle.

Detailed Description

Author:

Joe Starr

Public Static Attributes Documentation

variable gen_rlitt_executed

The local configuration of the rlitt gen module.

bool gen_rlitt_executed;


variable gen_rlitt_localcfg

The local configuration of the rlitt gen module.

gen_rlitt_config_t* gen_rlitt_localcfg;


Public Functions Documentation

function gen_rlitt_config

The public configuration function.

uint8_t gen_rlitt_config (
    gen_rlitt_config_t * config_arg
) 

Parameters:

  • config_arg The config to set.

function gen_rlitt_generate

The public generation function. When called the module will work against the current config.

uint8_t gen_rlitt_generate () 

Returns:

uint8_t Generation status info.


function gen_rlitt_get_posstr

Compute the string representation for the positivity of a tree.

STATIC_INLINE const char * gen_rlitt_get_posstr (
    comp_rlitt_positivity_flvrs_e positivity
) 

Parameters:

  • positivity The positivity of a tree.

Returns:

The string representation of the positivity.


function gen_rlitt_grafting_handler

Process the grafting of a rootstock and a scion into one or two resulting trees.

STATIC_INLINE_UINT8 gen_rlitt_grafting_handler (
    size_t rootstock_idx,
    size_t scion_idx
) 

Parameters:

  • rootstock_idx The index for the rootstock.
  • scion_idx The index for the scion.

Returns:

The success status of this generation step.


function gen_rlitt_root_canon

Determine if the vertices adjacent to the root are canonical.

STATIC_INLINE bool gen_rlitt_root_canon (
    const note_wptt_node_t * root,
    comp_wptt_vert_canon_positivity_e positivity
) 

Parameters:

  • root The root vertex for the tree to verify.
  • positivity The positivity condition to verify, positive or negative.

Returns:

True when the vertices adjacent to the root are canonical, false otherwise.


function gen_rlitt_store_tangle

Store the grafted tangle.

STATIC_INLINE_UINT8 gen_rlitt_store_tangle (
    const note_wptt_t * result,
    const note_wptt_t * rootstock,
    const note_wptt_t * scion,
    const char * positivity
) 

Parameters:

  • result the grafted tangle.
  • rootstock the rootstock for the grafted tangle.
  • scion the scion for the grafted tangle.
  • positivity the positivity string for the grafted tangle.

Returns:

The success flag for the operation.



The documentation for this class was generated from the following file source/gen-rlitt/src/generator_rlitt.c