The Mines Java Toolkit

Overview

The Mines Java Toolkit

Build Status Codecov license GitHub release Maven Central Awesome

The Mines Java Toolkit (Mines JTK) is a set of Java packages and native (non-Java) software libraries for science and engineering. Applications currently include digital signal processing, linear algebra, optimization, meshing, interpolation, and 2D and 3D graphics.

The Mines JTK is licensed under the Apache License, Version 2.0.

Using the Mines JTK

To use the Mines JTK, simply include its JAR (Java archive) among any other external dependencies for your project. For example, edu-mines-jtk-1.0.0.jar can be found by searching Maven Central. Most build tools can be easily configured to automatically download dependencies from this repository, which also holds JAR files containing documentation (javadoc) and source code for the Mines JTK.

Getting the source code

If you want to build the Mines JTK yourself, you should first download its source code from GitHub. If you clone this source code repository using git, then you will be able to easily update your copy as others make changes. Alternatively, you may use the Downloads link provided by GitHub to obtain a current snapshot of the code.

If you are using Linux or Mac OS X (10.7+), then you already have a git command-line client. Various git clients with graphical user interfaces are also available for Linux, Mac OS X, and Windows, and git is also available within popular integrated development environments. Note that git will be necessary if you wish to propose changes (submit pull requests) for the master branch of the source code repository.

To determine if you have a git command-line client, in a terminal window type git. If that command is found, then

  1. cd to the directory that will contain your directory jtk and
  2. type the command:
git clone https://github.com/MinesJTK/jtk.git

This command will create a directory jtk in your current working directory. The subdirectory .git contains a complete copy of the repository for the Mines Java Toolkit. If instead you simply use the GitHub Downloads link, then this subdirectory will be absent.

The directory jtk/ includes the following subdirectories:

Directory Description
core/ everything needed to build and test the Mines Java Toolkit
demo/ demonstration programs written in Java and Jython
docs/ extra (not API) documentation for some packages
gradle/ used by the Gradle wrapper to build the Mines JTK
misc/ miscellaneous tools for development and maintenance

Installing the Java Development Kit (JDK)

Before building the Mines JTK, you must first install Java SE JDK 7 (or later) On Windows, we like to put tools such as the JDK in a folder named C:\pro\. This folder name is shorter than "C:\Program Files" and contains no spaces, which makes it easy to specify in scripts and environment variables.

Building the Mines JTK

The Mines JTK can be built most easily using the included Gradle wrapper. Gradle is a tool for automatic software builds. You can download and install Gradle on your system, but you need not do so if you only want to build the Mines JTK. First cd into the directory jtk/, which contains files build.gradle, gradlew (for Mac OS and Linux) and gradlew.bat (for Windows). Then type the command gradlew (or sh gradlew) to build the Mines JTK. Look for the file core/build/libs/edu-mines-jtk-x.x.x.jar, for some version number x.x.x. You can use this JAR file like any other. However, depending on which packages you use, you may need other JAR files, called "dependencies." For example, the Mines JTK depends on JOGL for 3D graphics via OpenGL.

Gradle will automatically be downloaded the first time that you use the gradlew command. So you should first execute this command only when you have an internet connection.

The layout of directories and files for the Mines JTK was designed to conform to that expected by common build tools such as Gradle (and Maven). You may also use an integrated development environment (IDE), such as Eclipse or IntelliJ IDEA to build the Mines JTK. However, we strongly recommend that you first build the JTK from the command line, as described above.

Testing the Mines JTK

The full name of the default Gradle task performed by the command gradlew is :core:jar. We can perform other tasks, such as

gradlew test

which will build and run non-interactive unit tests.

gradlew distZip

to make a ZIP archive containing JAR files for the Mines JTK and all dependencies. To learn what tasks are available, we can use

gradlew tasks

Running demonstration programs

The Mines Java Toolkit is a set of classes intended for use in other programs. The demo subproject provides examples, Java classes with a method main, and Jython scripts. We can learn a lot about classes in the Mines JTK by running the demos and studying their source code. Try this:

gradlew run -P demo=mosaic.PlotFrameDemo

and this:

gradlew run -P demo=mosaic/PlotFrameDemo.py

The former command runs a Java class with a method main, and the latter runs a Jython script. In the property demo defined with the flag -P, the / instead of . and the suffix .py distinguish between the two cases. Despite their similar names, these demos are entirely different programs with different results.

Currently, the best way to learn about what demos are available is to browse the directories demo/src/main/[java, jython]/jtkdemo/.

3D graphics in the Mines JTK

Our packages for 3D graphics are built on JOGL, a Java binding for the OpenGL API. As a first demo that 3D graphics is working, type the command

gradlew run -P demo=ogl.HelloDemo

You should see a white square, painted via OpenGL. This demo program also prints the OpenGL vendor and version number. That number should not be less than 1.2.

