|
Latin Hypercube Samples (lhs)
1.0
R, C++, and Rcpp code to generate Latin hypercube samples
|
#include <vector>#include <algorithm>Go to the source code of this file.
Functions | |
| template<class T > | |
| bool | bclib::findranksCompare (const std::pair< T, int > first, const std::pair< T, int > second) |
| template<class T > | |
| void | bclib::findorder_zero (const std::vector< T > &v, std::vector< int > &order) |
| template<class T > | |
| void | bclib::findorder (const std::vector< T > &v, std::vector< int > &order) |
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
| void bclib::findorder | ( | const std::vector< T > & | v, |
| std::vector< int > & | order | ||
| ) |
Find the order of each vector element (one based)
| T | numeric argument that can be ordered |
| v | the vector to be ranked |
| order | the order of the elements |
| void bclib::findorder_zero | ( | const std::vector< T > & | v, |
| std::vector< int > & | order | ||
| ) |
Find the order of each vector element (zero based)
| T | numeric argument that can be ordered |
| v | the vector to be ordered |
| order | the order of the elements |
| bool bclib::findranksCompare | ( | const std::pair< T, int > | first, |
| const std::pair< T, int > | second | ||
| ) |
Comparison operator to use in the findranks method
| first | the first pair of arguments (value, rank) |
| second | the second pair of arguments (value, rank) |