Skip to content

Commit

Permalink
blah
Browse files Browse the repository at this point in the history
  • Loading branch information
stefan-k committed Feb 27, 2024
1 parent 3193ad7 commit f18ba2c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions crates/argmin/src/core/test_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,16 @@ use crate::core::{
CostFunction, Error, Gradient, Hessian, IterState, Jacobian, Operator, Problem, Solver, KV,
};
use crate::solver::simulatedannealing::Anneal;
#[cfg(feature = "serde1")]
use serde::{Deserialize, Serialize};
use std::fmt::Debug;

/// Pseudo problem useful for testing
///
/// Implements [`CostFunction`], [`Operator`], [`Gradient`], [`Jacobian`], [`Hessian`], and
/// [`Anneal`].
#[derive(Clone, Copy, Default, Debug, Eq, PartialEq, Hash)]
#[cfg_attr(feature = "serde1", derive(Serialize, Deserialize))]
pub struct TestProblem {}

impl TestProblem {
Expand Down Expand Up @@ -215,6 +218,7 @@ impl Anneal for TestProblem {
///
/// Implements [`CostFunction`] and [`Gradient`].
#[derive(Clone, Copy, Default, Debug, Eq, PartialEq, Hash)]
#[cfg_attr(feature = "serde1", derive(Serialize, Deserialize))]
pub struct TestSparseProblem {}

impl TestSparseProblem {
Expand Down Expand Up @@ -303,6 +307,7 @@ impl Gradient for TestSparseProblem {
///
/// Implements the [`Solver`] trait.
#[derive(Clone, Copy, Default, Eq, PartialEq, Debug)]
#[cfg_attr(feature = "serde1", derive(Serialize, Deserialize))]
pub struct TestSolver {}

impl TestSolver {
Expand Down

0 comments on commit f18ba2c

Please sign in to comment.