pub struct SolveConfig {
pub values: Vec<f64>,
pub col_indices: Vec<u32>,
pub row_ptrs: Vec<u32>,
pub rows: u32,
pub cols: u32,
pub rhs: Vec<f64>,
pub tolerance: Option<f64>,
pub max_iterations: Option<u32>,
pub algorithm: Option<String>,
}Expand description
Configuration for solving a sparse linear system Ax = b.
Fields§
§values: Vec<f64>Non-zero values in CSR format.
col_indices: Vec<u32>Column indices for each non-zero entry.
row_ptrs: Vec<u32>Row pointers (length = rows + 1).
rows: u32Number of rows in the matrix.
cols: u32Number of columns in the matrix.
rhs: Vec<f64>Right-hand side vector b.
tolerance: Option<f64>Convergence tolerance (default: 1e-6).
max_iterations: Option<u32>Maximum number of iterations (default: 1000).
algorithm: Option<String>Algorithm to use: “neumann”, “jacobi”, “gauss-seidel”, “conjugate-gradient”. Defaults to “jacobi”.
Trait Implementations§
Source§impl FromNapiValue for SolveConfig
impl FromNapiValue for SolveConfig
Source§unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>
unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>
Safety Read more
fn from_unknown(value: JsUnknown) -> Result<Self, Error>
Source§impl ToNapiValue for SolveConfig
impl ToNapiValue for SolveConfig
Source§unsafe fn to_napi_value(env: napi_env, val: SolveConfig) -> Result<napi_value>
unsafe fn to_napi_value(env: napi_env, val: SolveConfig) -> Result<napi_value>
Safety Read more
Source§impl TypeName for SolveConfig
impl TypeName for SolveConfig
Source§impl ValidateNapiValue for SolveConfig
impl ValidateNapiValue for SolveConfig
Source§unsafe fn validate(
env: *mut napi_env__,
napi_val: *mut napi_value__,
) -> Result<*mut napi_value__, Error>
unsafe fn validate( env: *mut napi_env__, napi_val: *mut napi_value__, ) -> Result<*mut napi_value__, Error>
Safety Read more
Auto Trait Implementations§
impl Freeze for SolveConfig
impl RefUnwindSafe for SolveConfig
impl Send for SolveConfig
impl Sync for SolveConfig
impl Unpin for SolveConfig
impl UnsafeUnpin for SolveConfig
impl UnwindSafe for SolveConfig
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