pub struct JsRealVectorStateSpace {
pub inner: Arc<Mutex<RealVectorStateSpace>>,
}Fields§
§inner: Arc<Mutex<RealVectorStateSpace>>Implementations§
Source§impl JsRealVectorStateSpace
impl JsRealVectorStateSpace
pub fn new( dimension: usize, bounds: Option<Vec<f64>>, ) -> Result<JsRealVectorStateSpace, String>
pub fn sample(&self) -> Result<JsRealVectorState, String>
pub fn distance( &self, state1: &JsRealVectorState, state2: &JsRealVectorState, ) -> f64
pub fn satisfies_bounds(&self, state: &JsRealVectorState) -> bool
pub fn enforce_bounds(&self, state: &JsRealVectorState) -> JsRealVectorState
pub fn interpolate( &self, from: &JsRealVectorState, to: &JsRealVectorState, t: f64, ) -> JsRealVectorState
pub fn get_dimension(&self) -> usize
pub fn get_maximum_extent(&self) -> f64
pub fn get_longest_valid_segment_length(&self) -> f64
pub fn set_longest_valid_segment_fraction(&mut self, fraction: f64)
Trait Implementations§
Source§impl From<JsRealVectorStateSpace> for JsValue
impl From<JsRealVectorStateSpace> for JsValue
Source§fn from(value: JsRealVectorStateSpace) -> Self
fn from(value: JsRealVectorStateSpace) -> Self
Converts to this type from the input type.
Source§impl FromWasmAbi for JsRealVectorStateSpace
impl FromWasmAbi for JsRealVectorStateSpace
Source§impl IntoWasmAbi for JsRealVectorStateSpace
impl IntoWasmAbi for JsRealVectorStateSpace
Source§impl RefFromWasmAbi for JsRealVectorStateSpace
impl RefFromWasmAbi for JsRealVectorStateSpace
Source§type Anchor = RcRef<JsRealVectorStateSpace>
type Anchor = RcRef<JsRealVectorStateSpace>
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.impl SupportsConstructor for JsRealVectorStateSpace
impl SupportsInstanceProperty for JsRealVectorStateSpace
impl SupportsStaticProperty for JsRealVectorStateSpace
Source§impl VectorFromWasmAbi for JsRealVectorStateSpace
impl VectorFromWasmAbi for JsRealVectorStateSpace
type Abi = <Box<[JsValue]> as FromWasmAbi>::Abi
unsafe fn vector_from_abi(js: Self::Abi) -> Box<[JsRealVectorStateSpace]>
Source§impl VectorIntoWasmAbi for JsRealVectorStateSpace
impl VectorIntoWasmAbi for JsRealVectorStateSpace
type Abi = <Box<[JsValue]> as IntoWasmAbi>::Abi
fn vector_into_abi(vector: Box<[JsRealVectorStateSpace]>) -> Self::Abi
Source§impl WasmDescribeVector for JsRealVectorStateSpace
impl WasmDescribeVector for JsRealVectorStateSpace
Auto Trait Implementations§
impl Freeze for JsRealVectorStateSpace
impl RefUnwindSafe for JsRealVectorStateSpace
impl Send for JsRealVectorStateSpace
impl Sync for JsRealVectorStateSpace
impl Unpin for JsRealVectorStateSpace
impl UnsafeUnpin for JsRealVectorStateSpace
impl UnwindSafe for JsRealVectorStateSpace
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.