diff options
author | Mike Buland <mike@xagasoft.com> | 2012-07-09 12:17:50 -0600 |
---|---|---|
committer | Mike Buland <mike@xagasoft.com> | 2012-07-09 12:17:50 -0600 |
commit | 49139048717d32e214d725a334b5920c35f7366f (patch) | |
tree | 615e1d60026c8b40f5ec71d43e11fc44d25c291e | |
parent | 3cea9f4fbfe520d443dbaeacfcd8de09fb78125d (diff) | |
download | libneural-49139048717d32e214d725a334b5920c35f7366f.tar.gz libneural-49139048717d32e214d725a334b5920c35f7366f.tar.bz2 libneural-49139048717d32e214d725a334b5920c35f7366f.tar.xz libneural-49139048717d32e214d725a334b5920c35f7366f.zip |
Neural nets are ready for some testing.
Diffstat (limited to '')
-rw-r--r-- | default.bld | 29 | ||||
-rw-r--r-- | src/network.h | 8 | ||||
-rw-r--r-- | src/tests/pic.cpp | 7 | ||||
-rw-r--r-- | tests/.gitignore | 2 |
4 files changed, 43 insertions, 3 deletions
diff --git a/default.bld b/default.bld index be99b23..f2fb0cc 100644 --- a/default.bld +++ b/default.bld | |||
@@ -3,7 +3,32 @@ target "libneural.a" | |||
3 | rule "lib"; | 3 | rule "lib"; |
4 | input files("src/*.cpp"); | 4 | input files("src/*.cpp"); |
5 | 5 | ||
6 | CXXFLAGS += "-I."; | 6 | CXXFLAGS += "-I. -ggdb"; |
7 | LDCONFIG += "-lbu++"; | 7 | } |
8 | |||
9 | for src in files("src/tests/*.cpp") do | ||
10 | { | ||
11 | target src.replace("src/","").replace(".cpp","") | ||
12 | { | ||
13 | rule "exe"; | ||
14 | input src; | ||
15 | requires "libneural.a"; | ||
16 | |||
17 | CXXFLAGS += "-I. -ggdb"; | ||
18 | LDFLAGS += "-L. -lneural -lbu++ -ggdb"; | ||
19 | } | ||
20 | } | ||
21 | |||
22 | for dir in dirs("src/tests/*") do | ||
23 | { | ||
24 | target dir.replace("src/","") | ||
25 | { | ||
26 | rule "exe"; | ||
27 | input files( dir + "/*.cpp"); | ||
28 | requires "libneural.a"; | ||
29 | |||
30 | CXXFLAGS += "-I. -ggdb"; | ||
31 | LDFLAGS += "-L. -lneural -lbu++ -lpthread -ggdb"; | ||
32 | } | ||
8 | } | 33 | } |
9 | 34 | ||
diff --git a/src/network.h b/src/network.h index 85d8407..e364459 100644 --- a/src/network.h +++ b/src/network.h | |||
@@ -3,6 +3,8 @@ | |||
3 | 3 | ||
4 | #include "neural/node.h" | 4 | #include "neural/node.h" |
5 | 5 | ||
6 | #include <bu/string.h> | ||
7 | |||
6 | namespace Neural | 8 | namespace Neural |
7 | { | 9 | { |
8 | template<typename sigtype> | 10 | template<typename sigtype> |
@@ -19,7 +21,11 @@ namespace Neural | |||
19 | delete pRoot; | 21 | delete pRoot; |
20 | } | 22 | } |
21 | 23 | ||
22 | 24 | static Network<sigtype> *fromStr( const Bu::String &sCode ) | |
25 | { | ||
26 | Network<sigtype> *pNet = new Network<sigtype>(); | ||
27 | return pNet; | ||
28 | } | ||
23 | 29 | ||
24 | private: | 30 | private: |
25 | Node<sigtype> *pRoot; | 31 | Node<sigtype> *pRoot; |
diff --git a/src/tests/pic.cpp b/src/tests/pic.cpp new file mode 100644 index 0000000..89bfcaf --- /dev/null +++ b/src/tests/pic.cpp | |||
@@ -0,0 +1,7 @@ | |||
1 | #include "neural/network.h" | ||
2 | |||
3 | int main( int argc, char *argv[] ) | ||
4 | { | ||
5 | return 0; | ||
6 | } | ||
7 | |||
diff --git a/tests/.gitignore b/tests/.gitignore new file mode 100644 index 0000000..120f485 --- /dev/null +++ b/tests/.gitignore | |||
@@ -0,0 +1,2 @@ | |||
1 | * | ||
2 | !/.gitignore | ||