SyTen

◆ mve()

template<typename First , typename... Rest>
Vec<std::decay_t<First> > syten::mve ( First &&  f,
Rest &&...  rest 
)

Helper function to _m_ake a _v_ector from some _e_lements while potentially moving out of those elements.

Remarks
Using a std::initializer_list implies a copy.
Overloading a constructor leads to confusion between Vec(5, -1) being either [-1, -1, -1, -1, -1] or [5, -1] when considering the constructors of std::vector.

References std::vector< T >::emplace_back(), and std::vector< T >::reserve().

Referenced by syten::STensorImpl::add_dummy_leg(), syten::STensorImpl::Autodiff::create_primer(), syten::STensorImpl::Autodiff::create_product_differentiable(), syten::STensorImpl::STensor::enable_autodiff(), syten::STensorImpl::exp(), syten::STensorImpl::flip_in_product(), syten::STensorImpl::flip_on_tensor(), syten::STensorImpl::imag(), syten::STensorImpl::invert_diagonal(), syten::STensorImpl::normSqd(), syten::STensorImpl::STensorProxy::operator STensor(), syten::STensorImpl::operator*=(), syten::STensorImpl::operator+=(), syten::STensorImpl::operator/=(), syten::STensorImpl::STensorProxy::parity(), syten::STensorImpl::prod(), syten::STensorImpl::project(), syten::STensorImpl::qr(), syten::STensorImpl::randomise_blocks(), syten::STensorImpl::real(), syten::STensorImpl::remove_dummy_leg(), syten::STensorImpl::sqrt(), syten::STensorImpl::STensorProxy::STensorProxy(), syten::STensorImpl::svd(), and syten::STensorImpl::trace().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: