ajdmom.poly.Poly

class ajdmom.poly.Poly(dict=None, /, **kwargs)[source]

Class for different versions of “Polynomial”

Poly.keyfor

Indicating the purpose for each key component, a tuple of str.

Poly.add_keyval(key, val)

Insert a new key-val or add val to the existing key.

Poly.clear()

Poly.const_one()

Constant equivalent to 1 in real numbers.

Poly.const_zero()

Constant equivalent to 0 in real numbers.

Poly.copy()

Poly.fromkeys(iterable[, value])

Poly.get(k[,d])

Poly.is_exact_type(other)

Check whether the supplied argument is a poly having the same keyfor.

Poly.items()

Poly.keys()

Poly.merge(other)

Merge another poly having the same keyfor attribute.

Poly.mul_poly(other, keyIndexes, keyfor)

Multiply by another poly of different type and return a new poly.

Poly.pop(k[,d])

If key is not found, d is returned if given, otherwise KeyError is raised.

Poly.popitem()

as a 2-tuple; but raise KeyError if D is empty.

Poly.remove_zero()

Remove any item having value 0.

Poly.set_keyfor(names)

Set the keyfor attribute for the poly.

Poly.setdefault(k[,d])

Poly.update([E, ]**F)

If E present and has a .keys() method, does: for k in E.keys(): D[k] = E[k] If E present and lacks .keys() method, does: for (k, v) in E: D[k] = v In either case, this is followed by: for k, v in F.items(): D[k] = v

Poly.values()

Poly.write_to_csv(filename)

Write the poly to a csv file with the keyfor as the title line.

Poly.write_to_txt(filename)

Write the poly to a txt file with the keyfor as the title line.