Skip to content

File mut_rlitt_ringshift.c

FileList > mut-rlitt_ringshift > src > mut_rlitt_ringshift.c

Go to the source code of this file

A rlitt_ringshift module. More...

  • #include "mut_rlitt_ringshift.h"
  • #include "stdbool.h"
  • #include "stdint.h"
  • #include "stdio.h"
  • #include "stdlib.h"
  • #include "tang_defs.h"

Public Static Attributes

Type Name
bool mut_rlitt_ringshift_executed = false
The local computation status of the RLITT ring shift computation module.
mut_rlitt_ringshift_config_t * mut_rlitt_ringshift_localcfg = NULL
The local configuration of the RLITT ring shift computation module.
note_wptt_node_t * mut_rlitt_ringshift_localnodes
The local configuration of the RLITT ring shift computation module.

Public Functions

Type Name
uint8_t mut_rlitt_ringshift_config (mut_rlitt_ringshift_config_t * config_arg)
The public configuration function.
STATIC_INLINE bool mut_rlitt_ringshift_is_ringsubtree (const note_wptt_node_t * node)
Identify if the vertex is the root of a \(\pm\)-ring subtree.
STATIC_INLINE void mut_rlitt_ringshift_move_ringsubtrees (note_wptt_node_t * node)
Sort the children of a vertex so ring subtrees are at the highest indices.
uint8_t mut_rlitt_ringshift_mutate ()
A public function, calling this executes the computation on the configured tangle.
STATIC_INLINE void mut_rlitt_ringshift_reverse_node (note_wptt_node_t * node)
Normalize the vertex order to forward.
STATIC_INLINE_UINT8 mut_rlitt_ringshift_ringshift_tree (note_wptt_t * tree)
Walk the input tree.
STATIC_INLINE int mut_rlitt_ringshift_ringsubtreecmp (const void * node1, const void * node2)
Compares two vertices and orders them.

Macros

Type Name
define MUT_RLITT_RINGSHIFT_STACK_SIZE ([**UTIL\_TANG\_DEFS\_MAX\_CROSSINGNUM**](tang__defs_8h.md#define-util_tang_defs_max_crossingnum))
Maximum size of the stacks used for tree traversal.

Detailed Description

Author:

Joe Starr

Public Static Attributes Documentation

variable mut_rlitt_ringshift_executed

The local computation status of the RLITT ring shift computation module.

bool mut_rlitt_ringshift_executed;


variable mut_rlitt_ringshift_localcfg

The local configuration of the RLITT ring shift computation module.

mut_rlitt_ringshift_config_t* mut_rlitt_ringshift_localcfg;


variable mut_rlitt_ringshift_localnodes

The local configuration of the RLITT ring shift computation module.

note_wptt_node_t* mut_rlitt_ringshift_localnodes;


Public Functions Documentation

function mut_rlitt_ringshift_config

The public configuration function.

uint8_t mut_rlitt_ringshift_config (
    mut_rlitt_ringshift_config_t * config_arg
) 

Parameters:

  • config_arg The config to set.

function mut_rlitt_ringshift_is_ringsubtree

Identify if the vertex is the root of a \(\pm\)-ring subtree.

STATIC_INLINE bool mut_rlitt_ringshift_is_ringsubtree (
    const note_wptt_node_t * node
) 

Parameters:

  • node the vertex to examine.

Returns:


function mut_rlitt_ringshift_move_ringsubtrees

Sort the children of a vertex so ring subtrees are at the highest indices.

STATIC_INLINE void mut_rlitt_ringshift_move_ringsubtrees (
    note_wptt_node_t * node
) 

Parameters:

  • node The vertex to sort the children of.

function mut_rlitt_ringshift_mutate

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

uint8_t mut_rlitt_ringshift_mutate () 

Returns:

uint8_t Generation status info.


function mut_rlitt_ringshift_reverse_node

Normalize the vertex order to forward.

STATIC_INLINE void mut_rlitt_ringshift_reverse_node (
    note_wptt_node_t * node
) 

Parameters:

  • node The vertex to reverse.

function mut_rlitt_ringshift_ringshift_tree

Walk the input tree.

STATIC_INLINE_UINT8 mut_rlitt_ringshift_ringshift_tree (
    note_wptt_t * tree
) 

Parameters:

  • tree The input tree.

Returns:


function mut_rlitt_ringshift_ringsubtreecmp

Compares two vertices and orders them.

STATIC_INLINE int mut_rlitt_ringshift_ringsubtreecmp (
    const void * node1,
    const void * node2
) 

The function takes two vertices as input. The two are placed in the following order:

  • node1 < node2: When node2 has a ring and node1 does not
  • node2 < node1: When node1 has a ring and node2 does not
  • node1 = node2: When node1 and node2 both have a ring

Parameters:

  • node1 The first node.
  • node2 The second vertex.

Returns:

An integer -1,0,1 indicating the result of the compare.


Macro Definition Documentation

define MUT_RLITT_RINGSHIFT_STACK_SIZE

Maximum size of the stacks used for tree traversal.

#define MUT_RLITT_RINGSHIFT_STACK_SIZE `( UTIL_TANG_DEFS_MAX_CROSSINGNUM )`



The documentation for this class was generated from the following file source/mut-rlitt_ringshift/src/mut_rlitt_ringshift.c