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