Skip to content

Commit

Permalink
Add method 'getNHash' to 'HealpixNested' and 'HealpixNestedFast', see…
Browse files Browse the repository at this point in the history
… issue #19
  • Loading branch information
fxpineau committed Nov 26, 2024
1 parent 824fb59 commit de69071
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/main/java/cds/healpix/HealpixNested.java
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,16 @@ public HashComputer newHashComputer() {
return new HealpixNestedHashComputer(this);
}

/**
* Returns the total number of distinct hash values (i.e. the number of HEALPix cells)
* at this object HEALPix depth.
* @return the total number of distinct hash values (i.e. the number of HEALPix cells)
* at this object HEALPix depth.
*/
public long getNHash() {
return this.nHash;
}

/**
* WARNING: the return object in not thread-safe!
* @param auxAxis object describing the auxiliary axis
Expand Down
10 changes: 10 additions & 0 deletions src/main/java/cds/healpix/HealpixNestedFast.java
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,16 @@ public HealpixNestedFast(final int depth, FillingCurve2DType fillingCurveType) {
this.fc = fillingCurveType.get(depth);
}

/**
* Returns the total number of distinct hash values (i.e. the number of HEALPix cells)
* at this object HEALPix depth.
* @return the total number of distinct hash values (i.e. the number of HEALPix cells)
* at this object HEALPix depth.
*/
public long getNHash() {
return this.nHash;
}

@Override
public int depth() {
return this.depth;
Expand Down

0 comments on commit de69071

Please sign in to comment.