Skip to main content

Dataset

Trait Dataset 

Source
pub trait Dataset {
    // Required methods
    fn inputs(&self) -> ArrayView2<'_, f64>;
    fn target(&self) -> ArrayView1<'_, f64>;
    fn name(&self) -> &str;
    fn input_names(&self) -> &'static [&'static str];
    fn target_name(&self) -> &'static str;
    fn evaluate<E: Residual + Sync>(
        &self,
        eos: &E,
    ) -> (Array1<f64>, Array1<bool>);
}
Expand description

Dataset that can be evaluated by an equation of state.

Required Methods§

Source

fn inputs(&self) -> ArrayView2<'_, f64>

Inputs for EoS evaluation, shape [n_points, k].

Source

fn target(&self) -> ArrayView1<'_, f64>

Target values, shape [n_points].

Source

fn name(&self) -> &str

Property name.

Used for logging and diagnostics.

Source

fn input_names(&self) -> &'static [&'static str]

Names of independent input columns.

Source

fn target_name(&self) -> &'static str

Name of the target property.

Source

fn evaluate<E: Residual + Sync>(&self, eos: &E) -> (Array1<f64>, Array1<bool>)

Evaluate this dataset’s property with an equation of state.

Returns (predicted, converged):

  • predicted: shape [n_points], in SI units; NaN where the underlying solver did not converge.
  • converged: shape [n_points].

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§