亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? matrix.h

?? 攝影測量專業(yè)。實(shí)現(xiàn)單像后方交會以及立體像對的前方交會。以文件形式讀取控制點(diǎn)和像點(diǎn)坐標(biāo)。
?? H
?? 第 1 頁 / 共 5 頁
字號:
/**
\file     Matrix.h
\brief    The Zenautics Matrix Class
\author   Glenn D. MacGougan (GDM)
\date     2008-09-22
\version  0.06 Beta

\b Version \b Information \n
This is the open source version (BSD license). The Professional Version
is avaiable via http://www.zenautics.com. The Professional Version
is highly optimized using SIMD and includes optimization for multi-core 
processors.

\b License \b Information \n
Copyright (c) 2008, Glenn D. MacGougan, Zenautics Technologies Inc. \n

Redistribution and use in source and binary forms, with or without
modification, of the specified files is permitted provided the following 
conditions are met: \n

- Redistributions of source code must retain the above copyright
  notice, this list of conditions and the following disclaimer. \n
- 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. \n
- The name(s) of the contributor(s) may not be used to endorse or promote 
  products derived from this software without specific prior written 
  permission. \n

THIS SOFTWARE IS PROVIDED BY THE 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.

\b NOTES: \n
This code was developed using rigourous unit testing for every function 
and operation. Despite any rigorous development process, bugs are
inevitable. Please report bugs and suggested fixes to glenn @ zenautics.com.\n

\b Preprocessor Defines \n
#define _MATRIX_NO_EXCEPTION // removes exception handling support. \n
*/

#ifndef _ZENAUTICS_MATRIX_H_
#define _ZENAUTICS_MATRIX_H_

#include <complex> // For std::complex<double> (Standard Template Library)
#include <string>  // For std::string (Standard Template Library)
#include "cmatrix.h" // The core matrix engine is written in 'c'.

//#define _MATRIX_NO_EXCEPTION // removes exception handling support if required.


namespace Zenautics
{

#ifndef _MATRIX_NO_EXCEPTION
  /**
  \class   MatrixException
  \brief   A class for exceptions thrown by the Matrix class.  
  
  The MATRIX_USE_EXCEPTION_HANDLING define enables the use of exception 
  handling using try{} catch{}. A MatrixException is thrown. The use of 
  exception handling is very highly recommended. When it is turned off, 
  the matrix will try to output a message and then call 'exit(1)'.
  
  \code
  int main()
  { 
    try
    {
      Matrix A(2,2);
      double d = A(3,1).real(); // causes an out of bounds exception
    }
    catch( MatrixException& matrix_exception )
    {
      cout << matrix_exception << endl;
    }
    catch ( ... )
    {
      cout << "Caught unknown exception" << endl;
    }
    return 0;
  }
  \endcode
  */
  class MatrixException
  {  
  public: 
    /// \brief  The constructor.
    MatrixException( const char* msg );

    /// \brief  The copy constructor.
    MatrixException(const MatrixException& matrix_exception);

    /// \brief  The destuctor.
    virtual ~MatrixException() { /* nothing needed yet */ };

    /// \brief  Return a copy of the exception message.
    std::string GetExceptionMessage();

    /// \brief  Overload the casting operator to a string.
    operator const char*();

  public:
    /// \brief  The matrix exception string.  
    std::string m_ExceptionString;

  private:
    /// \brief  The matrix exception character string.  
    char m_msg[256];    
  };
#endif


  /**
  \class   Matrix
  \brief   The matrix/vector class. 
           Both real and complex data are inherently supported.
           One and two dimensional data.
  
  The matrix class supports advanced real and complex functionality. It is
  optimized for columnwise operations. Refer to example_main.cpp for a 
  complete example program using the Matrix.
  */
  class Matrix
  {  
  public: // Constructors / Destructor

    /// \brief  This function enables or disables a global flag
    ///         that forces single element matrices to be treated
    ///         as scalars. This is enabled by default. 
    static void Treat1x1MatricesAsScalar( bool enable = true );

    /// \brief  The default constructor (no data allocated yet).
    Matrix();                                             

