Skip to main content

ReconstructionAlgorithm

Trait ReconstructionAlgorithm 

Source
pub trait ReconstructionAlgorithm {
    // Required methods
    fn step<M: MeasurementRead>(
        &mut self,
        problem: &ReconstructionProblem<M>,
        state: &mut ReconstructionState,
        batch: &Batch,
        iteration: usize,
    ) -> Result<StepDiagnostics>;
    fn iterations(&self) -> usize;

    // Provided methods
    fn validate(&self) -> Result<()> { ... }
    fn validate_problem<M: MeasurementRead>(
        &self,
        _problem: &ReconstructionProblem<M>,
    ) -> Result<()> { ... }
    fn initialize<M: MeasurementRead>(
        &self,
        problem: &ReconstructionProblem<M>,
    ) -> Result<ReconstructionState> { ... }
    fn initialize_with_backend<M: MeasurementRead>(
        &self,
        problem: &ReconstructionProblem<M>,
        backend: Arc<dyn Backend>,
    ) -> Result<ReconstructionState> { ... }
    fn batch_size(&self) -> usize { ... }
    fn run<M: MeasurementRead>(
        self,
        problem: &ReconstructionProblem<M>,
    ) -> Result<ReconstructionResult>
       where Self: Sized { ... }
    fn run_with_callbacks<M: MeasurementRead>(
        self,
        problem: &ReconstructionProblem<M>,
        callbacks: Vec<Box<dyn Callback>>,
    ) -> Result<ReconstructionResult>
       where Self: Sized { ... }
    fn run_from_checkpoint<M: MeasurementRead>(
        self,
        problem: &ReconstructionProblem<M>,
        checkpoint: ReconstructionCheckpoint,
    ) -> Result<ReconstructionResult>
       where Self: Sized { ... }
}

Required Methods§

Source

fn step<M: MeasurementRead>( &mut self, problem: &ReconstructionProblem<M>, state: &mut ReconstructionState, batch: &Batch, iteration: usize, ) -> Result<StepDiagnostics>

Source

fn iterations(&self) -> usize

Provided Methods§

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§