Struct rhai_sci::SciPackage
source · pub struct SciPackage(_);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)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
fn main() {
#[cfg(all(feature = "nalgebra", feature = "io"))]
{
use rhai::{packages::Package, Engine};
use rhai_sci::SciPackage;
// Create a new Rhai engine
let mut engine = Engine::new();
// Add the rhai-sci package to the new engine
engine.register_global_module(SciPackage::new().as_shared_module());
// Now run your code
let fitting_results = engine
.run_file("examples/download_and_regress.rhai".into())
.unwrap();
println!("{:?}", fitting_results);
}
}Trait Implementations§
source§impl Default for SciPackage
impl Default for SciPackage
Auto Trait Implementations§
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
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere SS: SubsetOf<SP>,
§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 more§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).§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.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere SS: SubsetOf<SP>,
§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 more§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).§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.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.