class · System
Array
public class System.Array : System.Any
- Tipo
- class
- Espacio de nombres
- System
- Ensamblado
- System.Core
- Acceso
- public, static, abstract
- Archivo fuente
Array.ant
Herencia
- Clases base
-
AnyArray
Métodos
The total of a run of numbers (0 when empty).
static method Sum<T>(items: T[]) -> T
#
The smallest of a run of numbers; the run must not be empty.
static method Min<T>(items: T[]) -> T
#
The largest of a run of numbers; the run must not be empty.
static method Max<T>(items: T[]) -> T
#
Whether a and b hold the same bytes (== on arrays compares identity); one comparison in memory.
static method Copy<T>(source: T[], sourceIndex: i32, target: T[], targetIndex: i32, length: i32) -> void
#
Copies length items from source[sourceIndex..] to target[targetIndex..] (overlapping ranges too).
A new array with the first length items (and default values past the end of items).
static method Fill<T>(items: T[], value: T) -> void
#
static method Reverse<T>(items: T[]) -> void
#
Where value first is (by Equals), or -1.
Sorts count integers from start: by their bytes when there are enough of them (no comparisons to mispredict).
Sorts count integers from start: by their bytes when there are enough of them (no comparisons to mispredict).
Sorts count integers from start: by their bytes when there are enough of them (no comparisons to mispredict).
Sorts count integers from start: by their bytes when there are enough of them (no comparisons to mispredict).
static method Sort<T>(items: T[]) -> void
#
Sorts the items in place (by CompareTo; not stable).
Sorts count items from start.
Sorts the items in place by order (negative: a goes first; not stable).
Sorts count items from start by order.
Where the first item that match accepts is, or -1.
Whether some item is accepted by match.
Whether every item is accepted by match.
static method ForEach<T>(items: T[], action: func<T> : void) -> void
#
Runs action on each item, in order.
static method ConvertAll<T, R>(items: T[], convert: func<T> : R) -> R[]
#
A new array with convert of each item.
Where value is in sorted items, or the bitwise complement of where it would go.
Miembros privados e internos (13)
From how many integers a sort goes by bytes (below, the passes over the counts cost more than comparing).
Insertion sort of items[low..high] (inclusive).
Integers of 32 bits sorted by their bytes, the lowest first (flip 128 on the top byte puts the negative ones
first): each pass counts the bytes and places the items, without comparing them; a pass where every item has
the same byte is skipped. Both arrays stay where they are meanwhile (an address taken inside one pins it).
Integers of 64 bits sorted by their bytes, the lowest first (flip 128 on the top byte puts the negative ones
first): each pass counts the bytes and places the items, without comparing them; a pass where every item has
the same byte is skipped. Both arrays stay where they are meanwhile (an address taken inside one pins it).
Miembros heredados (5)
GetTypemétodo de AnyUndescribedmétodo de AnyToStringmétodo de AnyHashmétodo de Anydestroymétodo de Any
Código fuente
Array en Larva HIR, descompilado a partir de su Larva HIR.
public class System.Array : System.Any
{
// From how many integers a sort goes by bytes (below, the passes over the counts cost more than comparing).
static constant RadixFrom: i32
// Insertion sort of items[low..high] (inclusive).
static method InsertionSort<T>(items: T[], low: i32, high: i32) -> void
static method Swap<T>(items: T[], a: i32, b: i32) -> void
static method SiftDown<T>(items: T[], low: i32, root: i32, count: i32) -> void
static method HeapSort<T>(items: T[], low: i32, high: i32) -> void
static method IntroSort<T>(items: T[], low: i32, high: i32, depth: i32) -> void
// Integers of 32 bits sorted by their bytes, the lowest first (`flip` 128 on the top byte puts the negative ones
// first): each pass counts the bytes and places the items, without comparing them; a pass where every item has
// the same byte is skipped. Both arrays stay where they are meanwhile (an address taken inside one pins it).
static method RadixSort32(data: u32*, count: i32, flip: u32) -> void
// Integers of 64 bits sorted by their bytes, the lowest first (`flip` 128 on the top byte puts the negative ones
// first): each pass counts the bytes and places the items, without comparing them; a pass where every item has
// the same byte is skipped. Both arrays stay where they are meanwhile (an address taken inside one pins it).
static method RadixSort64(data: u64*, count: i32, flip: u64) -> void
static method InsertionSortBy<T>(items: T[], low: i32, high: i32, order: func<T, T> : i32) -> void
static method SiftDownBy<T>(items: T[], low: i32, root: i32, count: i32, order: func<T, T> : i32) -> void
static method HeapSortBy<T>(items: T[], low: i32, high: i32, order: func<T, T> : i32) -> void
static method IntroSortBy<T>(items: T[], low: i32, high: i32, depth: i32, order: func<T, T> : i32) -> void
static method Depth(count: i32) -> i32
// The total of a run of numbers (0 when empty).
static method Sum<T>(items: T[], start: i32, count: i32) -> T
static method Sum<T>(items: T[]) -> T
// The smallest of a run of numbers; the run must not be empty.
static method Min<T>(items: T[], start: i32, count: i32) -> T
static method Min<T>(items: T[]) -> T
// The largest of a run of numbers; the run must not be empty.
static method Max<T>(items: T[], start: i32, count: i32) -> T
static method Max<T>(items: T[]) -> T
static method Average<T>(items: T[]) -> f64
// Whether `a` and `b` hold the same bytes (`==` on arrays compares identity); one comparison in memory.
static method Equals(a: u8[], b: u8[]) -> bool
// Copies `length` items from source[sourceIndex..] to target[targetIndex..] (overlapping ranges too).
static method Copy<T>(source: T[], sourceIndex: i32, target: T[], targetIndex: i32, length: i32) -> void
// A new array with the first `length` items (and default values past the end of `items`).
static method Resize<T>(items: T[], length: i32) -> T[]
static method Fill<T>(items: T[], value: T) -> void
static method Reverse<T>(items: T[]) -> void
// Where `value` first is (by Equals), or -1.
static method IndexOf<T>(items: T[], value: T) -> i32
// Sorts `count` integers from `start`: by their bytes when there are enough of them (no comparisons to mispredict).
static method Sort(items: i32[], start: i32, count: i32) -> void
static method Sort(items: i32[]) -> void
// Sorts `count` integers from `start`: by their bytes when there are enough of them (no comparisons to mispredict).
static method Sort(items: u32[], start: i32, count: i32) -> void
static method Sort(items: u32[]) -> void
// Sorts `count` integers from `start`: by their bytes when there are enough of them (no comparisons to mispredict).
static method Sort(items: i64[], start: i32, count: i32) -> void
static method Sort(items: i64[]) -> void
// Sorts `count` integers from `start`: by their bytes when there are enough of them (no comparisons to mispredict).
static method Sort(items: u64[], start: i32, count: i32) -> void
static method Sort(items: u64[]) -> void
// Sorts the items in place (by CompareTo; not stable).
static method Sort<T>(items: T[]) -> void
// Sorts `count` items from `start`.
static method Sort<T>(items: T[], start: i32, count: i32) -> void
// Sorts the items in place by `order` (negative: a goes first; not stable).
static method Sort<T>(items: T[], order: func<T, T> : i32) -> void
// Sorts `count` items from `start` by `order`.
static method Sort<T>(items: T[], start: i32, count: i32, order: func<T, T> : i32) -> void
// Where the first item that `match` accepts is, or -1.
static method FindIndex<T>(items: T[], match: func<T> : bool) -> i32
// Whether some item is accepted by `match`.
static method Exists<T>(items: T[], match: func<T> : bool) -> bool
// Whether every item is accepted by `match`.
static method TrueForAll<T>(items: T[], match: func<T> : bool) -> bool
// Runs `action` on each item, in order.
static method ForEach<T>(items: T[], action: func<T> : void) -> void
// A new array with `convert` of each item.
static method ConvertAll<T, R>(items: T[], convert: func<T> : R) -> R[]
// Where `value` is in sorted `items`, or the bitwise complement of where it would go.
static method BinarySearch<T>(items: T[], value: T) -> i32
}