Skip to content

Commit

Permalink
fix: use the more appropriate return classes
Browse files Browse the repository at this point in the history
fixes #43
  • Loading branch information
axtimwalde committed Jun 12, 2024
1 parent d35c9ca commit b8617be
Showing 1 changed file with 8 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@
* %%
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
Expand Down Expand Up @@ -139,12 +139,12 @@ public static boolean isIdentity( final AffineGet affineGet )

/**
* See {@link RealViews}{@link #simplifyReal(RealRandomAccessible)}
*
*
* @param source
* to be simplified.
* @param <T> the type
* @return a (potentially) simplified version of the source.
*
*
*/
public static < T > RealRandomAccessible< T > simplifyReal( final RealRandomAccessible< T > source )
{
Expand All @@ -157,12 +157,12 @@ public static < T > RealRandomAccessible< T > simplifyReal( final RealRandomAcce

/**
* See {@link RealViews}{@link #simplify(RealRandomAccessible)}
*
*
* @param source
* to be simplified.
* @param <T> the type
* @return a (potentially) simplified version of the source.
*
*
*/
@SuppressWarnings( "unchecked" )
public static < T > RandomAccessible< T > simplify( final RealRandomAccessible< T > source )
Expand Down Expand Up @@ -280,15 +280,14 @@ private static < T > RealRandomAccessible< T > createRealRandomAccessible( final
{
if ( t instanceof AffineGet )
{
return new AffineRandomAccessible<>( rra, ( AffineGet ) t );
return new AffineRealRandomAccessible<>( rra, ( AffineGet ) t );
}
return new RealTransformRandomAccessible<>( rra, t );
return new RealTransformRealRandomAccessible<>( rra, t );
}

return rra;
}

@SuppressWarnings( "unchecked" )
private static < T > Pair< RealRandomAccessible< T >, RealTransform > findSourceAndSimplifyTransforms( final RealRandomAccessible< T > source )
{
final List< RealTransform > transforms = new LinkedList<>();
Expand Down

0 comments on commit b8617be

Please sign in to comment.