void mglCanvas::DefaultPlotParam() { /* NOTE: following variables and mutex will not be changed by DefaultPlotParam() long InUse; ///< Smart pointer (number of users) mglFont *fnt; ///< Class for printing vector text int Quality; ///< Quality of plot (0x0-pure, 0x1-fast; 0x2-fine; 0x4 - low memory) int Width; ///< Width of the image int Height; ///< Height of the image int Depth; ///< Depth of the image int CurFrameId; ///< Number of automaticle created frames GifFileType *gif;*/ SetDrawReg(1,1,0); Perspective(0); memcpy(mgl_mask_val, mgl_mask_def, 16*sizeof(uint64_t)); // should be > 16*8 ax.Clear(); ay.Clear(); az.Clear(); ac.Clear(); mgl_clear_fft(); DefMaskAn=0; ResetMask(); SetTickRotate(true); SetTickSkip(true); SetWarn(mglWarnNone,""); mglGlobalMess = ""; ObjId = -1; HighId = INT_MIN; SetFunc(0,0); CutOff(0); Ternary(0); Stop=false; event_cb = NULL; event_par=NULL; SetRanges(mglPoint(-1,-1,-1,-1), mglPoint(1,1,1,1)); SetOrigin(NAN,NAN,NAN,NAN); SetBarWidth(0.7); SetMarkSize(1); SetArrowSize(1); SetAlphaDef(0.5); FontDef[0]=0; SetTranspType(0); SetMeshNum(0); // NOTE: default MeshNum=0 SetRotatedText(true); CurrPal = 0; SetLegendMarks(); SetFontSize(4); SetTuneTicks(3); SetAmbient(); SetDiffuse(); clr(MGL_DISABLE_SCALE); clr(MGL_USE_GMTIME); clr(MGL_NOSUBTICKS); SetDifLight(false); SetReduceAcc(false); SetDefScheme(MGL_DEF_SCH); SetPalette(MGL_DEF_PAL); SetPenPal("k-1"); Alpha(false); stack.clear(); Restore(); DefColor('k'); SetPlotFactor(0); InPlot(0,1,0,1,false); SetTickLen(0); SetCut(true); AdjustTicks("xyzc",true); Clf('w'); for(int i=0;i<10;i++) { AddLight(i, mglPoint(0,0,1)); Light(i,false); } Light(0,true); Light(false); SetDifLight(true); }
void SuffixTree<Symb,NSymb>::Prune(PNode n, bool cut) { SetCut(n, cut); PNode ch = GetNode(n).child; if(ch == NIL) return; bool invalid = false; if(!cut) { invalid = !IsValid(n); cut = invalid; } // TODO: safety - remove recursion in this and other methods // recursion do { Prune(ch, cut); ch = NxtChild(ch); } while(ch != NIL); if(invalid) GetNode(n).child = NIL; // physically cut off children (but without destroying them) }