SyTen

◆ isParallel() [1/2]

template<Rank rank, typename Scalar >
std::tuple< ParallelKind, typename ScalarBase< Scalar >::type, typename ScalarBase< Scalar >::type > syten::isParallel ( DenseTensor< rank, Scalar > const &  a,
DenseTensor< rank, Scalar > const &  b 
)
inline

Checks if two tensors are parallel, i.e. \( a_i = c \; b_i \quad \forall i \).

Parameters
afirst tensor
bsecond tensor
Returns
a tuple {ParallelKind, c_nominator, c_denominator}

The second tensor multiplied by \( c \) will give the first tensor if the two tensors are parallel.

References syten::STensorImpl::imag(), std::make_tuple(), overlap(), overThreshold(), and SYTEN_ZNORM_THRESHOLD_SQD.

Referenced by checkedAddParallel().

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