Skip to content

Commit

Permalink
Merge branch 'master' into highprecision
Browse files Browse the repository at this point in the history
  • Loading branch information
nickbattle committed Sep 12, 2023
2 parents aca87ba + d039db6 commit 4d585cd
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -318,15 +318,19 @@ public ValueSet caseRecordType(TCRecordType node, Integer limit)
// so that it will just exceed this.

int limit2 = 1;
int fcount = node.fields.size();

while (Math.pow(node.fields.size(), limit2) < limit)
if (fcount > 1)
{
limit2++;
while (Math.pow(fcount, limit2) < limit)
{
limit2++;
}
}

ValueSet records = new ValueSet();
List<ValueSet> fvalues = new Vector<ValueSet>(node.fields.size());
int[] fsizes = new int[node.fields.size()];
List<ValueSet> fvalues = new Vector<ValueSet>(fcount);
int[] fsizes = new int[fcount];
int f = 0;

for (TCField field: node.fields)
Expand Down Expand Up @@ -510,15 +514,19 @@ public ValueSet caseProductType(TCProductType node, Integer limit)
// so that it will just exceed this.

int limit2 = 1;
int tcount = node.types.size();

while (Math.pow(node.types.size(), limit2) < limit)
if (tcount > 1)
{
limit2++;
while (Math.pow(tcount, limit2) < limit)
{
limit2++;
}
}

ValueSet records = new ValueSet();
List<ValueSet> fvalues = new Vector<ValueSet>(node.types.size());
int[] fsizes = new int[node.types.size()];
List<ValueSet> fvalues = new Vector<ValueSet>(tcount);
int[] fsizes = new int[tcount];
int f = 0;

for (TCType field: node.types)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ public ValueSet caseRecordType(TCRecordType node, Integer limit)
{
if (done.contains(node))
{
// return new ValueSet(); // recursing
return new ValueSet(); // recursing
}

done.add(node);
Expand All @@ -335,15 +335,19 @@ public ValueSet caseRecordType(TCRecordType node, Integer limit)
// so that it will just exceed this.

int limit2 = 1;
int fcount = node.fields.size();

while (Math.pow(node.fields.size(), limit2) < limit)
if (fcount > 1)
{
limit2++;
while (Math.pow(fcount, limit2) < limit)
{
limit2++;
}
}

ValueSet records = new ValueSet();
List<ValueSet> fvalues = new Vector<ValueSet>(node.fields.size());
int[] fsizes = new int[node.fields.size()];
List<ValueSet> fvalues = new Vector<ValueSet>(fcount);
int[] fsizes = new int[fcount];
int f = 0;

for (TCField field: node.fields)
Expand Down Expand Up @@ -526,15 +530,19 @@ public ValueSet caseProductType(TCProductType node, Integer limit)
// so that it will just exceed this.

int limit2 = 1;
int tcount = node.types.size();

while (Math.pow(node.types.size(), limit2) < limit)
if (tcount > 1)
{
limit2++;
while (Math.pow(tcount, limit2) < limit)
{
limit2++;
}
}

ValueSet records = new ValueSet();
List<ValueSet> fvalues = new Vector<ValueSet>(node.types.size());
int[] fsizes = new int[node.types.size()];
List<ValueSet> fvalues = new Vector<ValueSet>(tcount);
int[] fsizes = new int[tcount];
int f = 0;

for (TCType field: node.types)
Expand Down

0 comments on commit 4d585cd

Please sign in to comment.