    /// \brief  A vector style constructor.
    ///
    /// Matrix A(nrows);  creates an nrowsx1 real 'vector'.
    /// A complex vector must be created using Matrix A(nrows,ncols,false);
    explicit Matrix(const unsigned nrows);

    /// \brief  A matrix style constructor.
    ///
    /// Matrix A(nrows,ncols); creates an nrowsxncols real 'matrix'. A real matrix is assumed.
    /// Matrix A(nrows,ncols,false); creates an nrowsxncols complex 'matrix'. A real matrix is assumed.
    Matrix(const unsigned nrows, const unsigned ncols, const bool isReal=true);

    /// \brief  The copy constructor.
    Matrix(const Matrix& mat);                          

    /// \brief  A constructor reading data from a file.
    Matrix(const char* path, bool& itWorked);

    /** \brief  A constructor initialized the matrix from a string.

    There are two general possible interpretations of the string input. \n
    
    (1) Square bracket delimited matrix. e.g. \n
    
    \code
    Matrix A = "[1 2 3; 4 5 6]"; // or 
    Matrix A = "[1, 2, 3; 4, 5, 6]";
    \endcode

    In this case '[' donates the start of a matrix and ']' denotes the end. \n
    Row vectors [1 2 3] and [4 5 6] are separated by ';'.  \n
    Commas can delimit row vector data but are not needed. \n
    Complex input: e.g. 
    
    \code
    Matrix A = "[1+1i 2+3j 1-2i; 4 5 6]"; // or
    Matrix A = "[1+1i, 2+3j, 1-2i; 4, 5, 6]";
    \endcode
    
    (2) Free form delimited matrix. e.g. \n

    \code
    Matrix A = "1 2 3 \\n 4 5 6 \\n";
    \endcode

    In this case, the newline delimits different rows of the matrix. (\\r\\n also works). \n
    Row vectors can still be delimited by ';' as well. \n
    
    \code
    Matrix B = "1 2 3; 4 5 6; \\n 7 8 9";
    \endcode 
    
    will set a 3x3 matrix == [1 2 3; 4 5 6; 7 8 9]. \n

    Commas can delimit row vector data but are not needed. \n
    Complex input: e.g. 
    
    \code
    Matrix A = "[1+1i 2+3j 1-2i\\n 4 5 6]";   // or
    Matrix A = "1+1i, 2+3j, 1-2i\\n 4, 5, 6"; // or
    Matrix A = "1+1i 2+3j 1-2i; 4, 5, 6";   
    \endcode 

    All result in A = [1+1i 2+3i 1-2i; 4 5 6]; \n
    */
    Matrix(const char* strMatrix);

    /// \brief  The constructor as a copy from a static matrix.
    Matrix(const double mat[], const unsigned nrows, const unsigned ncols=1 ); 

    /// \brief  The destructor.
    virtual ~Matrix();

    /// \brief  The assignment operator from another matrix.
    ///
    /// e.g. Matrix B; Matrix A; B = "[1 2 3; 4 5 6]"; A = B; // A == [1 2 3; 4 5 6], A is (2x3)
    Matrix& operator=(const Matrix& mat);

    /// \brief  The assignment operator from a scalar double value.
    ///
    /// e.g. Matrix A; A = 2.0; // A is (1x1).
    Matrix& operator=(const double value);

    
    /// \brief  The assignment operator from a std::complex<double> value.
    ///
    /// e.g. Matrix A; A = 2.0; // A is (1x1).
    Matrix& operator=(const std::complex<double> value);

