1 /* Copyright 2017-2021 PaGMO development team 2 3 This file is part of the PaGMO library. 4 5 The PaGMO library is free software; you can redistribute it and/or modify 6 it under the terms of either: 7 8 * the GNU Lesser General Public License as published by the Free 9 Software Foundation; either version 3 of the License, or (at your 10 option) any later version. 11 12 or 13 14 * the GNU General Public License as published by the Free Software 15 Foundation; either version 3 of the License, or (at your option) any 16 later version. 17 18 or both in parallel, as here. 19 20 The PaGMO library is distributed in the hope that it will be useful, but 21 WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 22 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 23 for more details. 24 25 You should have received copies of the GNU General Public License and the 26 GNU Lesser General Public License along with the PaGMO library. If not, 27 see https://www.gnu.org/licenses/. */ 28 29 #ifndef PAGMO_TYPES_HPP 30 #define PAGMO_TYPES_HPP 31 32 #include <tuple> 33 #include <utility> 34 #include <vector> 35 36 /// Root PaGMO namespace. 37 namespace pagmo 38 { 39 40 /// Alias for an <tt>std::vector</tt> of <tt>double</tt>s. 41 typedef std::vector<double> vector_double; 42 43 /// Alias for an <tt>std::vector</tt> of <tt>std::pair</tt>s of the size type of pagmo::vector_double. 44 typedef std::vector<std::pair<vector_double::size_type, vector_double::size_type>> sparsity_pattern; 45 46 /// Population size type. 47 /** 48 * This unsigned integral types is used to represent the size 49 * of a pagmo::population, and, more generally, of collections 50 * of decision vectors, fitness vectors, etc. 51 */ 52 typedef std::vector<vector_double>::size_type pop_size_t; 53 54 #if !defined(PAGMO_DOXYGEN_INVOKED) 55 56 // A group of individuals: IDs, dvs and fvs. 57 using individuals_group_t 58 = std::tuple<std::vector<unsigned long long>, std::vector<vector_double>, std::vector<vector_double>>; 59 60 #endif 61 62 } // namespace pagmo 63 64 #endif 65