pub struct SciPackage(/* private fields */);
Expand description
Package for scientific computing
Implementations§
Source§impl SciPackage
impl SciPackage
Sourcepub fn new() -> Self
pub fn new() -> Self
Create a new SciPackage
Examples found in repository?
examples/download_and_regress.rs (line 11)
1fn main() {
2 #[cfg(all(feature = "nalgebra", feature = "io"))]
3 {
4 use rhai::{packages::Package, Engine};
5 use rhai_sci::SciPackage;
6
7 // Create a new Rhai engine
8 let mut engine = Engine::new();
9
10 // Add the rhai-sci package to the new engine
11 engine.register_global_module(SciPackage::new().as_shared_module());
12
13 // Now run your code
14 let fitting_results = engine
15 .run_file("examples/download_and_regress.rhai".into())
16 .unwrap();
17 println!("{:?}", fitting_results);
18 }
19}
Trait Implementations§
Source§impl Default for SciPackage
impl Default for SciPackage
Auto Trait Implementations§
impl Freeze for SciPackage
impl !RefUnwindSafe for SciPackage
impl !Send for SciPackage
impl !Sync for SciPackage
impl Unpin for SciPackage
impl !UnwindSafe for SciPackage
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.