Skip to content

Commit

Permalink
fix: Take into account only non empty cell (#50)
Browse files Browse the repository at this point in the history
* fix: Take into account only non empty cell

* fix: Take into account only non empty cell

---------

Co-authored-by: Romuald Rousseau <[email protected]>
  • Loading branch information
RomualdRousseau and Romuald Rousseau authored Nov 13, 2024
1 parent c40223d commit cc05b01
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,12 @@ private List<String> sampleEntities() {
if (cell.getSymbol().equals("e")) {
entityVector.iadd(cell.getEntityVector());
}

n += Settings.DEFAULT_ENTITY_PROBABILITY;
}
entityVector.if_lt_then(n, 0.0f, 1.0f);
if (n > 0.0f) {
entityVector.if_lt_then(n, 0.0f, 1.0f);
}
final var entityList = this.getTable().getSheet().getDocument().getModel().getEntityList();
return IntStream.range(0, entityVector.size).boxed()
.filter(i -> entityVector.data[i] == 1)
Expand Down

0 comments on commit cc05b01

Please sign in to comment.