The basic idea is that StandardBasisVector(filter, len, k, basedomain) would produce vector in the given filter of length len over ring with zero everywhere except at position k it has a 1.
For convenience, StandardBasisVector(len, k, basedomain) could be short for StandardBasisVector(DefaultVectorRepForBaseDomain(basedomain), len, k, basedomain) (whether it would be implemented like that is another question)
There is lots of code which uses IdentityMat(len, ring) to get such vectors. Such a use case could be replaced by List([1..len], k-> StandardBasisVector(len, k, ring))
Implementation would be simple enough:
v:=ZeroVector(filter, len, basedomain);
v[k]:=One(basedomain);
This might be the strongest argument against it: it is so easy to do that... But I think the added convenience is real; I've encountered lots of code where it would have been nice to have StandardBasisVector.
The basic idea is that
StandardBasisVector(filter, len, k, basedomain)would produce vector in the givenfilterof lengthlenoverringwith zero everywhere except at position k it has a 1.For convenience,
StandardBasisVector(len, k, basedomain)could be short forStandardBasisVector(DefaultVectorRepForBaseDomain(basedomain), len, k, basedomain)(whether it would be implemented like that is another question)There is lots of code which uses
IdentityMat(len, ring)to get such vectors. Such a use case could be replaced byList([1..len], k-> StandardBasisVector(len, k, ring))Implementation would be simple enough:
This might be the strongest argument against it: it is so easy to do that... But I think the added convenience is real; I've encountered lots of code where it would have been nice to have
StandardBasisVector.