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

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

?? plotxy.h

?? crack modeling with xfem
?? H
?? 第 1 頁 / 共 2 頁
字號:
/* 2008 (c) Dorival M. Pedroso */#ifndef MPM_PLOTXY_H#define MPM_PLOTXY_H// STL#include <cmath>  // for ceil and floor#include <cfloat> // for DBL_EPSILON#include <iostream>// FLTK#include <FL/Fl.H>#include <FL/Fl_Group.H>#include <FL/fl_draw.H>#include <FL/Enumerations.H> // for Fl_Color// Local#include "defs.h"#include "fatal.h"#include "array.h"/* Plot XY. */class PlotXY : public Fl_Group{public:	// Constants	static double MINZERO; ///< Minimum value to be replaced to 0.0 in _pretty method		/* Constructor. */	PlotXY (int xmin, int ymin, int width, int height, char const * Title=NULL, char const * Xlbl=NULL, char const * Ylbl=NULL); // Screen coordinates	/* Destructor. */	virtual ~PlotXY () {}	// Methods	void         AddCurve   (char const * Name);                                                   ///< Add curve (x-y values)	void         AddCurve   (Array<double> const * X, Array<double> const * Y, char const * Name); ///< Add curve (x-y values)	void         SetXY      (size_t i, Array<double> const * X, Array<double> const * Y);             ///< Set X and Y pointers	void         DelCurve   (size_t i);                                                               ///< Remove curve (x-y values)	CurveProps & SetCurve   (size_t i);	void         CalcSF     ();                                                                    ///< Calculate scale factors	void         DrawRulers ();                                                                    ///< Draw rulers	void         DrawLegend ();                                                                    ///< Draw legend	// Set methods	PlotXY & EqScales     (bool EQScales=true) { _eqsf=EQScales;  return (*this); } ///< Set equal scale factors	PlotXY & RecalcSF     (bool REcalcSF=true) { _recsf=REcalcSF; return (*this); } ///< Recalculate scale factors during draw ?	PlotXY & WithFrame    (bool WFrame  =true) { _wframe=WFrame;  return (*this); } ///< Draw an all-around frame ?	PlotXY & BRuler       (bool Visible =true, int nTicks=10);                      ///< Set bottom ruler	PlotXY & LRuler       (bool Visible =true, int nTicks=10);                      ///< Set left ruler	PlotXY & SetBTicksFmt (char const * Fmt="%4.1f", int Size=5);                   ///< Set bottom ruler ticks format, ex.: "%4.1f" => Size==5	PlotXY & SetLTicksFmt (char const * Fmt="%3.1f", int Size=5);                   ///< Set left ruler ticks format, ex.: "%3.1f" => Size==5	/* Draw method (internal). */	void draw ();private:	// Data	double _sfX;        ///< Scale factor: x=xmin+(X-Xmin)*sf and y=ymin+ymax-(Y-Ymin)*sf, where x and y are screen coordinates	double _sfY;        ///< Scale factor: x=xmin+(X-Xmin)*sf and y=ymin+ymax-(Y-Ymin)*sf, where x and y are screen coordinates	bool   _eqsf;       ///< Equal scale factors ?	bool   _recsf;      ///< Recalculate scale factors during draw ?	bool   _sfok;       ///< Is scale factor ok (set true after a first time calculation) ?	bool   _wframe;     ///< With frame? draw an all-around frame ?	double _Xmin;       ///< Minimum x value (real coordinates)	double _Ymin;       ///< Minimum y value (real coordinates)	double _Xmax;       ///< Maximum x value (real coordinates)	double _Ymax;       ///< Maximum y value (real coordinates)	int    _lrt;        ///< Left ruler tickness (screen coordinates)	int    _rrt;        ///< Right ruler tickness (screen coordinates)	int    _brt;        ///< Bottom ruler tickness (screen coordinates)	int    _trt;        ///< Top ruler tickness (screen coordinates)	int    _hb;         ///< Increment for horizontal borders (to the inside) (screen coordinates)	int    _vb;         ///< Increment for vertical borders (to the inside) (screen coordinates)	int    _bnt;        ///< Bottom ruler number of ticks	int    _lnt;        ///< Left ruler number of ticks	int    _ticfsz;     ///< Ticks font size	int    _lblfsz;     ///< Labels font size	int    _titfsz;     ///< Title font size	char   _btifmt[16]; ///< Bottom ruler ticks number format	char   _ltifmt[16]; ///< Left ruler ticks number format	char   _title[256]; ///< The title	char   _blbl[64];   ///< Bottom ruler label	char   _llbl[64];   ///< Left ruler lable	int    _blegh;      ///< Bottom legend height	int    _rlegw;      ///< Right legend width	int    _bhpad;      ///< Border horizontal padding	int    _bvpad;      ///< Border vertical padding	int    _pahpad;     ///< Plot area horizontal padding	int    _pavpad;     ///< Plot area vertical padding	bool   _legatbot;   ///< Legend at bottom ?	bool   _cptbr;      ///< Compact bottom ruler ?	// Curves	Array<Array<double> const*> _X; ///< X curves (real coordinates)	Array<Array<double> const*> _Y; ///< Y curves (real coordinates)	Array<CurveProps>           _C; ///< Curve properties	// Private Methods	int  _x      (double X) const { return static_cast<int>((x()+1+_lrt+_hb)              +_sfX*(X-_Xmin)); } ///< X in screen coordinates	int  _y      (double Y) const { return static_cast<int>((y()+1+_trt+_vb)+(h()-_pavpad)-_sfY*(Y-_Ymin)); } ///< Y in screen coordinates	int  _l      (double L) const { return static_cast<int>((_sfX>_sfY?_sfY:_sfX)*L); } ///< Length in screen coordinates	void _pretty (double Lo, double Hi, int nDiv, Array<double> & Vals);                ///< Return a pretty serie of numbers between Lo and HI}; // class PlotXYdouble PlotXY::MINZERO = sqrt(DBL_EPSILON);/////////////////////////////////////////////////////////////////////////////////////////// Implementation //////* public */inline PlotXY::PlotXY(int xmin, int ymin, int width, int height, char const * Title, char const * Xlbl, char const * Ylbl)	: Fl_Group (xmin,ymin,width,height,0),	  _sfX      (1.0),	  _sfY      (1.0),	  _eqsf     (false),	  _recsf    (true),	  _sfok     (false),	  _wframe   (true),	  _Xmin     (0.0),	  _Ymin     (0.0),	  _Xmax     (1.0),	  _Ymax     (1.0),	  _hb       (6),	  _vb       (6),	  _bnt      (5),	  _lnt      (5),	  _ticfsz   (10),	  _lblfsz   (12),	  _titfsz   (14),	  _blegh    (16),	  _rlegw    (0),	  _legatbot (true),	  _cptbr    (true){	end();	// Set dependent constants	_lrt    = 40;                     // left ruler	_rrt    = 0+5;                    // +5 to account for the width of the bottom tick text	_brt    = (_cptbr?20:20+_ticfsz); // +_ticfsz to account for the label	_trt    = 18;                     // area for the title	_bhpad  = _lrt+_rrt+_rlegw;       // border horizontal padding	_bvpad  = _brt+_trt+_blegh;       // border vertical padding	_pahpad = _bhpad+2+2*_hb;         // plot-area horizontal padding	_pavpad = _bvpad+2+2*_vb;         // plot-area vertical padding	// Set tick number formats	strncpy (_btifmt, "%g", 2);  _btifmt[2]='\0';	strncpy (_ltifmt, "%g", 2);  _ltifmt[2]='\0';	// Set title	if (Title==NULL) { strncpy (_title, "X-Y plot", 8); _title[8]='\0'; }	else               strncpy (_title, Title, 256);	// Set x-label	if (Xlbl==NULL) { strncpy (_blbl, "X", 1); _blbl[1]='\0'; }	else              strncpy (_blbl, Xlbl, 64);	// Set y-label	if (Ylbl==NULL) { strncpy (_llbl, "Y", 1);  _llbl[1]='\0'; }	else              strncpy (_llbl, Ylbl, 64);	}inline void PlotXY::AddCurve(char const * Name){	// Default properties	CurveProps cp = { CT_POINTS, FL_BLACK, FL_SOLID, 1, 1, _hb*2 };	snprintf (cp.Nam, 256, "%s", Name);	// Add curve	_X.Push(NULL);	_Y.Push(NULL);	_C.Push(cp);}inline void PlotXY::AddCurve(Array<double> const * X, Array<double> const * Y, char const * Name){	// Check	if (Y->Size()!=X->Size())		throw new Fatal("PlotXY::AddCurve: X (sz=%d) and Y (sz=%d) arrays must have the same size",X->Size(), Y->Size());	// Default properties	CurveProps cp = { CT_POINTS, FL_BLACK, FL_SOLID, 1, 1, _hb*2 };	snprintf (cp.Nam, 256, "%s", Name);	// Add curve	_X.Push(X);	_Y.Push(Y);	_C.Push(cp);}inline void PlotXY::SetXY(size_t i, Array<double> const * X, Array<double> const * Y){	// Check	if (i<0 || i>=_X.Size())		throw new Fatal("PlotXY::SetXY: There is no Curve # %d added to this object",i);	// Check	if (X!=NULL && Y!=NULL)	{		if (Y->Size()!=X->Size())			throw new Fatal("PlotXY::SetXY: X (sz=%d) and Y (sz=%d) arrays must have the same size",X->Size(), Y->Size());	}	// Set curve	_X[i] = X;	_Y[i] = Y;}inline void PlotXY::DelCurve(size_t i){	// Check	if (i<0 || i>=_X.Size())		throw new Fatal("PlotXY::DelCurve: There is no Curve # %d added to this object",i);	// Remove	_X.Remove(i);	_Y.Remove(i);	_C.Remove(i);}inline CurveProps & PlotXY::SetCurve(size_t i){	// Check	if (i<0 || i>=_X.Size())		throw new Fatal("PlotXY::SetCurve: There is no Curve # %d added to this object",i);		// Return properties   	return _C[i];}inline void PlotXY::CalcSF(){	_Xmin = 0.0;	_Ymin = 0.0;	_Xmax = 1.0;	_Ymax = 1.0;	size_t k = 0;	while (k<_X.Size())	{		// Check input		if (_X[k]==NULL)     break;		if (_Y[k]==NULL)     break;		if (_X[k]->Size()<2) break;		if (_Y[k]->Size()<2) break;		// Bounding box		if (k==0)		{			_Xmin = (*_X[k])[0];			_Ymin = (*_Y[k])[0];			_Xmax = (*_X[k])[1];			_Ymax = (*_Y[k])[1];		}		for (size_t i=0; i<_X[k]->Size(); ++i)		{			if ((*_X[k])[i]<_Xmin) _Xmin = (*_X[k])[i];			if ((*_Y[k])[i]<_Ymin) _Ymin = (*_Y[k])[i];			if ((*_X[k])[i]>_Xmax) _Xmax = (*_X[k])[i];			if ((*_Y[k])[i]>_Ymax) _Ymax = (*_Y[k])[i];		}		// Next curve		k++;	}	// Scale factors	if (fabs(_Xmax-_Xmin)<=DBL_EPSILON)	{		Array<double> lim;		_pretty (_Xmin, _Xmax, 3, lim);		_Xmin = lim[0];		_Xmax = lim[lim.Size()-1];	}	if (fabs(_Ymax-_Ymin)<=DBL_EPSILON)	{		Array<double> lim;		_pretty (_Ymin, _Ymax, 3, lim);		_Ymin = lim[0];		_Ymax = lim[lim.Size()-1];	}	_sfX = static_cast<double>((w()-_pahpad)/(_Xmax-_Xmin));	_sfY = static_cast<double>((h()-_pavpad)/(_Ymax-_Ymin));	if (_eqsf)	{		double sf = (_sfX>_sfY ? _sfY : _sfX);		_sfX = sf;		_sfY = sf;	}}inline void PlotXY::DrawRulers(){	if (_brt>0) // bottom ruler	{		// variables		int yi = y()+h()-_brt-_blegh;  // initial y-position (screen coordinates)		int X  = x()+_lrt;             // position		int W  = w()-_rlegw-_lrt-_rrt; // width		// background		fl_color (FL_WHITE);		fl_rectf (x(), yi, w(), _brt);		// ticks		const int     len = 9;                     // tick length		Array<double> ticks;                       // ticks position		char          buf[256];                    // buffer for ticks text		_pretty       (_Xmin, _Xmax, _bnt, ticks); // find ticks position		fl_color      (FL_BLACK);                  // set color		fl_line_style (FL_SOLID, 1);               // set line style		fl_font       (0,_ticfsz);                 // set font for ticks		for (size_t i=0; i<ticks.Size(); ++i)		{			int xi = _x(ticks[i]);                  // tick initial x-position (screen coordinates)			if (xi>=X && xi<=X+W)			{				snprintf (buf, 256, _btifmt, ticks[i]); // format text				fl_line  (xi, yi, xi, yi+len);          // draw tick mark				fl_draw  (buf, xi, yi+len+_ticfsz/2+1, 0, 0, FL_ALIGN_CENTER); // draw tick text			}		}		// label 

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
97久久超碰国产精品| 99re成人精品视频| 亚洲私人影院在线观看| 欧美日韩视频在线一区二区| 久久99久久精品| 亚洲视频一二区| 666欧美在线视频| 不卡欧美aaaaa| 日韩国产精品久久久| 欧美激情一区不卡| 3d成人h动漫网站入口| 成人听书哪个软件好| 国产精品白丝在线| 精品日韩在线观看| 日本韩国精品一区二区在线观看| 久久精品国产99久久6| 亚洲精选视频在线| 久久一区二区视频| 欧美三区在线视频| 粉嫩av一区二区三区在线播放| 亚洲国产成人av| 中文av字幕一区| 在线综合亚洲欧美在线视频| 色综合天天性综合| 久草精品在线观看| 亚洲国产色一区| 中文字幕一区二区不卡| 精品久久久久久久久久久久包黑料| 91亚洲永久精品| 秋霞成人午夜伦在线观看| 亚洲精品高清在线| 中文字幕亚洲一区二区av在线| 欧美大尺度电影在线| 欧美色电影在线| 成人av电影在线| 国产激情精品久久久第一区二区 | 天堂午夜影视日韩欧美一区二区| 中文字幕乱码久久午夜不卡| 精品国产伦一区二区三区观看体验| 粗大黑人巨茎大战欧美成人| 久久精品国产亚洲高清剧情介绍 | 在线免费观看成人短视频| 国产·精品毛片| 天堂久久一区二区三区| 亚洲国产精品一区二区www| 亚洲男人的天堂在线观看| 久久亚洲综合色| 日韩欧美国产小视频| 91精品国产一区二区三区蜜臀| 欧美在线视频日韩| 色婷婷综合久久久中文字幕| av不卡在线观看| 国内精品写真在线观看 | 婷婷六月综合网| 亚洲激情第一区| 亚洲综合激情网| 亚洲人成网站影音先锋播放| 一色屋精品亚洲香蕉网站| 中文字幕欧美日本乱码一线二线 | 日韩欧美一区二区三区在线| 欧美一区国产二区| 欧美日韩一本到| 欧美日韩国产影片| 在线不卡欧美精品一区二区三区| 欧美视频一区二区三区四区| 91在线观看下载| 91行情网站电视在线观看高清版| 91久久人澡人人添人人爽欧美| 在线亚洲精品福利网址导航| 99久久er热在这里只有精品15| 97se亚洲国产综合在线| 色视频欧美一区二区三区| 欧美无乱码久久久免费午夜一区| 欧美日韩国产综合一区二区| 91精品国产综合久久香蕉的特点 | 91麻豆精品一区二区三区| 91尤物视频在线观看| 精品视频在线免费| 欧美一级在线观看| 精品少妇一区二区三区| 国产偷国产偷亚洲高清人白洁| 国产精品拍天天在线| 亚洲激情在线播放| 亚洲mv在线观看| 狠狠色丁香九九婷婷综合五月| 国产乱码精品一区二区三 | 国产精品一二三区在线| 白白色 亚洲乱淫| 欧美日本乱大交xxxxx| 这里只有精品电影| 国产亚洲午夜高清国产拍精品| 国产精品二区一区二区aⅴ污介绍| 国产精品成人免费在线| 日精品一区二区三区| 久久精品国产第一区二区三区| 成人av手机在线观看| 日韩欧美中文字幕制服| 一区二区久久久久| 国产精品538一区二区在线| 91国产免费看| 国产色91在线| 日韩av中文字幕一区二区三区| 不卡的av中国片| 欧美一区二区视频在线观看| 亚洲激情五月婷婷| 成人污污视频在线观看| 日韩美女视频在线| 亚洲成人免费在线| 色婷婷综合中文久久一本| 国产视频亚洲色图| 国内精品伊人久久久久影院对白| 欧美日韩一区精品| 一区二区三区中文字幕在线观看| 粉嫩av一区二区三区粉嫩 | 国产精品国产精品国产专区不片| 琪琪一区二区三区| 欧美放荡的少妇| 亚洲国产精品一区二区www| 97se狠狠狠综合亚洲狠狠| 亚洲国产成人在线| 国产精品自在欧美一区| 精品国产精品网麻豆系列| 蜜臀久久久99精品久久久久久| 欧美视频在线一区| 亚洲福利一区二区三区| 欧洲亚洲国产日韩| 一区二区在线观看不卡| 不卡电影一区二区三区| 国产精品久久免费看| 国产成人午夜精品影院观看视频 | 蜜桃av一区二区在线观看| 欧美电影影音先锋| 日本伊人精品一区二区三区观看方式| 色香蕉久久蜜桃| 一区二区三区小说| 一本久久a久久免费精品不卡| 最新国产成人在线观看| 99麻豆久久久国产精品免费| 国产精品久久久久久久蜜臀 | 强制捆绑调教一区二区| 91精品欧美久久久久久动漫 | 国产精品久久夜| 99久久久无码国产精品| 一区在线播放视频| 99riav久久精品riav| 亚洲九九爱视频| 欧美精品精品一区| 美腿丝袜亚洲三区| 国产午夜精品一区二区三区嫩草| 国产成人免费av在线| 亚洲三级在线免费| 欧美在线观看视频一区二区| 午夜伊人狠狠久久| 精品少妇一区二区三区日产乱码 | 国产精品久久久久9999吃药| 99久久国产综合精品麻豆| 亚洲精品久久久久久国产精华液 | 国产精品色呦呦| 91麻豆精品视频| 舔着乳尖日韩一区| 精品欧美久久久| 成人激情校园春色| 亚洲国产精品久久不卡毛片| 欧美xxxx在线观看| av福利精品导航| 五月综合激情婷婷六月色窝| 久久婷婷久久一区二区三区| 不卡av在线网| 午夜精品在线看| 国产欧美一区二区精品秋霞影院| 91在线精品一区二区| 日本欧美大码aⅴ在线播放| 久久久久88色偷偷免费| 欧日韩精品视频| 激情文学综合丁香| 亚洲男帅同性gay1069| 日韩欧美在线影院| www.66久久| 另类成人小视频在线| 国产精品久久久久久户外露出| 欧美精品少妇一区二区三区| 国产成人综合视频| 亚洲成人在线观看视频| 国产欧美一区视频| 欧美高清dvd| 99久久久国产精品| 激情av综合网| 亚洲成人免费电影| 国产亚洲精品aa午夜观看| 欧美蜜桃一区二区三区| 成人三级在线视频| 日本色综合中文字幕| 亚洲欧美激情小说另类| 久久综合一区二区| 欧美日韩精品专区| 成人av网站免费| 国内精品免费在线观看| 日韩主播视频在线| 亚洲欧美国产77777| 欧美激情自拍偷拍|