blitz Version 1.0.2
Loading...
Searching...
No Matches
tvecglobs.h
Go to the documentation of this file.
1// -*- C++ -*-
2/***************************************************************************
3 * blitz/tvecglobs.h TinyVector global functions
4 *
5 * $Id$
6 *
7 * Copyright (C) 1997-2011 Todd Veldhuizen <tveldhui@acm.org>
8 *
9 * This file is a part of Blitz.
10 *
11 * Blitz is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License
13 * as published by the Free Software Foundation, either version 3
14 * of the License, or (at your option) any later version.
15 *
16 * Blitz is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License for more details.
20 *
21 * You should have received a copy of the GNU Lesser General Public
22 * License along with Blitz. If not, see <http://www.gnu.org/licenses/>.
23 *
24 * Suggestions: blitz-devel@lists.sourceforge.net
25 * Bugs: blitz-support@lists.sourceforge.net
26 *
27 * For more information, please see the Blitz++ Home Page:
28 * https://sourceforge.net/projects/blitz/
29 *
30 ***************************************************************************/
31
32#ifndef BZ_TVECGLOBS_H
33#define BZ_TVECGLOBS_H
34
35#include <blitz/meta/metaprog.h>
36#include <blitz/numtrait.h>
37
38#include <blitz/tvcross.h> // Cross products
39#include <blitz/meta/dot.h>
40#include <blitz/meta/product.h>
41#include <blitz/meta/sum.h>
42
43namespace blitz {
44
45template<typename T_numtype1, typename T_numtype2, int N_length>
49{
51}
52
53template<typename T_numtype1, int N_length>
56{
58}
59
60template<typename T_numtype, int N_length>
61inline BZ_SUMTYPE(T_numtype)
63{
65}
66
67// explicit returntype functions follow
68
69template<typename T_ret>
71public:
72
73 template<typename T_numtype1, typename T_numtype2, int N_length>
74static inline T_ret
80
81template<typename T_numtype1, int N_length>
82static inline T_ret
87
88template<typename T_numtype, int N_length>
89static inline T_ret
94
95};
96
97}
98
99#endif // BZ_TVECGLOBS_H
100
Definition memblock.h:307
The TinyVector class is a one-dimensional, fixed length vector that implements the blitz expression t...
Definition tinyvec2.h:73
Definition tvecglobs.h:70
static T_ret dot(const TinyVector< T_numtype1, N_length > &a, const TinyVector< T_numtype2, N_length > &b)
Definition tvecglobs.h:75
static T_ret sum(const TinyVector< T_numtype, N_length > &a)
Definition tvecglobs.h:90
static T_ret product(const TinyVector< T_numtype1, N_length > &a)
Definition tvecglobs.h:83
Definition array-impl.h:66
N_length const TinyVector< T_numtype2, N_length > & b
Definition tvecglobs.h:49
BZ_PROMOTE(T_numtype1, T_numtype2) dot(const TinyVector< T_numtype1
N_length & a
Definition tvecglobs.h:47
#define BZ_SUMTYPE(X)
Definition numtrait.h:42