($Id: VectorBase.h 1351 2013-03-08 15:12:28Z arr $)
Class CXXR::VectorBase and associated C interface.
More...
#include "CXXR/RObject.h"
#include <boost/serialization/access.hpp>
#include <boost/serialization/base_object.hpp>
#include <boost/serialization/nvp.hpp>
#include "CXXR/ElementTraits.hpp"
#include "CXXR/GCStackRoot.hpp"
#include "CXXR/SEXP_downcast.hpp"
Go to the source code of this file.
Namespaces |
namespace | CXXR |
| Namespace for the CXXR project.
|
Macros |
#define | R_LEN_T_MAX INT_MAX |
Typedefs |
typedef int | R_len_t |
Detailed Description
Class CXXR::VectorBase and associated C interface.
Function Documentation
- Parameters:
-
- Returns:
- The length of x, or 0 if x is a null pointer. (In the case of certain hash tables, this means the 'capacity' of x , not all of which may be used.)
Create a vector object.
Allocate a vector object. This ensures only validity of SEXPTYPE values representing lists (as the elements must be initialized). Initializing of other vector types is done in do_makevector().
- Parameters:
-
stype | The type of vector required. |
length | The length of the vector to be created. |
- Returns:
- Pointer to the created vector.
Rboolean Rf_isVector |
( |
SEXP |
s | ) |
|
Is an RObject a vector?
Vector in this context embraces R matrices and arrays.
- Parameters:
-
s | Pointer to the RObject to be tested. The pointer may be null, in which case the function returns FALSE. |
- Returns:
- TRUE iff s points to a vector object.
void SET_TRUELENGTH |
( |
SEXP |
x, |
|
|
int |
v |
|
) |
| |
|
inline |
Set 'true length' of vector.
- Parameters:
-
- Deprecated:
- May be withdrawn in the future.
void SETLENGTH |
( |
SEXP |
x, |
|
|
int |
v |
|
) |
| |
Set length of vector.
- Parameters:
-
x | Pointer to a CXXR::VectorBase . |
v | The required new length, which must not be greater than the current length. |
- Deprecated:
- May be withdrawn in future. Currently used in library/stats/src/isoreg.c , and possibly in packages.
- Parameters:
-
- Returns:
- The 'true length' of x. According to the R Internals document for R 2.4.1, this is only used for certain hash tables, and signifies the number of used slots in the table.
- Deprecated:
- May be withdrawn in the future.