Development using the Mines JTK

When developing your own software, you should not use package names that begin with "edu.mines.jtk", unless you are making modifications or additions to the Mines JTK that you wish to contribute back to us. (See the file license.txt The prefix edu.mines.jtk makes our class names unique.

Therefore, most classes that you write will have a different prefix, and your build process will create a JAR file with a different name. You might start by copying and modifying our demo directory layout and build.gradle.

In fact, this is how many of us work. We have our own private projects in which we implement new ideas with Java packages, which may or may not someday be included in the Mines JTK. (For convenience, the prefix for the package names in our private projects may be much shorter than "edu.mines.jtk".) Only those Java packages that are both well written and useful to others are eventually moved to edu.mines.jtk.

Comments
  • Publish updated maven artifact

    Publish updated maven artifact

    Would we now be able to publish an updated maven artifact to https://mvnrepository.com/artifact/edu.mines.jtk/edu-mines-jtk ? Maybe version 1.1.0? Or 1.0.1?

    Were we waiting on some sonatype credentials?

    Do we still want to use the same groupId and artifactId?

    Here is the original issue from the previous project: https://github.com/dhale/jtk/issues/29

    question 
    opened by wsharlan 6
  • Performance: Optimize coef cache in SincInterpolator

    Performance: Optimize coef cache in SincInterpolator

    Eliminate excess synchronization in SincInterpolator by using ConcurrentHashMap for the coef cache.

    With this change, cache readers are lock-free, and writers contend on locks less frequently, due to lock striping approach leveraged by ConcurrentHashMap.

    Since memory barriers related to synchronized block exit are gone, classes like Design, Table, KaiserWindow should safely publish their state on construction, by having the final modifier on fields.

    enhancement 
    opened by SereneAnt 2
  • outdated with Gradle 4.6

    outdated with Gradle 4.6

    Hi,

    I followed the instructions on https://github.com/MinesJTK/jtk and found that the readme is a little outdated. I used Gradle 4.6 (brew installed) and all gradlew is obsoleted, instead gradle test or gradle distZip work.

    In addition, gradle deps does not work: luming-C02PV3X2G8WM:jtk llmpass$ gradle deps

    FAILURE: Build failed with an exception.

    What went wrong: Task 'deps' not found in root project 'jtk'.

    Try: Run gradle tasks to get a list of available tasks. Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

    Get more help at https://help.gradle.org

    BUILD FAILED in 0s

    bug 
    opened by llmpass 2
  • Consider moving to TestNG?

    Consider moving to TestNG?

    Currently, we're using JUnit 4 as a our test package. It's great for simple testing, but TestNG allows for much more granularity for individual test settings, as well as native support for concurrent testing.

    The structure and annotations for both are close enough that migrating would be relatively trivial I think and require a small bit of refactoring.

    enhancement 
    opened by chrisengelsma 1
  • Migration to TestNG and parallelization of unit tests

    Migration to TestNG and parallelization of unit tests

    This PR migrates the underlying test package from JUnit to TestNG. The reason for this migration are as follows:

    1. TestNG provides much better granularity when it comes to defining specific test method behavior
    2. Much less markup
    3. Parallel testing support. The number of testing threads currently set in this PR is set to 5 threads.

    Documentation on TestNG can be found here: http://testng.org/doc/documentation-main.html

    enhancement 
    opened by chrisengelsma 0
  • Fix exploding values

    Fix exploding values

    Fix non convergence of the local smoothing filter iterations, as sdot(d,q) would be Infinity for large numbers, eventually resulting in NaN rnorm. the fix changes float to 64bit double precision for scalars, sdot and saxpy calculations.

    opened by roeezis 1
  • Fix index overflow in quickPartition methods.

    Fix index overflow in quickPartition methods.

    When sorting a large array where the length is more than half the maximum integer value, one of the computed indices in quickPartition may overflow, which can lead to a negative array index. This patch fixes the overflow issue using longs to compute the index value.

    opened by bkmacy 1
Releases(v1.1.0)
Owner
Mines Java Toolkit
Mines Java Toolkit
A 3D chart library for Java applications (JavaFX, Swing or server-side).

Orson Charts (C)opyright 2013-2020, by Object Refinery Limited. All rights reserved. Version 2.0, 15 March 2020. Overview Orson Charts is a 3D chart l

David Gilbert 96 Sep 27, 2022
Java dataframe and visualization library

Tablesaw Overview Tablesaw is Java for data science. It includes a dataframe and a visualization library, as well as utilities for loading, transformi

Tablesaw 3.1k Jan 7, 2023
XChart is a light-weight Java library for plotting data.

XChart XChart is a light weight Java library for plotting data. Description XChart is a light-weight and convenient library for plotting data designed

Knowm 1.3k Dec 26, 2022
Nuclear-Mines-Mod - A mod adding radiation-related items to Mindustry (radioactive materials, new guns, etc.)

Nuclear Mines (VERY EARLY BUILD) A Mindustry mod adding more radiation-based items to the game. THIS IS A VERY EARLY VERSION. NOT EVERYTHING IS FINISH

null 6 Sep 3, 2022
Java bytecode engineering toolkit

Java bytecode engineering toolkit Javassist version 3 Copyright (C) 1999-2020 by Shigeru Chiba, All rights reserved. Javassist (JAVA programming ASSIS

null 3.7k Dec 29, 2022
Speedment is a Stream ORM Java Toolkit and Runtime

Java Stream ORM Speedment is an open source Java Stream ORM toolkit and runtime. The toolkit analyzes the metadata of an existing SQL database and aut

Speedment 2k Dec 21, 2022
Java Web Toolkit

What is JWt ? JWt is a Java library for developing web applications. It provides a pure Java component-driven approach to building web applications, a

null 48 Jul 16, 2022
Java time series machine learning tools in a Weka compatible toolkit

UEA Time Series Classification A Weka-compatible Java toolbox for time series classification, clustering and transformation. For the python sklearn-co

Machine Learning and Time Series Tools and Datasets 140 Nov 7, 2022
ScalaTest is a free, open-source testing toolkit for Scala and Java programmers

ScalaTest is a free, open-source testing toolkit for Scala and Java programmers.

ScalaTest 1.1k Dec 26, 2022
Toolkit for testing multi-threaded and asynchronous applications

ConcurrentUnit A simple, zero-dependency toolkit for testing multi-threaded code. Supports Java 1.6+. Introduction ConcurrentUnit was created to help

Jonathan Halterman 406 Dec 30, 2022
OpenMap is an Open Source JavaBeans-based programmer's toolkit. Using OpenMap, you can quickly build applications and applets that access data from legacy databases and applications.

$Source: /cvs/distapps/openmap/README,v $ $RCSfile: README,v $ $Revision: 1.11 $ $Date: 2002/11/06 19:11:02 $ $Author: bmackiew $ OpenMap(tm) What

OpenMap 65 Nov 12, 2022
A proof-of-concept Android application to detect and defeat some of the Cellebrite UFED forensic toolkit extraction techniques.

LockUp An Android-based Cellebrite UFED self-defense application LockUp is an Android application that will monitor the device for signs for attempts

mbkore 300 Dec 4, 2022
A fast and accurate POS and morphological tagging toolkit (EACL 2014)

RDRPOSTagger RDRPOSTagger is a robust and easy-to-use toolkit for POS and morphological tagging. It employs an error-driven approach to automatically

Dat Quoc Nguyen 137 Sep 9, 2022
An powerful enhanced toolkit of MyBatis for simplify development

Born To Simplify Development 企业版 Mybatis-Mate 高级特性 What is MyBatis-Plus? MyBatis-Plus is an powerful enhanced toolkit of MyBatis for simplify developm

baomidou 13.9k Jan 10, 2023
APIKit:Discovery, Scan and Audit APIs Toolkit All In One.

APIKit:Discovery, Scan and Audit APIs Toolkit All In One.

APISecurity Community 976 Jan 9, 2023
Hexagon is a microservices toolkit written in Kotlin

Hexagon is a microservices' toolkit (not a framework) written in Kotlin. Its purpose is to ease the building of server applications (Web applications, APIs or queue consumers) that run inside a cloud platform.

Hexagon 413 Jan 5, 2023
Apache OpenNLP library is a machine learning based toolkit for the processing of natural language text

Welcome to Apache OpenNLP! The Apache OpenNLP library is a machine learning based toolkit for the processing of natural language text. This toolkit is

The Apache Software Foundation 1.2k Dec 29, 2022
RESTKit is a powerful toolkit for restful services development

RESTKit is a powerful toolkit for restful services development. This plugin is committed to enhancing development efficiency with useful

Mr.Hu 25 Dec 22, 2022
A proof-of-concept Android application to detect and defeat some of the Cellebrite UFED forensic toolkit extraction techniques.

LockUp An Android-based Cellebrite UFED self-defense application LockUp is an Android application that will monitor the device for signs for attempts

levlesec 300 Dec 4, 2022
A Toolkit for Modeling and Simulation of Resource Management Techniques in Internet of Things, Edge and Fog Computing Environments

The iFogSimToolkit (with its new release iFogSim2) for Modeling and Simulation of Resource Management Techniques in Internet of Things, Edge and Fog Computing Environments. In the new release Mobili Management, Microservice Management, and Dynamic Clustering mechanisms are added as new features.

The Cloud Computing and Distributed Systems (CLOUDS) Laboratory 69 Dec 17, 2022