16#ifndef BT_KRYLOV_SOLVER_H
17#define BT_KRYLOV_SOLVER_H
26template <
class MatrixX>
51 for (
int i = 0; i < a.
size(); ++i)
66 for (
int i = 0; i < a.
size(); ++i)
68 for (
int d = 0; d < 3; ++d)
79 for (
int i = 0; i < a.
size(); ++i)
80 ans += a[i].
dot(b[i]);
88 for (
int i = 0; i < a.
size(); ++i)
89 result[i] += s * a[i];
97 for (
int i = 0; i < a.
size(); ++i)
98 result[i] = s * a[i] + b[i];
const T & btMax(const T &a, const T &b)
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
btScalar btFabs(btScalar x)
#define SIMD_FORCE_INLINE
int size() const
return the number of elements in the array
void resize(int newsize, const T &fillData=T())
virtual ~btKrylovSolver()
virtual btScalar norm(const TVStack &a)
virtual btScalar squaredNorm(const TVStack &a)
virtual btScalar dot(const TVStack &a, const TVStack &b)
virtual int solve(MatrixX &A, TVStack &x, const TVStack &b, bool verbose=false)=0
virtual TVStack sub(const TVStack &a, const TVStack &b)
virtual void setTolerance(btScalar tolerance)
virtual void reinitialize(const TVStack &b)=0
btKrylovSolver(int maxIterations, btScalar tolerance)
btAlignedObjectArray< btVector3 > TVStack
virtual void multAndAddTo(btScalar s, const TVStack &a, TVStack &result)
virtual TVStack multAndAdd(btScalar s, const TVStack &a, const TVStack &b)