Oakfield API Documentation 1.0.0
Numerical core APIs
Loading...
Searching...
No Matches
fractional_memory.h File Reference

History-based fractional memory operator applying a fractional derivative of order q. More...

Include dependency graph for fractional_memory.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  FractionalMemoryOperatorConfig
 Configuration parameters for the fractional memory split operator. More...
 

Typedefs

typedef struct FractionalMemoryOperatorConfig FractionalMemoryOperatorConfig
 Configuration parameters for the fractional memory split operator.
 

Functions

SimResult sim_add_fractional_memory_operator (struct SimContext *context, const FractionalMemoryOperatorConfig *config, size_t *out_index)
 Register a fractional memory operator with the provided configuration.
 
SimResult sim_fractional_memory_config (struct SimContext *context, size_t operator_index, FractionalMemoryOperatorConfig *out_config)
 Copy the current fractional memory configuration from a registered operator.
 
SimResult sim_fractional_memory_update (struct SimContext *context, size_t operator_index, const FractionalMemoryOperatorConfig *config)
 Replace or renormalize an existing fractional memory operator.
 

Detailed Description

History-based fractional memory operator applying a fractional derivative of order q.

Maintains a rolling memory of past states to approximate fractional dynamics. Supports real and complex fields through component-wise accumulation.

Function Documentation

◆ sim_add_fractional_memory_operator()

SimResult sim_add_fractional_memory_operator ( struct SimContext context,
const FractionalMemoryOperatorConfig config,
size_t *  out_index 
)

Register a fractional memory operator with the provided configuration.

Parameters
contextSimulation context that will own the operator.
configOptional operator configuration; NULL selects normalized defaults.
[out]out_indexOptional destination for the registered operator index.
Returns
SIM_RESULT_OK on success, or an error code from argument validation, target-field validation, allocation, coefficient setup, or registration.

◆ sim_fractional_memory_config()

SimResult sim_fractional_memory_config ( struct SimContext context,
size_t  operator_index,
FractionalMemoryOperatorConfig out_config 
)

Copy the current fractional memory configuration from a registered operator.

Parameters
contextSimulation context containing the operator.
operator_indexIndex returned by sim_add_fractional_memory_operator().
[out]out_configReceives the normalized configuration.
Returns
SIM_RESULT_OK on success, SIM_RESULT_INVALID_ARGUMENT for NULL pointers, SIM_RESULT_NOT_FOUND for a missing operator, or SIM_RESULT_INVALID_STATE when the operator has no memory state.

◆ sim_fractional_memory_update()

SimResult sim_fractional_memory_update ( struct SimContext context,
size_t  operator_index,
const FractionalMemoryOperatorConfig config 
)

Replace or renormalize an existing fractional memory operator.

Passing NULL for config keeps the current configuration and reapplies normalization. If order or memory_steps change, coefficients/history are marked for rebuild before the next apply.

Parameters
contextSimulation context containing the operator.
operator_indexIndex of the fractional memory operator to update.
configOptional replacement configuration.
Returns
SIM_RESULT_OK on success, or an error code from lookup, field validation, coefficient setup, or state validation.