MatrixSize.hpp 635 Bytes
Newer Older
Praetorius, Simon's avatar
Praetorius, Simon committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#pragma once

#include <functional>
#include <memory>

#include <amdis/common/Index.hpp>

namespace AMDiS
{
  class MatrixSize
  {
  public:
    /// Number of rows in the matrix
    std::size_t rows() const
    {
      return rows_;
    }

    /// Number of columns in the matrix
    std::size_t cols() const
    {
      return cols_;
    }

25
26
27
28
29
30
    template <class RowBasis, class ColBasis>
    void init(RowBasis const& rowBasis, ColBasis const& colBasis)
    {
      rows_ = rowBasis.dimension();
      cols_ = colBasis.dimension();
    }
Praetorius, Simon's avatar
Praetorius, Simon committed
31
32

  private:
33
34
    std::size_t rows_ = 0;
    std::size_t cols_ = 0;
Praetorius, Simon's avatar
Praetorius, Simon committed
35
36
37
  };

} // end namespace AMDiS