Macaulay2 » Documentation
Packages » PathSignatures :: Path
next | previous | forward | backward | up | index | toc

Path

Description

A polynomial path is a map $[0,1] \to \mathbb R^d$ whose coordinate functions are given by polynomials. A piecewise polynomial path is a concatenation of polynomial paths.

To create a polynomial path, use polyPath, which takes a list of polynomials as input. These can be given as elements of a commutative polynomial ring with one generator or directly in listForm.

i1 : R = QQ[t];
i2 : X = polyPath({t,2*t^2,3*t^3})

o2 = Path in 3-dimensional space with 1 polynomial segment:

            2    3
     {{t, 2t , 3t }}

o2 : Path
i3 : Y = polyPath({{({1},1)},{({2},2)},{({3},3)}})

o3 = Path in 3-dimensional space with 1 polynomial segment:

            2    3
     {{t, 2t , 3t }}

o3 : Path

While the polynomials must be chosen from a polynomial ring with one generator, the coefficient ring of the polynomials can be chosen arbitrarily.

i4 : R = QQ[a][t]; --QQ[a,t] will not work!
i5 : X = polyPath({t,2*a*t^2,3*a^2*t^3})

o5 = Path in 3-dimensional space with 1 polynomial segment:

              2    2 3
     {{t, 2a*t , 3a t }}

o5 : Path

An important special case of polynomial paths are linear paths. These can be constructed directly from their increment using linPath.

i6 : Y = linPath({2,3,4})

o6 = Path in 3-dimensional space with 1 polynomial segment:

     {{2t, 3t, 4t}}

o6 : Path

Paths can be concatenated using Path ** Path. This concatenation is formal: the new Path object encodes the polynomial pieces and their order, but no parametrization is chosen. The concatenation Path ** Path will automatically select a bigger coefficient ring for all polynomial pieces if an obvious choice is available.

i7 : Z = X ** Y

o7 = Path in 3-dimensional space with 2 polynomial segments:

              2    2 3
     {{t, 2a*t , 3a t }, {2t, 3t, 4t}}

o7 : Path

A piecewise linear path can be constructed directly from the increments of its segments using pwLinPath.

i8 : A = matrix {{1,2,3},{2,3,4},{4,5,6}};

              3       3
o8 : Matrix ZZ  <-- ZZ
i9 : W = pwLinPath(A)

o9 = Path in 3-dimensional space with 3 polynomial segments:

     {{t, 2t, 4t}, {2t, 3t, 5t}, {3t, 4t, 6t}}

o9 : Path

To read out the ambient dimension of a path, use getDimension(Path) or dim(Path). To get the pieces of the path in listForm use getPieces(Path). To get the coefficient ring of the coordinate polynomials, use getCoefficientRing(Path) or coefficientRing(Path). Finally, getNumberOfPieces(Path) returns the number of pieces of the path.

i10 : getDimension(Z) --The ambient dimension of the path

o10 = 3
i11 : getPieces(Z) --The polynomial pieces of the path, in listForm

                                          2
o11 = {{{({1}, 1)}, {({2}, 2a)}, {({3}, 3a )}}, {{({1}, 2)}, {({1}, 3)},
      -----------------------------------------------------------------------
      {({1}, 4)}}}

o11 : List
i12 : getCoefficientRing(Z) -- The coefficient ring of the polynomial components of the path

o12 = QQ[a]

o12 : PolynomialRing
i13 : getNumberOfPieces(Z) -- The number of polynomial pieces of the path

o13 = 2

To extract the pieces of a concatenated path one can use Path _ ZZ, Path _ List and Path _ Sequence.

i14 : Z_0

o14 = Path in 3-dimensional space with 1 polynomial segment:

               2    2 3
      {{t, 2a*t , 3a t }}

o14 : Path
i15 : Z2 = Z^2

o15 = Path in 3-dimensional space with 4 polynomial segments:

               2    2 3                         2    2 3
      {{t, 2a*t , 3a t }, {2t, 3t, 4t}, {t, 2a*t , 3a t }, {2t, 3t, 4t}}

o15 : Path
i16 : Z2_{0,-1}

o16 = Path in 3-dimensional space with 2 polynomial segments:

               2    2 3
      {{t, 2a*t , 3a t }, {2t, 3t, 4t}}

o16 : Path

When considering the set of paths modulo tree-like equivalence, concatenation turns it into a groupoid. Use Path ^ ZZ to compute powers and the inverse of a path in this groupoid. Note that the inverse of a path is just given by reversing its parametrization.

i17 : X^4

o17 = Path in 3-dimensional space with 4 polynomial segments:

               2    2 3           2    2 3           2    2 3           2    2 3
      {{t, 2a*t , 3a t }, {t, 2a*t , 3a t }, {t, 2a*t , 3a t }, {t, 2a*t , 3a t }}

o17 : Path
i18 : X^(-1)

o18 = Path in 3-dimensional space with 1 polynomial segment:

                2             2 3     2 2     2
      {{-t, 2a*t  - 4a*t, - 3a t  + 9a t  - 9a t}}

o18 : Path

See also

Functions and methods returning an object of class Path:

  • concatPath(Path,Path) -- see concatPath -- concatenation of paths
  • Path ** Path -- see concatPath -- concatenation of paths
  • linPath(List) -- see linPath -- constructor of single piece polynomial path
  • Path ^ ZZ
  • Path _ List
  • Path _ Sequence
  • Path _ ZZ
  • polyPath(List) -- see polyPath -- constructor of single piece polynomial path
  • pwLinPath(Matrix) -- see pwLinPath -- constructor of a piecewise linear path from a matrix
  • substitute(Path,Ring) -- changes the coefficient ring of a path

Methods that use an object of class Path:

  • coefficientRing(Path)
  • dim(Path)
  • getCoefficientRing(Path)
  • getDimension(Path)
  • getNumberOfPieces(Path)
  • getPieces(Path)
  • net(Path)
  • sig(Path,List) -- see sig -- compute the signature of a piecewise polynomial path.
  • sig(Path,NCRingElement) -- see sig -- compute the signature of a piecewise polynomial path.
  • sig(Path,ZZ) -- see sig -- compute the signature of a piecewise polynomial path.
  • sig(Path,ZZ,NCRing) -- see sig -- compute the signature of a piecewise polynomial path.

For the programmer

The object Path is a type, with ancestor classes MutableHashTable < HashTable < Thing.


The source of this document is in PathSignatures/documentation.m2:380:0.