Exemplo n.º 1
0
Point inputDirection(const IFunction &f, bool assume1 = false)
{
    if (f.dimensions() > 1 && !assume1) {
        cout << "-- Input direction --" << endl;
        return PointHelper::inputPoint(f.dimensions());
    }
    else {
        vector<double> start = vector<double>(f.dimensions());
        for (vector<double>::iterator i = start.begin(); i != start.end(); ++i) {
            (*i) = 1;
        }
        return Point(start);
    }
}
Exemplo n.º 2
0
Point inputPoint(const IFunction &f)
{
    cout << "-- Input start point --" << endl;
    return PointHelper::inputPoint(f.dimensions());
}