Skip to content

Commit

Permalink
Removed ANN from test.
Browse files Browse the repository at this point in the history
Update part of denseMatrix and eigenSolver to use size_t.
  • Loading branch information
techmatt committed Aug 17, 2016
1 parent a8b3554 commit 40560f0
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 57 deletions.
7 changes: 7 additions & 0 deletions .gitignore
Expand Up @@ -6,3 +6,10 @@
/test/testWindows/x64/Debug/testCore.tlog/*
/test/testWindows/x64/Debug/*.idb
/test/testWindows/x64/Debug/*.pdb
/test/testWindows/ipch/testcore-d7582096/testcore-ada689b3.ipch
/test/testWindows/test.v12.suo
/test/testWindows/x64/Debug/mLibSource.obj
/test/testWindows/x64/Debug/main.obj
/test/testWindows/x64/Debug/testCore.exe
/test/testWindows/x64/Debug/testCore.ilk
/test/testWindows/x64/Debug/testCore.pch
6 changes: 3 additions & 3 deletions include/core-math/denseMatrix.cpp
Expand Up @@ -102,9 +102,9 @@ DenseMatrix<FloatType> DenseMatrix<FloatType>::multiply(const DenseMatrix<FloatT
{
MLIB_ASSERT_STR(A.cols() == B.rows(), "invalid dimensions");

const UINT rows = A.rows();
const UINT cols = B.cols();
const UINT innerCount = A.cols();
const size_t rows = A.rows();
const size_t cols = B.cols();
const size_t innerCount = A.cols();

DenseMatrix<FloatType> result(rows, cols);

Expand Down
10 changes: 5 additions & 5 deletions include/core-math/denseMatrix.h
Expand Up @@ -132,7 +132,7 @@ template <class T> class DenseMatrix
m_data[element] = m[element];
}

void resize(UINT rows, UINT cols, T clearValue = (T)0.0)
void resize(size_t rows, size_t cols, T clearValue = (T)0.0)
{
m_rows = rows;
m_cols = cols;
Expand Down Expand Up @@ -162,22 +162,22 @@ template <class T> class DenseMatrix
//
// Accessors
//
T& operator()(UINT row, UINT col)
T& operator()(size_t row, size_t col)
{
return m_dataPtr[row * m_cols + col];
}

T operator()(UINT row, UINT col) const
T operator()(size_t row, size_t col) const
{
return m_dataPtr[row * m_cols + col];
}

UINT rows() const
size_t rows() const
{
return m_rows;
}

UINT cols() const
size_t cols() const
{
return m_cols;
}
Expand Down
4 changes: 2 additions & 2 deletions include/core-math/eigenSolver.h
Expand Up @@ -13,7 +13,7 @@ template<class FloatType>
struct EigenSystem
{
EigenSystem() {}
EigenSystem(int n)
EigenSystem(size_t n)
{
eigenvectors = DenseMatrix<FloatType>(n, n);
eigenvalues.resize(n);
Expand Down Expand Up @@ -158,7 +158,7 @@ template<class FloatType> class EigenSolverNR : public EigenSolver<FloatType>

MLIB_ASSERT(M.square());

const unsigned int n = M.rows();
const unsigned int n = (unsigned int)M.rows();
const FloatType* matrix = M.getData();

// Use jacobi's method:
Expand Down
1 change: 0 additions & 1 deletion test/testWindows/mLibInclude.h
Expand Up @@ -6,7 +6,6 @@

#include "mLibCore.h"
#include "mLibDepthCamera.h"
#include "mLibANN.h"
#include "mLibEigen.h"
#include "mLibLodePNG.h"
#include "mLibZLib.h"
Expand Down
4 changes: 0 additions & 4 deletions test/testWindows/main.cpp
Expand Up @@ -16,8 +16,6 @@ class App
TestCGAL m_cgal;
TestGrid m_grid;
TestUtility m_utility;
//TestMath m_math;
TestANN m_ANN;
TestLodePNG m_lodePNG;
TestBinaryStream m_binaryStream;
TestOpenMesh m_openMesh;
Expand All @@ -28,8 +26,6 @@ void App::go()
m_box.run();
m_cgal.run();
m_utility.run();
//m_math.run();
m_ANN.run();
m_lodePNG.run();
m_binaryStream.run();
m_grid.run();
Expand Down
1 change: 0 additions & 1 deletion test/testWindows/main.h
Expand Up @@ -6,7 +6,6 @@
#include "testBox.h"
#include "testUtility.h"
#include "testMath.h"
#include "testANN.h"
#include "testLodePNG.h"
#include "testBinaryStream.h"
#include "testGrid.h"
Expand Down
41 changes: 0 additions & 41 deletions test/testWindows/testANN.h

This file was deleted.

0 comments on commit 40560f0

Please sign in to comment.