Changeset 37
- Timestamp:
- 03/19/07 12:47:31 (2 years ago)
- Files:
-
- trunk/and.lib (modified) (previous)
- trunk/andd.lib (modified) (previous)
- trunk/build-project.bat (modified) (1 diff)
- trunk/mt.d (modified) (3 diffs)
- trunk/platform.d (modified) (1 diff)
- trunk/run-build.bat (deleted)
- trunk/test_xor.exe (modified) (previous)
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/Map1 build -I.. -version=Phobos -full -allobj -names -g -profile api.d -cleanup -Tandd.lib -L/Map 2 2 3 build -I.. -version= Tango-full -allobj -cleanup -release -O api.d -Tand.lib -L/Map3 build -I.. -version=Phobos -full -allobj -cleanup -release -O api.d -Tand.lib -L/Map 4 4 5 build -I.. -version= Tango-Xand test_xor.d andd.lib -cleanup -L/Map5 build -I.. -version=Phobos -Xand test_xor.d andd.lib -cleanup -L/Map 6 6 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.d7 dmd -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 8 8 9 9 trunk/mt.d
r33 r37 1 1 module mt; 2 import tango.text.locale.Win32; 2 3 version ( Tango ) 4 { 5 import tango.text.locale.Win32; 6 alias getUtcGime getUTC ; 7 } 8 else version ( Phobos ) 9 { 10 import std.date; 11 alias getUTCtime getUTC; 12 } 13 3 14 /* 4 15 A D-program ported by Derek Parnell 2006/04/12, … … 70 81 void init_genrand(uint s, bool pAddEntropy = false) 71 82 { 72 mt[0]= (s + (pAddEntropy ? vLastRand + getU tcTime() + cast(uint)&init_genrand83 mt[0]= (s + (pAddEntropy ? vLastRand + getUTC() + cast(uint)&init_genrand 73 84 : 0)) 74 85 & 0xffffffffUL; … … 281 292 282 293 } 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 14 14 { 15 15 16 import tango.math. Core;16 import tango.math.Math; 17 17 import tango.io.Stdout; 18 18 import tango.text.convert.Integer;
