toJson method

  1. @override
Object toJson()
override

Implementation

@override
Object toJson() => {
  if (rrf case final rrf?) 'rrf': rrf.toJson(),
  if (datapoint case final datapoint?) 'datapoint': datapoint.toJson(),
  if (neighborCount.isNotDefault) 'neighborCount': neighborCount,
  if (perCrowdingAttributeNeighborCount.isNotDefault)
    'perCrowdingAttributeNeighborCount': perCrowdingAttributeNeighborCount,
  if (approximateNeighborCount.isNotDefault)
    'approximateNeighborCount': approximateNeighborCount,
  if (fractionLeafNodesToSearchOverride.isNotDefault)
    'fractionLeafNodesToSearchOverride': encodeDouble(
      fractionLeafNodesToSearchOverride,
    ),
};