    /**
    \brief  The assignement operator from a string matrix.   
    
    There are two general possible interpretations of the string input. \n
    
    (1) Square bracket delimited matrix. e.g. \n
    
    \code
    Matrix A;
    A = "[1 2 3; 4 5 6]"; // or 
    A = "[1, 2, 3; 4, 5, 6]";
    \endcode

    In this case '[' donates the start of a matrix and ']' denotes the end. \n
    Row vectors [1 2 3] and [4 5 6] are separated by ';'.  \n
    Commas can delimit row vector data but are not needed. \n
    Complex input: e.g. 
    
    \code
    Matrix A;
    A = "[1+1i 2+3j 1-2i; 4 5 6]"; // or
    A = "[1+1i, 2+3j, 1-2i; 4, 5, 6]";
    \endcode
    
    (2) Free form delimited matrix. e.g. \n

    \code
    Matrix A; 
    A = "1 2 3 \\n 4 5 6 \\n";
    \endcode

    In this case, the newline delimits different rows of the matrix. (\\r\\n also works). \n
    Row vectors can still be delimited by ';' as well. \n
    
    \code
    B = "1 2 3; 4 5 6; \\n 7 8 9";
    \endcode 
    
    will set a 3x3 matrix == [1 2 3; 4 5 6; 7 8 9]. \n

    Commas can delimit row vector data but are not needed. \n
    Complex input: e.g. 
    
    \code
    Matrix A;
    A = "[1+1i 2+3j 1-2i\\n 4 5 6]";   // or
    A = "1+1i, 2+3j, 1-2i\\n 4, 5, 6"; // or
    A = "1+1i 2+3j 1-2i; 4, 5, 6";   
    \endcode 

    All result in A = [1+1i 2+3i 1-2i; 4 5 6]; \n
    */
    Matrix& operator=(const char* strMatrix);

  public:

    /**
    \brief  Clear the matrix memory. Set the matrix to size 0x0.
    
    \code 
    Matrix A(10,10); // A 10 x 10 matrix
    if( !A.Clear() )
      return false;
    // A is now 0x0 
    \endcode

    \return true if successul, false if error.
    */
    bool Clear();

  public: // Matrix Qualifiers

    /// \brief  Is this matrix empty?
    bool isEmpty() const;

    /// \brief  Is the matrix mat conformal for multiplication (*this * mat)?
    bool isConformal(const Matrix& mat) const;

    /// \brief  Is this matrix the same size as mat?
    bool isSameSize(const Matrix& mat) const;  

    /// \brief  Is this a square matrix?
    bool isSquare() const;

    /// Check if this matrix is stored as a complex matrix.
    bool isStoredAsComplex();

    /// Check if this a real matrix.
    bool isReal();

    /// Check if this a complex matrix.
    bool isComplex(); 

    /// Check if this is a vector. Is the matrix either nx1 or 1xn.
    bool isVector();

    unsigned GetNrCols() const;   //!< return no. of cols
    unsigned ncols() const;       //!< return no. of cols
    unsigned GetNrElems() const;  //!< return total no. of elements
    unsigned nelems() const;      //!< return total no. of elements
    unsigned GetNrRows() const;   //!< return no. of rows         
    unsigned nrows() const;       //!< return no. of rows         
    unsigned GetLength() const;   //!< return the maximum dimension either nrows or ncols whichever is greater.


    /**
    \brief  Return the real part of the matrix at this row and column.

    \code 
    Matrix A = "2+4i";
    double a = A.real(0,0); // a is 2.0
    \endcode
    */
    double real(const unsigned row, const unsigned col);

    /**
    \brief  Return the real part of the matrix at this vector index.

    \code 
    Matrix A = "[2+4i, 10-1i]";
    double a = A.real(1); // a is 10.0
    \endcode
    */
    double real(const unsigned index);

    /**
    \brief  Return the imaginary part of the matrix at this row and column.

    \code 
    Matrix B = "2+4i";
    double b = B.imag(0); // b is 4.0
    \endcode
    */    
    double imag(const unsigned row, const unsigned col);

    /**
    \brief  Return the imaginary part of the matrix at this vector index.
    
    \code 
    Matrix B = "[2+4i, 1-10i]";
    double b = B.imag(1); // b is -10.0
    \endcode
    */    
    double imag(const unsigned index);


  public: // Input Operations

    /**
    \brief  Read the matrix from an ASCII file with the path given by the 'c' style string
    (with automatric support for many delimiters, whitespace, or ',', or ';', or many others) 
    or a compressed BINARY matrix file used in the Save function.
    Complex and real data input are supported.
    A non-numeric header line can be present which will be skipped.

    \code
    Matrix A;
    Matrix B;
    Matrix C;
    bool result;

    result = A.ReadFromFile("data.txt"); // Read an ASCII numeric data file.
    result = B.ReadFromFile("data.csv"); // Read a comma delimited numeric data file. e.g. saved from EXCEL.
    result = C.ReadFromFile("data.mtx"); // Read a compressed binary matrix (MTX format).
    \endcode
    
    \return true if successful, false otherwise
    */
    bool ReadFromFile( const char *path );
    
