File mut_wptt_f_moves.c
FileList > mut-wptt_f_moves > src > mut_wptt_f_moves.c
Go to the source code of this file
Mutates a tree by one of the \(F\_i\) moves. More...
#include "mut_wptt_f_moves.h"#include "mutator_defs.h"#include "notation_wptt.h"#include "stdbool.h"#include "stdio.h"#include "stdlib.h"#include "tang_defs.h"
Public Types
| Type | Name |
|---|---|
| typedef bool(* | should_reverse_funptr_t The function pointer type for walk reverse checker callback functions. |
Public Static Attributes
| Type | Name |
|---|---|
| mut_wptt_f_moves_config_t * | localcfg = NULLVariable to store the local configuration to execute against. |
| uint8_t | was_executed = 0Variable indicating if the configuration has been executed against. |
Public Functions
| Type | Name |
|---|---|
| STATIC_INLINE_UINT8 | mut_wptt_f_moves_F1 () Apply the \(F\_1\) move to a WPTT at the given vertex. |
| STATIC_INLINE_UINT8 | mut_wptt_f_moves_F2 () Apply the \(F\_2\) move to a WPTT at the given vertex. |
| STATIC_INLINE_UINT8 | mut_wptt_f_moves_F3 () Apply the \(F\_3^\prime\) move to a WPTT at the given vertex. |
| STATIC_INLINE_UINT8 | mut_wptt_f_moves_F3_nowrap () Apply \(F\_3^\prime\) to the object vertex with no wrap around parent. |
| STATIC_INLINE_UINT8 | mut_wptt_f_moves_F3_wrap (size_t target_idx) Apply \(F\_3^\prime\) to the object vertex with wrap around parent. |
| STATIC_INLINE note_wptt_V4_label_e | mut_wptt_f_moves_V4_mult (note_wptt_V4_label_e x, note_wptt_V4_label_e y) Multiply two values of the Klein four group. |
| uint8_t | mut_wptt_f_moves_config (mut_wptt_f_moves_config_t * config_arg) The public configuration function. |
| uint8_t | mut_wptt_f_moves_mutate () A public function, calling this executes the mutator on the configured data. |
| STATIC_INLINE bool | mut_wptt_f_moves_revall (size_t depth) Callback function for always true. |
| STATIC_INLINE bool | mut_wptt_f_moves_revodd (size_t depth) Callback function that reverse order at even distance from the root of the walk. |
| STATIC_INLINE_UINT8 | mut_wptt_f_moves_walk (note_wptt_node_t * vertex, should_reverse_funptr_t reverse_checker) Walk the tree, reverse the order of the current vertex when reverse_checker() is true. |
Macros
| Type | Name |
|---|---|
| define | MUT_WPTT_F_MOVES_STACK_SIZE ([**UTIL\_TANG\_DEFS\_MAX\_CROSSINGNUM**](tang__defs_8h.md#define-util_tang_defs_max_crossingnum))The maximum stack size for the walk function. |
Detailed Description
Author:
Joe Starr
Public Types Documentation
typedef should_reverse_funptr_t
The function pointer type for walk reverse checker callback functions.
typedef bool(* should_reverse_funptr_t) (size_t depth);
Public Static Attributes Documentation
variable localcfg
Variable to store the local configuration to execute against.
mut_wptt_f_moves_config_t* localcfg;
variable was_executed
Variable indicating if the configuration has been executed against.
uint8_t was_executed;
Public Functions Documentation
function mut_wptt_f_moves_F1
Apply the \(F\_1\) move to a WPTT at the given vertex.
STATIC_INLINE_UINT8 mut_wptt_f_moves_F1 ()
If the object vertex is not the root the move is mathematically undefined.
Returns:
The success flag of the move.
function mut_wptt_f_moves_F2
Apply the \(F\_2\) move to a WPTT at the given vertex.
STATIC_INLINE_UINT8 mut_wptt_f_moves_F2 ()
If the object vertex is not the root the move is mathematically undefined.
Returns:
The success flag of the move.
function mut_wptt_f_moves_F3
Apply the \(F\_3^\prime\) move to a WPTT at the given vertex.
STATIC_INLINE_UINT8 mut_wptt_f_moves_F3 ()
If the move would be applied "upwards" in the tree instead apply \(F\_3^\prime\) to all siblings in the opposite direction.
Returns:
The success flag of the move.
function mut_wptt_f_moves_F3_nowrap
Apply \(F\_3^\prime\) to the object vertex with no wrap around parent.
STATIC_INLINE_UINT8 mut_wptt_f_moves_F3_nowrap ()
Returns:
Indicate the success of the operation.
function mut_wptt_f_moves_F3_wrap
Apply \(F\_3^\prime\) to the object vertex with wrap around parent.
STATIC_INLINE_UINT8 mut_wptt_f_moves_F3_wrap (
size_t target_idx
)
Returns:
Indicate the success of the operation.
function mut_wptt_f_moves_V4_mult
Multiply two values of the Klein four group.
STATIC_INLINE note_wptt_V4_label_e mut_wptt_f_moves_V4_mult (
note_wptt_V4_label_e x,
note_wptt_V4_label_e y
)
Parameters:
xLeft multiplicand.yRight multiplicand.
Returns:
Resultant element of \(K\_4\).
function mut_wptt_f_moves_config
The public configuration function.
uint8_t mut_wptt_f_moves_config (
mut_wptt_f_moves_config_t * config_arg
)
Parameters:
config_argThe config to set.
function mut_wptt_f_moves_mutate
A public function, calling this executes the mutator on the configured data.
uint8_t mut_wptt_f_moves_mutate ()
Returns:
uint8_t Mutation status info.
function mut_wptt_f_moves_revall
Callback function for always true.
STATIC_INLINE bool mut_wptt_f_moves_revall (
size_t depth
)
Parameters:
depthThe depth that has been achieved in the tree walk.
Returns:
The determination of if to reverse the order of the vertex.
function mut_wptt_f_moves_revodd
Callback function that reverse order at even distance from the root of the walk.
STATIC_INLINE bool mut_wptt_f_moves_revodd (
size_t depth
)
An odd depth indicates an even distance from the root the root is depth \(0\).
Parameters:
depthThe count of edges away from the root of the tree.
Returns:
The determination of if to reverse the order of the vertex.
function mut_wptt_f_moves_walk
Walk the tree, reverse the order of the current vertex when reverse_checker() is true.
STATIC_INLINE_UINT8 mut_wptt_f_moves_walk (
note_wptt_node_t * vertex,
should_reverse_funptr_t reverse_checker
)
Parameters:
vertexThe vertex to start the walk at.reverse_checkerThe function to determine if order should be reversed.
Returns:
The success flag of the move.
Macro Definition Documentation
define MUT_WPTT_F_MOVES_STACK_SIZE
The maximum stack size for the walk function.
#define MUT_WPTT_F_MOVES_STACK_SIZE `( UTIL_TANG_DEFS_MAX_CROSSINGNUM )`
The documentation for this class was generated from the following file source/mut-wptt_f_moves/src/mut_wptt_f_moves.c