pub struct ConjugateGradient<P, S> { /* private fields */ }
Expand description
Implementations§
Source§impl<P, S> ConjugateGradient<P, S>
impl<P, S> ConjugateGradient<P, S>
Sourcepub fn new(b: P) -> Result<Self, Error>
pub fn new(b: P) -> Result<Self, Error>
Constructor
Parameters:
b
: right hand side of A * x = b
Sourcepub fn p(&self) -> P
pub fn p(&self) -> P
Return the current search direction (This is needed by NewtonCG for instance)
Trait Implementations§
Source§impl<P: Clone, S: Clone> Clone for ConjugateGradient<P, S>
impl<P: Clone, S: Clone> Clone for ConjugateGradient<P, S>
Source§fn clone(&self) -> ConjugateGradient<P, S>
fn clone(&self) -> ConjugateGradient<P, S>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<'de, P, S> Deserialize<'de> for ConjugateGradient<P, S>where
P: Deserialize<'de>,
S: Default,
impl<'de, P, S> Deserialize<'de> for ConjugateGradient<P, S>where
P: Deserialize<'de>,
S: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<P, S> Serialize for ConjugateGradient<P, S>where
P: Serialize,
impl<P, S> Serialize for ConjugateGradient<P, S>where
P: Serialize,
Source§impl<P, O, S, F> Solver<O> for ConjugateGradient<P, S>where
O: ArgminOp<Param = P, Output = P, Float = F>,
P: Clone + Serialize + DeserializeOwned + ArgminDot<O::Param, S> + ArgminSub<O::Param, O::Param> + ArgminScaledAdd<O::Param, S, O::Param> + ArgminAdd<O::Param, O::Param> + ArgminConj + ArgminMul<O::Float, O::Param>,
S: Debug + ArgminDiv<S, S> + ArgminNorm<O::Float> + ArgminConj,
F: ArgminFloat,
impl<P, O, S, F> Solver<O> for ConjugateGradient<P, S>where
O: ArgminOp<Param = P, Output = P, Float = F>,
P: Clone + Serialize + DeserializeOwned + ArgminDot<O::Param, S> + ArgminSub<O::Param, O::Param> + ArgminScaledAdd<O::Param, S, O::Param> + ArgminAdd<O::Param, O::Param> + ArgminConj + ArgminMul<O::Float, O::Param>,
S: Debug + ArgminDiv<S, S> + ArgminNorm<O::Float> + ArgminConj,
F: ArgminFloat,
Source§fn next_iter(
&mut self,
op: &mut OpWrapper<O>,
state: &IterState<O>,
) -> Result<ArgminIterData<O>, Error>
fn next_iter( &mut self, op: &mut OpWrapper<O>, state: &IterState<O>, ) -> Result<ArgminIterData<O>, Error>
Perform one iteration of CG algorithm
Source§fn init(
&mut self,
op: &mut OpWrapper<O>,
state: &IterState<O>,
) -> Result<Option<ArgminIterData<O>>, Error>
fn init( &mut self, op: &mut OpWrapper<O>, state: &IterState<O>, ) -> Result<Option<ArgminIterData<O>>, Error>
Initializes the algorithm Read more
Source§fn terminate_internal(&mut self, state: &IterState<O>) -> TerminationReason
fn terminate_internal(&mut self, state: &IterState<O>) -> TerminationReason
Checks whether basic termination reasons apply. Read more
Source§fn terminate(&mut self, _state: &IterState<O>) -> TerminationReason
fn terminate(&mut self, _state: &IterState<O>) -> TerminationReason
Checks whether the algorithm must be terminated
Auto Trait Implementations§
impl<P, S> Freeze for ConjugateGradient<P, S>
impl<P, S> RefUnwindSafe for ConjugateGradient<P, S>where
P: RefUnwindSafe,
S: RefUnwindSafe,
impl<P, S> Send for ConjugateGradient<P, S>
impl<P, S> Sync for ConjugateGradient<P, S>
impl<P, S> Unpin for ConjugateGradient<P, S>
impl<P, S> UnwindSafe for ConjugateGradient<P, S>where
P: UnwindSafe,
S: UnwindSafe,
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