QuIDS: Quantum Irregular Dynamic Simulator
Public Member Functions
quids::rule Class Referenceabstract

class represneting a dynamic (or rule). More...

#include <quids.hpp>

Public Member Functions

 rule ()
 base constructor
 
virtual void get_num_child (char const *parent_begin, char const *parent_end, uint &num_child, uint &max_child_size) const =0
 function geting the number of children More...
 
virtual void populate_child (char const *parent_begin, char const *parent_end, char *const child_begin, uint const child_id, uint &size, mag_t &mag) const =0
 function generating a child, and computing its magnitude and size. More...
 
virtual void populate_child_simple (char const *parent_begin, char const *parent_end, char *const child_begin, uint const child_id) const
 function generating a child, without computing its magnitude and size. More...
 
virtual size_t hasher (char const *object_begin, char const *object_end) const
 optional function hashing an object. More...
 

Detailed Description

class represneting a dynamic (or rule).

Member Function Documentation

◆ get_num_child()

virtual void quids::rule::get_num_child ( char const *  parent_begin,
char const *  parent_end,
uint &  num_child,
uint &  max_child_size 
) const
inlinepure virtual

function geting the number of children

Parameters
[in]parent_begin,parent_enddelimitation of the parent object memory representation.
[out]num_childnumber of children objects.
[out]max_child_sizeupper bound (can be unacurate) of the size of childrens.

◆ hasher()

virtual size_t quids::rule::hasher ( char const *  object_begin,
char const *  object_end 
) const
inlinevirtual

optional function hashing an object.

Base implementation simply hashes the memory representation of an object. User should provide this function if objects that should be considered equals have different memory representation.

Parameters
[in]object_begin,object_enddelimitation of the object to hash memory representation.

◆ populate_child()

virtual void quids::rule::populate_child ( char const *  parent_begin,
char const *  parent_end,
char *const  child_begin,
uint const  child_id,
uint &  size,
mag_t mag 
) const
inlinepure virtual

function generating a child, and computing its magnitude and size.

Parameters
[in]parent_begin,parent_enddelimitation of the parent object memory representation.
[out]child_beginstart of the memory representation of the child memory representation.
[in]child_idchildren identifier among its siblings.
[out]sizechild object memory representation size.
[out]magmagnitude of the children object (input should be the parent magnitude).

◆ populate_child_simple()

virtual void quids::rule::populate_child_simple ( char const *  parent_begin,
char const *  parent_end,
char *const  child_begin,
uint const  child_id 
) const
inlinevirtual

function generating a child, without computing its magnitude and size.

Parameters
[in]parent_begin,parent_enddelimitation of the parent object memory representation.
[out]child_beginstart of the memory representation of the child memory representation.
[in]child_idchildren identifier among its siblings.

The documentation for this class was generated from the following file: