Skip to content

Commit

Permalink
make formatting consistent
Browse files Browse the repository at this point in the history
  • Loading branch information
upsj committed Jan 9, 2020
1 parent 05c1ae3 commit 8664acf
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 8 deletions.
16 changes: 12 additions & 4 deletions core/matrix/coo_builder.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,16 +52,24 @@ namespace matrix {
template <typename ValueType = default_precision, typename IndexType = int32>
class CooBuilder {
public:
/** Returns the row index array of the COO matrix. */
/**
* Returns the row index array of the COO matrix.
*/
Array<IndexType> &get_row_idx_array() { return matrix_->row_idxs_; }

/** Returns the column index array of the COO matrix. */
/**
* Returns the column index array of the COO matrix.
*/
Array<IndexType> &get_col_idx_array() { return matrix_->col_idxs_; }

/** Returns the value array of the COO matrix. */
/**
* Returns the value array of the COO matrix.
*/
Array<ValueType> &get_value_array() { return matrix_->values_; }

/** Initializes a CooBuilder from an existing COO matrix. */
/**
* Initializes a CooBuilder from an existing COO matrix.
*/
explicit CooBuilder(Coo<ValueType, IndexType> *matrix) : matrix_{matrix} {}

// make this type non-movable
Expand Down
16 changes: 12 additions & 4 deletions core/matrix/csr_builder.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,16 +52,24 @@ namespace matrix {
template <typename ValueType = default_precision, typename IndexType = int32>
class CsrBuilder {
public:
/** Returns the column index array of the CSR matrix. */
/**
* Returns the column index array of the CSR matrix.
*/
Array<IndexType> &get_col_idx_array() { return matrix_->col_idxs_; }

/** Returns the value array of the CSR matrix. */
/**
* Returns the value array of the CSR matrix.
*/
Array<ValueType> &get_value_array() { return matrix_->values_; }

/** Initializes a CsrBuilder from an existing CSR matrix. */
/**
* Initializes a CsrBuilder from an existing CSR matrix.
*/
explicit CsrBuilder(Csr<ValueType, IndexType> *matrix) : matrix_{matrix} {}

/** Updates the internal matrix data structures at destruction. */
/**
* Updates the internal matrix data structures at destruction.
*/
~CsrBuilder() { matrix_->make_srow(); }

// make this type non-movable
Expand Down

0 comments on commit 8664acf

Please sign in to comment.