diff options
Diffstat (limited to 'extern/ceres/internal/ceres/block_structure.h')
-rw-r--r-- | extern/ceres/internal/ceres/block_structure.h | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/extern/ceres/internal/ceres/block_structure.h b/extern/ceres/internal/ceres/block_structure.h index d49d7d3f3a4..fe7574c6817 100644 --- a/extern/ceres/internal/ceres/block_structure.h +++ b/extern/ceres/internal/ceres/block_structure.h @@ -41,54 +41,54 @@ #include <cstdint> #include <vector> -#include "ceres/internal/port.h" +#include "ceres/internal/export.h" namespace ceres { namespace internal { -typedef int32_t BlockSize; +using BlockSize = int32_t; -struct Block { - Block() : size(-1), position(-1) {} +struct CERES_NO_EXPORT Block { + Block() = default; Block(int size_, int position_) : size(size_), position(position_) {} - BlockSize size; - int position; // Position along the row/column. + BlockSize size{-1}; + int position{-1}; // Position along the row/column. }; -struct Cell { - Cell() : block_id(-1), position(-1) {} +struct CERES_NO_EXPORT Cell { + Cell() = default; Cell(int block_id_, int position_) : block_id(block_id_), position(position_) {} // Column or row block id as the case maybe. - int block_id; + int block_id{-1}; // Where in the values array of the jacobian is this cell located. - int position; + int position{-1}; }; // Order cell by their block_id; -bool CellLessThan(const Cell& lhs, const Cell& rhs); +CERES_NO_EXPORT bool CellLessThan(const Cell& lhs, const Cell& rhs); -struct CompressedList { - CompressedList() {} +struct CERES_NO_EXPORT CompressedList { + CompressedList() = default; // Construct a CompressedList with the cells containing num_cells // entries. - CompressedList(int num_cells) : cells(num_cells) {} + explicit CompressedList(int num_cells) : cells(num_cells) {} Block block; std::vector<Cell> cells; }; -typedef CompressedList CompressedRow; -typedef CompressedList CompressedColumn; +using CompressedRow = CompressedList; +using CompressedColumn = CompressedList; -struct CompressedRowBlockStructure { +struct CERES_NO_EXPORT CompressedRowBlockStructure { std::vector<Block> cols; std::vector<CompressedRow> rows; }; -struct CompressedColumnBlockStructure { +struct CERES_NO_EXPORT CompressedColumnBlockStructure { std::vector<Block> rows; std::vector<CompressedColumn> cols; }; |