User Tools


Differences

This shows you the differences between two versions of the page.

Link to this comparison view

cl:types:vector [2017/05/01 21:00] (current)
Line 1: Line 1:
 +====== System Class VECTOR ======
 +
 +====Class Precedence List====
 +**vector**, **[[CL:​Types:​array]]**,​ **[[CL:​Types:​sequence]]**,​ **[[CL:​Types:​t]]**
 +
 +====Description====
 +Any one-dimensional //​[[CL:​Glossary:​array]]//​ is a //​[[CL:​Glossary:​vector]]//​.
 +
 +The type **[[CL:​Types:​vector]]** is a subtype of **[[CL:​Types:​array]]**;​ for all //​[[CL:​Glossary:​type|types]]//​ ''​x'',​ ''​(vector x)''​ is the same as ''​(array x ([[CL:​Types:​wildcard|*]]))''​.
 +
 +The //​[[CL:​Glossary:​type]]//​ ''​(vector t)'',​ the type **[[CL:​Types:​string]]**,​ and the type **[[CL:​Types:​bit-vector]]** are //​[[CL:​Glossary:​disjoint]]//​ subtypes of **[[CL:​Types:​vector]]**.
 +
 +====Compound Type Specifier Kind====
 +Specializing.
 +
 +====Compound Type Specifier Syntax====
 +//​**vector** //​[{element-type | **[[CL:​Types:​wildcard|*]]**} [{size | **[[CL:​Types:​wildcard|*]]**}]]////​
 +
 +====Compound Type Specifier Arguments====
 +//size// - a non-negative //​[[CL:​Glossary:​fixnum]]//​.
 +//​element-type//​ - a //​[[CL:​Glossary:​type specifier]]//​.
 +
 +====Compound Type Specifier Description====
 +This denotes the set of specialized //​[[CL:​Glossary:​vector|vectors]]//​ whose //​[[CL:​Glossary:​element type]]// and //​dimension//​ match the specified values. Specifically:​
 +
 +If //​element-type//​ is the //​[[CL:​Glossary:​symbol]]//​ **[[CL:​Types:​wildcard|*]]**,​ //​[[CL:​Glossary:​vector|vectors]]//​ are not excluded on the basis of their //​[[CL:​Glossary:​element type]]//. Otherwise, only those //vectors// are included whose //​[[CL:​Glossary:​actual array element type]]// is the result of //​[[CL:​Glossary:​upgrade|upgrading]]//​ //​element-type//;​ see section {\secref\ArrayUpgrading}.
 +
 +If a //size// is specified, the set includes only those //vectors// whose only //​[[CL:​Glossary:​dimension]]//​ is //size//. If the //​[[CL:​Glossary:​symbol]]//​ **[[CL:​Types:​wildcard|*]]** is specified instead of a //size//, the set is not restricted on the basis of //​[[CL:​Glossary:​dimension]]//​.
 +
 +====See Also====
 +{\secref\RequiredSpecializedArrays},​ {\secref\SharpsignLeftParen},​ {\secref\PrintingOtherVectors},​ {\secref\SharpsignA}
 +
 +====Notes====
 +The //​[[CL:​Glossary:​type]]//​ ''​(vector //e// //​s//​)''​ is equivalent to the //​[[CL:​Glossary:​type]]//​ ''​(array //e// (//​s//​))''​.
 +
 +The type ''​(vector [[CL:​Types:​bit]])''​ has the name **[[CL:​Types:​bit-vector]]**.
 +
 +The union of all //​[[CL:​Glossary:​types]]//​ ''​(vector ''​C''​)'',​ where ''​C''​ is any //​[[CL:​Glossary:​subtype]]//​ of **[[CL:​Types:​character]]**,​ has the name **[[CL:​Types:​string]]**.
 +
 +''​(vector [[CL:​Types:​wildcard|*]])''​ refers to all //​[[CL:​Glossary:​vector|vectors]]//​ regardless of element type, ''​(vector //​type-specifier//​)''​ refers only to those //​[[CL:​Glossary:​vector|vectors]]//​ that can result from giving //​type-specifier//​ as the **'':​element-type''​** argument to **[[CL:​Functions:​make-array]]**.
 +
 +\issue{ARRAY-DIMENSION-IMPLICATIONS:​ALL-FIXNUM} \issue{ARRAY-TYPE-ELEMENT-TYPE-SEMANTICS:​UNIFY-UPGRADING}