Skip to content

Commit

Permalink
add more comments
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosuc3m committed Oct 26, 2023
1 parent f854e5c commit b61c7c1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
4 changes: 3 additions & 1 deletion src/main/java/io/bioimage/modelrunner/tiling/PatchSpec.java
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,9 @@ public class PatchSpec
* sequence sizes.
* @param patchPaddingSize
* The padding size used on each patch.
* @return The create patch specification.
* @param tensorDims
* The original size of the image/tensor that is going to be tiled
* @return The create patch specification.
*/
public static PatchSpec create(String tensorName, long[] patchInputSize, int[] patchGridSize,
int[][] patchPaddingSize, long[] tensorDims)
Expand Down
16 changes: 8 additions & 8 deletions src/main/java/io/bioimage/modelrunner/utils/IndexingUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public class IndexingUtils
{

/**
* Obtain a flat index position from a multidimensional index position
* Obtain a flat index position from a multidimensional index position, assumes row major (C-order)
*
* @param ind
* the multidimensional indexes
Expand Down Expand Up @@ -75,7 +75,7 @@ public static void main(String[] args) {
}

/**
* Obtain a flat index position from a multidimensional index position
* Obtain a flat index position from a multidimensional index position, assumes row major (C-order)
*
* @param ind
* the multidimensional indexes
Expand All @@ -97,10 +97,10 @@ public static int multidimensionalIntoFlatIndex( long[] ind, long[] size )
}

/**
* Obtain a flat index position from a multidimensional index position
* Obtain the multidimensional position corresponding to a flat position in an nd array
*
* @param ind
* the index of the position as if it was a flat array
* @param flat
* flat position in an nd-array, assumes row major (C-order)
* @param size
* size of the tensor
* @return the multidimensional indexes
Expand All @@ -121,10 +121,10 @@ public static long[] flatIntoMultidimensionalIndex( long flat, long[] size )
}

/**
* Obtain a flat index position from a multidimensional index position
* Obtain the multidimensional position corresponding to a flat position in an nd array
*
* @param ind
* the index of the position as if it was a flat array
* @param flat
* flat position in an nd-array, assumes row major (C-order)
* @param size
* size of the tensor
* @return the multidimensional indexes
Expand Down

0 comments on commit b61c7c1

Please sign in to comment.