/** * @brief Gets the cross differences between the training and test inputs. * @param [in] pXs The M test inputs * @param [in] coord Corresponding coordinate * @return An matrix pointer * \f[ * \mathbf{D} \in \mathbb{R}^{N \times M}, \quad * \mathbf{D}_{ij} = \mathbf{x}_i^c - \mathbf{z}_j^c * \f] * @todo Include this matrix as a member variable like m_pDeltaXXList */ MatrixPtr pDeltaXXs(const TestData<Scalar> &testData, const int coord) const { assert(m_pX && testData.M() > 0); assert(D() == testData.D()); return PairwiseOp<Scalar>::delta(m_pX, testData.pXs(), coord); // NxM }
/** * @brief Gets the cross squared distances between the training and test inputs * @param [in] pXs The M test inputs * @return An matrix pointer * \f[ * \mathbf{R^2} \in \mathbb{R}^{N \times M}, \quad * \mathbf{R^2}_{ij} = (\mathbf{x}_i - \mathbf{z}_j)^\text{T}(\mathbf{x}_i - \mathbf{z}_j) * \f] * @todo Include this matrix as a member variable like m_pSqDistXX */ MatrixPtr pSqDistXXs(const TestData<Scalar> &testData) const { assert(m_pX && testData.M() > 0); assert(D() == testData.D()); return PairwiseOp<Scalar>::sqDist(m_pX, testData.pXs()); // NxM }