X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fyoink;a=blobdiff_plain;f=src%2Fcml%2Fmatrix%2Fmatrix_ops.h;fp=src%2Fcml%2Fmatrix%2Fmatrix_ops.h;h=8188f874f735baf77bd9a2e29ece97b90572781f;hp=0000000000000000000000000000000000000000;hb=6b0a0d0efafe34d48ab344fca3b479553bd4e62c;hpb=85783316365181491a3e3c0c63659972477cebba diff --git a/src/cml/matrix/matrix_ops.h b/src/cml/matrix/matrix_ops.h new file mode 100644 index 0000000..8188f87 --- /dev/null +++ b/src/cml/matrix/matrix_ops.h @@ -0,0 +1,50 @@ +/* -*- C++ -*- ------------------------------------------------------------ + +Copyright (c) 2007 Jesse Anders and Demian Nave http://cmldev.net/ + +The Configurable Math Library (CML) is distributed under the terms of the +Boost Software License, v1.0 (see cml/LICENSE for details). + + *-----------------------------------------------------------------------*/ +/** @file + * @brief Defines matrix operators. + */ +#ifndef matrix_ops_h +#define matrix_ops_h + +#include +#include +#include + +namespace cml { + +CML_MAT_UNIOP( operator+, et::OpPos) +CML_MATXPR_UNIOP( operator+, et::OpPos) + +CML_MAT_UNIOP( operator-, et::OpNeg) +CML_MATXPR_UNIOP( operator-, et::OpNeg) + +CML_MAT_MAT_BINOP( operator+, et::OpAdd) +CML_MATXPR_MAT_BINOP( operator+, et::OpAdd) +CML_MAT_MATXPR_BINOP( operator+, et::OpAdd) +CML_MATXPR_MATXPR_BINOP( operator+, et::OpAdd) + +CML_MAT_MAT_BINOP( operator-, et::OpSub) +CML_MATXPR_MAT_BINOP( operator-, et::OpSub) +CML_MAT_MATXPR_BINOP( operator-, et::OpSub) +CML_MATXPR_MATXPR_BINOP( operator-, et::OpSub) + +CML_MAT_SCALAR_BINOP( operator*, et::OpMul) +CML_SCALAR_MAT_BINOP( operator*, et::OpMul) +CML_MATXPR_SCALAR_BINOP( operator*, et::OpMul) +CML_SCALAR_MATXPR_BINOP( operator*, et::OpMul) + +CML_MAT_SCALAR_BINOP( operator/, et::OpDiv) +CML_MATXPR_SCALAR_BINOP( operator/, et::OpDiv) + +} // namespace cml + +#endif + +// ------------------------------------------------------------------------- +// vim:ft=cpp