mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-08 17:59:00 +08:00
Fixed type mixing issues.
This commit is contained in:
parent
b59f045c07
commit
e86adc87e9
@ -82,8 +82,8 @@ namespace Eigen
|
|||||||
{
|
{
|
||||||
typedef typename ParameterVectorType::Scalar Scalar;
|
typedef typename ParameterVectorType::Scalar Scalar;
|
||||||
|
|
||||||
const unsigned int numParameters = parameters.size();
|
DenseIndex numParameters = parameters.size();
|
||||||
const unsigned int numDerivatives = derivativeIndices.size();
|
DenseIndex numDerivatives = derivativeIndices.size();
|
||||||
|
|
||||||
if (numDerivatives < 1)
|
if (numDerivatives < 1)
|
||||||
{
|
{
|
||||||
@ -91,10 +91,10 @@ namespace Eigen
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int startIndex;
|
DenseIndex startIndex;
|
||||||
unsigned int endIndex;
|
DenseIndex endIndex;
|
||||||
|
|
||||||
unsigned int numInternalDerivatives = numDerivatives;
|
DenseIndex numInternalDerivatives = numDerivatives;
|
||||||
|
|
||||||
if (derivativeIndices[0] == 0)
|
if (derivativeIndices[0] == 0)
|
||||||
{
|
{
|
||||||
@ -117,12 +117,12 @@ namespace Eigen
|
|||||||
|
|
||||||
// There are (endIndex - startIndex + 1) knots obtained from the averaging
|
// There are (endIndex - startIndex + 1) knots obtained from the averaging
|
||||||
// and 2 for the first and last parameters.
|
// and 2 for the first and last parameters.
|
||||||
unsigned int numAverageKnots = endIndex - startIndex + 3;
|
DenseIndex numAverageKnots = endIndex - startIndex + 3;
|
||||||
KnotVectorType averageKnots(numAverageKnots);
|
KnotVectorType averageKnots(numAverageKnots);
|
||||||
averageKnots[0] = parameters[0];
|
averageKnots[0] = parameters[0];
|
||||||
|
|
||||||
int newKnotIndex = 0;
|
int newKnotIndex = 0;
|
||||||
for (unsigned int i = startIndex; i <= endIndex; ++i)
|
for (DenseIndex i = startIndex; i <= endIndex; ++i)
|
||||||
averageKnots[++newKnotIndex] = parameters.segment(i, degree).mean();
|
averageKnots[++newKnotIndex] = parameters.segment(i, degree).mean();
|
||||||
averageKnots[++newKnotIndex] = parameters[numParameters - 1];
|
averageKnots[++newKnotIndex] = parameters[numParameters - 1];
|
||||||
|
|
||||||
@ -135,7 +135,7 @@ namespace Eigen
|
|||||||
temporaryParameters[0] = averageKnots[i];
|
temporaryParameters[0] = averageKnots[i];
|
||||||
ParameterVectorType parameterIndices(numParameters);
|
ParameterVectorType parameterIndices(numParameters);
|
||||||
int temporaryParameterIndex = 1;
|
int temporaryParameterIndex = 1;
|
||||||
for (size_t j = 0; j < numParameters; ++j)
|
for (int j = 0; j < numParameters; ++j)
|
||||||
{
|
{
|
||||||
Scalar parameter = parameters[j];
|
Scalar parameter = parameters[j];
|
||||||
if (parameter >= averageKnots[i] && parameter < averageKnots[i + 1])
|
if (parameter >= averageKnots[i] && parameter < averageKnots[i + 1])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user