void evaluate(
            const ConstGeometricalDataSlice<CoordinateType>& /* trialGeomData */,
            const CollectionOf2dSlicesOfConst4dArrays<KernelType>& kernelValues,
            const CollectionOf1dSlicesOfConstNdArrays<TrialValueType>& trialValues,
            std::vector<ResultType>& result) const {
#       ifndef NDEBUG
        const int dimWorld = 3;
#       endif

        // Assert that there is at least one vector-valued kernel
        assert(kernelValues.size() >= 1);
        assert(kernelValues[0].extent(0) == 3);
        assert(kernelValues[0].extent(1) == 1);

        // Assert that there are is at least one trial transformations
        // (function value)
        assert(trialValues.size() >= 1);
        assert(trialValues[0].extent(0) == 3);

        // Assert that the result vector is three-dimensional
        assert(result.size() == dimWorld);

        result[0] = kernelValues[0](1, 0) * trialValues[0](2) -
                    kernelValues[0](2, 0) * trialValues[0](1);
        result[1] = kernelValues[0](2, 0) * trialValues[0](0) -
                    kernelValues[0](0, 0) * trialValues[0](2);
        result[2] = kernelValues[0](0, 0) * trialValues[0](1) -
                    kernelValues[0](1, 0) * trialValues[0](0);
    }
    // It is possible that this function could be generalised to
    // multiple basis transformations or kernels and that the additional
    // loops could be optimised away by the compiler.
    ResultType evaluate(
            const ConstGeometricalDataSlice<CoordinateType>& /* trialGeomData */,
            const CollectionOf2dSlicesOfConst4dArrays<KernelType>& kernelValues,
            const CollectionOf1dSlicesOfConst2dArrays<ResultType>&
            weightedTransformedTrialValues) const {
        // Assert that there is at least one scalar-valued kernel
        assert(kernelValues.size() >= 1);
        assert(kernelValues[0].extent(0) == 1);
        assert(kernelValues[0].extent(1) == 1);

        // Assert that there is at least one scalar weighted trial
        // transformation
        assert(weightedTransformedTrialValues.size() >= 1);
#ifndef NDEBUG
        const int transformationDim = weightedTransformedTrialValues[0].extent(0);
        assert(transformationDim == 1);
#endif

        return weightedTransformedTrialValues[0](0) * kernelValues[0](0, 0);
    }