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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? matrix.h

?? 攝影測量專業。實現單像后方交會以及立體像對的前方交會。以文件形式讀取控制點和像點坐標。
?? 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

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美巨大另类极品videosbest| 波波电影院一区二区三区| 国产成人精品1024| 99热精品国产| 最新日韩av在线| 日本成人在线电影网| 国产美女久久久久| 欧美日韩精品一区二区三区四区| 欧美精品一区二区在线观看| 日韩理论片网站| 国产激情视频一区二区三区欧美| 久久久久九九视频| 亚洲午夜免费电影| 成人18视频在线播放| 久久美女艺术照精彩视频福利播放 | 国产成人av网站| 亚洲日本护士毛茸茸| 欧美在线观看禁18| 日本一区免费视频| 蜜臀av一区二区| 欧洲人成人精品| 青娱乐精品视频在线| 欧美日韩久久一区| 欧美精品日日鲁夜夜添| 日本中文字幕不卡| 99精品视频在线免费观看| 欧美刺激午夜性久久久久久久| 一级中文字幕一区二区| 丁香一区二区三区| 国产精品欧美一区二区三区| 国产精品自拍一区| 久久人人97超碰com| 91一区二区三区在线观看| 日本一区二区免费在线观看视频| 91久久免费观看| 一个色综合av| 久久久久久久久久久久久久久99| 色综合久久久久综合体| 亚洲色图欧美激情| 欧美一级视频精品观看| 免费的成人av| 亚洲人成精品久久久久久| 91论坛在线播放| 精品夜夜嗨av一区二区三区| 欧美videossexotv100| 色婷婷精品大视频在线蜜桃视频| 久久精品国内一区二区三区| 久久精品夜色噜噜亚洲aⅴ| 成人av在线资源网| 免费人成网站在线观看欧美高清| 亚洲男同性视频| 久久久91精品国产一区二区精品| 欧美性受xxxx| 国产麻豆精品视频| 日韩av高清在线观看| 亚洲午夜电影网| 亚洲日本丝袜连裤袜办公室| 国产精品嫩草久久久久| 精品国产a毛片| 欧美一级片在线| 欧美电影在线免费观看| 欧洲在线/亚洲| 91小视频在线免费看| 岛国精品一区二区| 亚洲电影第三页| 亚洲精品一区二区三区蜜桃下载 | 国产成人av一区二区三区在线 | 久久嫩草精品久久久精品一| 欧美二区三区91| 欧美日韩国产中文| 欧美日韩综合在线| 久久国产精品72免费观看| 婷婷夜色潮精品综合在线| 久久综合九色综合欧美亚洲| 色天使色偷偷av一区二区| 成人黄色免费短视频| 国产99久久久精品| 成人晚上爱看视频| 国产成人无遮挡在线视频| 国产九九视频一区二区三区| 国产在线精品一区二区夜色| 亚洲黄色小说网站| 久久精品在这里| 久久久久久久久久久久久女国产乱 | 国产成人在线网站| 国产传媒欧美日韩成人| 99久久伊人网影院| 成人高清伦理免费影院在线观看| 国产一区二区免费在线| 国产成人亚洲精品青草天美 | 99这里只有精品| 91影院在线免费观看| 色噜噜狠狠成人中文综合| 91久久精品国产91性色tv| 欧美日韩美女一区二区| 日韩精品一区二区在线| 欧美中文字幕亚洲一区二区va在线| 在线视频综合导航| 欧美一区二区三区白人| 精品国产91九色蝌蚪| 中文字幕va一区二区三区| 久久青草欧美一区二区三区| 国产精品免费久久| 亚洲成人自拍网| 蜜桃视频在线观看一区二区| 国产麻豆成人传媒免费观看| a级高清视频欧美日韩| 欧美亚洲丝袜传媒另类| 欧美成人精品福利| 国产精品网站在线观看| 亚洲午夜影视影院在线观看| 精品一区二区久久久| av不卡一区二区三区| 9191久久久久久久久久久| 欧美日韩一区久久| 精品国产一区二区在线观看| 中文字幕一区视频| 欧美aaaaaa午夜精品| 高清久久久久久| 欧美三级日本三级少妇99| 久久新电视剧免费观看| 亚洲男人的天堂av| 久久精品72免费观看| 99re这里只有精品视频首页| 日韩欧美aaaaaa| 亚洲精品欧美激情| 国产伦精品一区二区三区在线观看| 色悠久久久久综合欧美99| 2020国产精品自拍| 香蕉成人伊视频在线观看| 丁香另类激情小说| 欧美电影免费观看高清完整版在线| 亚洲欧美电影一区二区| 国产精品一区在线观看乱码| 欧美精品一二三| 亚洲精品免费视频| 国产999精品久久| 日韩免费观看高清完整版 | 欧美日韩国产影片| 亚洲欧洲无码一区二区三区| 美洲天堂一区二卡三卡四卡视频| 日本高清视频一区二区| 中文字幕在线不卡一区| 国产裸体歌舞团一区二区| 欧美成va人片在线观看| 日日夜夜精品免费视频| 卡一卡二国产精品| 欧美亚洲禁片免费| 亚洲伦在线观看| 成人综合婷婷国产精品久久蜜臀| 日韩精品中文字幕在线一区| 日日欢夜夜爽一区| 欧美三级韩国三级日本三斤| 亚洲欧美日韩久久精品| 成人av先锋影音| 日本一区二区综合亚洲| 国产精品一二一区| 久久综合九色综合欧美亚洲| 麻豆一区二区三| 欧美一二三在线| 国产精品美女久久久久久2018 | 日本成人超碰在线观看| 欧美性生活大片视频| 一区二区视频在线| 一本久道中文字幕精品亚洲嫩 | 久久人人爽爽爽人久久久| 精品一区二区在线观看| 精品美女被调教视频大全网站| 麻豆精品新av中文字幕| 日韩视频一区二区| 激情欧美一区二区三区在线观看| 精品日本一线二线三线不卡| 久久99热国产| 国产亚洲欧美激情| kk眼镜猥琐国模调教系列一区二区| 欧美国产精品久久| 99久久国产免费看| 亚洲精品少妇30p| 欧美精品丝袜中出| 久久国产精品第一页| 久久中文娱乐网| 国产成人av影院| 亚洲精品免费在线| 欧美一级在线免费| 国产精品资源在线看| 国产精品家庭影院| 国产米奇在线777精品观看| 欧美激情一区二区三区全黄| av高清久久久| 亚洲成a人片在线观看中文| 欧美一三区三区四区免费在线看| 蜜臀av性久久久久蜜臀aⅴ流畅| 26uuuu精品一区二区| 成人黄色一级视频| 午夜精品爽啪视频| 久久久三级国产网站| 色婷婷av一区| 精品一区二区三区在线播放| 亚洲国产精品国自产拍av| 欧美亚洲愉拍一区二区|