From ab84064d0a1f138629da4634525eb227d2fe716c Mon Sep 17 00:00:00 2001
From: carlosuc3m <100329787@alumnos.uc3m.es>
Date: Thu, 20 Oct 2022 21:25:02 +0200
Subject: [PATCH] remove unnecessary generic type
---
.../icy/tensorflow/v1/tensor/ImgLib2Builder.java | 8 ++++----
.../icy/tensorflow/v1/tensor/TensorBuilder.java | 8 ++++----
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/src/main/java/org/bioimageanalysis/icy/tensorflow/v1/tensor/ImgLib2Builder.java b/src/main/java/org/bioimageanalysis/icy/tensorflow/v1/tensor/ImgLib2Builder.java
index e6b8b60..f67db4e 100644
--- a/src/main/java/org/bioimageanalysis/icy/tensorflow/v1/tensor/ImgLib2Builder.java
+++ b/src/main/java/org/bioimageanalysis/icy/tensorflow/v1/tensor/ImgLib2Builder.java
@@ -69,7 +69,7 @@ public final class ImgLib2Builder
* The tensor data is read from.
* @return The INDArray built from the tensor of type {@link DataType#UBYTE}.
*/
- private static <T extends Type<T>> Img<ByteType> buildFromTensorByte(Tensor<UInt8> tensor)
+ private static Img<ByteType> buildFromTensorByte(Tensor<UInt8> tensor)
{
long[] tensorShape = tensor.shape();
final ImgFactory< ByteType > factory = new CellImgFactory<>( new ByteType(), 5 );
@@ -98,7 +98,7 @@ public final class ImgLib2Builder
* The tensor data is read from.
* @return The sequence built from the tensor of type {@link DataType#INT}.
*/
- private static <T extends Type<T>> Img<IntType> buildFromTensorInt(Tensor<Integer> tensor)
+ private static Img<IntType> buildFromTensorInt(Tensor<Integer> tensor)
{
long[] tensorShape = tensor.shape();
final ImgFactory< IntType > factory = new CellImgFactory<>( new IntType(), 5 );
@@ -127,7 +127,7 @@ public final class ImgLib2Builder
* The tensor data is read from.
* @return The INDArray built from the tensor of type {@link DataType#FLOAT}.
*/
- private static <T extends Type<T>> Img<FloatType> buildFromTensorFloat(Tensor<Float> tensor)
+ private static Img<FloatType> buildFromTensorFloat(Tensor<Float> tensor)
{
long[] tensorShape = tensor.shape();
final ImgFactory< FloatType > factory = new CellImgFactory<>( new FloatType(), 5 );
@@ -156,7 +156,7 @@ public final class ImgLib2Builder
* The tensor data is read from.
* @return The INDArray built from the tensor of type {@link DataType#DOUBLE}.
*/
- private static <T extends Type<T>> Img<DoubleType> buildFromTensorDouble(Tensor<Double> tensor)
+ private static Img<DoubleType> buildFromTensorDouble(Tensor<Double> tensor)
{
long[] tensorShape = tensor.shape();
final ImgFactory< DoubleType > factory = new CellImgFactory<>( new DoubleType(), 5 );
diff --git a/src/main/java/org/bioimageanalysis/icy/tensorflow/v1/tensor/TensorBuilder.java b/src/main/java/org/bioimageanalysis/icy/tensorflow/v1/tensor/TensorBuilder.java
index 094fc00..7f0816b 100644
--- a/src/main/java/org/bioimageanalysis/icy/tensorflow/v1/tensor/TensorBuilder.java
+++ b/src/main/java/org/bioimageanalysis/icy/tensorflow/v1/tensor/TensorBuilder.java
@@ -82,7 +82,7 @@ public final class TensorBuilder
* @throws IllegalArgumentException
* If the ndarray type is not supported.
*/
- private static <T extends Type<T>> Tensor<UInt8> buildByte(RandomAccessibleInterval<ByteType> imgTensor)
+ private static Tensor<UInt8> buildByte(RandomAccessibleInterval<ByteType> imgTensor)
{
long[] tensorShape = imgTensor.dimensionsAsLongArray();
Cursor<ByteType> tensorCursor;
@@ -117,7 +117,7 @@ public final class TensorBuilder
* @throws IllegalArgumentException
* If the ndarray type is not supported.
*/
- private static <T extends Type<T>> Tensor<Integer> buildInt(RandomAccessibleInterval<IntType> imgTensor)
+ private static Tensor<Integer> buildInt(RandomAccessibleInterval<IntType> imgTensor)
{
long[] tensorShape = imgTensor.dimensionsAsLongArray();
Cursor<IntType> tensorCursor;
@@ -152,7 +152,7 @@ public final class TensorBuilder
* @throws IllegalArgumentException
* If the ndarray type is not supported.
*/
- private static <T extends Type<T>> Tensor<Float> buildFloat(RandomAccessibleInterval<FloatType> imgTensor)
+ private static Tensor<Float> buildFloat(RandomAccessibleInterval<FloatType> imgTensor)
{
long[] tensorShape = imgTensor.dimensionsAsLongArray();
Cursor<FloatType> tensorCursor;
@@ -187,7 +187,7 @@ public final class TensorBuilder
* @throws IllegalArgumentException
* If the ndarray type is not supported.
*/
- private static <T extends Type<T>> Tensor<Double> buildDouble(RandomAccessibleInterval<DoubleType> imgTensor)
+ private static Tensor<Double> buildDouble(RandomAccessibleInterval<DoubleType> imgTensor)
{
long[] tensorShape = imgTensor.dimensionsAsLongArray();
Cursor<DoubleType> tensorCursor;
--
GitLab