Skip to content
Snippets Groups Projects
Commit ea4ebfb2 authored by David Vojtek's avatar David Vojtek
Browse files

Fix of Unit_tests

parent 8e7cf56e
No related branches found
No related tags found
No related merge requests found
......@@ -31,10 +31,36 @@ add_library(boost_unit_test SHARED tests/boost_test_lib_dummy.cpp)
add_executable(neuron_test tests/neuron_test.cpp)
target_link_libraries(neuron_test boost_unit_test neuron)
add_executable(linear_neuron_test tests/NeuronLinear_test.cpp tests/NeuronBinary_test.cpp tests/NeuronLogistic_test.cpp tests/NeuronTanh.cpp tests/ConnectionWeight_test.cpp tests/Connection_test.cpp tests/NeuralNetwork_test.cpp tests/ConnectionWeightIdentity_test.cpp tests/ParticleSwarm_test.cpp tests/Particle_test.cpp)
add_executable(linear_neuron_test tests/NeuronLinear_test.cpp)
target_link_libraries(linear_neuron_test boost_unit_test neuron)
add_executable(test_cases main.cpp)
add_executable(binary_neuron_test tests/NeuronBinary_test.cpp)
target_link_libraries(binary_neuron_test boost_unit_test neuron)
add_executable(logistic_neuron_test tests/NeuronLogistic_test.cpp)
target_link_libraries(logistic_neuron_test boost_unit_test neuron)
add_executable(tanh_neuron_test tests/NeuronTanh.cpp)
target_link_libraries(tanh_neuron_test boost_unit_test neuron)
add_executable(connection_weight_test tests/ConnectionWeight_test.cpp)
target_link_libraries(connection_weight_test boost_unit_test neuron)
add_executable(connection_test tests/Connection_test.cpp)
target_link_libraries(connection_test boost_unit_test neuron)
add_executable(neural_network_test tests/NeuralNetwork_test.cpp)
target_link_libraries(neural_network_test boost_unit_test neuron)
add_executable(connection_weight_identity_test tests/ConnectionWeightIdentity_test.cpp)
target_link_libraries(connection_weight_identity_test boost_unit_test neuron)
add_executable(particle_swarm_test tests/ParticleSwarm_test.cpp)
target_link_libraries(particle_swarm_test boost_unit_test neuron particle_swarm)
add_executable(particle_test tests/Particle_test.cpp)
target_link_libraries(particle_test boost_unit_test neuron particle_swarm)
add_executable(test_cases main.cpp)
target_link_libraries(test_cases neuron particle_swarm boost_serialization)
......@@ -307,7 +307,7 @@ double* ParticleSwarm::get_centroid_coordinates() {
return coords;
}
double ParticleSwarm::get_euclidean_distance(double* a, double* b, int n) {
double ParticleSwarm::get_euclidean_distance(double* a, double* b, unsigned int n) {
double dist = 0;
for(unsigned int i = 0; i < n; i++) {
if((a[i]-b[i]) * (a[i]-b[i]) > 1000) {
......
......@@ -124,7 +124,7 @@ protected:
* @param n
* @return
*/
double get_euclidean_distance(double* a, double* b, int n);
double get_euclidean_distance(double* a, double* b, unsigned int n);
public:
......
......@@ -41,17 +41,17 @@ protected:
/**
* Number of parameters of the activation function
*/
int n_activation_function_parameters = 0;
unsigned int n_activation_function_parameters = 0;
/**
* Keeps track of the number of saturated INCOMING connections
*/
int n_saturated_connections_in = 0;
unsigned int n_saturated_connections_in = 0;
/**
* Keeps track of the number of saturated OUTGOING connections
*/
int n_saturated_connections_out = 0;
unsigned int n_saturated_connections_out = 0;
/**
* A pointer to a vector containing pointers to incoming connections
......
......@@ -17,7 +17,7 @@
double test_particle_swarm_neural_net_error_function(double *weights){
return 0;
}
BOOST_AUTO_TEST_SUITE(ParticleSwarm_test)
......
......@@ -17,7 +17,7 @@
double test_particle_function(double *weights){
return 0;
}
BOOST_AUTO_TEST_SUITE(Particle_test)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment