Commit b0cab391 authored by Davis King's avatar Davis King

Added some more tests

parent 686ee801
......@@ -361,6 +361,25 @@ namespace
make_data<graph_type>(samples, labels);
test1<node_vector_type,edge_vector_type,vector_type>(samples, labels);
}
print_spinner();
// test with dense vectors and sparse vectors together
{
typedef matrix<double,3,1> node_vector_type;
typedef matrix<double,2,1> edge_vector_type;
typedef std::map<unsigned long,double> vector_type;
typedef dlib::graph<node_vector_type, edge_vector_type>::kernel_1a_c graph_type;
dlib::array<graph_type> samples;
std::vector<std::vector<node_label> > labels;
make_data<graph_type>(samples, labels);
make_data<graph_type>(samples, labels);
make_data<graph_type>(samples, labels);
make_data<graph_type>(samples, labels);
test1<node_vector_type,edge_vector_type,vector_type>(samples, labels);
}
print_spinner();
......@@ -421,6 +440,25 @@ namespace
make_data2_sparse<graph_type>(samples, labels);
test1<node_vector_type,edge_vector_type,vector_type>(samples, labels);
}
print_spinner();
// test with sparse vectors and dense mix
{
typedef matrix<double,0,1> vector_type;
typedef std::map<unsigned long, double> edge_vector_type;
typedef std::map<unsigned long, double> node_vector_type;
typedef dlib::graph<node_vector_type, edge_vector_type>::kernel_1a_c graph_type;
dlib::array<graph_type> samples;
std::vector<std::vector<node_label> > labels;
make_data2_sparse<graph_type>(samples, labels);
make_data2_sparse<graph_type>(samples, labels);
make_data2_sparse<graph_type>(samples, labels);
make_data2_sparse<graph_type>(samples, labels);
test1<node_vector_type,edge_vector_type,vector_type>(samples, labels);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment