Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 16 additions & 16 deletions source/src/numeric/MathMatrix.hh
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,11 @@ public:
//////////////////////////////////

/// @brief default constructor
MathMatrix< T>() :
NumberRows_( 0),
NumberCols_( 0),
size_( 0 ),
data_( nullptr )
MathMatrix() :
NumberRows_( 0),
NumberCols_( 0),
size_( 0 ),
data_( nullptr )
{
}

Expand All @@ -79,16 +79,16 @@ public:
/// @param NUMBER_ROWS number of rows in matrix
/// @param NUMBER_COLS number of cols in matrix
/// @param FILL_VALUE assign every element to that value
explicit MathMatrix< T>
explicit MathMatrix
(
const Size NUMBER_ROWS,
const Size NUMBER_COLS,
const T &FILL_VALUE = T( 0)
) :
NumberRows_( NUMBER_ROWS),
NumberCols_( NUMBER_COLS),
size_( NumberRows_ * NumberCols_ ),
data_( new T[ size_ ])
NumberRows_( NUMBER_ROWS),
NumberCols_( NUMBER_COLS),
size_( NumberRows_ * NumberCols_ ),
data_( new T[ size_ ])
{
// set all values to FILL_VALUE
std::fill( data_, data_ + size_, FILL_VALUE);
Expand All @@ -98,16 +98,16 @@ public:
/// @param NUMBER_ROWS number of rows in matrix
/// @param NUMBER_COLS number of cols in matrix
/// @param DATA pointer to field of data
MathMatrix< T>
MathMatrix
(
const Size NUMBER_ROWS,
const Size NUMBER_COLS,
const T *DATA
) :
NumberRows_( NUMBER_ROWS),
NumberCols_( NUMBER_COLS),
size_( NumberRows_ * NumberCols_ ),
data_( new T[ NumberRows_ * NumberCols_])
NumberRows_( NUMBER_ROWS),
NumberCols_( NUMBER_COLS),
size_( NumberRows_ * NumberCols_ ),
data_( new T[ NumberRows_ * NumberCols_])
{
// copy data
std::copy( DATA, DATA + size_, data_);
Expand All @@ -133,7 +133,7 @@ public:
}

/// @brief destructor
~MathMatrix< T>()
~MathMatrix()
{
delete[] data_;
}
Expand Down
20 changes: 10 additions & 10 deletions source/src/numeric/MathVector.hh
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ public:
//////////////////////////////////

/// @brief default constructor
MathVector< T>() :
size_( 0),
data_( nullptr )
MathVector() :
size_( 0),
data_( nullptr )
{
}

Expand All @@ -81,19 +81,19 @@ public:
/// @brief construct from size and possible filler
/// @param SIZE number fo elements in Vector
/// @param FILL_VALUE assign every element to that value
explicit MathVector< T>( const Size SIZE, const T &FILL_VALUE= T( 0)) :
size_( SIZE),
data_( new T[ SIZE])
explicit MathVector( const Size SIZE, const T &FILL_VALUE= T( 0)) :
size_( SIZE),
data_( new T[ SIZE])
{

// set all values to FILL_VALUE
std::fill( begin(), end(), FILL_VALUE);
}

/// @brief construct from length and pointer to data
MathVector< T>( const Size SIZE, const T *DATA) :
size_( SIZE),
data_( new T[ SIZE])
MathVector( const Size SIZE, const T *DATA) :
size_( SIZE),
data_( new T[ SIZE])
{
std::copy( DATA, DATA + SIZE, data_);
}
Expand All @@ -116,7 +116,7 @@ public:
}

/// @ brief destructor
~MathVector< T>()
~MathVector()
{
delete[] data_;
}
Expand Down
8 changes: 4 additions & 4 deletions source/src/numeric/histograms/OneDHistogram.hh
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,16 @@
#include <map>
#include <platform/types.hh>

namespace numeric{
namespace histograms{
namespace numeric {
namespace histograms {


template<typename key1>
class OneDHistogram {

public:

OneDHistogram<key1>()= default;
OneDHistogram()= default;

void insert_data(key1 key_1, platform::Size counts){
histogram_.insert(std::make_pair(key_1, counts));
Expand All @@ -52,7 +52,7 @@ public:


private:
std::map< key1, platform::Size > histogram_;
std::map< key1, platform::Size > histogram_;


};
Expand Down