Changeset 37

Show
Ignore:
Timestamp:
03/19/07 12:47:31 (2 years ago)
Author:
qbert
Message:

--

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/build-project.bat

    r33 r37  
    1 build -I.. -version=Tango -full -allobj -names -g -profile  api.d -cleanup -Tandd.lib -L/Map 
     1build -I.. -version=Phobos -full -allobj -names -g -profile  api.d -cleanup -Tandd.lib -L/Map 
    22 
    3 build -I.. -version=Tango -full -allobj -cleanup -release -O api.d -Tand.lib -L/Map 
     3build -I.. -version=Phobos -full -allobj -cleanup -release -O api.d -Tand.lib -L/Map 
    44 
    5 build -I.. -version=Tango -Xand test_xor.d  andd.lib -cleanup -L/Map 
     5build -I.. -version=Phobos -Xand test_xor.d  andd.lib -cleanup -L/Map 
    66 
    7 dmd -version=Tango -I.. -I../tango -c -D -Dddoc doc/candydoc/candy.ddoc doc/candydoc/modules.ddoc network/neuralnetwork.d network/neuron.d network/layer.d network/model/ilayer.d network/model/ineuralnetwork.d learning/model/ilearning.d learning/backprop.d activation/model/iactivation.d activation/sigmoid.d activation/tanh.d api.d cost/model/icostfunction.d cost/mse.d cost/sse.d 
     7dmd -version=Phobos -I.. -I../tango -c -D -Dddoc doc/candydoc/candy.ddoc doc/candydoc/modules.ddoc network/neuralnetwork.d network/neuron.d network/layer.d network/model/ilayer.d network/model/ineuralnetwork.d learning/model/ilearning.d learning/backprop.d activation/model/iactivation.d activation/sigmoid.d activation/tanh.d api.d cost/model/icostfunction.d cost/mse.d cost/sse.d 
    88 
    99 
  • trunk/mt.d

    r33 r37  
    11module mt; 
    2 import tango.text.locale.Win32; 
     2 
     3version ( Tango ) 
     4
     5  import tango.text.locale.Win32; 
     6  alias getUtcGime getUTC ; 
     7
     8else version ( Phobos ) 
     9
     10  import std.date; 
     11  alias  getUTCtime getUTC; 
     12
     13 
    314/* 
    415   A D-program ported by Derek Parnell 2006/04/12, 
     
    7081void init_genrand(uint s, bool pAddEntropy = false) 
    7182{ 
    72     mt[0]= (s + (pAddEntropy ? vLastRand + getUtcTime() + cast(uint)&init_genrand 
     83    mt[0]= (s + (pAddEntropy ? vLastRand + getUTC() + cast(uint)&init_genrand 
    7384                      : 0)) 
    7485            &  0xffffffffUL; 
     
    281292 
    282293} 
    283  
    284 version(main) 
    285 { 
    286 int main() 
    287 { 
    288     const int lCnt = 20; 
    289     int i; 
    290     uint[] lInit; 
    291  
    292     lInit.length = 0; 
    293     lInit ~= 0x123; 
    294     lInit ~= 0x234; 
    295     lInit ~= 0x345; 
    296     lInit ~= 0x456; 
    297     init_by_array(lInit); 
    298     writefln("\n%s outputs of genrand_int32()", lCnt); 
    299     for (i=0; i<lCnt; i++) { 
    300       writef("%10s ", genrand_int32()); 
    301       if (i%5==4) writefln("\n"); 
    302     } 
    303  
    304     lInit.length = 0; 
    305     lInit ~= 0x123; 
    306     lInit ~= 0x234; 
    307     lInit ~= 0x345; 
    308     lInit ~= 0x456; 
    309     init_by_array(lInit,true); 
    310     writefln("\n%s outputs of genrand_int32()", lCnt); 
    311     for (i=0; i<lCnt; i++) { 
    312       writef("%10s ", genrand_int32()); 
    313       if (i%5==4) writefln("\n"); 
    314     } 
    315  
    316     writefln("\n%s outputs of genrand_real2()", lCnt); 
    317     for (i=0; i<lCnt; i++) { 
    318       writef("%10.8s ", genrand_real2()); 
    319       if (i%5==4) writefln("\n"); 
    320     } 
    321  
    322     writefln("\n%s outputs of genrand_range(1,10)", lCnt); 
    323     for (i=0; i<lCnt; i++) { 
    324       writef("%2s ", genrand_range!(uint)(1,10)); 
    325       if (i%30==29) writefln("\n"); 
    326     } 
    327  
    328     writefln("\n%s outputs of genrand_range(-0.5,0.5)", lCnt); 
    329     for (i=0; i<lCnt; i++) { 
    330       writef("%10.8s ", genrand_range!(float)(-0.5, 0.5)); 
    331       if (i%5==4) writefln("\n"); 
    332     } 
    333  
    334     return 0; 
    335 } 
    336 } 
  • trunk/platform.d

    r33 r37  
    1414    { 
    1515       
    16       import tango.math.Core
     16      import tango.math.Math
    1717      import tango.io.Stdout; 
    1818      import tango.text.convert.Integer;