Permalink
Browse files

initial public repo

  • Loading branch information...
gimer committed Apr 19, 2015
0 parents commit 624d51ec5472258598f9ae4c66459dea52410945
Showing 442 changed files with 54,313 additions and 0 deletions.
@@ -0,0 +1,5 @@
target/
*~
*.orig
*.bak
*.iml
@@ -0,0 +1,5 @@
compilation:

mvn install -DskipTests=true

skipTest, as there is one test that might occassionally fail on windows
@@ -0,0 +1,9 @@
rem batch files have funny escaping
rem

awk "{ if (match($0, /(.*\.)([0-9]+)(-BETA.*)/, arr)) { printf \"%%s%%d%%s\n\", arr[1], arr[2]+1, arr[3] } else { print } }" < pom.xml > pom.out
tr --delete "\r" < pom.out > pom.xml
rm pom.out

git add pom.xml
sed -n "/BETA/{ s/.*\([0-9]\+.[0-9]\+.[0-9]\+-BETA\).*/bump version to \1/; p }" pom.xml | xargs -iXX git commit -m XX
249 pom.xml
@@ -0,0 +1,249 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.nem.core</groupId>
<artifactId>nem-core</artifactId>
<version>0.6.28-BETA</version>
<name>NEM Core</name>
<organization>
<name>NEM - New Economy Movement</name>
<url>http://nem.io</url>
</organization>

<properties>
<nemCodeBase>http://bob.nem.ninja/</nemCodeBase>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<spring.version>4.0.0.RELEASE</spring.version>
</properties>

<dependencies>

<dependency>
<groupId>com.googlecode.javaewah</groupId>
<artifactId>JavaEWAH</artifactId>
<version>1.0.0</version>
</dependency>

<dependency>
<groupId>net.minidev</groupId>
<artifactId>json-smart</artifactId>
<version>1.2</version>
</dependency>

<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk15on</artifactId>
<version>1.50</version>
</dependency>

<!-- commons -->
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>1.9</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.4</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-math3</artifactId>
<version>3.2</version>
</dependency>

<!-- async http client -->
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpasyncclient</artifactId>
<version>4.0.2</version>
</dependency>

<!-- test related -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<version>1.9.5</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.googlecode.matrix-toolkits-java</groupId>
<artifactId>mtj</artifactId>
<version>1.0.1</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>com.github.tomakehurst</groupId>
<artifactId>wiremock</artifactId>
<version>1.53</version>
<scope>test</scope>

<!-- Include everything below here if you have dependency conflicts -->
<classifier>standalone</classifier>
<exclusions>
<exclusion>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty</artifactId>
</exclusion>
<exclusion>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</exclusion>
<exclusion>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
</exclusion>
<exclusion>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
</exclusion>
<exclusion>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
</exclusion>
<exclusion>
<groupId>org.skyscreamer</groupId>
<artifactId>jsonassert</artifactId>
</exclusion>
<exclusion>
<groupId>xmlunit</groupId>
<artifactId>xmlunit</artifactId>
</exclusion>
<exclusion>
<groupId>com.jayway.jsonpath</groupId>
<artifactId>json-path</artifactId>
</exclusion>
<exclusion>
<groupId>net.sf.jopt-simple</groupId>
<artifactId>jopt-simple</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>

<build>
<resources>
<resource>
<directory>src/main/resources</directory>
<includes>
<include>nemesis.bin</include>
<include>nemesis-testnet.bin</include>
<include>nemesis-testnet.json</include>
</includes>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<encoding>${project.build.sourceEncoding}</encoding>
<compilerArgument>-Xlint:unchecked</compilerArgument>
<includes>
<include>org/nem/core/**/*.java</include>
</includes>
<testIncludes>
<include>org/nem/core/**/*.java</include>
</testIncludes>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.9.1</version>
<configuration>
<sourcepath>${basedir}/src/main/java/org/nem/core</sourcepath>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.6</version>
<configuration>
<archive>
<manifest>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
</manifest>
<manifestEntries>
<Permissions>all-permissions</Permissions>
<Codebase>${nemCodeBase}</Codebase>
<Application-Name>${project.name}</Application-Name>
<Trusted-Only>true</Trusted-Only>
<Implementation-Build>${project.version}</Implementation-Build>
<Implementation-Vendor>NEM - New Economy Movement</Implementation-Vendor>
</manifestEntries>
<addMavenDescriptor>false</addMavenDescriptor>
</archive>
</configuration>
<executions>
<execution>
<goals>
<goal>test-jar</goal>
</goals>
</execution>
</executions>
</plugin>

<!-- this adds test_integration, so that during test-compile phase they will be compiled, unfortunately, we can't specify target dir :/ -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>1.5</version>
<executions>
<execution>
<id>add-test-source</id>
<phase>generate-test-sources</phase>
<goals>
<goal>add-test-source</goal>
</goals>
<configuration>
<sources>
<source>src/it/java</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.16</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.16</version>
<configuration>
<testSourceDirectory>src/it/java</testSourceDirectory>
<failIfNoTests>true</failIfNoTests>
</configuration>
<executions>
<execution>
<id>default-integration-test</id>
<goals>
<goal>integration-test</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
@@ -0,0 +1,51 @@
package org.nem.core.math;

import no.uib.cipr.matrix.MatrixEntry;
import no.uib.cipr.matrix.sparse.CompRowMatrix;

/**
* A Matrix implementation that uses CompRowMatrix from MTJ.
*/
public class MtjSparseMatrix extends Matrix {

private final CompRowMatrix matrix;

public MtjSparseMatrix(
final int numRows,
final int numCols,
final CompRowMatrix matrix) {
super(numRows, numCols);
this.matrix = matrix;
}

@Override
protected Matrix create(final int numRows, final int numCols) {
throw new UnsupportedOperationException("this operation is not currently supported");
}

@Override
protected double getAtUnchecked(final int row, final int col) {
return this.matrix.get(row, col);
}

@Override
protected void setAtUnchecked(final int row, final int col, final double val) {
this.matrix.set(row, col, val);
}

@Override
protected void forEach(final ElementVisitorFunction func) {
for (final MatrixEntry entry : this.matrix) {
func.visit(
entry.row(),
entry.column(),
entry.get(),
entry::set);
}
}

@Override
public MatrixNonZeroElementRowIterator getNonZeroElementRowIterator(final int row) {
throw new UnsupportedOperationException("this operation is not currently supported");
}
}
Oops, something went wrong.

0 comments on commit 624d51e

Please sign in to comment.