FactoredFunctions2(R, S)
fr.spad line 635 [edit on github]
FactoredFunctions2 contains functions that involve factored objects whose underlying domains may not be the same. For example, map might be used to coerce an object of type Factored(Integer) to Factored(Complex(Integer)).
- map: (R -> S, Factored R) -> Factored S
map(fn, u)
is used to apply the function userfun{fn
} to every factor of spadvar{u
}. The new factored object will have all its information flags set to “nil”. This function is used, for example, to coerce every factor base to another type.
- map_preserving: (R -> S, Factored R) -> Factored S
map_preserving(fn, u)
is used to apply the function userfun{fn
} to every factor of spadvar{u
}. The new factored object will have the same flags as original.