Changeset 9b410d
- Timestamp:
- Apr 6, 2011, 1:10:31 PM (14 years ago)
- Branches:
- Action_Thermostats, Add_AtomRandomPerturbation, Add_FitFragmentPartialChargesAction, Add_RotateAroundBondAction, Add_SelectAtomByNameAction, Added_ParseSaveFragmentResults, AddingActions_SaveParseParticleParameters, Adding_Graph_to_ChangeBondActions, Adding_MD_integration_tests, Adding_ParticleName_to_Atom, Adding_StructOpt_integration_tests, AtomFragments, Automaking_mpqc_open, AutomationFragmentation_failures, Candidate_v1.5.4, Candidate_v1.6.0, Candidate_v1.6.1, ChangeBugEmailaddress, ChangingTestPorts, ChemicalSpaceEvaluator, CombiningParticlePotentialParsing, Combining_Subpackages, Debian_Package_split, Debian_package_split_molecuildergui_only, Disabling_MemDebug, Docu_Python_wait, EmpiricalPotential_contain_HomologyGraph, EmpiricalPotential_contain_HomologyGraph_documentation, Enable_parallel_make_install, Enhance_userguide, Enhanced_StructuralOptimization, Enhanced_StructuralOptimization_continued, Example_ManyWaysToTranslateAtom, Exclude_Hydrogens_annealWithBondGraph, FitPartialCharges_GlobalError, Fix_BoundInBox_CenterInBox_MoleculeActions, Fix_ChargeSampling_PBC, Fix_ChronosMutex, Fix_FitPartialCharges, Fix_FitPotential_needs_atomicnumbers, Fix_ForceAnnealing, Fix_IndependentFragmentGrids, Fix_ParseParticles, Fix_ParseParticles_split_forward_backward_Actions, Fix_PopActions, Fix_QtFragmentList_sorted_selection, Fix_Restrictedkeyset_FragmentMolecule, Fix_StatusMsg, Fix_StepWorldTime_single_argument, Fix_Verbose_Codepatterns, Fix_fitting_potentials, Fixes, ForceAnnealing_goodresults, ForceAnnealing_oldresults, ForceAnnealing_tocheck, ForceAnnealing_with_BondGraph, ForceAnnealing_with_BondGraph_continued, ForceAnnealing_with_BondGraph_continued_betteresults, ForceAnnealing_with_BondGraph_contraction-expansion, FragmentAction_writes_AtomFragments, FragmentMolecule_checks_bonddegrees, GeometryObjects, Gui_Fixes, Gui_displays_atomic_force_velocity, ImplicitCharges, IndependentFragmentGrids, IndependentFragmentGrids_IndividualZeroInstances, IndependentFragmentGrids_IntegrationTest, IndependentFragmentGrids_Sole_NN_Calculation, JobMarket_RobustOnKillsSegFaults, JobMarket_StableWorkerPool, JobMarket_unresolvable_hostname_fix, MoreRobust_FragmentAutomation, ODR_violation_mpqc_open, PartialCharges_OrthogonalSummation, PdbParser_setsAtomName, PythonUI_with_named_parameters, QtGui_reactivate_TimeChanged_changes, Recreated_GuiChecks, Rewrite_FitPartialCharges, RotateToPrincipalAxisSystem_UndoRedo, SaturateAtoms_findBestMatching, SaturateAtoms_singleDegree, StoppableMakroAction, Subpackage_CodePatterns, Subpackage_JobMarket, Subpackage_LinearAlgebra, Subpackage_levmar, Subpackage_mpqc_open, Subpackage_vmg, Switchable_LogView, ThirdParty_MPQC_rebuilt_buildsystem, TrajectoryDependenant_MaxOrder, TremoloParser_IncreasedPrecision, TremoloParser_MultipleTimesteps, TremoloParser_setsAtomName, Ubuntu_1604_changes, stable
- Children:
- 06aedc
- Parents:
- 1be8a5
- git-author:
- Frederik Heber <heber@…> (03/14/11 13:54:08)
- git-committer:
- Frederik Heber <heber@…> (04/06/11 13:10:31)
- Location:
- src/LinearAlgebra
- Files:
-
- 1 added
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
src/LinearAlgebra/Line.cpp
r1be8a5 r9b410d 24 24 #include <cmath> 25 25 #include <iostream> 26 27 #include "LinearAlgebra/Vector.hpp" 26 #include <limits> 27 28 #include "CodePatterns/Info.hpp" 28 29 #include "CodePatterns/Log.hpp" 29 30 #include "CodePatterns/Verbose.hpp" 30 #include "LinearAlgebra/MatrixContent.hpp"31 #include "CodePatterns/Info.hpp"32 31 #include "Exceptions/LinearDependenceException.hpp" 33 32 #include "Exceptions/SkewException.hpp" 33 #include "LinearAlgebra/defs.hpp" 34 #include "LinearAlgebra/MatrixContent.hpp" 34 35 #include "LinearAlgebra/Plane.hpp" 36 #include "LinearAlgebra/Vector.hpp" 35 37 36 38 using namespace std; … … 132 134 // cout << endl; 133 135 //} 134 if (fabs(M->Determinant()) > MYEPSILON) {136 if (fabs(M->Determinant()) > LINALG_MYEPSILON) { 135 137 Log() << Verbose(1) << "Determinant of coefficient matrix is NOT zero." << endl; 136 138 throw SkewException(__FILE__,__LINE__); … … 146 148 Vector d = Line2b - Line1b; 147 149 Log() << Verbose(1) << "INFO: a = " << a << ", b = " << b << ", c = " << c << "." << endl; 148 if ((a.NormSquared() < MYEPSILON) || (b.NormSquared() <MYEPSILON)) {150 if ((a.NormSquared() <= LINALG_MYEPSILON) || (b.NormSquared() <= LINALG_MYEPSILON)) { 149 151 res.Zero(); 150 152 Log() << Verbose(1) << "At least one of the lines is ill-defined, i.e. offset equals second vector." << endl; … … 155 157 Vector parallel; 156 158 double factor = 0.; 157 if (fabs(a.ScalarProduct(b)*a.ScalarProduct(b)/a.NormSquared()/b.NormSquared() - 1.) < 159 if (fabs(a.ScalarProduct(b)*a.ScalarProduct(b)/a.NormSquared()/b.NormSquared() - 1.) <= LINALG_MYEPSILON) { 158 160 parallel = Line1a - Line2a; 159 161 factor = parallel.ScalarProduct(a)/a.Norm(); 160 if ((factor > = -MYEPSILON) && (factor - 1. <MYEPSILON)) {162 if ((factor > -LINALG_MYEPSILON) && (factor - 1. <= LINALG_MYEPSILON)) { 161 163 res = Line2a; 162 164 Log() << Verbose(1) << "Lines conincide." << endl; … … 165 167 parallel = Line1a - Line2b; 166 168 factor = parallel.ScalarProduct(a)/a.Norm(); 167 if ((factor > = -MYEPSILON) && (factor - 1. <MYEPSILON)) {169 if ((factor > -LINALG_MYEPSILON) && (factor - 1. <= LINALG_MYEPSILON)) { 168 170 res = Line2b; 169 171 Log() << Verbose(1) << "Lines conincide." << endl; … … 184 186 temp2.VectorProduct(b); 185 187 Log() << Verbose(1) << "INFO: temp1 = " << temp1 << ", temp2 = " << temp2 << "." << endl; 186 if (fabs(temp2.NormSquared()) > MYEPSILON)188 if (fabs(temp2.NormSquared()) > LINALG_MYEPSILON) 187 189 s = temp1.ScalarProduct(temp2)/temp2.NormSquared(); 188 190 else -
src/LinearAlgebra/Makefile.am
r1be8a5 r9b410d 28 28 LINALGHEADER = \ 29 29 BoxVector.hpp \ 30 defs.hpp \ 30 31 Eigenspace.hpp \ 31 32 leastsquaremin.hpp \ -
src/LinearAlgebra/MatrixContent.cpp
r1be8a5 r9b410d 14 14 #include "CodePatterns/MemDebug.hpp" 15 15 16 #include " LinearAlgebra/RealSpaceMatrix.hpp"16 #include "CodePatterns/Assert.hpp" 17 17 #include "Exceptions/NotInvertibleException.hpp" 18 #include "CodePatterns/Assert.hpp"19 18 #include "Helpers/defs.hpp" 20 19 #include "Helpers/fast_functions.hpp" 20 #include "LinearAlgebra/defs.hpp" 21 #include "LinearAlgebra/MatrixContent.hpp" 22 #include "LinearAlgebra/RealSpaceMatrix.hpp" 21 23 #include "LinearAlgebra/Vector.hpp" 22 24 #include "LinearAlgebra/VectorContent.hpp" 23 #include "LinearAlgebra/MatrixContent.hpp"24 25 25 26 #include <gsl/gsl_blas.h> … … 32 33 #include <cassert> 33 34 #include <iostream> 35 #include <limits> 34 36 #include <set> 35 37 … … 513 515 size_t I=0; 514 516 for (size_t i=0; i<greaterDimension; i++) { // only copy real space part 515 if (fabs(GSL_REAL(gsl_vector_complex_get(eval,i))) > MYEPSILON) { // only take eigenvectors with value > 0517 if (fabs(GSL_REAL(gsl_vector_complex_get(eval,i))) > LINALG_MYEPSILON) { // only take eigenvectors with value > 0 516 518 std::cout << i << "th eigenvalue is (" << GSL_REAL(gsl_vector_complex_get(eval,i)) << "," << GSL_IMAG(gsl_vector_complex_get(eval,i)) << ")" << std::endl; 517 519 for (size_t j=0; j<greaterDimension; j++) { 518 if (fabs(GSL_IMAG(gsl_matrix_complex_get(evec,j,i))) > MYEPSILON)520 if (fabs(GSL_IMAG(gsl_matrix_complex_get(evec,j,i))) > LINALG_MYEPSILON) 519 521 std::cerr << "MatrixContent::transformToEigenbasis() - WARNING: eigenvectors are complex-valued!" << std::endl; 520 522 gsl_matrix_set(content, j,I, GSL_REAL(gsl_matrix_complex_get(evec,j,i))); 521 523 } 522 if (fabs(GSL_IMAG(gsl_vector_complex_get(eval,I))) > MYEPSILON)524 if (fabs(GSL_IMAG(gsl_vector_complex_get(eval,I))) > LINALG_MYEPSILON) 523 525 std::cerr << "MatrixContent::transformToEigenbasis() - WARNING: eigenvectors are complex-valued!" << std::endl; 524 526 gsl_vector_set(eval_real, I, GSL_REAL(gsl_vector_complex_get(eval, i))); … … 640 642 641 643 /** Equality operator. 642 * Note that we use numerical sensible checking, i.e. with threshold MYEPSILON.644 * Note that we use numerical sensible checking, i.e. with threshold LINALG_MYEPSILON. 643 645 * \param &rhs MatrixContent to checks against 644 646 */ … … 648 650 for(int i=rows;i--;){ 649 651 for(int j=columns;j--;){ 650 if(fabs(at(i,j)-rhs.at(i,j))> MYEPSILON){652 if(fabs(at(i,j)-rhs.at(i,j))>LINALG_MYEPSILON){ 651 653 return false; 652 654 } -
src/LinearAlgebra/Plane.cpp
r1be8a5 r9b410d 21 21 22 22 #include <cmath> 23 24 #include "Exceptions/MultipleSolutionsException.hpp" 23 #include <limits> 24 25 25 #include "CodePatterns/Assert.hpp" 26 #include "Helpers/defs.hpp"27 #include "Helpers/helpers.hpp"28 26 #include "CodePatterns/Info.hpp" 29 27 #include "CodePatterns/Log.hpp" 30 28 #include "CodePatterns/Verbose.hpp" 29 #include "Exceptions/MultipleSolutionsException.hpp" 30 #include "Helpers/defs.hpp" 31 #include "Helpers/helpers.hpp" 32 #include "LinearAlgebra/defs.hpp" 31 33 #include "LinearAlgebra/Line.hpp" 32 34 #include "LinearAlgebra/Plane.hpp" … … 41 43 Vector x1 = y1 -y2; 42 44 Vector x2 = y3 -y2; 43 if ((fabs(x1.Norm()) < MYEPSILON) || (fabs(x2.Norm()) < MYEPSILON) || (fabs(x1.Angle(x2)) <MYEPSILON)) {45 if ((fabs(x1.Norm()) <= LINALG_MYEPSILON) || (fabs(x2.Norm()) <= LINALG_MYEPSILON) || (fabs(x1.Angle(x2)) <= LINALG_MYEPSILON)) { 44 46 throw LinearDependenceException(__FILE__,__LINE__); 45 47 } … … 67 69 Vector x1 = y1; 68 70 Vector x2 = y2; 69 if ((fabs(x1.Norm()) < MYEPSILON) || (fabs(x2.Norm()) <MYEPSILON)) {71 if ((fabs(x1.Norm()) <= LINALG_MYEPSILON) || (fabs(x2.Norm()) <= LINALG_MYEPSILON)) { 70 72 throw ZeroVectorException(__FILE__,__LINE__); 71 73 } 72 74 73 if((fabs(x1.Angle(x2)) < 75 if((fabs(x1.Angle(x2)) <= LINALG_MYEPSILON)) { 74 76 throw LinearDependenceException(__FILE__,__LINE__); 75 77 } … … 178 180 179 181 double factor1 = getNormal().ScalarProduct(line.getDirection()); 180 if(fabs(factor1) <MYEPSILON){182 if(fabs(factor1) <= LINALG_MYEPSILON){ 181 183 // the plane is parallel... under all circumstances this is bad luck 182 184 // we no have either no or infinite solutions … … 224 226 Vector Plane::getClosestPoint(const Vector &point) const{ 225 227 double factor = point.ScalarProduct(*normalVector)-offset; 226 if(fabs(factor) < 228 if(fabs(factor) <= LINALG_MYEPSILON){ 227 229 // the point itself lies on the plane 228 230 return point; -
src/LinearAlgebra/RealSpaceMatrix.cpp
r1be8a5 r9b410d 24 24 #include "Helpers/defs.hpp" 25 25 #include "Helpers/fast_functions.hpp" 26 #include "LinearAlgebra/defs.hpp" 26 27 #include "LinearAlgebra/MatrixContent.hpp" 27 28 #include "LinearAlgebra/RealSpaceMatrix.hpp" … … 38 39 #include <cmath> 39 40 #include <iostream> 41 #include <limits> 40 42 41 43 using namespace std; … … 256 258 RealSpaceMatrix RealSpaceMatrix::invert() const{ 257 259 double det = determinant(); 258 if(fabs(det) <MYEPSILON){260 if(fabs(det) <= LINALG_MYEPSILON){ 259 261 throw NotInvertibleException(__FILE__,__LINE__); 260 262 } -
src/LinearAlgebra/Space.cpp
r1be8a5 r9b410d 20 20 #include "CodePatterns/MemDebug.hpp" 21 21 22 #include <limits> 23 22 24 #include "Helpers/defs.hpp" 25 #include "LinearAlgebra/defs.hpp" 23 26 #include "LinearAlgebra/Space.hpp" 24 27 #include "LinearAlgebra/Vector.hpp" … … 40 43 41 44 bool Space::isContained(const Vector &point) const{ 42 return (distance(point)) < 45 return (distance(point)) <= LINALG_MYEPSILON; 43 46 } -
src/LinearAlgebra/Vector.cpp
r1be8a5 r9b410d 19 19 #include "CodePatterns/MemDebug.hpp" 20 20 21 #include "CodePatterns/Assert.hpp" 22 #include "CodePatterns/Verbose.hpp" 21 23 #include "Exceptions/MathException.hpp" 24 #include "Helpers/defs.hpp" 25 #include "Helpers/fast_functions.hpp" 26 #include "LinearAlgebra/defs.hpp" 22 27 #include "LinearAlgebra/Vector.hpp" 23 28 #include "LinearAlgebra/VectorContent.hpp" 24 #include "CodePatterns/Assert.hpp"25 #include "Helpers/defs.hpp"26 #include "Helpers/fast_functions.hpp"27 #include "CodePatterns/Verbose.hpp"28 29 29 30 #include <cmath> -
src/LinearAlgebra/VectorContent.cpp
r1be8a5 r9b410d 24 24 #include <cmath> 25 25 #include <iostream> 26 #include <limits> 26 27 27 28 #include "CodePatterns/Assert.hpp" 28 29 #include "Helpers/defs.hpp" 30 #include "LinearAlgebra/defs.hpp" 29 31 #include "LinearAlgebra/Vector.hpp" 30 32 #include "LinearAlgebra/VectorContent.hpp" … … 249 251 ASSERT(dimension == b.dimension, "Dimenions of VectorContents to compare differ"); 250 252 for (size_t i=0;i<dimension;i++) 251 status = status && (fabs(at(i) - b.at(i)) < 253 status = status && (fabs(at(i) - b.at(i)) <= LINALG_MYEPSILON); 252 254 return status; 253 255 }; … … 368 370 for (size_t i = dimension; i--; ) 369 371 result += fabs(at(i)); 370 return (result < 372 return (result <= LINALG_MYEPSILON); 371 373 }; 372 374 … … 379 381 for (size_t i=dimension;--i;) 380 382 NormValue += at(i)*at(i); 381 return (fabs(NormValue - 1.) < 383 return (fabs(NormValue - 1.) <= LINALG_MYEPSILON); 382 384 }; 383 385 … … 444 446 double norm1 = Norm(), norm2 = y.Norm(); 445 447 double angle = -1; 446 if ((fabs(norm1) > MYEPSILON) && (fabs(norm2) >MYEPSILON))448 if ((fabs(norm1) > LINALG_MYEPSILON) && (fabs(norm2) > LINALG_MYEPSILON)) 447 449 angle = this->ScalarProduct(y)/norm1/norm2; 448 // -1- MYEPSILON occured due to numerical imprecision, catch ...449 //Log() << Verbose(2) << "INFO: acos(-1) = " << acos(-1) << ", acos(-1+ MYEPSILON) = " << acos(-1+MYEPSILON) << ", acos(-1-MYEPSILON) = " << acos(-1-MYEPSILON) << "." << endl;450 // -1-LINALG_MYEPSILON occured due to numerical imprecision, catch ... 451 //Log() << Verbose(2) << "INFO: acos(-1) = " << acos(-1) << ", acos(-1+LINALG_MYEPSILON) = " << acos(-1+LINALG_MYEPSILON) << ", acos(-1-LINALG_MYEPSILON) = " << acos(-1-LINALG_MYEPSILON) << "." << endl; 450 452 if (angle < -1) 451 453 angle = -1; -
src/LinearAlgebra/unittests/LinearSystemOfEquationsUnitTest.cpp
r1be8a5 r9b410d 20 20 using namespace std; 21 21 22 #include < iomanip>22 #include <limits> 23 23 #include <cppunit/CompilerOutputter.h> 24 24 #include <cppunit/extensions/TestFactoryRegistry.h> … … 26 26 #include <cmath> 27 27 28 #include "LinearAlgebra/defs.hpp" 28 29 #include "LinearAlgebra/Vector.hpp" 29 30 … … 117 118 s->GetSolutionAsArray(array); 118 119 for (int i=0;i<4;i++) { 119 CPPUNIT_ASSERT( fabs(x_array[i] - array[i]) < 120 CPPUNIT_ASSERT( fabs(x_array[i] - array[i]) <= LINALG_MYEPSILON ); 120 121 } 121 122 delete[](array); -
src/LinearAlgebra/unittests/MatrixUnitTest.cpp
r1be8a5 r9b410d 23 23 24 24 #include <cmath> 25 #include <limits> 25 26 26 27 #include "MatrixUnitTest.hpp" 28 #include "LinearAlgebra/defs.hpp" 29 #include "LinearAlgebra/RealSpaceMatrix.hpp" 27 30 #include "LinearAlgebra/Vector.hpp" 28 #include "LinearAlgebra/RealSpaceMatrix.hpp"29 31 #include "Exceptions/NotInvertibleException.hpp" 30 32 … … 190 192 191 193 res =(*zero) *(*zero); 192 std::cout << *zero << " times " << *zero << " is " << res << std::endl;194 //std::cout << *zero << " times " << *zero << " is " << res << std::endl; 193 195 CPPUNIT_ASSERT_EQUAL(res,*zero); 194 196 res =(*zero) *(*one); … … 269 271 // arbitrary rotation matrix has det = 1 270 272 res.setRotation(M_PI/3.,1.,M_PI/7.); 271 CPPUNIT_ASSERT(fabs(fabs(res.determinant()) -1.) < 273 CPPUNIT_ASSERT(fabs(fabs(res.determinant()) -1.) <= LINALG_MYEPSILON); 272 274 273 275 // inverse is rotation matrix with negative angles -
src/LinearAlgebra/unittests/PlaneUnitTest.cpp
r1be8a5 r9b410d 23 23 24 24 #include <cmath> 25 25 #include <limits> 26 27 #include "LinearAlgebra/defs.hpp" 28 #include "LinearAlgebra/Line.hpp" 26 29 #include "LinearAlgebra/Vector.hpp" 27 #include "LinearAlgebra/Line.hpp"28 30 29 31 #include "PlaneUnitTest.hpp" … … 158 160 { 159 161 Vector t = (1./3.)*(unitVec[0]+unitVec[1]+unitVec[2]); 160 CPPUNIT_ASSERT(fabs(p1->distance(zeroVec)-t.Norm()) < 162 CPPUNIT_ASSERT(fabs(p1->distance(zeroVec)-t.Norm()) <= LINALG_MYEPSILON); 161 163 CPPUNIT_ASSERT_EQUAL(t,p1->getClosestPoint(zeroVec)); 162 164 } 163 165 164 CPPUNIT_ASSERT(fabs(p2->distance(unitVec[2])-1) < 166 CPPUNIT_ASSERT(fabs(p2->distance(unitVec[2])-1) <= LINALG_MYEPSILON); 165 167 CPPUNIT_ASSERT_EQUAL(zeroVec,p2->getClosestPoint(unitVec[2])); 166 CPPUNIT_ASSERT(fabs(p3->distance(unitVec[1])-1) < 168 CPPUNIT_ASSERT(fabs(p3->distance(unitVec[1])-1) <= LINALG_MYEPSILON); 167 169 CPPUNIT_ASSERT_EQUAL(zeroVec,p3->getClosestPoint(unitVec[1])); 168 CPPUNIT_ASSERT(fabs(p4->distance(unitVec[0])-1) < 170 CPPUNIT_ASSERT(fabs(p4->distance(unitVec[0])-1) <= LINALG_MYEPSILON); 169 171 CPPUNIT_ASSERT_EQUAL(zeroVec,p4->getClosestPoint(unitVec[0])); 170 172 } -
src/LinearAlgebra/unittests/VectorUnitTest.cpp
r1be8a5 r9b410d 24 24 #include <cppunit/ui/text/TestRunner.h> 25 25 26 #include <limits> 27 28 #include "CodePatterns/Log.hpp" 29 #include "Exceptions/LinearDependenceException.hpp" 26 30 #include "Helpers/defs.hpp" 27 #include "CodePatterns/Log.hpp" 31 #include "LinearAlgebra/defs.hpp" 32 #include "LinearAlgebra/Plane.hpp" 33 #include "LinearAlgebra/RealSpaceMatrix.hpp" 28 34 #include "LinearAlgebra/Vector.hpp" 29 35 #include "LinearAlgebra/vector_ops.hpp" 30 #include "LinearAlgebra/Plane.hpp"31 #include "Exceptions/LinearDependenceException.hpp"32 #include "LinearAlgebra/RealSpaceMatrix.hpp"33 36 34 37 #include "VectorUnitTest.hpp" … … 230 233 CPPUNIT_ASSERT_EQUAL( M_PI, zero.Angle(unit) ); 231 234 CPPUNIT_ASSERT_EQUAL( 0., unit.Angle(unit) ); 232 CPPUNIT_ASSERT_EQUAL( true, fabs(M_PI/2. - otherunit.Angle(unit)) < 233 CPPUNIT_ASSERT_EQUAL( true, fabs(M_PI/2. - unit.Angle(notunit)) < 234 CPPUNIT_ASSERT_EQUAL( true, fabs(M_PI/4. - otherunit.Angle(notunit)) < 235 CPPUNIT_ASSERT_EQUAL( true, fabs(M_PI/2. - otherunit.Angle(unit)) <= LINALG_MYEPSILON ); 236 CPPUNIT_ASSERT_EQUAL( true, fabs(M_PI/2. - unit.Angle(notunit)) <= LINALG_MYEPSILON ); 237 CPPUNIT_ASSERT_EQUAL( true, fabs(M_PI/4. - otherunit.Angle(notunit)) <= LINALG_MYEPSILON ); 235 238 }; 236 239 … … 255 258 // first one-component system 256 259 CPPUNIT_ASSERT(testVector.GetOneNormalVector(unit)); 257 CPPUNIT_ASSERT(testVector.ScalarProduct(unit) < 260 CPPUNIT_ASSERT(testVector.ScalarProduct(unit) <= LINALG_MYEPSILON); 258 261 259 262 // second one-component system 260 263 CPPUNIT_ASSERT(testVector.GetOneNormalVector(otherunit)); 261 CPPUNIT_ASSERT(testVector.ScalarProduct(otherunit) < 264 CPPUNIT_ASSERT(testVector.ScalarProduct(otherunit) <= LINALG_MYEPSILON); 262 265 263 266 // first two-component system 264 267 CPPUNIT_ASSERT(testVector.GetOneNormalVector(notunit)); 265 CPPUNIT_ASSERT(testVector.ScalarProduct(notunit) < 268 CPPUNIT_ASSERT(testVector.ScalarProduct(notunit) <= LINALG_MYEPSILON); 266 269 267 270 // second two-component system 268 271 CPPUNIT_ASSERT(testVector.GetOneNormalVector(two)); 269 CPPUNIT_ASSERT(testVector.ScalarProduct(two) < 272 CPPUNIT_ASSERT(testVector.ScalarProduct(two) <= LINALG_MYEPSILON); 270 273 271 274 // three component system 272 275 CPPUNIT_ASSERT(testVector.GetOneNormalVector(three)); 273 CPPUNIT_ASSERT(testVector.ScalarProduct(three) < 274 } 276 CPPUNIT_ASSERT(testVector.ScalarProduct(three) <= LINALG_MYEPSILON); 277 }
Note:
See TracChangeset
for help on using the changeset viewer.