DiSMEC++
null.h
Go to the documentation of this file.
1 // Copyright (c) 2021, Aalto University, developed by Erik Schultheis
2 // All rights reserved.
3 //
4 // SPDX-License-Identifier: MIT
5 
6 #ifndef DISMEC_NULL_H
7 #define DISMEC_NULL_H
8 
9 #include "solver/minimizer.h"
10 #include "utils/hash_vector.h"
11 
12 namespace dismec::solvers {
20  class NullOptimizer : public Minimizer {
21  public:
28  NullOptimizer(bool calc);
29  private:
30  MinimizationResult run(objective::Objective& objective, Eigen::Ref<DenseRealVector> init) override;
31 
34 
35  bool m_CalcLoss;
36  };
37 }
38 
39 #endif //DISMEC_NULL_H
An Eigen vector with versioning information, to implement simple caching of results.
Definition: hash_vector.h:43
Class that models an optimization objective.
Definition: objective.h:41
Optimizer that does not change the initial vector.
Definition: null.h:20
MinimizationResult run(objective::Objective &objective, Eigen::Ref< DenseRealVector > init) override
Definition: null.cpp:26
NullOptimizer(bool calc)
Constructor, specifies whether to run any calculations at all.
Definition: null.cpp:50
DenseRealVector m_Gradient
Definition: null.h:32
types::DenseVector< real_t > DenseRealVector
Any dense, real values vector.
Definition: matrix_types.h:40