Turi Create
4.0
ec_permute.hpp
1
/* Copyright © 2017 Apple Inc. All rights reserved.
2
*
3
* Use of this source code is governed by a BSD-3-clause license that can
4
* be found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause
5
*/
6
#ifndef SFRAME_ALGORITHM_EC_PERMUTE_HPP
7
#define SFRAME_ALGORITHM_EC_PERMUTE_HPP
8
9
10
#include <vector>
11
#include <memory>
12
/*
13
* See ec_sort.hpp for details
14
*/
15
namespace
turi
{
16
class
sframe;
17
18
template
<
typename
T>
19
class
sarray;
20
21
namespace
query_eval {
22
23
/**
24
* \ingroup sframe_query_engine
25
* \addtogroup Algorithms Algorithms
26
* \{
27
*/
28
/**
29
* Permutes an sframe by a forward map.
30
* forward_map has the same length as the sframe and must be a permutation
31
* of all the integers [0, len-1].
32
*
33
* The input sframe is then permuted so that sframe row i is written to row
34
* forward_map[i] of the returned sframe.
35
*
36
* \note The forward_map is not checked that it is a valid permutation
37
* If the constraints is not met, either an exception will be thrown, or
38
* the result is ill-defined.
39
*/
40
sframe
permute_sframe
(
sframe
&values_sframe,
41
std::shared_ptr<
sarray<flexible_type>
> forward_map);
42
43
/// \}
44
}
// query_eval
45
}
// turicreate
46
47
#endif
turi::sframe
Definition:
sframe.hpp:67
turi::sarray
Definition:
gl_sarray.hpp:30
turi
SKD.
Definition:
capi_initialization.hpp:11
turi::query_eval::permute_sframe
sframe permute_sframe(sframe &values_sframe, std::shared_ptr< sarray< flexible_type > > forward_map)
core
storage
query_engine
algorithm
ec_permute.hpp
Generated by
1.8.13