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& AcosI(Matrix& m); 
 
// Asin of elements 
	Vector Asin(Vector& m); 
	Vector Asin(Vector& m); 
	Matrix Asin(Matrix& m); 
	Matrix Asin(Matrix& m); 
	 
	Vector&  AsinI(Vector& m); 
	Vector& AsinI(Vector& m); 
	Matrix&  AsinI(Matrix& m); 
	Matrix& AsinI(Matrix& m); 
 
// Atan of elements 
	Vector Atan(Vector& m); 
	Vector Atan(Vector& m); 
	Matrix Atan(Matrix& m); 
	Matrix Atan(Matrix& m); 
	 
	Vector&  AtanI(Vector& m); 
	Vector& AtanI(Vector& m); 
	Matrix&  AtanI(Matrix& m); 
	Matrix& AtanI(Matrix& m); 
 
// Atan2 of elements 
	Vector Atan2(Vector& m1, Vector& m2); 
	Vector Atan2(Vector& m1, Vector& m2); 
	Matrix Atan2(Matrix& m1, Matrix& m2); 
	Matrix Atan2(Matrix& m1, Matrix& m2); 
 
	Vector&  Atan2I(Vector& m1, Vector& m2); 
	Vector& Atan2I(Vector& m1, Vector& m2); 
	Matrix&  Atan2I(Matrix& m1, Matrix& m2); 
	Matrix& Atan2I(Matrix& m1, Matrix& m2); 
 
 
 
// Cosh of elements 
	Vector Cosh(Vector& m); 
	Vector Cosh(Vector& m); 
	Matrix Cosh(Matrix& m); 
	Matrix Cosh(Matrix& m); 
	 
	Vector&  CoshI(Vector& m); 
	Vector& CoshI(Vector& m); 
	Matrix&  CoshI(Matrix& m); 
	Matrix& CoshI(Matrix& m); 
 
// Sinh of elements 
	Vector Sinh(Vector& m); 
	Vector Sinh(Vector& m); 
	Matrix Sinh(Matrix& m); 
	Matrix Sinh(Matrix& m); 
	 
	Vector&  SinhI(Vector& m); 
	Vector& SinhI(Vector& m); 
	Matrix&  SinhI(Matrix& m); 
	Matrix& SinhI(Matrix& m); 
 
// Tanh of elements 
	Vector Tanh(Vector& m); 
	Vector Tanh(Vector& m); 
	Matrix Tanh(Matrix& m); 
	Matrix Tanh(Matrix& m); 
	 
	Vector&  TanhI(Vector& m); 
	Vector& TanhI(Vector& m); 
	Matrix&  TanhI(Matrix& m); 
	Matrix& TanhI(Matrix& m); 
 
// Acosh of elements 
	Vector Acosh(Vector& m); 
	Vector Acosh(Vector& m); 
	Matrix Acosh(Matrix& m); 
	Matrix Acosh(Matrix& m); 
	 
	Vector&  AcoshI(Vector& m); 
	Vector& AcoshI(Vector& m); 
	Matrix&  AcoshI(Matrix& m); 
	Matrix& AcoshI(Matrix& m); 
 
// Asinh of elements 
	Vector Asinh(Vector& m); 
	Vector Asinh(Vector& m); 
	Matrix Asinh(Matrix& m); 
	Matrix Asinh(Matrix& m); 
	 
	Vector&  AsinhI(Vector& m); 
	Vector& AsinhI(Vector& m); 
	Matrix&  AsinhI(Matrix& m); 
	Matrix& AsinhI(Matrix& m); 
 
// Atanh of elements 
	Vector Atanh(Vector& m); 
	Vector Atanh(Vector& m); 
	Matrix Atanh(Matrix& m); 
	Matrix Atanh(Matrix& m); 
	 
	Vector&  AtanhI(Vector& m); 
	Vector& AtanhI(Vector& m); 
	Matrix&  AtanhI(Matrix& m); 
	Matrix& AtanhI(Matrix& m); 
 
 
// Erf of elements 
	Vector Erf(Vector& m); 
	Vector Erf(Vector& m); 
	Matrix Erf(Matrix& m); 
	Matrix Erf(Matrix& m); 
	 
	Vector&  ErfI(Vector& m); 
	Vector& ErfI(Vector& m); 
	Matrix&  ErfI(Matrix& m); 
	Matrix& ErfI(Matrix& m); 
 
// Erfc of elements 
	Vector Erfc(Vector& m); 
	Vector Erfc(Vector& m); 
	Matrix Erfc(Matrix& m); 
	Matrix Erfc(Matrix& m); 
	 
	Vector&  ErfcI(Vector& m); 
	Vector& ErfcI(Vector& m); 
	Matrix&  ErfcI(Matrix& m); 
	Matrix& ErfcI(Matrix& m); 
 
 
 
 
}; 
 
 
 
 
 
#endif