All Projects → Vexatos → CircularArrays.jl

Vexatos / CircularArrays.jl

Licence: MIT license
Multi-dimensional arrays with fixed size and circular indexing.

Programming Languages

julia
2034 projects

Projects that are alternatives of or similar to CircularArrays.jl

Circular Buffer
Circular Buffer/ Circular Array
Stars: ✭ 16 (-15.79%)
Mutual labels:  circular, circular-arrays
libra-code
quantum-dynamics-hub.github.io/libra/index.html
Stars: ✭ 33 (+73.68%)
Mutual labels:  utilities
elixir-utilities-web
Utilties for the Developer. Regex, HTTP echo. Diffing
Stars: ✭ 36 (+89.47%)
Mutual labels:  utilities
microlibs-scala
No description or website provided.
Stars: ✭ 24 (+26.32%)
Mutual labels:  utilities
table2ascii
Python library for converting lists to fancy ASCII tables for displaying in the terminal and on Discord
Stars: ✭ 31 (+63.16%)
Mutual labels:  utilities
whitelister
Simple, basic filtering and validation tool for Node.js.
Stars: ✭ 46 (+142.11%)
Mutual labels:  utilities
lintje
Lintje is an opinionated linter for Git.
Stars: ✭ 25 (+31.58%)
Mutual labels:  utilities
ios
CoThings's iOS application. CoThings is a realtime counter for shared things.
Stars: ✭ 13 (-31.58%)
Mutual labels:  utilities
framestack
Tools, Frameworks & Libraries to help you build your projects ✨
Stars: ✭ 27 (+42.11%)
Mutual labels:  utilities
Puppy
Daily Use Utilities and Frameworks by .NET Core
Stars: ✭ 14 (-26.32%)
Mutual labels:  utilities
kitty-theme-changer
Obsolete: use "kitty +kittens themes"
Stars: ✭ 26 (+36.84%)
Mutual labels:  utilities
safe-json-stringify
A wrapper for JSON.stringify that handles circular references and prevent defined getters from throwing errors.
Stars: ✭ 51 (+168.42%)
Mutual labels:  circular
Biblioteca-DDR-Java
Funciones java con utilidades para distintos proyectos
Stars: ✭ 19 (+0%)
Mutual labels:  utilities
AutoScreenshot
Automatic screenshot maker for Windows
Stars: ✭ 49 (+157.89%)
Mutual labels:  utilities
Jenkins-Pipeline-Utils
Global Jenkins Pipeline Library with common utilities.
Stars: ✭ 36 (+89.47%)
Mutual labels:  utilities
common
Metarhia Common Library
Stars: ✭ 55 (+189.47%)
Mutual labels:  utilities
OrganizeMediaFiles
a collection of Python scripts that help you organize media files into a directory tree "year/month" based on metadata , using exiftool
Stars: ✭ 24 (+26.32%)
Mutual labels:  utilities
NCoVUtils
Utility functions for the 2019-NCoV outbreak
Stars: ✭ 27 (+42.11%)
Mutual labels:  utilities
geofence service
This plugin is a geofence service with activity recognition API.
Stars: ✭ 16 (-15.79%)
Mutual labels:  circular
php-lodash
php-lodash is a PHP utility library, similar to Underscore/Lodash.
Stars: ✭ 35 (+84.21%)
Mutual labels:  utilities

CircularArrays.jl - Multi-dimensional arrays with fixed size and circular indexing

Build Status codecov

CircularArrays.jl is a small package adding the CircularArray type which can be backed by any AbstractArray. A CircularArray{T,N,A} is an AbstractArray{T,N} backed by a data array of type A. It has a fixed size and features circular indexing (periodic boundary conditions) across all dimensions: Indexing and assigning beyond its bounds in both directions is possible, as the end of the array is considered adjacent to its start. CircularArrays have the same axes as the underlying backing array, and iterators only iterate over these indices.

The CircularVector{T} type is added as an alias for CircularArray{T, 1}.

The following constructors are provided.

# Initialize a CircularArray backed by any AbstractArray.
CircularArray(arr::AbstractArray{T, N}) where {T, N}
# Initialize a CircularArray with default values and the specified dimensions.
CircularArray(initialValue::T, dims...) where T
# Alternative functions for one-dimensional circular arrays.
CircularVector(arr::AbstractArray{T, 1}) where T
CircularVector(initialValue::T, size::Int) where T

Examples

julia> using CircularArrays
julia> a = CircularArray([1,2,3]);
julia> a[0:4]
5-element CircularArray{Int64,1}:
 3
 1
 2
 3
 1
julia> using OffsetArrays
julia> i = OffsetArray(1:5,-2:2);
julia> a[i]
5-element CircularArray{Int64,1} with indices -2:2:
 1
 2
 3
 1
 2

License

CircularArrays.jl is licensed under the MIT license. By using or interacting with this software in any way, you agree to the license of this software.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].