Changeset 968ddc in git


Ignore:
Timestamp:
Mar 11, 2019, 6:07:33 PM (5 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', '8e0ad00ce244dfd0756200662572aef8402f13d5')
Children:
6c29eecfbf047db4b40d753db27927ecd270d83e
Parents:
5cceb108968680f9d49ff4570d6b0dd1ac9c5f80
Message:
fix: doc for VecField.lib
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/LIB/VecField.lib

    r5cceb1 r968ddc  
    298298
    299299proc applyVecField(VecField V,p,list #)
    300     "
    301     USAGE:  applyVecField(VecField V, poly/ideal p [,int n])
    302     RETURN: if p is a polynomial, return a polynomial V(p), if p is an ideal, the ideal V(p).
     300"
     301USAGE:  applyVecField(VecField V, poly/ideal p [,int n])
     302RETURN: if p is a polynomial, return a polynomial V(p), if p is an ideal, the ideal V(p).
    303303    If an optional n is given, only the parts of V up to and including degree n are
    304304    applied to p.
    305     EXAMPLE: example applyVecField
    306     "
     305EXAMPLE: example applyVecField
     306"
    307307{
    308308    int n = -1;
     
    362362
    363363proc changeCoordinates(VecField V, map psi)
    364     "
    365     USAGE:  changeCoordinates(vecField V, map psi), where psi is an algebra morphism
     364"
     365USAGE:  changeCoordinates(vecField V, map psi), where psi is an algebra morphism
    366366    k[x1,...,xn]->k[y1,...,ym] expressing the new basis in terms of the old.
    367     RETURN: A new vecfield in the new coordinates.
    368     NOTE:   the coordinate change necessitates inverting psi.
     367RETURN: A new vecfield in the new coordinates.
     368NOTE:   the coordinate change necessitates inverting psi.
    369369    The inversion will be correct up to the precision of V.
    370     EXAMPLE: example changeCoordinates
    371     "
     370EXAMPLE: example changeCoordinates
     371"
    372372{
    373373
     
    422422
    423423proc jordanVecField(VecField V)
    424     "
    425     USAGE:  jordanVecField(VecField V)
    426     RETURN: new vecfield W in coordinates s.t. W.lin is in Jordan normal
     424"
     425USAGE:  jordanVecField(VecField V)
     426RETURN: new vecfield W in coordinates s.t. W.lin is in Jordan normal
    427427    form.
    428     ASSUME: eigenvalues of V.lin in basefield.
    429     EXAMPLE: example jordanVecField
    430     "
     428ASSUME: eigenvalues of V.lin in basefield.
     429EXAMPLE: example jordanVecField
     430"
    431431{
    432432    list l = jordanbasis(V.lin); // l[1] is the transformation matrix
     
    458458
    459459proc diagonalizeVecFieldLin(list #)
    460     "
    461     USAGE:  diagonalizeVecFieldLin(list l), where l is a list of VecFields
    462     RETURN: list W of the same VecFields in new coords s.t. the linear parts are diagonal,
     460"
     461USAGE:  diagonalizeVecFieldLin(list l), where l is a list of VecFields
     462RETURN: list W of the same VecFields in new coords s.t. the linear parts are diagonal,
    463463    all in the same coordinates
    464     ASSUME: All linear parts of the entries of l are simultaneously diagonalizable.
    465     EXAMPLE: example diagonalizeVecFieldLin
    466     "
     464ASSUME: All linear parts of the entries of l are simultaneously diagonalizable.
     465EXAMPLE: example diagonalizeVecFieldLin
     466"
    467467{
    468468    list l = #;
     
    506506
    507507proc SaitoBase(VecField V)
    508     "
    509     USAGE:  SaitoBase(VecField V)
    510     RETURN: new VecField W in the base from [1] thm. 3.1, where semisimple and
     508"
     509USAGE:  SaitoBase(VecField V)
     510RETURN: new VecField W in the base from [1] thm. 3.1, where semisimple and
    511511    nilpotent components are easily read off.
    512     NOTE:   the algorithm requires inversions of algebra morphisms. These will be
     512NOTE:   the algorithm requires inversions of algebra morphisms. These will be
    513513    exact to the precision of V. Warning: The algorithm assumes
    514514    standard coordinates. If V is not given in standard coordinates, it will
     
    520520    Note that weight vectors only take Int64,
    521521    making the algorithm fail for very large entries in V.vec.
    522     EXAMPLE: example SaitoBase
    523     "
     522EXAMPLE: example SaitoBase
     523"
    524524{
    525525
     
    619619
    620620    return(W);
    621 
    622 
    623621}
    624622example
     
    638636
    639637proc diagonalizeVecField(list #)
    640     "
    641     USAGE:  diagonalizeVecField(list l), l a list of VecFields
    642     RETURN: list of VecFields W such that they are all simultaneously diagonal.
    643     ASSUME: all input VecFields have to be simultaneously diagonalizable.
    644     NOTE:   the algorithm requires inversions of algebra morphisms. These will be
     638"
     639USAGE:  diagonalizeVecField(list l), l a list of VecFields
     640RETURN: list of VecFields W such that they are all simultaneously diagonal.
     641ASSUME: all input VecFields have to be simultaneously diagonalizable.
     642NOTE:   the algorithm requires inversions of algebra morphisms. These will be
    645643    exact to the precision of l[1]. Warning: The algorithm assumes
    646644    standard coordinates. If V is not given in standard coordinates, it will
     
    652650    Note that weight vectors only take Int64,
    653651    making the algorithm fail for very large entries in V.vec.
    654     EXAMPLE: example diagonalizeVecField
    655     "
     652EXAMPLE: example diagonalizeVecField
     653"
    656654{
    657655    // note: comments are sparse in this procedure as it is essentially the same as SaitoBase(),
     
    821819
    822820proc vecFieldToMatrix(VecField V,ideal W)
    823     "
    824     USAGE: vecFieldToMatrix(VecField V,ideal W)
    825     RETURN: the matrix representation of V restricted to span(W), in the basis specified by W.
    826     "
    827     EXAMPLE: example vecFieldToMatrix
     821"
     822USAGE: vecFieldToMatrix(VecField V,ideal W)
     823RETURN: the matrix representation of V restricted to span(W), in the basis specified by W.
     824EXAMPLE: example vecFieldToMatrix
     825"
    828826{
    829827    matrix D[ncols(W)][ncols(W)]; // this will hold the matrix representation
     
    875873
    876874proc    decomposeVecField(list #)
    877     "
    878     USAGE:  decomposeVecField(VecField V) or decomposeVecField(list s), s a list of VecFields
    879     RETURN: list l containing two VecFields, where l[1] is the semisimple part of V, l[2] the
     875"
     876USAGE:  decomposeVecField(VecField V) or decomposeVecField(list s), s a list of VecFields
     877RETURN: list l containing two VecFields, where l[1] is the semisimple part of V, l[2] the
    880878    nilpotent part. If called with a list, l[2n-1] is the semisimple part of the
    881879    n-th VecField, l[2n] its nilpotent part.
    882     ASSUME: The algorithm assumes standard coordinates. If V is not given in standard
     880ASSUME: The algorithm assumes standard coordinates. If V is not given in standard
    883881    coordinates, it will be converted to standard coordinates, but not converted back
    884882    at the end, so the resulting transformation is from standard coordinates to the
    885883    new coordinates. If you want the entire transformation from your original coordinates
    886884    to the new ones, add the inverse of your original coordinate transformation manually.
    887     EXAMPLE: example decomposeVecField
    888     "
     885EXAMPLE: example decomposeVecField
     886"
    889887{
    890888    if(size(#) == 1)
     
    934932
    935933proc invertAlgebraMorphism(p,int n)
    936     "
    937     USAGE: invertAlgebraMorphism(map p,int n), where p is an algebra
     934"
     935USAGE: invertAlgebraMorphism(map p,int n), where p is an algebra
    938936    morphism k[x1,...,xn]->k[y1,...,ym],
    939937    or invertAlgebraMorphism(ideal p,int n) if you represent the map as an ideal
    940     RETURN: the inverse of p mod (maxideal)^n.
     938RETURN: the inverse of p mod (maxideal)^n.
    941939    If n=-1, try for infinite precision. If input was an ideal, return an ideal.
    942     NOTE: the algorithm used is described in [1], chapter 3.2
    943     EXAMPLE: example invertAlgebraMorphism
    944     "
     940NOTE: the algorithm used is described in [1], chapter 3.2
     941EXAMPLE: example invertAlgebraMorphism
     942"
    945943{
    946944    if(typeof(p) == "map")
     
    10701068
    10711069proc diagonalizeMatrixSimul(list l)
    1072     "
    1073     USAGE: diagonalizeMatrixSimul(list l), where l is a list of quadratic matrices
     1070"
     1071USAGE: diagonalizeMatrixSimul(list l), where l is a list of quadratic matrices
    10741072    of same dimensions
    1075     RETURN: trafo matrix U s.t. U*A*inv(U) is diagonal for each A in l
    1076     ASSUME: matrices are simultaneously diagonalizable, nvars(basering)>=dimension of the matrices
    1077     EXAMPLE: example diagonalizeMatrixSimul
    1078     "
     1073RETURN: trafo matrix U s.t. U*A*inv(U) is diagonal for each A in l
     1074ASSUME: matrices are simultaneously diagonalizable, nvars(basering)>=dimension of the matrices
     1075EXAMPLE: example diagonalizeMatrixSimul
     1076"
    10791077{
    10801078    if(size(l)==0)
     
    11891187
    11901188static proc homogeneousPolyToVec(poly p,ideal W)
    1191     "
    1192     USAGE: homogeneousPolyToVec(poly p, ideal W)
    1193     ASSUME: p homogeneous and contained in the space spanned by W,
     1189"
     1190USAGE: homogeneousPolyToVec(poly p, ideal W)
     1191ASSUME: p homogeneous and contained in the space spanned by W,
    11941192    e.g. p quasihomogeneous and W is the result of weaklyHomogeneousSpace(...)
    1195     RETURN: nx1 matrix containing the coefficients of p in the order given by W
    1196     "
     1193RETURN: nx1 matrix containing the coefficients of p in the order given by W
     1194"
    11971195{
    11981196    matrix v[ncols(W)][1];
     
    12121210
    12131211static proc vecToHomogeneousPoly(matrix v,ideal W)
    1214     "
    1215     USAGE: vecToHomogeneousPoly(vec v,ideal W)
    1216     ASSUME: v is a nx1 matrix, where n=ncols(W)
    1217     RETURN: the polynomial in W whose coefficients are v (W represents the basis)
    1218     "
     1212"
     1213USAGE: vecToHomogeneousPoly(vec v,ideal W)
     1214ASSUME: v is a nx1 matrix, where n=ncols(W)
     1215RETURN: the polynomial in W whose coefficients are v (W represents the basis)
     1216"
    12191217{
    12201218    poly p;
     
    12271225
    12281226static proc weaklyHomogeneousSpace(int n, int lambda, intvec weights)
    1229     "
    1230     USAGE: weaklyHomogeneousSpace(int n, int lambda, intvec weights)
    1231     RETURN: ideal of all monomials which are homogeneous of degree n
     1227"
     1228USAGE: weaklyHomogeneousSpace(int n, int lambda, intvec weights)
     1229RETURN: ideal of all monomials which are homogeneous of degree n
    12321230    AND weakly homogeneous of degree lambda with the given weights
    1233     ASSUME: weights has exactly as many entries as nvars(basering)
    1234     NOTE: if no such monomials exist, the zero ideal is returned.
     1231ASSUME: weights has exactly as many entries as nvars(basering)
     1232NOTE: if no such monomials exist, the zero ideal is returned.
    12351233    The monomials in the returned ideal are sorted according to the basering's ordering.
    1236     "
     1234"
    12371235{
    12381236    ideal H = maxideal(n); // contains all homogeneous monomials of degree n
     
    12661264
    12671265static proc weaklyHomogeneousSpaceComplement(int n, int lambda, intvec weights)
    1268     "
    1269     USAGE: weaklyHomogeneousSpaceComplement(int n, int lambda, intvec weights)
    1270     RETURN: ideal of all monomials which are homogeneous of degree n
     1266"
     1267USAGE: weaklyHomogeneousSpaceComplement(int n, int lambda, intvec weights)
     1268RETURN: ideal of all monomials which are homogeneous of degree n
    12711269    but NOT weakly homogeneous of degree lambda with the given weights
    1272     ASSUME: size(weights)==nvars(basering)
    1273     NOTE: if no such monomials exist, the zero ideal is returned.
     1270ASSUME: size(weights)==nvars(basering)
     1271NOTE: if no such monomials exist, the zero ideal is returned.
    12741272    The monomials in the returned ideal are sorted according to the ring ordering.
    1275     "
     1273"
    12761274{
    12771275    // for documentation see weaklyHomogeneousSpace();
     
    13011299
    13021300static proc extendMatrix(matrix A,int rows,int cols)
    1303     "
    1304     USAGE: extendMatrix(matrix A,int rows,int cols)
    1305     RETURN: A extended with zeroes s.t. it is now a rowsxcols matrix
    1306     ASSUME: nrows(A) <= rows, ncols(A) <= cols
    1307     "
     1301"
     1302USAGE: extendMatrix(matrix A,int rows,int cols)
     1303RETURN: A extended with zeroes s.t. it is now a rowsxcols matrix
     1304ASSUME: nrows(A) <= rows, ncols(A) <= cols
     1305"
    13081306{
    13091307    matrix B[rows][cols];
     
    13191317
    13201318static proc eqIdeal(ideal I,ideal J)
    1321     "
    1322     USAGE: eqIdeal(ideal I, ideal J)
    1323     RETURN: 1 if ideals are equal, 0 otherwise
    1324     "
     1319"
     1320USAGE: eqIdeal(ideal I, ideal J)
     1321RETURN: 1 if ideals are equal, 0 otherwise
     1322"
    13251323{
    13261324    J = std(J);
     
    13421340
    13431341static proc eqMap(map f, map g)
    1344     "
    1345     USAGE: eqMap(map f,map g)
    1346     ASSUME: domain of f,g are the same, codomain of f, g are the same, domain is current basering
    1347     RETURN: 1 if maps are equal, 0 otherwise
    1348     "
     1342"
     1343USAGE: eqMap(map f,map g)
     1344ASSUME: domain of f,g are the same, codomain of f, g are the same, domain is current basering
     1345RETURN: 1 if maps are equal, 0 otherwise
     1346"
    13491347{
    13501348    // note: maps are equal iff they are equal on each ring variable
     
    13641362
    13651363static proc identityMap() // this does not yet exist in SINGULAR ...
    1366     "
    1367     USAGE: identityMap()
    1368     RETURN: a map basering -> basering which is the identity map
    1369     "
     1364"
     1365USAGE: identityMap()
     1366RETURN: a map basering -> basering which is the identity map
     1367"
    13701368{
    13711369    ideal P = maxideal(1);
     
    13751373
    13761374static proc pvector()
    1377     "
    1378     USAGE: pvector()
    1379     RETURN: a nvars x 1 matrix consisting of the ring variables in order
    1380     "
     1375"
     1376USAGE: pvector()
     1377RETURN: a nvars x 1 matrix consisting of the ring variables in order
     1378"
    13811379{
    13821380    ideal I = maxideal(1);
     
    14001398
    14011399static proc mirrorMatrixVertictal(matrix m)
    1402     "
    1403     USAGE: mirrorMatrixVertical(matrix m)
    1404     RETURN: m mirrored about the horizontal axis
    1405     "
     1400"
     1401USAGE: mirrorMatrixVertical(matrix m)
     1402RETURN: m mirrored about the horizontal axis
     1403"
    14061404{
    14071405    matrix n[nrows(m)][ncols(m)];
     
    14371435
    14381436static proc homogeneousPart(poly f, int n)
    1439     "
    1440     USAGE: homogeneousPart(poly f, int n)
    1441     RETURN: the homogeneous part of f of degree n
    1442     "
     1437"
     1438USAGE: homogeneousPart(poly f, int n)
     1439RETURN: the homogeneous part of f of degree n
     1440"
    14431441{
    14441442    poly g = jet(f,n);
     
    14601458
    14611459static proc diagEntries(matrix A)
    1462     "
    1463     USAGE: diagEntries(matrix A)
    1464     ASSUME: A is quadratic
    1465     RETURN: nx1 matrix containing the diagonal entries of A
    1466     "
     1460"
     1461USAGE: diagEntries(matrix A)
     1462ASSUME: A is quadratic
     1463RETURN: nx1 matrix containing the diagonal entries of A
     1464"
    14671465{
    14681466    matrix v[ncols(A)][1];
     
    14751473
    14761474static proc productOfRingVars()
    1477     "
    1478     USAGE: productOfRingVars()
    1479     RETURN: poly which is the product of all ring variables
    1480     "
     1475"
     1476USAGE: productOfRingVars()
     1477RETURN: poly which is the product of all ring variables
     1478"
    14811479{
    14821480    poly p = 1;
     
    14901488
    14911489static proc vecToIntvec(matrix v)
    1492     "
    1493     USAGE: vecToIntVec(matrix v)
    1494     RETURN: an intvec containing the entries of v
    1495     ASSUME: v is mx1 and contains only integers
    1496     "
     1490"
     1491USAGE: vecToIntVec(matrix v)
     1492RETURN: an intvec containing the entries of v
     1493ASSUME: v is mx1 and contains only integers
     1494"
    14971495{
    14981496    intvec ret = (0:nrows(v));
     
    15051503
    15061504static proc matrixRow(matrix m, int n)
    1507     "
    1508     USAGE: matrixRow(matrix m, int n)
    1509     RETURN: the n-th row of m (as a matrix with one row). If n>nrows(m), returns a zero row.
    1510     "
     1505"
     1506USAGE: matrixRow(matrix m, int n)
     1507RETURN: the n-th row of m (as a matrix with one row). If n>nrows(m), returns a zero row.
     1508"
    15111509{
    15121510    matrix ret[1][ncols(m)];
     
    15231521
    15241522static proc matrixCol(matrix m, int n)
    1525     "
    1526     USAGE: matrixCol(matrix m, int n)
    1527     RETURN: the n-th column of m (as a matrix with one column).
     1523"
     1524USAGE: matrixCol(matrix m, int n)
     1525RETURN: the n-th column of m (as a matrix with one column).
    15281526    If n>ncols(m), returns a zero column.
    1529     "
     1527"
    15301528{
    15311529    matrix ret[nrows(m)][1];
Note: See TracChangeset for help on using the changeset viewer.