⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 qfrontend.h

📁 算断裂的
💻 H
字号:
// ------------------------------------------------------------------// qfrontend.h//// This file contains the definitions for interfacing with the// front end, which in the case of this file is Matlab.  None of// the public functions refer to Matlab though.// ------------------------------------------------------------------// Author: Stephen A. Vavasis// Copyright (c) 1999 by Cornell University.  All rights reserved.// // See the accompanying file 'Copyright' for authorship information,// the terms of the license governing this software, and disclaimers// concerning this software.// ------------------------------------------------------------------// This file is part of the QMG software.  // Version 2.0 of QMG, release date September 3, 1999.// ------------------------------------------------------------------#ifndef QFRONTEND_H#define QFRONTEND_H#include "qnamesp.h"extern "C" {#include "mex.h"}namespace QMG {  namespace FrontEnd {    using namespace QMG;    // This is the front end interpreter.    class Interpreter {    };    // This class holds the argument list to QMG routines.    class ArgValType {    private:      int nrhs_;      const mxArray** prhs_;      ArgValType(const ArgValType&) { }      void operator=(const ArgValType&) { }    public:      // These member functions  are for processing the argument list.      // For example, get_string gets a string argument, where the      // specific argument number is argidx.      string get_string(int argidx) const;      int get_int(int argidx) const;      double get_double(int argidx) const;      Brep_From_FrontEnd get_brep(int argidx) const;      SimpComplex_From_FrontEnd get_simpcomp(int argidx) const;      IntMatrix get_intmatrix(int argidx) const;      Matrix get_matrix(int argidx) const;      Matrix get_zbamatrix(int argidx) const;      bool get_bool(int argidx) const;      vector<double> get_vector_double(int argidx) const;      vector<string> get_vector_string(int argidx) const;      Object_Type_Code determine_argument_type(int argidx) const;      void verify_nargin(int narginmin, int narginmax, const char* routine_name) const;       int nargin() const;      ArgValType(int nrhs, const mxArray** prhs);      ~ArgValType();    };    // This class holds the returnvalues from QMG functions.    class ReturnValType {    private:      int nlhs_;      mxArray** plhs_;      void checkarg_(int idx);      ReturnValType(const ReturnValType&) { }      void operator=(const ReturnValType&) { }    public:      void verify_nargout(int nargoutmin, int nargoutmax, const char* routine_name);      int nargout() const;      // These functions store computed quantities in the return      // value list.      void put_simpcomp(int argidx, SimpComplex_Under_Construction& sc);      void put_brep(int argidx, Brep_Under_Construction& brep);      void put_double(int argidx, double data);      void put_string(int argidx, const string& s);      void put_int(int argidx, int val);      void put_matrix(int argidx, Matrix& data);      void put_intmatrix(int argidx, IntMatrix& data);      void put_intvector(int argidx, vector<int>& data);      void put_doublevector(int argidx, vector<double>& data);      ReturnValType(int nlhs, mxArray** plhs);      ~ReturnValType();    };    // This class defines an ostream that prints out to the    // interpreter.    class InterpOStream {    private:      std::streambuf* sb_;      ostream* os_;    public:      InterpOStream(Interpreter&);      ~InterpOStream();      ostream& ostrm() {return *os_;}    };    double default_tol(Interpreter&);  }}#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -