Autodocs - Container on-the-fly

template<class State = danceq::internal::State<128, 2, uint64_t>>
class ContainerFly

The class enumerates states on-the-fly for a small subsystem.

Template parameters

  • class State: The only template parameter is the State class

    Default: danceq::internal:: State <128,2,uint64_t>

Things to know

  • The class enumerates a subsystems of length \(L_P\) with a maximal number of particle number \(n_P = \max \left(L_P\cdot(Q-1),n\right)\) where \(n\) is the total particle number of the entire system.

  • More information can be found here.

  • The underlying State class can be accessed via Container::state_class.

  • The basic idea is already implemented in the State class, see State enumeration with number conservation, and can be understood in the limit of partitioning a system of size L into L parts. All necessary coefficients have been computed in advance to allow for a fast computation.

  • No memory overhead.

  • The debugging level can be adjusted from 0 (no debugging) to 10 (maximal debugging):

    #define dbug_level 10; // 10 maximal debugging, 0 is no debugging
    

Public Static Attributes

static const bool is_State = false

Needed for specification.

Protected Types

using state_class = State

State class.

State class can be retrieved from the BasisU1:

// Definition of classes
using State = danceq::internal::State<256,4>;
using Container = danceq::internal::ContainerTable<State>;
using Basis = danceq::internal::BasisU1<Container>;

// This equivalent to: State state;
Container::state_class state;  

Protected Functions

ContainerFly(uint64_t L_, uint64_t n_max_ = -1UL)

Constructor.

Constructs an instance with a given length L_ and maximal particle number n_max_. Default particle number of -1 sets n_max to L_ (Q-1).

Parameters:
  • L_ – System size

  • n_max_ – Particle number

int32_t info(void) const

Prints information about the class.

Prints information about the class such as basics parameters and current memory usage.

Returns:

error_code

int32_t get_number_of_bytes(uint64_t *number_of_bytes) const

Returns the memory usages in bytes.

Parameters:

number_of_bytes – Pointer for output

Returns:

error_code

int32_t get_index(uint64_t *output, const State &state, uint64_t start, uint64_t end) const

Returns the index of a specific state within start to **end***.

Parameters:
  • output – Pointer for output

  • state – State

  • start – Start of interval

  • end – End of interval

Returns:

error_code

int32_t is_maximal(bool *output, State &state, uint64_t start, uint64_t end, typename State::integer_type n_ = -1) const

Check if a specific state is maximal within start to end.

Default value of n_=-1 means that the particle number is calculated within the function.

Parameters:
  • output – Pointer for output

  • state – State

  • start – Start of interval

  • end – End of interval

  • n_ – Particle number within the interval

Returns:

error_code

int32_t is_minimal(bool *output, State &state, uint64_t start, uint64_t end, typename State::integer_type n_ = -1) const

Check if a specific state is minimal within start to end.

Default value of n_=-1 means that the particle number is calculated within the function.

Parameters:
  • output – Pointer for output

  • state – State

  • start – Start of interval

  • end – End of interval

  • n_ – Particle number within the interval

Returns:

error_code

Private Members

const uint64_t L

Length of subsystem.

const uint64_t n_max

Maximal number of particles.

std::vector<uint64_t> dimensions

Coefficients.

The vector stores all necessary coefficients that might be required during the computation. Maximal size is \(\textbf{L}\cdot\textbf{Q}\cdot(\textbf{n_max}+1)\).

std::vector<State> maximal_state_per_n

Defines the maximal state per allowed particle number.

Maximal state per allowed particle number \(n_P\in[0,\textbf{n_max}]\) in form of IntType defined by the state class.

std::vector<State> minimal_state_per_n

Defines the minimal state per allowed particle number.

Minimal state per allowed particle number \(n_P\in[0,\textbf{n_max}]\) in form of IntType defined by the state class.