BELFEM 0.9.0
Berkeley Lab Finite Element Framework
Loading...
Searching...
No Matches
op_AR_VectorEqualEqual.hpp
Go to the documentation of this file.
1/*
2 * BELFEM -- The Berkeley Lab Finite Element Framework
3 * Copyright (c) 2026, The Regents of the University of California,
4 * through Lawrence Berkeley National Laboratory (subject to receipt of any required
5 * approvals from the U.S. Dept. of Energy). All rights reserved.
6 *
7 * Developers: Christian Messe, Gregory Giard
8 *
9 * See the top-level LICENSE file for the complete license and disclaimer.
10 */
11
12#ifndef BELFEM_OP_AR_VECTOREQUALEQUAL_HPP
13#define BELFEM_OP_AR_VECTOREQUALEQUAL_HPP
14
15#include "cl_AR_Vector.hpp"
16
17namespace belfem
18{
19//------------------------------------------------------------------------------
20
21 template < typename T >
22 bool
24 const Vector< T > & aB )
25 {
26 return ( std::size_t ) arma::as_scalar(
27 arma::accu( aA.vector_data() == aB.vector_data() ) )
28 == ( std::size_t ) aA.length() ;
29 }
30
31// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
32
33 template < typename T >
34 bool
35 operator==( const T & aA,
36 const Vector< T > & aB )
37 {
38 return ( std::size_t ) arma::as_scalar(
39 arma::accu( aA == aB.vector_data() ) )
40 == ( std::size_t ) aA.length() ;
41 }
42
43// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
44
45 template < typename T >
46 bool
48 const T & aB )
49 {
50 return ( std::size_t ) arma::as_scalar(
51 arma::accu( aA.vector_data() == aB ) )
52 == ( std::size_t ) aA.length() ;
53 }
54
55//------------------------------------------------------------------------------
56
57}
58#endif //BELFEM_OP_AR_VECTOREQUALEQUAL_HPP
Column vector.
Definition cl_BZ_Vector.hpp:41
size_t length() const
get the length of the vector
Definition cl_AR_Vector.hpp:257
VectorType & vector_data()
expose the underlying matrix implementation ( writable version )
Definition cl_AR_Vector.hpp:204
USER GUIDES:
Definition cl_Capacitor.cpp:16
bool operator==(const Matrix< T > &aA, const Matrix< T > &aB)
Definition op_AR_MatrixEqualEqual.hpp:23