Documentation ¶
Index ¶
- Constants
- func AdditiveValueMapInsert[K comparable, V any, M ~map[K]V](inMap map[K]V, key K, additiveFunc func(V, V) V, valueToAdd V)
- func CopyMap[K comparable, V any, M ~map[K]V](inMap M) map[K]V
- func CorrelateYearMonthCounts(ymc1 YearMonthCount, ymc2 YearMonthCount) float64
- func EqualiseYearMonths(ymc1 YearMonthCount, ymc2 YearMonthCount) (YearMonthCount, YearMonthCount)
- func HigherStartKey[K constraints.Ordered, V any, M ~map[K]V](inMapA M, inMapB M) K
- func KeysInCommon[K comparable, V any, M ~map[K]V](inMapA M, inMapB M) []K
- func LowerEndKey[K constraints.Ordered, V any, M ~map[K]V](inMapA M, inMapB M) K
- func MaxInt(numA int, numB int) int
- func MinInt(numA int, numB int) int
- func SliceContains[V comparable](slice []V, valueToFind V) (bool, int)
- func SliceIntToFloat[I constraints.Integer, F constraints.Float](slice []I) []F
- func SortedMapKeys[K constraints.Ordered, V any, M ~map[K]V](inMap M) []K
- func SubtractiveValueMapRemove[K comparable, V any, M ~map[K]V](inMap map[K]V, key K, subtractiveFunc func(V, V) (V, bool), valueToSubtract V)
- type Changes
- type Commit
- type CommitMap
- type EmailSet
- type LineChanges
- type MonthCount
- type Person
- type Report
- type YearMonthCount
- type YearlyChangeMap
- type YearlyEmailMap
- func (yem *YearlyEmailMap) AddEmailSet(emailSetToAdd EmailSet, year int)
- func (yem *YearlyEmailMap) AddYearlyEmailMap(yemToAdd YearlyEmailMap)
- func (yem *YearlyEmailMap) CountArray(years []int) []int
- func (yem *YearlyEmailMap) SubtractEmailSet(emailSetToSubtract EmailSet, year int)
- func (yem *YearlyEmailMap) SubtractYearlyEmailMap(yemToSubtract YearlyEmailMap)
- type YearlyLineChangeMap
- func (ylcm *YearlyLineChangeMap) AddLineChanges(lineChangesToAdd *LineChanges, commitYear int)
- func (ylcm *YearlyLineChangeMap) AddYearlyLineChangeMap(ylcmToAdd YearlyLineChangeMap)
- func (ylcm *YearlyLineChangeMap) SeparatedChangeArrays(years []int) ([]int, []int)
- func (ylcm *YearlyLineChangeMap) SubtractLineChanges(lineChangesToSubtract *LineChanges, commitYear int)
- func (ylcm *YearlyLineChangeMap) SubtractYearlyLineChangeMap(ylcmToSubtract YearlyLineChangeMap)
Constants ¶
View Source
const TimeFormat = "Mon, 2 Jan 2006 15:04:05 -0700"
Similar to RFC1123Z but without trailing zero on day
Variables ¶
This section is empty.
Functions ¶
func AdditiveValueMapInsert ¶
func AdditiveValueMapInsert[K comparable, V any, M ~map[K]V](inMap map[K]V, key K, additiveFunc func(V, V) V, valueToAdd V)
Insert operation that adds to an existing value in the map using a specified additive function
func CopyMap ¶
func CopyMap[K comparable, V any, M ~map[K]V](inMap M) map[K]V
func CorrelateYearMonthCounts ¶
func CorrelateYearMonthCounts(ymc1 YearMonthCount, ymc2 YearMonthCount) float64
func EqualiseYearMonths ¶
func EqualiseYearMonths(ymc1 YearMonthCount, ymc2 YearMonthCount) (YearMonthCount, YearMonthCount)
Returns two filtered YMCs that contain data for the same years and months
func HigherStartKey ¶
func HigherStartKey[K constraints.Ordered, V any, M ~map[K]V](inMapA M, inMapB M) K
Returns whichever map has the higher key at the beginning when sorted
func KeysInCommon ¶
func KeysInCommon[K comparable, V any, M ~map[K]V](inMapA M, inMapB M) []K
func LowerEndKey ¶
func LowerEndKey[K constraints.Ordered, V any, M ~map[K]V](inMapA M, inMapB M) K
Returns whichever map has the lower key at the end when sorted
func SliceContains ¶
func SliceContains[V comparable](slice []V, valueToFind V) (bool, int)
func SliceIntToFloat ¶
func SliceIntToFloat[I constraints.Integer, F constraints.Float](slice []I) []F
func SortedMapKeys ¶
func SortedMapKeys[K constraints.Ordered, V any, M ~map[K]V](inMap M) []K
func SubtractiveValueMapRemove ¶
func SubtractiveValueMapRemove[K comparable, V any, M ~map[K]V](inMap map[K]V, key K, subtractiveFunc func(V, V) (V, bool), valueToSubtract V)
Operation that subtracts from an existing value in the map using a specified subtractive function
Types ¶
type CommitMap ¶
func (*CommitMap) AddCommitMap ¶
func (*CommitMap) SubtractCommitMap ¶
func (*CommitMap) YearMonthCounts ¶
func (cm *CommitMap) YearMonthCounts() (YearMonthCount, YearMonthCount, YearMonthCount)
type EmailSet ¶
func AddEmailSet ¶
type LineChanges ¶
func AddLineChanges ¶
func AddLineChanges(a *LineChanges, b *LineChanges) *LineChanges
func SubtractLineChanges ¶
func SubtractLineChanges(a *LineChanges, b *LineChanges) (*LineChanges, bool)
type MonthCount ¶
type YearMonthCount ¶
type YearMonthCount map[int]MonthCount
func (*YearMonthCount) Flatten ¶
func (ymc *YearMonthCount) Flatten() []int
type YearlyChangeMap ¶
func (*YearlyChangeMap) AddChanges ¶
func (ycm *YearlyChangeMap) AddChanges(changesToAdd *Changes, commitYear int)
YearlyChangeMap
func (*YearlyChangeMap) LineChanges ¶
func (ycm *YearlyChangeMap) LineChanges() YearlyLineChangeMap
func (*YearlyChangeMap) SubtractChanges ¶
func (ycm *YearlyChangeMap) SubtractChanges(changesToSubtract *Changes, commitYear int)
type YearlyEmailMap ¶
func (*YearlyEmailMap) AddEmailSet ¶
func (yem *YearlyEmailMap) AddEmailSet(emailSetToAdd EmailSet, year int)
func (*YearlyEmailMap) AddYearlyEmailMap ¶
func (yem *YearlyEmailMap) AddYearlyEmailMap(yemToAdd YearlyEmailMap)
func (*YearlyEmailMap) CountArray ¶
func (yem *YearlyEmailMap) CountArray(years []int) []int
func (*YearlyEmailMap) SubtractEmailSet ¶
func (yem *YearlyEmailMap) SubtractEmailSet(emailSetToSubtract EmailSet, year int)
func (*YearlyEmailMap) SubtractYearlyEmailMap ¶
func (yem *YearlyEmailMap) SubtractYearlyEmailMap(yemToSubtract YearlyEmailMap)
type YearlyLineChangeMap ¶
type YearlyLineChangeMap map[int]*LineChanges
func (*YearlyLineChangeMap) AddLineChanges ¶
func (ylcm *YearlyLineChangeMap) AddLineChanges(lineChangesToAdd *LineChanges, commitYear int)
YearlyLineChangeMap
func (*YearlyLineChangeMap) AddYearlyLineChangeMap ¶
func (ylcm *YearlyLineChangeMap) AddYearlyLineChangeMap(ylcmToAdd YearlyLineChangeMap)
func (*YearlyLineChangeMap) SeparatedChangeArrays ¶
func (ylcm *YearlyLineChangeMap) SeparatedChangeArrays(years []int) ([]int, []int)
Returns insertions and deletions in two separate arraus
func (*YearlyLineChangeMap) SubtractLineChanges ¶
func (ylcm *YearlyLineChangeMap) SubtractLineChanges(lineChangesToSubtract *LineChanges, commitYear int)
func (*YearlyLineChangeMap) SubtractYearlyLineChangeMap ¶
func (ylcm *YearlyLineChangeMap) SubtractYearlyLineChangeMap(ylcmToSubtract YearlyLineChangeMap)
Click to show internal directories.
Click to hide internal directories.