FunctionSpaceInfo

Struct FunctionSpaceInfo 

Source
pub struct FunctionSpaceInfo<'a> {
    pub in_feat_info: &'a FeatureSpaceInfo,
    pub out_feat_info: &'a FeatureSpaceInfo,
}
Expand description

Represents information that’s available about a function type A -> B in terms of the FeatureSpaceInfo for the input and output types. Here, it is important to bear in mind that the flow of data through the application of a typical crate::term_model::TermModel is: input -(input sketcher)-> compressed input -(input feature mapping)-> input features -(model matrix)-> compressed output.

Fields§

§in_feat_info: &'a FeatureSpaceInfo§out_feat_info: &'a FeatureSpaceInfo

Implementations§

Source§

impl<'a> FunctionSpaceInfo<'a>

Source

pub fn get_feature_dimensions(&self) -> usize

Gets the number of dimensions for the input feature space.

Source

pub fn get_output_dimensions(&self) -> usize

Gets the output dimensionality of mappings defined by matrices relative to this FunctionSpaceInfo, so the dimension of the compressed output space.

Source

pub fn get_full_dimensions(&self) -> usize

Gets the total number of dimensions required to define a model matrix for a function within this FunctionSpaceInfo.

Source

pub fn jacobian( &self, mat: ArrayView2<'_, f32>, input: ArrayView1<'_, f32>, ) -> Array2<f32>

Gets the Jacobian for the composite mapping compressed input -(input feature mapping)-> input features -(mat)-> compressed output evaluated at the given compressed input vector.

Source

pub fn apply( &self, mat: ArrayView2<'_, f32>, input: ArrayView1<'_, f32>, ) -> Array1<f32>

Given a model matrix for a function with this FunctionSpaceInfo and a compressed input vector, computes the compressed vector output which results from applying the function to the argument.

Source

pub fn get_data_points(&self, in_data_points: DataPoints) -> DataPoints

Given a DataPoints whose input/output pairs are both in the input/output compressed spaces, yields a new DataPoints whose inputs have been featurized.

Source

pub fn get_data(&self, in_data: DataPoint) -> DataPoint

Given a DataPoint whose input/output pair are both in the input/output compressed spaces, yields a new DataPoint whose input has been featurized.

Source

pub fn apply_schmears(&self, f: &FuncSchmear, x: &Schmear) -> Schmear

Given a model FuncSchmear for this FunctionSpaceInfo, and a Schmear over compressed inputs, yields an estimated Schmear over the result of applying drawn models to drawn inputs.

Trait Implementations§

Source§

impl<'a> Clone for FunctionSpaceInfo<'a>

Source§

fn clone(&self) -> FunctionSpaceInfo<'a>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more

Auto Trait Implementations§

§

impl<'a> Freeze for FunctionSpaceInfo<'a>

§

impl<'a> !RefUnwindSafe for FunctionSpaceInfo<'a>

§

impl<'a> !Send for FunctionSpaceInfo<'a>

§

impl<'a> !Sync for FunctionSpaceInfo<'a>

§

impl<'a> Unpin for FunctionSpaceInfo<'a>

§

impl<'a> !UnwindSafe for FunctionSpaceInfo<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V