#include "muse_builtins.h"#include "muse_port.h"#include <stdlib.h>#include <memory.h>Include dependency graph for muse_builtin_vector.c:

Data Structures | |
| struct | vector_t |
| struct | vector_fns_t |
Functions | |
| static void | vector_init_with_length (void *ptr, int length) |
| static void | vector_init (void *ptr, muse_cell args) |
| static void | vector_mark (void *ptr) |
| static void | vector_destroy (void *ptr) |
| static void | vector_write (void *ptr, void *port) |
| Writes out the vector to the given port in such a way that the expression written out is converted to a vector by a trusted read operation. | |
| muse_cell | fn_vector (muse_env *env, vector_t *v, muse_cell args) |
| The function that implements vector slot access. | |
| static muse_cell | vector_size (void *self) |
| static void | vector_resize (vector_t *self, int new_size) |
| static void | vector_merge_one (vector_t *v, int i, muse_cell new_value, muse_cell reduction_fn) |
| static void | vector_trim (vector_t *v) |
| static muse_cell | vector_map (void *self, muse_cell fn) |
| static muse_cell | vector_join (void *self, muse_cell objlist, muse_cell reduction_fn) |
| static muse_cell | vector_collect (void *self, muse_cell predicate, muse_cell mapper, muse_cell reduction_fn) |
| static muse_cell | vector_reduce (void *self, muse_cell reduction_fn, muse_cell initial) |
| static void * | vector_view (int id) |
| muse_cell | fn_mk_vector (muse_env *env, void *context, muse_cell args) |
| (mk-vector N). | |
| muse_cell | fn_vector_from_args (muse_env *env, void *context, muse_cell args) |
| (vector a1 a2 a3 --- aN). | |
| muse_cell | fn_vector_p (muse_env *env, void *context, muse_cell args) |
| (vector? fv). | |
| muse_cell | fn_vector_length (muse_env *env, void *context, muse_cell args) |
| (vector-length v). | |
| muse_cell | fn_list_to_vector (muse_env *env, void *context, muse_cell args) |
| (list->vector ls). | |
| muse_cell | fn_vector_to_list (muse_env *env, void *context, muse_cell args) |
| (vector->list fv [from count step]). | |
| void | muse_define_builtin_type_vector () |
| muse_cell | muse_mk_vector (int length) |
| Creates a new vector object that has enough slots allocated to hold the given number of objects. | |
| int | muse_vector_length (muse_cell vec) |
| Returns the number of slots the vector has. | |
| muse_cell | muse_vector_get (muse_cell vec, int index) |
| Returns the value occupying the slot at the given 0-based index. | |
| muse_cell | muse_vector_put (muse_cell vec, int index, muse_cell value) |
| Replaces the value in the slot at the given index with the new value. | |
Variables | |
| static muse_monad_view_t | g_vector_monad_view |
| static muse_functional_object_type_t | g_vector_type |
| static struct vector_fns_t | g_vector_fns [] |
All rights reserved. See LICENSE.txt distributed with this source code or http://muvee-symbolic-expressions.googlecode.com/svn/trunk/LICENSE.txt for terms and conditions under which this software is provided to you.
Implements functional vectors for constant time random access to a collection of objects.
1.4.7