Commit 6ffc779a authored by Jakub Klinkovský's avatar Jakub Klinkovský
Browse files

Remove useless vector2str function

parent 64b86185
Loading
Loading
Loading
Loading
+3 −22
Original line number Diff line number Diff line
@@ -717,25 +717,6 @@ namespace gdc
            return fval;
        }

        std::string vector2str(const Vector &vec) const
        {
            std::stringstream ss1;
            ss1 << std::fixed << std::showpoint << std::setprecision(6);
            std::stringstream ss2;
            ss2 << '[';
            for(Index i = 0; i < vec.getSize(); ++i)
            {
                ss1 << vec(i);
                ss2 << std::setfill(' ') << std::setw(10) << ss1.str();
                if(i != vec.getSize() - 1)
                    ss2 << ' ';
                ss1.str("");
            }
            ss2 << ']';

            return ss2.str();
        }

    public:

        GradientDescent()
@@ -857,11 +838,11 @@ namespace gdc
                    ss << "    fval=" << fval;

                    if(verbosity_ > 1)
                        ss << "    xval=" << vector2str(xval);
                        ss << "    xval=" << xval;
                    if(verbosity_ > 2)
                        ss << "    gradient=" << vector2str(gradient);
                        ss << "    gradient=" << gradient;
                    if(verbosity_ > 3)
                        ss << "    step=" << vector2str(step);
                        ss << "    step=" << step;
                    std::cout << ss.str() << std::endl;
                }