Mentions légales du service

Skip to content
Snippets Groups Projects
Commit f52de1a1 authored by MONSEIGNE Thibaut's avatar MONSEIGNE Thibaut
Browse files

:fire: remove unused functions

parent 9f6eb3e5
No related branches found
No related tags found
No related merge requests found
...@@ -20,10 +20,8 @@ ...@@ -20,10 +20,8 @@
using namespace std; using namespace std;
using namespace OpenViBE; using namespace OpenViBE;
using namespace /*OpenViBE::*/Kernel; using namespace /*OpenViBE::*/Kernel;
using namespace /*OpenViBE::*/Kernel;
using namespace /*OpenViBE::*/Plugins; using namespace /*OpenViBE::*/Plugins;
const uint64_t SCHEDULER_DEFAULT_FREQUENCY = 128; const uint64_t SCHEDULER_DEFAULT_FREQUENCY = 128;
const CTime SCHEDULER_MAXIMUM_LOOPS_DURATION = (100LL << 22); /* 100/1024 seconds, approx 100ms */ const CTime SCHEDULER_MAXIMUM_LOOPS_DURATION = (100LL << 22); /* 100/1024 seconds, approx 100ms */
...@@ -239,9 +237,7 @@ bool CPlayer::setFastForwardMaximumFactor(const double fastForwardFactor) ...@@ -239,9 +237,7 @@ bool CPlayer::setFastForwardMaximumFactor(const double fastForwardFactor)
} }
double CPlayer::getFastForwardMaximumFactor() const { return m_fastForwardMaximumFactor; } double CPlayer::getFastForwardMaximumFactor() const { return m_fastForwardMaximumFactor; }
double CPlayer::getCPUUsage() const { return m_scheduler.getCPUUsage(); } double CPlayer::getCPUUsage() const { return m_scheduler.getCPUUsage(); }
bool CPlayer::isHoldingResources() const { return m_scheduler.isHoldingResources(); } bool CPlayer::isHoldingResources() const { return m_scheduler.isHoldingResources(); }
bool CPlayer::loop(const CTime elapsedTime, const CTime maximumTimeToReach) bool CPlayer::loop(const CTime elapsedTime, const CTime maximumTimeToReach)
......
...@@ -8,9 +8,6 @@ namespace Matrix { ...@@ -8,9 +8,6 @@ namespace Matrix {
OVTK_API bool copy(CMatrix& dst, const CMatrix& src); OVTK_API bool copy(CMatrix& dst, const CMatrix& src);
OVTK_API bool copyDescription(CMatrix& dst, const CMatrix& src); OVTK_API bool copyDescription(CMatrix& dst, const CMatrix& src);
OVTK_API bool copyContent(CMatrix& dst, const CMatrix& src); OVTK_API bool copyContent(CMatrix& dst, const CMatrix& src);
OVTK_API bool isDescriptionSimilar(const CMatrix& src1, const CMatrix& src2, bool checkLabels = true);
OVTK_API bool isContentSimilar(const CMatrix& src1, const CMatrix& src2);
OVTK_API bool isContentValid(const CMatrix& src, const bool checkNotANumber = true, const bool checkInfinity = true);
OVTK_API bool toString(const CMatrix& matrix, CString& str, const size_t precision = 6); OVTK_API bool toString(const CMatrix& matrix, CString& str, const size_t precision = 6);
OVTK_API bool fromString(CMatrix& matrix, const CString& str); OVTK_API bool fromString(CMatrix& matrix, const CString& str);
...@@ -18,11 +15,5 @@ OVTK_API bool fromString(CMatrix& matrix, const CString& str); ...@@ -18,11 +15,5 @@ OVTK_API bool fromString(CMatrix& matrix, const CString& str);
OVTK_API bool saveToTextFile(const CMatrix& matrix, const CString& filename, const size_t precision = 6); OVTK_API bool saveToTextFile(const CMatrix& matrix, const CString& filename, const size_t precision = 6);
OVTK_API bool loadFromTextFile(CMatrix& matrix, const CString& filename); OVTK_API bool loadFromTextFile(CMatrix& matrix, const CString& filename);
} // namespace Matrix } // namespace Matrix
namespace MatrixManipulation {
inline bool copy(CMatrix& dst, const CMatrix& src) { return Matrix::copy(dst, src); }
inline bool copyDescription(CMatrix& dst, const CMatrix& src) { return Matrix::copyDescription(dst, src); }
inline bool copyContent(CMatrix& dst, const CMatrix& src) { return Matrix::copyContent(dst, src); }
} // namespace MatrixManipulation
} // namespace Toolkit } // namespace Toolkit
} // namespace OpenViBE } // namespace OpenViBE
...@@ -54,50 +54,6 @@ bool Matrix::copyContent(CMatrix& dst, const CMatrix& src) ...@@ -54,50 +54,6 @@ bool Matrix::copyContent(CMatrix& dst, const CMatrix& src)
return true; return true;
} }
bool Matrix::isDescriptionSimilar(const CMatrix& src1, const CMatrix& src2, const bool checkLabels)
{
if (&src1 == &src2) { return true; }
if (src1.getDimensionCount() != src2.getDimensionCount()) { return false; }
for (size_t i = 0; i < src1.getDimensionCount(); ++i) { if (src1.getDimensionSize(i) != src2.getDimensionSize(i)) { return false; } }
if (checkLabels)
{
for (size_t i = 0; i < src1.getDimensionCount(); ++i)
{
for (size_t j = 0; j < src1.getDimensionSize(i); ++j)
{
if (src1.getDimensionLabel(i, j) == src2.getDimensionLabel(i, j)) { return false; }
}
}
}
return true;
}
bool Matrix::isContentSimilar(const CMatrix& src1, const CMatrix& src2)
{
if (&src1 == &src2) { return true; }
if (src1.getSize() != src2.getSize()) { return false; }
return memcmp(src1.getBuffer(), src2.getBuffer(), src1.getSize() * sizeof(double)) == 0;
}
bool Matrix::isContentValid(const CMatrix& src, const bool checkNotANumber, const bool checkInfinity)
{
const double* buffer = src.getBuffer();
const double* bufferEnd = src.getBuffer() + src.getSize();
while (buffer != bufferEnd)
{
if (checkNotANumber && std::isnan(*buffer)) { return false; }
if (checkInfinity && std::isinf(*buffer)) { return false; }
buffer++;
}
return true;
}
enum class EParsingStatus { Nothing, ParsingHeader, ParsingHeaderDimension, ParsingHeaderLabel, ParsingBuffer, ParsingBufferValue }; enum class EParsingStatus { Nothing, ParsingHeader, ParsingHeaderDimension, ParsingHeaderLabel, ParsingBuffer, ParsingBufferValue };
// tokens in the ascii matrix format // tokens in the ascii matrix format
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment