Functions.cpp

Go to the documentation of this file.
00001 //Copyright (c) 2004-2005, Baris Sumengen
00002 //All rights reserved.
00003 //
00004 // CIMPL Matrix Performance Library
00005 //
00006 //Redistribution and use in source and binary
00007 //forms, with or without modification, are
00008 //permitted provided that the following
00009 //conditions are met:
00010 //
00011 //    * No commercial use is allowed. 
00012 //    This software can only be used
00013 //    for non-commercial purposes. This 
00014 //    distribution is mainly intended for
00015 //    academic research and teaching.
00016 //    * Redistributions of source code must
00017 //    retain the above copyright notice, this
00018 //    list of conditions and the following
00019 //    disclaimer.
00020 //    * Redistributions of binary form must
00021 //    mention the above copyright notice, this
00022 //    list of conditions and the following
00023 //    disclaimer in a clearly visible part 
00024 //    in associated product manual, 
00025 //    readme, and web site of the redistributed 
00026 //    software.
00027 //    * Redistributions in binary form must
00028 //    reproduce the above copyright notice,
00029 //    this list of conditions and the
00030 //    following disclaimer in the
00031 //    documentation and/or other materials
00032 //    provided with the distribution.
00033 //    * The name of Baris Sumengen may not be
00034 //    used to endorse or promote products
00035 //    derived from this software without
00036 //    specific prior written permission.
00037 //
00038 //THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT
00039 //HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
00040 //EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT
00041 //NOT LIMITED TO, THE IMPLIED WARRANTIES OF
00042 //MERCHANTABILITY AND FITNESS FOR A PARTICULAR
00043 //PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
00044 //CONTRIBUTORS BE LIABLE FOR ANY
00045 //DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
00046 //EXEMPLARY, OR CONSEQUENTIAL DAMAGES
00047 //(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
00048 //OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
00049 //DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
00050 //HOWEVER CAUSED AND ON ANY THEORY OF
00051 //LIABILITY, WHETHER IN CONTRACT, STRICT
00052 //LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
00053 //OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00054 //OF THIS SOFTWARE, EVEN IF ADVISED OF THE
00055 //POSSIBILITY OF SUCH DAMAGE.
00056 
00057 
00058 
00059 #include "./Functions.h"
00060 #include "mkl_vml.h"
00061 
00062 
00063 namespace MathCore
00064 {
00065 
00066         // Inverts elements
00067         Vector<float> Inv(Vector<float>& m)
00068         {
00069                 Vector<float> temp(m.Length());
00070                 vsInv(m.Length(), m.Data(), temp.Data());
00071                 return temp;
00072         }
00073 
00074 
00075         Vector<double> Inv(Vector<double>& m)
00076         {
00077                 Vector<double> temp(m.Length());
00078                 vdInv(m.Length(), m.Data(), temp.Data());
00079                 return temp;
00080         }
00081         
00082         Matrix<float> Inv(Matrix<float>& m)
00083         {
00084                 Matrix<float> temp(m.Rows(), m.Columns());
00085                 vsInv(m.Length(), m.Data(), temp.Data());
00086                 return temp;
00087         }
00088 
00089         Matrix<double> Inv(Matrix<double>& m)
00090         {
00091                 Matrix<double> temp(m.Rows(), m.Columns());
00092                 vdInv(m.Length(), m.Data(), temp.Data());
00093                 return temp;
00094         }
00095 
00096 
00097         Vector<float>& InvI(Vector<float>& m)
00098         {
00099                 vsInv(m.Length(), m.Data(), m.Data());
00100                 return m;
00101         }
00102 
00103         Vector<double>& InvI(Vector<double>& m)
00104         {
00105                 vdInv(m.Length(), m.Data(), m.Data());
00106                 return m;
00107         }
00108 
00109         Matrix<float>& InvI(Matrix<float>& m)
00110         {
00111                 vsInv(m.Length(), m.Data(), m.Data());
00112                 return m;
00113         }
00114 
00115         Matrix<double>& InvI(Matrix<double>& m)
00116         {
00117                 vdInv(m.Length(), m.Data(), m.Data());
00118                 return m;
00119         }
00120 
00121 
00122         // Division of elements
00123         Vector<float> Div(Vector<float>& m1, Vector<float>& m2)
00124         {
00125                 if(m1.Length() != m2.Length())
00126                 {
00127                         cerr << "Line: " << __LINE__ << " File: " << __FILE__ << endl;
00128                         Utility::RunTimeError("Vector lengths are not the same!");
00129                 }
00130                 
00131                 Vector<float> temp(m1.Length());
00132                 vsDiv(m1.Length(), m1.Data(), m2.Data(), temp.Data());
00133                 return temp;
00134         }
00135 
00136         Vector<double> Div(Vector<double>& m1, Vector<double>& m2)
00137         {
00138                 if(m1.Length() != m2.Length())
00139                 {
00140                         cerr << "Line: " << __LINE__ << " File: " << __FILE__ << endl;
00141                         Utility::RunTimeError("Vector lengths are not the same!");
00142                 }
00143                 
00144                 Vector<double> temp(m1.Length());
00145                 vdDiv(m1.Length(), m1.Data(), m2.Data(), temp.Data());
00146                 return temp;
00147         }
00148 
00149         Matrix<float> Div(Matrix<float>& m1, Matrix<float>& m2)
00150         {
00151                 if(m1.Rows() != m2.Rows() || m1.Columns() != m2.Columns())
00152                 {
00153                         cerr << "Line: " << __LINE__ << " File: " << __FILE__ << endl;
00154                         Utility::RunTimeError("Matrix dimensions does not match!");
00155                 }
00156                 
00157                 Matrix<float> temp(m1.Rows(), m1.Columns());
00158                 vsDiv(m1.Length(), m1.Data(), m2.Data(), temp.Data());
00159                 return temp;
00160         }
00161 
00162         Matrix<double> Div(Matrix<double>& m1, Matrix<double>& m2)
00163         {
00164                 if(m1.Rows() != m2.Rows() || m1.Columns() != m2.Columns())
00165                 {
00166                         cerr << "Line: " << __LINE__ << " File: " << __FILE__ << endl;
00167                         Utility::RunTimeError("Matrix dimensions does not match!");
00168                 }
00169                 
00170                 Matrix<double> temp(m1.Rows(), m1.Columns());
00171                 vdDiv(m1.Length(), m1.Data(), m2.Data(), temp.Data());
00172                 return temp;
00173         }
00174 
00175 
00176         Vector<float>& DivI(Vector<float>& m1, Vector<float>& m2)
00177         {
00178                 if(m1.Length() != m2.Length())
00179                 {
00180                         cerr << "Line: " << __LINE__ << " File: " << __FILE__ << endl;
00181                         Utility::RunTimeError("Vector lengths are not the same!");
00182                 }
00183                 
00184                 vsDiv(m1.Length(), m1.Data(), m2.Data(), m1.Data());
00185                 return m1;
00186         }
00187 
00188         Vector<double>& DivI(Vector<double>& m1, Vector<double>& m2)
00189         {
00190                 if(m1.Length() != m2.Length())
00191                 {
00192                         cerr << "Line: " << __LINE__ << " File: " << __FILE__ << endl;
00193                         Utility::RunTimeError("Vector lengths are not the same!");
00194                 }
00195                 
00196                 vdDiv(m1.Length(), m1.Data(), m2.Data(), m1.Data());
00197                 return m1;
00198         }
00199 
00200         Matrix<float>& DivI(Matrix<float>& m1, Matrix<float>& m2)
00201         {
00202                 if(m1.Rows() != m2.Rows() || m1.Columns() != m2.Columns())
00203                 {
00204                         cerr << "Line: " << __LINE__ << " File: " << __FILE__ << endl;
00205                         Utility::RunTimeError("Matrix dimensions does not match!");
00206                 }
00207                 
00208                 vsDiv(m1.Length(), m1.Data(), m2.Data(), m1.Data());
00209                 return m1;
00210         }
00211 
00212         Matrix<double>& DivI(Matrix<double>& m1, Matrix<double>& m2)
00213         {
00214                 if(m1.Rows() != m2.Rows() || m1.Columns() != m2.Columns())
00215                 {
00216                         cerr << "Line: " << __LINE__ << " File: " << __FILE__ << endl;
00217                         Utility::RunTimeError("Matrix dimensions does not match!");
00218                 }
00219                 
00220                 vdDiv(m1.Length(), m1.Data(), m2.Data(), m1.Data());
00221                 return m1;
00222         }
00223 
00224 
00225         // Square root of elements
00226         Vector<float> Sqrt(Vector<float>& m)
00227         {
00228                 Vector<float> temp(m.Length());
00229                 vsSqrt(m.Length(), m.Data(), temp.Data());
00230                 return temp;
00231         }
00232 
00233         Vector<double> Sqrt(Vector<double>& m)
00234         {
00235                 Vector<double> temp(m.Length());
00236                 vdSqrt(m.Length(), m.Data(), temp.Data());
00237                 return temp;
00238         }
00239 
00240         Matrix<float> Sqrt(Matrix<float>& m)
00241         {
00242                 Matrix<float> temp(m.Rows(), m.Columns());
00243                 vsSqrt(m.Length(), m.Data(), temp.Data());
00244                 return temp;
00245         }
00246 
00247         Matrix<double> Sqrt(Matrix<double>& m)
00248         {
00249                 Matrix<double> temp(m.Rows(), m.Columns());
00250                 vdSqrt(m.Length(), m.Data(), temp.Data());
00251                 return temp;
00252         }
00253 
00254 
00255         Vector<float>& SqrtI(Vector<float>& m)
00256         {
00257                 vsSqrt(m.Length(), m.Data(), m.Data());
00258                 return m;
00259         }
00260 
00261         Vector<double>& SqrtI(Vector<double>& m)
00262         {
00263                 vdSqrt(m.Length(), m.Data(), m.Data());
00264                 return m;
00265         }
00266 
00267         Matrix<float>& SqrtI(Matrix<float>& m)
00268         {
00269                 vsSqrt(m.Length(), m.Data(), m.Data());
00270                 return m;
00271         }
00272 
00273         Matrix<double>& SqrtI(Matrix<double>& m)
00274         {
00275                 vdSqrt(m.Length(), m.Data(), m.Data());
00276                 return m;
00277         }
00278 
00279 
00280         // Inverse Square root of elements
00281         Vector<float> InvSqrt(Vector<float>& m)
00282         {
00283                 Vector<float> temp(m.Length());
00284                 vsInvSqrt(m.Length(), m.Data(), temp.Data());
00285                 return temp;
00286         }
00287 
00288         Vector<double> InvSqrt(Vector<double>& m)
00289         {
00290                 Vector<double> temp(m.Length());
00291                 vdInvSqrt(m.Length(), m.Data(), temp.Data());
00292                 return temp;
00293         }
00294 
00295         Matrix<float> InvSqrt(Matrix<float>& m)
00296         {
00297                 Matrix<float> temp(m.Rows(), m.Columns());
00298                 vsInvSqrt(m.Length(), m.Data(), temp.Data());
00299                 return temp;
00300         }
00301 
00302         Matrix<double> InvSqrt(Matrix<double>& m)
00303         {
00304                 Matrix<double> temp(m.Rows(), m.Columns());
00305                 vdInvSqrt(m.Length(), m.Data(), temp.Data());
00306                 return temp;
00307         }
00308 
00309 
00310         Vector<float>& InvSqrtI(Vector<float>& m)
00311         {
00312                 vsInvSqrt(m.Length(), m.Data(), m.Data());
00313                 return m;
00314         }
00315 
00316         Vector<double>& InvSqrtI(Vector<double>& m)
00317         {
00318                 vdInvSqrt(m.Length(), m.Data(), m.Data());
00319                 return m;
00320         }
00321 
00322         Matrix<float>& InvSqrtI(Matrix<float>& m)
00323         {
00324                 vsInvSqrt(m.Length(), m.Data(), m.Data());
00325                 return m;
00326         }
00327 
00328         Matrix<double>& InvSqrtI(Matrix<double>& m)
00329         {
00330                 vdInvSqrt(m.Length(), m.Data(), m.Data());
00331                 return m;
00332         }
00333 
00334 
00335         // Cube root of elements
00336         Vector<float> Cbrt(Vector<float>& m)
00337         {
00338                 Vector<float> temp(m.Length());
00339                 vsCbrt(m.Length(), m.Data(), temp.Data());
00340                 return temp;
00341         }
00342         
00343         Vector<double> Cbrt(Vector<double>& m)
00344         {
00345                 Vector<double> temp(m.Length());
00346                 vdCbrt(m.Length(), m.Data(), temp.Data());
00347                 return temp;
00348         }
00349         
00350         Matrix<float> Cbrt(Matrix<float>& m)
00351         {
00352                 Matrix<float> temp(m.Rows(), m.Columns());
00353                 vsCbrt(m.Length(), m.Data(), temp.Data());
00354                 return temp;
00355         }
00356         
00357         Matrix<double> Cbrt(Matrix<double>& m)
00358         {
00359                 Matrix<double> temp(m.Rows(), m.Columns());
00360                 vdCbrt(m.Length(), m.Data(), temp.Data());
00361                 return temp;
00362         }
00363         
00364         
00365         Vector<float>& CbrtI(Vector<float>& m)
00366         {
00367                 vsCbrt(m.Length(), m.Data(), m.Data());
00368                 return m;
00369         }
00370         
00371         Vector<double>& CbrtI(Vector<double>& m)
00372         {
00373                 vdCbrt(m.Length(), m.Data(), m.Data());
00374                 return m;
00375         }
00376         
00377         Matrix<float>& CbrtI(Matrix<float>& m)
00378         {
00379                 vsCbrt(m.Length(), m.Data(), m.Data());
00380                 return m;
00381         }
00382         
00383         Matrix<double>& CbrtI(Matrix<double>& m)
00384         {
00385                 vdCbrt(m.Length(), m.Data(), m.Data());
00386                 return m;
00387         }
00388         
00389 
00390         // Cube root of elements
00391         Vector<float> InvCbrt(Vector<float>& m)
00392         {
00393                 Vector<float> temp(m.Length());
00394                 vsInvCbrt(m.Length(), m.Data(), temp.Data());
00395                 return temp;
00396         }
00397         
00398         Vector<double> InvCbrt(Vector<double>& m)
00399         {
00400                 Vector<double> temp(m.Length());
00401                 vdInvCbrt(m.Length(), m.Data(), temp.Data());
00402                 return temp;
00403         }
00404         
00405         Matrix<float> InvCbrt(Matrix<float>& m)
00406         {
00407                 Matrix<float> temp(m.Rows(), m.Columns());
00408                 vsInvCbrt(m.Length(), m.Data(), temp.Data());
00409                 return temp;
00410         }
00411         
00412         Matrix<double> InvCbrt(Matrix<double>& m)
00413         {
00414                 Matrix<double> temp(m.Rows(), m.Columns());
00415                 vdInvCbrt(m.Length(), m.Data(), temp.Data());
00416                 return temp;
00417         }
00418         
00419         
00420         Vector<float>& InvCbrtI(Vector<float>& m)
00421         {
00422                 vsInvCbrt(m.Length(), m.Data(), m.Data());
00423                 return m;
00424         }
00425         
00426         Vector<double>& InvCbrtI(Vector<double>& m)
00427         {
00428                 vdInvCbrt(m.Length(), m.Data(), m.Data());
00429                 return m;
00430         }
00431         
00432         Matrix<float>& InvCbrtI(Matrix<float>& m)
00433         {
00434                 vsInvCbrt(m.Length(), m.Data(), m.Data());
00435                 return m;
00436         }
00437         
00438         Matrix<double>& InvCbrtI(Matrix<double>& m)
00439         {
00440                 vdInvCbrt(m.Length(), m.Data(), m.Data());
00441                 return m;
00442         }
00443         
00444         
00445         // Pow of elements
00446         Vector<float> Pow(Vector<float>& m1, Vector<float>& m2)
00447         {
00448                 if(m1.Length() != m2.Length())
00449                 {
00450                         cerr << "Line: " << __LINE__ << " File: " << __FILE__ << endl;
00451                         Utility::RunTimeError("Vector lengths are not the same!");
00452                 }
00453                 
00454                 Vector<float> temp(m1.Length());
00455                 vsPow(m1.Length(), m1.Data(), m2.Data(), temp.Data());
00456                 return temp;
00457         }
00458         
00459         Vector<double> Pow(Vector<double>& m1, Vector<double>& m2)
00460         {
00461                 if(m1.Length() != m2.Length())
00462                 {
00463                         cerr << "Line: " << __LINE__ << " File: " << __FILE__ << endl;
00464                         Utility::RunTimeError("Vector lengths are not the same!");
00465                 }
00466                 
00467                 Vector<double> temp(m1.Length());
00468                 vdPow(m1.Length(), m1.Data(), m2.Data(), temp.Data());
00469                 return temp;
00470         }
00471         
00472         Matrix<float> Pow(Matrix<float>& m1, Matrix<float>& m2)
00473         {
00474                 if(m1.Rows() != m2.Rows() || m1.Columns() != m2.Columns())
00475                 {
00476                         cerr << "Line: " << __LINE__ << " File: " << __FILE__ << endl;
00477                         Utility::RunTimeError("Matrix dimensions does not match!");
00478                 }
00479                 
00480                 Matrix<float> temp(m1.Rows(), m1.Columns());
00481                 vsPow(m1.Length(), m1.Data(), m2.Data(), temp.Data());
00482                 return temp;
00483         }
00484         
00485         Matrix<double> Pow(Matrix<double>& m1, Matrix<double>& m2)
00486         {
00487                 if(m1.Rows() != m2.Rows() || m1.Columns() != m2.Columns())
00488                 {
00489                         cerr << "Line: " << __LINE__ << " File: " << __FILE__ << endl;
00490                         Utility::RunTimeError("Matrix dimensions does not match!");
00491                 }
00492                 
00493                 Matrix<double> temp(m1.Rows(), m1.Columns());
00494                 vdPow(m1.Length(), m1.Data(), m2.Data(), temp.Data());
00495                 return temp;
00496         }
00497         
00498         
00499         Vector<float>& PowI(Vector<float>& m1, Vector<float>& m2)
00500         {
00501                 if(m1.Length() != m2.Length())
00502                 {
00503                         cerr << "Line: " << __LINE__ << " File: " << __FILE__ << endl;
00504                         Utility::RunTimeError("Vector lengths are not the same!");
00505                 }
00506                 
00507                 vsPow(m1.Length(), m1.Data(), m2.Data(), m1.Data());
00508                 return m1;
00509         }
00510         
00511         Vector<double>& PowI(Vector<double>& m1, Vector<double>& m2)
00512         {
00513                 if(m1.Length() != m2.Length())
00514                 {
00515                         cerr << "Line: " << __LINE__ << " File: " << __FILE__ << endl;
00516                         Utility::RunTimeError("Vector lengths are not the same!");
00517                 }
00518                 
00519                 vdPow(m1.Length(), m1.Data(), m2.Data(), m1.Data());
00520                 return m1;
00521         }
00522         
00523         Matrix<float>& PowI(Matrix<float>& m1, Matrix<float>& m2)
00524         {
00525                 if(m1.Rows() != m2.Rows() || m1.Columns() != m2.Columns())
00526                 {
00527                         cerr << "Line: " << __LINE__ << " File: " << __FILE__ << endl;
00528                         Utility::RunTimeError("Matrix dimensions does not match!");
00529                 }
00530                 
00531                 vsPow(m1.Length(), m1.Data(), m2.Data(), m1.Data());
00532                 return m1;
00533         }
00534         
00535         Matrix<double>& PowI(Matrix<double>& m1, Matrix<double>& m2)
00536         {
00537                 if(m1.Rows() != m2.Rows() || m1.Columns() != m2.Columns())
00538                 {
00539                         cerr << "Line: " << __LINE__ << " File: " << __FILE__ << endl;
00540                         Utility::RunTimeError("Matrix dimensions does not match!");
00541                 }
00542                 
00543                 vdPow(m1.Length(), m1.Data(), m2.Data(), m1.Data());
00544                 return m1;
00545         }
00546         
00547         
00548         // Pow of vector elements to a constant
00549         Vector<float> Powx(Vector<float>& m1, const float m2)
00550         {
00551                 Vector<float> temp(m1.Length());
00552                 vsPowx(m1.Length(), m1.Data(), m2, temp.Data());
00553                 return temp;
00554         }
00555         
00556         Vector<double> Powx(Vector<double>& m1, const double m2)
00557         {
00558                 Vector<double> temp(m1.Length());
00559                 vdPowx(m1.Length(), m1.Data(), m2, temp.Data());
00560                 return temp;
00561         }
00562         
00563         Matrix<float> Powx(Matrix<float>& m1, const float m2)
00564         {
00565                 Matrix<float> temp(m1.Rows(), m1.Columns());
00566                 vsPowx(m1.Length(), m1.Data(), m2, temp.Data());
00567                 return temp;
00568         }
00569         
00570         Matrix<double> Powx(Matrix<double>& m1, const double m2)
00571         {
00572                 Matrix<double> temp(m1.Rows(), m1.Columns());
00573                 vdPowx(m1.Length(), m1.Data(), m2, temp.Data());
00574                 return temp;
00575         }
00576         
00577         
00578         Vector<float>& PowxI(Vector<float>& m1, const float m2)
00579         {
00580                 vsPowx(m1.Length(), m1.Data(), m2, m1.Data());
00581                 return m1;
00582         }
00583         
00584         Vector<double>& PowxI(Vector<double>& m1, const double m2)
00585         {
00586                 vdPowx(m1.Length(), m1.Data(), m2, m1.Data());
00587                 return m1;
00588         }
00589         
00590         Matrix<float>& PowxI(Matrix<float>& m1, const float m2)
00591         {
00592                 vsPowx(m1.Length(), m1.Data(), m2, m1.Data());
00593                 return m1;
00594         }
00595         
00596         Matrix<double>& PowxI(Matrix<double>& m1, const double m2)
00597         {
00598                 vdPowx(m1.Length(), m1.Data(), m2, m1.Data());
00599                 return m1;
00600         }
00601         
00602         
00603         
00604         
00605         // Exponent of elements
00606         Vector<float> Exp(Vector<float>& m)
00607         {
00608                 Vector<float> temp(m.Length());
00609                 vsExp(m.Length(), m.Data(), temp.Data());
00610                 return temp;
00611         }
00612         
00613         Vector<double> Exp(Vector<double>& m)
00614         {
00615                 Vector<double> temp(m.Length());
00616                 vdExp(m.Length(), m.Data(), temp.Data());
00617                 return temp;
00618         }
00619         
00620         Matrix<float> Exp(Matrix<float>& m)
00621         {
00622                 Matrix<float> temp(m.Rows(), m.Columns());
00623                 vsExp(m.Length(), m.Data(), temp.Data());
00624                 return temp;
00625         }
00626         
00627         Matrix<double> Exp(Matrix<double>& m)
00628         {
00629                 Matrix<double> temp(m.Rows(), m.Columns());
00630                 vdExp(m.Length(), m.Data(), temp.Data());
00631                 return temp;
00632         }
00633         
00634         
00635         Vector<float>& ExpI(Vector<float>& m)
00636         {
00637                 vsExp(m.Length(), m.Data(), m.Data());
00638                 return m;
00639         }
00640         
00641         Vector<double>& ExpI(Vector<double>& m)
00642         {
00643                 vdExp(m.Length(), m.Data(), m.Data());
00644                 return m;
00645         }
00646         
00647         Matrix<float>& ExpI(Matrix<float>& m)
00648         {
00649                 vsExp(m.Length(), m.Data(), m.Data());
00650                 return m;
00651         }
00652         
00653         Matrix<double>& ExpI(Matrix<double>& m)
00654         {
00655                 vdExp(m.Length(), m.Data(), m.Data());
00656                 return m;
00657         }
00658         
00659         
00660         
00661         // Ln of elements
00662         Vector<float> Ln(Vector<float>& m)
00663         {
00664                 Vector<float> temp(m.Length());
00665                 vsLn(m.Length(), m.Data(), temp.Data());
00666                 return temp;
00667         }
00668         
00669         Vector<double> Ln(Vector<double>& m)
00670         {
00671                 Vector<double> temp(m.Length());
00672                 vdLn(m.Length(), m.Data(), temp.Data());
00673                 return temp;
00674         }
00675         
00676         Matrix<float> Ln(Matrix<float>& m)
00677         {
00678                 Matrix<float> temp(m.Rows(), m.Columns());
00679                 vsLn(m.Length(), m.Data(), temp.Data());
00680                 return temp;
00681         }
00682         
00683         Matrix<double> Ln(Matrix<double>& m)
00684         {
00685                 Matrix<double> temp(m.Rows(), m.Columns());
00686                 vdLn(m.Length(), m.Data(), temp.Data());
00687                 return temp;
00688         }
00689         
00690         
00691         Vector<float>& LnI(Vector<float>& m)
00692         {
00693                 vsLn(m.Length(), m.Data(), m.Data());
00694                 return m;
00695         }
00696         
00697         Vector<double>& LnI(Vector<double>& m)
00698         {
00699                 vdLn(m.Length(), m.Data(), m.Data());
00700                 return m;
00701         }
00702         
00703         Matrix<float>& LnI(Matrix<float>& m)
00704         {
00705                 vsLn(m.Length(), m.Data(), m.Data());
00706                 return m;
00707         }
00708         
00709         Matrix<double>& LnI(Matrix<double>& m)
00710         {
00711                 vdLn(m.Length(), m.Data(), m.Data());
00712                 return m;
00713         }
00714         
00715         
00716         // Log10 of elements
00717         Vector<float> Log10(Vector<float>& m)
00718         {
00719                 Vector<float> temp(m.Length());
00720                 vsLog10(m.Length(), m.Data(), temp.Data());
00721                 return temp;
00722         }
00723         
00724         Vector<double> Log10(Vector<double>& m)
00725         {
00726                 Vector<double> temp(m.Length());
00727                 vdLog10(m.Length(), m.Data(), temp.Data());
00728                 return temp;
00729         }
00730         
00731         Matrix<float> Log10(Matrix<float>& m)
00732         {
00733                 Matrix<float> temp(m.Rows(), m.Columns());
00734                 vsLog10(m.Length(), m.Data(), temp.Data());
00735                 return temp;
00736         }
00737         
00738         Matrix<double> Log10(Matrix<double>& m)
00739         {
00740                 Matrix<double> temp(m.Rows(), m.Columns());
00741                 vdLog10(m.Length(), m.Data(), temp.Data());
00742                 return temp;
00743         }
00744         
00745         
00746         Vector<float>& Log10I(Vector<float>& m)
00747         {
00748                 vsLog10(m.Length(), m.Data(), m.Data());
00749                 return m;
00750         }
00751         
00752         Vector<double>& Log10I(Vector<double>& m)
00753         {
00754                 vdLog10(m.Length(), m.Data(), m.Data());
00755                 return m;
00756         }
00757         
00758         Matrix<float>& Log10I(Matrix<float>& m)
00759         {
00760                 vsLog10(m.Length(), m.Data(), m.Data());
00761                 return m;
00762         }
00763         
00764         Matrix<double>& Log10I(Matrix<double>& m)
00765         {
00766                 vdLog10(m.Length(), m.Data(), m.Data());
00767                 return m;
00768         }
00769         
00770         
00771         
00772         // Cos of elements
00773         Vector<float> Cos(Vector<float>& m)
00774         {
00775                 Vector<float> temp(m.Length());
00776                 vsCos(m.Length(), m.Data(), temp.Data());
00777                 return temp;
00778         }
00779         
00780         Vector<double> Cos(Vector<double>& m)
00781         {
00782                 Vector<double> temp(m.Length());
00783                 vdCos(m.Length(), m.Data(), temp.Data());
00784                 return temp;
00785         }
00786         
00787         Matrix<float> Cos(Matrix<float>& m)
00788         {
00789                 Matrix<float> temp(m.Rows(), m.Columns());
00790                 vsCos(m.Length(), m.Data(), temp.Data());
00791                 return temp;
00792         }
00793         
00794         Matrix<double> Cos(Matrix<double>& m)
00795         {
00796                 Matrix<double> temp(m.Rows(), m.Columns());
00797                 vdCos(m.Length(), m.Data(), temp.Data());
00798                 return temp;
00799         }
00800         
00801         
00802         Vector<float>& CosI(Vector<float>& m)
00803         {
00804                 vsCos(m.Length(), m.Data(), m.Data());
00805                 return m;
00806         }
00807         
00808         Vector<double>& CosI(Vector<double>& m)
00809         {
00810                 vdCos(m.Length(), m.Data(), m.Data());
00811                 return m;
00812         }
00813         
00814         Matrix<float>& CosI(Matrix<float>& m)
00815         {
00816                 vsCos(m.Length(), m.Data(), m.Data());
00817                 return m;
00818         }
00819         
00820         Matrix<double>& CosI(Matrix<double>& m)
00821         {
00822                 vdCos(m.Length(), m.Data(), m.Data());
00823                 return m;
00824         }
00825         
00826         
00827         // Sin of elements
00828         Vector<float> Sin(Vector<float>& m)
00829         {
00830                 Vector<float> temp(m.Length());
00831                 vsSin(m.Length(), m.Data(), temp.Data());
00832                 return temp;
00833         }
00834         
00835         Vector<double> Sin(Vector<double>& m)
00836         {
00837                 Vector<double> temp(m.Length());
00838                 vdSin(m.Length(), m.Data(), temp.Data());
00839                 return temp;
00840         }
00841         
00842         Matrix<float> Sin(Matrix<float>& m)
00843         {
00844                 Matrix<float> temp(m.Rows(), m.Columns());
00845                 vsSin(m.Length(), m.Data(), temp.Data());
00846                 return temp;
00847         }
00848         
00849         Matrix<double> Sin(Matrix<double>& m)
00850         {
00851                 Matrix<double> temp(m.Rows(), m.Columns());
00852                 vdSin(m.Length(), m.Data(), temp.Data());
00853                 return temp;
00854         }
00855         
00856         
00857         Vector<float>& SinI(Vector<float>& m)
00858         {
00859                 vsSin(m.Length(), m.Data(), m.Data());
00860                 return m;
00861         }
00862         
00863         Vector<double>& SinI(Vector<double>& m)
00864         {
00865                 vdSin(m.Length(), m.Data(), m.Data());
00866                 return m;
00867         }
00868         
00869         Matrix<float>& SinI(Matrix<float>& m)
00870         {
00871                 vsSin(m.Length(), m.Data(), m.Data());
00872                 return m;
00873         }
00874         
00875         Matrix<double>& SinI(Matrix<double>& m)
00876         {
00877                 vdSin(m.Length(), m.Data(), m.Data());
00878                 return m;
00879         }
00880         
00881         
00882         // Tan of elements
00883         Vector<float> Tan(Vector<float>& m)
00884         {
00885                 Vector<float> temp(m.Length());
00886                 vsTan(m.Length(), m.Data(), temp.Data());
00887                 return temp;
00888         }
00889         
00890         Vector<double> Tan(Vector<double>& m)
00891         {
00892                 Vector<double> temp(m.Length());
00893                 vdTan(m.Length(), m.Data(), temp.Data());
00894                 return temp;
00895         }
00896         
00897         Matrix<float> Tan(Matrix<float>& m)
00898         {
00899                 Matrix<float> temp(m.Rows(), m.Columns());
00900                 vsTan(m.Length(), m.Data(), temp.Data());
00901                 return temp;
00902         }
00903         
00904         Matrix<double> Tan(Matrix<double>& m)
00905         {
00906                 Matrix<double> temp(m.Rows(), m.Columns());
00907                 vdTan(m.Length(), m.Data(), temp.Data());
00908                 return temp;
00909         }
00910         
00911         
00912         Vector<float>& TanI(Vector<float>& m)
00913         {
00914                 vsTan(m.Length(), m.Data(), m.Data());
00915                 return m;
00916         }
00917         
00918         Vector<double>& TanI(Vector<double>& m)
00919         {
00920                 vdTan(m.Length(), m.Data(), m.Data());
00921                 return m;
00922         }
00923         
00924         Matrix<float>& TanI(Matrix<float>& m)
00925         {
00926                 vsTan(m.Length(), m.Data(), m.Data());
00927                 return m;
00928         }
00929         
00930         Matrix<double>& TanI(Matrix<double>& m)
00931         {
00932                 vdTan(m.Length(), m.Data(), m.Data());
00933                 return m;
00934         }
00935         
00936         
00937         // Acos of elements
00938         Vector<float> Acos(Vector<float>& m)
00939         {
00940                 Vector<float> temp(m.Length());
00941                 vsAcos(m.Length(), m.Data(), temp.Data());
00942                 return temp;
00943         }
00944         
00945         Vector<double> Acos(Vector<double>& m)
00946         {
00947                 Vector<double> temp(m.Length());
00948                 vdAcos(m.Length(), m.Data(), temp.Data());
00949                 return temp;
00950         }
00951         
00952         Matrix<float> Acos(Matrix<float>& m)
00953         {
00954                 Matrix<float> temp(m.Rows(), m.Columns());
00955                 vsAcos(m.Length(), m.Data(), temp.Data());
00956                 return temp;
00957         }
00958         
00959         Matrix<double> Acos(Matrix<double>& m)
00960         {
00961                 Matrix<double> temp(m.Rows(), m.Columns());
00962                 vdAcos(m.Length(), m.Data(), temp.Data());
00963                 return temp;
00964         }
00965         
00966         
00967         Vector<float>& AcosI(Vector<float>& m)
00968         {
00969                 vsAcos(m.Length(), m.Data(), m.Data());
00970                 return m;
00971         }
00972         
00973         Vector<double>& AcosI(Vector<double>& m)
00974         {
00975                 vdAcos(m.Length(), m.Data(), m.Data());
00976                 return m;
00977         }
00978         
00979         Matrix<float>& AcosI(Matrix<float>& m)
00980         {
00981                 vsAcos(m.Length(), m.Data(), m.Data());
00982                 return m;
00983         }
00984         
00985         Matrix<double>& AcosI(Matrix<double>& m)
00986         {
00987                 vdAcos(m.Length(), m.Data(), m.Data());
00988                 return m;
00989         }
00990         
00991         
00992         // Asin of elements
00993         Vector<float> Asin(Vector<float>& m)
00994         {
00995                 Vector<float> temp(m.Length());
00996                 vsAsin(m.Length(), m.Data(), temp.Data());
00997                 return temp;
00998         }
00999         
01000         Vector<double> Asin(Vector<double>& m)
01001         {
01002                 Vector<double> temp(m.Length());
01003                 vdAsin(m.Length(), m.Data(), temp.Data());
01004                 return temp;
01005         }
01006         
01007         Matrix<float> Asin(Matrix<float>& m)
01008         {
01009                 Matrix<float> temp(m.Rows(), m.Columns());
01010                 vsAsin(m.Length(), m.Data(), temp.Data());
01011                 return temp;
01012         }
01013         
01014         Matrix<double> Asin(Matrix<double>& m)
01015         {
01016                 Matrix<double> temp(m.Rows(), m.Columns());
01017                 vdAsin(m.Length(), m.Data(), temp.Data());
01018                 return temp;
01019         }
01020         
01021         
01022         Vector<float>& AsinI(Vector<float>& m)
01023         {
01024                 vsAsin(m.Length(), m.Data(), m.Data());
01025                 return m;
01026         }
01027         
01028         Vector<double>& AsinI(Vector<double>& m)
01029         {
01030                 vdAsin(m.Length(), m.Data(), m.Data());
01031                 return m;
01032         }
01033         
01034         Matrix<float>& AsinI(Matrix<float>& m)
01035         {
01036                 vsAsin(m.Length(), m.Data(), m.Data());
01037                 return m;
01038         }
01039         
01040         Matrix<double>& AsinI(Matrix<double>& m)
01041         {
01042                 vdAsin(m.Length(), m.Data(), m.Data());
01043                 return m;
01044         }
01045         
01046         
01047         // Atan of elements
01048         Vector<float> Atan(Vector<float>& m)
01049         {
01050                 Vector<float> temp(m.Length());
01051                 vsAtan(m.Length(), m.Data(), temp.Data());
01052                 return temp;
01053         }
01054         
01055         Vector<double> Atan(Vector<double>& m)
01056         {
01057                 Vector<double> temp(m.Length());
01058                 vdAtan(m.Length(), m.Data(), temp.Data());
01059                 return temp;
01060         }
01061         
01062         Matrix<float> Atan(Matrix<float>& m)
01063         {
01064                 Matrix<float> temp(m.Rows(), m.Columns());
01065                 vsAtan(m.Length(), m.Data(), temp.Data());
01066                 return temp;
01067         }
01068         
01069         Matrix<double> Atan(Matrix<double>& m)
01070         {
01071                 Matrix<double> temp(m.Rows(), m.Columns());
01072                 vdAtan(m.Length(), m.Data(), temp.Data());
01073                 return temp;
01074         }
01075         
01076         
01077         Vector<float>& AtanI(Vector<float>& m)
01078         {
01079                 vsAtan(m.Length(), m.Data(), m.Data());
01080                 return m;
01081         }
01082         
01083         Vector<double>& AtanI(Vector<double>& m)
01084         {
01085                 vdAtan(m.Length(), m.Data(), m.Data());
01086                 return m;
01087         }
01088         
01089         Matrix<float>& AtanI(Matrix<float>& m)
01090         {
01091                 vsAtan(m.Length(), m.Data(), m.Data());
01092                 return m;
01093         }
01094         
01095         Matrix<double>& AtanI(Matrix<double>& m)
01096         {
01097                 vdAtan(m.Length(), m.Data(), m.Data());
01098                 return m;
01099         }
01100         
01101         
01102         // Atan2 of elements
01103         Vector<float> Atan2(Vector<float>& m1, Vector<float>& m2)
01104         {
01105                 if(m1.Length() != m2.Length())
01106                 {
01107                         cerr << "Line: " << __LINE__ << " File: " << __FILE__ << endl;
01108                         Utility::RunTimeError("Vector lengths are not the same!");
01109                 }
01110                 
01111                 Vector<float> temp(m1.Length());
01112                 vsAtan2(m1.Length(), m1.Data(), m2.Data(), temp.Data());
01113                 return temp;
01114         }
01115         
01116         Vector<double> Atan2(Vector<double>& m1, Vector<double>& m2)
01117         {
01118                 if(m1.Length() != m2.Length())
01119                 {
01120                         cerr << "Line: " << __LINE__ << " File: " << __FILE__ << endl;
01121                         Utility::RunTimeError("Vector lengths are not the same!");
01122                 }
01123                 
01124                 Vector<double> temp(m1.Length());
01125                 vdAtan2(m1.Length(), m1.Data(), m2.Data(), temp.Data());
01126                 return temp;
01127         }
01128         
01129         Matrix<float> Atan2(Matrix<float>& m1, Matrix<float>& m2)
01130         {
01131                 if(m1.Rows() != m2.Rows() || m1.Columns() != m2.Columns())
01132                 {
01133                         cerr << "Line: " << __LINE__ << " File: " << __FILE__ << endl;
01134                         Utility::RunTimeError("Matrix dimensions does not match!");
01135                 }
01136                 
01137                 Matrix<float> temp(m1.Rows(), m1.Columns());
01138                 vsAtan2(m1.Length(), m1.Data(), m2.Data(), temp.Data());
01139                 return temp;
01140         }
01141         
01142         Matrix<double> Atan2(Matrix<double>& m1, Matrix<double>& m2)
01143         {
01144                 if(m1.Rows() != m2.Rows() || m1.Columns() != m2.Columns())
01145                 {
01146                         cerr << "Line: " << __LINE__ << " File: " << __FILE__ << endl;
01147                         Utility::RunTimeError("Matrix dimensions does not match!");
01148                 }
01149                 
01150                 Matrix<double> temp(m1.Rows(), m1.Columns());
01151                 vdAtan2(m1.Length(), m1.Data(), m2.Data(), temp.Data());
01152                 return temp;
01153         }
01154         
01155         
01156         Vector<float>& Atan2I(Vector<float>& m1, Vector<float>& m2)
01157         {
01158                 if(m1.Length() != m2.Length())
01159                 {
01160                         cerr << "Line: " << __LINE__ << " File: " << __FILE__ << endl;
01161                         Utility::RunTimeError("Vector lengths are not the same!");
01162                 }
01163                 
01164                 vsAtan2(m1.Length(), m1.Data(), m2.Data(), m1.Data());
01165                 return m1;
01166         }
01167         
01168         Vector<double>& Atan2I(Vector<double>& m1, Vector<double>& m2)
01169         {
01170                 if(m1.Length() != m2.Length())
01171                 {
01172                         cerr << "Line: " << __LINE__ << " File: " << __FILE__ << endl;
01173                         Utility::RunTimeError("Vector lengths are not the same!");
01174                 }
01175                 
01176                 vdAtan2(m1.Length(), m1.Data(), m2.Data(), m1.Data());
01177                 return m1;
01178         }
01179         
01180         Matrix<float>& Atan2I(Matrix<float>& m1, Matrix<float>& m2)
01181         {
01182                 if(m1.Rows() != m2.Rows() || m1.Columns() != m2.Columns())
01183                 {
01184                         cerr << "Line: " << __LINE__ << " File: " << __FILE__ << endl;
01185                         Utility::RunTimeError("Matrix dimensions does not match!");
01186                 }
01187                 
01188                 vsAtan2(m1.Length(), m1.Data(), m2.Data(), m1.Data());
01189                 return m1;
01190         }
01191         
01192         Matrix<double>& Atan2I(Matrix<double>& m1, Matrix<double>& m2)
01193         {
01194                 if(m1.Rows() != m2.Rows() || m1.Columns() != m2.Columns())
01195                 {
01196                         cerr << "Line: " << __LINE__ << " File: " << __FILE__ << endl;
01197                         Utility::RunTimeError("Matrix dimensions does not match!");
01198                 }
01199                 
01200                 vdAtan2(m1.Length(), m1.Data(), m2.Data(), m1.Data());
01201                 return m1;
01202         }
01203         
01204         
01205         
01206         
01207         // Cosh of elements
01208         Vector<float> Cosh(Vector<float>& m)
01209         {
01210                 Vector<float> temp(m.Length());
01211                 vsCosh(m.Length(), m.Data(), temp.Data());
01212                 return temp;
01213         }
01214         
01215         Vector<double> Cosh(Vector<double>& m)
01216         {
01217                 Vector<double> temp(m.Length());
01218                 vdCosh(m.Length(), m.Data(), temp.Data());
01219                 return temp;
01220         }
01221         
01222         Matrix<float> Cosh(Matrix<float>& m)
01223         {
01224                 Matrix<float> temp(m.Rows(), m.Columns());
01225                 vsCosh(m.Length(), m.Data(), temp.Data());
01226                 return temp;
01227         }
01228         
01229         Matrix<double> Cosh(Matrix<double>& m)
01230         {
01231                 Matrix<double> temp(m.Rows(), m.Columns());
01232                 vdCosh(m.Length(), m.Data(), temp.Data());
01233                 return temp;
01234         }
01235         
01236         
01237         Vector<float>& CoshI(Vector<float>& m)
01238         {
01239                 vsCosh(m.Length(), m.Data(), m.Data());
01240                 return m;
01241         }
01242         
01243         Vector<double>& CoshI(Vector<double>& m)
01244         {
01245                 vdCosh(m.Length(), m.Data(), m.Data());
01246                 return m;
01247         }
01248         
01249         Matrix<float>& CoshI(Matrix<float>& m)
01250         {
01251                 vsCosh(m.Length(), m.Data(), m.Data());
01252                 return m;
01253         }
01254         
01255         Matrix<double>& CoshI(Matrix<double>& m)
01256         {
01257                 vdCosh(m.Length(), m.Data(), m.Data());
01258                 return m;
01259         }
01260         
01261         
01262         // Sinh of elements
01263         Vector<float> Sinh(Vector<float>& m)
01264         {
01265                 Vector<float> temp(m.Length());
01266                 vsSinh(m.Length(), m.Data(), temp.Data());
01267                 return temp;
01268         }
01269         
01270         Vector<double> Sinh(Vector<double>& m)
01271         {
01272                 Vector<double> temp(m.Length());
01273                 vdSinh(m.Length(), m.Data(), temp.Data());
01274                 return temp;
01275         }
01276         
01277         Matrix<float> Sinh(Matrix<float>& m)
01278         {
01279                 Matrix<float> temp(m.Rows(), m.Columns());
01280                 vsSinh(m.Length(), m.Data(), temp.Data());
01281                 return temp;
01282         }
01283         
01284         Matrix<double> Sinh(Matrix<double>& m)
01285         {
01286                 Matrix<double> temp(m.Rows(), m.Columns());
01287                 vdSinh(m.Length(), m.Data(), temp.Data());
01288                 return temp;
01289         }
01290         
01291         
01292         Vector<float>& SinhI(Vector<float>& m)
01293         {
01294                 vsSinh(m.Length(), m.Data(), m.Data());
01295                 return m;
01296         }
01297         
01298         Vector<double>& SinhI(Vector<double>& m)
01299         {
01300                 vdSinh(m.Length(), m.Data(), m.Data());
01301                 return m;
01302         }
01303         
01304         Matrix<float>& SinhI(Matrix<float>& m)
01305         {
01306                 vsSinh(m.Length(), m.Data(), m.Data());
01307                 return m;
01308         }
01309         
01310         Matrix<double>& SinhI(Matrix<double>& m)
01311         {
01312                 vdSinh(m.Length(), m.Data(), m.Data());
01313                 return m;
01314         }
01315         
01316         
01317         // Tanh of elements
01318         Vector<float> Tanh(Vector<float>& m)
01319         {
01320                 Vector<float> temp(m.Length());
01321                 vsTanh(m.Length(), m.Data(), temp.Data());
01322                 return temp;
01323         }
01324         
01325         Vector<double> Tanh(Vector<double>& m)
01326         {
01327                 Vector<double> temp(m.Length());
01328                 vdTanh(m.Length(), m.Data(), temp.Data());
01329                 return temp;
01330         }
01331         
01332         Matrix<float> Tanh(Matrix<float>& m)
01333         {
01334                 Matrix<float> temp(m.Rows(), m.Columns());
01335                 vsTanh(m.Length(), m.Data(), temp.Data());
01336                 return temp;
01337         }
01338         
01339         Matrix<double> Tanh(Matrix<double>& m)
01340         {
01341                 Matrix<double> temp(m.Rows(), m.Columns());
01342                 vdTanh(m.Length(), m.Data(), temp.Data());
01343                 return temp;
01344         }
01345         
01346         
01347         Vector<float>& TanhI(Vector<float>& m)
01348         {
01349                 vsTanh(m.Length(), m.Data(), m.Data());
01350                 return m;
01351         }
01352         
01353         Vector<double>& TanhI(Vector<double>& m)
01354         {
01355                 vdTanh(m.Length(), m.Data(), m.Data());
01356                 return m;
01357         }
01358         
01359         Matrix<float>& TanhI(Matrix<float>& m)
01360         {
01361                 vsTanh(m.Length(), m.Data(), m.Data());
01362                 return m;
01363         }
01364         
01365         Matrix<double>& TanhI(Matrix<double>& m)
01366         {
01367                 vdTanh(m.Length(), m.Data(), m.Data());
01368                 return m;
01369         }
01370         
01371         
01372         // Acosh of elements
01373         Vector<float> Acosh(Vector<float>& m)
01374         {
01375                 Vector<float> temp(m.Length());
01376                 vsAcosh(m.Length(), m.Data(), temp.Data());
01377                 return temp;
01378         }
01379         
01380         Vector<double> Acosh(Vector<double>& m)
01381         {
01382                 Vector<double> temp(m.Length());
01383                 vdAcosh(m.Length(), m.Data(), temp.Data());
01384                 return temp;
01385         }
01386         
01387         Matrix<float> Acosh(Matrix<float>& m)
01388         {
01389                 Matrix<float> temp(m.Rows(), m.Columns());
01390                 vsAcosh(m.Length(), m.Data(), temp.Data());
01391                 return temp;
01392         }
01393         
01394         Matrix<double> Acosh(Matrix<double>& m)
01395         {
01396                 Matrix<double> temp(m.Rows(), m.Columns());
01397                 vdAcosh(m.Length(), m.Data(), temp.Data());
01398                 return temp;
01399         }
01400         
01401         
01402         Vector<float>& AcoshI(Vector<float>& m)
01403         {
01404                 vsAcosh(m.Length(), m.Data(), m.Data());
01405                 return m;
01406         }
01407         
01408         Vector<double>& AcoshI(Vector<double>& m)
01409         {
01410                 vdAcosh(m.Length(), m.Data(), m.Data());
01411                 return m;
01412         }
01413         
01414         Matrix<float>& AcoshI(Matrix<float>& m)
01415         {
01416                 vsAcosh(m.Length(), m.Data(), m.Data());
01417                 return m;
01418         }
01419         
01420         Matrix<double>& AcoshI(Matrix<double>& m)
01421         {
01422                 vdAcosh(m.Length(), m.Data(), m.Data());
01423                 return m;
01424         }
01425         
01426         
01427         // Asinh of elements
01428         Vector<float> Asinh(Vector<float>& m)
01429         {
01430                 Vector<float> temp(m.Length());
01431                 vsAsinh(m.Length(), m.Data(), temp.Data());
01432                 return temp;
01433         }
01434         
01435         Vector<double> Asinh(Vector<double>& m)
01436         {
01437                 Vector<double> temp(m.Length());
01438                 vdAsinh(m.Length(), m.Data(), temp.Data());
01439                 return temp;
01440         }
01441         
01442         Matrix<float> Asinh(Matrix<float>& m)
01443         {
01444                 Matrix<float> temp(m.Rows(), m.Columns());
01445                 vsAsinh(m.Length(), m.Data(), temp.Data());
01446                 return temp;
01447         }
01448         
01449         Matrix<double> Asinh(Matrix<double>& m)
01450         {
01451                 Matrix<double> temp(m.Rows(), m.Columns());
01452                 vdAsinh(m.Length(), m.Data(), temp.Data());
01453                 return temp;
01454         }
01455         
01456         
01457         Vector<float>& AsinhI(Vector<float>& m)
01458         {
01459                 vsAsinh(m.Length(), m.Data(), m.Data());
01460                 return m;
01461         }
01462         
01463         Vector<double>& AsinhI(Vector<double>& m)
01464         {
01465                 vdAsinh(m.Length(), m.Data(), m.Data());
01466                 return m;
01467         }
01468         
01469         Matrix<float>& AsinhI(Matrix<float>& m)
01470         {
01471                 vsAsinh(m.Length(), m.Data(), m.Data());
01472                 return m;
01473         }
01474         
01475         Matrix<double>& AsinhI(Matrix<double>& m)
01476         {
01477                 vdAsinh(m.Length(), m.Data(), m.Data());
01478                 return m;
01479         }
01480         
01481         
01482         // Atanh of elements
01483         Vector<float> Atanh(Vector<float>& m)
01484         {
01485                 Vector<float> temp(m.Length());
01486                 vsAtanh(m.Length(), m.Data(), temp.Data());
01487                 return temp;
01488         }
01489         
01490         Vector<double> Atanh(Vector<double>& m)
01491         {
01492                 Vector<double> temp(m.Length());
01493                 vdAtanh(m.Length(), m.Data(), temp.Data());
01494                 return temp;
01495         }
01496         
01497         Matrix<float> Atanh(Matrix<float>& m)
01498         {
01499                 Matrix<float> temp(m.Rows(), m.Columns());
01500                 vsAtanh(m.Length(), m.Data(), temp.Data());
01501                 return temp;
01502         }
01503         
01504         Matrix<double> Atanh(Matrix<double>& m)
01505         {
01506                 Matrix<double> temp(m.Rows(), m.Columns());
01507                 vdAtanh(m.Length(), m.Data(), temp.Data());
01508                 return temp;
01509         }
01510         
01511         
01512         Vector<float>& AtanhI(Vector<float>& m)
01513         {
01514                 vsAtanh(m.Length(), m.Data(), m.Data());
01515                 return m;
01516         }
01517         
01518         Vector<double>& AtanhI(Vector<double>& m)
01519         {
01520                 vdAtanh(m.Length(), m.Data(), m.Data());
01521                 return m;
01522         }
01523         
01524         Matrix<float>& AtanhI(Matrix<float>& m)
01525         {
01526                 vsAtanh(m.Length(), m.Data(), m.Data());
01527                 return m;
01528         }
01529         
01530         Matrix<double>& AtanhI(Matrix<double>& m)
01531         {
01532                 vdAtanh(m.Length(), m.Data(), m.Data());
01533                 return m;
01534         }
01535         
01536         
01537         
01538         // Erf of elements
01539         Vector<float> Erf(Vector<float>& m)
01540         {
01541                 Vector<float> temp(m.Length());
01542                 vsErf(m.Length(), m.Data(), temp.Data());
01543                 return temp;
01544         }
01545         
01546         Vector<double> Erf(Vector<double>& m)
01547         {
01548                 Vector<double> temp(m.Length());
01549                 vdErf(m.Length(), m.Data(), temp.Data());
01550                 return temp;
01551         }
01552         
01553         Matrix<float> Erf(Matrix<float>& m)
01554         {
01555                 Matrix<float> temp(m.Rows(), m.Columns());
01556                 vsErf(m.Length(), m.Data(), temp.Data());
01557                 return temp;
01558         }
01559         
01560         Matrix<double> Erf(Matrix<double>& m)
01561         {
01562                 Matrix<double> temp(m.Rows(), m.Columns());
01563                 vdErf(m.Length(), m.Data(), temp.Data());
01564                 return temp;
01565         }
01566         
01567         
01568         Vector<float>& ErfI(Vector<float>& m)
01569         {
01570                 vsErf(m.Length(), m.Data(), m.Data());
01571                 return m;
01572         }
01573         
01574         Vector<double>& ErfI(Vector<double>& m)
01575         {
01576                 vdErf(m.Length(), m.Data(), m.Data());
01577                 return m;
01578         }
01579         
01580         Matrix<float>& ErfI(Matrix<float>& m)
01581         {
01582                 vsErf(m.Length(), m.Data(), m.Data());
01583                 return m;
01584         }
01585         
01586         Matrix<double>& ErfI(Matrix<double>& m)
01587         {
01588                 vdErf(m.Length(), m.Data(), m.Data());
01589                 return m;
01590         }
01591         
01592         
01593         // Erfc of elements
01594         Vector<float> Erfc(Vector<float>& m)
01595         {
01596                 Vector<float> temp(m.Length());
01597                 vsErfc(m.Length(), m.Data(), temp.Data());
01598                 return temp;
01599         }
01600         
01601         Vector<double> Erfc(Vector<double>& m)
01602         {
01603                 Vector<double> temp(m.Length());
01604                 vdErfc(m.Length(), m.Data(), temp.Data());
01605                 return temp;
01606         }
01607         
01608         Matrix<float> Erfc(Matrix<float>& m)
01609         {
01610                 Matrix<float> temp(m.Rows(), m.Columns());
01611                 vsErfc(m.Length(), m.Data(), temp.Data());
01612                 return temp;
01613         }
01614         
01615         Matrix<double> Erfc(Matrix<double>& m)
01616         {
01617                 Matrix<double> temp(m.Rows(), m.Columns());
01618                 vdErfc(m.Length(), m.Data(), temp.Data());
01619                 return temp;
01620         }
01621         
01622         
01623         Vector<float>& ErfcI(Vector<float>& m)
01624         {
01625                 vsErfc(m.Length(), m.Data(), m.Data());
01626                 return m;
01627         }
01628         
01629         Vector<double>& ErfcI(Vector<double>& m)
01630         {
01631                 vdErfc(m.Length(), m.Data(), m.Data());
01632                 return m;
01633         }
01634         
01635         Matrix<float>& ErfcI(Matrix<float>& m)
01636         {
01637                 vsErfc(m.Length(), m.Data(), m.Data());
01638                 return m;
01639         }
01640         
01641         Matrix<double>& ErfcI(Matrix<double>& m)
01642         {
01643                 vdErfc(m.Length(), m.Data(), m.Data());
01644                 return m;
01645         }
01646 
01647 
01648 
01649 };
01650 
01651 
01652 
01653 
01654 
01655 
01656 
01657 
01658 
01659 
01660 
01661 
01662 
01663 

Generated on Thu Jan 20 08:43:41 2005 for CIMPL by  doxygen 1.3.9.1