array2d 2.0.0 copy "array2d: ^2.0.0" to clipboard
array2d: ^2.0.0 copied to clipboard

Array2d

2.0.0 #

Performance & Refactoring

BREAKING CHANGE (Internal Access): Refactored the internal storage of Array2d

Benefit: This change significantly improves read/write performance and iteration speed by leveraging memory cache locality, as confirmed by benchmarks (up to 1.39x faster for random lookups).

Implementation: Now uses Column-Major indexing (k = x * height + y) to map 2D coordinates to the 1D index.

Fixes & API Consistency

Assignment Operator Fix: The indexed assignment operator (array[x][y] = value) is no longer supported for modifying elements in the 1D-backed structure.

The operator [] method now returns a copy (List

Action Required: Users must use the dedicated methods for writing and reading:

Set Value: Use array.setValue(x, y, value)

Get Value: Use array.getValue(x, y)

1.5.0 #

  • added getRowOrNull and getValueOrNull methods

1.4.0 #

added whereabout methods

1.3.0 #

1.2.0 #

  • added where and whereType

1.1.0 #

  • remove resize width and height

1.0.1 #

  • fix readme

1.0.0 #

  • array2d release
1
likes
0
points
230
downloads

Publisher

unverified uploader

Weekly Downloads

Array2d

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

test

More

Packages that depend on array2d