#include #include #include "tt.h" int main (int argc, char *argv[]) { typedef boost::multi_array array_type; typedef array_type::index index; array_type s_in(boost::extents[8][8]); // Assign values to the elements -- 1 to most, 0 to a few select ones for(index i = 0; i != 8; ++i) { for(index j = 0; j != 8; ++j) { s_in[i][j] = 1; } } s_in[0][6] = 0; s_in[0][7] = 0; s_in[1][7] = 0; s_in[6][0] = 0; s_in[7][0] = 0; s_in[7][1] = 0; float v_out; std::vector v_dist_out; tt(s_in, v_out, v_dist_out); // Show result printf("v_out=%f\n", v_out); printf("v_dist_out=[ "); for (int i = 0; i < v_dist_out.size(); i++) { printf("%f ", v_dist_out[i]); } printf(" ]\n"); }