Showing content from http://reference.wolfram.com/language/ref/compiledtype/ListVector.html below:
ListVector—Wolfram Documentation
WOLFRAM Consulting & Solutions
We deliver solutions for the AI eraâcombining symbolic computation, data-driven insights and deep technical expertise
- Data & Computational Intelligence
- Model-Based Design
- Algorithm Development
- Wolfram|Alpha for Business
- Blockchain Technology
- Education Technology
- Quantum Computation
WolframConsulting.com
"ListVector"::[type]
represents a uniform list with the specified element type.
Details
- "ListVector" can be used in Typed and related constructs to specify a type.
- "ListVector" objects are automatically memory managed.
- The elements of a "ListVector" can have any compiled type.
- The elements of a "ListVector" all have the same type.
- For numerical tensors with rank greater than 1, "PackedArray" or "NumericArray" can be used.
Constructors
- "ListVector" objects can be constructed with Typed[{…},"ListVector"::[type]] in compiled code. »
- CreateTypeInstance["ListVector"::[type],carr,len] constructs a "ListVector" from a "CArray" carr with length len. carr can optionally be wrapped in "Managed".
Properties
- Information[list,"ContainedType"] for list of type "ListVector"::[type] gives type.
- Information[list,"ElementType"] for list of type "ListVector"::[type] gives type.
Conversions
Expressions
- List expressions can be converted to and from "ListVector"::[type] as long as every element of the list can be converted to type.
"PackedArray"
- "ListVector" objects can be converted to and from "PackedArray" objects.
"NumericArray"
- "ListVector" objects can be converted to and from "NumericArray" objects.
Runtime Errors
ArrayPartError
- Operations that require extracting elements from a "ListVector" can give a runtime error if those elements do not exist.
Examplesopen all close all Basic Examples (2)
"ListVector" can be used as input or output for a CompiledCodeFunction:
Create a "ListVector" in compiled code:
Scope (3)
"ListVector" objects can contain objects with any compilable type:
Higher-rank arrays can be represented with nested "ListVector" instances:
Get the element type of a "ListVector":
Properties & Relations (1)
The "PackedArray" can be used to represent numerical arrays:
However, it cannot be used for non-numerical data:
In contrast, the "ListVector" type can only represent rank-1 lists, but it can have elements with any compilable type:
Possible Issues (1)
Part access can cause a runtime error:
History
Introduced in 2022 (13.1)
RetroSearch is an open source project built by @garambo
| Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4