move vector bindings into dedicated module

This commit is contained in:
Jonathan Shook
2024-02-05 20:18:24 -06:00
parent 8940ead867
commit 886025bc3a
60 changed files with 191 additions and 195 deletions

56
pom.xml
View File

@@ -19,6 +19,20 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>nosqlbench</artifactId>
<packaging>pom</packaging>
<dependencies>
<dependency>
<groupId>io.nosqlbench</groupId>
<artifactId>virtdata-api</artifactId>
<version>5.21.1-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>io.nosqlbench</groupId>
<artifactId>virtdata-lib-basics</artifactId>
<version>5.21.1-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
</dependencies>
<parent>
<artifactId>mvn-defaults</artifactId>
@@ -34,47 +48,6 @@
</description>
<properties>
<!-- CORE MODULES -->
<module.mvn-defaults>mvn-defaults</module.mvn-defaults>
<module.nb-api>nb-api</module.nb-api>
<module.nb-annotations>nb-annotations</module.nb-annotations>
<module.adapters-api>adapters-api</module.adapters-api>
<module.engine-api>engine-api</module.engine-api>
<module.engine-extensions>engine-extensions</module.engine-extensions>
<module.engine-docker>engine-docker</module.engine-docker>
<module.engine-cli>engine-cli</module.engine-cli>
<module.nb5>nb5</module.nb5>
<module.nbr>nbr</module.nbr>
<module.nb-spectest>nb-spectest</module.nb-spectest>
<!-- <module.nbr-examples>nbr-examples</module.nbr-examples>-->
<!-- driver modules -->
<module.adapter-diag>adapter-diag</module.adapter-diag>
<module.adapter-stdout>adapter-stdout</module.adapter-stdout>
<module.adapter-cqld4>adapter-cqld4</module.adapter-cqld4>
<module.adapter-http>adapter-http</module.adapter-http>
<module.adapter-tcp>adapter-tcp</module.adapter-tcp>
<module.adapter-dynamodb>adapter-dynamodb</module.adapter-dynamodb>
<module.adapter-mongodb>adapter-mongodb</module.adapter-mongodb>
<module.adapter-pulsar>adapter-pulsar</module.adapter-pulsar>
<module.adapter-s4j>adapter-s4j</module.adapter-s4j>
<module.adapter-kafka>adapter-kafka</module.adapter-kafka>
<module.adapter-kafka>adapter-amqp</module.adapter-kafka>
<module.adapter-jdbc>adapter-jdbc</module.adapter-jdbc>
<!-- VIRTDATA MODULES -->
<module.virtdata-api>virtdata-api</module.virtdata-api>
<module.virtdata-lang>virtdata-lang</module.virtdata-lang>
<module.virtdata-realdata>virtdata-realdata</module.virtdata-realdata>
<module.virtdata-lib-basics>virtdata-lib-basics</module.virtdata-lib-basics>
<module.virtdata-lib-random>virtdata-lib-random</module.virtdata-lib-random>
<module.virtdata-lib-curves4>virtdata-lib-curves4</module.virtdata-lib-curves4>
<module.virtdata-lib-realer>virtdata-lib-realer</module.virtdata-lib-realer>
<module.virtdata-lib-realer>virtdata-lib-hdf5</module.virtdata-lib-realer>
<module.virtdata-userlibs>virtdata-userlibs</module.virtdata-userlibs>
</properties>
<modules>
@@ -118,6 +91,7 @@
<module>virtdata-lib-curves4</module>
<module>virtdata-lib-realer</module>
<module>virtdata-lib-hdf5</module>
<module>virtdata-lib-vectors</module>
<module>virtdata-userlibs</module>
<!-- Documentation -->

View File

