Skip to content

Commit be1d8fa

Browse files
committed
Clean up the last few proxy functions.
1 parent 74219d2 commit be1d8fa

2 files changed

Lines changed: 2 additions & 44 deletions

File tree

include/ensmallen_bits/utility/proxies.hpp

Lines changed: 0 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -159,50 +159,6 @@ struct ForwardTypeHelper<ElemType, true>
159159
};
160160
#endif
161161

162-
// Proxy for `arma::shuffle` or `coot::shuffle` based on the data type.
163-
template<typename MatType>
164-
typename std::enable_if<
165-
IsCootType<MatType>::value, typename ForwardType<MatType>::uvec>::type
166-
sort_index(const MatType& input)
167-
{
168-
#ifdef USE_COOT
169-
return coot::sort_index(input);
170-
#else
171-
return arma::sort_index(input);
172-
#endif
173-
}
174-
175-
// Armadillo proxy for `arma::sort_index` if `MatType` is not a Coot type.
176-
template<typename MatType>
177-
typename std::enable_if<
178-
!IsCootType<MatType>::value, typename ForwardType<MatType>::uvec>::type
179-
sort_index(const MatType& input)
180-
{
181-
return arma::sort_index(input);
182-
}
183-
184-
// Proxy for `arma::linspace` or `coot::linspace` based on the data type.
185-
template<typename OutputType>
186-
inline static typename std::enable_if<
187-
!arma::is_arma_type<OutputType>::value, OutputType>::type
188-
linspace(const double start, const double end, const size_t num = 100u)
189-
{
190-
#ifdef USE_COOT
191-
return coot::linspace<OutputType>(start, end, num);
192-
#else
193-
return arma::linspace<OutputType>(start, end, num);
194-
#endif
195-
}
196-
197-
// Armadillo proxy for `arma::linspace` if `OutputType` is an Armadillo type.
198-
template<typename OutputType>
199-
inline static typename std::enable_if<
200-
arma::is_arma_type<OutputType>::value, OutputType>::type
201-
linspace(const double start, const double end, const size_t num = 100u)
202-
{
203-
return arma::linspace<OutputType>(start, end, num);
204-
}
205-
206162
} // namespace ens
207163

208164
#endif

include/ensmallen_bits/utility/using.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ using coot::dot;
3434
using coot::exp;
3535
using coot::join_cols;
3636
using coot::join_rows;
37+
using coot::linspace;
3738
using coot::log;
3839
using coot::max;
3940
using coot::mean;
@@ -78,6 +79,7 @@ using arma::dot;
7879
using arma::exp;
7980
using arma::join_cols;
8081
using arma::join_rows;
82+
using arma::linspace;
8183
using arma::log;
8284
using arma::max;
8385
using arma::mean;

0 commit comments

Comments
 (0)