httk.core.vectors.vector_surd_view

A view presenting any vector backend as a SurdVector (the exact squarefree-radical representation).

Classes

VectorSurdView

A view presenting an underlying vector backend as an exact

Module Contents

class httk.core.vectors.vector_surd_view.VectorSurdView(obj, **hints)

Bases: httk.core.vectors.vector_view.VectorView, httk.core.vectors.surdvector.SurdVector

A view presenting an underlying vector backend as an exact SurdVector.

This view is a genuine SurdVector, so it exposes the full exact surd algebra (det/inv/*/length/...). It is built lazily on first access, following the immutable-subclass pattern of :class:`~httk.core.vectors.vector_frac_view.VectorFracView`: from a surd backend it adopts the exact SurdVector directly, and from a frac/native/numpy backend it embeds the backend's exact rational ``fractions at radicand 1 — exactly, since every rational is a surd.

(numpy values are binary rationals, so a numpy source embeds the exact float64 rational, not necessarily the original decimal fraction — the same caveat as VectorFracView.)

Parameters:
property fractions_exact: bool

Return whether this view’s Fraction interchange is exact.

unwrap()

Return the underlying unwrapped vector, or this value when no backend remains.

unview()

Return a plain SurdVector containing this view’s presented data.