Peano 4
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
10namespace tarch {
11 namespace la {
12 template<int N>
13 struct VectorCompare;
14 }
15}
16
30template<int N>
32 private:
33 const double _accuracy;
34 public:
36 _accuracy(accuracy) {
37 }
38
39
41 const Vector<N,double>& left,
42 const Vector<N,double>& right
43 ) const {
44 return firstGreater(right, left, _accuracy);
45 }
46};
47
48
constexpr double NUMERICAL_ZERO_DIFFERENCE
Definition Scalar.h:17
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...
Have to include this header, as I need access to the SYCL_EXTERNAL keyword.
Definition accelerator.h:17
Comparison operator for boolean vectors.
VectorCompare(double accuracy=NUMERICAL_ZERO_DIFFERENCE)
bool operator()(const Vector< N, double > &left, const Vector< N, double > &right) const
Simple vector class.
Definition Vector.h:134