Peano
Loading...
Searching...
No Matches
VectorCompare.h
Go to the documentation of this file.
1
// Copyright (C) 2009 Technische Universitaet Muenchen
2
// This file is part of the Peano project. For conditions of distribution and
3
// use, please see the copyright notice at www.peano-framework.org
4
#pragma once
5
6
7
#include "
tarch/la/Vector.h
"
8
9
10
namespace
tarch
{
11
namespace
la {
12
template
<
int
N>
13
struct
VectorCompare;
14
}
15
}
16
30
template
<
int
N>
31
struct
tarch::la::VectorCompare
{
32
private
:
33
const
double
_accuracy
;
34
public
:
35
VectorCompare
(
double
accuracy=
NUMERICAL_ZERO_DIFFERENCE
):
36
_accuracy
(accuracy) {
37
}
38
39
40
bool
operator()
(
41
const
Vector<N,double>
& left,
42
const
Vector<N,double>
& right
43
)
const
{
44
return
firstGreater
(right, left,
_accuracy
);
45
}
46
};
47
48
Vector.h
tarch::la::NUMERICAL_ZERO_DIFFERENCE
constexpr double NUMERICAL_ZERO_DIFFERENCE
Definition
Scalar.h:17
tarch::la::firstGreater
bool firstGreater(const Vector< Size, Scalar > &lhs, const Vector< Size, Scalar > &rhs, const Scalar tolerance=NUMERICAL_ZERO_DIFFERENCE)
Compares sequentially every component pair of lVector and rVector, and stops as soon as one is greate...
tarch
Have to include this header, as I need access to the SYCL_EXTERNAL keyword.
Definition
accelerator.h:19
tarch::la::VectorCompare
Comparison operator for boolean vectors.
Definition
VectorCompare.h:31
tarch::la::VectorCompare::VectorCompare
VectorCompare(double accuracy=NUMERICAL_ZERO_DIFFERENCE)
Definition
VectorCompare.h:35
tarch::la::VectorCompare::_accuracy
const double _accuracy
Definition
VectorCompare.h:33
tarch::la::VectorCompare::operator()
bool operator()(const Vector< N, double > &left, const Vector< N, double > &right) const
Definition
VectorCompare.h:40
tarch::la::Vector
Simple vector class.
Definition
Vector.h:159
src
tarch
la
VectorCompare.h
Generated on Tue Nov 3 2026 16:05:42 for Peano by
1.9.8