sparse_map2vec.hpp 1.4 KB

12345678910111213141516171819202122232425262728293031323334
  1. # ifndef CPPAD_CPPAD_IPOPT_SRC_SPARSE_MAP2VEC_HPP
  2. # define CPPAD_CPPAD_IPOPT_SRC_SPARSE_MAP2VEC_HPP
  3. /* --------------------------------------------------------------------------
  4. CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-16 Bradley M. Bell
  5. CppAD is distributed under the terms of the
  6. Eclipse Public License Version 2.0.
  7. This Source Code may also be made available under the following
  8. Secondary License when the conditions for such availability set forth
  9. in the Eclipse Public License, Version 2.0 are satisfied:
  10. GNU General Public License, Version 2.0 or later.
  11. ---------------------------------------------------------------------------- */
  12. // ---------------------------------------------------------------------------
  13. namespace cppad_ipopt {
  14. // ---------------------------------------------------------------------------
  15. /*!
  16. \file sparse_map2vec.hpp
  17. \brief Create a two vector sparsity representation from a vector of maps.
  18. \ingroup sparese_map2vec_cpp
  19. */
  20. extern void sparse_map2vec(
  21. const CppAD::vector< std::map<size_t, size_t> > sparse,
  22. size_t& n_nz ,
  23. CppAD::vector<size_t>& i_row ,
  24. CppAD::vector<size_t>& j_col
  25. );
  26. // ---------------------------------------------------------------------------
  27. } // end namespace cppad_ipopt
  28. // ---------------------------------------------------------------------------
  29. # endif