pub struct WasmProductManifold { /* private fields */ }Expand description
Product manifold for WASM: E^e × H^h × S^s
Implementations§
Source§impl WasmProductManifold
impl WasmProductManifold
Sourcepub fn new(
euclidean_dim: usize,
hyperbolic_dim: usize,
spherical_dim: usize,
) -> Self
pub fn new( euclidean_dim: usize, hyperbolic_dim: usize, spherical_dim: usize, ) -> Self
Create a new product manifold
@param euclidean_dim - Dimension of Euclidean component @param hyperbolic_dim - Dimension of hyperbolic component @param spherical_dim - Dimension of spherical component
Sourcepub fn distance(&self, x: &[f64], y: &[f64]) -> Result<f64, JsError>
pub fn distance(&self, x: &[f64], y: &[f64]) -> Result<f64, JsError>
Compute distance in product manifold
Sourcepub fn geodesic(
&self,
x: &[f64],
y: &[f64],
t: f64,
) -> Result<Vec<f64>, JsError>
pub fn geodesic( &self, x: &[f64], y: &[f64], t: f64, ) -> Result<Vec<f64>, JsError>
Geodesic interpolation
Sourcepub fn frechet_mean(
&self,
points: &[f64],
_num_points: usize,
) -> Result<Vec<f64>, JsError>
pub fn frechet_mean( &self, points: &[f64], _num_points: usize, ) -> Result<Vec<f64>, JsError>
Fréchet mean
Trait Implementations§
Source§impl From<WasmProductManifold> for JsValue
impl From<WasmProductManifold> for JsValue
Source§fn from(value: WasmProductManifold) -> Self
fn from(value: WasmProductManifold) -> Self
Converts to this type from the input type.
Source§impl FromWasmAbi for WasmProductManifold
impl FromWasmAbi for WasmProductManifold
Source§impl IntoWasmAbi for WasmProductManifold
impl IntoWasmAbi for WasmProductManifold
Source§impl RefFromWasmAbi for WasmProductManifold
impl RefFromWasmAbi for WasmProductManifold
Source§type Anchor = RcRef<WasmProductManifold>
type Anchor = RcRef<WasmProductManifold>
The type that holds the reference to
Self for the duration of the
invocation of the function that has an &Self parameter. This is
required to ensure that the lifetimes don’t persist beyond one function
call, and so that they remain anonymous.Source§impl TryFromJsValue for WasmProductManifold
impl TryFromJsValue for WasmProductManifold
Source§impl VectorFromWasmAbi for WasmProductManifold
impl VectorFromWasmAbi for WasmProductManifold
type Abi = <Box<[JsValue]> as FromWasmAbi>::Abi
unsafe fn vector_from_abi(js: Self::Abi) -> Box<[WasmProductManifold]>
Source§impl VectorIntoWasmAbi for WasmProductManifold
impl VectorIntoWasmAbi for WasmProductManifold
type Abi = <Box<[JsValue]> as IntoWasmAbi>::Abi
fn vector_into_abi(vector: Box<[WasmProductManifold]>) -> Self::Abi
Source§impl WasmDescribeVector for WasmProductManifold
impl WasmDescribeVector for WasmProductManifold
impl SupportsConstructor for WasmProductManifold
impl SupportsInstanceProperty for WasmProductManifold
impl SupportsStaticProperty for WasmProductManifold
Auto Trait Implementations§
impl Freeze for WasmProductManifold
impl RefUnwindSafe for WasmProductManifold
impl Send for WasmProductManifold
impl Sync for WasmProductManifold
impl Unpin for WasmProductManifold
impl UnwindSafe for WasmProductManifold
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
Source§type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
Same as
IntoWasmAbi::AbiSource§fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
Same as
IntoWasmAbi::into_abi, except that it may throw and never
return in the case of Err.