add skeleton for ResizableVector
This commit is contained in:
parent
7345e93eda
commit
28b1b2590b
|
@ -24,6 +24,7 @@
|
|||
#include "subview_mat.hh"
|
||||
#include "diagonal.hh"
|
||||
#include "vector.hh"
|
||||
#include "resizable_vector.hh"
|
||||
|
||||
#ifdef PHP_ARMA_OPERATORS
|
||||
#include "operators.hh"
|
||||
|
@ -53,6 +54,7 @@ namespace php_arma
|
|||
subview_mat_init();
|
||||
diagonal_init();
|
||||
vector_init();
|
||||
resizable_vector_init();
|
||||
|
||||
#ifdef PHP_ARMA_OPERATORS
|
||||
operators_init();
|
||||
|
|
|
@ -0,0 +1,63 @@
|
|||
//
|
||||
// php-armadillo/resizable_vector.hcc
|
||||
//
|
||||
// @Author CismonX
|
||||
//
|
||||
|
||||
#include "resizable_vector.hh"
|
||||
#include "resizable.hh"
|
||||
#include "vector.hh"
|
||||
|
||||
namespace php_arma
|
||||
{
|
||||
template <typename T, typename T1>
|
||||
PHP_ARMA_METHOD(resizable_vector, fromString, T, T1)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
template <typename T, typename T1>
|
||||
PHP_ARMA_METHOD(resizable_vector, fromArray, T, T1)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
template <typename T, typename T1>
|
||||
PHP_ARMA_METHOD(resizable_vector, resize, T, T1)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
template <typename T, typename T1>
|
||||
PHP_ARMA_METHOD(resizable_vector, setSize, T, T1)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
template <typename T, typename T1>
|
||||
PHP_ARMA_METHOD(resizable_vector, zeros, T, T1)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
template <typename T, typename T1>
|
||||
PHP_ARMA_METHOD(resizable_vector, inRange, T, T1)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
template <typename T, typename T1>
|
||||
PHP_ARMA_START_ME(resizable_vector, T, T1)
|
||||
PHP_ARMA_ME(fromString, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC)
|
||||
PHP_ARMA_ME(fromArray, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC)
|
||||
PHP_ARMA_ME(resize, ZEND_ACC_PUBLIC)
|
||||
PHP_ARMA_ME(setSize, ZEND_ACC_PUBLIC)
|
||||
PHP_ARMA_ME(zeros, ZEND_ACC_PUBLIC)
|
||||
PHP_ARMA_ME(inRange, ZEND_ACC_PUBLIC)
|
||||
PHP_ARMA_END_ME();
|
||||
|
||||
void resizable_vector_init()
|
||||
{
|
||||
resizable_vector_ce = interface_register<resizable_vector_php_name>(resizable_ce, vector_ce);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,37 @@
|
|||
//
|
||||
// php-armadillo/resizable_vector.hh
|
||||
//
|
||||
// @Author CismonX
|
||||
//
|
||||
|
||||
#ifndef PHP_ARMA_RESIZABLE_VECTOR_HH
|
||||
#define PHP_ARMA_RESIZABLE_VECTOR_HH
|
||||
|
||||
#include "common/php_arma.hh"
|
||||
|
||||
namespace php_arma
|
||||
{
|
||||
template <typename T, typename ChildT>
|
||||
struct resizable_vector
|
||||
{
|
||||
using native_t = typename ChildT::native_t;
|
||||
|
||||
PHP_ARMA_COMMON_DECLARE();
|
||||
|
||||
private:
|
||||
static PHP_FUNCTION(fromString);
|
||||
static PHP_FUNCTION(fromArray);
|
||||
static PHP_FUNCTION(resize);
|
||||
static PHP_FUNCTION(setSize);
|
||||
static PHP_FUNCTION(zeros);
|
||||
static PHP_FUNCTION(inRange);
|
||||
};
|
||||
|
||||
void resizable_vector_init();
|
||||
|
||||
constexpr const char resizable_vector_php_name[] = "ResizbaleVector";
|
||||
|
||||
inline zend_class_entry *resizable_vector_ce;
|
||||
}
|
||||
|
||||
#endif // !PHP_ARMA_RESIZABLE_VECTOR
|
|
@ -8,8 +8,8 @@
|
|||
|
||||
namespace php_arma
|
||||
{
|
||||
template <typename T, typename ChildT>
|
||||
PHP_ARMA_METHOD(vector, t, T, ChildT)
|
||||
template <typename T, typename T1>
|
||||
PHP_ARMA_METHOD(vector, t, T, T1)
|
||||
{
|
||||
|
||||
}
|
||||
|
|
Reference in New Issue