Documentation ¶
Index ¶
- Constants
- Variables
- func BigArrays_Offset(index int64) int32
- func BigArrays_Segment(index int64) int32
- func CopyArrays(src []*T, srcPos int32, dest []*T, destPos int32, length int64)
- func CopyInts(src []int32, srcPos int32, dest []int32, destPos int32, length int64)
- func CopyOf(src [][]*T, length int64) [][]*T
- func Displacement(index int64) int32
- func Get(array [][]int32, index int64) int32
- func QuickSort(x [][]int32, from int64, to int64, comp IntComparator)
- func Segment(index int64) int32
- func Set(array [][]int32, index int64, value int32)
- func SizeOf(instance T) int32
- func Swap(array [][]int32, first int64, second int64)
- type BigArrays
- type IntBigArray
- func (iy *IntBigArray) Add(index int64, value int32)
- func (iy *IntBigArray) CopyTo(sourceIndex int64, destination *IntBigArray, destinationIndex int64, ...)
- func (iy *IntBigArray) EnsureCapacity(length int64)
- func (iy *IntBigArray) Fill(value int32)
- func (iy *IntBigArray) Get(index int64) int32
- func (iy *IntBigArray) GetSegments() [][]int32
- func (iy *IntBigArray) Increment(index int64)
- func (iy *IntBigArray) Set(index int64, value int32)
- func (iy *IntBigArray) SizeOf() int64
- type IntBigArrays
- type IntComparator
- type T
Constants ¶
View Source
const ( // Initial number of segments to support in array. INITIAL_SEGMENTS int32 = 1024 // The shift used to compute the segment associated with an index (equivalently, the logarithm of the segment size). SEGMENT_SHIFT int32 = 10 // Size of a single segment of a BigArray. SEGMENT_SIZE int32 = 1 << SEGMENT_SHIFT // The mask used to compute the offset associated to an index. SEGMENT_MASK int32 = SEGMENT_SIZE - 1 )
Variables ¶
View Source
var ( INT_INSTANCE_SIZE int32 = SizeOf(&IntBigArray{}) INT_SIZE_OF_SEGMENT int64 = int64(SEGMENT_SIZE) * int64(INT_INSTANCE_SIZE) )
View Source
var ( INT_SEGMENT_MASK int32 = SEGMENT_SIZE - 1 SMALL int32 = 7 MEDIUM int32 = 40 )
Functions ¶
func Displacement ¶
Types ¶
type IntBigArray ¶
type IntBigArray struct {
// contains filtered or unexported fields
}
func NewByIntVal ¶
func NewByIntVal(initialValue int32) *IntBigArray
func NewIntBigArray ¶
func NewIntBigArray() *IntBigArray
func (*IntBigArray) Add ¶
func (iy *IntBigArray) Add(index int64, value int32)
func (*IntBigArray) CopyTo ¶
func (iy *IntBigArray) CopyTo(sourceIndex int64, destination *IntBigArray, destinationIndex int64, length int64)
func (*IntBigArray) EnsureCapacity ¶
func (iy *IntBigArray) EnsureCapacity(length int64)
func (*IntBigArray) Fill ¶
func (iy *IntBigArray) Fill(value int32)
func (*IntBigArray) Get ¶
func (iy *IntBigArray) Get(index int64) int32
func (*IntBigArray) GetSegments ¶
func (iy *IntBigArray) GetSegments() [][]int32
func (*IntBigArray) Increment ¶
func (iy *IntBigArray) Increment(index int64)
func (*IntBigArray) Set ¶
func (iy *IntBigArray) Set(index int64, value int32)
func (*IntBigArray) SizeOf ¶
func (iy *IntBigArray) SizeOf() int64
type IntBigArrays ¶
type IntBigArrays struct { }
func NewIntBigArrays ¶
func NewIntBigArrays() *IntBigArrays
type IntComparator ¶
Click to show internal directories.
Click to hide internal directories.