Changeset 2828 in Sophya for trunk/SophyaProg/Tests


Ignore:
Timestamp:
Nov 2, 2005, 10:00:15 AM (20 years ago)
Author:
ansari
Message:

1/ include values.h commente ds tstboloread.cc tstcolread.cc (compil OSX)
2/ amelioration prog test TimeStamp (TimeStamp::ToDays() et TimeStamp(double days) en particulier)
3/ amelioration prog test tnt.cc : test MuTyV/DVList avec type TimeStamp et test DataTable , SwPPFDataTable avec champs ComplexField et DoubleComplexField

Reza , 2 Nov 2005

Location:
trunk/SophyaProg/Tests
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaProg/Tests/tnt.cc

    r2733 r2828  
    113113     << " (complex<double>)zvs= " << zzd << endl;
    114114cout << "String->double: dvs = " << dvs
    115      << " (double)zvs= " << (double)dvs << endl;
     115     << " (double)dvs= " << (double)dvs << endl;
     116TimeStamp ts;
     117MuTyV tv = ts;
     118cout << "MuTyV=TimeStamp->String: tv = " << tv
     119     << " ->double= " << (double)tv << " ->TimeStamp:"
     120     << TimeStamp((double)tv).ToString() << endl;
    116121
    117122
     
    138143
    139144dvl["Sinf"] = "inf 0985";
     145dvl["ToDay"] = ts;
    140146dvl.Print();
    141147
     
    184190  dt.AddDoubleColumn("f_sinxcos");
    185191  dt.AddDoubleColumn("f_x2");
     192  dt.AddComplexColumn("cmplx_cos_sin");
     193  dt.AddDoubleComplexColumn("dcmplx_cos_sin");
    186194  MuTyV rec[10];
    187195  cout << " 1/ First 1000 lines .... " << endl;
     
    193201    double x = M_PI*k/100.;
    194202    double fx = sin(x)*cos(x);
     203    double sx = sin(x);
     204    double cx = cos(x);
    195205    rec[2] = x;
    196     rec[3] = sin(x);
    197     rec[4] = cos(x);
     206    rec[3] = sx;
     207    rec[4] = cx;
    198208    rec[5] = fx;
    199209    rec[6] = x*x;
     210    rec[7] = complex<r_4>(cx, sx);
     211    rec[8] = complex<r_8>(cx, sx);
    200212    dt.AddLine(rec);
    201213  }
     
    213225    double x = M_PI*k/100.;
    214226    double fx = sin(x)*cos(x);
     227    double sx = sin(x);
     228    double cx = cos(x);
    215229    rec[2] = x;
    216     rec[3] = sin(x);
    217     rec[4] = cos(x);
     230    rec[3] = sx;
     231    rec[4] = cx;
    218232    rec[5] = fx;
    219233    rec[6] = x*x;
     234    rec[7] = complex<r_4>(cx, sx);
     235    rec[8] = complex<r_8>(cx, sx);
    220236    dt.AddLine(rec);
    221237  }
     
    262278    dt.AddDoubleColumn("f_sinxcos");
    263279    dt.AddDoubleColumn("f_x2");
     280    dt.AddComplexColumn("cmplx_cos_sin");
     281    dt.AddDoubleComplexColumn("dcmplx_cos_sin");
    264282    MuTyV rec[10];
    265283    cout << " 1/ First 1000 lines .... " << endl;
     
    268286      double x = M_PI*k/100.;
    269287      double fx = sin(x)*cos(x);
     288      double sx = sin(x);
     289      double cx = cos(x);
    270290      rec[1] = x;
    271       rec[2] = sin(x);
    272       rec[3] = cos(x);
     291      rec[2] = sx;
     292      rec[3] = cx;
    273293      rec[4] = fx;
    274294      rec[5] = x*x;
     295      rec[6] = complex<r_4>(cx, sx);
     296      rec[7] = complex<r_8>(cx, sx);
    275297      dt.AddLine(rec);
    276298    }
  • trunk/SophyaProg/Tests/tstboloread.cc

    r2615 r2828  
    1414#include <stdlib.h>
    1515#include <iostream>
    16 #include <values.h>
     16// #include <values.h>
    1717#include <string.h>
    1818#include <string>
  • trunk/SophyaProg/Tests/tstcolread.cc

    r2615 r2828  
    66#include <stdlib.h>
    77#include <iostream>
    8 #include <values.h>
     8// #include <values.h>
    99#include <string.h>
    1010#include <string>
  • trunk/SophyaProg/Tests/ttimestamp.cc

    r2659 r2828  
    2626   
    2727    InitTim();
     28    cout << " Sizeof(TimeStamp=) " << sizeof(TimeStamp) << endl;
    2829    TimeStamp ts;
    29     cout << "ts: Now : " << ts << endl;
    30     TimeStamp ts2("30/01/1962","14:22:35.65");
    31     cout << "ts2: 30/01/1962 14:22:35.65 : " << ts2 << endl;
     30    cout << "ts: Now : " << ts << "(->double: " << (double)ts << " )" << endl;
     31    TimeStamp ts2("26/8/1974","14:22:35.65");
     32    cout << "ts2: 26/8/1974 14:22:35.65 : " << ts2 
     33         << " double->TimeStamp: " << TimeStamp(ts2.ToDays()) << endl;
    3234    TimeStamp ts3("01/01/1905","00:00:00");
    33     cout << "ts3: 01/01/1905 , 00:00:00 : " << ts3 << " (double): " << (double)ts3 << endl;
     35    cout << "ts3: 01/01/1905 , 00:00:00 : " << ts3 << " (double): "
     36         << (double)ts3 << " double->TimeStamp: " << TimeStamp(ts3.ToDays()) << endl;
    3437    TimeStamp ts4("01/01/1901","03:00:20");
    35     cout << "ts3: 01/01/1901 , 02:00:20 : " << ts4 << " (double): " << (double)ts4 << endl;
     38    cout << "ts3: 01/01/1901 , 03:00:20 : " << ts4 << " (double): "
     39         << (double)ts4 << " double->TimeStamp: " << TimeStamp(ts4.ToDays()) << endl;
    3640
     41    TimeStamp ts5("01/12/1899","00:00:00");
     42    cout << "ts5: 01/12/1899 , 00:00:00 : " << ts5 << " (double): "
     43         << (double)ts5 << " double->TimeStamp: " << TimeStamp(ts5.ToDays()) << endl;
     44    TimeStamp ts6("01/12/1899","15:30:00");
     45    cout << "ts6: 01/12/1899 , 15:30:00 : " << ts6 << " (double): "
     46         << (double)ts6 << " double->TimeStamp: " << TimeStamp(ts6.ToDays()) << endl;
     47    cout << " ts.ToString(bool, bool) test : " << endl;
     48    cout << " ts.ToString()= " << ts.ToString() << endl;
     49    cout << " ts.ToString(fgd=true, fgh=false)= " << ts.ToString(true, false) << endl;
     50    cout << " ts.ToString(fgd=false, fgh=true)= " << ts.ToString(false, true) << endl;
    3751
    3852  }
Note: See TracChangeset for help on using the changeset viewer.