Skip to content

Commit f46e9bd

Browse files
committed
For readability, use the same names and access modifiers in all convolvers
1 parent da903dd commit f46e9bd

File tree

4 files changed

+44
-44
lines changed

4 files changed

+44
-44
lines changed

src/main/java/net/imglib2/algorithm/convolution/kernel/ConvolverNativeType.java

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -54,25 +54,25 @@
5454
public final class ConvolverNativeType< T extends NumericType< T > & NativeType< T > > implements Runnable
5555
{
5656

57-
final private double[] kernel;
57+
private final double[] kernel;
5858

59-
final private RandomAccess< ? extends T > in;
59+
private final RandomAccess< ? extends T > in;
6060

61-
final private RandomAccess< ? extends T > out;
61+
private final RandomAccess< ? extends T > out;
6262

63-
final private int d;
63+
private final int d;
6464

6565
private final int k1k;
6666

67-
final private int k1k1;
67+
private final int k1k1;
6868

69-
final private long linelen;
69+
private final long linelen;
7070

71-
final T b1;
71+
private final T b1;
7272

73-
final T b2;
73+
private final T b2;
7474

75-
final T tmp;
75+
private final T tmp;
7676

7777
public ConvolverNativeType( final Kernel1D kernel, final RandomAccess< ? extends T > in, final RandomAccess< ? extends T > out, final int d, final long lineLength )
7878
{
@@ -86,8 +86,8 @@ public ConvolverNativeType( final Kernel1D kernel, final RandomAccess< ? extends
8686
k1k1 = k1k - 1;
8787
linelen = lineLength;
8888

89-
T type = out.get();
90-
final ArrayImg< T, ? > buf = new ArrayImgFactory< T >( type ).create( new long[] { k1k } );
89+
final T type = out.get();
90+
final ArrayImg< T, ? > buf = new ArrayImgFactory<>( type ).create( new long[] { k1k } );
9191
b1 = buf.randomAccess().get();
9292
b2 = buf.randomAccess().get();
9393

@@ -113,7 +113,7 @@ private void next()
113113
out.fwd( d );
114114
}
115115

116-
private void process( T w )
116+
private void process( final T w )
117117
{
118118
// move buf contents down
119119
for ( int i = 0; i < k1k1; ++i )

src/main/java/net/imglib2/algorithm/convolution/kernel/ConvolverNumericType.java

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -52,23 +52,23 @@
5252
public final class ConvolverNumericType< T extends NumericType< T > > implements Runnable
5353
{
5454

55-
final private double[] kernel;
55+
private final double[] kernel;
5656

57-
final private RandomAccess< ? extends T > in;
57+
private final RandomAccess< ? extends T > in;
5858

59-
final private RandomAccess< ? extends T > out;
59+
private final RandomAccess< ? extends T > out;
6060

61-
final private int d;
61+
private final int d;
6262

63-
final private int k1k1;
63+
private final int k1k;
6464

65-
final private int k1k;
65+
private final int k1k1;
6666

67-
final private long fill2;
67+
private final long linelen;
6868

69-
final private T[] buffer;
69+
private final T[] buffer;
7070

71-
final private T tmp;
71+
private final T tmp;
7272

7373
@SuppressWarnings( "unchecked" )
7474
public ConvolverNumericType( final Kernel1D kernel, final RandomAccess< ? extends T > in, final RandomAccess< ? extends T > out, final int d, final long lineLength )
@@ -81,7 +81,7 @@ public ConvolverNumericType( final Kernel1D kernel, final RandomAccess< ? extend
8181

8282
k1k = this.kernel.length;
8383
k1k1 = k1k - 1;
84-
fill2 = lineLength;
84+
linelen = lineLength;
8585

8686
T type = out.get();
8787
buffer = ( T[] ) Array.newInstance( type.getClass(), k1k + 1 );
@@ -111,7 +111,7 @@ private void next()
111111
out.fwd( d );
112112
}
113113

114-
private void process( T tmp )
114+
private void process( final T tmp )
115115
{
116116
for ( int i = 1; i < k1k; ++i )
117117
{
@@ -127,7 +127,7 @@ public void run()
127127
{
128128
for ( int i = 0; i < k1k1; ++i )
129129
prefill();
130-
for ( long i = 0; i < fill2; ++i )
130+
for ( long i = 0; i < linelen; ++i )
131131
next();
132132
}
133133
}

src/main/java/net/imglib2/algorithm/convolution/kernel/DoubleConvolverRealType.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -50,21 +50,21 @@
5050
public final class DoubleConvolverRealType implements Runnable
5151
{
5252

53-
final private double[] kernel;
53+
private final double[] kernel;
5454

55-
final private RandomAccess< ? extends RealType< ? > > in;
55+
private final RandomAccess< ? extends RealType< ? > > in;
5656

57-
final private RandomAccess< ? extends RealType< ? > > out;
57+
private final RandomAccess< ? extends RealType< ? > > out;
5858

59-
final private int d;
59+
private final int d;
6060

61-
final private int k1k1;
61+
private final int k1k;
6262

63-
final private int k1k;
63+
private final int k1k1;
6464

65-
final private long fill2;
65+
private final long linelen;
6666

67-
final private double[] buffer;
67+
private final double[] buffer;
6868

6969
public DoubleConvolverRealType( final Kernel1D kernel, final RandomAccess< ? extends RealType< ? > > in, final RandomAccess< ? extends RealType< ? > > out, final int d, final long lineLength )
7070
{
@@ -76,7 +76,7 @@ public DoubleConvolverRealType( final Kernel1D kernel, final RandomAccess< ? ext
7676

7777
k1k = this.kernel.length;
7878
k1k1 = k1k - 1;
79-
fill2 = lineLength;
79+
linelen = lineLength;
8080
buffer = new double[ k1k + 1 ];
8181
}
8282

@@ -107,7 +107,7 @@ public void run()
107107
{
108108
for ( int i = 0; i < k1k1; ++i )
109109
prefill();
110-
for ( long i = 0; i < fill2; ++i )
110+
for ( long i = 0; i < linelen; ++i )
111111
next();
112112
}
113113
}

src/main/java/net/imglib2/algorithm/convolution/kernel/FloatConvolverRealType.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -50,21 +50,21 @@
5050
public final class FloatConvolverRealType implements Runnable
5151
{
5252

53-
final private float[] kernel;
53+
private final float[] kernel;
5454

55-
final private RandomAccess< ? extends RealType< ? > > in;
55+
private final RandomAccess< ? extends RealType< ? > > in;
5656

57-
final private RandomAccess< ? extends RealType< ? > > out;
57+
private final RandomAccess< ? extends RealType< ? > > out;
5858

59-
final private int d;
59+
private final int d;
6060

61-
final private int k1k1;
61+
private final int k1k;
6262

63-
final private int k1k;
63+
private final int k1k1;
6464

65-
final private long fill2;
65+
private final long linelen;
6666

67-
final private float[] buffer;
67+
private final float[] buffer;
6868

6969
public FloatConvolverRealType( final Kernel1D kernel, final RandomAccess< ? extends RealType< ? > > in, final RandomAccess< ? extends RealType< ? > > out, final int d, final long lineLength )
7070
{
@@ -76,7 +76,7 @@ public FloatConvolverRealType( final Kernel1D kernel, final RandomAccess< ? exte
7676

7777
k1k = this.kernel.length;
7878
k1k1 = k1k - 1;
79-
fill2 = lineLength;
79+
linelen = lineLength;
8080
buffer = new float[ k1k + 1 ];
8181
}
8282

@@ -115,7 +115,7 @@ public void run()
115115
{
116116
for ( int i = 0; i < k1k1; ++i )
117117
prefill();
118-
for ( long i = 0; i < fill2; ++i )
118+
for ( long i = 0; i < linelen; ++i )
119119
next();
120120
}
121121
}

0 commit comments

Comments
 (0)