Skip to content

Commit 07fd055

Browse files
committed
fix many typos
1 parent 6dbf7f0 commit 07fd055

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+357
-367
lines changed

ChangeLog

+123-129
Large diffs are not rendered by default.

EXAMPLES/cubes/makeCube.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ struct QuickFraction
3131

3232
/**
3333
* Makes a cube, [0, scale]^n, as a latte facet file.
34-
* @parm filename: output file name
35-
* @parm dim: dim = n from above.
36-
* @parm scale: we scale the unit cube.
34+
* @param filename: output file name
35+
* @param dim: dim = n from above.
36+
* @param scale: we scale the unit cube.
3737
*/
3838
void makeCubeFile(const char *fileName, const long &dim, const QuickFraction& scale)
3939
{

README-mpl-files

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ code/maple/m-knapsack.mpl: top knapsack Maple code
5757

5858
--- was the same as $PISA_PAPERS/knapsack/moreKnapsacks/knapsackwithdualdec.14.04.2012.mpl
5959

60-
done: Now replaced by the better verion from https://www.math.ucdavis.edu/~latte/software/packages/m-knapsack.mpl
60+
done: Now replaced by the better version from https://www.math.ucdavis.edu/~latte/software/packages/m-knapsack.mpl
6161

6262
code/latte/top-ehrhart/TopEhrhart_lib.mpl: the SL method for finding top Ehrhart coefficients
6363

code/latte/ConeInfo.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,7 @@ ConeInfo::ConeInfo (vec_ZZ *cost, listCone *listCone_pointer, int numOfVars)
521521
Coefficient *= -1;
522522

523523
S_Values[i] *= -1;
524-
// sign is the sign of the orginal dot product
524+
// sign is the sign of the original dot product
525525
signs[i] = 1;
526526

527527
}
@@ -1374,7 +1374,7 @@ int ConeInfo::Calculate_Integral_Point (vec_ZZ &Temp_Vector)
13741374
{
13751375
for(int j = 0; j < Number_of_Variables; j++)
13761376
{
1377-
// sign[] is the sign of the orginal dot product with the cost
1377+
// sign[] is the sign of the original dot product with the cost
13781378
Temp_Vector[j] -= signs[i] * temp->first[j] * temp_coefficients[i];
13791379
}
13801380
temp = temp->rest;

code/latte/Makefile.am

+1-1
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ ConvertCDDextToLatte_LDADD = $(LDADD)
244244

245245

246246
#Run ./valuation/test/integrateHyperrectangleTest.sh
247-
# to start a maple script that will test integration of polynomials over rectangles in many dimentions.
247+
# to start a maple script that will test integration of polynomials over rectangles in many dimensions.
248248
check_PROGRAMS += test-hyperrectangle-integration
249249
test_hyperrectangle_integration_SOURCES = valuation/test/testIntegrationHyperrectanglesDriver.cpp
250250

code/latte/buildPolytopes/BuildPolytope.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ void BuildPolytope::addPoint(vector<mpq_class> onePoint)
5353
* The center command keeps important properties like vertices and facets, but some are
5454
* lost like SIMPLE and SIMPLICIAL.
5555
*
56-
* The origional un-centered polytope is lost. Also, we do not automatically re-read vertex and facet information.
56+
* The original un-centered polytope is lost. Also, we do not automatically re-read vertex and facet information.
5757
*/
5858
void BuildPolytope::centerPolytope()
5959
{

code/latte/integration/benchmark.mpl

+6-6
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@ read("integration/createLinear.mpl"):
1818
# A linear forms is called alpha, it is represented by a vector in Q^d.
1919
# A monomial m is a list of d integers
2020
# A polynomial represented in a sparse way;
21-
# Exemple x*y^2+2*x^2 with be given as a list of lists [[1,[1,2]],[2,[2,0]]. Each list represents a monomial with his coefficients.
21+
# Example x*y^2+2*x^2 with be given as a list of lists [[1,[1,2]],[2,[2,0]]. Each list represents a monomial with his coefficients.
2222
# Thus a sparse polynomial is represented as a list of lists.
2323
#
2424
# .
2525
#
2626
# Simplex and multiplicities.
2727
#
28-
# INPUT: d an integer, S list of d+1 lists of lenght d, alpha: list of lenght d .
28+
# INPUT: d an integer, S list of d+1 lists of length d, alpha: list of length d .
2929
# OUTPUT: set of lists {[a_S], [m_S]}
3030
# MATH: S a simplex of dimension d+1, alpha a linear form, m_S is the list of the number of vertices S where <\alpha,S> = a_S.
3131
#
@@ -136,7 +136,7 @@ L:=[seq([j],j=0..m[1])];fi;
136136
newL;
137137
end:
138138
# INPUT: m a list of integers, coe a number
139-
# OUTPUT: a list of lists of lenght nops(m)
139+
# OUTPUT: a list of lists of length nops(m)
140140
# MATH: The list $m$ represents the monomial x^m=x_1^{m[1]}x_2^{m[2]}\cdots x_d^{m[d].
141141
# The output is a list of lists. Each element in the list represents a linear form ([1,2]=x+2y). The output exausts all the linear form with exponents M=m[1]+..+m[d] which appear when expressing x^m as linear combinations of linear form with exponent M. The first element is the coefficient multiplied by coe;
142142
list_and_coeff_for_monome:=proc(m,coe) local M,L,out:
@@ -157,9 +157,9 @@ out;
157157
end:
158158
##integral_monome_via_waring([[0,0],[0,1],[1,0]],2,[9,2]);
159159
# Integral of a polynomial via Waring.
160-
# We give a polynomial in a sparse way; Exemple x*y^2+2*x^2 with be given as a list of lists [[1,[1,2]],[2,[2,0]]. Each list represents a monomial with his coefficients.
160+
# We give a polynomial in a sparse way; Example x*y^2+2*x^2 with be given as a list of lists [[1,[1,2]],[2,[2,0]]. Each list represents a monomial with his coefficients.
161161
# We start by cleaning the sets for example we replace [[1,[1,2]],[1,[1,2]] by [2,[1,2]];
162-
# Input L; a list of lists [[a,alpha],[b,beta],...]. here a is a number, alpha is a list. The ouptput is
162+
# Input L; a list of lists [[a,alpha],[b,beta],...]. here a is a number, alpha is a list. The output is
163163
# a set of lists.
164164
# If alpha=beta, we replace by [a+b,alpha]; if a=0 we skip;
165165
# The input is a list L of lists [a,\alpha] where a is a number. The output is of the same kind.
@@ -187,7 +187,7 @@ od;
187187
Y;
188188
end:
189189
# The input is a simplex S, d the dimension, sparse_poly a sparse polynomial.
190-
# The ouput is a number; the integral over S of the polynomial.
190+
# The output is a number; the integral over S of the polynomial.
191191
integral_via_waring:=proc(S,d,sparse_poly) local output,i, L ;output:=0;
192192
L:=list_integral_via_waring(sparse_poly);
193193
for i from 1 to nops(L) do

code/latte/integration/burstTrie.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,6 @@ class BurstTrie
349349

350350
friend class BTrieIterator<T, S> ;
351351
private:
352-
S* range; //S can be a class or a primitve
352+
S* range; //S can be a class or a primitive
353353
trieElem *firstElem; //first element in the trie
354354
}; //BurstTrie

code/latte/integration/integrationTestsLib.mpl

+6-6
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,14 @@ read("integration/createLinear.mpl"):
3636
# A linear forms is called alpha, it is represented by a vector in Q^d.
3737
# A monomial m is a list of d integers
3838
# A polynomial represented in a sparse way;
39-
# Exemple x*y^2+2*x^2 with be given as a list of lists [[1,[1,2]],[2,[2,0]]. Each list represents a monomial with his coefficients.
39+
# Example x*y^2+2*x^2 with be given as a list of lists [[1,[1,2]],[2,[2,0]]. Each list represents a monomial with his coefficients.
4040
# Thus a sparse polynomial is represented as a list of lists.
4141
#
4242
# .
4343
#
4444
# Simplex and multiplicities.
4545
#
46-
# INPUT: d an integer, S list of d+1 lists of lenght d, alpha: list of lenght d .
46+
# INPUT: d an integer, S list of d+1 lists of length d, alpha: list of length d .
4747
# OUTPUT: set of lists {[a_S], [m_S]}
4848
# MATH: S a simplex of dimension d+1, alpha a linear form, m_S is the list of the number of vertices S where <\alpha,S> = a_S.
4949
#
@@ -154,7 +154,7 @@ L:=[seq([j],j=0..m[1])];fi;
154154
newL;
155155
end:
156156
# INPUT: m a list of integers, coe a number
157-
# OUTPUT: a list of lists of lenght nops(m)
157+
# OUTPUT: a list of lists of length nops(m)
158158
# MATH: The list $m$ represents the monomial x^m=x_1^{m[1]}x_2^{m[2]}\cdots x_d^{m[d].
159159
# The output is a list of lists. Each element in the list represents a linear form ([1,2]=x+2y). The output exausts all the linear form with exponents M=m[1]+..+m[d] which appear when expressing x^m as linear combinations of linear form with exponent M. The first element is the coefficient multiplied by coe;
160160
list_and_coeff_for_monome:=proc(m,coe) local M,L,out:
@@ -175,9 +175,9 @@ out;
175175
end:
176176
##integral_monome_via_waring([[0,0],[0,1],[1,0]],2,[9,2]);
177177
# Integral of a polynomial via Waring.
178-
# We give a polynomial in a sparse way; Exemple x*y^2+2*x^2 with be given as a list of lists [[1,[1,2]],[2,[2,0]]. Each list represents a monomial with his coefficients.
178+
# We give a polynomial in a sparse way; Example x*y^2+2*x^2 with be given as a list of lists [[1,[1,2]],[2,[2,0]]. Each list represents a monomial with his coefficients.
179179
# We start by cleaning the sets for example we replace [[1,[1,2]],[1,[1,2]] by [2,[1,2]];
180-
# Input L; a list of lists [[a,alpha],[b,beta],...]. here a is a number, alpha is a list. The ouptput is
180+
# Input L; a list of lists [[a,alpha],[b,beta],...]. here a is a number, alpha is a list. The output is
181181
# a set of lists.
182182
# If alpha=beta, we replace by [a+b,alpha]; if a=0 we skip;
183183
# The input is a list L of lists [a,\alpha] where a is a number. The output is of the same kind.
@@ -205,7 +205,7 @@ od;
205205
Y;
206206
end:
207207
# The input is a simplex S, d the dimension, sparse_poly a sparse polynomial.
208-
# The ouput is a number; the integral over S of the polynomial.
208+
# The output is a number; the integral over S of the polynomial.
209209
integral_via_waring:=proc(S,d,sparse_poly) local output,i, L ;output:=0;
210210
L:=list_integral_via_waring(sparse_poly);
211211
for i from 1 to nops(L) do

code/latte/integration/newIntegration.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ void convertToSimplex(simplexZZ &mySimplex, string line)
8585
/**
8686
* Integrate a simplex over a linear form.
8787
*
88-
* @parm a, b: ouput parameters, we return a/b += integration answer.
88+
* @parm a, b: output parameters, we return a/b += integration answer.
8989
* @parm l: a linear form.
9090
* @parm mySimplex: integer simplex
9191
* @parm m: the power the linear form is raised to
@@ -340,7 +340,7 @@ RationalNTL integrateLinFormProducts(PolyIterator<RationalNTL, ZZ>* it, const si
340340
++i;
341341
lenM += temp->degree; //add the power
342342

343-
coef *= temp->coef; // M1! M2! ... MD! * (coefficents ^ powers)
343+
coef *= temp->coef; // M1! M2! ... MD! * (coefficients ^ powers)
344344

345345
monomialCount *= (temp->degree+1); //monomialCount = number of monomials (m1, ..., md) <= (deg1, ..., degD).
346346
}
@@ -364,7 +364,7 @@ RationalNTL integrateLinFormProducts(PolyIterator<RationalNTL, ZZ>* it, const si
364364
//ok, now we just need to find the coeff of M in the polynomial expansion.
365365

366366

367-
vec_ZZ tVector; //the coefficent vector of ( 1- a_1t_1 - ... - a_Dt_D) (we don't save the leading 1)
367+
vec_ZZ tVector; //the coefficient vector of ( 1- a_1t_1 - ... - a_Dt_D) (we don't save the leading 1)
368368
int* counter; //current power n
369369
tVector.SetLength(productCount);
370370
counter = new int[productCount];

code/latte/integration/residue.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ void computeResidueLawrence(const int d, const int M, const LinearLawrenceIntegr
349349
continue; //really, at this point, the power should not be zero. It could be negative if this term is a repeat or positive.
350350
if (coneTerm.rayDotProducts[i].epsilon == 0)
351351
{
352-
//cout << "factored anoter term: " << coneTerm.rayDotProducts[i].constant << "^" << coneTerm.rayDotProducts[i].power << endl;
352+
//cout << "factored another term: " << coneTerm.rayDotProducts[i].constant << "^" << coneTerm.rayDotProducts[i].power << endl;
353353
de *= Power_ZZ(coneTerm.rayDotProducts[i].constant, coneTerm.rayDotProducts[i].power);
354354
continue;
355355
}//factor the constant out: (a + 0*e)^power.

code/latte/interpolation/PolynomialInterpolation.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ PolynomialInterpolation::PolynomialInterpolation(unsigned int degree):
3636

3737
//A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
3838

39-
//sets matrix(toRow,:) = matirx(toRow,:) - value * matrix(fromRow, :) (matlab syntax)
39+
//sets matrix(toRow,:) = matrix(toRow,:) - value * matrix(fromRow, :) (matlab syntax)
4040
void PolynomialInterpolation::addMultRows(mpq_class &value, int fromRow, int toRow)
4141
{
4242
value.canonicalize();
@@ -130,11 +130,11 @@ void PolynomialInterpolation::GE()
130130

131131
if(matrix[perfectRow][currentColumn] == 0 )
132132
{
133-
cerr << "GE:assert matirx[perfectRow][currentColumn] != 0" << endl;
133+
cerr << "GE:assert matrix[perfectRow][currentColumn] != 0" << endl;
134134
//cout << "perfectRow = " << perfectRow << ", curCol=" << currentColumn << endl;
135135
//cout << "row, col size=" << rowSize << ", " << colSize << endl;
136136
//printMatrix();
137-
//cout << "origional matirx\n";
137+
//cout << "original matrix\n";
138138
//copy.printMatrix();
139139
exit(1);
140140
}

code/latte/interpolation/testDriver.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ bool isReduced(mpq_class r)
8989
}//isReduced
9090

9191

92-
/* Randomly generate polynomials, and create the coefficient matirx. Then solves the matrix and
93-
* makes sure the returnd answer is the same as the polynomial we randomly generated.
92+
/* Randomly generate polynomials, and create the coefficient matrix. Then solves the matrix and
93+
* makes sure the returned answer is the same as the polynomial we randomly generated.
9494
*
9595
* The polynomials have a max degree of MAXDEG and each coefficient is negative with prob. PNEG..
9696
* and coefficients are limited by MAXCOEF.
@@ -114,7 +114,7 @@ void test1Poly()
114114
;
115115

116116
PolynomialInterpolation p(degree);
117-
PolynomialInterpolation pCopy(degree); //pCopy is printed as the origional matrix if there is an error.
117+
PolynomialInterpolation pCopy(degree); //pCopy is printed as the original matrix if there is an error.
118118
vector<mpq_class> allX(degree); //keep track of points added so far.
119119

120120
//insert degree+1 many unique points (x, f(x)).

0 commit comments

Comments
 (0)