Large arrays that can store up to 2^63 elements
Code: "array_large.py". Programming language: Python DMelt Version 2.2. Last modified: 04/03/2018. License: Pro
https://datamelt.org/code/cache/array_large_8817.py
To run this script using the DMelt IDE, copy the above URL link to the menu [File]→[Read script from URL] of the DMelt IDE.


# JLargeArrays - library of one-dimensional arrays that can store up to 263 elements
# See: ieeexplore.ieee.org/xpl/articleDetails.jsp?arnumber=7237077

from pl.edu.icm.jlargearrays import LargeArray,FloatLargeArray
from pl.edu.icm.jlargearrays import LargeArrayArithmetics

LargeArray.setMaxSizeOf32bitArray(0)            # useOffHeapMemory  
# LargeArray.setMaxSizeOf32bitArray(1073741824) # fixed memory 

# make large array
length=10000000
arr1=FloatLargeArray(length,1)                # array with value 1 
arr2=FloatLargeArray(length,2)                # array with value 2 
arr3=LargeArrayArithmetics.add(arr1,arr2)     # add large arrays 



Ads help maintain this website.