big int
This commit is contained in:
@@ -10,13 +10,15 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "BigInt.h"
|
||||
|
||||
/**
|
||||
* \class Matrix
|
||||
* \brief Représente une matrice d'éléments
|
||||
*/
|
||||
class Matrix {
|
||||
public:
|
||||
typedef long double Element;
|
||||
typedef BigInt Element;
|
||||
typedef std::vector<Element>::iterator iterator;
|
||||
|
||||
private:
|
||||
@@ -154,6 +156,21 @@ class Matrix {
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
bool IsEqualZero(T var) {
|
||||
bool IsEqualZero(const T& var) {
|
||||
return std::abs(var) < std::pow(10, -5);
|
||||
}
|
||||
|
||||
template <>
|
||||
inline bool IsEqualZero(const int& var) {
|
||||
return var == 0;
|
||||
}
|
||||
|
||||
template <>
|
||||
inline bool IsEqualZero(const long& var) {
|
||||
return var == 0;
|
||||
}
|
||||
|
||||
template <>
|
||||
inline bool IsEqualZero(const BigInt& var) {
|
||||
return var.IsEqualZero();
|
||||
}
|
||||
Reference in New Issue
Block a user