BayesOpt
ublas_extra.cpp
1 /*
2 -----------------------------------------------------------------------------
3  Copyright (C) 2011 Ruben Martinez-Cantin <rmcantin@unizar.es>
4 
5  This program is free software: you can redistribute it and/or modify
6  it under the terms of the GNU Affero General Public License as published by
7  the Free Software Foundation, either version 3 of the License, or
8  (at your option) any later version.
9 
10  This program is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU Affero General Public License for more details.
14 
15  You should have received a copy of the GNU Affero General Public License
16  along with this program. If not, see <http://www.gnu.org/licenses/>.
17 -----------------------------------------------------------------------------
18 */
19 
20 #include "ublas_extra.hpp"
21 
22 
23 namespace bayesopt
24 {
25  namespace utils
26  {
27  boost::numeric::ublas::vector<double> array2vector(const double array[],
28  const size_t n)
29  {
30  boost::numeric::ublas::vector<double> v(n);
31  std::copy(array, array+n, v.begin());
32  return v;
33  }
34 
35  } // namespace utils
36 } //namespace bayesopt
Namespace of the library interface.
Definition: using.dox:1
Extra functions for Ublas library.