Core abstraction of the Chiffres monetary system.
More...
#include <Chiffre.h>
|
| | Chiffre (double initial=0.0) |
| | Construct a wallet with an initial amount.
|
| void | spend (double amount) |
| | Spend from the wallet (deterministic).
|
| void | receive (double amount) |
| | Receive into the wallet (deterministic).
|
| double | mutate (const EthicsScore ðics, const CyclePhase &cycle) |
| | Trigger a mutation when the wallet is at rest.
|
|
void | set_state (State state) noexcept |
| | Set the current wallet state (Circulation or Rest).
|
|
State | state () const noexcept |
| | Get current state.
|
|
double | total () const noexcept |
| | Get current balance.
|
|
const Memory & | memory () const noexcept |
| | Access memory snapshot (read-only).
|
| void | record_flow (double amount, bool incoming) |
| | Record a deterministic flow (called internally by spend/receive).
|
Core abstraction of the Chiffres monetary system.
A Chiffres wallet is a living value container with two fundamental modes:
- In circulation, transactions are exact and deterministic.
- At rest, the value undergoes probabilistic mutations governed by:
The class encapsulates both deterministic accounting and stochastic dynamics.
◆ Chiffre()
| Chiffre::Chiffre |
( |
double | initial = 0.0 | ) |
|
|
explicit |
Construct a wallet with an initial amount.
- Parameters
-
◆ mutate()
Trigger a mutation when the wallet is at rest.
Applies a stochastic multiplicative factor to the current balance. The distribution is log-normal and influenced by:
- EthicsScore (stability/destabilization, drift bias)
- CyclePhase (time-based variance modulation)
- Memory (feedback from past events)
- Ether (collective field density, self-regulation)
- Parameters
-
| ethics | Ethical score of the actor. |
| cycle | Position within the cycle of time/nature. |
- Returns
- The delta applied to the balance (positive = gain, negative = loss).
- Note
- If the wallet is not in State::Rest, returns 0.0 and does nothing.
◆ receive()
| void Chiffre::receive |
( |
double | amount | ) |
|
Receive into the wallet (deterministic).
- Parameters
-
| amount | Positive amount to add. |
- Exceptions
-
| std::invalid_argument | if amount < 0. |
◆ record_flow()
| void Chiffre::record_flow |
( |
double | amount, |
|
|
bool | incoming ) |
Record a deterministic flow (called internally by spend/receive).
Updates memory biases depending on:
- The direction of the flow (incoming/outgoing).
- The magnitude of the transaction.
- Parameters
-
| amount | Absolute amount of the flow. |
| incoming | True if it is an incoming transaction. |
◆ spend()
| void Chiffre::spend |
( |
double | amount | ) |
|
Spend from the wallet (deterministic).
- Parameters
-
| amount | Positive amount to subtract. |
- Exceptions
-
| std::invalid_argument | if amount < 0. |
The documentation for this class was generated from the following files: