Skip to content

Commit

Permalink
Update in preferredAttributesPerRule/preferredConditionsPerRule param…
Browse files Browse the repository at this point in the history
…eters: the value of 0 interpreted as the infinity.
  • Loading branch information
agudys committed Feb 20, 2024
1 parent 1b3e6a3 commit 390c32d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion adaa.analytics.rules/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ codeQuality {
}

sourceCompatibility = 1.8
version = '1.7.4'
version = '1.7.5'


jar {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,13 +138,17 @@ public class Knowledge implements Serializable {

/** Gets {@link #preferredConditionsPerRule}. */
public int getPreferredConditionsPerRule() { return preferredConditionsPerRule; }
/** Sets {@link #preferredConditionsPerRule}. */
public void setPreferredConditionsPerRule(int preferredConditionsPerRule) { this.preferredConditionsPerRule = preferredConditionsPerRule; }
/** Sets {@link #preferredConditionsPerRule}. The value of 0 is translated to the infinity.*/
public void setPreferredConditionsPerRule(int v) {
this.preferredConditionsPerRule = (v == 0) ? Integer.MAX_VALUE : v;
}

/** Gets {@link #preferredAttributesPerRule}. */
public int getPreferredAttributesPerRule() { return preferredAttributesPerRule; }
/** Sets {@link #preferredAttributesPerRule}. */
public void setPreferredAttributesPerRule(int preferredAttributesPerRule) { this.preferredAttributesPerRule = preferredAttributesPerRule; }
/** Sets {@link #preferredAttributesPerRule}. The value of 0 is translated to the infinity.*/
public void setPreferredAttributesPerRule(int v) {
this.preferredAttributesPerRule = (v == 0) ? Integer.MAX_VALUE : v;
}

/**
* Initializes knowledge from collections of initial rules, preferred/forbidden conditions and attributes.
Expand Down

0 comments on commit 390c32d

Please sign in to comment.