Template Struct WritableState

Inheritance Relationships

Base Type

  • public dish2::internal::writable_state_parent_t< Spec >

Struct Documentation

template<typename Spec>
struct dish2::WritableState : public dish2::internal::writable_state_parent_t<Spec>

Writable state refers to the collection of output values that evolving programs running within each cardinal can write to and read from.

Some of these outputs enable interaction with the simulation (i.e., control phenotypic characteristics). Each cardinal has an independent copy of each piece of writable state state.

Public Types

using parent_t = dish2::internal::writable_state_parent_t<Spec>

Public Functions

void AddTo(const size_t idx, const float val)
void Multiply(const size_t idx, const float val)
void Write(const size_t idx, const float val)
void Assign(const size_t idx, const WritableState &other)
void Swap(const size_t idx, WritableState &other)

Public Static Functions

std::string GetLeafTypeName(const size_t idx)
size_t GetLeafIndex(const size_t idx)

Public Static Attributes

constexpr size_t parent_size = parent_t::GetSize()