You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by ag...@apache.org on 2017/04/18 09:00:38 UTC

[26/50] [abbrv] ignite git commit: IGNITE-5000 Rename Ignite Math module to Ignite ML module

http://git-wip-us.apache.org/repos/asf/ignite/blob/732dfea9/modules/math/src/main/java/org/apache/ignite/math/impls/vector/CacheVector.java
----------------------------------------------------------------------
diff --git a/modules/math/src/main/java/org/apache/ignite/math/impls/vector/CacheVector.java b/modules/math/src/main/java/org/apache/ignite/math/impls/vector/CacheVector.java
deleted file mode 100644
index 0e9b26f..0000000
--- a/modules/math/src/main/java/org/apache/ignite/math/impls/vector/CacheVector.java
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.math.impls.vector;
-
-import org.apache.ignite.IgniteCache;
-import org.apache.ignite.math.Matrix;
-import org.apache.ignite.math.ValueMapper;
-import org.apache.ignite.math.Vector;
-import org.apache.ignite.math.VectorKeyMapper;
-import org.apache.ignite.math.exceptions.UnsupportedOperationException;
-import org.apache.ignite.math.functions.IgniteBiFunction;
-import org.apache.ignite.math.functions.IgniteDoubleFunction;
-import org.apache.ignite.math.functions.IgniteFunction;
-import org.apache.ignite.math.impls.CacheUtils;
-import org.apache.ignite.math.impls.storage.vector.CacheVectorStorage;
-
-/**
- * Vector based on existing cache and index and value mapping functions.
- */
-public class CacheVector<K, V> extends AbstractVector {
-    /**
-     *
-     */
-    public CacheVector() {
-        // No-op.
-    }
-
-    /**
-     * Creates new vector over existing cache.
-     *
-     * @param size
-     * @param cache
-     * @param keyFunc
-     * @param valMapper
-     */
-    public CacheVector(
-        int size,
-        IgniteCache<K, V> cache,
-        VectorKeyMapper<K> keyFunc,
-        ValueMapper<V> valMapper) {
-        setStorage(new CacheVectorStorage<>(size, cache, keyFunc, valMapper));
-    }
-
-    /**
-     * @param mapper
-     */
-    private Vector mapOverCache(IgniteFunction<Double, Double> mapper) {
-        CacheVectorStorage<K, V> sto = storage();
-
-        CacheUtils.map(sto.cache().getName(), sto.keyMapper(), sto.valueMapper(), mapper);
-
-        return this;
-    }
-
-    /** {@inheritDoc} */
-    @Override public double minValue() {
-        CacheVectorStorage<K, V> sto = storage();
-
-        return CacheUtils.min(sto.cache().getName(), sto.keyMapper(), sto.valueMapper());
-    }
-
-    /** {@inheritDoc} */
-    @Override public double maxValue() {
-        CacheVectorStorage<K, V> sto = storage();
-
-        return CacheUtils.max(sto.cache().getName(), sto.keyMapper(), sto.valueMapper());
-    }
-
-    /** {@inheritDoc} */
-    @Override public Vector map(IgniteDoubleFunction<Double> fun) {
-        return mapOverCache(fun::apply);
-    }
-
-    /** {@inheritDoc} */
-    @Override public Vector map(IgniteBiFunction<Double, Double, Double> fun, double y) {
-        // TODO: provide cache-optimized implementation.
-        return super.map(fun, y); // TODO
-    }
-
-    /** {@inheritDoc} */
-    @Override public double sum() {
-        CacheVectorStorage<K, V> sto = storage();
-
-        return CacheUtils.sum(sto.cache().getName(), sto.keyMapper(), sto.valueMapper());
-    }
-
-    /** {@inheritDoc} */
-    @Override public Vector assign(double val) {
-        return mapOverCache((Double d) -> val);
-    }
-
-    /** {@inheritDoc} */
-    @Override public Vector plus(double x) {
-        return mapOverCache((Double d) -> d + x);
-    }
-
-    /** {@inheritDoc} */
-    @Override public Vector divide(double x) {
-        return mapOverCache((Double d) -> d / x);
-    }
-
-    /** {@inheritDoc} */
-    @Override public Vector times(double x) {
-        return mapOverCache((Double d) -> d * x);
-    }
-
-    /**
-     *
-     *
-     */
-    @SuppressWarnings({"unchecked"})
-    private CacheVectorStorage<K, V> storage() {
-        return (CacheVectorStorage<K, V>)getStorage();
-    }
-
-    /** {@inheritDoc} */
-    @Override public Vector like(int crd) {
-        throw new UnsupportedOperationException();
-    }
-
-    /** {@inheritDoc} */
-    @Override public Matrix likeMatrix(int rows, int cols) {
-        throw new UnsupportedOperationException();
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/732dfea9/modules/math/src/main/java/org/apache/ignite/math/impls/vector/ConstantVector.java
----------------------------------------------------------------------
diff --git a/modules/math/src/main/java/org/apache/ignite/math/impls/vector/ConstantVector.java b/modules/math/src/main/java/org/apache/ignite/math/impls/vector/ConstantVector.java
deleted file mode 100644
index 0fddfd6..0000000
--- a/modules/math/src/main/java/org/apache/ignite/math/impls/vector/ConstantVector.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.math.impls.vector;
-
-import org.apache.ignite.math.Matrix;
-import org.apache.ignite.math.Vector;
-import org.apache.ignite.math.VectorStorage;
-import org.apache.ignite.math.exceptions.UnsupportedOperationException;
-import org.apache.ignite.math.impls.storage.vector.ConstantVectorStorage;
-
-/**
- * Constant value, read-only vector.
- */
-public class ConstantVector extends AbstractReadOnlyVector {
-    /**
-     *
-     */
-    public ConstantVector() {
-        // No-op.
-    }
-
-    /**
-     * @param size
-     * @param val
-     */
-    public ConstantVector(int size, double val) {
-        super(new ConstantVectorStorage(size, val));
-    }
-
-    /**
-     *
-     *
-     */
-    private ConstantVectorStorage storage() {
-        return (ConstantVectorStorage)getStorage();
-    }
-
-    /** {@inheritDoc} */
-    @Override public Vector copy() {
-        ConstantVectorStorage sto = storage();
-
-        return new ConstantVector(sto.size(), sto.constant());
-    }
-
-    /** {@inheritDoc} */
-    @Override public Vector like(int crd) {
-        return new ConstantVector(crd, storage().constant());
-    }
-
-    /** {@inheritDoc} */
-    @Override public Matrix likeMatrix(int rows, int cols) {
-        throw new UnsupportedOperationException();
-    }
-
-    /** {@inheritDoc} */
-    @Override public boolean equals(Object o) {
-        if (this == o)
-            return true;
-
-        if (o == null || getClass() != o.getClass())
-            return false;
-
-        ConstantVector that = (ConstantVector)o;
-
-        VectorStorage sto = getStorage();
-
-        return (sto != null ? sto.equals(that.getStorage()) : that.getStorage() == null);
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/732dfea9/modules/math/src/main/java/org/apache/ignite/math/impls/vector/DelegatingVector.java
----------------------------------------------------------------------
diff --git a/modules/math/src/main/java/org/apache/ignite/math/impls/vector/DelegatingVector.java b/modules/math/src/main/java/org/apache/ignite/math/impls/vector/DelegatingVector.java
deleted file mode 100644
index a10fa45..0000000
--- a/modules/math/src/main/java/org/apache/ignite/math/impls/vector/DelegatingVector.java
+++ /dev/null
@@ -1,391 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.math.impls.vector;
-
-import java.io.IOException;
-import java.io.ObjectInput;
-import java.io.ObjectOutput;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Spliterator;
-import java.util.function.IntToDoubleFunction;
-import org.apache.ignite.lang.IgniteUuid;
-import org.apache.ignite.math.Matrix;
-import org.apache.ignite.math.Vector;
-import org.apache.ignite.math.VectorStorage;
-import org.apache.ignite.math.functions.IgniteBiFunction;
-import org.apache.ignite.math.functions.IgniteDoubleFunction;
-
-/**
- * Convenient class that can be used to add decorations to an existing vector. Subclasses
- * can add weights, indices, etc. while maintaining full vector functionality.
- */
-public class DelegatingVector implements Vector {
-    /** Delegating vector. */
-    private Vector dlg;
-
-    /** Meta attribute storage. */
-    private Map<String, Object> meta = new HashMap<>();
-
-    /** GUID. */
-    private IgniteUuid guid = IgniteUuid.randomUuid();
-
-    /** */
-    public DelegatingVector() {
-        // No-op.
-    }
-
-    /**
-     * @param dlg
-     */
-    public DelegatingVector(Vector dlg) {
-        assert dlg != null;
-
-        this.dlg = dlg;
-    }
-
-    /** {@inheritDoc} */
-    @Override public void writeExternal(ObjectOutput out) throws IOException {
-        out.writeObject(dlg);
-        out.writeObject(meta);
-        out.writeObject(guid);
-    }
-
-    /** {@inheritDoc} */
-    @SuppressWarnings("unchecked")
-    @Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
-        dlg = (Vector)in.readObject();
-        meta = (Map<String, Object>)in.readObject();
-        guid = (IgniteUuid)in.readObject();
-    }
-
-    /** {@inheritDoc} */
-    @Override public Map<String, Object> getMetaStorage() {
-        return meta;
-    }
-
-    /** {@inheritDoc} */
-    @Override public Matrix likeMatrix(int rows, int cols) {
-        return dlg.likeMatrix(rows, cols);
-    }
-
-    /** {@inheritDoc} */
-    @Override public Matrix toMatrix(boolean rowLike) {
-        return dlg.toMatrix(rowLike);
-    }
-
-    /** {@inheritDoc} */
-    @Override public Matrix toMatrixPlusOne(boolean rowLike, double zeroVal) {
-        return dlg.toMatrixPlusOne(rowLike, zeroVal);
-    }
-
-    /** {@inheritDoc} */
-    @Override public int size() {
-        return dlg.size();
-    }
-
-    /** {@inheritDoc} */
-    @Override public boolean isDense() {
-        return dlg.isDense();
-    }
-
-    /** {@inheritDoc} */
-    @Override public double minValue() {
-        return dlg.minValue();
-    }
-
-    /** {@inheritDoc} */
-    @Override public double maxValue() {
-        return dlg.maxValue();
-    }
-
-    /** {@inheritDoc} */
-    @Override public boolean isSequentialAccess() {
-        return dlg.isSequentialAccess();
-    }
-
-    /** {@inheritDoc} */
-    @Override public boolean isArrayBased() {
-        return dlg.isArrayBased();
-    }
-
-    /** {@inheritDoc} */
-    @Override public Vector copy() {
-        return new DelegatingVector(dlg);
-    }
-
-    /** {@inheritDoc} */
-    @Override public Iterable<Element> all() {
-        return dlg.all();
-    }
-
-    /** {@inheritDoc} */
-    @Override public Iterable<Element> nonZeroes() {
-        return dlg.nonZeroes();
-    }
-
-    /** {@inheritDoc} */
-    @Override public Vector sort() {
-        return dlg.sort();
-    }
-
-    /** {@inheritDoc} */
-    @Override public Spliterator<Double> allSpliterator() {
-        return dlg.allSpliterator();
-    }
-
-    /** {@inheritDoc} */
-    @Override public Spliterator<Double> nonZeroSpliterator() {
-        return dlg.nonZeroSpliterator();
-    }
-
-    /** {@inheritDoc} */
-    @Override public Element getElement(int idx) {
-        return dlg.getElement(idx);
-    }
-
-    /** {@inheritDoc} */
-    @Override public Vector assign(double val) {
-        return dlg.assign(val);
-    }
-
-    /** {@inheritDoc} */
-    @Override public Vector assign(double[] vals) {
-        return dlg.assign(vals);
-    }
-
-    /** {@inheritDoc} */
-    @Override public Vector assign(Vector vec) {
-        return dlg.assign(vec);
-    }
-
-    /** {@inheritDoc} */
-    @Override public Vector assign(IntToDoubleFunction fun) {
-        return dlg.assign(fun);
-    }
-
-    /** {@inheritDoc} */
-    @Override public Vector map(IgniteDoubleFunction<Double> fun) {
-        return dlg.map(fun);
-    }
-
-    /** {@inheritDoc} */
-    @Override public Vector map(Vector vec, IgniteBiFunction<Double, Double, Double> fun) {
-        return dlg.map(vec, fun);
-    }
-
-    /** {@inheritDoc} */
-    @Override public Vector map(IgniteBiFunction<Double, Double, Double> fun, double y) {
-        return dlg.map(fun, y);
-    }
-
-    /** {@inheritDoc} */
-    @Override public Vector divide(double x) {
-        return dlg.divide(x);
-    }
-
-    /** {@inheritDoc} */
-    @Override public double dot(Vector vec) {
-        return dlg.dot(vec);
-    }
-
-    /** {@inheritDoc} */
-    @Override public double get(int idx) {
-        return dlg.get(idx);
-    }
-
-    /** {@inheritDoc} */
-    @Override public double getX(int idx) {
-        return dlg.getX(idx);
-    }
-
-    /** {@inheritDoc} */
-    @Override public Vector like(int crd) {
-        return dlg.like(crd);
-    }
-
-    /** {@inheritDoc} */
-    @Override public Vector minus(Vector vec) {
-        return dlg.minus(vec);
-    }
-
-    /** {@inheritDoc} */
-    @Override public Vector normalize() {
-        return dlg.normalize();
-    }
-
-    /** {@inheritDoc} */
-    @Override public Vector normalize(double power) {
-        return dlg.normalize(power);
-    }
-
-    /** {@inheritDoc} */
-    @Override public Vector logNormalize() {
-        return dlg.logNormalize();
-    }
-
-    /** {@inheritDoc} */
-    @Override public Vector logNormalize(double power) {
-        return dlg.logNormalize(power);
-    }
-
-    /** {@inheritDoc} */
-    @Override public double kNorm(double power) {
-        return dlg.kNorm(power);
-    }
-
-    /** {@inheritDoc} */
-    @Override public Element minElement() {
-        return dlg.minElement();
-    }
-
-    /** {@inheritDoc} */
-    @Override public Element maxElement() {
-        return dlg.maxElement();
-    }
-
-    /** {@inheritDoc} */
-    @Override public Vector plus(double x) {
-        return dlg.plus(x);
-    }
-
-    /** {@inheritDoc} */
-    @Override public Vector plus(Vector vec) {
-        return dlg.plus(vec);
-    }
-
-    /** {@inheritDoc} */
-    @Override public Vector set(int idx, double val) {
-        return dlg.set(idx, val);
-    }
-
-    /** {@inheritDoc} */
-    @Override public Vector setX(int idx, double val) {
-        return dlg.setX(idx, val);
-    }
-
-    /** {@inheritDoc} */
-    @Override public Vector incrementX(int idx, double val) {
-        return dlg.incrementX(idx, val);
-    }
-
-    /** {@inheritDoc} */
-    @Override public Vector increment(int idx, double val) {
-        return dlg.increment(idx, val);
-    }
-
-    /** {@inheritDoc} */
-    @Override public int nonZeroElements() {
-        return dlg.nonZeroElements();
-    }
-
-    /** {@inheritDoc} */
-    @Override public Vector times(double x) {
-        return dlg.times(x);
-    }
-
-    /** {@inheritDoc} */
-    @Override public Vector times(Vector vec) {
-        return dlg.times(vec);
-    }
-
-    /** {@inheritDoc} */
-    @Override public Vector viewPart(int off, int len) {
-        return dlg.viewPart(off, len);
-    }
-
-    /** {@inheritDoc} */
-    @Override public VectorStorage getStorage() {
-        return dlg.getStorage();
-    }
-
-    /** {@inheritDoc} */
-    @Override public double sum() {
-        return dlg.sum();
-    }
-
-    /** {@inheritDoc} */
-    @Override public Matrix cross(Vector vec) {
-        return dlg.cross(vec);
-    }
-
-    /** {@inheritDoc} */
-    @Override public <T> T foldMap(IgniteBiFunction<T, Double, T> foldFun, IgniteDoubleFunction<Double> mapFun,
-        T zeroVal) {
-        return dlg.foldMap(foldFun, mapFun, zeroVal);
-    }
-
-    /** {@inheritDoc} */
-    @Override public <T> T foldMap(Vector vec, IgniteBiFunction<T, Double, T> foldFun,
-        IgniteBiFunction<Double, Double, Double> combFun, T zeroVal) {
-        return dlg.foldMap(vec, foldFun, combFun, zeroVal);
-    }
-
-    /** {@inheritDoc} */
-    @Override public double getLengthSquared() {
-        return dlg.getLengthSquared();
-    }
-
-    /** {@inheritDoc} */
-    @Override public double getDistanceSquared(Vector vec) {
-        return dlg.getDistanceSquared(vec);
-    }
-
-    /** {@inheritDoc} */
-    @Override public boolean isRandomAccess() {
-        return dlg.isRandomAccess();
-    }
-
-    /** {@inheritDoc} */
-    @Override public boolean isDistributed() {
-        return dlg.isDistributed();
-    }
-
-    /** {@inheritDoc} */
-    @Override public IgniteUuid guid() {
-        return guid;
-    }
-
-    /** {@inheritDoc} */
-    @Override public void destroy() {
-        dlg.destroy();
-    }
-
-    /** {@inheritDoc} */
-    @Override public int hashCode() {
-        int res = 1;
-
-        res = res * 37 + meta.hashCode();
-        res = res * 37 + dlg.hashCode();
-
-        return res;
-    }
-
-    /** {@inheritDoc} */
-    @Override public boolean equals(Object o) {
-        if (this == o)
-            return true;
-
-        if (o == null || getClass() != o.getClass())
-            return false;
-
-        DelegatingVector that = (DelegatingVector)o;
-
-        return meta.equals(that.meta) && dlg.equals(that.dlg);
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/732dfea9/modules/math/src/main/java/org/apache/ignite/math/impls/vector/DenseLocalOffHeapVector.java
----------------------------------------------------------------------
diff --git a/modules/math/src/main/java/org/apache/ignite/math/impls/vector/DenseLocalOffHeapVector.java b/modules/math/src/main/java/org/apache/ignite/math/impls/vector/DenseLocalOffHeapVector.java
deleted file mode 100644
index 4e7eb21..0000000
--- a/modules/math/src/main/java/org/apache/ignite/math/impls/vector/DenseLocalOffHeapVector.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.math.impls.vector;
-
-import java.util.stream.IntStream;
-import org.apache.ignite.math.Matrix;
-import org.apache.ignite.math.Vector;
-import org.apache.ignite.math.impls.matrix.DenseLocalOffHeapMatrix;
-import org.apache.ignite.math.impls.storage.vector.DenseLocalOffHeapVectorStorage;
-
-/**
- * Implementation for {@link Vector} assuming dense logic and local offheap JVM storage.
- * It is suitable for data sets where local, non-distributed execution is satisfactory and on-heap JVM storage
- * is not enough to keep the entire data set.
- */
-public class DenseLocalOffHeapVector extends AbstractVector {
-    /** */
-    public DenseLocalOffHeapVector() {
-        // No-op.
-    }
-
-    /** */
-    private void makeOffheapStorage(int size) {
-        setStorage(new DenseLocalOffHeapVectorStorage(size));
-    }
-
-    /**
-     * @param arr Array to copy to offheap storage.
-     */
-    public DenseLocalOffHeapVector(double[] arr) {
-        makeOffheapStorage(arr.length);
-
-        assign(arr);
-    }
-
-    /**
-     * @param size Vector cardinality.
-     */
-    public DenseLocalOffHeapVector(int size) {
-        makeOffheapStorage(size);
-    }
-
-    /** {@inheritDoc} */
-    @Override public Vector assign(Vector vec) {
-        checkCardinality(vec);
-
-        IntStream.range(0, size()).parallel().forEach(idx -> set(idx, vec.get(idx)));
-
-        return this;
-    }
-
-    /** {@inheritDoc} */
-    @Override public Vector times(double x) {
-        if (x == 0.0)
-            return like(size()).assign(0);
-        else
-            return super.times(x);
-    }
-
-    /** {@inheritDoc} */
-    @Override public Vector like(int crd) {
-        return new DenseLocalOffHeapVector(crd);
-    }
-
-    /** {@inheritDoc} */
-    @Override public Matrix likeMatrix(int rows, int cols) {
-        return new DenseLocalOffHeapMatrix(rows, cols);
-    }
-
-    /** {@inheritDoc} */
-    @Override public boolean equals(Object o) {
-        return o != null && getClass().equals(o.getClass()) && (getStorage().equals(((Vector)o).getStorage()));
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/732dfea9/modules/math/src/main/java/org/apache/ignite/math/impls/vector/DenseLocalOnHeapVector.java
----------------------------------------------------------------------
diff --git a/modules/math/src/main/java/org/apache/ignite/math/impls/vector/DenseLocalOnHeapVector.java b/modules/math/src/main/java/org/apache/ignite/math/impls/vector/DenseLocalOnHeapVector.java
deleted file mode 100644
index 5827998..0000000
--- a/modules/math/src/main/java/org/apache/ignite/math/impls/vector/DenseLocalOnHeapVector.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.math.impls.vector;
-
-import java.util.Map;
-import org.apache.ignite.math.Matrix;
-import org.apache.ignite.math.Vector;
-import org.apache.ignite.math.VectorStorage;
-import org.apache.ignite.math.exceptions.UnsupportedOperationException;
-import org.apache.ignite.math.impls.matrix.DenseLocalOnHeapMatrix;
-import org.apache.ignite.math.impls.storage.vector.ArrayVectorStorage;
-
-/**
- * Basic implementation for vector.
- * <p>
- * This is a trivial implementation for vector assuming dense logic, local on-heap JVM storage
- * based on {@code double[]} array. It is only suitable for data sets where
- * local, non-distributed execution is satisfactory and on-heap JVM storage is enough
- * to keep the entire data set.
- */
-public class DenseLocalOnHeapVector extends AbstractVector {
-    /**
-     * @param size Vector cardinality.
-     */
-    private VectorStorage mkStorage(int size) {
-        return new ArrayVectorStorage(size);
-    }
-
-    /**
-     * @param arr Source array.
-     * @param cp {@code true} to clone array, reuse it otherwise.
-     */
-    private VectorStorage mkStorage(double[] arr, boolean cp) {
-        assert arr != null;
-
-        return new ArrayVectorStorage(cp ? arr.clone() : arr);
-    }
-
-    /**
-     * @param args Parameters for new Vector.
-     */
-    public DenseLocalOnHeapVector(Map<String, Object> args) {
-        assert args != null;
-
-        if (args.containsKey("size"))
-            setStorage(mkStorage((int)args.get("size")));
-        else if (args.containsKey("arr") && args.containsKey("copy"))
-            setStorage(mkStorage((double[])args.get("arr"), (boolean)args.get("copy")));
-        else
-            throw new UnsupportedOperationException("Invalid constructor argument(s).");
-    }
-
-    /** */
-    public DenseLocalOnHeapVector() {
-        // No-op.
-    }
-
-    /**
-     * @param size Vector cardinality.
-     */
-    public DenseLocalOnHeapVector(int size) {
-        setStorage(mkStorage(size));
-    }
-
-    /**
-     * @param arr Source array.
-     * @param shallowCp {@code true} to use shallow copy.
-     */
-    public DenseLocalOnHeapVector(double[] arr, boolean shallowCp) {
-        setStorage(mkStorage(arr, shallowCp));
-    }
-
-    /**
-     * @param arr Source array.
-     */
-    public DenseLocalOnHeapVector(double[] arr) {
-        this(arr, false);
-    }
-
-    /** {@inheritDoc} */
-    @Override public Matrix likeMatrix(int rows, int cols) {
-        return new DenseLocalOnHeapMatrix(rows, cols);
-    }
-
-    /** {@inheritDoc} */
-    @Override public Vector like(int crd) {
-        return new DenseLocalOnHeapVector(crd);
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/732dfea9/modules/math/src/main/java/org/apache/ignite/math/impls/vector/FunctionVector.java
----------------------------------------------------------------------
diff --git a/modules/math/src/main/java/org/apache/ignite/math/impls/vector/FunctionVector.java b/modules/math/src/main/java/org/apache/ignite/math/impls/vector/FunctionVector.java
deleted file mode 100644
index 0e7cfad..0000000
--- a/modules/math/src/main/java/org/apache/ignite/math/impls/vector/FunctionVector.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.math.impls.vector;
-
-import java.util.Map;
-import org.apache.ignite.math.Matrix;
-import org.apache.ignite.math.Vector;
-import org.apache.ignite.math.exceptions.UnsupportedOperationException;
-import org.apache.ignite.math.functions.IgniteFunction;
-import org.apache.ignite.math.functions.IntDoubleToVoidFunction;
-import org.apache.ignite.math.impls.storage.vector.FunctionVectorStorage;
-
-/**
- * Implementation of {@link Vector} that maps vector element index to {@link java.util.function} interfaces.
- */
-public class FunctionVector extends AbstractVector {
-    /**
-     *
-     */
-    public FunctionVector() {
-        // No-op.
-    }
-
-    /**
-     * Creates read-write or read-only function vector.
-     *
-     * @param size Vector size.
-     * @param getFunc Function that returns value corresponding to given element index.
-     * @param setFunc Set function. If {@code null} - this will be a read-only vector.
-     */
-    public FunctionVector(int size, IgniteFunction<Integer, Double> getFunc, IntDoubleToVoidFunction setFunc) {
-        setStorage(new FunctionVectorStorage(size, getFunc, setFunc));
-    }
-
-    /**
-     * Creates read-only function vector.
-     *
-     * @param size Vector size.
-     * @param getFunc Function that returns value corresponding to given element index.
-     */
-    public FunctionVector(int size, IgniteFunction<Integer, Double> getFunc) {
-        setStorage(new FunctionVectorStorage(size, getFunc));
-    }
-
-    /**
-     * @param args Arguments for vector constructor.
-     */
-    public FunctionVector(Map<String, Object> args) {
-        assert args != null;
-
-        if (args.containsKey("size") && args.containsKey("getFunc") && args.containsKey("setFunc")) {
-            @SuppressWarnings("unchecked")
-            IgniteFunction<Integer, Double> getFunc = (IgniteFunction<Integer, Double>)args.get("getFunc");
-            IntDoubleToVoidFunction setFunc = (IntDoubleToVoidFunction)args.get("setFunc");
-            int size = (int)args.get("size");
-
-            setStorage(new FunctionVectorStorage(size, getFunc, setFunc));
-        }
-        else if (args.containsKey("size") && args.containsKey("getFunc")) {
-            @SuppressWarnings("unchecked")
-            IgniteFunction<Integer, Double> getFunc = (IgniteFunction<Integer, Double>)args.get("getFunc");
-            int size = (int)args.get("size");
-
-            setStorage(new FunctionVectorStorage(size, getFunc));
-        }
-        else
-            throw new UnsupportedOperationException("Invalid constructor argument(s).");
-    }
-
-    /**
-     *
-     *
-     */
-    private FunctionVectorStorage storage() {
-        return (FunctionVectorStorage)getStorage();
-    }
-
-    /** {@inheritDoc} */
-    @Override public org.apache.ignite.math.Vector like(int crd) {
-        FunctionVectorStorage sto = storage();
-
-        return new FunctionVector(crd, sto.getFunction(), sto.setFunction());
-    }
-
-    /** {@inheritDoc} */
-    @Override public Matrix likeMatrix(int rows, int cols) {
-        throw new UnsupportedOperationException();
-    }
-
-    /** {@inheritDoc} */
-    @Override public Vector times(double x) {
-        if (x == 0.0)
-            return like(size()).assign(0);
-        else
-            return super.times(x);
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/732dfea9/modules/math/src/main/java/org/apache/ignite/math/impls/vector/MatrixVectorView.java
----------------------------------------------------------------------
diff --git a/modules/math/src/main/java/org/apache/ignite/math/impls/vector/MatrixVectorView.java b/modules/math/src/main/java/org/apache/ignite/math/impls/vector/MatrixVectorView.java
deleted file mode 100644
index 8f32a89..0000000
--- a/modules/math/src/main/java/org/apache/ignite/math/impls/vector/MatrixVectorView.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.math.impls.vector;
-
-import java.io.IOException;
-import java.io.ObjectInput;
-import java.io.ObjectOutput;
-import org.apache.ignite.math.Matrix;
-import org.apache.ignite.math.Vector;
-import org.apache.ignite.math.exceptions.IndexException;
-import org.apache.ignite.math.impls.storage.vector.MatrixVectorStorage;
-
-/**
- * Row or column vector view off the matrix.
- */
-public class MatrixVectorView extends AbstractVector {
-    /** */ private Matrix parent;
-
-    /** */ private int row;
-    /** */ private int col;
-    
-    /** */ private int rowStride;
-    /** */ private int colStride;
-
-    /**
-     *
-     */
-    public MatrixVectorView() {
-        // No-op.
-    }
-
-    /**
-     * @param parent
-     * @param row
-     * @param col
-     * @param rowStride
-     * @param colStride
-     */
-    public MatrixVectorView(Matrix parent, int row, int col, int rowStride, int colStride) {
-        assert parent != null;
-
-        if (row < 0 || row >= parent.rowSize())
-            throw new IndexException(row);
-        if (col < 0 || col >= parent.columnSize())
-            throw new IndexException(col);
-
-        this.parent = parent;
-
-        this.row = row;
-        this.col = col;
-
-        this.rowStride = rowStride;
-        this.colStride = colStride;
-
-        setStorage(new MatrixVectorStorage(parent, row, col, rowStride, colStride));
-    }
-
-    /** {@inheritDoc} */
-    @Override public Vector copy() {
-        return new MatrixVectorView(parent, row, col, rowStride, colStride);
-    }
-
-    /** {@inheritDoc} */
-    @Override public Vector like(int crd) {
-        return parent.likeVector(crd);
-    }
-
-    /** {@inheritDoc} */
-    @Override public Matrix likeMatrix(int rows, int cols) {
-        return parent.like(rows, cols);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void writeExternal(ObjectOutput out) throws IOException {
-        super.writeExternal(out);
-
-        out.writeObject(parent);
-        out.writeInt(row);
-        out.writeInt(col);
-        out.writeInt(rowStride);
-        out.writeInt(colStride);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
-        super.readExternal(in);
-
-        parent = (Matrix)in.readObject();
-        row = in.readInt();
-        col = in.readInt();
-        rowStride = in.readInt();
-        colStride = in.readInt();
-    }
-
-    /** {@inheritDoc} */
-    @Override public int hashCode() {
-        int res = 1;
-
-        res = res * 37 + (parent == null ? 0 : parent.hashCode());
-        res = res * 37 + row;
-        res = res * 37 + col;
-        res = res * 37 + rowStride;
-        res = res * 37 + colStride;
-
-        return res;
-    }
-
-    /** {@inheritDoc} */
-    @Override public boolean equals(Object o) {
-        if (this == o)
-            return true;
-
-        if (o == null || getClass() != o.getClass())
-            return false;
-
-        MatrixVectorView that = (MatrixVectorView)o;
-
-        return (parent != null ? parent.equals(that.parent) : that.parent == null) &&
-            row == that.row &&
-            col == that.col &&
-            rowStride == that.rowStride &&
-            colStride == that.colStride;
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/732dfea9/modules/math/src/main/java/org/apache/ignite/math/impls/vector/PivotedVectorView.java
----------------------------------------------------------------------
diff --git a/modules/math/src/main/java/org/apache/ignite/math/impls/vector/PivotedVectorView.java b/modules/math/src/main/java/org/apache/ignite/math/impls/vector/PivotedVectorView.java
deleted file mode 100644
index cc9e835..0000000
--- a/modules/math/src/main/java/org/apache/ignite/math/impls/vector/PivotedVectorView.java
+++ /dev/null
@@ -1,163 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.math.impls.vector;
-
-import java.io.IOException;
-import java.io.ObjectInput;
-import java.io.ObjectOutput;
-import org.apache.ignite.math.Matrix;
-import org.apache.ignite.math.Vector;
-import org.apache.ignite.math.exceptions.UnsupportedOperationException;
-import org.apache.ignite.math.functions.Functions;
-import org.apache.ignite.math.impls.storage.vector.PivotedVectorStorage;
-
-/**
- * Pivoted (index mapped) view over another vector.
- */
-public class PivotedVectorView extends AbstractVector {
-    /** */ private Vector vec;
-
-    /**
-     * @param vec
-     * @param pivot Mapping from external index to internal.
-     * @param unpivot Mapping from internal index to external.
-     */
-    public PivotedVectorView(Vector vec, int[] pivot, int[] unpivot) {
-        setStorage(new PivotedVectorStorage(vec.getStorage(), pivot, unpivot));
-
-        checkCardinality(pivot);
-        checkCardinality(unpivot);
-
-        this.vec = vec;
-    }
-
-    /**
-     * @param vec
-     * @param pivot
-     */
-    public PivotedVectorView(Vector vec, int[] pivot) {
-        setStorage(new PivotedVectorStorage(vec.getStorage(), pivot));
-
-        checkCardinality(pivot);
-
-        this.vec = vec;
-    }
-
-    /**
-     *
-     *
-     */
-    private PivotedVectorStorage storage() {
-        return (PivotedVectorStorage)getStorage();
-    }
-
-    /**
-     *
-     */
-    public PivotedVectorView() {
-        // No-op.
-    }
-
-    /**
-     *
-     *
-     */
-    public Vector getBaseVector() {
-        return vec;
-    }
-
-    /**
-     * @param i
-     */
-    public int pivot(int i) {
-        return storage().pivot()[i];
-    }
-
-    /**
-     * @param i
-     */
-    public int unpivot(int i) {
-        return storage().unpivot()[i];
-    }
-
-    /**
-     * @param idx
-     */
-    protected Vector.Element makeElement(int idx) {
-        checkIndex(idx);
-
-        // External index.
-        int exIdx = storage().pivot()[idx];
-
-        return new Vector.Element() {
-            /** {@inheritDoc */
-            @Override public double get() {
-                return storageGet(idx);
-            }
-
-            /** {@inheritDoc */
-            @Override public int index() {
-                return exIdx;
-            }
-
-            /** {@inheritDoc */
-            @Override public void set(double val) {
-                storageSet(idx, val);
-            }
-        };
-    }
-
-    /** {@inheritDoc} */
-    @Override public Vector copy() {
-        PivotedVectorStorage sto = storage();
-
-        return new PivotedVectorView(vec, sto.pivot(), sto.unpivot());
-    }
-
-    /** {@inheritDoc} */
-    @Override public Vector like(int crd) {
-        throw new UnsupportedOperationException();
-    }
-
-    /** {@inheritDoc} */
-    @Override public Matrix likeMatrix(int rows, int cols) {
-        return vec.likeMatrix(rows, cols);
-    }
-
-    /** {@inheritDoc} */
-    @Override public Vector times(double x) {
-        if (x == 0.0)
-            return copy().map(Functions.mult(x));
-        else
-            return super.times(x);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void writeExternal(ObjectOutput out) throws IOException {
-        super.writeExternal(out);
-
-        out.writeObject(vec);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
-        super.readExternal(in);
-
-        vec = (Vector)in.readObject();
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/732dfea9/modules/math/src/main/java/org/apache/ignite/math/impls/vector/RandomVector.java
----------------------------------------------------------------------
diff --git a/modules/math/src/main/java/org/apache/ignite/math/impls/vector/RandomVector.java b/modules/math/src/main/java/org/apache/ignite/math/impls/vector/RandomVector.java
deleted file mode 100644
index c9121c9..0000000
--- a/modules/math/src/main/java/org/apache/ignite/math/impls/vector/RandomVector.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.math.impls.vector;
-
-import java.io.IOException;
-import java.io.ObjectInput;
-import java.io.ObjectOutput;
-import java.util.Map;
-import org.apache.ignite.math.Matrix;
-import org.apache.ignite.math.VectorStorage;
-import org.apache.ignite.math.exceptions.UnsupportedOperationException;
-import org.apache.ignite.math.impls.matrix.RandomMatrix;
-import org.apache.ignite.math.impls.storage.vector.RandomVectorStorage;
-
-/**
- * Random vector. Each value is taken from {-1,0,1} with roughly equal probability. Note
- * that by default, the value is determined by a relatively simple hash of the index.
- */
-public class RandomVector extends AbstractReadOnlyVector {
-    /** */ private boolean fastHash;
-
-    /**
-     * @param size Vector cardinality.
-     * @param fastHash
-     */
-    private VectorStorage mkStorage(int size, boolean fastHash) {
-        this.fastHash = fastHash;
-
-        return new RandomVectorStorage(size, fastHash);
-    }
-
-    /**
-     * @param size
-     * @param fastHash
-     */
-    public RandomVector(int size, boolean fastHash) {
-        setStorage(mkStorage(size, fastHash));
-    }
-
-    /**
-     * @param size
-     */
-    public RandomVector(int size) {
-        this(size, true);
-    }
-
-    /**
-     * @param args
-     */
-    public RandomVector(Map<String, Object> args) {
-        assert args != null;
-
-        if (args.containsKey("size") && args.containsKey("fastHash"))
-            setStorage(mkStorage((int)args.get("size"), (boolean)args.get("fastHash")));
-        else if (args.containsKey("size"))
-            setStorage(mkStorage((int)args.get("size"), true));
-        else
-            throw new UnsupportedOperationException("Invalid constructor argument(s).");
-    }
-
-    /** */
-    public RandomVector() {
-        // No-op.
-    }
-
-    /** {@inheritDoc} */
-    @Override public org.apache.ignite.math.Vector like(int crd) {
-        return new RandomVector(crd, fastHash);
-    }
-
-    /** {@inheritDoc} */
-    @Override public Matrix likeMatrix(int rows, int cols) {
-        return new RandomMatrix(rows, cols);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void writeExternal(ObjectOutput out) throws IOException {
-        super.writeExternal(out);
-
-        out.writeBoolean(fastHash);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
-        super.readExternal(in);
-
-        fastHash = in.readBoolean();
-    }
-
-    /** {@inheritDoc} */
-    @Override public int hashCode() {
-        int res = 1;
-
-        res = res * 37 + Boolean.hashCode(fastHash);
-        res = res * 37 + getStorage().hashCode();
-
-        return res;
-    }
-
-    /** {@inheritDoc} */
-    @Override public boolean equals(Object o) {
-        if (this == o)
-            return true;
-
-        if (o == null || getClass() != o.getClass())
-            return false;
-
-        RandomVector that = (RandomVector)o;
-        VectorStorage sto = getStorage();
-
-        return fastHash == that.fastHash && (sto != null ? sto.equals(that.getStorage()) : that.getStorage() == null);
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/732dfea9/modules/math/src/main/java/org/apache/ignite/math/impls/vector/SingleElementVector.java
----------------------------------------------------------------------
diff --git a/modules/math/src/main/java/org/apache/ignite/math/impls/vector/SingleElementVector.java b/modules/math/src/main/java/org/apache/ignite/math/impls/vector/SingleElementVector.java
deleted file mode 100644
index 8d19ee0..0000000
--- a/modules/math/src/main/java/org/apache/ignite/math/impls/vector/SingleElementVector.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.math.impls.vector;
-
-import java.util.Map;
-import org.apache.ignite.math.Matrix;
-import org.apache.ignite.math.Vector;
-import org.apache.ignite.math.exceptions.UnsupportedOperationException;
-import org.apache.ignite.math.impls.storage.vector.SingleElementVectorStorage;
-
-/**
- * Read-write vector holding a single non-zero value at some index.
- */
-public class SingleElementVector extends AbstractVector {
-    /**
-     *
-     */
-    public SingleElementVector() {
-        // No-op
-    }
-
-    /**
-     * @param size
-     * @param idx
-     * @param val
-     */
-    public SingleElementVector(int size, int idx, double val) {
-        super(new SingleElementVectorStorage(size, idx, val));
-    }
-
-    /**
-     * @param args
-     */
-    public SingleElementVector(Map<String, Object> args) {
-        assert args != null;
-
-        if (args.containsKey("size") && args.containsKey("index") && args.containsKey("value")) {
-            int size = (int)args.get("size");
-            int idx = (int)args.get("index");
-            double val = (double)args.get("value");
-
-            setStorage(new SingleElementVectorStorage(size, idx, val));
-        }
-        else
-            throw new UnsupportedOperationException("Invalid constructor argument(s).");
-    }
-
-    /**
-     *
-     *
-     */
-    private SingleElementVectorStorage storage() {
-        return (SingleElementVectorStorage)getStorage();
-    }
-
-    /** {@inheritDoc} */
-    @Override public Element minElement() {
-        return makeElement(storage().index());
-    }
-
-    /** {@inheritDoc} */
-    @Override public Element maxElement() {
-        return makeElement(storage().index());
-    }
-
-    /** {@inheritDoc} */
-    @Override public double sum() {
-        return getX(storage().index());
-    }
-
-    /** {@inheritDoc} */
-    @Override public int nonZeroElements() {
-        return isZero(get(storage().index())) ? 0 : 1;
-    }
-
-    /** {@inheritDoc} */
-    @Override public Vector like(int crd) {
-        int idx = storage().index();
-
-        return new SingleElementVector(crd, idx, getX(idx));
-    }
-
-    /** {@inheritDoc} */
-    @Override public Matrix likeMatrix(int rows, int cols) {
-        throw new UnsupportedOperationException();
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/732dfea9/modules/math/src/main/java/org/apache/ignite/math/impls/vector/SingleElementVectorView.java
----------------------------------------------------------------------
diff --git a/modules/math/src/main/java/org/apache/ignite/math/impls/vector/SingleElementVectorView.java b/modules/math/src/main/java/org/apache/ignite/math/impls/vector/SingleElementVectorView.java
deleted file mode 100644
index 76a1c0a..0000000
--- a/modules/math/src/main/java/org/apache/ignite/math/impls/vector/SingleElementVectorView.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.math.impls.vector;
-
-import org.apache.ignite.math.Matrix;
-import org.apache.ignite.math.Vector;
-import org.apache.ignite.math.exceptions.UnsupportedOperationException;
-import org.apache.ignite.math.functions.Functions;
-import org.apache.ignite.math.impls.storage.vector.SingleElementVectorDelegateStorage;
-
-/**
- * Single value vector view over another vector.
- */
-public class SingleElementVectorView extends AbstractVector {
-    /**
-     *
-     */
-    public SingleElementVectorView() {
-        // No-op.
-    }
-
-    /**
-     * @param vec
-     * @param idx
-     */
-    public SingleElementVectorView(Vector vec, int idx) {
-        super(new SingleElementVectorDelegateStorage(vec, idx));
-    }
-
-    /**
-     *
-     *
-     */
-    private SingleElementVectorDelegateStorage storage() {
-        return (SingleElementVectorDelegateStorage)getStorage();
-    }
-
-    /** {@inheritDoc} */
-    @Override public Vector.Element minElement() {
-        return makeElement(storage().index());
-    }
-
-    /** {@inheritDoc} */
-    @Override public Vector.Element maxElement() {
-        return makeElement(storage().index());
-    }
-
-    /** {@inheritDoc} */
-    @Override public double sum() {
-        return getX(storage().index());
-    }
-
-    /** {@inheritDoc} */
-    @Override public int nonZeroElements() {
-        return isZero(getX(storage().index())) ? 0 : 1;
-    }
-
-    /** {@inheritDoc} */
-    @Override public Vector copy() {
-        SingleElementVectorDelegateStorage sto = storage();
-
-        return new SingleElementVectorView(sto.delegate(), sto.index());
-    }
-
-    /** {@inheritDoc} */
-    @Override public Vector times(double x) {
-        if (x == 0.0)
-            return copy().map(Functions.mult(x));
-        else
-            return super.times(x);
-    }
-
-    /** {@inheritDoc} */
-    @Override public Vector like(int crd) {
-        throw new UnsupportedOperationException();
-    }
-
-    /** {@inheritDoc} */
-    @Override public Matrix likeMatrix(int rows, int cols) {
-        throw new UnsupportedOperationException();
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/732dfea9/modules/math/src/main/java/org/apache/ignite/math/impls/vector/SparseLocalOffHeapVector.java
----------------------------------------------------------------------
diff --git a/modules/math/src/main/java/org/apache/ignite/math/impls/vector/SparseLocalOffHeapVector.java b/modules/math/src/main/java/org/apache/ignite/math/impls/vector/SparseLocalOffHeapVector.java
deleted file mode 100644
index 2fd1c57..0000000
--- a/modules/math/src/main/java/org/apache/ignite/math/impls/vector/SparseLocalOffHeapVector.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.math.impls.vector;
-
-import org.apache.ignite.math.Matrix;
-import org.apache.ignite.math.Vector;
-import org.apache.ignite.math.impls.storage.vector.SparseLocalOffHeapVectorStorage;
-
-/**
- * Implementation for {@link Vector} assuming sparse logic and local offheap JVM storage.
- * It is suitable for data sets where local, non-distributed execution is satisfactory and on-heap JVM storage
- * is not enough to keep the entire data set.
- * <p>See also: <a href="https://en.wikipedia.org/wiki/Sparse_array">Wikipedia article</a>.</p>
- */
-public class SparseLocalOffHeapVector extends AbstractVector {
-    /**
-     * @param crd Vector cardinality.
-     */
-    public SparseLocalOffHeapVector(int crd) {
-        setStorage(new SparseLocalOffHeapVectorStorage(crd));
-    }
-
-    /** {@inheritDoc} */
-    @Override public Vector like(int crd) {
-        return new SparseLocalOffHeapVector(crd);
-    }
-
-    /** {@inheritDoc} */
-    @Override public Matrix likeMatrix(int rows, int cols) {
-        return null;
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/732dfea9/modules/math/src/main/java/org/apache/ignite/math/impls/vector/SparseLocalVector.java
----------------------------------------------------------------------
diff --git a/modules/math/src/main/java/org/apache/ignite/math/impls/vector/SparseLocalVector.java b/modules/math/src/main/java/org/apache/ignite/math/impls/vector/SparseLocalVector.java
deleted file mode 100644
index ebb6731..0000000
--- a/modules/math/src/main/java/org/apache/ignite/math/impls/vector/SparseLocalVector.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.math.impls.vector;
-
-import org.apache.ignite.math.Matrix;
-import org.apache.ignite.math.StorageConstants;
-import org.apache.ignite.math.Vector;
-import org.apache.ignite.math.impls.matrix.SparseLocalOnHeapMatrix;
-import org.apache.ignite.math.impls.storage.vector.SparseLocalOnHeapVectorStorage;
-
-/**
- * Local on-heap sparse vector based on hash map storage.
- */
-public class SparseLocalVector extends AbstractVector implements StorageConstants {
-    /**
-     *
-     */
-    public SparseLocalVector() {
-        // No-op.
-    }
-
-    /**
-     * @param size
-     * @param acsMode
-     */
-    public SparseLocalVector(int size, int acsMode) {
-        assertAccessMode(acsMode);
-
-        setStorage(new SparseLocalOnHeapVectorStorage(size, acsMode));
-    }
-
-    /** */
-    private SparseLocalOnHeapVectorStorage storage() {
-        return (SparseLocalOnHeapVectorStorage)getStorage();
-    }
-
-    /** {@inheritDoc} */
-    @Override public Vector like(int crd) {
-        SparseLocalOnHeapVectorStorage sto = storage();
-
-        return new SparseLocalVector(crd, sto.getAccessMode());
-    }
-
-    /** {@inheritDoc} */
-    @Override public Matrix likeMatrix(int rows, int cols) {
-        return new SparseLocalOnHeapMatrix(rows, cols);
-    }
-
-    /** {@inheritDoc} */
-    @Override public Vector times(double x) {
-        if (x == 0.0)
-            return assign(0);
-        else
-            return super.times(x);
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/732dfea9/modules/math/src/main/java/org/apache/ignite/math/impls/vector/VectorView.java
----------------------------------------------------------------------
diff --git a/modules/math/src/main/java/org/apache/ignite/math/impls/vector/VectorView.java b/modules/math/src/main/java/org/apache/ignite/math/impls/vector/VectorView.java
deleted file mode 100644
index ce51a45..0000000
--- a/modules/math/src/main/java/org/apache/ignite/math/impls/vector/VectorView.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.math.impls.vector;
-
-import java.io.Externalizable;
-import org.apache.ignite.math.Matrix;
-import org.apache.ignite.math.Vector;
-import org.apache.ignite.math.VectorStorage;
-import org.apache.ignite.math.exceptions.UnsupportedOperationException;
-import org.apache.ignite.math.impls.storage.vector.DelegateVectorStorage;
-
-/**
- * Implements the partial view into the parent {@link Vector}.
- */
-public class VectorView extends AbstractVector {
-    /**
-     * Constructor for {@link Externalizable} interface.
-     */
-    public VectorView() {
-        // No-op.
-    }
-
-    /**
-     * @param parent Backing parent {@link Vector}.
-     * @param off Offset to parent vector.
-     * @param len Size of the view.
-     */
-    public VectorView(Vector parent, int off, int len) {
-        super(new DelegateVectorStorage(parent.getStorage(), off, len));
-    }
-
-    /**
-     * @param sto Backing parent {@link VectorStorage}.
-     * @param off Offset to parent vector.
-     * @param len Size of the view.
-     */
-    public VectorView(VectorStorage sto, int off, int len) {
-        super(new DelegateVectorStorage(sto, off, len));
-    }
-
-    /** */
-    private DelegateVectorStorage storage() {
-        return (DelegateVectorStorage)getStorage();
-    }
-
-    /** {@inheritDoc} */
-    @Override public Vector copy() {
-        DelegateVectorStorage sto = storage();
-
-        return new VectorView(sto.delegate(), sto.offset(), sto.length());
-    }
-
-    /** {@inheritDoc} */
-    @Override public Vector like(int crd) {
-        throw new UnsupportedOperationException();
-    }
-
-    /** {@inheritDoc} */
-    @Override public Matrix likeMatrix(int rows, int cols) {
-        throw new UnsupportedOperationException();
-    }
-
-    /** {@inheritDoc} */
-    @Override public boolean equals(Object o) {
-        return this == o ||
-            ((o != null)
-                && o.getClass() == getClass()
-                && (getStorage().equals(((VectorView)o).getStorage())));
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/732dfea9/modules/math/src/main/java/org/apache/ignite/math/impls/vector/package-info.java
----------------------------------------------------------------------
diff --git a/modules/math/src/main/java/org/apache/ignite/math/impls/vector/package-info.java b/modules/math/src/main/java/org/apache/ignite/math/impls/vector/package-info.java
deleted file mode 100644
index d6ca1f3..0000000
--- a/modules/math/src/main/java/org/apache/ignite/math/impls/vector/package-info.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/**
- * <!-- Package description. -->
- * Contains specific implementations for vectors.
- */
-package org.apache.ignite.math.impls.vector;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/732dfea9/modules/math/src/main/java/org/apache/ignite/math/package-info.java
----------------------------------------------------------------------
diff --git a/modules/math/src/main/java/org/apache/ignite/math/package-info.java b/modules/math/src/main/java/org/apache/ignite/math/package-info.java
deleted file mode 100644
index 05ce651..0000000
--- a/modules/math/src/main/java/org/apache/ignite/math/package-info.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/**
- * <!-- Package description. -->
- * Contains main APIs for distributed code algebra.
- */
-package org.apache.ignite.math;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/732dfea9/modules/math/src/main/resources/org/apache/ignite/math/d3-matrix-template.html
----------------------------------------------------------------------
diff --git a/modules/math/src/main/resources/org/apache/ignite/math/d3-matrix-template.html b/modules/math/src/main/resources/org/apache/ignite/math/d3-matrix-template.html
deleted file mode 100644
index 19a907a..0000000
--- a/modules/math/src/main/resources/org/apache/ignite/math/d3-matrix-template.html
+++ /dev/null
@@ -1,128 +0,0 @@
-<!DOCTYPE html>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements.  See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<meta charset="utf-8">
-<title>IgniteML</title>
-<style>
-    body {
-        margin: 0 15px;
-    }
-
-    p {
-        margin: 10px 0 !important;
-    }
-
-    .name {
-        font-size: 20px;
-        font-weight: 400;
-        font-family: monospace;
-    }
-
-    .swatch {
-        display: inline-block;
-        width: 25px;
-        height: 25px;
-        margin-left: 5px;
-        vertical-align: bottom;
-    }
-</style>
-<body>
-<img style="margin-top: 15px" width="100px" src="https://ignite.apache.org/images/logo3.png">
-<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/4.5.0/d3.min.js"></script>
-<script>
-    /*@DATA@*/
-    var data = [[{d: 2.256, r: 198, g: 128, b: 128}, {d: 0.123, r: 218, g: 228, b: 18}], [{
-        d: 2.256,
-        r: 108,
-        g: 28,
-        b: 108
-    }, {d: 0.123, r: 228, g: 228, b: 228}]];
-    /*@MAX@*/
-    var max = {d: 2.256, r: 128, g: 128, b: 128};
-    /*@MIN@*/
-    var min = {d: 0.123, r: 228, g: 228, b: 228};
-    /*@NAME@*/
-    var name = "Matrix";
-
-    var rows = data.length;
-    var cols = data[0].length;
-
-    var range = max.d - min.d;
-
-    var rw, rh;
-    var W, H;
-
-    if (cols > W) {
-        rw = 1;
-        W = cols;
-    }
-    else {
-        W = 1000;
-        rw = Math.min(Math.round(W / cols), 10);
-    }
-
-    if (rows > H) {
-        rh = 1;
-        H = rows;
-    }
-    else {
-        H = 1000;
-        rh = Math.min(Math.round(H / rows), 10);
-    }
-
-    d3.selectAll("body")
-        .append("p")
-        .text(name + " (" + rows + "x" + cols + ")")
-        .attr("class", "name");
-
-    d3.selectAll("body")
-        .append("p")
-        .attr("class", "name")
-        .text("Max: " + max.d)
-        .append("span")
-        .attr("class", "swatch")
-        .attr("style", "background-color: rgb(" + max.r + ", " + max.g + ", " + max.b + ")");
-
-    d3.selectAll("body")
-        .append("p")
-        .attr("class", "name")
-        .text("Min: " + min.d)
-        .append("span")
-        .attr("class", "swatch")
-        .attr("style", "background-color: rgb(" + min.r + ", " + min.g + ", " + min.b + ")");
-
-    var svg = d3.select("body").append("svg")
-        .attr("width", W)
-        .attr("height", H);
-
-    var y = 0;
-
-    for (var row = 0; row < rows; row++)
-        svg.selectAll("div")
-            .data(data[row])
-            .enter()
-            .append("rect")
-            .attr("x", function (d, i) {
-                return i * rw
-            })
-            .attr("y", rh * row)
-            .attr("fill", function (d) {
-                return "rgb(" + d.r + ", " + d.g + ", " + d.b + ")";
-            })
-            .attr("width", rw)
-            .attr("height", rh);
-</script>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/732dfea9/modules/math/src/main/resources/org/apache/ignite/math/d3-vector-template.html
----------------------------------------------------------------------
diff --git a/modules/math/src/main/resources/org/apache/ignite/math/d3-vector-template.html b/modules/math/src/main/resources/org/apache/ignite/math/d3-vector-template.html
deleted file mode 100644
index 7644481..0000000
--- a/modules/math/src/main/resources/org/apache/ignite/math/d3-vector-template.html
+++ /dev/null
@@ -1,111 +0,0 @@
-<!DOCTYPE html>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements.  See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<meta charset="utf-8">
-<title>IgniteML</title>
-<style>
-    body {
-        margin: 0 15px;
-    }
-
-    p {
-        margin: 10px 0 !important;
-    }
-
-    .name {
-        font-size: 20px;
-        font-weight: 400;
-        font-family: monospace;
-    }
-
-    .swatch {
-        display: inline-block;
-        width: 25px;
-        height: 25px;
-        margin-left: 5px;
-        vertical-align: bottom;
-    }
-</style>
-<body>
-<img style="margin-top: 15px" width="100px" src="https://ignite.apache.org/images/logo3.png">
-<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/4.5.0/d3.min.js"></script>
-<script>
-    /*@DATA@*/
-    var data = [{d: 2.256, r: 128, g: 128, b: 128}, {d: 0.123, r: 228, g: 228, b: 228}];
-    /*@MAX@*/
-    var max = {d: 2.256, r: 128, g: 128, b: 128};
-    /*@MIN@*/
-    var min = {d: 0.123, r: 228, g: 228, b: 228};
-    /*@NAME@*/
-    var name = "Vector";
-
-    var W, H = 1000;
-
-    var range = max.d - min.d;
-
-    var rh = 20; // Constant.
-
-    var rw;
-
-    if (data.length > W) {
-        rw = 1;
-        W = data.length;
-    }
-    else {
-        W = 1000;
-        rw = Math.min(Math.round(W / data.length), 5);
-    }
-
-    d3.selectAll("body")
-        .append("p")
-        .text(name + " (size: " + data.length + ")")
-        .attr("class", "name");
-
-    d3.selectAll("body")
-        .append("p")
-        .attr("class", "name")
-        .text("Max: " + max.d)
-        .append("span")
-        .attr("class", "swatch")
-        .attr("style", "background-color: rgb(" + max.r + ", " + max.g + ", " + max.b + ")");
-
-    d3.selectAll("body")
-        .append("p")
-        .attr("class", "name")
-        .text("Min: " + min.d)
-        .append("span")
-        .attr("class", "swatch")
-        .attr("style", "background-color: rgb(" + min.r + ", " + min.g + ", " + min.b + ")");
-
-    var svg = d3.select("body").append("svg")
-        .attr("width", W)
-        .attr("height", H);
-
-    svg.selectAll("rect")
-        .data(data)
-        .enter()
-        .append("rect")
-        .attr("x", function (d, i) {
-            return i * rw
-        })
-        .attr("y", 10)
-        .attr("fill", function (d) {
-            return "rgb(" + d.r + ", " + d.g + ", " + d.b + ")";
-        })
-        .attr("width", rw)
-        .attr("height", rh);
-</script>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/732dfea9/modules/math/src/test/java/org/apache/ignite/math/ExternalizeTest.java
----------------------------------------------------------------------
diff --git a/modules/math/src/test/java/org/apache/ignite/math/ExternalizeTest.java b/modules/math/src/test/java/org/apache/ignite/math/ExternalizeTest.java
deleted file mode 100644
index 218b7ff..0000000
--- a/modules/math/src/test/java/org/apache/ignite/math/ExternalizeTest.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.math;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.Externalizable;
-import java.io.IOException;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-import org.apache.ignite.math.impls.MathTestConstants;
-import org.junit.Test;
-
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-
-/**
- * Common test for externalization.
- */
-public abstract class ExternalizeTest<T extends Externalizable & Destroyable> {
-    /** */
-    protected void externalizeTest(T initObj) {
-        T objRestored = null;
-
-        try {
-            ByteArrayOutputStream byteArrOutputStream = new ByteArrayOutputStream();
-            ObjectOutputStream objOutputStream = new ObjectOutputStream(byteArrOutputStream);
-
-            objOutputStream.writeObject(initObj);
-
-            ByteArrayInputStream byteArrInputStream = new ByteArrayInputStream(byteArrOutputStream.toByteArray());
-            ObjectInputStream objInputStream = new ObjectInputStream(byteArrInputStream);
-
-            objRestored = (T)objInputStream.readObject();
-
-            assertTrue(MathTestConstants.VAL_NOT_EQUALS, initObj.equals(objRestored));
-            assertTrue(MathTestConstants.VAL_NOT_EQUALS, Integer.compare(initObj.hashCode(), objRestored.hashCode()) == 0);
-        }
-        catch (ClassNotFoundException | IOException e) {
-            fail(e + " [" + e.getMessage() + "]");
-        }
-        finally {
-            if (objRestored != null)
-                objRestored.destroy();
-        }
-    }
-
-    /** */
-    @Test
-    public abstract void externalizeTest();
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/732dfea9/modules/math/src/test/java/org/apache/ignite/math/MathImplDistributedTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/math/src/test/java/org/apache/ignite/math/MathImplDistributedTestSuite.java b/modules/math/src/test/java/org/apache/ignite/math/MathImplDistributedTestSuite.java
deleted file mode 100644
index 318ea95..0000000
--- a/modules/math/src/test/java/org/apache/ignite/math/MathImplDistributedTestSuite.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.math;
-
-import org.apache.ignite.math.impls.matrix.CacheMatrixTest;
-import org.apache.ignite.math.impls.matrix.SparseDistributedMatrixTest;
-import org.apache.ignite.math.impls.storage.matrix.SparseDistributedMatrixStorageTest;
-import org.apache.ignite.math.impls.vector.CacheVectorTest;
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
-
-/**
- * Test suite for all distributed tests located in org.apache.ignite.math.impls.* package.
- */
-@RunWith(Suite.class)
-@Suite.SuiteClasses({
-    CacheVectorTest.class,
-    CacheMatrixTest.class,
-    SparseDistributedMatrixStorageTest.class,
-    SparseDistributedMatrixTest.class,
-})
-public class MathImplDistributedTestSuite {
-    // No-op.
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/732dfea9/modules/math/src/test/java/org/apache/ignite/math/MathImplLocalTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/math/src/test/java/org/apache/ignite/math/MathImplLocalTestSuite.java b/modules/math/src/test/java/org/apache/ignite/math/MathImplLocalTestSuite.java
deleted file mode 100644
index a652e7f..0000000
--- a/modules/math/src/test/java/org/apache/ignite/math/MathImplLocalTestSuite.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.math;
-
-import org.apache.ignite.math.decompositions.CholeskyDecompositionTest;
-import org.apache.ignite.math.decompositions.EigenDecompositionTest;
-import org.apache.ignite.math.decompositions.LUDecompositionTest;
-import org.apache.ignite.math.decompositions.QRDecompositionTest;
-import org.apache.ignite.math.decompositions.SingularValueDecompositionTest;
-import org.apache.ignite.math.impls.matrix.DenseLocalOffHeapMatrixConstructorTest;
-import org.apache.ignite.math.impls.matrix.DenseLocalOnHeapMatrixConstructorTest;
-import org.apache.ignite.math.impls.matrix.DiagonalMatrixTest;
-import org.apache.ignite.math.impls.matrix.FunctionMatrixConstructorTest;
-import org.apache.ignite.math.impls.matrix.MatrixAttributeTest;
-import org.apache.ignite.math.impls.matrix.MatrixImplementationsTest;
-import org.apache.ignite.math.impls.matrix.MatrixViewConstructorTest;
-import org.apache.ignite.math.impls.matrix.PivotedMatrixViewConstructorTest;
-import org.apache.ignite.math.impls.matrix.RandomMatrixConstructorTest;
-import org.apache.ignite.math.impls.matrix.SparseLocalOnHeapMatrixConstructorTest;
-import org.apache.ignite.math.impls.matrix.TransposedMatrixViewTest;
-import org.apache.ignite.math.impls.storage.matrix.MatrixArrayStorageTest;
-import org.apache.ignite.math.impls.storage.matrix.MatrixOffHeapStorageTest;
-import org.apache.ignite.math.impls.storage.matrix.MatrixStorageImplementationTest;
-import org.apache.ignite.math.impls.storage.vector.RandomAccessSparseVectorStorageTest;
-import org.apache.ignite.math.impls.storage.vector.SparseLocalOffHeapVectorStorageTest;
-import org.apache.ignite.math.impls.storage.vector.VectorArrayStorageTest;
-import org.apache.ignite.math.impls.storage.vector.VectorOffheapStorageTest;
-import org.apache.ignite.math.impls.vector.AbstractVectorTest;
-import org.apache.ignite.math.impls.vector.ConstantVectorConstructorTest;
-import org.apache.ignite.math.impls.vector.DelegatingVectorConstructorTest;
-import org.apache.ignite.math.impls.vector.DenseLocalOffHeapVectorConstructorTest;
-import org.apache.ignite.math.impls.vector.DenseLocalOnHeapVectorConstructorTest;
-import org.apache.ignite.math.impls.vector.FunctionVectorConstructorTest;
-import org.apache.ignite.math.impls.vector.MatrixVectorViewTest;
-import org.apache.ignite.math.impls.vector.PivotedVectorViewConstructorTest;
-import org.apache.ignite.math.impls.vector.RandomVectorConstructorTest;
-import org.apache.ignite.math.impls.vector.SingleElementVectorConstructorTest;
-import org.apache.ignite.math.impls.vector.SingleElementVectorViewConstructorTest;
-import org.apache.ignite.math.impls.vector.SparseLocalVectorConstructorTest;
-import org.apache.ignite.math.impls.vector.VectorAttributesTest;
-import org.apache.ignite.math.impls.vector.VectorFoldMapTest;
-import org.apache.ignite.math.impls.vector.VectorImplementationsTest;
-import org.apache.ignite.math.impls.vector.VectorIterableTest;
-import org.apache.ignite.math.impls.vector.VectorNormTest;
-import org.apache.ignite.math.impls.vector.VectorToMatrixTest;
-import org.apache.ignite.math.impls.vector.VectorViewTest;
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
-
-/**
- * Test suite for all local tests located in org.apache.ignite.math.impls.* package.
- */
-@RunWith(Suite.class)
-@Suite.SuiteClasses({
-    // Vector constructors tests.
-    DenseLocalOnHeapVectorConstructorTest.class,
-    DenseLocalOffHeapVectorConstructorTest.class,
-    SparseLocalVectorConstructorTest.class,
-    RandomVectorConstructorTest.class,
-    ConstantVectorConstructorTest.class,
-    FunctionVectorConstructorTest.class,
-    SingleElementVectorConstructorTest.class,
-    PivotedVectorViewConstructorTest.class,
-    SingleElementVectorViewConstructorTest.class,
-    DelegatingVectorConstructorTest.class,
-    // Various vectors tests.
-    AbstractVectorTest.class,
-    VectorImplementationsTest.class,
-    VectorViewTest.class,
-    MatrixVectorViewTest.class,
-    // Vector particular features tests.
-    VectorIterableTest.class,
-    VectorAttributesTest.class,
-    VectorToMatrixTest.class,
-    VectorNormTest.class,
-    VectorFoldMapTest.class,
-    // Vector storage tests
-    VectorArrayStorageTest.class,
-    VectorOffheapStorageTest.class,
-    RandomAccessSparseVectorStorageTest.class,
-    SparseLocalOffHeapVectorStorageTest.class,
-    // Matrix storage tests.
-    MatrixStorageImplementationTest.class,
-    MatrixOffHeapStorageTest.class,
-    MatrixArrayStorageTest.class,
-    // Matrix constructors tests.
-    DenseLocalOnHeapMatrixConstructorTest.class,
-    DenseLocalOffHeapMatrixConstructorTest.class,
-    RandomMatrixConstructorTest.class,
-    FunctionMatrixConstructorTest.class,
-    MatrixViewConstructorTest.class,
-    PivotedMatrixViewConstructorTest.class,
-    SparseLocalOnHeapMatrixConstructorTest.class,
-    // Matrix tests.
-    MatrixImplementationsTest.class,
-    DiagonalMatrixTest.class,
-    MatrixAttributeTest.class,
-    TransposedMatrixViewTest.class,
-    // Decomposes
-    LUDecompositionTest.class,
-    EigenDecompositionTest.class,
-    CholeskyDecompositionTest.class,
-    QRDecompositionTest.class,
-    SingularValueDecompositionTest.class
-})
-public class MathImplLocalTestSuite {
-    // No-op.
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/732dfea9/modules/math/src/test/java/org/apache/ignite/math/MathImplMainTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/math/src/test/java/org/apache/ignite/math/MathImplMainTestSuite.java b/modules/math/src/test/java/org/apache/ignite/math/MathImplMainTestSuite.java
deleted file mode 100644
index 44fa8e6..0000000
--- a/modules/math/src/test/java/org/apache/ignite/math/MathImplMainTestSuite.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.math;
-
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
-
-/**
- * Test suite for local and distributed tests
- */
-@RunWith(Suite.class)
-@Suite.SuiteClasses({
-    MathImplLocalTestSuite.class,
-    MathImplDistributedTestSuite.class
-})
-public class MathImplMainTestSuite {
-    // No-op.
-}