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

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

?? matrix_market_stream.h

?? Matrix_Template_Library.rar c++矩陣模塊庫函數
?? H
字號:
// -*- c++ -*-//// Copyright 1997, 1998, 1999 University of Notre Dame.// Authors: Andrew Lumsdaine, Jeremy G. Siek, Lie-Quan Lee//// This file is part of the Matrix Template Library//// You should have received a copy of the License Agreement for the// Matrix Template Library along with the software;  see the// file LICENSE.  If not, contact Office of Research, University of Notre// Dame, Notre Dame, IN  46556.//// Permission to modify the code and to distribute modified code is// granted, provided the text of this NOTICE is retained, a notice that// the code was modified is included with the above COPYRIGHT NOTICE and// with the COPYRIGHT NOTICE in the LICENSE file, and that the LICENSE// file is distributed with the modified code.//// LICENSOR MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED.// By way of example, but not limitation, Licensor MAKES NO// REPRESENTATIONS OR WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY// PARTICULAR PURPOSE OR THAT THE USE OF THE LICENSED SOFTWARE COMPONENTS// OR DOCUMENTATION WILL NOT INFRINGE ANY PATENTS, COPYRIGHTS, TRADEMARKS// OR OTHER RIGHTS.//                                                                           //===========================================================================#ifndef MATRIX_MARKET_STREAM_H#define MATRIX_MARKET_STREAM_H#include <stdio.h>#include "mtl/mtl_complex.h"#include <assert.h>#include "mtl/mtl_config.h"#include "mtl/entry.h"#include "mtl/mmio.h"namespace mtl {using std::complex;//: A Matrix File Input Stream for Matrix Market Files////   This class simplifies the job of creating matrices from files//   stored in the Matrix Market format. All matrix types have a//   constructor that takes a <tt>matrix_market_stream</tt>//   object. One can also access the elements (of type entry2) from a//   matrix stream using the stream operator. The stream handles both//   real and complex numbers.//// <codeblock>//    Usage://      matrix_market_stream mms( fielname );//      Matrix A(mms);// </codeblock>//!component: type//!category: utilities//!tparam: T - the matrix element type (double or complex<double>)template <class T>class matrix_market_stream {public:  //: Construct from filename  inline matrix_market_stream(char* filename) {    fin = fopen(filename, "r");    if (fin==0) {      std::cerr << "Sorry, we can not open " << filename << std::endl;      assert(0);    }        if (mm_read_banner(fin, &matcode) != 0) {      std::cerr << "Sorry, we cannnot find the matrix market banner in " 	   << filename << std::endl;      fclose(fin);      assert(0);    }    if (mm_is_coordinate(matcode) == 0 || mm_is_matrix(matcode) == 0) {      std::cout << "file is not coordinate storage or is not a matrix" << std::endl;      fclose(fin);      assert(0);    }    if (mm_is_pattern(matcode)) {      std::cout << "not currently supporting pattern" << std::endl;      fclose(fin);      assert(0);    }        if (mm_is_skew(matcode)) {      std::cout << "not currently supporting skew symmetric" << std::endl;      fclose(fin);      assert(0);    }    isSymmetric = false;     isComplex = false;    isHermitian = false;    if ( mm_is_symmetric(matcode) || mm_is_hermitian(matcode) )       isSymmetric = true;    if ( mm_is_hermitian(matcode) )       isHermitian = true;    if (mm_is_complex(matcode)) isComplex = true;        mm_read_mtx_crd_size(fin, &row, &col, &nz);    count = 0;  }  //: Destructor, closes the file  inline ~matrix_market_stream() {    fclose(fin);  }  //: At the end of the file yet?  inline bool eof() const { return count == nz; }  //: Number of rows in matrix  inline int nrows() const { return row; }  //: Number of columns in matrix  inline int ncols() const { return col; }  //: Number of non-zeroes in matrix  inline int nnz() const { return isSymmetric ? 2*nz : nz; }    /* SGI compiler doesn't like these  template <class Type, class PR_>  friend   matrix_market_stream<Type>& operator>>(matrix_market_stream<Type>& mms, entry2<PR_>& e);  template <typename Type, typename PR_>  friend  matrix_market_stream<Type>& operator>>(matrix_market_stream<Type>& mms, entry2<complex<PR_> >& e);  */  inline bool is_symmetric() const { return isSymmetric; }  inline bool is_complex() const { return isComplex; }  inline bool is_hermitian() const { return isHermitian; }  /* private: JGS friends not working for some compilers */  int count;  FILE *fin;  MM_typecode matcode;  int row, col, nz;  bool isComplex;  bool isSymmetric;  bool isHermitian;};template <typename T, typename PR_>inline matrix_market_stream<T>& operator>>(matrix_market_stream<T>& mms, entry2<PR_>& e) {  if ( mms.eof() ) {     e = entry2<PR_>();    return mms;  }    if ( ! mms.is_complex() ) {  /* check the nuerical type */      fscanf(mms.fin, "%d %d %lg",  &e.row, &e.col, &e.value);      e.row--; e.col--;    } else {      std::cout << "Numerical types of Matrix and entry are incompatible." << std::endl;      assert(0);    }    mms.count++;     return mms;  }#if _MSVCPP_inline matrix_market_stream<float>& operator>>(matrix_market_stream<float>& mms, entry2<complex<float> >& e) {  if ( mms.eof() ) {     e = entry2<complex<float> >();    return mms;  }  if ( mms.is_complex() ) {  //check the nuerical type    float r, i;    fscanf(mms.fin, "%d %d %lg %lg",  &e.row, &e.col, &r, &i);    e.row--; e.col--;    e.value = complex<float>(r, i);  } else {    std::cout << "Numerical types of Matrix and entry are incompatible." << std::endl;    assert(0);  }    mms.count++;     return mms;}inline matrix_market_stream<double>& operator>>(matrix_market_stream<double>& mms, entry2<complex<double> >& e) {  if ( mms.eof() ) {     e = entry2<complex<double> >();    return mms;  }  if ( mms.is_complex() ) {  //check the nuerical type    double r, i;    fscanf(mms.fin, "%d %d %lg %lg",  &e.row, &e.col, &r, &i);    e.row--; e.col--;    e.value = complex<double>(r, i);  } else {    std::cout << "Numerical types of Matrix and entry are incompatible." << std::endl;    assert(0);  }    mms.count++;     return mms;}#elsetemplate <typename T, typename PR_>inline matrix_market_stream<T>& operator>>(matrix_market_stream<T>& mms, entry2<complex<PR_> >& e) {  if ( mms.eof() ) {     e = entry2<complex<PR_> >();    return mms;  }  if ( mms.is_complex() ) {  //check the nuerical type    PR_ r, i;    fscanf(mms.fin, "%d %d %lg %lg",  &e.row, &e.col, &r, &i);    e.row--; e.col--;    e.value = complex<PR_>(r, i);  } else {    std::cout << "Numerical types of Matrix and entry are incompatible." << std::endl;    assert(0);  }    mms.count++;     return mms;}#endif} /* namespace mtl */#endif

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
看电视剧不卡顿的网站| 欧美男同性恋视频网站| 欧洲av一区二区嗯嗯嗯啊| 日韩欧美一区在线观看| 成人欧美一区二区三区视频网页| 五月婷婷激情综合| 色综合久久综合中文综合网| 久久美女高清视频| 欧美aa在线视频| 在线精品视频一区二区三四| 国产免费成人在线视频| 午夜精品久久久久久久| 色综合久久久久久久久| 久久亚洲一区二区三区明星换脸 | 91久久香蕉国产日韩欧美9色| 欧美mv日韩mv亚洲| 亚洲一区二区三区不卡国产欧美| 东方欧美亚洲色图在线| 欧美电影免费观看完整版| 性感美女极品91精品| 一本到不卡免费一区二区| 国产日产亚洲精品系列| 久久成人羞羞网站| 91精品在线免费| 亚洲成人av电影在线| 91原创在线视频| 国产精品国产自产拍高清av王其| 国内久久婷婷综合| 欧美成人女星排行榜| 蜜芽一区二区三区| 91麻豆精品国产91久久久更新时间 | 日本中文字幕不卡| 在线亚洲欧美专区二区| 亚洲青青青在线视频| 不卡av电影在线播放| 久久精品在这里| 国产成人午夜99999| 久久亚洲精品小早川怜子| 精品一区二区三区视频| 2020国产精品自拍| 国产黄色91视频| 国产精品天天看| av一区二区三区| 亚洲欧美另类小说| 欧美综合天天夜夜久久| 日韩中文字幕区一区有砖一区| 欧美揉bbbbb揉bbbbb| 视频在线观看一区| 日韩精品一区二区三区在线播放| 精品一区二区三区在线播放| 国产日产欧产精品推荐色| 成人av综合一区| 亚洲一区二区精品久久av| 91精品国产91久久久久久一区二区 | 国产精品资源站在线| 久久精品一区二区三区av| 成人小视频免费观看| 国产精品久久久久久久久免费相片 | 综合中文字幕亚洲| 欧美在线综合视频| 麻豆国产欧美日韩综合精品二区| 久久久国产一区二区三区四区小说| 成人国产精品免费| 亚洲国产aⅴ天堂久久| 精品乱码亚洲一区二区不卡| 福利一区二区在线| 亚洲资源中文字幕| 日韩欧美一级特黄在线播放| 国产成人av网站| 亚洲午夜在线视频| 精品国产亚洲一区二区三区在线观看| 国产福利一区二区三区| 一区二区在线观看免费视频播放 | 欧美精品一区男女天堂| 99国产精品久久久久久久久久 | 亚洲乱码国产乱码精品精可以看| 欧美人妇做爰xxxⅹ性高电影| 激情综合网激情| 亚洲一区日韩精品中文字幕| 精品对白一区国产伦| 91国产精品成人| 国产乱码精品一区二区三区av| 亚洲美女视频在线| 久久色.com| 欧美人狂配大交3d怪物一区| 成人午夜电影久久影院| 日本在线不卡视频一二三区| 亚洲三级电影网站| 国产亚洲精品精华液| 91麻豆精品国产91久久久久| 91免费小视频| 国产精品99久久久久久宅男| 亚洲va中文字幕| 亚洲欧洲国产日韩| 精品国产一区二区三区不卡 | 一区二区高清视频在线观看| 久久精品视频网| 欧美一级在线免费| 色偷偷一区二区三区| 国产一二三精品| 麻豆国产精品777777在线| 亚洲大片在线观看| 亚洲人精品午夜| 国产精品欧美一区喷水| 日韩欧美国产电影| 欧美一区二区精品久久911| 欧美主播一区二区三区| 一本色道a无线码一区v| 成人动漫在线一区| 国产精品18久久久久久久久久久久| 日本 国产 欧美色综合| 日韩专区欧美专区| 午夜不卡av在线| 三级精品在线观看| 亚洲综合无码一区二区| 亚洲自拍与偷拍| 亚洲精品中文字幕在线观看| 亚洲日本在线视频观看| 亚洲免费在线观看| 一区二区三区免费看视频| 亚洲色欲色欲www| 亚洲丝袜自拍清纯另类| 亚洲精品国产一区二区精华液| 综合色天天鬼久久鬼色| 一级特黄大欧美久久久| 亚洲在线免费播放| 午夜精品123| 免费在线观看一区| 激情综合五月婷婷| 粉嫩绯色av一区二区在线观看| 成人av资源在线观看| 日本福利一区二区| 在线播放91灌醉迷j高跟美女| 欧美日韩一区视频| 欧美va在线播放| 国产日韩欧美一区二区三区乱码 | 日韩欧美在线观看一区二区三区| 日韩午夜中文字幕| 久久久久久9999| 亚洲视频香蕉人妖| 丝袜亚洲精品中文字幕一区| 狠狠色丁香婷婷综合| 99久久精品国产网站| 欧美日韩国产首页| 精品久久人人做人人爰| 欧美高清一级片在线观看| 一区二区三区在线影院| 午夜天堂影视香蕉久久| 黑人精品欧美一区二区蜜桃| 成人h版在线观看| 欧美剧情片在线观看| 久久久久97国产精华液好用吗 | 欧美不卡视频一区| 国产精品久久久久久妇女6080| 亚洲成a人在线观看| 国产在线精品一区二区三区不卡 | 麻豆精品一区二区三区| 成人永久aaa| 欧美日本一区二区| 中文字幕免费观看一区| 亚洲风情在线资源站| 国产成人精品亚洲777人妖| 色偷偷88欧美精品久久久| 久久精品视频在线看| 亚洲精品国产一区二区精华液 | 有码一区二区三区| 国产一区二区在线影院| 色国产精品一区在线观看| 亚洲精品一区二区三区福利 | 欧美午夜免费电影| 欧美国产乱子伦| 美日韩一级片在线观看| 色天使色偷偷av一区二区| 国产天堂亚洲国产碰碰| 日韩国产欧美视频| 日本高清不卡aⅴ免费网站| 国产偷国产偷精品高清尤物| 青青草国产精品亚洲专区无| 色婷婷综合久久久| 日本一区免费视频| 九九热在线视频观看这里只有精品| 91国内精品野花午夜精品| 国产精品久久三区| 国产成人精品免费在线| 精品国产一区二区三区忘忧草| 视频在线在亚洲| 欧美日韩不卡在线| 自拍偷拍亚洲激情| 国产精品系列在线观看| 精品乱码亚洲一区二区不卡| 丝袜国产日韩另类美女| 欧美日韩激情一区| 亚洲一区二区三区四区的| 色综合一个色综合| 亚洲卡通动漫在线| 欧美在线免费观看亚洲| 国产精品全国免费观看高清| 成人手机在线视频| 中文字幕欧美国产| 成人国产精品视频|