OrcaSlicer latest
OrcaSlicer
Loading...
Searching...
No Matches
Slic3r::opt::detail Namespace Reference

Classes

struct  AlgBurteForce
struct  NLoptAlg
struct  NLoptAlgComb
struct  IsNLoptAlg
struct  IsNLoptAlg< NLoptAlg< a > >
struct  IsNLoptAlg< NLoptAlgComb< a1, a2 > >
struct  NLopt
class  NLoptOpt
class  NLoptOpt< NLoptAlg< alg > >
class  NLoptOpt< NLoptAlgComb< glob, loc > >

Typedefs

template<class M, class T = void>
using NLoptOnly = std::enable_if_t<IsNLoptAlg<M>::value, T>

Enumerations

enum class  OptDir { MIN , MAX }

Functions

template<size_t N>
long num_iter (const std::array< size_t, N > &idx, size_t gridsz)
template<size_t N, class T>
auto to_arr (const T *a)
template<size_t N, class T>
auto to_arr (const T(&a)[N])

Class Documentation

◆ Slic3r::opt::detail::NLoptAlg

struct Slic3r::opt::detail::NLoptAlg
template<nlopt_algorithm alg>
struct Slic3r::opt::detail::NLoptAlg< alg >
Inheritance diagram for Slic3r::opt::detail::NLoptAlg< alg >:

◆ Slic3r::opt::detail::NLoptAlgComb

struct Slic3r::opt::detail::NLoptAlgComb
template<nlopt_algorithm gl_alg, nlopt_algorithm lc_alg = NLOPT_LN_NELDERMEAD>
struct Slic3r::opt::detail::NLoptAlgComb< gl_alg, lc_alg >
Inheritance diagram for Slic3r::opt::detail::NLoptAlgComb< gl_alg, lc_alg >:

◆ Slic3r::opt::detail::NLoptOpt

class Slic3r::opt::detail::NLoptOpt
template<class Method>
class Slic3r::opt::detail::NLoptOpt< Method >
Inheritance diagram for Slic3r::opt::detail::NLoptOpt< Method >:

Typedef Documentation

◆ NLoptOnly

template<class M, class T = void>
using Slic3r::opt::detail::NLoptOnly = std::enable_if_t<IsNLoptAlg<M>::value, T>

Enumeration Type Documentation

◆ OptDir

enum class Slic3r::opt::detail::OptDir
strong
Enumerator
MIN 
MAX 
53{ MIN, MAX }; // Where to optimize
#define MAX(a, b)
Definition Scrollbar.hpp:18
@ MIN
Definition NLoptOptimizer.hpp:53

Function Documentation

◆ num_iter()

template<size_t N>
long Slic3r::opt::detail::num_iter ( const std::array< size_t, N > & idx,
size_t gridsz )
19{
20 long ret = 0;
21 for (size_t i = 0; i < N; ++i) ret += idx[i] * std::pow(gridsz, i);
22 return ret;
23}

Referenced by Slic3r::opt::detail::AlgBurteForce::run().

Here is the caller graph for this function:

◆ to_arr() [1/2]

template<size_t N, class T>
auto Slic3r::opt::detail::to_arr ( const T * a)
161{
162 std::array<T, N> r;
163 std::copy(a, a + N, std::begin(r));
164 return r;
165}

Referenced by Slic3r::opt::bounds(), Slic3r::opt::initvals(), Slic3r::opt::detail::NLoptOpt< NLoptAlg< alg > >::optfunc(), Slic3r::opt::score_gradient(), and to_arr().

Here is the caller graph for this function:

◆ to_arr() [2/2]

template<size_t N, class T>
auto Slic3r::opt::detail::to_arr ( const T(&) a[N])
168{
169 return to_arr<N>(static_cast<const T *>(a));
170}
auto to_arr(const T *a)
Definition Optimizer.hpp:160

References to_arr().

Here is the call graph for this function: