Where is the documentation for Matrix Toolkits Java and Netlib-Java? - java

I set out to install some fast matrix and BLAS libraries for Java, and settled on MTJ (backed by netlib-java) based on the results of Java Matrix Benchmark. I believe I have everything installed via Maven, but I can't find any credible documentaiton for these libraries.
The logical starting point would be the github pages:
MTJ
netlib
...But I can't find a link to any tutorials or javadoc beyond the incredibly terse MTJ wiki section on Github. Netlib's source appears to be in fortran (with F2J as a compilation step) so I can't crawl directly though source in lieu of javadoc, either.
To make things even more baffling, there appears to be some sort of Javadoc for MTJ out there hosted by a German university for some reason, that references packages (like nni.BLAS) that don't appear to be part of the MTJ library that Maven made for me. There's another even sketchier Javadoc hosted somewhere inside the University of Tennessee that, while having no apparent connection to the netlib-java project, does somehow have a Javadoc page that seems to explain the three extra integer arguments that netlib-java's DGEMV implementation uses (offsets of some sort?). If I look at the fortran documentation inside the netlib-java distribution for DGEMV, it has the eleven standard arguments that I would expect from DGEMV.
So here are my questions:
1.) Is there official documentation for MTJ/netlib? If so, where?
2.) If there is no official documentation, are there any other resources out there that would allow someone to learn to use this library? If this project isn't used exclusively by the developers, then people are learning to use it somehow. How?
3.) If a Java version of netlib's 11-argument DGEMV isn't installed as part of MTJ via Maven, then what is this 14-argument thing on my hard drive?
Thanks.

If you download MTJ via Maven, you can also download the Javadoc and source jars at that time. (IntelliJ IDEA will do this for you automagically.) The jar is called mtj-1.0.2-javadoc.jar and contains comprehensive Javadoc. Once upon a time, this seemed to be available on a website, but that site seems to be gone.

The closest I've seen so far:
http://en.wikipedia.org/wiki/Matrix_Toolkit_Java

Here is link to jar archive with complete javadoc of latest stable MTJ. Just unzip it with tool such 7zip or similar. I agree that lack of guides related to this library might be dauting.

I have created a site for mtj 1.0.3-snapshot on divshot.io:
http://mtj103.divshot.io/
Hope this helps.

Related

LLVM emulation in java library?

