mirror of
https://github.com/pgvector/pgvector.git
synced 2026-07-13 08:06:54 +08:00
Improved style [skip ci]
This commit is contained in:
@@ -404,8 +404,10 @@ ElkanKmeans(Relation index, VectorArray samples, VectorArray centers)
|
|||||||
/* Double avoids overflow, but requires more memory */
|
/* Double avoids overflow, but requires more memory */
|
||||||
/* TODO Update bounds */
|
/* TODO Update bounds */
|
||||||
for (k = 0; k < dimensions; k++)
|
for (k = 0; k < dimensions; k++)
|
||||||
|
{
|
||||||
if (isinf(vec->x[k]))
|
if (isinf(vec->x[k]))
|
||||||
vec->x[k] = vec->x[k] > 0 ? FLT_MAX : -FLT_MAX;
|
vec->x[k] = vec->x[k] > 0 ? FLT_MAX : -FLT_MAX;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user