www.pudn.com > Image_segment.rar > Functions.h
//Copyright (c) 2004-2005, Baris Sumengen
//All rights reserved.
//
// CIMPL Matrix Performance Library
//
//Redistribution and use in source and binary
//forms, with or without modification, are
//permitted provided that the following
//conditions are met:
//
// * No commercial use is allowed.
// This software can only be used
// for non-commercial purposes. This
// distribution is mainly intended for
// academic research and teaching.
// * Redistributions of source code must
// retain the above copyright notice, this
// list of conditions and the following
// disclaimer.
// * Redistributions of binary form must
// mention the above copyright notice, this
// list of conditions and the following
// disclaimer in a clearly visible part
// in associated product manual,
// readme, and web site of the redistributed
// software.
// * Redistributions in binary form must
// reproduce the above copyright notice,
// this list of conditions and the
// following disclaimer in the
// documentation and/or other materials
// provided with the distribution.
// * The name of Baris Sumengen may not be
// used to endorse or promote products
// derived from this software without
// specific prior written permission.
//
//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT
//HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
//EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT
//NOT LIMITED TO, THE IMPLIED WARRANTIES OF
//MERCHANTABILITY AND FITNESS FOR A PARTICULAR
//PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
//CONTRIBUTORS BE LIABLE FOR ANY
//DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
//EXEMPLARY, OR CONSEQUENTIAL DAMAGES
//(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
//OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
//DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
//HOWEVER CAUSED AND ON ANY THEORY OF
//LIABILITY, WHETHER IN CONTRACT, STRICT
//LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
//OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
//OF THIS SOFTWARE, EVEN IF ADVISED OF THE
//POSSIBILITY OF SUCH DAMAGE.
#pragma once
#ifndef MATHCORE_FUNCTIONS_H
#define MATHCORE_FUNCTIONS_H
#include "cimpl.h"
using namespace CIMPL;
namespace MathCore
{
// Inverts elements
Vector Inv(Vector& m);
Vector Inv(Vector& m);
Matrix Inv(Matrix& m);
Matrix Inv(Matrix& m);
Vector& InvI(Vector& m);
Vector& InvI(Vector& m);
Matrix& InvI(Matrix& m);
Matrix& InvI(Matrix& m);
// Division of elements
Vector Div(Vector& m1, Vector& m2);
Vector Div(Vector& m1, Vector& m2);
Matrix Div(Matrix& m1, Matrix& m2);
Matrix Div(Matrix& m1, Matrix& m2);
Vector& DivI(Vector& m1, Vector& m2);
Vector& DivI(Vector& m1, Vector& m2);
Matrix& DivI(Matrix& m1, Matrix& m2);
Matrix& DivI(Matrix& m1, Matrix& m2);
// Square root of elements
Vector Sqrt(Vector& m);
Vector Sqrt(Vector& m);
Matrix Sqrt(Matrix& m);
Matrix Sqrt(Matrix& m);
Vector& SqrtI(Vector& m);
Vector& SqrtI(Vector& m);
Matrix& SqrtI(Matrix& m);
Matrix& SqrtI(Matrix& m);
// Inverse Square root of elements
Vector InvSqrt(Vector& m);
Vector InvSqrt(Vector& m);
Matrix InvSqrt(Matrix& m);
Matrix InvSqrt(Matrix& m);
Vector& InvSqrtI(Vector& m);
Vector& InvSqrtI(Vector& m);
Matrix& InvSqrtI(Matrix& m);
Matrix& InvSqrtI(Matrix& m);
// Cube root of elements
Vector Cbrt(Vector& m);
Vector Cbrt(Vector& m);
Matrix Cbrt(Matrix& m);
Matrix Cbrt(Matrix& m);
Vector& CbrtI(Vector& m);
Vector& CbrtI(Vector& m);
Matrix& CbrtI(Matrix& m);
Matrix& CbrtI(Matrix& m);
// Cube root of elements
Vector InvCbrt(Vector& m);
Vector InvCbrt(Vector& m);
Matrix InvCbrt(Matrix& m);
Matrix InvCbrt(Matrix& m);
Vector& InvCbrtI(Vector& m);
Vector& InvCbrtI(Vector& m);
Matrix& InvCbrtI(Matrix& m);
Matrix& InvCbrtI(Matrix& m);
// Pow of elements
Vector Pow(Vector& m1, Vector& m2);
Vector Pow(Vector& m1, Vector& m2);
Matrix Pow(Matrix& m1, Matrix& m2);
Matrix Pow(Matrix& m1, Matrix& m2);
Vector& PowI(Vector& m1, Vector& m2);
Vector& PowI(Vector& m1, Vector& m2);
Matrix& PowI(Matrix& m1, Matrix& m2);
Matrix& PowI(Matrix& m1, Matrix& m2);
// Pow of vector elements to a constant
Vector Powx(Vector& m1, const float m2);
Vector Powx(Vector& m1, const double m2);
Matrix Powx(Matrix& m1, const float m2);
Matrix Powx(Matrix& m1, const double m2);
Vector& PowxI(Vector& m1, const float m2);
Vector& PowxI(Vector& m1, const double m2);
Matrix& PowxI(Matrix& m1, const float m2);
Matrix& PowxI(Matrix& m1, const double m2);
// Exponent of elements
Vector Exp(Vector& m);
Vector Exp(Vector& m);
Matrix Exp(Matrix& m);
Matrix Exp(Matrix& m);
Vector& ExpI(Vector& m);
Vector& ExpI(Vector& m);
Matrix& ExpI(Matrix& m);
Matrix& ExpI(Matrix& m);
// Ln of elements
Vector Ln(Vector& m);
Vector Ln(Vector& m);
Matrix Ln(Matrix& m);
Matrix Ln(Matrix& m);
Vector& LnI(Vector& m);
Vector& LnI(Vector& m);
Matrix& LnI(Matrix& m);
Matrix& LnI(Matrix& m);
// Log10 of elements
Vector Log10(Vector& m);
Vector Log10(Vector& m);
Matrix Log10(Matrix& m);
Matrix Log10(Matrix& m);
Vector& Log10I(Vector& m);
Vector& Log10I(Vector& m);
Matrix& Log10I(Matrix& m);
Matrix& Log10I(Matrix& m);
// Cos of elements
Vector Cos(Vector& m);
Vector Cos(Vector& m);
Matrix Cos(Matrix& m);
Matrix Cos(Matrix& m);
Vector& CosI(Vector& m);
Vector& CosI(Vector& m);
Matrix& CosI(Matrix& m);
Matrix& CosI(Matrix& m);
// Sin of elements
Vector Sin(Vector& m);
Vector Sin(Vector& m);
Matrix Sin(Matrix& m);
Matrix Sin(Matrix& m);
Vector& SinI(Vector& m);
Vector& SinI(Vector& m);
Matrix& SinI(Matrix& m);
Matrix& SinI(Matrix& m);
// Tan of elements
Vector Tan(Vector& m);
Vector Tan(Vector& m);
Matrix Tan(Matrix& m);
Matrix Tan(Matrix& m);
Vector& TanI(Vector& m);
Vector& TanI(Vector& m);
Matrix& TanI(Matrix& m);
Matrix& TanI(Matrix& m);
// Acos of elements
Vector Acos(Vector& m);
Vector Acos(Vector& m);
Matrix Acos(Matrix& m);
Matrix Acos(Matrix& m);
Vector& AcosI(Vector& m);
Vector& AcosI(Vector& m);
Matrix& AcosI(Matrix& m);
Matrix