fix bug in sign comparision
This commit is contained in:
131
ChangeLog
131
ChangeLog
@@ -1,139 +1,112 @@
|
|||||||
2016-09-02 08:44
|
|
||||||
|
|
||||||
* [r21] configure.ac:
|
|
||||||
fixed project url
|
|
||||||
|
|
||||||
2016-08-28 07:58
|
2016-08-28 07:58
|
||||||
|
|
||||||
* [r20] COPYING, ChangeLog, INSTALL, ax_init_standard_project.m4,
|
* COPYING, ChangeLog, INSTALL, ax_init_standard_project.m4,
|
||||||
bootstrap.sh:
|
bootstrap.sh: documentation fixed
|
||||||
documentation fixed
|
|
||||||
|
|
||||||
2016-08-26 14:10
|
2016-08-26 14:10
|
||||||
|
|
||||||
* [r19] COPYING, INSTALL, ax_init_standard_project.m4,
|
* COPYING, INSTALL, ax_init_standard_project.m4, bootstrap.sh,
|
||||||
bootstrap.sh, doc/doxyfile.in:
|
doc/doxyfile.in: updated documentation build
|
||||||
updated documentation build
|
|
||||||
|
|
||||||
2016-08-25 19:53
|
2016-08-25 19:53
|
||||||
|
|
||||||
* [r18] configure.ac, debian/control.in, src/matrix.hxx,
|
* configure.ac, debian/control.in, src/matrix.hxx, test/basic.cxx,
|
||||||
test/basic.cxx[DEL], test/makefile.am, test/matricxx.cxx[CPY]:
|
test/makefile.am, test/matricxx.cxx: documentation updated
|
||||||
documentation updated
|
|
||||||
|
|
||||||
2016-08-25 18:56
|
2016-08-25 18:56
|
||||||
|
|
||||||
* [r17] README, ax_init_standard_project.m4, bootstrap.sh,
|
* README, ax_init_standard_project.m4, bootstrap.sh, configure.ac,
|
||||||
configure.ac, doc/header.html.in, doc/style.css:
|
doc/header.html.in, doc/style.css: documentation anhanced
|
||||||
documentation anhanced
|
|
||||||
|
|
||||||
2016-08-25 18:02
|
2016-08-25 18:02
|
||||||
|
|
||||||
* [r16] COPYING, ChangeLog, INSTALL, README,
|
* COPYING, ChangeLog, INSTALL, README, ax_init_standard_project.m4,
|
||||||
ax_init_standard_project.m4, doc/doxyfile.in,
|
doc/doxyfile.in, doc/footer.html.in, doc/header.html.in,
|
||||||
doc/footer.html.in[ADD], doc/header.html.in[ADD],
|
doc/style.css, test/matricxx.cxx: documentation anhanced
|
||||||
doc/style.css[ADD], test/matricxx.cxx[ADD]:
|
|
||||||
documentation anhanced
|
|
||||||
|
|
||||||
2016-08-25 15:00
|
2016-08-25 15:00
|
||||||
|
|
||||||
* [r15] README, ax_init_standard_project.m4, bootstrap.sh,
|
* README, ax_init_standard_project.m4, bootstrap.sh,
|
||||||
doc/doxyfile.in, src/matrix.hxx:
|
doc/doxyfile.in, src/matrix.hxx: improved doxygen
|
||||||
improved doxygen
|
|
||||||
|
|
||||||
2016-08-24 09:42
|
2016-08-24 09:42
|
||||||
|
|
||||||
* [r14] src/libmatricxx.pc.in:
|
* src/libmatricxx.pc.in: PKG_REQUIREMENTS is undefined
|
||||||
PKG_REQUIREMENTS is undefined
|
|
||||||
|
|
||||||
2016-08-23 13:58
|
2016-08-23 13:58
|
||||||
|
|
||||||
* [r13] debian/control.in, src/makefile.am, src/matrix.hxx,
|
* debian/control.in, src/makefile.am, src/matrix.hxx,
|
||||||
test/basic.cxx, test/makefile.am:
|
test/basic.cxx, test/makefile.am: stream any size of matrix
|
||||||
stream any size of matrix
|
|
||||||
|
|
||||||
2016-08-23 13:09
|
2016-08-23 13:09
|
||||||
|
|
||||||
* [r12] configure.ac, src/matrix.hxx, test/basic.cxx:
|
* configure.ac, src/matrix.hxx, test/basic.cxx: works perfectly,
|
||||||
works perfectly, fully tested
|
fully tested
|
||||||
|
|
||||||
2016-08-22 15:04
|
2016-08-22 15:04
|
||||||
|
|
||||||
* [r11] COPYING, INSTALL, src/matrix.hxx, test/basic.cxx:
|
* COPYING, INSTALL, src/matrix.hxx, test/basic.cxx: inverse tested
|
||||||
inverse tested
|
|
||||||
|
|
||||||
2016-08-22 07:07
|
2016-08-22 07:07
|
||||||
|
|
||||||
* [r10] ChangeLog, src/matrix.hxx, test/basic.cxx:
|
* ChangeLog, src/matrix.hxx, test/basic.cxx: inverse does not work
|
||||||
inverse does not work yet
|
yet
|
||||||
|
|
||||||
2016-08-19 16:07
|
2016-08-19 16:07
|
||||||
|
|
||||||
* [r9] COPYING, ChangeLog, INSTALL, ax_cxx_compile_stdcxx_11.m4,
|
* COPYING, ChangeLog, INSTALL, ax_cxx_compile_stdcxx_11.m4,
|
||||||
ax_init_standard_project.m4, makefile_test.inc.am:
|
ax_init_standard_project.m4, makefile_test.inc.am: fix C++11
|
||||||
fix C++11 detection
|
detection
|
||||||
|
|
||||||
2016-08-19 14:52
|
2016-08-19 14:52
|
||||||
|
|
||||||
* [r8] COPYING, INSTALL, ax_cxx_compile_stdcxx_11.m4,
|
* COPYING, INSTALL, ax_cxx_compile_stdcxx_11.m4,
|
||||||
ax_init_standard_project.m4, bootstrap.sh,
|
ax_init_standard_project.m4, bootstrap.sh, makefile_test.inc.am,
|
||||||
makefile_test.inc.am[ADD], src/matrix.hxx, test/basic.cxx:
|
src/matrix.hxx, test/basic.cxx: more operators more tests
|
||||||
more operators more tests
|
|
||||||
|
|
||||||
2016-08-18 22:03
|
2016-08-18 22:03
|
||||||
|
|
||||||
* [r7] COPYING, ChangeLog, INSTALL, src/matrix.hxx:
|
* COPYING, ChangeLog, INSTALL, src/matrix.hxx: more operators
|
||||||
more operators
|
|
||||||
|
|
||||||
2016-08-17 07:26
|
2016-08-17 07:26
|
||||||
|
|
||||||
* [r6] configure.ac:
|
* configure.ac: only requires c++11
|
||||||
only requires c++11
|
|
||||||
|
|
||||||
2016-08-16 14:41
|
2016-08-16 14:41
|
||||||
|
|
||||||
* [r5] COPYING, INSTALL, ax_init_standard_project.m4, configure.ac,
|
* COPYING, INSTALL, ax_init_standard_project.m4, configure.ac,
|
||||||
src/matrix.hxx, test/basic.cxx:
|
src/matrix.hxx, test/basic.cxx: remove redundancy, collect common
|
||||||
remove redundancy, collect common functionality in base class
|
functionality in base class
|
||||||
|
|
||||||
2016-08-08 20:03
|
2016-08-08 20:03
|
||||||
|
|
||||||
* [r4] src/matrix.hxx, test/basic.cxx:
|
* src/matrix.hxx, test/basic.cxx: more operator, more checks passed
|
||||||
more operator, more checks passed
|
|
||||||
|
|
||||||
2016-08-03 18:43
|
2016-08-03 18:43
|
||||||
|
|
||||||
* [r3] configure.ac, test/makefile.am:
|
* configure.ac, test/makefile.am: all tests passed
|
||||||
all tests passed
|
|
||||||
|
|
||||||
2016-08-03 18:39
|
2016-08-03 18:39
|
||||||
|
|
||||||
* [r2] COPYING[ADD], ChangeLog, INSTALL[ADD],
|
* COPYING, ChangeLog, INSTALL, ax_cxx_compile_stdcxx_11.m4,
|
||||||
ax_cxx_compile_stdcxx_11.m4, ax_init_standard_project.m4,
|
ax_init_standard_project.m4, configure.ac, examples/makefile.am,
|
||||||
configure.ac, examples/makefile.am,
|
examples/matrix-sample.cxx, src/makefile.am, src/matrix.hxx,
|
||||||
examples/matrix-sample.cxx[ADD], src/makefile.am,
|
test/basic.cxx, test/makefile.am: first approach including first
|
||||||
src/matrix.hxx[ADD], test/basic.cxx[ADD], test/makefile.am:
|
tests
|
||||||
first approach including first tests
|
|
||||||
|
|
||||||
2016-07-30 08:50
|
2016-07-30 08:50
|
||||||
|
|
||||||
* [r1] .[ADD], AUTHORS[ADD], ChangeLog[ADD], NEWS[ADD],
|
* ., AUTHORS, ChangeLog, NEWS, README, autogen.sh, ax_check_qt.m4,
|
||||||
README[ADD], autogen.sh[ADD], ax_check_qt.m4[ADD],
|
ax_cxx_compile_stdcxx_11.m4, ax_init_standard_project.m4,
|
||||||
ax_cxx_compile_stdcxx_11.m4[ADD],
|
bootstrap.sh, build-in-docker.conf, build-in-docker.sh,
|
||||||
ax_init_standard_project.m4[ADD], bootstrap.sh[ADD],
|
build-resource-file.sh, configure.ac, debian,
|
||||||
build-in-docker.conf[ADD], build-in-docker.sh[ADD],
|
debian/changelog.in, debian/compat, debian/control.in,
|
||||||
build-resource-file.sh[ADD], configure.ac[ADD], debian[ADD],
|
debian/docs, debian/libmatricxx-dev.install,
|
||||||
debian/changelog.in[ADD], debian/compat[ADD],
|
debian/libmatricxx.install, debian/rules, doc, doc/doxyfile.in,
|
||||||
debian/control.in[ADD], debian/docs[ADD],
|
doc/makefile.am, examples, examples/makefile.am,
|
||||||
debian/libmatricxx-dev.install[ADD],
|
libmatricxx.desktop.in, libmatricxx.spec.in,
|
||||||
debian/libmatricxx.install[ADD], debian/rules[ADD], doc[ADD],
|
mac-create-app-bundle.sh, makefile.am, resolve-debbuilddeps.sh,
|
||||||
doc/doxyfile.in[ADD], doc/makefile.am[ADD], examples[ADD],
|
resolve-rpmbuilddeps.sh, sql-to-dot.sed, src,
|
||||||
examples/makefile.am[ADD], libmatricxx.desktop.in[ADD],
|
src/libmatricxx.pc.in, src/makefile.am, src/version.cxx,
|
||||||
libmatricxx.spec.in[ADD], mac-create-app-bundle.sh[ADD],
|
src/version.hxx, test, test/makefile.am: initial project
|
||||||
makefile.am[ADD], resolve-debbuilddeps.sh[ADD],
|
|
||||||
resolve-rpmbuilddeps.sh[ADD], sql-to-dot.sed[ADD], src[ADD],
|
|
||||||
src/libmatricxx.pc.in[ADD], src/makefile.am[ADD],
|
|
||||||
src/version.cxx[ADD], src/version.hxx[ADD], test[ADD],
|
|
||||||
test/makefile.am[ADD]:
|
|
||||||
initial project
|
|
||||||
|
|
||||||
|
@@ -34,6 +34,7 @@ namespace math {
|
|||||||
calls almostEqual instead of @c ==. */
|
calls almostEqual instead of @c ==. */
|
||||||
template<typename TYPE>
|
template<typename TYPE>
|
||||||
bool almostEqual(TYPE a, TYPE b) {
|
bool almostEqual(TYPE a, TYPE b) {
|
||||||
|
if ((a>0&&b<0)||(a<0&&b>0)) return false; // wrong sign
|
||||||
a = std::fabs(a);
|
a = std::fabs(a);
|
||||||
b = std::fabs(b);
|
b = std::fabs(b);
|
||||||
TYPE diff(std::fabs(a-b));
|
TYPE diff(std::fabs(a-b));
|
||||||
|
@@ -114,10 +114,15 @@ class TemplateMatrixTest: public CppUnit::TestFixture {
|
|||||||
5, 6, 7, 8);
|
5, 6, 7, 8);
|
||||||
Matrix<T,2,4> m5(1, 2, 0, 4,
|
Matrix<T,2,4> m5(1, 2, 0, 4,
|
||||||
5, 6, 7, 8);
|
5, 6, 7, 8);
|
||||||
|
Matrix<T,2,4> m6(-m1);
|
||||||
|
Matrix<T,2,4> m7(-1, -2, -3, -4,
|
||||||
|
-5, -6, -7, -8);
|
||||||
|
CPPUNIT_ASSERT_EQUAL(m7, m6);
|
||||||
CPPUNIT_ASSERT(m1==m2);
|
CPPUNIT_ASSERT(m1==m2);
|
||||||
CPPUNIT_ASSERT(m1!=m3);
|
CPPUNIT_ASSERT(m1!=m3);
|
||||||
CPPUNIT_ASSERT(m1!=m4);
|
CPPUNIT_ASSERT(m1!=m4);
|
||||||
CPPUNIT_ASSERT(m1!=m5);
|
CPPUNIT_ASSERT(m1!=m5);
|
||||||
|
CPPUNIT_ASSERT(m1!=m6);
|
||||||
}
|
}
|
||||||
template<typename T>
|
template<typename T>
|
||||||
void operator_plus() {
|
void operator_plus() {
|
||||||
@@ -290,7 +295,7 @@ class TemplateMatrixTest: public CppUnit::TestFixture {
|
|||||||
-1, 1, 0, 2,
|
-1, 1, 0, 2,
|
||||||
0, 0, 2, 4,
|
0, 0, 2, 4,
|
||||||
2, -2, 0, 1);
|
2, -2, 0, 1);
|
||||||
const Matrix<T,4,4> res((T)-1/3, (T)13/15, (T)-2/3, 0.6,
|
const Matrix<T,4,4> res((T)1/3, (T)13/15, (T)-2/3, 0.6,
|
||||||
(T)1/3, (T)16/15, (T)-2/3, 0.2,
|
(T)1/3, (T)16/15, (T)-2/3, 0.2,
|
||||||
0, -0.8, 0.5, -0.4,
|
0, -0.8, 0.5, -0.4,
|
||||||
0, 0.4, 0, 0.2);
|
0, 0.4, 0, 0.2);
|
||||||
@@ -521,9 +526,15 @@ class VariableMatrixTest: public CppUnit::TestFixture {
|
|||||||
Matrix<T> m4(2, 4,
|
Matrix<T> m4(2, 4,
|
||||||
9, 2, 3, 4,
|
9, 2, 3, 4,
|
||||||
5, 6, 7, 8);
|
5, 6, 7, 8);
|
||||||
|
Matrix<T> m5(-m1);
|
||||||
|
Matrix<T> m6(2, 4,
|
||||||
|
-1, -2, -3, -4,
|
||||||
|
-5, -6, -7, -8);
|
||||||
|
CPPUNIT_ASSERT_EQUAL(m6, m5);
|
||||||
CPPUNIT_ASSERT(m1==m2);
|
CPPUNIT_ASSERT(m1==m2);
|
||||||
CPPUNIT_ASSERT(m1!=m3);
|
CPPUNIT_ASSERT(m1!=m3);
|
||||||
CPPUNIT_ASSERT(m1!=m4);
|
CPPUNIT_ASSERT(m1!=m4);
|
||||||
|
CPPUNIT_ASSERT(m1!=m5);
|
||||||
}
|
}
|
||||||
template<typename T>
|
template<typename T>
|
||||||
void operator_plus() {
|
void operator_plus() {
|
||||||
@@ -712,7 +723,7 @@ class VariableMatrixTest: public CppUnit::TestFixture {
|
|||||||
0, 0, 2, 4,
|
0, 0, 2, 4,
|
||||||
2, -2, 0, 1);
|
2, -2, 0, 1);
|
||||||
const Matrix<T> res(4, 4,
|
const Matrix<T> res(4, 4,
|
||||||
(T)-1/3, (T)13/15, (T)-2/3, 0.6,
|
(T)1/3, (T)13/15, (T)-2/3, 0.6,
|
||||||
(T)1/3, (T)16/15, (T)-2/3, 0.2,
|
(T)1/3, (T)16/15, (T)-2/3, 0.2,
|
||||||
0, -0.8, 0.5, -0.4,
|
0, -0.8, 0.5, -0.4,
|
||||||
0, 0.4, 0, 0.2);
|
0, 0.4, 0, 0.2);
|
||||||
|
Reference in New Issue
Block a user