![]() |
Ultra 0.9.4
|
Public Member Functions | |
| const individual & | self () const noexcept |
| auto & | genome () noexcept |
| value_type & | operator[] (std::size_t i) noexcept |
| std::size_t | size () const noexcept |
Friends | |
| class | individual |
Proxy granting controlled write access to an individual.
modify_proxy is a capability object created exclusively by individual::modify(). It provides temporary, scoped permission to mutate the internal genome of an individual.
The proxy must not escape the scope of the call to modify(). All class invariants of individual are guaranteed to hold again when individual::modify() returns.
Users must not assume any invariant holds while operating on the proxy, except those explicitly documented.
|
inlinenodiscardnoexcept |
Mutable access to a genome element.
| [in] | i | index of the gene to access |
Provides write access to the gene at position i. This function is only callable within the scope of individual::modify().
|
inlinenodiscardnoexcept |
Access the owning individual in read-only mode.
This allows inspection of the individual while mutation is in progress, without granting additional write access.
|
inlinenodiscardnoexcept |
Number of genes in the genome.