appliedtopology / javaplex

Persistent Homology and Topological Data Analysis Library
BSD 3-Clause "New" or "Revised" License
193 stars 57 forks source link

Constructor should be public? #8

Closed melvyniandrag closed 8 years ago

melvyniandrag commented 8 years ago

I am experimenting with your package and was getting some issues with jython. My problem is described in detail here:

http://stackoverflow.com/questions/38651414/java-jython-hypothesis-constructor-should-be-public

I think that the constructor in

javaplex/src/java/edu/stanford/math/plex4/io/DoubleArrayReaderWriter.java

should be public, not private, because otherwise I can't use the class in jython2.7

I'm not a java developer, so I don't understand the syntax perfectly. Still, if I make the constructor public, recompile, and feed the code a csv file, it works as I expected.

michiexile commented 8 years ago

Could you provide sample code?

Looking at the source for DoubleArrayReaderWriter.java, it looks like it is trying to be a Singleton: are you able to do something like

readerwriter = DoubleArrayReaderWriter.getInstance()

?

melvyniandrag commented 8 years ago

Sorry, you're right. Thanks!