@@ -1,42 +0,0 @@
/*
* Copyright (c) 2024 nosqlbench
*
* Licensed 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 io.nosqlbench.virtdata.library.basics.shared.vectors.dnn;
import io.nosqlbench.virtdata.library.basics.shared.vectors.dnn.angular.DNN_angular1_neighbors;
import io.nosqlbench.virtdata.library.basics.shared.vectors.dnn.angular.DNN_angular1_v;
import org.junit.jupiter.api.Test;
import java.util.Arrays;
class DNN_Macro_Tests {
@Test
public void loopBackPrecisionTest() {
DNN_angular1_neighbors dnnan = new DNN_angular1_neighbors(3, 1_000_000, 7);
int[] indices = dnnan.apply(500);
System.out.println("neighbor indices:\n"+Arrays.toString(indices));
DNN_angular1_v dnnav = new DNN_angular1_v(10,1_000_000,7);
for (int index : indices) {
float[] v = dnnav.apply(index);
System.out.println("n["+index+"]: " + Arrays.toString(v));
}
}
}

View File

@@ -0,0 +1,72 @@
<!--
~ Copyright (c) 2023-2024 nosqlbench
~
~ Licensed 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.
-->
<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>
<parent>
<artifactId>mvn-defaults</artifactId>
<groupId>io.nosqlbench</groupId>
<version>${revision}</version>
<relativePath>../mvn-defaults</relativePath>
</parent>
<artifactId>virtdata-lib-vectors</artifactId>
<packaging>jar</packaging>
<name>virtdata-lib-vectors</name>
<url>http://nosqlbench.io/</url>
<description>With inspiration from other libraries</description>
<dependencies>
<dependency>
<groupId>io.nosqlbench</groupId>
<artifactId>virtdata-lib-basics</artifactId>
<version>${revision}</version>
</dependency>
<dependency>
<groupId>io.nosqlbench</groupId>
<artifactId>virtdata-api</artifactId>
<version>${revision}</version>
</dependency>
</dependencies>
<build>
<resources>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.md</include>
<include>**/*.yaml</include>
<include>**/*.txt</include>
</includes>
</resource>
<resource>
<directory>src/main/resources</directory>
<includes>
<include>**</include>
</includes>
</resource>
</resources>
</build>
</project>

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023 nosqlbench
* Copyright (c) 2023-2024 nosqlbench
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,12 +14,12 @@
* limitations under the License.
*/
package io.nosqlbench.virtdata.library.basics.shared.vectors;
package io.nosqlbench.virtdata.lib.vectors;
import io.nosqlbench.virtdata.api.annotations.Categories;
import io.nosqlbench.virtdata.api.annotations.Category;
import io.nosqlbench.virtdata.api.annotations.ThreadSafeMapper;
import io.nosqlbench.virtdata.library.basics.shared.vectors.algorithms.CircleAlgorithm;
import io.nosqlbench.virtdata.lib.vectors.algorithms.CircleAlgorithm;
import java.util.List;
import java.util.function.LongFunction;

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023 nosqlbench
* Copyright (c) 2023-2024 nosqlbench
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
* limitations under the License.
*/
package io.nosqlbench.virtdata.library.basics.shared.vectors.algorithms;
package io.nosqlbench.virtdata.lib.vectors.algorithms;
import java.util.List;

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023 nosqlbench
* Copyright (c) 2023-2024 nosqlbench
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
* limitations under the License.
*/
package io.nosqlbench.virtdata.library.basics.shared.vectors.algorithms;
package io.nosqlbench.virtdata.lib.vectors.algorithms;
import java.util.List;

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023 nosqlbench
* Copyright (c) 2023-2024 nosqlbench
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
* limitations under the License.
*/
package io.nosqlbench.virtdata.library.basics.shared.vectors.algorithms;
package io.nosqlbench.virtdata.lib.vectors.algorithms;
import java.util.List;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package io.nosqlbench.virtdata.library.basics.shared.vectors.dnn.angular;
package io.nosqlbench.virtdata.lib.vectors.dnn.angular;
import io.nosqlbench.virtdata.api.annotations.Categories;
import io.nosqlbench.virtdata.api.annotations.Category;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package io.nosqlbench.virtdata.library.basics.shared.vectors.dnn.angular;
package io.nosqlbench.virtdata.lib.vectors.dnn.angular;
import io.nosqlbench.virtdata.api.annotations.Categories;
import io.nosqlbench.virtdata.api.annotations.Category;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package io.nosqlbench.virtdata.library.basics.shared.vectors.dnn.circular;
package io.nosqlbench.virtdata.lib.vectors.dnn.circular;
/**
* <hr/>

View File

@@ -14,9 +14,9 @@
* limitations under the License.
*/
package io.nosqlbench.virtdata.library.basics.shared.vectors.dnn.circular;
package io.nosqlbench.virtdata.lib.vectors.dnn.circular;
import io.nosqlbench.virtdata.library.basics.shared.vectors.dnn.types.DNN_IntDoubleVectorSpace;
import io.nosqlbench.virtdata.lib.vectors.dnn.types.DNN_IntDoubleVectorSpace;
public class DNN_CircularSpace implements DNN_IntDoubleVectorSpace {

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package io.nosqlbench.virtdata.library.basics.shared.vectors.dnn.euclidean;
package io.nosqlbench.virtdata.lib.vectors.dnn.euclidean;
import io.nosqlbench.virtdata.api.annotations.Categories;
import io.nosqlbench.virtdata.api.annotations.Category;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package io.nosqlbench.virtdata.library.basics.shared.vectors.dnn.euclidean;
package io.nosqlbench.virtdata.lib.vectors.dnn.euclidean;
import io.nosqlbench.virtdata.api.annotations.Categories;
import io.nosqlbench.virtdata.api.annotations.Category;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package io.nosqlbench.virtdata.library.basics.shared.vectors.dnn.euclidean;
package io.nosqlbench.virtdata.lib.vectors.dnn.euclidean;
import io.nosqlbench.virtdata.api.annotations.Categories;
import io.nosqlbench.virtdata.api.annotations.Category;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package io.nosqlbench.virtdata.library.basics.shared.vectors.dnn.euclidean;
package io.nosqlbench.virtdata.lib.vectors.dnn.euclidean;
import io.nosqlbench.virtdata.api.annotations.Categories;
import io.nosqlbench.virtdata.api.annotations.Category;

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023 nosqlbench
* Copyright (c) 2023-2024 nosqlbench
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -17,4 +17,4 @@
/**
* This is an experimental package based on the DNN or "Das/Direct Nearest Neighbor" method.
*/
package io.nosqlbench.virtdata.library.basics.shared.vectors.dnn;
package io.nosqlbench.virtdata.lib.vectors.dnn;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package io.nosqlbench.virtdata.library.basics.shared.vectors.dnn.types;
package io.nosqlbench.virtdata.lib.vectors.dnn.types;
/**
* Implementations of this type represent the ordinals of vectors as integers,

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package io.nosqlbench.virtdata.library.basics.shared.vectors.dnn.types;
package io.nosqlbench.virtdata.lib.vectors.dnn.types;
import java.util.function.LongFunction;

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023 nosqlbench
* Copyright (c) 2023-2024 nosqlbench
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
* limitations under the License.
*/
package io.nosqlbench.virtdata.library.basics.shared.vectors.primitive;
package io.nosqlbench.virtdata.lib.vectors.primitive;
import io.nosqlbench.virtdata.api.annotations.Categories;
import io.nosqlbench.virtdata.api.annotations.Category;

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023 nosqlbench
* Copyright (c) 2023-2024 nosqlbench
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
* limitations under the License.
*/
package io.nosqlbench.virtdata.library.basics.shared.vectors.primitive;
package io.nosqlbench.virtdata.lib.vectors.primitive;
import io.nosqlbench.virtdata.api.annotations.Categories;
import io.nosqlbench.virtdata.api.annotations.Category;

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023 nosqlbench
* Copyright (c) 2023-2024 nosqlbench
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
* limitations under the License.
*/
package io.nosqlbench.virtdata.library.basics.shared.vectors.primitive;
package io.nosqlbench.virtdata.lib.vectors.primitive;
import java.util.function.LongToDoubleFunction;

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023 nosqlbench
* Copyright (c) 2023-2024 nosqlbench
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
* limitations under the License.
*/
package io.nosqlbench.virtdata.library.basics.shared.vectors.primitive;
package io.nosqlbench.virtdata.lib.vectors.primitive;
import io.nosqlbench.virtdata.api.annotations.Categories;
import io.nosqlbench.virtdata.api.annotations.Category;

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023 nosqlbench
* Copyright (c) 2023-2024 nosqlbench
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
* limitations under the License.
*/
package io.nosqlbench.virtdata.library.basics.shared.vectors.primitive;
package io.nosqlbench.virtdata.lib.vectors.primitive;
import io.nosqlbench.virtdata.api.annotations.Categories;
import io.nosqlbench.virtdata.api.annotations.Category;

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023 nosqlbench
* Copyright (c) 2023-2024 nosqlbench
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
* limitations under the License.
*/
package io.nosqlbench.virtdata.library.basics.shared.vectors.primitive;
package io.nosqlbench.virtdata.lib.vectors.primitive;
import io.nosqlbench.virtdata.api.annotations.Categories;
import io.nosqlbench.virtdata.api.annotations.Category;

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023 nosqlbench
* Copyright (c) 2023-2024 nosqlbench
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
* limitations under the License.
*/
package io.nosqlbench.virtdata.library.basics.shared.vectors.primitive;
package io.nosqlbench.virtdata.lib.vectors.primitive;
import io.nosqlbench.virtdata.api.annotations.Categories;
import io.nosqlbench.virtdata.api.annotations.Category;

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023 nosqlbench
* Copyright (c) 2023-2024 nosqlbench
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
* limitations under the License.
*/
package io.nosqlbench.virtdata.library.basics.shared.vectors.primitive;
package io.nosqlbench.virtdata.lib.vectors.primitive;
import io.nosqlbench.virtdata.api.annotations.Categories;
import io.nosqlbench.virtdata.api.annotations.Category;

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023 nosqlbench
* Copyright (c) 2023-2024 nosqlbench
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
* limitations under the License.
*/
package io.nosqlbench.virtdata.library.basics.shared.vectors.primitive;
package io.nosqlbench.virtdata.lib.vectors.primitive;
import io.nosqlbench.virtdata.api.annotations.Categories;
import io.nosqlbench.virtdata.api.annotations.Category;

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023 nosqlbench
* Copyright (c) 2023-2024 nosqlbench
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
* limitations under the License.
*/
package io.nosqlbench.virtdata.library.basics.shared.vectors.primitive;
package io.nosqlbench.virtdata.lib.vectors.primitive;
import io.nosqlbench.virtdata.api.annotations.Categories;
import io.nosqlbench.virtdata.api.annotations.Category;

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023 nosqlbench
* Copyright (c) 2023-2024 nosqlbench
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
* limitations under the License.
*/
package io.nosqlbench.virtdata.library.basics.shared.vectors.primitive;
package io.nosqlbench.virtdata.lib.vectors.primitive;
import io.nosqlbench.virtdata.api.annotations.Categories;
import io.nosqlbench.virtdata.api.annotations.Category;

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023 nosqlbench
* Copyright (c) 2023-2024 nosqlbench
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
* limitations under the License.
*/
package io.nosqlbench.virtdata.library.basics.shared.vectors.primitive;
package io.nosqlbench.virtdata.lib.vectors.primitive;
import io.nosqlbench.virtdata.api.annotations.Categories;
import io.nosqlbench.virtdata.api.annotations.Category;

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023 nosqlbench
* Copyright (c) 2023-2024 nosqlbench
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
* limitations under the License.
*/
package io.nosqlbench.virtdata.library.basics.shared.vectors.primitive;
package io.nosqlbench.virtdata.lib.vectors.primitive;
import io.nosqlbench.virtdata.api.annotations.Categories;
import io.nosqlbench.virtdata.api.annotations.Category;

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023 nosqlbench
* Copyright (c) 2023-2024 nosqlbench
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
* limitations under the License.
*/
package io.nosqlbench.virtdata.library.basics.shared.vectors.primitive;
package io.nosqlbench.virtdata.lib.vectors.primitive;
public class GoldenAngleDoubleVectors extends VectorSequence {
private final static double goldenAngle = 137.5;

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023 nosqlbench
* Copyright (c) 2023-2024 nosqlbench
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
* limitations under the License.
*/
package io.nosqlbench.virtdata.library.basics.shared.vectors.primitive;
package io.nosqlbench.virtdata.lib.vectors.primitive;
import io.nosqlbench.virtdata.api.annotations.Categories;
import io.nosqlbench.virtdata.api.annotations.Category;

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023 nosqlbench
* Copyright (c) 2023-2024 nosqlbench
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
* limitations under the License.
*/
package io.nosqlbench.virtdata.library.basics.shared.vectors.primitive;
package io.nosqlbench.virtdata.lib.vectors.primitive;
import io.nosqlbench.virtdata.api.annotations.Categories;
import io.nosqlbench.virtdata.api.annotations.Category;

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023 nosqlbench
* Copyright (c) 2023-2024 nosqlbench
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
* limitations under the License.
*/
package io.nosqlbench.virtdata.library.basics.shared.vectors.primitive;
package io.nosqlbench.virtdata.lib.vectors.primitive;
import io.nosqlbench.virtdata.api.annotations.Categories;
import io.nosqlbench.virtdata.api.annotations.Category;

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023 nosqlbench
* Copyright (c) 2023-2024 nosqlbench
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
* limitations under the License.
*/
package io.nosqlbench.virtdata.library.basics.shared.vectors.primitive;
package io.nosqlbench.virtdata.lib.vectors.primitive;
import io.nosqlbench.virtdata.api.annotations.Categories;
import io.nosqlbench.virtdata.api.annotations.Category;

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023 nosqlbench
* Copyright (c) 2023-2024 nosqlbench
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
* limitations under the License.
*/
package io.nosqlbench.virtdata.library.basics.shared.vectors.primitive;
package io.nosqlbench.virtdata.lib.vectors.primitive;
import io.nosqlbench.virtdata.api.annotations.Categories;
import io.nosqlbench.virtdata.api.annotations.Category;

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023 nosqlbench
* Copyright (c) 2023-2024 nosqlbench
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
* limitations under the License.
*/
package io.nosqlbench.virtdata.library.basics.shared.vectors.primitive;
package io.nosqlbench.virtdata.lib.vectors.primitive;
public class UnitSteps extends DoubleSequence {
public UnitSteps(long cardinality) {

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023 nosqlbench
* Copyright (c) 2023-2024 nosqlbench
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
* limitations under the License.
*/
package io.nosqlbench.virtdata.library.basics.shared.vectors.primitive;
package io.nosqlbench.virtdata.lib.vectors.primitive;
import java.util.function.LongFunction;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package io.nosqlbench.virtdata.library.basics.shared.vectors.dnn;
package io.nosqlbench.virtdata.lib.vectors.dnn;
import org.junit.jupiter.api.Test;
import org.matheclipse.core.eval.ExprEvaluator;

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023 nosqlbench
* Copyright (c) 2023-2024 nosqlbench
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,9 +14,8 @@
* limitations under the License.
*/
package io.nosqlbench.virtdata.library.basics.shared.vectors.dnn;
package io.nosqlbench.virtdata.lib.vectors.dnn.angular;
import io.nosqlbench.virtdata.library.basics.shared.vectors.dnn.angular.DNN_angular1_neighbors;
import org.junit.jupiter.api.Test;
import static org.assertj.core.api.Assertions.assertThat;

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023 nosqlbench
* Copyright (c) 2023-2024 nosqlbench
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,9 +14,8 @@
* limitations under the License.
*/
package io.nosqlbench.virtdata.library.basics.shared.vectors.dnn;
package io.nosqlbench.virtdata.lib.vectors.dnn.angular;
import io.nosqlbench.virtdata.library.basics.shared.vectors.dnn.angular.DNN_angular1_v;
import org.junit.jupiter.api.Test;
import static org.assertj.core.api.Assertions.assertThat;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package io.nosqlbench.virtdata.library.basics.shared.vectors.dnn;
package io.nosqlbench.virtdata.lib.vectors.dnn.angular;
import java.math.BigDecimal;
import java.math.MathContext;

View File

@@ -14,9 +14,8 @@
* limitations under the License.
*/
package io.nosqlbench.virtdata.library.basics.shared.vectors.dnn;
package io.nosqlbench.virtdata.lib.vectors.dnn.angular;
import io.nosqlbench.virtdata.library.basics.shared.vectors.dnn.angular.DNN_angular1_v;
import org.junit.jupiter.api.Test;
import java.util.Arrays;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package io.nosqlbench.virtdata.library.basics.shared.vectors.dnn;
package io.nosqlbench.virtdata.lib.vectors.dnn.angular;
import java.math.BigDecimal;
import java.math.MathContext;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package io.nosqlbench.virtdata.library.basics.shared.vectors.dnn;
package io.nosqlbench.virtdata.lib.vectors.dnn.angular;
import java.math.MathContext;
import java.math.RoundingMode;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package io.nosqlbench.virtdata.library.basics.shared.vectors.dnn;
package io.nosqlbench.virtdata.lib.vectors.dnn.angular;
import java.math.BigDecimal;
import java.util.Arrays;

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023 nosqlbench
* Copyright (c) 2023-2024 nosqlbench
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,12 +14,13 @@
* limitations under the License.
*/
package io.nosqlbench.virtdata.library.basics.shared.vectors;
package io.nosqlbench.virtdata.lib.vectors.dnn.circular;
import io.nosqlbench.virtdata.lib.vectors.CircleVectors;
import io.nosqlbench.virtdata.lib.vectors.algorithms.GoldenAngle;
import io.nosqlbench.virtdata.lib.vectors.algorithms.LatLonBased;
import org.junit.jupiter.api.Test;
import java.util.List;
import static org.junit.jupiter.api.Assertions.*;
public class CircleVectorsTest {
@@ -27,12 +28,12 @@ public class CircleVectorsTest {
@Test
public void testCircleVectors() {
try {
CircleVectors circleVectors = new CircleVectors(10,
"io.nosqlbench.virtdata.library.basics.shared.vectors.algorithms.GoldenAngle");
CircleVectors circleVectors = new CircleVectors(10, GoldenAngle.class.getCanonicalName());
assert (circleVectors.getCircleCount() == 10);
assert (circleVectors.getAlgorithm() instanceof
io.nosqlbench.virtdata.library.basics.shared.vectors.algorithms.GoldenAngle);
GoldenAngle);
} catch (Exception e) {
throw new RuntimeException(e);
}
@@ -52,8 +53,7 @@ public class CircleVectorsTest {
@Test
public void testGoldenAngle() {
try {
CircleVectors circleVectors = new CircleVectors(10,
"io.nosqlbench.virtdata.library.basics.shared.vectors.algorithms.GoldenAngle");
CircleVectors circleVectors = new CircleVectors(10, GoldenAngle.class.getCanonicalName());
List<Object> result = circleVectors.apply(1000);
assert (result.size() == 3);
@@ -68,8 +68,7 @@ public class CircleVectorsTest {
@Test
public void testLatLonBased() {
try {
CircleVectors circleVectors = new CircleVectors(10,
"io.nosqlbench.virtdata.library.basics.shared.vectors.algorithms.LatLonBased");
CircleVectors circleVectors = new CircleVectors(10, LatLonBased.class.getCanonicalName());
List<Object> result = circleVectors.apply(1000);
assert (result.size() == 3);

View File

@@ -14,14 +14,10 @@
* limitations under the License.
*/
package io.nosqlbench.virtdata.library.basics.shared.vectors.dnn.circular;
package io.nosqlbench.virtdata.lib.vectors.dnn.circular;
import org.apfloat.Apfloat;
import org.apfloat.ApfloatMath;
import org.junit.jupiter.api.Test;
import java.util.Arrays;
import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.jupiter.api.Assertions.*;
@@ -84,10 +80,10 @@ class CircularPartitionerTest {
}
private int[] range(int lowIncl, int highExcl) {
int[] ints = new int[highExcl - lowIncl];
private int[] range(int lowestIncluded, int highestExcluded) {
int[] ints = new int[highestExcluded - lowestIncluded];
for (int i = 0; i < ints.length; i++) {
ints[i]=lowIncl+i;
ints[i]=lowestIncluded+i;
}
return ints;
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023 nosqlbench
* Copyright (c) 2023-2024 nosqlbench
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,11 +14,8 @@
* limitations under the License.
*/
package io.nosqlbench.virtdata.library.basics.shared.vectors.dnn;
import io.nosqlbench.virtdata.library.basics.shared.vectors.dnn.euclidean.DNN_euclidean_neighbors;
package io.nosqlbench.virtdata.lib.vectors.dnn.euclidean;
import org.junit.jupiter.api.Test;
import static org.assertj.core.api.Assertions.assertThat;
class DNNEuclideanNeighborsTest {

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023 nosqlbench
* Copyright (c) 2023-2024 nosqlbench
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,11 +14,8 @@
* limitations under the License.
*/
package io.nosqlbench.virtdata.library.basics.shared.vectors.dnn;
package io.nosqlbench.virtdata.lib.vectors.dnn.euclidean;
import io.nosqlbench.virtdata.library.basics.shared.vectors.dnn.euclidean.DNN_euclidean_v;
import io.nosqlbench.virtdata.library.basics.shared.vectors.dnn.euclidean.DNN_euclidean_v_series;
import io.nosqlbench.virtdata.library.basics.shared.vectors.dnn.euclidean.DNN_euclidean_v_wrap;
import org.junit.jupiter.api.Test;
import static org.assertj.core.api.Assertions.assertThat;

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023 nosqlbench
* Copyright (c) 2023-2024 nosqlbench
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
* limitations under the License.
*/
package io.nosqlbench.virtdata.library.basics.shared.vectors.primitive;
package io.nosqlbench.virtdata.lib.vectors.primitive;
import org.junit.jupiter.api.Test;

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023 nosqlbench
* Copyright (c) 2023-2024 nosqlbench
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
* limitations under the License.
*/
package io.nosqlbench.virtdata.library.basics.shared.vectors.primitive;
package io.nosqlbench.virtdata.lib.vectors.primitive;
import org.junit.jupiter.api.Test;

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023 nosqlbench
* Copyright (c) 2023-2024 nosqlbench
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
* limitations under the License.
*/
package io.nosqlbench.virtdata.library.basics.shared.vectors.primitive;
package io.nosqlbench.virtdata.lib.vectors.primitive;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

View File

@@ -73,6 +73,12 @@
<version>${revision}</version>
</dependency>
<dependency>
<groupId>io.nosqlbench</groupId>
<artifactId>virtdata-lib-vectors</artifactId>
<version>${revision}</version>
</dependency>
<dependency>
<groupId>io.nosqlbench</groupId>
<artifactId>docsys</artifactId>