Versions in this module Expand all Collapse all v3 v3.0.0 Mar 11, 2024 Changes in this version + const DefaultBranchingFactor + const DefaultTreeHeight + var LargestRepresentableDelta = 1 - math.Pow(2, -53) + func ClampFloat64(e, lower, upper float64) (float64, error) + func ClampInt64(e, lower, upper int64) (int64, error) + type BoundedMean struct + Count Count + NormalizedSum BoundedSumFloat64 + func NewBoundedMean(opt *BoundedMeanOptions) (*BoundedMean, error) + func (bm *BoundedMean) Add(e float64) error + func (bm *BoundedMean) ComputeConfidenceInterval(alpha float64) (noise.ConfidenceInterval, error) + func (bm *BoundedMean) GobDecode(data []byte) error + func (bm *BoundedMean) GobEncode() ([]byte, error) + func (bm *BoundedMean) Merge(bm2 *BoundedMean) error + func (bm *BoundedMean) Result() (float64, error) + type BoundedMeanOptions struct + Delta float64 + Epsilon float64 + Lower float64 + MaxContributionsPerPartition int64 + MaxPartitionsContributed int64 + Noise noise.Noise + Upper float64 + type BoundedQuantiles struct + Noise noise.Noise + func NewBoundedQuantiles(opt *BoundedQuantilesOptions) (*BoundedQuantiles, error) + func (bq *BoundedQuantiles) Add(e float64) error + func (bq *BoundedQuantiles) GobDecode(data []byte) error + func (bq *BoundedQuantiles) GobEncode() ([]byte, error) + func (bq *BoundedQuantiles) Merge(bq2 *BoundedQuantiles) error + func (bq *BoundedQuantiles) Result(rank float64) (float64, error) + type BoundedQuantilesOptions struct + BranchingFactor int + Delta float64 + Epsilon float64 + Lower float64 + MaxContributionsPerPartition int64 + MaxPartitionsContributed int64 + Noise noise.Noise + TreeHeight int + Upper float64 + type BoundedStandardDeviation struct + Variance BoundedVariance + func NewBoundedStandardDeviation(opt *BoundedStandardDeviationOptions) (*BoundedStandardDeviation, error) + func (bstdv *BoundedStandardDeviation) Add(e float64) error + func (bstdv *BoundedStandardDeviation) GobDecode(data []byte) error + func (bstdv *BoundedStandardDeviation) GobEncode() ([]byte, error) + func (bstdv *BoundedStandardDeviation) Merge(bstdv2 *BoundedStandardDeviation) error + func (bstdv *BoundedStandardDeviation) Result() (float64, error) + type BoundedStandardDeviationOptions struct + Delta float64 + Epsilon float64 + Lower float64 + MaxContributionsPerPartition int64 + MaxPartitionsContributed int64 + Noise noise.Noise + Upper float64 + type BoundedSumFloat64 struct + Noise noise.Noise + func NewBoundedSumFloat64(opt *BoundedSumFloat64Options) (*BoundedSumFloat64, error) + func (bs *BoundedSumFloat64) Add(e float64) error + func (bs *BoundedSumFloat64) ComputeConfidenceInterval(alpha float64) (noise.ConfidenceInterval, error) + func (bs *BoundedSumFloat64) GobDecode(data []byte) error + func (bs *BoundedSumFloat64) GobEncode() ([]byte, error) + func (bs *BoundedSumFloat64) Merge(bs2 *BoundedSumFloat64) error + func (bs *BoundedSumFloat64) Result() (float64, error) + func (bs *BoundedSumFloat64) ThresholdedResult(thresholdDelta float64) (*float64, error) + type BoundedSumFloat64Options struct + Delta float64 + Epsilon float64 + Lower float64 + MaxPartitionsContributed int64 + Noise noise.Noise + Upper float64 + type BoundedSumInt64 struct + Noise noise.Noise + func NewBoundedSumInt64(opt *BoundedSumInt64Options) (*BoundedSumInt64, error) + func (bs *BoundedSumInt64) Add(e int64) error + func (bs *BoundedSumInt64) ComputeConfidenceInterval(alpha float64) (noise.ConfidenceInterval, error) + func (bs *BoundedSumInt64) GobDecode(data []byte) error + func (bs *BoundedSumInt64) GobEncode() ([]byte, error) + func (bs *BoundedSumInt64) Merge(bs2 *BoundedSumInt64) error + func (bs *BoundedSumInt64) Result() (int64, error) + func (bs *BoundedSumInt64) ThresholdedResult(thresholdDelta float64) (*int64, error) + type BoundedSumInt64Options struct + Delta float64 + Epsilon float64 + Lower int64 + MaxPartitionsContributed int64 + Noise noise.Noise + Upper int64 + type BoundedVariance struct + Count Count + NormalizedSum BoundedSumFloat64 + NormalizedSumOfSquares BoundedSumFloat64 + func NewBoundedVariance(opt *BoundedVarianceOptions) (*BoundedVariance, error) + func (bv *BoundedVariance) Add(e float64) error + func (bv *BoundedVariance) GobDecode(data []byte) error + func (bv *BoundedVariance) GobEncode() ([]byte, error) + func (bv *BoundedVariance) Merge(bv2 *BoundedVariance) error + func (bv *BoundedVariance) Result() (float64, error) + type BoundedVarianceOptions struct + Delta float64 + Epsilon float64 + Lower float64 + MaxContributionsPerPartition int64 + MaxPartitionsContributed int64 + Noise noise.Noise + Upper float64 + type Count struct + Noise noise.Noise + func NewCount(opt *CountOptions) (*Count, error) + func (c *Count) ComputeConfidenceInterval(alpha float64) (noise.ConfidenceInterval, error) + func (c *Count) GobDecode(data []byte) error + func (c *Count) GobEncode() ([]byte, error) + func (c *Count) Increment() error + func (c *Count) IncrementBy(count int64) error + func (c *Count) Merge(c2 *Count) error + func (c *Count) PreThresholdedResult(preThreshold int64, thresholdDelta float64) (*int64, error) + func (c *Count) Result() (int64, error) + func (c *Count) ThresholdedResult(thresholdDelta float64) (*int64, error) + type CountOptions struct + Delta float64 + Epsilon float64 + MaxPartitionsContributed int64 + Noise noise.Noise + type PreAggSelectPartition struct + func NewPreAggSelectPartition(opt *PreAggSelectPartitionOptions) (*PreAggSelectPartition, error) + func (s *PreAggSelectPartition) GetHardThreshold() (int, error) + func (s *PreAggSelectPartition) GobDecode(data []byte) error + func (s *PreAggSelectPartition) GobEncode() ([]byte, error) + func (s *PreAggSelectPartition) Increment() error + func (s *PreAggSelectPartition) IncrementBy(count int64) error + func (s *PreAggSelectPartition) Merge(s2 *PreAggSelectPartition) error + func (s *PreAggSelectPartition) ShouldKeepPartition() (bool, error) + type PreAggSelectPartitionOptions struct + Delta float64 + Epsilon float64 + MaxPartitionsContributed int64 + PreThreshold int64 v3.0.0-pre Mar 7, 2024 Other modules containing this package github.com/google/differential-privacy/go github.com/google/differential-privacy/go/v2