arithmetic/src/algebra/polynomial/polynomial.tmpl


%
%  Quake functions to instantiate operations on generic polynomials.
%

readonly proc Polynomial (nm, impl, rfield) is
  local base     = nm & "Polynomial"
  local instimpl = base & impl
  local vfield   = nm & "Vector"
  local vrep     = nm & "VectorRep"
  build_generic_intf (base,     "Polynomial",        [rfield, vfield, instimpl], VISIBLE)
  build_generic_impl (base,     "Polynomial",        [rfield])
  build_generic_intf (instimpl, "Polynomial" & impl, [rfield, vfield], VISIBLE)
  build_generic_impl (instimpl, "Polynomial" & impl, [rfield, vrep])
end

readonly proc PolynomialFmtLex (nm, rfield) is
  local pfmt   = nm & "PolynomialFmtLex"
  local rfmt   = nm & "FmtLex"
  local vfmt   = nm & "VectorFmtLex"
  local pfield = nm & "Polynomial"
  build_generic_intf (pfmt, "PolynomialFmtLex", [        rfmt, pfield], VISIBLE)
  build_generic_impl (pfmt, "PolynomialFmtLex", [rfield, rfmt, vfmt  ])
end