Skip to content

Commit

Permalink
Some small issues with ECDF and mu_C
Browse files Browse the repository at this point in the history
  • Loading branch information
ppdewolf committed Jun 5, 2020
1 parent a796ae7 commit 5f11fa3
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 7 deletions.
Binary file modified TauArgus.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion src/tauargus/gui/DialogMuC.form
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
<SubComponents>
<Component class="javax.swing.JLabel" name="jLabel1">
<Properties>
<Property name="text" type="java.lang.String" value="Additional noise for sensitive cells (0 means no additional noise): mu_C ="/>
<Property name="text" type="java.lang.String" value="&lt;html&gt;Additional noise for sensitive cells (0 means no additional noise): &amp;mu;&lt;sub&gt;C&lt;/sub&gt; =&lt;/html&gt;"/>
</Properties>
</Component>
<Component class="javax.swing.JTextField" name="muCValue">
Expand Down
4 changes: 2 additions & 2 deletions src/tauargus/gui/DialogMuC.java
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ private void initComponents() {
setName("muCDialog"); // NOI18N
setResizable(false);

jLabel1.setText("Additional noise for sensitive cells (0 means no additional noise): mu_C =");
jLabel1.setText("<html>Additional noise for sensitive cells (0 means no additional noise): &mu;<sub>C</sub> =</html>");

muCValue.setHorizontalAlignment(javax.swing.JTextField.RIGHT);
muCValue.setText("0");
Expand All @@ -91,7 +91,7 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jLabel1)
.addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(muCValue, javax.swing.GroupLayout.PREFERRED_SIZE, 46, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
Expand Down
2 changes: 1 addition & 1 deletion src/tauargus/model/Application.java
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ public static void main(String args[]) {
SystemUtils.writeLogbook("TauArgus version " + Application.getFullVersion() + " build " + Application.BUILD);
SystemUtils.writeLogbook("ArgusLib.jar version " + getArgusLibVersion());
SystemUtils.writeLogbook("TauRounder.dll version " + rounder.GetVersion());
SystemUtils.writeLogbook("hauhitas.dll version " + tauHitas.GetVersion());
SystemUtils.writeLogbook("TauHitas.dll version " + tauHitas.GetVersion());
SystemUtils.writeLogbook("TauArgusJava.dll version " + tauArgus.GetVersion());
SystemUtils.writeLogbook("--------------------------");
solverSelected = SystemUtils.getRegInteger("optimal", "solverused", SOLVER_SOPLEX);
Expand Down
5 changes: 5 additions & 0 deletions src/tauargus/model/ECDFGraphBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,11 @@ private XYDataset createDataset(double[] X, double increment) {
XYSeries series = new XYSeries("1");

series.add(0.0,0.0);
if (start_i == -1){ // i.e., X[0] > 0
series.add(X[0], 0);
start_i = 0;
}

for (int i=start_i;i<nX;i++){
if (X[i]<X[i+1]){
series.add(X[i], (i + 1)*increment);
Expand Down
6 changes: 3 additions & 3 deletions src/tauargus/model/TableSet.java
Original file line number Diff line number Diff line change
Expand Up @@ -2453,13 +2453,13 @@ private ECDF ECDFcounts(double arr[], double... breaks){
return ecdf;
}

// returns the index of LAST occurrence of a value <= x in arr[0..n-1]
// returns the index of LAST occurrence of a value <= x in a SORTED arr[0..n-1]
// between index low and index high
private static int last(double arr[], int low, int high, double x, int n)
{
if (high >= low)
if ((high >= low) && (x >= arr[0]))
{
int mid = low + (high - low)/2;
int mid = low + (high - low)/2;
//if (( mid == n-1 || x < arr[mid+1]) && Math.abs(arr[mid] - x) <= EPSILON)
if (( mid == n-1 || x < arr[mid+1]) && arr[mid]<=x)
return mid;
Expand Down

0 comments on commit 5f11fa3

Please sign in to comment.