math

package
v0.0.9-alpha Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 18, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Copyright (c) Microsoft Corporation. Licensed under the MIT License.

Copyright (c) Microsoft Corporation. Licensed under the MIT License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PercentilesFloat64Reverse

func PercentilesFloat64Reverse(xs []float64, ps ...float64) []float64

PercentilesFloat64Reverse calculates the percentile of a slice of floats in reverse order. NOTE: The unit of each value of xs is 'bits' and the result is 'Mb'.

func RandomizedGroups

func RandomizedGroups(s []string, n int) [][]string

RandomizedGroups groups the given collection randomly into groups of size n

Types

type ReverseFloat64Slice

type ReverseFloat64Slice []float64

ReverseFloat64Slice is a type that implements the sort.Interface interface so that we can sort a slice of float64 in reverse order

func (ReverseFloat64Slice) Len

func (r ReverseFloat64Slice) Len() int

Len returns the length of the slice

func (ReverseFloat64Slice) Less

func (r ReverseFloat64Slice) Less(i, j int) bool

Less returns true if the element at index i is greater than the element at index j

func (ReverseFloat64Slice) Swap

func (r ReverseFloat64Slice) Swap(i, j int)

Swap swaps the elements at indexes i and j

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL