qinctab.h

来自「算断裂的」· C头文件 代码 · 共 115 行

H
115
字号
// ------------------------------------------------------------------// qinctab.h//// This file contains the class for the incidence table.// ------------------------------------------------------------------// 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 QMGINCTAB_H#define QMGINCTAB_H#include "qpatchtab.h"// ------------------------------------------------------------------// class IncidenceTable// Singleton class for holding incidences between quadtree entities// and patches (model entities).class QMG::MG::IncidenceTable {private:  // No copying, no assignment.  IncidenceTable(const IncidenceTable&) { }  void operator=(const IncidenceTable&) { }  // Incidence table is a multimap with keys and data  struct Key {    IntCoord intcoord;    Mask flatdim;    PatchTable::Index patchind;    int seqno;    bool operator<(const Key& other) const;  };  struct Data {    Point real_coord;    Real param_coord[2];    Real param_uncertainty;    Mask match_flatdim;  // used only for extreme points.  };  map<Key, Data> table_;  int sequence_number_;  static double code_for_no_intersection() { return 1.482357245789435e306;}  // These private functions are used to expose private data  // from the PatchTable.  static Real get_patch_control_point_coord_(const PatchTable& patchtable,    PatchTable::Index patchind,    int cpnum,    int d);  static int get_patch_degree1_(const PatchTable& patchtable,    PatchTable::Index patchind);  static int get_patch_degree2_(const PatchTable& patchtable,    PatchTable::Index patchind);  static PatchType get_patch_type_(const PatchTable& patchtable,    PatchTable::Index patchind);  class PatchMath_for_curve_on_triangle;  friend class PatchMath_for_curve_on_triangle;  class PatchMath_for_curve_on_quad;  friend class PatchMath_for_curve_on_quad;public:  typedef map<Key,Data> ITableType;  typedef ITableType::const_iterator Index;  static int compare_index(const Index& i1, const Index& i2);   Point real_coord(Index i) const {return i -> second.real_coord;}  Point param_coord(Index i) const {    Point p;    p[0] = i -> second.param_coord[0];    p[1] = i -> second.param_coord[1];    return p;  }  Real param_uncertainty(Index i) const {return i -> second.param_uncertainty;}  PatchTable::Index patchind(Index i) const {return i -> first.patchind;}  Mask flatdim(Index i) const {return i -> first.flatdim;}  void get_incidence(Mask flatdim,     const IntCoord& midpointcoord,     const Point& midpointcoord_real,    const PatchTable& patchtable,    PatchTable::Index patchind,    vector<Index>& output_vec,    Logstream& logstr,     double scfac,    double tol,    PatchMath::Workspace& workspace,    vector<PatchMath::IntersectRecord>& os_workspace,    Meshgen_gui& gui);  static int seqno(Index i) { return i -> first.seqno; }  IncidenceTable();  ~IncidenceTable() { }};#endif

⌨️ 快捷键说明

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