Skip to main content

Crate neco_jet

Crate neco_jet 

Source
Expand description

§neco-jet

日本語

neco-jet is a crate that provides finite sequences of exact derivative values at one point. Construction validates that the derivative order is within the limit and that the function value equals the order-zero entry.

§Features

Validated Derivative Sequences

Jet::from_value_and_derivatives builds a derivative sequence from the function value at the point (value) and a nonempty sequence of derivative values. Construction confirms that the order-zero entry of the sequence equals the function value.

Order-Preserving Observation

Shifting returns the sequence beginning at the first derivative. Each entry read through an accessor stays associated with its derivative order.

Typed Failures

The variant of JetFailure identifies the cause of a failure: an empty sequence, a mismatch between the function value and the order-zero entry, a reference to an order beyond the sequence, an order above the limit, or a failure in algebraic arithmetic.

§Invariants and Validation Rules

TargetValidation RuleResult
SequenceContains at least the order-zero valueReturns JetFailure for an empty sequence
Order-Zero ValueEquals the function value passed at constructionReturns JetFailure when the values differ
Derivative OrderOrder $\le 64$Returns JetFailure for a larger sequence before storing it
ShiftKeeps the original derivative orderProduces the remaining sequence beginning at the first derivative

§Runtime Configuration

The default configuration uses the standard library.

[dependencies]
neco-jet = "0.1"

Disabling the default std feature leaves dynamic memory allocation as the only runtime requirement, so the crate can be used in environments without the standard library. Derivative sequence and failure semantics are the same in both configurations.

[dependencies]
neco-jet = { version = "0.1", default-features = false }

§Dependencies

§License

MIT License. See the repository LICENSE for details.

Structs§

DerivativeOrder
Jet

Enums§

JetFailure

Constants§

MAX_JET_ORDER