parameters: (dom, a, l, r, start=0, end=-1)
return_statement: return A
docstring: Create tri-diagonal Toeplitz matrix.
docstring_summary: Create tri-diagonal Toeplitz matrix.
docstring_tokens: Create tri - diagonal Toeplitz matrix .
function: def triDiagToeplitz(dom, a, l, r, start=0, end=-1):
      """Create tri-diagonal Toeplitz matrix."""
      A = pg.matrix.SparseMapMatrix(dom, dom)
  
      if end == -1:
          end = dom
  
      for i in range(start, end):
          A.addVal(i, i, a)
          if i > start:
              A.addVal(i, i - 1, l)
  
          if i < end - 1:
              A.addVal(i, i + 1, r)
      return A
function_tokens: def triDiagToeplitz ( dom , a , l , r , start = 0 , end = - 1 ) : A = pg . matrix . SparseMapMatrix ( dom , dom ) if end == - 1 : end = dom for i in range ( start , end ) : A . addVal ( i , i , a ) if i > start : A . addVal ( i , i - 1 , l ) if i < end - 1 : A . addVal ( i , i + 1 , r ) return A