mastodon-sc / mastodon-collection Goto Github PK
View Code? Open in Web Editor NEWLicense: BSD 2-Clause "Simplified" License
License: BSD 2-Clause "Simplified" License
Kyle I S Harrington @kephale Aug 20 19:39
why does Pool take a memPoolFactory and create one, instead of just taking a memPool? it doesn't seem to store a reference to the factory
final Vertex3Pool vp = new Vertex3Pool( 0 );
final TrianglePool tp = new TrianglePool( vp, 0 );
Then adding a Triangle leads to
java.lang.IllegalArgumentException: cannot store more than 59652323 elements
at org.mastodon.pool.SingleArrayMemPool.append(SingleArrayMemPool.java:34)
at org.mastodon.pool.MemPool.create(MemPool.java:118)
at org.mastodon.pool.Pool.create(Pool.java:195)
at net.imagej.mesh.Vertex3Pool.create(Vertex3Pool.java:42)
at net.imagej.mesh.stl.BinarySTLFormat.readVector(BinarySTLFormat.java:141)
at net.imagej.mesh.stl.BinarySTLFormat.readFacet(BinarySTLFormat.java:125)
at net.imagej.mesh.stl.BinarySTLFormat.readFacets(BinarySTLFormat.java:75)
at net.imagej.mesh.stl.BinarySTLFormatTest.testReadFacets(BinarySTLFormatTest.java:165)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:678)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
None of the IntBackedRefCollections implement equals()
and hashCode()
as would be correct for java.util
Collections. (See for example https://docs.oracle.com/javase/8/docs/api/java/util/Set.html#equals-java.lang.Object-)
Doing this right is difficult and requires that we define some conventions.
It could be relatively easy if we define that for PoolObject
s equality always means "the same object in the same pool", that is, we make PoolObject.equals()
and PoolObject.hashCode()
final
.
This came up, because this not-so-nice workaround is required to compare a two Set<Set<T>>
for equality, which should in principle just be Set.equals()
.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.