Commit c66c205b authored by Philipp  Trunschke's avatar Philipp Trunschke
Browse files

fix bugs, simplify code, extend pybind11

parent c145d622
Pipeline #2112 failed with stages
in 4 minutes and 7 seconds
......@@ -56,6 +56,8 @@ namespace xerus { namespace uq {
std::vector<std::vector<double>> singularValues;
std::vector<double> weightedNorms; //TODO: rename: densities
bool initialized = false;
public:
double controlSetFraction = 0.1;
......@@ -106,6 +108,7 @@ namespace xerus { namespace uq {
void adapt_rank(Tensor& _U, Tensor& _S, Tensor& _Vt, const size_t _maxRank, const double _threshold) const;
double residual(const std::pair<size_t, size_t>& _slice) const;
double slow_residual(const std::pair<size_t, size_t>& _slice) const;
std::pair<Tensor, Tensor> ls_operator_and_rhs(const std::pair<size_t, size_t>& _slice) const;
Tensor omega_operator() const;
Tensor alpha_operator() const;
void solve_local();
......
This diff is collapsed.
......@@ -176,6 +176,12 @@ void expose_recoveryAlgorithms(module& m) {
.def_readwrite("alpha_factor", &uq::SALSA::alpha_factor)
.def_readwrite("basisWeights", &uq::SALSA::basisWeights)
.def_readonly("initialResidual", &uq::SALSA::initialResidual)
.def_readonly("bestIteration", &uq::SALSA::bestIteration)
.def_readonly("bestX", &uq::SALSA::bestX)
.def_readonly("bestTrainingResidual", &uq::SALSA::bestTrainingResidual)
.def_readonly("bestValidationResidual", &uq::SALSA::bestValidationResidual)
.def("run", &uq::SALSA::run)
;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment