Can't compile fastutil-8.1.1 (SafeMath not found)

20 views
Skip to first unread message

Stefan Reich

unread,
Dec 25, 2017, 9:11:12 PM12/25/17
to fastutil
Hi, what's up here?

symbol:   class SafeMath
    [javac]   location: package it.unimi.dsi.fastutil
    [javac] /home/stefan/dev/fastutil-8.1.1/src/it/unimi/dsi/fastutil/doubles/Double2ShortOpenCustomHashMap.java:443: error: cannot find symbol
    [javac] final short newValue = it.unimi.dsi.fastutil.SafeMath.safeIntToShort(mappingFunction.applyAsInt(k));

I'm using the source tarball, did "make sources" and "ant jar" on Java 8/Peppermint Linux 7. Can't find the file SafeMath.java anywhere.

Cheers,
Stefan
BotCompany.de

Stefan Reich

unread,
Dec 25, 2017, 9:43:14 PM12/25/17
to fastutil
OK, things are cozy, I extracted only the classes I needed (Object2IntRBTreeMap and dependencies), and it's all good. Got a nice 245K .jar file from that: http://tinybrain.de/1013124

Works like a charm too: http://tinybrain.de/1013126

Background: I'm looking for the most compact indexing structures possible for an AI system I am building. I am also using stuff like CompactHashSet and CustomCompactHashSet which really save on storage space compared to anything Java has.

Many greetings,
Stefan

Sebastiano Vigna

unread,
Dec 26, 2017, 11:17:53 AM12/26/17
to fast...@googlegroups.com
Oh well. It was never added to the makefile 🙈. Fixed. Thanks for the report!

Ciao,

seba

Sebastiano Vigna

unread,
Dec 26, 2017, 11:20:25 AM12/26/17
to fast...@googlegroups.com


> On 25 Dec 2017, at 18:43, 'Stefan Reich' via fastutil <fast...@googlegroups.com> wrote:
>
> OK, things are cozy, I extracted only the classes I needed (Object2IntRBTreeMap and dependencies), and it's all good. Got a nice 245K .jar file from that: http://tinybrain.de/1013124
>
> Works like a charm too: http://tinybrain.de/1013126

There is also an option NO_SMALL_TYPE to build only "large-type" classes.

>
> Background: I'm looking for the most compact indexing structures possible for an AI system I am building. I am also using stuff like CompactHashSet and CustomCompactHashSet which really save on storage space compared to anything Java has.
>

// Implements the Set interface more compactly than
// java.util.HashSet by using a closed hashtable.

You mean an "open-addressing hashtable".

Ciao,

seba

Reply all
Reply to author
Forward
0 new messages