
/** @file  psMatrixVectorArithmetic.h
 *
 *  @brief Provides unary and binary functions for simple matrix and vector element operations. Functions
 *  include:
 *
 *      Addition (+)
 *      Subtraction (-)
 *      Multiplication (*)
 *      Division (/)
 *      Power (^)
 *      Minimum (min)
 *      Maximum (max)
 *      Absolute value (abs)
 *      Exponent (exp)
 *      Natural Log (ln)
 *      Power of 10 (ten)
 *      Log (log)
 *      Sine (sin or dsin)
 *      Cosine (cos or dcos)
 *      Tangent (tan or dtan)
 *      Arcsine (asin or dasin)
 *      Arccosine (acos or dacos)
 *      Arctan (atan or datan)
 *
 *  Currently only vector-vector and image-image binary operations are supported.
 *
 *  @ingroup MatrixVectorArithmetic
 *
 *  @author Ross Harman, MHPCC
 *
 *  @version $Revision: 1.7 $ $Name: not supported by cvs2svn $
 *  @date $Date: 2005-01-12 22:17:01 $
 *
 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
 */

#ifndef PSMATRIX_VECTOR_ARITHMETIC_H
#define PSMATRIX_VECTOR_ARITHMETIC_H

/// @addtogroup MatrixVectorArithmetic
/// @{

/** Perform simple binary arithmetic with images or vectors
 *
 *  Performs addition, subtraction, multiplication, division, power, minumum, and maximum arithmetic
 *  operations with images and vectors. Uses the form:
 *
 *      out = in1 op in2,
 *
 *      Where op is: "=", "+", "-", "*", "/", "^", "min", or "max"
 *
 *  This function only supports vector-vector or image-image operations.
 *
 *  @return  psType* : Pointer to either psImage or psVector.
 */
psType* psBinaryOp(
    psPtr out,                         ///< Output type, either psImage or psVector.
    psPtr in1,                         ///< First input, either psImage or psVector.
    char *op,                          ///< Operator.
    psPtr in2                          ///< Second input, either psImage or psVector.
);

/** Perform simple unary arithmetic with images or vectors
 *
 *  Performs absolute value, exponent, natural log, power of 10, log, sine, cosine, tangent, arcsine,
 *  arccosine, or arctan. operations with images and vectors. Uses the form:
 *
 *     out = op(in),
 *
 *     Where op is: "abs", "exp", "ln", "ten", "log", "sin", "cos", "tan" "asin", "acos", "atan", "dsin",
 *                  "dcos", dtan", "dasin", "dacos", or "datan".
 *
 *  Trigometric Operations with "d" prefix use units of degrees. Those without are in radians.
 *
 *  This function only supports vector-vector or image-image opertions.
 *
 *  @return  psType* : Pointer to either psImage or psVector.
 */
psType* psUnaryOp(
    psPtr out,                         ///< Output type, either psImage or psVector.
    psPtr in,                          ///< Input, either psImage or psVector.
    char *op                           ///< Operator.
);

/// @}

#endif
