61 const InputTypeT1& inputA,
62 const InputTypeT2& inputB)
71 typedef typename InputType::value_type InputValueType;
72 std::vector<InputValueType> tempInputA;
73 std::vector<InputValueType> tempInputB;
74 tempInputA.reserve(inputA.size());
75 tempInputB.reserve(inputB.size());
76 for (std::size_t index = 0; index < inputA.size(); ++index)
79 if (!boost::math::isnan(inputA(index)) && !boost::math::isnan(inputB(index)))
81 tempInputA.push_back(inputA(index));
82 tempInputB.push_back(inputB(index));
86 SIZE_CHECK(tempInputA.size() == tempInputB.size());
90 std::copy(tempInputA.begin(),tempInputA.end(),validInputA.begin());
91 std::copy(tempInputB.begin(),tempInputB.end(),validInputB.begin());
94 return kernelFunction.
eval(validInputA, validInputB);
108 const InputTypeT1& inputA,
109 const InputTypeT2& inputB,
110 InputTypeT3
const& missingness)
122 typedef typename InputType::value_type InputValueType;
123 std::vector<InputValueType> tempInputA;
124 std::vector<InputValueType> tempInputB;
125 tempInputA.resize(inputA.size());
126 tempInputB.resize(inputB.size());
127 for (std::size_t index = 0; index < inputA.size(); ++index)
129 if (!boost::math::isnan(inputA(index)) && !boost::math::isnan(inputB(index)) && !boost::math::isnan(missingness(index)))
131 tempInputA.push_back(inputA(index));
132 tempInputB.push_back(inputB(index));
136 SIZE_CHECK(tempInputA.size() == tempInputB.size());
138 InputType validInputA(tempInputA.size());
139 InputType validInputB(tempInputA.size());
140 for (std::size_t i = 0; i < tempInputA.size(); ++i)
142 validInputA(i) = tempInputA[i];
143 validInputB(i) = tempInputB[i];
147 return kernelFunction.
eval(validInputA, validInputB);