Commit c9d60d98 authored by Davis King's avatar Davis King

Fixed compile time bug and also made it so you can set all the targets at once.

parent c4e4cd00
......@@ -117,7 +117,7 @@ namespace dlib
matrix<double,S,S> temp = diagm(Q);
for (unsigned long c = 0; c < horizon; ++c)
{
lambda += trans(B)*temp*B;
lambda += trace(trans(B)*temp*B);
temp = trans(A)*temp*A + diagm(Q);
}
......@@ -153,6 +153,14 @@ namespace dlib
target[time] = val;
}
void set_target (
const matrix<double,S,1>& val
)
{
for (unsigned long i = 0; i < horizon; ++i)
target[i] = val;
}
void set_last_target (
const matrix<double,S,1>& val
)
......
......@@ -188,6 +188,15 @@ namespace dlib
- #get_target(time) == val
!*/
void set_target (
const matrix<double,S,1>& val
);
/*!
ensures
- for all valid t:
- #get_target(t) == val
!*/
void set_last_target (
const matrix<double,S,1>& val
);
......
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