Vector(R)

vector.spad line 154 [edit on github]

This type represents vector like objects with varying lengths and indexed by a finite segment of integers starting at 1.

# : % -> NonNegativeInteger
from Aggregate
* : (%, R) -> % if R has SemiGroup
from VectorCategory(R)
* : (R, %) -> % if R has SemiGroup
from VectorCategory(R)
* : (Integer, %) -> % if R has AbelianGroup
from VectorCategory(R)
+ : (%, %) -> % if R has AbelianSemiGroup
from VectorCategory(R)
- : % -> % if R has AbelianGroup
from VectorCategory(R)
- : (%, %) -> % if R has AbelianGroup
from VectorCategory(R)
< : (%, %) -> Boolean if R has OrderedSet
from PartialOrder
<= : (%, %) -> Boolean if R has OrderedSet
from PartialOrder
= : (%, %) -> Boolean if R has BasicType
from BasicType
> : (%, %) -> Boolean if R has OrderedSet
from PartialOrder
>= : (%, %) -> Boolean if R has OrderedSet
from PartialOrder
any? : (Mapping(Boolean, R), %) -> Boolean
from HomogeneousAggregate(R)
coerce : % -> OutputForm if R has CoercibleTo(OutputForm)
from CoercibleTo(OutputForm)
concat : (%, %) -> %
from LinearAggregate(R)
concat : (%, R) -> %
from LinearAggregate(R)
concat : (R, %) -> %
from LinearAggregate(R)
concat : List(%) -> %
from LinearAggregate(R)
construct : List(R) -> %
from Collection(R)
convert : % -> InputForm if R has ConvertibleTo(InputForm)
from ConvertibleTo(InputForm)
copy : % -> %
from Aggregate
copyInto! : (%, %, Integer) -> %
from LinearAggregate(R)
count : (R, %) -> NonNegativeInteger if R has BasicType
from HomogeneousAggregate(R)
count : (Mapping(Boolean, R), %) -> NonNegativeInteger
from HomogeneousAggregate(R)
cross : (%, %) -> % if R has Ring
from VectorCategory(R)
delete : (%, Integer) -> %
from LinearAggregate(R)
delete : (%, UniversalSegment(Integer)) -> %
from LinearAggregate(R)
dot : (%, %) -> R if R has AbelianMonoid and R has SemiRng
from VectorCategory(R)
elt : (%, UniversalSegment(Integer)) -> %
from Eltable(UniversalSegment(Integer), %)
elt : (%, Integer) -> R
from Eltable(Integer, R)
elt : (%, Integer, R) -> R
from EltableAggregate(Integer, R)
empty : () -> %
from Aggregate
empty? : % -> Boolean
from Aggregate
entries : % -> List(R)
from IndexedAggregate(Integer, R)
entry? : (R, %) -> Boolean if R has BasicType
from IndexedAggregate(Integer, R)
eq? : (%, %) -> Boolean
from Aggregate
eval : (%, R, R) -> % if R has Evalable(R) and R has SetCategory
from InnerEvalable(R, R)
eval : (%, Equation(R)) -> % if R has Evalable(R) and R has SetCategory
from Evalable(R)
eval : (%, List(R), List(R)) -> % if R has Evalable(R) and R has SetCategory
from InnerEvalable(R, R)
eval : (%, List(Equation(R))) -> % if R has Evalable(R) and R has SetCategory
from Evalable(R)
every? : (Mapping(Boolean, R), %) -> Boolean
from HomogeneousAggregate(R)
fill! : (%, R) -> %
from IndexedAggregate(Integer, R)
find : (Mapping(Boolean, R), %) -> Union(R, "failed")
from Collection(R)
first : (%, NonNegativeInteger) -> %
from LinearAggregate(R)
first : % -> R
from IndexedAggregate(Integer, R)
hash : % -> SingleInteger if R has Hashable
from Hashable
hashUpdate! : (HashState, %) -> HashState if R has Hashable
from Hashable
index? : (Integer, %) -> Boolean
from IndexedAggregate(Integer, R)
indices : % -> List(Integer)
from IndexedAggregate(Integer, R)
insert : (%, %, Integer) -> %
from LinearAggregate(R)
insert : (R, %, Integer) -> %
from LinearAggregate(R)
latex : % -> String if R has SetCategory
from SetCategory
leftTrim : (%, R) -> % if R has BasicType
from LinearAggregate(R)
length : % -> R if R has RadicalCategory and R has Ring
from VectorCategory(R)
less? : (%, NonNegativeInteger) -> Boolean
from Aggregate
map : (Mapping(R, R), %) -> %
from HomogeneousAggregate(R)
map : (Mapping(R, R, R), %, %) -> %
from LinearAggregate(R)
map! : (Mapping(R, R), %) -> %
from HomogeneousAggregate(R)
max : (%, %) -> % if R has OrderedSet
from OrderedSet
max : % -> R if R has OrderedSet
from HomogeneousAggregate(R)
max : (Mapping(Boolean, R, R), %) -> R
from HomogeneousAggregate(R)
maxIndex : % -> Integer
from IndexedAggregate(Integer, R)
member? : (R, %) -> Boolean if R has BasicType
from HomogeneousAggregate(R)
members : % -> List(R)
from HomogeneousAggregate(R)
merge : (%, %) -> % if R has OrderedSet
from LinearAggregate(R)
merge : (Mapping(Boolean, R, R), %, %) -> %
from LinearAggregate(R)
min : (%, %) -> % if R has OrderedSet
from OrderedSet
min : % -> R if R has OrderedSet
from HomogeneousAggregate(R)
minIndex : % -> Integer
from IndexedAggregate(Integer, R)
more? : (%, NonNegativeInteger) -> Boolean
from Aggregate
new : (NonNegativeInteger, R) -> %
from LinearAggregate(R)
outerProduct : (%, %) -> Matrix(R) if R has Ring
from VectorCategory(R)
parts : % -> List(R)
from HomogeneousAggregate(R)
position : (R, %) -> Integer if R has BasicType
from LinearAggregate(R)
position : (R, %, Integer) -> Integer if R has BasicType
from LinearAggregate(R)
position : (Mapping(Boolean, R), %) -> Integer
from LinearAggregate(R)
qelt : (%, Integer) -> R
from EltableAggregate(Integer, R)
qsetelt! : (%, Integer, R) -> R
from EltableAggregate(Integer, R)
reduce : (Mapping(R, R, R), %) -> R
from Collection(R)
reduce : (Mapping(R, R, R), %, R) -> R
from Collection(R)
reduce : (Mapping(R, R, R), %, R, R) -> R if R has BasicType
from Collection(R)
remove : (R, %) -> % if R has BasicType
from Collection(R)
remove : (Mapping(Boolean, R), %) -> %
from Collection(R)
removeDuplicates : % -> % if R has BasicType
from Collection(R)
reverse : % -> %
from LinearAggregate(R)
reverse! : % -> %
from LinearAggregate(R)
rightTrim : (%, R) -> % if R has BasicType
from LinearAggregate(R)
sample : () -> %
from Aggregate
select : (Mapping(Boolean, R), %) -> %
from Collection(R)
setelt! : (%, Integer, R) -> R
from EltableAggregate(Integer, R)
setelt! : (%, UniversalSegment(Integer), R) -> R
from LinearAggregate(R)
size? : (%, NonNegativeInteger) -> Boolean
from Aggregate
smaller? : (%, %) -> Boolean if R has Comparable
from Comparable
sort : % -> % if R has OrderedSet
from LinearAggregate(R)
sort : (Mapping(Boolean, R, R), %) -> %
from LinearAggregate(R)
sort! : % -> % if R has OrderedSet
from LinearAggregate(R)
sort! : (Mapping(Boolean, R, R), %) -> %
from LinearAggregate(R)
sorted? : % -> Boolean if R has OrderedSet
from LinearAggregate(R)
sorted? : (Mapping(Boolean, R, R), %) -> Boolean
from LinearAggregate(R)
swap! : (%, Integer, Integer) -> Void
from IndexedAggregate(Integer, R)
trim : (%, R) -> % if R has BasicType
from LinearAggregate(R)
vector : List(R) -> %

vector(l) converts the list l to a vector.

zero : NonNegativeInteger -> % if R has AbelianMonoid
from VectorCategory(R)
zero? : % -> Boolean if R has AbelianMonoid
from VectorCategory(R)
~= : (%, %) -> Boolean if R has BasicType
from BasicType

Comparable

ConvertibleTo(InputForm)

shallowlyMutable

Aggregate

OrderedSet

SetCategory

EltableAggregate(Integer, R)

Eltable(Integer, R)

LinearAggregate(R)

InnerEvalable(R, R)

OneDimensionalArrayAggregate(R)

PartialOrder

CoercibleTo(OutputForm)

FiniteLinearAggregate(R)

IndexedAggregate(Integer, R)

finiteAggregate

Eltable(UniversalSegment(Integer), %)

Evalable(R)

Collection(R)

Hashable

HomogeneousAggregate(R)

BasicType

VectorCategory(R)