library of assembled shared sources

http://lass.cocamware.com

vector_expressions.h File Reference

#include "../num_common.h"

Include dependency graph for vector_expressions.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


Data Structures

class  lass::num::impl::VStorage< T >
class  lass::num::impl::VScalar< T >
struct  lass::num::impl::VectorExpressionTraits< ExpressionType >
struct  lass::num::impl::VectorExpressionTraits< VScalar< T > >
class  lass::num::impl::VFun< T, Operand1 >

Namespaces

namespace  lass
 Library for Assembled Shared Sources.
namespace  lass::num
 numeric types and traits.
namespace  lass::num::impl

Defines

#define LASS_NUM_VECTOR_BINARY_EXPRESSION(i_name, c_operator)
#define LASS_NUM_VECTOR_UNARY_EXPRESSION(i_name, c_operator)

Functions

 lass::num::impl::LASS_NUM_VECTOR_BINARY_EXPRESSION (Add,+)
 lass::num::impl::LASS_NUM_VECTOR_BINARY_EXPRESSION (Sub,-)
 lass::num::impl::LASS_NUM_VECTOR_BINARY_EXPRESSION (Mul,*)
 lass::num::impl::LASS_NUM_VECTOR_BINARY_EXPRESSION (Div,/)
 lass::num::impl::LASS_NUM_VECTOR_UNARY_EXPRESSION (Neg,-)
 lass::num::impl::LASS_NUM_VECTOR_UNARY_EXPRESSION (Rec,::lass::num::NumTraits< T >::one/)


Detailed Description

Author:
Bram de Greve (bramz@users.sourceforge.net)

Tom De Muer (tomdemuer@users.sourceforge.net)

*** BEGIN LICENSE INFORMATION ***

The contents of this file are subject to the Common Public Attribution License Version 1.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://lass.sourceforge.net/cpal-license. The License is based on the Mozilla Public License Version 1.1 but Sections 14 and 15 have been added to cover use of software over a computer network and provide for limited attribution for the Original Developer. In addition, Exhibit A has been modified to be consistent with Exhibit B.

Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License.

The Original Code is LASS - Library of Assembled Shared Sources.

The Initial Developer of the Original Code is Bram de Greve and Tom De Muer. The Original Developer is the Initial Developer.

All portions of the code written by the Initial Developer are: Copyright (C) 2004-2007 the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of the GNU General Public License Version 2 or later (the GPL), in which case the provisions of GPL are applicable instead of those above. If you wish to allow use of your version of this file only under the terms of the GPL and not to allow others to use your version of this file under the CPAL, indicate your decision by deleting the provisions above and replace them with the notice and other provisions required by the GPL License. If you do not delete the provisions above, a recipient may use your version of this file under either the CPAL or the GPL.

*** END LICENSE INFORMATION ***

Definition in file vector_expressions.h.


Define Documentation

#define LASS_NUM_VECTOR_BINARY_EXPRESSION ( i_name,
c_operator   ) 

Value:

template <typename T, typename Operand1, typename Operand2>\
class LASS_CONCATENATE(V, i_name)\
{\
public:\
    enum { lvalue = false };\
    typedef typename util::CallTraits<T>::TValue TValue;\
    typedef size_t TSize;\
    LASS_CONCATENATE(V, i_name)(const Operand1& iA, const Operand2& iB):\
        operand1_(iA), operand2_(iB)\
    {\
        LASS_ASSERT(operand1_.size() == operand2_.size());\
    }\
    TValue operator[](TSize iIndex) const { return operand1_[iIndex] c_operator operand2_[iIndex]; }\
    TSize size() const { return operand1_.size(); }\
private:\
    typename VectorExpressionTraits<Operand1>::TStorage operand1_;\
    typename VectorExpressionTraits<Operand2>::TStorage operand2_;\
}

Definition at line 123 of file vector_expressions.h.

#define LASS_NUM_VECTOR_UNARY_EXPRESSION ( i_name,
c_operator   ) 

Value:

template <typename T, typename Operand1>\
class LASS_CONCATENATE(V, i_name)\
{\
public:\
    enum { lvalue = false };\
    typedef typename util::CallTraits<T>::TValue TValue;\
    typedef size_t TSize;\
    LASS_CONCATENATE(V, i_name)(const Operand1& iA): operand1_(iA) {}\
    TValue operator[](TSize iIndex) const { return c_operator operand1_[iIndex]; }\
    TSize size() const { return operand1_.size(); }\
private:\
    typename VectorExpressionTraits<Operand1>::TStorage operand1_;\
}

Definition at line 152 of file vector_expressions.h.


Generated on Mon Nov 10 14:22:06 2008 for Library of Assembled Shared Sources by doxygen 1.5.7.1
SourceForge.net Logo