Questions tagged [fastutil]

fastutil is a collection of type-specific Java classes that extend the Java Collections Framework by providing several containers, such as maps, sets, lists and prority queues, implementing the interfaces of the java.util package; it provides also big (64-bit) arrays, sets and lists, and fast, practical I/O classes for binary and text files.

From fastutil's GitHub README:

fastutil provides a huge collection of specialized classes generated starting from a parameterized version; the classes are much more compact and much faster than the general ones. Please read the package documentation for more information.

The compiled code is contained in the jar file, and should be installed where you keep Java extensions. Note that the jar file is huge, due to the large number of classes: if you plan to ship your own jar with some fastutil classes included, you should look at AutoJar or similar tools to extract automatically the necessary classes.

You have to "make sources" to get the actual Java sources; finally, "ant jar" and "ant javadoc" will generate the jar file and the API documentation.

The Java sources are generated using a C preprocessor. The gencsource.sh script reads in a driver file, that is, a Java source that uses some preprocessor-defined symbols and some conditional compilation, and produces a (fake) C source, which includes the driver code and some definitions that customize the environment.

26 questions
0
votes
1 answer

How to open framed version of Javadoc once Google lead you to non-framed?

How to open framed version of Javadoc once Google lead you to non-framed? For example: https://fastutil.di.unimi.it/docs/help-doc.html How to switch to framed version?
Dims
  • 47,675
  • 117
  • 331
  • 600
0
votes
1 answer

How to Install Fastutil using the .jar Executable file

I'm trying to install fastutil-8.2.2 library on my pc, however the .jar far I download does not execute. The downloaded file is of type executable jar. I have Java SE Runtime environment installed as well. How do I install this? If installation is…
0
votes
1 answer

How to sort FastUtil BigList with Collection.sort()

If i have arraylist i can use Collection.sort() what's very effective and fast. But now i have to use BigList to hold much elements of my object type, and i have to sort them by value, From object called JasPlayer kills as int and nickname as…
user8968201
0
votes
1 answer

How do I implement a fastutils map in a Spark UDAF?

I'm building a Spark UDAF where I'm storing the intermediate data in a fastutils map. Schema looks like this: def bufferSchema = new StructType().add("my_map_col", MapType(StringType, IntegerType)) I initialize with no problem: def…
John
  • 1,167
  • 1
  • 16
  • 33
0
votes
1 answer

Fixed size collection

I need to have a fixed size array with the length of 10, consisting of double values as they used as a record so this should have efficient structure. I wonder if there is any fixed length collection in fastutil or simply I can use a double[10]…
Luckylukee
  • 575
  • 2
  • 9
  • 27
0
votes
1 answer

How to create readonly collection in fastutil?

In standard library we have methods like Collections#unmodifiableCollection() Can't find the same for types collections in fastutil. Please hint!
Dims
  • 47,675
  • 117
  • 331
  • 600
0
votes
0 answers

Java Hashmap merge function

I want to build a HashMap> from another nested hashmap. I have some doubts about hashmap's merge function: the function seems to accept just bi-functions which arguments are of the same type. This implies that when I use…
Aalto
  • 99
  • 10
0
votes
1 answer

Equivalent of scala hashmap in fastutil

I want to use fastutill classes in my spark streaming application (scala). I am using hashmap instead but based on Spark documentations , they suggest use fastutill classes instead of hashmap..First, i wnat to know if these classes worth and then…
mahdi62
  • 959
  • 2
  • 11
  • 17
0
votes
1 answer

How to Run and Different Code Paths Based on Specialisation

In using a framework like FastUtils with Scala, how do you generate the appropriate code based on the effective specialization as the framework itself has specialised data structures? I.e., how you you programmatically figure out what is being…
0
votes
0 answers

LibGDX: Other libraries aren't working?

I am using LibGDX for my game, and I am trying to use FastUtil's Int2BooleanArrayMap to store my key states (up/down). Unfortunately I get this weird error: Exception in thread "LWJGL Application" com.badlogic.gdx.utils.GdxRuntimeException:…
Jire
  • 9,680
  • 14
  • 52
  • 87
-2
votes
1 answer

Faster than O(log N) int set implementation in Java?

Fastutil has nice class IntAVLTreeSet which has #firstInt() and #lastInt() method, that I require. Unfortunately, AVL Tree is O(log N). Are there O(1) implementations of this? Is it possible at all? UPDATE I want O(1) lookups. Finding margins may…
Dims
  • 47,675
  • 117
  • 331
  • 600
1
2