NDEVR
API Documentation
solver.h
1#pragma once
2#include "Base/Headers/Buffer.hpp"
3#include "hyper_graph.h"
4#include "sparse_block_matrix.h"
5#include <cstddef>
6
7namespace NDEVR
8{
9 class SparseOptimizer;
10
15 class Solver
16 {
17 public:
20 : _x(0)
21 , _b(0)
22 {
23 }
24
26 {}
27 public:
28
30 g_type* x() { return _x.begin(); }
31 const g_type* x() const { return _x.begin(); }
33 g_type* b() { return _b.begin(); }
34 const g_type* b() const { return _b.begin(); }
35
37 uint04 vectorSize() const { return _x.size(); }
38
39 protected:
42
46 {
47 _x.setSize(sx);
48 _b.setSize(sx);
49 }
50
51 };
52}
The equivelent of std::vector but with a bit more control.
Definition Buffer.hpp:58
g_type * b()
return b, the right hand side of the system
Definition solver.h:33
~Solver()
Destructor.
Definition solver.h:25
g_type * x()
return x, the solution vector
Definition solver.h:30
void resizeVector(uint04 sx)
Resizes the solution and right-hand side vectors.
Definition solver.h:45
Solver()
Default constructor.
Definition solver.h:19
Buffer< g_type > _b
The right-hand side vector.
Definition solver.h:41
Buffer< g_type > _x
The solution vector.
Definition solver.h:40
uint04 vectorSize() const
return the size of the solution vector (x) and b
Definition solver.h:37
Sparse optimizer that manages active vertices and edges for graph-based optimization.
The primary namespace for the NDEVR SDK.
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...