Commit 0c6b95ef authored by Davis King's avatar Davis King

Simplified the code a little.

parent 9ab53f01
...@@ -198,7 +198,7 @@ namespace dlib ...@@ -198,7 +198,7 @@ namespace dlib
// accumulate the node vectors // accumulate the node vectors
if (label_i == true) if (label_i == true)
set_rowm(psi, range(edge_dims, psi.size()-1)) = rowm(psi, range(edge_dims, psi.size()-1)) + sample.node(i).data; set_rowm(psi, range(edge_dims, psi.size()-1)) += sample.node(i).data;
for (unsigned long n = 0; n < sample.node(i).number_of_neighbors(); ++n) for (unsigned long n = 0; n < sample.node(i).number_of_neighbors(); ++n)
{ {
...@@ -209,7 +209,7 @@ namespace dlib ...@@ -209,7 +209,7 @@ namespace dlib
// the labels disagree. // the labels disagree.
if (i < j && label_i != label_j) if (i < j && label_i != label_j)
{ {
set_rowm(psi, range(0, edge_dims-1)) = rowm(psi, range(0, edge_dims-1)) - sample.node(i).edge(n); set_rowm(psi, range(0, edge_dims-1)) -= sample.node(i).edge(n);
} }
} }
} }
......
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