code: public int[] getNonZeroIndices() {
          if (vectorOffset == 0)
              return sparseVector.getNonZeroIndices();
          // If the sparse vector is a sub-view, calculate which indices are
          // reflected in this view
          else {
              int[] full = sparseVector.getNonZeroIndices();
              Arrays.sort(full);
              int startIndex = 0;
              int endIndex = full.length;
              for (int i = 0; i < full.length; ++i) {
                  if (full[i] < vectorOffset)
                      startIndex++;
                  else if (full[i] > vectorOffset + vectorLength) {
                      endIndex = i - 1;
                      break;
                  }
              }
              if (startIndex == endIndex)
                  return new int[0];
              int[] range = new int[endIndex - startIndex];
              System.arraycopy(full, startIndex, range, 0, range.length);
              return range;
          }
      }
docs: {@inheritDoc}