protected long[] joinLastDimensions(Subspace other) {
    if(this.dimensionality != other.dimensionality) {
      return null;
    }
    if(this.dimensionality == 1) {
      return BitsUtil.orI(BitsUtil.copy(this.dimensions), other.dimensions);
    }
    int last1 = BitsUtil.capacity(this.dimensions) - BitsUtil.numberOfLeadingZeros(this.dimensions) - 1;
    int last2 = BitsUtil.capacity(other.dimensions) - BitsUtil.numberOfLeadingZeros(other.dimensions) - 1;
    if(last2 < 0 || last1 >= last2) {
      return null;
    }
    long[] result = BitsUtil.orI(BitsUtil.copy(other.dimensions), this.dimensions);
    return BitsUtil.cardinality(result) == dimensionality + 1 ? result : null;
  }
protected long [ ] joinLastDimensions ( Subspace other ) { if ( this . dimensionality != other . dimensionality ) { return null ; } if ( this . dimensionality == 1 ) { return BitsUtil . orI ( BitsUtil . copy ( this . dimensions ) , other . dimensions ) ; } int last1 = BitsUtil . capacity ( this . dimensions ) - BitsUtil . numberOfLeadingZeros ( this . dimensions ) - 1 ; int last2 = BitsUtil . capacity ( other . dimensions ) - BitsUtil . numberOfLeadingZeros ( other . dimensions ) - 1 ; if ( last2 < 0 || last1 >= last2 ) { return null ; } long [ ] result = BitsUtil . orI ( BitsUtil . copy ( other . dimensions ) , this . dimensions ) ; return BitsUtil . cardinality ( result ) == dimensionality + 1 ? result : null ; }
Joins the dimensions of this subspace with the dimensions of the specified
subspace. The join is only successful if both subspaces have the first k-1
dimensions in common (where k is the number of dimensions) and the last
dimension of this subspace is less than the last dimension of the specified
subspace.

@param other the subspace to join
@return the joined dimensions of this subspace with the dimensions of the
specified subspace if the join condition is fulfilled, null
otherwise.