fn_dot.hpp
Go to the documentation of this file.
1 // Copyright (C) 2008-2010 NICTA (www.nicta.com.au)
2 // Copyright (C) 2008-2010 Conrad Sanderson
3 //
4 // This file is part of the Armadillo C++ library.
5 // It is provided without any warranty of fitness
6 // for any purpose. You can redistribute this file
7 // and/or modify it under the terms of the GNU
8 // Lesser General Public License (LGPL) as published
9 // by the Free Software Foundation, either version 3
10 // of the License or (at your option) any later version.
11 // (see http://www.opensource.org/licenses for more info)
12 
13 
16 
17 
18 template<typename T1, typename T2>
21 typename T1::elem_type
22 dot
23  (
26  )
27  {
29 
30  return op_dot::apply(A,B);
31  }
32 
33 
34 
35 template<typename T1, typename T2>
38 typename T1::elem_type
40  (
44  )
45  {
47 
48  return op_norm_dot::apply(A,B);
49  }
50 
51 
52 
53 //
54 // cdot
55 
56 
57 
58 template<typename T1, typename T2>
61 typename T1::elem_type
62 cdot
63  (
67  )
68  {
71 
72  return op_cdot::apply(A,B);
73  }
74 
75 
76 
77 template<typename T1, typename T2>
80 typename T1::elem_type
81 cdot
82  (
86  )
87  {
90 
91  return op_dot::apply(A,B);
92  }
93 
94 
95 
96 
97 // convert dot(htrans(x), y) to cdot(x,y)
98 
99 template<typename T1, typename T2>
102 typename T1::elem_type
103 dot
104  (
105  const Op<T1, op_htrans>& A,
108  )
109  {
111  arma_ignore(junk);
112 
113  return cdot(A.m, B);
114  }
115 
116 
117 
static arma_hot T1::elem_type apply(const Base< typename T1::elem_type, T1 > &X, const Base< typename T1::elem_type, T2 > &Y)
arma_inline arma_warn_unused T1::elem_type dot(const Base< typename T1::elem_type, T1 > &A, const Base< typename T1::elem_type, T2 > &B)
Definition: fn_dot.hpp:23
arma_hot static arma_inline T1::elem_type apply(const Base< typename T1::elem_type, T1 > &X, const Base< typename T1::elem_type, T2 > &Y)
arma_aligned const T1 & m
storage of reference to the operand (eg. a matrix)
Definition: Op_bones.hpp:45
arma_inline arma_warn_unused T1::elem_type norm_dot(const Base< typename T1::elem_type, T1 > &A, const Base< typename T1::elem_type, T2 > &B, const typename arma_blas_type_only< typename T1::elem_type >::result *junk=0)
Definition: fn_dot.hpp:40
#define arma_ignore(variable)
#define arma_extra_debug_sigprint
Definition: debug.hpp:1116
#define arma_warn_unused
arma_hot static arma_inline T1::elem_type apply(const Base< typename T1::elem_type, T1 > &X, const Base< typename T1::elem_type, T2 > &Y)
#define arma_inline
arma_inline arma_warn_unused T1::elem_type cdot(const Base< typename T1::elem_type, T1 > &A, const Base< typename T1::elem_type, T2 > &B, const typename arma_cx_only< typename T1::elem_type >::result *junk=0)
Definition: fn_dot.hpp:63


armadillo_matrix
Author(s):
autogenerated on Fri Apr 16 2021 02:31:57