| 134 | public: |
| 135 | |
| 136 | image_potts_problem ( |
| 137 | long nr_, |
| 138 | long nc_, |
| 139 | dlib::rand& rnd |
| 140 | ) : nr(nr_), nc(nc_) |
| 141 | { |
| 142 | rect = rectangle(0,0,nc-1,nr-1); |
| 143 | inner_rect = shrink_rect(rect,1); |
| 144 | const unsigned long num_nodes = nr*nc; |
| 145 | factors1 = -7*(randm(num_nodes, 1, rnd)); |
| 146 | factors2 = randm(num_nodes, 4, rnd) > 0.5; |
| 147 | |
| 148 | //factors1 = 0; |
| 149 | //set_rowm(factors1, range(0, factors1.nr()/2)) = -1; |
| 150 | |
| 151 | labels.set_size(num_nodes); |
| 152 | labels = FREE_NODE; |
| 153 | |
| 154 | count = 0; |
| 155 | } |
| 156 | |
| 157 | ~image_potts_problem() |
| 158 | { |
nothing calls this directly
no test coverage detected