Just wondering out of curiosity, if one exists ?
I found a project called java-lli on GoogleCode that seems to be trying to do this. It is not clear how much progress has been made though. (No downloadable artefacts, and nothing in the Wiki. Just stuff in SVN with the last commits in May 2011.)
FWIW, you get more results if you search for "interpreter" rather than "emulator".
Just for further information, David A. Roberts put together LLJVM (#Github). This project is also for executing LLVM-derived bitcode on the Java JVM.
Please refer to my SO answer regarding this, as some other community members had furthered his code/created patches.
[Update] - LLJVM has seemed to have been dead for somewhile, however Howard Chu (https://github.com/hyc) looks to have made LLJVM compatible with the latest version of LLVM (3.3). See Howard's LLJVM-LLVM3.3 branch at Github, here

Using Apache Ant APIs in Java program to programmatically build source files

I am looking for good and practical resources that will help me use the Ant APIs effectively. The project website just gives the documentation of the API which is not useful at all. Very few websites seem to give very brief tutorials on the subject.
Is there some resource I am missing out on? How can I use the Ant APIs for simple tasks, without spending hours browsing through them and looking at source code?
Thanks.
(Answers to previously asked questions not helpful - How can i use Apache ANT Programmatically )
As it turns out, the lack of good resources on using the Ant API, is known and intended.
The bottom paragraph of this article from the Ant says -
The question you are probably asking yourself at this point is: How would I know which classes and methods have to be called in order to set up a dummy Project and Target? The answer is: you don't. Ultimately, you have to be willing to get your feet wet and read the source code. The above example is merely designed to whet your appetite and get you started. Go for it!
So this seems to be the only way to make best use of the API.
..Java program to programmatically build source files
If compiling/Jarring is all you need and you can run it in an SDK (as opposed to a plain JRE), look to the JavaCompiler class for compilation. Then use the Jar related classes to build the Jars.
All J2SE. Ant not included, Ant not required.
There is no better manual to understand ANT than : http://ant.apache.org/manual/index.html
I am not sure if you've gone through this link that explains in detail about creating a task. A word of caution, If you're new to ANT, there is no easy way to jump on this tutorial. Better to learn the basics before you come here. Refer above link for a good starting point.

Practical Java - Development Environments

I've had several classes - university level - on Java.
However, what these classes lack is some practical approach to Java - or, to programming as a whole. Things you can only learn in a business.
However, since I am not allowed to use Java on the workfloor, I don't get to learn this now - even though I would like to.
So I guess what I'm asking for is any number of plain have-to-know Java resources. Things concering, for example, what Ant is and why and how to use it; using revision control systems from your IDE; standard Java libraries you would use often ... Anything that would help with actual software development, really.
As some side information, I've been using Eclipse for about four years now, and I feel at home there.
I have a system that works fairly well for class assignments and for projects as well. Firstly, I create one Eclipse project per class. This way I can re-use classes from previous assignments. You can also customize your classpath by adding another project as a library.
I use the Maven plugin for Eclipse M2Eclipse. Not only does this give you the ability to search for libraries and add them easily but the exec:java plugin is an easy way to execute your code from the command line. It's helpful because when it executes your code, it uses a classpath that includes all linked Maven dependencies. If you aren't using external libraries, you might not need Maven but I've found it to be helpful to learn in preparation for the job market. It's fairly simple to start with plus there are a ton useful plugins for open source projects.
Next, for revision control I recommend Subclipse. You can get a free SVN account with a single login from Unfuddle.com. Link that up to your Eclipse environment and Import your project.
When I want to get a particular class specification, I go to Sun's Java documentation.
Another excellent resource that will certainly give you the reference material (searchable!) to answer any java question would be this torrent containing ~100 ebooks on Java, sorted by directory on various topics (like Ant, Eclipse, or Swing).

Java in Visual Studio 2010?

Is there any way to manage/debug/compile Java projects in Visual Studio 2010?
Before you answer, please read this topic.
I'm a little late to the party, but it looks like someone has started adding support. From the description, right now it only does syntax highlighting and basic navigation within a single file. However, in the Q&A section the author mentions plans to add compilation and debugging support later in the year.
The short answer - No.
The long answer - No, because the supposed intellisense support for Java that the blog entry referred to, in the question, relies on J# support. I believe it has been quite sometime since Microsoft has discontinued J# - VS2008 does not have it.
In the long run, you're better off learning how to use Eclipse/Netbeans/IntelliJ IDEA or any other IDE for the purpose of managing Java projects.
Sure. Visual Studio works with any language so long as someone takes the time to write the plug-ins for it. Heck, Mainsoft has already added JVM debugging support to Visual Studio. They just don't support the language.
The only problem is YOU are going to have to be the one who writes it.
I won't lie to you. It won't be easy and fan-boys on both sides will hate you for it. But if you pull it off I can at least offer you some money to write about how you did it.
No, although, I long for the day when VS might possibly support building Java applications. I don't think I have yet found an IDE as fully featured. Personally, if VS supported Java development, then I would trash my installation of Eclipse and Netbeans. ... so tired of wonky Java IDEs....
Cyberduck is written in Java and developed in Visual Studio 2010, though it requires IKVM, an implementation of Java for Mono and the Microsoft .NET Framework. Here are the build instructions.
C++ syntax highlighting looks pretty good for Java. Turn this on in Options->Text Editor->File Extension.
Extension: java
Editor: Microsoft Visual C++
Now reopen a .java file and see pretty colors.
I will advise to go for Eclipse, if you have to do at least 25% Java coding. Otherwise VS is good as well. But I like Eclipse for C++ as well as Java.
A new plugin is currently being developed named IntegraStudio,
aiming at full Java development under VS. It currently supports:
IntelliSense for Java (comparable to standard C++ IntelliSense in VS)
build with Ant or Maven
direct Ant / Maven project view in Solution Explorer
Java debugger with container visualization
support for VS browsing features (Class View, Code definition, etc.)
Class View works also for classes in JARs (including standard library)
browsing Maven repositories
JDK: 1.6 - 1.8
It uses standard JDK tools and targets the real Java platform (it
is not a .NET platform solution, as VJ# was).
At the moment of writing this, the IntegraStudio plugin is beta.
It does not yet contain advanced Eclipse features, however many
of them are in current roadmap (e.g. code refactorings and quick fixes).
You can find it on Visual Studio gallery:
http://visualstudiogallery.msdn.microsoft.com/588fb167-d18c-4e61-8aeb-30baeddb00da
The product official website is:
http://www.softerg.com/integra
Current docs (with large number of screenshots):
http://www.softerg.com/integra/docs/pages/is_intro.htm

Best practices for writing open source Java [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
Where can I find some best practices for writing open source Java code?
I'm not looking for directions on how to write the code proper, but rather on distribution, packaging, documentation, and all the other aspects besides .java files.
My goal is to take a module I've written and publish it as open source.
Edit - I'm still missing direct, concrete instructions on what the zip file should contain. Are there conventions for this, or should I just pick some reasonable structure?
I'm not sure if there will be universal agreement on "best practices", but the items you mention might have easy answers:
Distribution is easy with java.net or Sourceforge. You'll publish your code using their standards,
Packaging will be ZIP files. It's a good idea to create an MD5 hash to make it possible for clients to check the integrity of their downloads.
Documentation - yes, lots please. Have separate javadocs and a reference guide that shows how to use your stuff.
Have a public SVN that allows anonymous access so folks can get and build the latest code on their own.
Have a bug tracker that allows people to report on bugs, new features, etc.
Set up a wiki for discussion, feedback, etc.
Maven has become something of an open source standard. Have a good pom.xml for those adventurous folks who want to check out and build your code.
Unit tests and good code coverage will help to demonstrate your commitment to quality.
I'll try to think of more.
See Karl Fogel's book http://producingoss.com/ - source available on-line.
If you're looking for specific directory structures, why not look at existing open source projects? I'd start with Jakarta Commons, which is a heavily used package.
Without any statistics to back me up, I'd say that many projects use a directory structure similar to that specified by Maven, even if they don't use Maven itself (and if you can get past the Maven learning curve, it is a nice build tool 90% of the time).
I am not adding that much, but I would suggest the following:
Directory structure
Try to make the javadocs complete, most open source modules or libraries don't have many javadoc comments. Generate the javadocs documentation and place it in a directory such as apidocs. If applicable in the javadocs, you should specify who is allow to call a class and in which circumstances the class/function should be called. Small code examples also don't hurt and are worth adding.
Add an "examples" directory to help
the developers/users use/integrate
your module.
Add a license files at the root of
your directory structure and ensure
that each of your file has a license
header.
Add a README file at the root
directory of the distribution for
general information and/or
specifics(link to the software,
author, help and support, installation
instructions, etc.)
Usually the source code goes into an src directories and the documentation goes into a docs folder.
Packaging
Try distributing your software into appropriate formats(zip, tar.gz, dmg, exe, jar, etc.). For example for a web application, I would have a zip, tar.gz, a war and maybe an ear. Depending on the website you'll be uploading to, you might be required to use an archive format such as zip.
Create an installer if applicable or not too tedious
Publishing
Follow the instructions if applicable to upload your module.
Advertise your module(Blog, Forums, Twitter, etc.)
Always make additional tests when packaging or uploading, something unexpected could occur(missing file, archive corruption, etc.).
I think it all boils down to automating the build-test-package-deploy cycle. Ideally, you should be able to do it with a single click (or with a single prompt command).
Personally, I use ant and define a deploy target which does the following
Builds all artifacts
Packages the artifacts into a single deliverable (.zip file)
Unzips the .zip into a local directory
Runs the test suite from that local directory
Uploads the .zip onto sourceforge
Having done that the only manual step is to define a new release via sourceforge's web-site.
Obviously, in order to make this procedure effective you must be test infected - I write tests for every new feature I am implementing.
If your project is named Foo, then version X.Y should be packaged in Foo-X.Y.zip and unzip to Foo-X.Y/.... (in other words, the path of each file in the archive should start with Foo-X.Y/)
Have a Foo-X.Y/README.txt containing basic instructions as a plain text file. It should at least contain information about where the full documentation is ("see docs/index.html for documentation") as well as brief instructions about usage ("add lib/Foo-X.Y.jar to your classpath") and rebuild instructions ("run "ant build" to regenerate libraries in lib and javadoc in apidoc/").
If your project requires additional libraries to work or compile, then automate that. I.e. either let this be a Maven project or ensure it works with Ant Ivy.
I would suggest having the source under src/, the built libraries under lib/, the documentation under docs/ - this is what people would expect.
Use Apache Maven 2 and you will get all the artifacts you need... with a simple command "mvn package site"
I would suggest SourceForge (http://sourceforge.net) for your project hosting as they have a wide variety of tools (blogging, wiki, source control options, etc) and it's all free.
As far as what to put in the zip/jar... it really depends on the type of project. If it's a reusable library, I would suggest that in the root of the archive, have your license, and your distribution jar. You could put dependencies in a lib sub-directory, with your documentation in a docs subdirectory.
An example would probably help you better... download the Jakarta Commons - Lang API (http://commons.apache.org/lang) and look at what they provide.
One of the other answers was to use Maven (http://maven.apache.org) to manage your project and I would also recommend this, though if you haven't used it before it can have a bit of developer learning curve.
Good luck and I hope this helps a little.
Book: Practical API Design Confessions of a Java Framework Architect (Jaroslav Tulach, 2008, Apress).
Besides the hints in the book, please do a proper documentation (comments, javadocs) and include usage samples somewhere public (preferrably in a wiki style). Usage might be obvious to the devs but not for the clients (See JFreeChart as an example).

Categories

Resources