| 631 | Datum float8arr_l1norm(PG_FUNCTION_ARGS); |
| 632 | PG_FUNCTION_INFO_V1( float8arr_l1norm); |
| 633 | Datum float8arr_l1norm(PG_FUNCTION_ARGS) { |
| 634 | ArrayType *array = PG_GETARG_ARRAYTYPE_P(0); |
| 635 | SparseData sdata = sdata_uncompressed_from_float8arr_internal(array); |
| 636 | double result = l1norm_sdata_values_double(sdata); |
| 637 | pfree(sdata); |
| 638 | |
| 639 | if (IS_NVP(result)) PG_RETURN_NULL(); |
| 640 | |
| 641 | PG_RETURN_FLOAT8(result); |
| 642 | } |
| 643 | |
| 644 | /** |
| 645 | * float8arr_summate - sums up all the elements of a float8 array |
nothing calls this directly
no test coverage detected