init
This commit is contained in:
34
tests/01.cpp
Normal file
34
tests/01.cpp
Normal file
@@ -0,0 +1,34 @@
|
||||
#include "../src/Network"
|
||||
#include "../src/Problem"
|
||||
|
||||
#include <iostream>
|
||||
class X: public S::Problem
|
||||
{
|
||||
protected:
|
||||
std::vector<bool> representation() const
|
||||
{
|
||||
return std::vector<bool>({1,1});
|
||||
}
|
||||
};
|
||||
|
||||
int main()
|
||||
{
|
||||
S::FeedForwardNetwork n(2,3,2);
|
||||
S::Solution s =n.solve(X());
|
||||
if(s.size()!=2)
|
||||
{
|
||||
std::cout << "1";
|
||||
return 1;
|
||||
}
|
||||
if(s[0]!=1)
|
||||
{
|
||||
std::cout << "2";
|
||||
return 1;
|
||||
}
|
||||
if(s[1]!=1)
|
||||
{
|
||||
std::cout << "3";
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user