    /**
    \brief  Read the matrix from a file given the file path as a standard string.
    
    \code
    Matrix A;
    std::string str = "data.txt";
    if( !A.ReadFromFile(str) )
      return false;
    \endcode

    \return true if successful, false otherwise.
    */
    bool ReadFromFile( std::string path );


    /**  
    \brief  A safe function for performing a copy of another matrix.
    
    \code
    Matrix A(2,2);
    A[0][0] = 1.0;
    A[0][1] = 2.0;
    A[1][0] = 3.0;
    A[1][1] = 4.0;
    Matrix B;
    if( !B.Copy(A) )
      return false;
    \endcode
    
    \return true if successful, false otherwise
    */
    bool Copy( Matrix& src );


    /**      
    \brief  A safe function for setting the matrix from a double.
    
    \code
    double d = 10.0;
    Matrix A;
    if( !A.Copy(d) )
      return false;
    \endcode
    
    \return true if successful, false otherwise
    */
    bool Copy( const double& value );


    /**      
    \brief  A safe function for setting the matrix from a std::complex<double>.
    
    \code

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美一级专区免费大片| 久久久精品欧美丰满| 久久影院午夜片一区| 一区二区三区在线免费视频| 国产一区二区精品久久| 色综合久久综合网欧美综合网 | 久久蜜桃av一区精品变态类天堂| 国产精品美女久久久久高潮| 午夜精品久久久久久| 99re6这里只有精品视频在线观看| 在线不卡a资源高清| 亚洲乱码中文字幕综合| 国产馆精品极品| 精品免费国产二区三区| 亚洲精品免费在线| 丁香婷婷综合网| 日韩你懂的在线观看| 日韩福利电影在线| 欧美日韩美少妇| 亚洲成人免费在线| 欧美日韩中文字幕一区| youjizz国产精品| 亚洲与欧洲av电影| 粉嫩av一区二区三区在线播放| 欧美酷刑日本凌虐凌虐| 夜夜嗨av一区二区三区四季av| 懂色av一区二区三区蜜臀| 精品国产一区a| 乱中年女人伦av一区二区| 5858s免费视频成人| 亚洲一区二区av电影| 欧美亚洲国产bt| 亚洲夂夂婷婷色拍ww47| 欧美性猛交xxxx乱大交退制版| 亚洲免费高清视频在线| 日本乱码高清不卡字幕| 亚洲蜜臀av乱码久久精品 | 99免费精品在线| 亚洲国产精品成人综合色在线婷婷 | 亚洲成人自拍网| 色综合久久久久久久久久久| 亚洲视频1区2区| 97aⅴ精品视频一二三区| 亚洲男人天堂av| 欧美日韩在线免费视频| 日韩成人午夜精品| 欧美成人三级在线| 国产福利91精品一区二区三区| 日本一区二区三区四区| 99久久精品免费观看| 亚洲777理论| 精品免费国产一区二区三区四区| 岛国精品一区二区| 亚洲精品一二三| 欧美精品777| 国产精品99久久久久久久女警| 国产精品丝袜久久久久久app| 一本大道综合伊人精品热热| 亚洲va欧美va国产va天堂影院| 91精品国产高清一区二区三区蜜臀| 欧美aaaaaa午夜精品| 国产精品萝li| 欧美日韩一区高清| 国产精品一区二区91| 亚洲另类在线一区| 日韩欧美国产一区二区三区| 国产一区二区0| 亚洲精品你懂的| 欧美精品一区二区三区在线播放| 99精品国产99久久久久久白柏| 亚洲曰韩产成在线| 久久精品亚洲乱码伦伦中文| 欧美专区在线观看一区| 国产一区在线精品| 亚洲成人黄色影院| 国产欧美精品国产国产专区 | voyeur盗摄精品| 日韩国产精品大片| 国产精品高潮呻吟| 日韩欧美一区二区视频| 色综合色综合色综合| 久草热8精品视频在线观看| 亚洲免费毛片网站| 国产欧美一区二区三区沐欲| 欧美电影在哪看比较好| 99re8在线精品视频免费播放| 六月丁香婷婷久久| 午夜在线电影亚洲一区| 国产精品久久久久久久午夜片| 日韩天堂在线观看| 91成人国产精品| 不卡av电影在线播放| 激情综合色综合久久| 偷窥国产亚洲免费视频| 亚洲欧洲综合另类在线| 国产日韩欧美a| 日韩欧美色综合网站| 欧美日韩黄色影视| 日本高清不卡一区| 99精品热视频| 成人综合婷婷国产精品久久免费| 久久99最新地址| 亚洲成人自拍偷拍| 亚洲在线成人精品| 一区二区免费在线| 亚洲人成影院在线观看| 国产精品毛片久久久久久| 久久这里只有精品视频网| 亚洲成人免费观看| 成人免费视频视频| 狠狠色伊人亚洲综合成人| 免费观看在线综合色| 亚欧色一区w666天堂| 亚洲成av人片观看| 亚洲一区二区av在线| 午夜视频在线观看一区| 午夜精品福利一区二区蜜股av| 亚洲最大成人综合| 亚洲国产中文字幕在线视频综合| 亚洲精品欧美激情| 五月婷婷综合在线| 男男视频亚洲欧美| 国产综合一区二区| 国产成人午夜片在线观看高清观看| 国产精品自拍毛片| 成人免费观看视频| 91在线国内视频| 欧美色男人天堂| 91精品国产全国免费观看| 精品国产123| 国产欧美一区二区三区在线看蜜臀 | 亚洲视频一二三| 国产精品久久久久久久久晋中 | 精品国产髙清在线看国产毛片| 欧美一区二区三区视频在线| 日韩午夜激情视频| 久久亚洲综合色一区二区三区| 国产午夜亚洲精品理论片色戒| 国产精品久久一卡二卡| 亚洲美女视频在线观看| 亚洲成人www| 国产美女在线精品| 日本韩国欧美在线| 4438x成人网最大色成网站| 久久久久久久久99精品| 亚洲私人黄色宅男| 日本美女一区二区三区| 国产精品一区二区91| 在线日韩一区二区| 精品国产乱码久久| 亚洲欧美国产毛片在线| 蜜桃一区二区三区在线观看| 国产成人午夜精品5599| 亚洲香肠在线观看| 亚洲欧美日韩成人高清在线一区| 亚洲v日本v欧美v久久精品| 国产一区二区三区| 欧美在线免费播放| 久久久国产综合精品女国产盗摄| 亚洲视频免费在线观看| 激情综合网激情| 欧美少妇一区二区| 中文字幕第一区综合| 无码av中文一区二区三区桃花岛| 国产不卡免费视频| 91精品久久久久久久91蜜桃| 国产精品久久久久久久裸模| 久久精品国产99国产| 欧美性猛交xxxxxxxx| 国产精品妹子av| 国产一区二区在线视频| 欧美二区在线观看| 亚洲欧美日韩国产另类专区| 国产黄色成人av| 精品国精品国产尤物美女| 亚洲一区二区精品视频| 91首页免费视频| 国产日韩欧美电影| 国产精选一区二区三区| 欧美大片国产精品| 日本vs亚洲vs韩国一区三区二区| 色婷婷一区二区| 国产精品不卡一区| 国产.欧美.日韩| 久久久噜噜噜久久中文字幕色伊伊| 欧美bbbbb| 4438亚洲最大| 免费国产亚洲视频| 日韩欧美一区电影| 午夜精品久久久久久久99水蜜桃| 一本色道综合亚洲| 亚洲嫩草精品久久| 色悠久久久久综合欧美99| 国产精品亲子伦对白| 成人免费看的视频| 国产精品电影院| 91视频www| 一区二区三区中文字幕电影| 色婷婷精品大在线视频| 亚洲欧美日韩电影|