[top][index]
search for:

map(Module,RingElement) -- make a map

Synopsis:

  • Function: map -- make a map
  • Input:
  • an instance of class Module.
  • an instance of class RingElement.
  • Output:
  • an instance of class Matrix.
  • Optional arguments :
  • map(..., Degree)
  • map(..., DegreeMap => ...)
  • map(M,r) -- construct the map from M to itself which is provided by scalar multiplication by the ring element r.

    i1 : R = ZZ/101[x]

    o1 = R

    o1 : PolynomialRing
    i2 : map(R^2,x)

    o2 = | x 0 |
         | 0 x |

                 2       2
    o2 : Matrix R  <--- R

    See also:

  • map -- make a map
  • matrix -- make a matrix
  • Code:

         -- ../../../Macaulay2/m2/matrix.m2:546-552
         map(Module,RingElement) := Matrix => options -> (M,r) -> (
              R := ring M;
              try r = r + R#0
              else error "encountered scalar of unrelated ring";
              if r == 0 then map(M,M,0)
              else if r == 1 then map(M,1)
              else r * (map(M,1)))

    [top][index]
    search for: