Changeset 15095


Ignore:
Timestamp:
05/24/13 08:22:29 (12 years ago)
Author:
Mathieu Morlighem
Message:

CHG: added ApiPrintf to header file and moved all printf to _printLine_ in ExpSimplify

Location:
issm/trunk-jpl/src/wrappers
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/wrappers/ExpSimplify/ExpSimplify.cpp

    r15049 r15095  
    55
    66void ExpSimplifyUsage(void){/*{{{*/
    7         _pprintLine_("ExpSimplify - Simplify Exp contour");
    8         _pprintLine_("");
    9         _pprintLine_("   Recursive Douglas-Peucker Polygon Simplification");
    10         _pprintLine_("");
    11         _pprintLine_("   Usage:");
    12         _pprintLine_("      ExpSimplify(expfile,tol);");
    13         _pprintLine_("      - expfile: name of the exp file");
    14         _pprintLine_("      - tol:  tolerance (maximal euclidean distance allowed between the new line and a vertex)");
    15         _pprintLine_("      Additional options:");
    16         _pprintLine_("      - 'min': minimum number of vertices to save contours in exp file (default is 3)");
    17         _pprintLine_("");
    18         _pprintLine_("   Example:");
    19         _pprintLine_("      ExpSimplify('file.exp',100);");
    20         _pprintLine_("      ExpSimplify('file.exp',100,'remove1',false);");
     7        _printLine_("ExpSimplify - Simplify Exp contour");
     8        _printLine_("");
     9        _printLine_("   Recursive Douglas-Peucker Polygon Simplification");
     10        _printLine_("");
     11        _printLine_("   Usage:");
     12        _printLine_("      ExpSimplify(expfile,tol);");
     13        _printLine_("      - expfile: name of the exp file");
     14        _printLine_("      - tol:  tolerance (maximal euclidean distance allowed between the new line and a vertex)");
     15        _printLine_("      Additional options:");
     16        _printLine_("      - 'min': minimum number of vertices to save contours in exp file (default is 3)");
     17        _printLine_("");
     18        _printLine_("   Example:");
     19        _printLine_("      ExpSimplify('file.exp',100);");
     20        _printLine_("      ExpSimplify('file.exp',100,'remove1',false);");
    2121}/*}}}*/
    2222void simplify(Contour<double>* contour,bool* flags,int ind0,int ind1,double tolerance){/*{{{*/
     
    145145                x       = contour->x;
    146146                y       = contour->y;
    147                 printf("   Initial number of vertices in contour #%i: %i\n",counter+1,nods);
     147                _printLine_("   Initial number of vertices in contour #"<<counter+1<<": "<<nods);
    148148
    149149                /*Allocate flags (1=keep, 0=remove)*/
     
    183183                /*Do we save new profile?*/
    184184                if(newnods>=minimumvertices){
    185                         printf("   Final   number of vertices in contour #%i: %i\n",counter+1,newnods);
     185                        _printLine_("   Final   number of vertices in contour #"<<counter+1<<": "<<newnods);
    186186                        newcontour       = xNew<Contour<double> >(1);
    187187                        newcontour->nods = newnods;
     
    202202                }
    203203                else{
    204                         printf("   Final   number of vertices in contour #%i: %i (not saved)\n",counter+1,newnods);
     204                        _printLine_("   Final   number of vertices in contour #"<<counter+1<<": "<<newnods<<" (not saved)");
    205205                }
    206206
     
    208208                xDelete<bool>(flags);
    209209        }
    210         printf("   Initial number of contours: %i\n",oldcontours->Size());
    211         printf("   Final   number of contours: %i\n",newcontours->Size());
     210        _printLine_("   Initial number of contours: "<<oldcontours->Size());
     211        _printLine_("   Final   number of contours: "<<newcontours->Size());
    212212
    213213        /*Write data: */
  • issm/trunk-jpl/src/wrappers/matlab/io/matlabio.h

    r15091 r15095  
    9696#endif
    9797
    98 
     98/*Print*/
     99void ApiPrintf(char* format,const char* string);
    99100#endif  /* _IO_H_ */
  • issm/trunk-jpl/src/wrappers/python/io/pythonio.h

    r15091 r15095  
    5555PyObject* PyArrayFromCopiedData(int dimi,int dimj,bool* data);
    5656
     57/*Print*/
     58void ApiPrintf(char* format,const char* string);
     59
    5760#endif  /* _IO_H_ */
Note: See TracChangeset for help on using the changeset viewer.