/*
 * This file was generated automatically by ExtUtils::ParseXS version 2.2210 from the
 * contents of Rstats.xs. Do not edit this file, edit Rstats.xs instead.
 *
 *	ANY CHANGES MADE HERE WILL BE LOST! 
 *
 */

#line 1 "Rstats.xs"
/* Rstats headers */
#include "Rstats.h"

/* Shortcut of return sv */
#define return_sv(x) XPUSHs(x); XSRETURN(1)

#line 17 "Rstats.c"
#ifndef PERL_UNUSED_VAR
#  define PERL_UNUSED_VAR(var) if (0) var = var
#endif

#ifndef PERL_ARGS_ASSERT_CROAK_XS_USAGE
#define PERL_ARGS_ASSERT_CROAK_XS_USAGE assert(cv); assert(params)

/* prototype to pass -Wmissing-prototypes */
STATIC void
S_croak_xs_usage(pTHX_ const CV *const cv, const char *const params);

STATIC void
S_croak_xs_usage(pTHX_ const CV *const cv, const char *const params)
{
    const GV *const gv = CvGV(cv);

    PERL_ARGS_ASSERT_CROAK_XS_USAGE;

    if (gv) {
        const char *const gvname = GvNAME(gv);
        const HV *const stash = GvSTASH(gv);
        const char *const hvname = stash ? HvNAME(stash) : NULL;

        if (hvname)
            Perl_croak(aTHX_ "Usage: %s::%s(%s)", hvname, gvname, params);
        else
            Perl_croak(aTHX_ "Usage: %s(%s)", gvname, params);
    } else {
        /* Pants. I don't think that it should be possible to get here. */
        Perl_croak(aTHX_ "Usage: CODE(0x%"UVxf")(%s)", PTR2UV(cv), params);
    }
}
#undef  PERL_ARGS_ASSERT_CROAK_XS_USAGE

#ifdef PERL_IMPLICIT_CONTEXT
#define croak_xs_usage(a,b)	S_croak_xs_usage(aTHX_ a,b)
#else
#define croak_xs_usage		S_croak_xs_usage
#endif

#endif

/* NOTE: the prototype of newXSproto() is different in versions of perls,
 * so we define a portable version of newXSproto()
 */
#ifdef newXS_flags
#define newXSproto_portable(name, c_impl, file, proto) newXS_flags(name, c_impl, file, proto, 0)
#else
#define newXSproto_portable(name, c_impl, file, proto) (PL_Sv=(SV*)newXS(name, c_impl, file), sv_setpv(PL_Sv, proto), (CV*)PL_Sv)
#endif /* !defined(newXS_flags) */

#line 69 "Rstats.c"

XS(XS_Rstats__Vector_values); /* prototype to pass -Wmissing-prototypes */
XS(XS_Rstats__Vector_values)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	SV *	RETVAL;
#line 13 "Rstats.xs"
{
  Rstats::Vector* self = Rstats::pl_to_c_obj<Rstats::Vector*>(ST(0));
  SV* sv_values = Rstats::VectorFunc::get_values(self);
  return_sv(sv_values);
}
#line 90 "Rstats.c"
	PUTBACK;
	return;
    }
}


XS(XS_Rstats__Vector_value); /* prototype to pass -Wmissing-prototypes */
XS(XS_Rstats__Vector_value)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	SV *	RETVAL;
#line 21 "Rstats.xs"
{
  Rstats::Vector* self = Rstats::pl_to_c_obj<Rstats::Vector*>(ST(0));

  IV pos;
  if (items < 2) {
    pos = 0;
  }
  else {
    pos = SvIV(ST(1));
  }

  SV* sv_value;
  if (pos >= 0 && pos < Rstats::VectorFunc::get_length(self)) {
    sv_value = Rstats::VectorFunc::get_value(self, pos);
  }
  else {
    sv_value = &PL_sv_undef;
  }

  return_sv(sv_value);
}
#line 132 "Rstats.c"
	PUTBACK;
	return;
    }
}


XS(XS_Rstats__Vector_is_character); /* prototype to pass -Wmissing-prototypes */
XS(XS_Rstats__Vector_is_character)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	SV *	RETVAL;
#line 45 "Rstats.xs"
{
  Rstats::Vector* self = Rstats::pl_to_c_obj<Rstats::Vector*>(ST(0));
  bool is = Rstats::VectorFunc::is_character(self);
  SV* sv_is = is ? Rstats::pl_new_sv_iv(1) : Rstats::pl_new_sv_iv(0);
  return_sv(sv_is);
}
#line 159 "Rstats.c"
	PUTBACK;
	return;
    }
}


XS(XS_Rstats__Vector_is_complex); /* prototype to pass -Wmissing-prototypes */
XS(XS_Rstats__Vector_is_complex)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	SV *	RETVAL;
#line 54 "Rstats.xs"
{
  Rstats::Vector* self = Rstats::pl_to_c_obj<Rstats::Vector*>(ST(0));
  bool is = Rstats::VectorFunc::is_complex(self);
  SV* sv_is = is ? Rstats::pl_new_sv_iv(1) : Rstats::pl_new_sv_iv(0);
  return_sv(sv_is);
}
#line 186 "Rstats.c"
	PUTBACK;
	return;
    }
}


XS(XS_Rstats__Vector_is_numeric); /* prototype to pass -Wmissing-prototypes */
XS(XS_Rstats__Vector_is_numeric)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	SV *	RETVAL;
#line 63 "Rstats.xs"
{
  Rstats::Vector* self = Rstats::pl_to_c_obj<Rstats::Vector*>(ST(0));
  bool is = Rstats::VectorFunc::is_numeric(self);
  SV* sv_is = is ? Rstats::pl_new_sv_iv(1) : Rstats::pl_new_sv_iv(0);
  return_sv(sv_is);
}
#line 213 "Rstats.c"
	PUTBACK;
	return;
    }
}


XS(XS_Rstats__Vector_is_double); /* prototype to pass -Wmissing-prototypes */
XS(XS_Rstats__Vector_is_double)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	SV *	RETVAL;
#line 72 "Rstats.xs"
{
  Rstats::Vector* self = Rstats::pl_to_c_obj<Rstats::Vector*>(ST(0));
  bool is = Rstats::VectorFunc::is_double(self);
  SV* sv_is = is ? Rstats::pl_new_sv_iv(1) : Rstats::pl_new_sv_iv(0);
  return_sv(sv_is);
}
#line 240 "Rstats.c"
	PUTBACK;
	return;
    }
}


XS(XS_Rstats__Vector_is_integer); /* prototype to pass -Wmissing-prototypes */
XS(XS_Rstats__Vector_is_integer)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	SV *	RETVAL;
#line 81 "Rstats.xs"
{
  Rstats::Vector* self = Rstats::pl_to_c_obj<Rstats::Vector*>(ST(0));
  bool is = Rstats::VectorFunc::is_integer(self);
  SV* sv_is = is ? Rstats::pl_new_sv_iv(1) : Rstats::pl_new_sv_iv(0);
  return_sv(sv_is);
}
#line 267 "Rstats.c"
	PUTBACK;
	return;
    }
}


XS(XS_Rstats__Vector_is_logical); /* prototype to pass -Wmissing-prototypes */
XS(XS_Rstats__Vector_is_logical)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	SV *	RETVAL;
#line 90 "Rstats.xs"
{
  Rstats::Vector* self = Rstats::pl_to_c_obj<Rstats::Vector*>(ST(0));
  bool is = Rstats::VectorFunc::is_logical(self);
  SV* sv_is = is ? Rstats::pl_new_sv_iv(1) : Rstats::pl_new_sv_iv(0);
  return_sv(sv_is);
}
#line 294 "Rstats.c"
	PUTBACK;
	return;
    }
}


XS(XS_Rstats__Vector_as); /* prototype to pass -Wmissing-prototypes */
XS(XS_Rstats__Vector_as)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	SV *	RETVAL;
#line 99 "Rstats.xs"
{
  Rstats::Vector* self = Rstats::pl_to_c_obj<Rstats::Vector*>(ST(0));
  SV* sv_type = ST(1);
  Rstats::Vector* e2 = Rstats::VectorFunc::as(self, sv_type);
  SV* sv_e2 = Rstats::pl_to_perl_obj(e2, "Rstats::Vector");
  return_sv(sv_e2);
}
#line 322 "Rstats.c"
	PUTBACK;
	return;
    }
}


XS(XS_Rstats__Vector_to_string_pos); /* prototype to pass -Wmissing-prototypes */
XS(XS_Rstats__Vector_to_string_pos)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	SV *	RETVAL;
#line 109 "Rstats.xs"
{
  Rstats::Vector* self = Rstats::pl_to_c_obj<Rstats::Vector*>(ST(0));
  IV pos = SvIV(ST(1));
  SV* sv_str = Rstats::VectorFunc::to_string_pos(self, pos);
  return_sv(sv_str);
}
#line 349 "Rstats.c"
	PUTBACK;
	return;
    }
}


XS(XS_Rstats__Vector_to_string); /* prototype to pass -Wmissing-prototypes */
XS(XS_Rstats__Vector_to_string)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	SV *	RETVAL;
#line 118 "Rstats.xs"
{
  Rstats::Vector* self = Rstats::pl_to_c_obj<Rstats::Vector*>(ST(0));
  SV* sv_str = Rstats::VectorFunc::to_string(self);
  return_sv(sv_str);
}
#line 375 "Rstats.c"
	PUTBACK;
	return;
    }
}


XS(XS_Rstats__Vector_as_character); /* prototype to pass -Wmissing-prototypes */
XS(XS_Rstats__Vector_as_character)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	SV *	RETVAL;
#line 126 "Rstats.xs"
{
  Rstats::Vector* self = Rstats::pl_to_c_obj<Rstats::Vector*>(ST(0));
  Rstats::Vector* e2 = Rstats::VectorFunc::as_character(self);
  SV* sv_e2 = Rstats::pl_to_perl_obj(e2, "Rstats::Vector");
  return_sv(sv_e2);
}
#line 402 "Rstats.c"
	PUTBACK;
	return;
    }
}


XS(XS_Rstats__Vector_as_complex); /* prototype to pass -Wmissing-prototypes */
XS(XS_Rstats__Vector_as_complex)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	SV *	RETVAL;
#line 135 "Rstats.xs"
{
  Rstats::Vector* self = Rstats::pl_to_c_obj<Rstats::Vector*>(ST(0));
  Rstats::Vector* e2 = Rstats::VectorFunc::as_complex(self);
  SV* sv_e2 = Rstats::pl_to_perl_obj(e2, "Rstats::Vector");
  return_sv(sv_e2);
}
#line 429 "Rstats.c"
	PUTBACK;
	return;
    }
}


XS(XS_Rstats__Vector_as_logical); /* prototype to pass -Wmissing-prototypes */
XS(XS_Rstats__Vector_as_logical)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	SV *	RETVAL;
#line 144 "Rstats.xs"
{
  Rstats::Vector* self = Rstats::pl_to_c_obj<Rstats::Vector*>(ST(0));
  Rstats::Vector* e2 = Rstats::VectorFunc::as_logical(self);
  SV* sv_e2 = Rstats::pl_to_perl_obj(e2, "Rstats::Vector");
  return_sv(sv_e2);
}
#line 456 "Rstats.c"
	PUTBACK;
	return;
    }
}


XS(XS_Rstats__Vector_as_numeric); /* prototype to pass -Wmissing-prototypes */
XS(XS_Rstats__Vector_as_numeric)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	SV *	RETVAL;
#line 153 "Rstats.xs"
{
  Rstats::Vector* self = Rstats::pl_to_c_obj<Rstats::Vector*>(ST(0));
  Rstats::Vector* e2 = Rstats::VectorFunc::as_numeric(self);
  SV* sv_e2 = Rstats::pl_to_perl_obj(e2, "Rstats::Vector");
  return_sv(sv_e2);
}
#line 483 "Rstats.c"
	PUTBACK;
	return;
    }
}


XS(XS_Rstats__Vector_as_double); /* prototype to pass -Wmissing-prototypes */
XS(XS_Rstats__Vector_as_double)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	SV *	RETVAL;
#line 162 "Rstats.xs"
{
  Rstats::Vector* self = Rstats::pl_to_c_obj<Rstats::Vector*>(ST(0));
  Rstats::Vector* e2 = Rstats::VectorFunc::as_double(self);
  SV* sv_e2 = Rstats::pl_to_perl_obj(e2, "Rstats::Vector");
  return_sv(sv_e2);
}
#line 510 "Rstats.c"
	PUTBACK;
	return;
    }
}


XS(XS_Rstats__Vector_as_integer); /* prototype to pass -Wmissing-prototypes */
XS(XS_Rstats__Vector_as_integer)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	SV *	RETVAL;
#line 171 "Rstats.xs"
{
  Rstats::Vector* self = Rstats::pl_to_c_obj<Rstats::Vector*>(ST(0));
  Rstats::Vector* e2 = Rstats::VectorFunc::as_integer(self);
  SV* sv_e2 = Rstats::pl_to_perl_obj(e2, "Rstats::Vector");
  return_sv(sv_e2);
}
#line 537 "Rstats.c"
	PUTBACK;
	return;
    }
}


XS(XS_Rstats__Vector_new_null); /* prototype to pass -Wmissing-prototypes */
XS(XS_Rstats__Vector_new_null)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	SV *	RETVAL;
#line 180 "Rstats.xs"
{
  Rstats::Vector* elements = Rstats::VectorFunc::new_null();
  SV* sv_elements = Rstats::pl_to_perl_obj(elements, "Rstats::Vector");
  return_sv(sv_elements);
}
#line 563 "Rstats.c"
	PUTBACK;
	return;
    }
}


XS(XS_Rstats__Vector_length_value); /* prototype to pass -Wmissing-prototypes */
XS(XS_Rstats__Vector_length_value)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	SV *	RETVAL;
#line 188 "Rstats.xs"
{
  Rstats::Vector* self = Rstats::pl_to_c_obj<Rstats::Vector*>(ST(0));
  IV length = Rstats::VectorFunc::get_length(self);
  return_sv(Rstats::pl_new_sv_iv(length));
}
#line 589 "Rstats.c"
	PUTBACK;
	return;
    }
}


XS(XS_Rstats__Vector_length); /* prototype to pass -Wmissing-prototypes */
XS(XS_Rstats__Vector_length)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	SV *	RETVAL;
#line 196 "Rstats.xs"
{
  Rstats::Vector* self = Rstats::pl_to_c_obj<Rstats::Vector*>(ST(0));
  IV length = Rstats::VectorFunc::get_length(self);
  Rstats::Vector* length_elements = Rstats::VectorFunc::new_double(1, length);
  SV* sv_length_elements = Rstats::pl_to_perl_obj(length_elements, "Rstats::Vector");
  return_sv(sv_length_elements);
}
#line 617 "Rstats.c"
	PUTBACK;
	return;
    }
}


XS(XS_Rstats__Vector_is_na); /* prototype to pass -Wmissing-prototypes */
XS(XS_Rstats__Vector_is_na)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	SV *	RETVAL;
#line 207 "Rstats.xs"
{
  Rstats::Vector* self = Rstats::pl_to_c_obj<Rstats::Vector*>(ST(0));

  IV length = Rstats::VectorFunc::get_length(self);
  Rstats::Vector* rets = Rstats::VectorFunc::new_logical(length);

  for (IV i = 0; i < length; i++) {
    if (Rstats::VectorFunc::exists_na_position(self, i)) {
      Rstats::VectorFunc::set_integer_value(rets, i, 1);
    }
    else {
      Rstats::VectorFunc::set_integer_value(rets, i, 0);
    }
  }

  SV* sv_rets = Rstats::pl_to_perl_obj(rets, "Rstats::Vector");

  return_sv(sv_rets);
}
#line 657 "Rstats.c"
	PUTBACK;
	return;
    }
}


XS(XS_Rstats__Vector_compose); /* prototype to pass -Wmissing-prototypes */
XS(XS_Rstats__Vector_compose)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	SV *	RETVAL;
#line 230 "Rstats.xs"
{
  SV* sv_mode = ST(1);
  SV* sv_elements = ST(2);
  IV len = Rstats::pl_av_len(sv_elements);

  Rstats::Vector* compose_elements;
  std::vector<IV> na_positions;
  char* mode = SvPV_nolen(sv_mode);
  if (strEQ(mode, "character")) {
    compose_elements = Rstats::VectorFunc::new_character(len);
    for (IV i = 0; i < len; i++) {
      Rstats::Vector* element;
      SV* sv_element = Rstats::pl_av_fetch(sv_elements, i);
      if (SvOK(sv_element)) {
        element = Rstats::pl_to_c_obj<Rstats::Vector*>(sv_element);
      }
      else {
        element = Rstats::VectorFunc::new_na();
      }
      if (Rstats::VectorFunc::exists_na_position(element, 0)) {
        na_positions.push_back(i);
      }
      else {
        Rstats::VectorFunc::set_character_value(compose_elements, i, Rstats::VectorFunc::get_character_value(element, 0));
      }
    }
  }
  else if (strEQ(mode, "complex")) {
    compose_elements = Rstats::VectorFunc::new_complex(len);
    for (IV i = 0; i < len; i++) {
      Rstats::Vector* element;
      SV* sv_element = Rstats::pl_av_fetch(sv_elements, i);
      if (SvOK(sv_element)) {
        element = Rstats::pl_to_c_obj<Rstats::Vector*>(sv_element);
      }
      else {
        element = Rstats::VectorFunc::new_na();
      }
      if (Rstats::VectorFunc::exists_na_position(element, 0)) {
        na_positions.push_back(i);
      }
      else {
       Rstats::VectorFunc::set_complex_value(compose_elements, i, Rstats::VectorFunc::get_complex_value(element, 0));
      }
    }
  }
  else if (strEQ(mode, "double")) {
    compose_elements = Rstats::VectorFunc::new_double(len);
    for (IV i = 0; i < len; i++) {
      Rstats::Vector* element;
      SV* sv_element = Rstats::pl_av_fetch(sv_elements, i);
      if (SvOK(sv_element)) {
        element = Rstats::pl_to_c_obj<Rstats::Vector*>(sv_element);
      }
      else {
        element = Rstats::VectorFunc::new_na();
      }
      if (Rstats::VectorFunc::exists_na_position(element, 0)) {
        na_positions.push_back(i);
      }
      else {
        Rstats::VectorFunc::set_double_value(compose_elements, i, Rstats::VectorFunc::get_double_value(element, 0));
      }
    }
  }
  else if (strEQ(mode, "integer")) {
    compose_elements = Rstats::VectorFunc::new_integer(len);
    std::vector<IV>* values = Rstats::VectorFunc::get_integer_values(compose_elements);
    for (IV i = 0; i < len; i++) {
      Rstats::Vector* element;
      SV* sv_element = Rstats::pl_av_fetch(sv_elements, i);
      if (SvOK(sv_element)) {
        element = Rstats::pl_to_c_obj<Rstats::Vector*>(sv_element);
      }
      else {
        element = Rstats::VectorFunc::new_na();
      }
      if (Rstats::VectorFunc::exists_na_position(element, 0)) {
        na_positions.push_back(i);
      }
      else {
        Rstats::VectorFunc::set_integer_value(compose_elements, i, Rstats::VectorFunc::get_integer_value(element, 0));
      }
    }
  }
  else if (strEQ(mode, "logical")) {
    compose_elements = Rstats::VectorFunc::new_logical(len);
    std::vector<IV>* values = Rstats::VectorFunc::get_integer_values(compose_elements);
    for (IV i = 0; i < len; i++) {
      Rstats::Vector* element;
      SV* sv_element = Rstats::pl_av_fetch(sv_elements, i);
      if (SvOK(sv_element)) {
        element = Rstats::pl_to_c_obj<Rstats::Vector*>(sv_element);
      }
      else {
        element = Rstats::VectorFunc::new_na();
      }
      if (Rstats::VectorFunc::exists_na_position(element, 0)) {
        na_positions.push_back(i);
      }
      else {
        Rstats::VectorFunc::set_integer_value(compose_elements, i, Rstats::VectorFunc::get_integer_value(element, 0));
      }
    }
  }
  else {
    croak("Unknown type(Rstats::VectorFunc::compose)");
  }

  for (IV i = 0; i < na_positions.size(); i++) {
    Rstats::VectorFunc::add_na_position(compose_elements, na_positions[i]);
  }

  SV* sv_compose_elements = Rstats::pl_to_perl_obj(compose_elements, "Rstats::Vector");

  return_sv(sv_compose_elements);
}
#line 795 "Rstats.c"
	PUTBACK;
	return;
    }
}


XS(XS_Rstats__Vector_decompose); /* prototype to pass -Wmissing-prototypes */
XS(XS_Rstats__Vector_decompose)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	SV *	RETVAL;
#line 351 "Rstats.xs"
{
  Rstats::Vector* self = Rstats::pl_to_c_obj<Rstats::Vector*>(ST(0));

  SV* sv_decompose_elements = Rstats::pl_new_av_ref();

  IV length = Rstats::VectorFunc::get_length(self);

  if (length > 0) {
    av_extend(Rstats::pl_av_deref(sv_decompose_elements), length);

    if (Rstats::VectorFunc::is_character(self)) {
      for (IV i = 0; i < length; i++) {
        Rstats::Vector* elements
          = Rstats::VectorFunc::new_character(1, Rstats::VectorFunc::get_character_value(self, i));
        if (Rstats::VectorFunc::exists_na_position(self, i)) {
          Rstats::VectorFunc::add_na_position(elements, 0);
        }
        SV* sv_elements = Rstats::pl_to_perl_obj(elements, "Rstats::Vector");
        Rstats::pl_av_push(sv_decompose_elements, sv_elements);
      }
    }
    else if (Rstats::VectorFunc::is_complex(self)) {
      for (IV i = 0; i < length; i++) {
        Rstats::Vector* elements
          = Rstats::VectorFunc::new_complex(1, Rstats::VectorFunc::get_complex_value(self, i));
        if (Rstats::VectorFunc::exists_na_position(self, i)) {
          Rstats::VectorFunc::add_na_position(elements, 0);
        }
        SV* sv_elements = Rstats::pl_to_perl_obj(elements, "Rstats::Vector");
        Rstats::pl_av_push(sv_decompose_elements, sv_elements);
      }
    }
    else if (Rstats::VectorFunc::is_double(self)) {

      for (IV i = 0; i < length; i++) {
        Rstats::Vector* elements
          = Rstats::VectorFunc::new_double(1, Rstats::VectorFunc::get_double_value(self, i));
        if (Rstats::VectorFunc::exists_na_position(self, i)) {
          Rstats::VectorFunc::add_na_position(elements, 0);
        }
       SV* sv_elements = Rstats::pl_to_perl_obj(elements, "Rstats::Vector");
        Rstats::pl_av_push(sv_decompose_elements, sv_elements);
      }
    }
    else if (Rstats::VectorFunc::is_integer(self)) {
      for (IV i = 0; i < length; i++) {
        Rstats::Vector* elements
          = Rstats::VectorFunc::new_integer(1, Rstats::VectorFunc::get_integer_value(self, i));
        if (Rstats::VectorFunc::exists_na_position(self, i)) {
          Rstats::VectorFunc::add_na_position(elements, 0);
        }
        SV* sv_elements = Rstats::pl_to_perl_obj(elements, "Rstats::Vector");
        Rstats::pl_av_push(sv_decompose_elements, sv_elements);
      }
    }
    else if (Rstats::VectorFunc::is_logical(self)) {
      for (IV i = 0; i < length; i++) {
        Rstats::Vector* elements
          = Rstats::VectorFunc::new_logical(1, Rstats::VectorFunc::get_integer_value(self, i));
        if (Rstats::VectorFunc::exists_na_position(self, i)) {
          Rstats::VectorFunc::add_na_position(elements, 0);
        }
        SV* sv_elements = Rstats::pl_to_perl_obj(elements, "Rstats::Vector");
        Rstats::pl_av_push(sv_decompose_elements, sv_elements);
      }
    }
  }

  return_sv(sv_decompose_elements);
}
#line 886 "Rstats.c"
	PUTBACK;
	return;
    }
}


XS(XS_Rstats__Vector_is_finite); /* prototype to pass -Wmissing-prototypes */
XS(XS_Rstats__Vector_is_finite)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	SV *	RETVAL;
#line 425 "Rstats.xs"
{
  Rstats::Vector* self = Rstats::pl_to_c_obj<Rstats::Vector*>(ST(0));

  Rstats::Vector* rets = Rstats::VectorFunc::is_finite(self);

  SV* sv_rets = Rstats::pl_to_perl_obj(rets, "Rstats::Vector");

  return_sv(sv_rets);
}
#line 916 "Rstats.c"
	PUTBACK;
	return;
    }
}


XS(XS_Rstats__Vector_clone); /* prototype to pass -Wmissing-prototypes */
XS(XS_Rstats__Vector_clone)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	SV *	RETVAL;
#line 438 "Rstats.xs"
{
  Rstats::Vector* self = Rstats::pl_to_c_obj<Rstats::Vector*>(ST(0));

  Rstats::Vector* e2 = Rstats::VectorFunc::clone(self);

  SV* sv_e2 = Rstats::pl_to_perl_obj(e2, "Rstats::Vector");

  return_sv(sv_e2);
}
#line 946 "Rstats.c"
	PUTBACK;
	return;
    }
}


XS(XS_Rstats__Vector_is_infinite); /* prototype to pass -Wmissing-prototypes */
XS(XS_Rstats__Vector_is_infinite)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	SV *	RETVAL;
#line 451 "Rstats.xs"
{
  Rstats::Vector* self = Rstats::pl_to_c_obj<Rstats::Vector*>(ST(0));

  Rstats::Vector* rets = Rstats::VectorFunc::is_infinite(self);

  SV* sv_rets = Rstats::pl_to_perl_obj(rets, "Rstats::Vector");

  return_sv(sv_rets);
}
#line 976 "Rstats.c"
	PUTBACK;
	return;
    }
}


XS(XS_Rstats__Vector_is_nan); /* prototype to pass -Wmissing-prototypes */
XS(XS_Rstats__Vector_is_nan)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	SV *	RETVAL;
#line 464 "Rstats.xs"
{
  Rstats::Vector* self = Rstats::pl_to_c_obj<Rstats::Vector*>(ST(0));

  Rstats::Vector* rets = Rstats::VectorFunc::is_nan(self);

  SV* sv_rets = Rstats::pl_to_perl_obj(rets, "Rstats::Vector");

  return_sv(sv_rets);
}
#line 1006 "Rstats.c"
	PUTBACK;
	return;
    }
}


XS(XS_Rstats__Vector_type); /* prototype to pass -Wmissing-prototypes */
XS(XS_Rstats__Vector_type)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	SV *	RETVAL;
#line 477 "Rstats.xs"
{
  Rstats::Vector* self = Rstats::pl_to_c_obj<Rstats::Vector*>(ST(0));

  SV* sv_type;

  if (Rstats::VectorFunc::is_logical(self)) {
    sv_type = Rstats::pl_new_sv_pv("logical");
  }
  else if (Rstats::VectorFunc::is_integer(self)) {
    sv_type = Rstats::pl_new_sv_pv("integer");
  }
  else if (Rstats::VectorFunc::is_double(self)) {
    sv_type = Rstats::pl_new_sv_pv("double");
  }
  else if (Rstats::VectorFunc::is_complex(self)) {
    sv_type = Rstats::pl_new_sv_pv("complex");
  }
  else if (Rstats::VectorFunc::is_character(self)) {
    sv_type = Rstats::pl_new_sv_pv("character");
  }

  return_sv(sv_type);
}
#line 1050 "Rstats.c"
	PUTBACK;
	return;
    }
}


XS(XS_Rstats__Vector_flag); /* prototype to pass -Wmissing-prototypes */
XS(XS_Rstats__Vector_flag)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	SV *	RETVAL;
#line 504 "Rstats.xs"
{
  Rstats::Vector* self = Rstats::pl_to_c_obj<Rstats::Vector*>(ST(0));

  SV* sv_flag;
  if (Rstats::VectorFunc::get_type(self) == Rstats::VectorType::DOUBLE) {
    if (Rstats::VectorFunc::is_infinite(self)) {
      NV value = Rstats::VectorFunc::get_double_value(self, 0);
      if (value > 0) {
        sv_flag = Rstats::pl_new_sv_pv("inf");
      }
      else {
        sv_flag = Rstats::pl_new_sv_pv("-inf");
      }
    }
    else if(Rstats::VectorFunc::is_nan(self)) {
      sv_flag = Rstats::pl_new_sv_pv("nan");
    }
    else {
      sv_flag = Rstats::pl_new_sv_pv("normal");
    }
  }
  else {
    sv_flag = Rstats::pl_new_sv_pv("normal");
  }

  return_sv(sv_flag);
}
#line 1098 "Rstats.c"
	PUTBACK;
	return;
    }
}


XS(XS_Rstats__Vector_DESTROY); /* prototype to pass -Wmissing-prototypes */
XS(XS_Rstats__Vector_DESTROY)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	SV *	RETVAL;
#line 535 "Rstats.xs"
{
  Rstats::Vector* self = Rstats::pl_to_c_obj<Rstats::Vector*>(ST(0));

  Rstats::VectorFunc::delete_vector(self);
}
#line 1124 "Rstats.c"
	PUTBACK;
	return;
    }
}


XS(XS_Rstats__VectorFunc_negation); /* prototype to pass -Wmissing-prototypes */
XS(XS_Rstats__VectorFunc_negation)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	SV *	RETVAL;
#line 546 "Rstats.xs"
{
  Rstats::Vector* e1 = Rstats::pl_to_c_obj<Rstats::Vector*>(ST(0));
  Rstats::Vector* e2 = Rstats::VectorFunc::negation(e1);
  SV* sv_e2 = Rstats::pl_to_perl_obj(e2, "Rstats::Vector");
  return_sv(sv_e2);
}
#line 1151 "Rstats.c"
	PUTBACK;
	return;
    }
}


XS(XS_Rstats__VectorFunc_remainder); /* prototype to pass -Wmissing-prototypes */
XS(XS_Rstats__VectorFunc_remainder)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	SV *	RETVAL;
#line 556 "Rstats.xs"
{
  Rstats::Vector* e1 = Rstats::pl_to_c_obj<Rstats::Vector*>(ST(0));
  Rstats::Vector* e2 = Rstats::pl_to_c_obj<Rstats::Vector*>(ST(1));
  Rstats::Vector* e3 = Rstats::VectorFunc::reminder(e1, e2);
  SV* sv_e3 = Rstats::pl_to_perl_obj(e3, "Rstats::Vector");
  return_sv(sv_e3);
}
#line 1179 "Rstats.c"
	PUTBACK;
	return;
    }
}


XS(XS_Rstats__VectorFunc_and); /* prototype to pass -Wmissing-prototypes */
XS(XS_Rstats__VectorFunc_and)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	SV *	RETVAL;
#line 567 "Rstats.xs"
{
  Rstats::Vector* e1 = Rstats::pl_to_c_obj<Rstats::Vector*>(ST(0));
  Rstats::Vector* e2 = Rstats::pl_to_c_obj<Rstats::Vector*>(ST(1));
  Rstats::Vector* e3 = Rstats::VectorFunc::And(e1, e2);
  SV* sv_e3 = Rstats::pl_to_perl_obj(e3, "Rstats::Vector");
  return_sv(sv_e3);
}
#line 1207 "Rstats.c"
	PUTBACK;
	return;
    }
}


XS(XS_Rstats__VectorFunc_or); /* prototype to pass -Wmissing-prototypes */
XS(XS_Rstats__VectorFunc_or)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	SV *	RETVAL;
#line 578 "Rstats.xs"
{
  Rstats::Vector* e1 = Rstats::pl_to_c_obj<Rstats::Vector*>(ST(0));
  Rstats::Vector* e2 = Rstats::pl_to_c_obj<Rstats::Vector*>(ST(1));
  Rstats::Vector* e3 = Rstats::VectorFunc::Or(e1, e2);
  SV* sv_e3 = Rstats::pl_to_perl_obj(e3, "Rstats::Vector");
  return_sv(sv_e3);
}
#line 1235 "Rstats.c"
	PUTBACK;
	return;
    }
}


XS(XS_Rstats__VectorFunc_Conj); /* prototype to pass -Wmissing-prototypes */
XS(XS_Rstats__VectorFunc_Conj)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	SV *	RETVAL;
#line 588 "Rstats.xs"
{
  Rstats::Vector* e1 = Rstats::pl_to_c_obj<Rstats::Vector*>(ST(0));
  Rstats::Vector* e2 = Rstats::VectorFunc::Conj(e1);
  SV* sv_e2 = Rstats::pl_to_perl_obj(e2, "Rstats::Vector");
  return_sv(sv_e2);
}
#line 1262 "Rstats.c"
	PUTBACK;
	return;
    }
}


XS(XS_Rstats__VectorFunc_Re); /* prototype to pass -Wmissing-prototypes */
XS(XS_Rstats__VectorFunc_Re)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	SV *	RETVAL;
#line 597 "Rstats.xs"
{
  Rstats::Vector* e1 = Rstats::pl_to_c_obj<Rstats::Vector*>(ST(0));
  Rstats::Vector* e2 = Rstats::VectorFunc::Re(e1);
  SV* sv_e2 = Rstats::pl_to_perl_obj(e2, "Rstats::Vector");
  return_sv(sv_e2);
}
#line 1289 "Rstats.c"
	PUTBACK;
	return;
    }
}


XS(XS_Rstats__VectorFunc_Im); /* prototype to pass -Wmissing-prototypes */
XS(XS_Rstats__VectorFunc_Im)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	SV *	RETVAL;
#line 606 "Rstats.xs"
{
  Rstats::Vector* e1 = Rstats::pl_to_c_obj<Rstats::Vector*>(ST(0));
  Rstats::Vector* e2 = Rstats::VectorFunc::Im(e1);
  SV* sv_e2 = Rstats::pl_to_perl_obj(e2, "Rstats::Vector");
  return_sv(sv_e2);
}
#line 1316 "Rstats.c"
	PUTBACK;
	return;
    }
}


XS(XS_Rstats__VectorFunc_less_than_or_equal); /* prototype to pass -Wmissing-prototypes */
XS(XS_Rstats__VectorFunc_less_than_or_equal)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	SV *	RETVAL;
#line 616 "Rstats.xs"
{
  Rstats::Vector* e1 = Rstats::pl_to_c_obj<Rstats::Vector*>(ST(0));
  Rstats::Vector* e2 = Rstats::pl_to_c_obj<Rstats::Vector*>(ST(1));
  Rstats::Vector* e3 = Rstats::VectorFunc::less_than_or_equal(e1, e2);
  SV* sv_e3 = Rstats::pl_to_perl_obj(e3, "Rstats::Vector");
  return_sv(sv_e3);
}
#line 1344 "Rstats.c"
	PUTBACK;
	return;
    }
}


XS(XS_Rstats__VectorFunc_more_than_or_equal); /* prototype to pass -Wmissing-prototypes */
XS(XS_Rstats__VectorFunc_more_than_or_equal)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	SV *	RETVAL;
#line 627 "Rstats.xs"
{
  Rstats::Vector* e1 = Rstats::pl_to_c_obj<Rstats::Vector*>(ST(0));
  Rstats::Vector* e2 = Rstats::pl_to_c_obj<Rstats::Vector*>(ST(1));
  Rstats::Vector* e3 = Rstats::VectorFunc::more_than_or_equal(e1, e2);
  SV* sv_e3 = Rstats::pl_to_perl_obj(e3, "Rstats::Vector");
  return_sv(sv_e3);
}
#line 1372 "Rstats.c"
	PUTBACK;
	return;
    }
}


XS(XS_Rstats__VectorFunc_less_than); /* prototype to pass -Wmissing-prototypes */
XS(XS_Rstats__VectorFunc_less_than)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	SV *	RETVAL;
#line 638 "Rstats.xs"
{
  Rstats::Vector* e1 = Rstats::pl_to_c_obj<Rstats::Vector*>(ST(0));
  Rstats::Vector* e2 = Rstats::pl_to_c_obj<Rstats::Vector*>(ST(1));
  Rstats::Vector* e3 = Rstats::VectorFunc::less_than(e1, e2);
  SV* sv_e3 = Rstats::pl_to_perl_obj(e3, "Rstats::Vector");
  return_sv(sv_e3);
}
#line 1400 "Rstats.c"
	PUTBACK;
	return;
    }
}


XS(XS_Rstats__VectorFunc_more_than); /* prototype to pass -Wmissing-prototypes */
XS(XS_Rstats__VectorFunc_more_than)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	SV *	RETVAL;
#line 649 "Rstats.xs"
{
  Rstats::Vector* e1 = Rstats::pl_to_c_obj<Rstats::Vector*>(ST(0));
  Rstats::Vector* e2 = Rstats::pl_to_c_obj<Rstats::Vector*>(ST(1));
  Rstats::Vector* e3 = Rstats::VectorFunc::more_than(e1, e2);
  SV* sv_e3 = Rstats::pl_to_perl_obj(e3, "Rstats::Vector");
  return_sv(sv_e3);
}
#line 1428 "Rstats.c"
	PUTBACK;
	return;
    }
}


XS(XS_Rstats__VectorFunc_not_equal); /* prototype to pass -Wmissing-prototypes */
XS(XS_Rstats__VectorFunc_not_equal)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	SV *	RETVAL;
#line 660 "Rstats.xs"
{
  Rstats::Vector* e1 = Rstats::pl_to_c_obj<Rstats::Vector*>(ST(0));
  Rstats::Vector* e2 = Rstats::pl_to_c_obj<Rstats::Vector*>(ST(1));
  Rstats::Vector* e3 = Rstats::VectorFunc::not_equal(e1, e2);
  SV* sv_e3 = Rstats::pl_to_perl_obj(e3, "Rstats::Vector");
  return_sv(sv_e3);
}
#line 1456 "Rstats.c"
	PUTBACK;
	return;
    }
}


XS(XS_Rstats__VectorFunc_equal); /* prototype to pass -Wmissing-prototypes */
XS(XS_Rstats__VectorFunc_equal)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	SV *	RETVAL;
#line 671 "Rstats.xs"
{
  Rstats::Vector* e1 = Rstats::pl_to_c_obj<Rstats::Vector*>(ST(0));
  Rstats::Vector* e2 = Rstats::pl_to_c_obj<Rstats::Vector*>(ST(1));
  Rstats::Vector* e3 = Rstats::VectorFunc::equal(e1, e2);
  SV* sv_e3 = Rstats::pl_to_perl_obj(e3, "Rstats::Vector");
  return_sv(sv_e3);
}
#line 1484 "Rstats.c"
	PUTBACK;
	return;
    }
}


XS(XS_Rstats__VectorFunc_sum); /* prototype to pass -Wmissing-prototypes */
XS(XS_Rstats__VectorFunc_sum)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	SV *	RETVAL;
#line 682 "Rstats.xs"
{
  Rstats::Vector* e1 = Rstats::pl_to_c_obj<Rstats::Vector*>(ST(0));
  Rstats::Vector* e2 = Rstats::VectorFunc::sum(e1);
  SV* sv_e2 = Rstats::pl_to_perl_obj(e2, "Rstats::Vector");
  return_sv(sv_e2);
}
#line 1511 "Rstats.c"
	PUTBACK;
	return;
    }
}


XS(XS_Rstats__VectorFunc_prod); /* prototype to pass -Wmissing-prototypes */
XS(XS_Rstats__VectorFunc_prod)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	SV *	RETVAL;
#line 692 "Rstats.xs"
{
  Rstats::Vector* e1 = Rstats::pl_to_c_obj<Rstats::Vector*>(ST(0));
  Rstats::Vector* e2 = Rstats::VectorFunc::prod(e1);
  SV* sv_e2 = Rstats::pl_to_perl_obj(e2, "Rstats::Vector");
  return_sv(sv_e2);
}
#line 1538 "Rstats.c"
	PUTBACK;
	return;
    }
}


XS(XS_Rstats__VectorFunc_cumsum); /* prototype to pass -Wmissing-prototypes */
XS(XS_Rstats__VectorFunc_cumsum)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	SV *	RETVAL;
#line 702 "Rstats.xs"
{
  Rstats::Vector* e1 = Rstats::pl_to_c_obj<Rstats::Vector*>(ST(0));
  Rstats::Vector* e2 = Rstats::VectorFunc::cumsum(e1);
  SV* sv_e2 = Rstats::pl_to_perl_obj(e2, "Rstats::Vector");
  return_sv(sv_e2);
}
#line 1565 "Rstats.c"
	PUTBACK;
	return;
    }
}


XS(XS_Rstats__VectorFunc_cumprod); /* prototype to pass -Wmissing-prototypes */
XS(XS_Rstats__VectorFunc_cumprod)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	SV *	RETVAL;
#line 712 "Rstats.xs"
{
  Rstats::Vector* e1 = Rstats::pl_to_c_obj<Rstats::Vector*>(ST(0));
  Rstats::Vector* e2 = Rstats::VectorFunc::cumprod(e1);
  SV* sv_e2 = Rstats::pl_to_perl_obj(e2, "Rstats::Vector");
  return_sv(sv_e2);
}
#line 1592 "Rstats.c"
	PUTBACK;
	return;
    }
}


XS(XS_Rstats__VectorFunc_add); /* prototype to pass -Wmissing-prototypes */
XS(XS_Rstats__VectorFunc_add)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	SV *	RETVAL;
#line 722 "Rstats.xs"
{
  Rstats::Vector* e1 = Rstats::pl_to_c_obj<Rstats::Vector*>(ST(0));
  Rstats::Vector* e2 = Rstats::pl_to_c_obj<Rstats::Vector*>(ST(1));
  Rstats::Vector* e3 = Rstats::VectorFunc::add(e1, e2);
  SV* sv_e3 = Rstats::pl_to_perl_obj(e3, "Rstats::Vector");
  return_sv(sv_e3);
}
#line 1620 "Rstats.c"
	PUTBACK;
	return;
    }
}


XS(XS_Rstats__VectorFunc_atan2); /* prototype to pass -Wmissing-prototypes */
XS(XS_Rstats__VectorFunc_atan2)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	SV *	RETVAL;
#line 733 "Rstats.xs"
{
  Rstats::Vector* e1 = Rstats::pl_to_c_obj<Rstats::Vector*>(ST(0));
  Rstats::Vector* e2 = Rstats::pl_to_c_obj<Rstats::Vector*>(ST(1));
  Rstats::Vector* e3 = Rstats::VectorFunc::atan2(e1, e2);
  SV* sv_e3 = Rstats::pl_to_perl_obj(e3, "Rstats::Vector");
  return_sv(sv_e3);
}
#line 1648 "Rstats.c"
	PUTBACK;
	return;
    }
}


XS(XS_Rstats__VectorFunc_subtract); /* prototype to pass -Wmissing-prototypes */
XS(XS_Rstats__VectorFunc_subtract)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	SV *	RETVAL;
#line 744 "Rstats.xs"
{
  Rstats::Vector* e1 = Rstats::pl_to_c_obj<Rstats::Vector*>(ST(0));
  Rstats::Vector* e2 = Rstats::pl_to_c_obj<Rstats::Vector*>(ST(1));
  Rstats::Vector* e3 = Rstats::VectorFunc::subtract(e1, e2);
  SV* sv_e3 = Rstats::pl_to_perl_obj(e3, "Rstats::Vector");
  return_sv(sv_e3);
}
#line 1676 "Rstats.c"
	PUTBACK;
	return;
    }
}


XS(XS_Rstats__VectorFunc_multiply); /* prototype to pass -Wmissing-prototypes */
XS(XS_Rstats__VectorFunc_multiply)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	SV *	RETVAL;
#line 755 "Rstats.xs"
{
  Rstats::Vector* e1 = Rstats::pl_to_c_obj<Rstats::Vector*>(ST(0));
  Rstats::Vector* e2 = Rstats::pl_to_c_obj<Rstats::Vector*>(ST(1));
  Rstats::Vector* e3 = Rstats::VectorFunc::multiply(e1, e2);
  SV* sv_e3 = Rstats::pl_to_perl_obj(e3, "Rstats::Vector");
  return_sv(sv_e3);
}
#line 1704 "Rstats.c"
	PUTBACK;
	return;
    }
}


XS(XS_Rstats__VectorFunc_divide); /* prototype to pass -Wmissing-prototypes */
XS(XS_Rstats__VectorFunc_divide)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	SV *	RETVAL;
#line 766 "Rstats.xs"
{
  Rstats::Vector* e1 = Rstats::pl_to_c_obj<Rstats::Vector*>(ST(0));
  Rstats::Vector* e2 = Rstats::pl_to_c_obj<Rstats::Vector*>(ST(1));
  Rstats::Vector* e3 = Rstats::VectorFunc::divide(e1, e2);
  SV* sv_e3 = Rstats::pl_to_perl_obj(e3, "Rstats::Vector");
  return_sv(sv_e3);
}
#line 1732 "Rstats.c"
	PUTBACK;
	return;
    }
}


XS(XS_Rstats__VectorFunc_pow); /* prototype to pass -Wmissing-prototypes */
XS(XS_Rstats__VectorFunc_pow)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	SV *	RETVAL;
#line 777 "Rstats.xs"
{
  Rstats::Vector* e1 = Rstats::pl_to_c_obj<Rstats::Vector*>(ST(0));
  Rstats::Vector* e2 = Rstats::pl_to_c_obj<Rstats::Vector*>(ST(1));
  Rstats::Vector* e3 = Rstats::VectorFunc::pow(e1, e2);
  SV* sv_e3 = Rstats::pl_to_perl_obj(e3, "Rstats::Vector");
  return_sv(sv_e3);
}
#line 1760 "Rstats.c"
	PUTBACK;
	return;
    }
}


XS(XS_Rstats__VectorFunc_sqrt); /* prototype to pass -Wmissing-prototypes */
XS(XS_Rstats__VectorFunc_sqrt)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	SV *	RETVAL;
#line 788 "Rstats.xs"
{
  Rstats::Vector* e1 = Rstats::pl_to_c_obj<Rstats::Vector*>(ST(0));
  Rstats::Vector* e2 = Rstats::VectorFunc::sqrt(e1);
  SV* sv_e2 = Rstats::pl_to_perl_obj(e2, "Rstats::Vector");
  return_sv(sv_e2);
}
#line 1787 "Rstats.c"
	PUTBACK;
	return;
    }
}


XS(XS_Rstats__VectorFunc_sin); /* prototype to pass -Wmissing-prototypes */
XS(XS_Rstats__VectorFunc_sin)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	SV *	RETVAL;
#line 798 "Rstats.xs"
{
  Rstats::Vector* e1 = Rstats::pl_to_c_obj<Rstats::Vector*>(ST(0));
  Rstats::Vector* e2 = Rstats::VectorFunc::sin(e1);
  SV* sv_e2 = Rstats::pl_to_perl_obj(e2, "Rstats::Vector");
  return_sv(sv_e2);
}
#line 1814 "Rstats.c"
	PUTBACK;
	return;
    }
}


XS(XS_Rstats__VectorFunc_asinh); /* prototype to pass -Wmissing-prototypes */
XS(XS_Rstats__VectorFunc_asinh)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	SV *	RETVAL;
#line 808 "Rstats.xs"
{
  Rstats::Vector* e1 = Rstats::pl_to_c_obj<Rstats::Vector*>(ST(0));
  Rstats::Vector* e2 = Rstats::VectorFunc::asinh(e1);
  SV* sv_e2 = Rstats::pl_to_perl_obj(e2, "Rstats::Vector");
  return_sv(sv_e2);
}
#line 1841 "Rstats.c"
	PUTBACK;
	return;
    }
}


XS(XS_Rstats__VectorFunc_acosh); /* prototype to pass -Wmissing-prototypes */
XS(XS_Rstats__VectorFunc_acosh)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	SV *	RETVAL;
#line 818 "Rstats.xs"
{
  Rstats::Vector* e1 = Rstats::pl_to_c_obj<Rstats::Vector*>(ST(0));
  Rstats::Vector* e2 = Rstats::VectorFunc::acosh(e1);
  SV* sv_e2 = Rstats::pl_to_perl_obj(e2, "Rstats::Vector");
  return_sv(sv_e2);
}
#line 1868 "Rstats.c"
	PUTBACK;
	return;
    }
}


XS(XS_Rstats__VectorFunc_atanh); /* prototype to pass -Wmissing-prototypes */
XS(XS_Rstats__VectorFunc_atanh)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	SV *	RETVAL;
#line 828 "Rstats.xs"
{
  Rstats::Vector* e1 = Rstats::pl_to_c_obj<Rstats::Vector*>(ST(0));
  Rstats::Vector* e2 = Rstats::VectorFunc::atanh(e1);
  SV* sv_e2 = Rstats::pl_to_perl_obj(e2, "Rstats::Vector");
  return_sv(sv_e2);
}
#line 1895 "Rstats.c"
	PUTBACK;
	return;
    }
}


XS(XS_Rstats__VectorFunc_asin); /* prototype to pass -Wmissing-prototypes */
XS(XS_Rstats__VectorFunc_asin)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	SV *	RETVAL;
#line 838 "Rstats.xs"
{
  Rstats::Vector* e1 = Rstats::pl_to_c_obj<Rstats::Vector*>(ST(0));
  Rstats::Vector* e2 = Rstats::VectorFunc::asin(e1);
  SV* sv_e2 = Rstats::pl_to_perl_obj(e2, "Rstats::Vector");
  return_sv(sv_e2);
}
#line 1922 "Rstats.c"
	PUTBACK;
	return;
    }
}


XS(XS_Rstats__VectorFunc_acos); /* prototype to pass -Wmissing-prototypes */
XS(XS_Rstats__VectorFunc_acos)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	SV *	RETVAL;
#line 848 "Rstats.xs"
{
  Rstats::Vector* e1 = Rstats::pl_to_c_obj<Rstats::Vector*>(ST(0));
  Rstats::Vector* e2 = Rstats::VectorFunc::acos(e1);
  SV* sv_e2 = Rstats::pl_to_perl_obj(e2, "Rstats::Vector");
  return_sv(sv_e2);
}
#line 1949 "Rstats.c"
	PUTBACK;
	return;
    }
}


XS(XS_Rstats__VectorFunc_atan); /* prototype to pass -Wmissing-prototypes */
XS(XS_Rstats__VectorFunc_atan)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	SV *	RETVAL;
#line 858 "Rstats.xs"
{
  Rstats::Vector* e1 = Rstats::pl_to_c_obj<Rstats::Vector*>(ST(0));
  Rstats::Vector* e2 = Rstats::VectorFunc::atan(e1);
  SV* sv_e2 = Rstats::pl_to_perl_obj(e2, "Rstats::Vector");
  return_sv(sv_e2);
}
#line 1976 "Rstats.c"
	PUTBACK;
	return;
    }
}


XS(XS_Rstats__VectorFunc_cos); /* prototype to pass -Wmissing-prototypes */
XS(XS_Rstats__VectorFunc_cos)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	SV *	RETVAL;
#line 868 "Rstats.xs"
{
  Rstats::Vector* e1 = Rstats::pl_to_c_obj<Rstats::Vector*>(ST(0));
  Rstats::Vector* e2 = Rstats::VectorFunc::cos(e1);
  SV* sv_e2 = Rstats::pl_to_perl_obj(e2, "Rstats::Vector");
  return_sv(sv_e2);
}
#line 2003 "Rstats.c"
	PUTBACK;
	return;
    }
}


XS(XS_Rstats__VectorFunc_tan); /* prototype to pass -Wmissing-prototypes */
XS(XS_Rstats__VectorFunc_tan)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	SV *	RETVAL;
#line 878 "Rstats.xs"
{
  Rstats::Vector* e1 = Rstats::pl_to_c_obj<Rstats::Vector*>(ST(0));
  Rstats::Vector* e2 = Rstats::VectorFunc::tan(e1);
  SV* sv_e2 = Rstats::pl_to_perl_obj(e2, "Rstats::Vector");
  return_sv(sv_e2);
}
#line 2030 "Rstats.c"
	PUTBACK;
	return;
    }
}


XS(XS_Rstats__VectorFunc_sinh); /* prototype to pass -Wmissing-prototypes */
XS(XS_Rstats__VectorFunc_sinh)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	SV *	RETVAL;
#line 888 "Rstats.xs"
{
  Rstats::Vector* e1 = Rstats::pl_to_c_obj<Rstats::Vector*>(ST(0));
  Rstats::Vector* e2 = Rstats::VectorFunc::sinh(e1);
  SV* sv_e2 = Rstats::pl_to_perl_obj(e2, "Rstats::Vector");
  return_sv(sv_e2);
}
#line 2057 "Rstats.c"
	PUTBACK;
	return;
    }
}


XS(XS_Rstats__VectorFunc_cosh); /* prototype to pass -Wmissing-prototypes */
XS(XS_Rstats__VectorFunc_cosh)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	SV *	RETVAL;
#line 898 "Rstats.xs"
{
  Rstats::Vector* e1 = Rstats::pl_to_c_obj<Rstats::Vector*>(ST(0));
  Rstats::Vector* e2 = Rstats::VectorFunc::cosh(e1);
  SV* sv_e2 = Rstats::pl_to_perl_obj(e2, "Rstats::Vector");
  return_sv(sv_e2);
}
#line 2084 "Rstats.c"
	PUTBACK;
	return;
    }
}


XS(XS_Rstats__VectorFunc_tanh); /* prototype to pass -Wmissing-prototypes */
XS(XS_Rstats__VectorFunc_tanh)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	SV *	RETVAL;
#line 908 "Rstats.xs"
{
  Rstats::Vector* e1 = Rstats::pl_to_c_obj<Rstats::Vector*>(ST(0));
  Rstats::Vector* e2 = Rstats::VectorFunc::tanh(e1);
  SV* sv_e2 = Rstats::pl_to_perl_obj(e2, "Rstats::Vector");
  return_sv(sv_e2);
}
#line 2111 "Rstats.c"
	PUTBACK;
	return;
    }
}


XS(XS_Rstats__VectorFunc_abs); /* prototype to pass -Wmissing-prototypes */
XS(XS_Rstats__VectorFunc_abs)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	SV *	RETVAL;
#line 918 "Rstats.xs"
{
  Rstats::Vector* e1 = Rstats::pl_to_c_obj<Rstats::Vector*>(ST(0));
  Rstats::Vector* e2 = Rstats::VectorFunc::abs(e1);
  SV* sv_e2 = Rstats::pl_to_perl_obj(e2, "Rstats::Vector");
  return_sv(sv_e2);
}
#line 2138 "Rstats.c"
	PUTBACK;
	return;
    }
}


XS(XS_Rstats__VectorFunc_log); /* prototype to pass -Wmissing-prototypes */
XS(XS_Rstats__VectorFunc_log)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	SV *	RETVAL;
#line 928 "Rstats.xs"
{
  Rstats::Vector* e1 = Rstats::pl_to_c_obj<Rstats::Vector*>(ST(0));
  Rstats::Vector* e2 = Rstats::VectorFunc::log(e1);
  SV* sv_e2 = Rstats::pl_to_perl_obj(e2, "Rstats::Vector");
  return_sv(sv_e2);
}
#line 2165 "Rstats.c"
	PUTBACK;
	return;
    }
}


XS(XS_Rstats__VectorFunc_logb); /* prototype to pass -Wmissing-prototypes */
XS(XS_Rstats__VectorFunc_logb)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	SV *	RETVAL;
#line 938 "Rstats.xs"
{
  Rstats::Vector* e1 = Rstats::pl_to_c_obj<Rstats::Vector*>(ST(0));
  Rstats::Vector* e2 = Rstats::VectorFunc::logb(e1);
  SV* sv_e2 = Rstats::pl_to_perl_obj(e2, "Rstats::Vector");
  return_sv(sv_e2);
}
#line 2192 "Rstats.c"
	PUTBACK;
	return;
    }
}


XS(XS_Rstats__VectorFunc_log10); /* prototype to pass -Wmissing-prototypes */
XS(XS_Rstats__VectorFunc_log10)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	SV *	RETVAL;
#line 948 "Rstats.xs"
{
  Rstats::Vector* e1 = Rstats::pl_to_c_obj<Rstats::Vector*>(ST(0));
  Rstats::Vector* e2 = Rstats::VectorFunc::log10(e1);
  SV* sv_e2 = Rstats::pl_to_perl_obj(e2, "Rstats::Vector");
  return_sv(sv_e2);
}
#line 2219 "Rstats.c"
	PUTBACK;
	return;
    }
}


XS(XS_Rstats__VectorFunc_log2); /* prototype to pass -Wmissing-prototypes */
XS(XS_Rstats__VectorFunc_log2)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	SV *	RETVAL;
#line 958 "Rstats.xs"
{
  Rstats::Vector* e1 = Rstats::pl_to_c_obj<Rstats::Vector*>(ST(0));
  Rstats::Vector* e2 = Rstats::VectorFunc::log2(e1);
  SV* sv_e2 = Rstats::pl_to_perl_obj(e2, "Rstats::Vector");
  return_sv(sv_e2);
}
#line 2246 "Rstats.c"
	PUTBACK;
	return;
    }
}


XS(XS_Rstats__VectorFunc_Arg); /* prototype to pass -Wmissing-prototypes */
XS(XS_Rstats__VectorFunc_Arg)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	SV *	RETVAL;
#line 968 "Rstats.xs"
{
  Rstats::Vector* e1 = Rstats::pl_to_c_obj<Rstats::Vector*>(ST(0));
  Rstats::Vector* e2 = Rstats::VectorFunc::Arg(e1);
  SV* sv_e2 = Rstats::pl_to_perl_obj(e2, "Rstats::Vector");
  return_sv(sv_e2);
}
#line 2273 "Rstats.c"
	PUTBACK;
	return;
    }
}


XS(XS_Rstats__VectorFunc_Mod); /* prototype to pass -Wmissing-prototypes */
XS(XS_Rstats__VectorFunc_Mod)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	SV *	RETVAL;
#line 978 "Rstats.xs"
{
  Rstats::Vector* e1 = Rstats::pl_to_c_obj<Rstats::Vector*>(ST(0));
  Rstats::Vector* e2 = Rstats::VectorFunc::Mod(e1);
  SV* sv_e2 = Rstats::pl_to_perl_obj(e2, "Rstats::Vector");
  return_sv(sv_e2);
}
#line 2300 "Rstats.c"
	PUTBACK;
	return;
    }
}


XS(XS_Rstats__VectorFunc_exp); /* prototype to pass -Wmissing-prototypes */
XS(XS_Rstats__VectorFunc_exp)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	SV *	RETVAL;
#line 988 "Rstats.xs"
{
  Rstats::Vector* e1 = Rstats::pl_to_c_obj<Rstats::Vector*>(ST(0));
  Rstats::Vector* e2 = Rstats::VectorFunc::exp(e1);
  SV* sv_e2 = Rstats::pl_to_perl_obj(e2, "Rstats::Vector");
  return_sv(sv_e2);
}
#line 2327 "Rstats.c"
	PUTBACK;
	return;
    }
}


XS(XS_Rstats__VectorFunc_expm1); /* prototype to pass -Wmissing-prototypes */
XS(XS_Rstats__VectorFunc_expm1)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	SV *	RETVAL;
#line 998 "Rstats.xs"
{
  Rstats::Vector* e1 = Rstats::pl_to_c_obj<Rstats::Vector*>(ST(0));
  Rstats::Vector* e2 = Rstats::VectorFunc::expm1(e1);
  SV* sv_e2 = Rstats::pl_to_perl_obj(e2, "Rstats::Vector");
  return_sv(sv_e2);
}
#line 2354 "Rstats.c"
	PUTBACK;
	return;
    }
}


XS(XS_Rstats__VectorFunc_complex_double); /* prototype to pass -Wmissing-prototypes */
XS(XS_Rstats__VectorFunc_complex_double)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	SV *	RETVAL;
#line 1008 "Rstats.xs"
{
  Rstats::Vector* re = Rstats::pl_to_c_obj<Rstats::Vector*>(ST(0));
  Rstats::Vector* im = Rstats::pl_to_c_obj<Rstats::Vector*>(ST(1));
  Rstats::Vector* z = Rstats::VectorFunc::new_complex(
    1,
    std::complex<NV>(Rstats::VectorFunc::get_double_value(re, 0), Rstats::VectorFunc::get_double_value(im, 0))
  );
  SV* sv_z = Rstats::pl_to_perl_obj(z, "Rstats::Vector");
  return_sv(sv_z);
}
#line 2385 "Rstats.c"
	PUTBACK;
	return;
    }
}


XS(XS_Rstats__VectorFunc_new_negative_inf); /* prototype to pass -Wmissing-prototypes */
XS(XS_Rstats__VectorFunc_new_negative_inf)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	SV *	RETVAL;
#line 1022 "Rstats.xs"
{
  Rstats::Vector* element = Rstats::VectorFunc::new_negative_inf();
  SV* sv_element = Rstats::pl_to_perl_obj(element, "Rstats::Vector");
  return_sv(sv_element);
}
#line 2411 "Rstats.c"
	PUTBACK;
	return;
    }
}


XS(XS_Rstats__VectorFunc_new_inf); /* prototype to pass -Wmissing-prototypes */
XS(XS_Rstats__VectorFunc_new_inf)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	SV *	RETVAL;
#line 1031 "Rstats.xs"
{
  Rstats::Vector* element = Rstats::VectorFunc::new_inf();
  SV* sv_element = Rstats::pl_to_perl_obj(element, "Rstats::Vector");
  return_sv(sv_element);
}
#line 2437 "Rstats.c"
	PUTBACK;
	return;
    }
}


XS(XS_Rstats__VectorFunc_new_nan); /* prototype to pass -Wmissing-prototypes */
XS(XS_Rstats__VectorFunc_new_nan)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	SV *	RETVAL;
#line 1040 "Rstats.xs"
{
  Rstats::Vector* element = Rstats::VectorFunc::new_nan();
  SV* sv_element = Rstats::pl_to_perl_obj(element, "Rstats::Vector");
  return_sv(sv_element);
}
#line 2463 "Rstats.c"
	PUTBACK;
	return;
    }
}


XS(XS_Rstats__VectorFunc_new_na); /* prototype to pass -Wmissing-prototypes */
XS(XS_Rstats__VectorFunc_new_na)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	SV *	RETVAL;
#line 1049 "Rstats.xs"
{
  Rstats::Vector* element = Rstats::VectorFunc::new_na();
  SV* sv_element = Rstats::pl_to_perl_obj(element, "Rstats::Vector");
  return_sv(sv_element);
}
#line 2489 "Rstats.c"
	PUTBACK;
	return;
    }
}


XS(XS_Rstats__VectorFunc_new_null); /* prototype to pass -Wmissing-prototypes */
XS(XS_Rstats__VectorFunc_new_null)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	SV *	RETVAL;
#line 1058 "Rstats.xs"
{
  Rstats::Vector* element = Rstats::VectorFunc::new_null();
  SV* sv_element = Rstats::pl_to_perl_obj(element, "Rstats::Vector");
  return_sv(sv_element);
}
#line 2515 "Rstats.c"
	PUTBACK;
	return;
    }
}


XS(XS_Rstats__VectorFunc_new_character); /* prototype to pass -Wmissing-prototypes */
XS(XS_Rstats__VectorFunc_new_character)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	SV *	RETVAL;
#line 1067 "Rstats.xs"
{
  Rstats::Vector* element = Rstats::VectorFunc::new_character(items);
  for (int i = 0; i < items; i++) {
    SV* sv_value = ST(i);
    if (SvOK(sv_value)) {
      Rstats::VectorFunc::set_character_value(element, i, sv_value);
    }
    else {
      Rstats::VectorFunc::add_na_position(element, i);
    }
  }
  SV* sv_element = Rstats::pl_to_perl_obj(element, "Rstats::Vector");

  return_sv(sv_element);
}
#line 2551 "Rstats.c"
	PUTBACK;
	return;
    }
}


XS(XS_Rstats__VectorFunc_new_complex); /* prototype to pass -Wmissing-prototypes */
XS(XS_Rstats__VectorFunc_new_complex)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	SV *	RETVAL;
#line 1086 "Rstats.xs"
{
  Rstats::Vector* element = Rstats::VectorFunc::new_complex(items);
  for (int i = 0; i < items; i++) {
    SV* sv_value = ST(i);

    if (SvOK(sv_value)) {
      SV* sv_value_re = Rstats::pl_hv_fetch(sv_value, "re");
      SV* sv_value_im = Rstats::pl_hv_fetch(sv_value, "im");

      NV value_re;
      if (SvOK(sv_value_re)) {
        char* sv_value_re_str = SvPV_nolen(sv_value_re);
        if (strEQ(sv_value_re_str, "NaN")) {
          value_re =NAN;
        }
        else if (strEQ(sv_value_re_str, "Inf")) {
          value_re = INFINITY;
        }
        else if (strEQ(sv_value_re_str, "-Inf")) {
          value_re = -(INFINITY);
        }
        else {
          value_re = SvNV(sv_value_re);
        }
      }
      else {
        value_re = 0;
      }

      NV value_im;
      if (SvOK(sv_value_im)) {
        char* sv_value_im_str = SvPV_nolen(sv_value_im);
        if (strEQ(sv_value_im_str, "NaN")) {
          value_im =NAN;
        }
        else if (strEQ(sv_value_im_str, "Inf")) {
          value_im = INFINITY;
        }
        else if (strEQ(sv_value_im_str, "-Inf")) {
          value_im = -(INFINITY);
        }
        else {
          value_im = SvNV(sv_value_im);
        }
      }
      else {
        value_im = 0;
      }

      Rstats::VectorFunc::set_complex_value(element, i, std::complex<NV>(value_re, value_im));
    }
    else {
      Rstats::VectorFunc::add_na_position(element, i);
    }
  }

  SV* sv_element = Rstats::pl_to_perl_obj(element, "Rstats::Vector");
  return_sv(sv_element);
}
#line 2631 "Rstats.c"
	PUTBACK;
	return;
    }
}


XS(XS_Rstats__VectorFunc_new_logical); /* prototype to pass -Wmissing-prototypes */
XS(XS_Rstats__VectorFunc_new_logical)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	SV *	RETVAL;
#line 1149 "Rstats.xs"
{
  Rstats::Vector* element = Rstats::VectorFunc::new_logical(items);
  for (int i = 0; i < items; i++) {
    SV* sv_value = ST(i);
    if (SvOK(sv_value)) {
      IV value = SvIV(sv_value);
      Rstats::VectorFunc::set_integer_value(element, i, value ? 1 : 0);
    }
    else {
      Rstats::VectorFunc::add_na_position(element, i);
    }
  }
  SV* sv_element = Rstats::pl_to_perl_obj(element, "Rstats::Vector");
  return_sv(sv_element);
}
#line 2667 "Rstats.c"
	PUTBACK;
	return;
    }
}


XS(XS_Rstats__VectorFunc_new_true); /* prototype to pass -Wmissing-prototypes */
XS(XS_Rstats__VectorFunc_new_true)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	SV *	RETVAL;
#line 1168 "Rstats.xs"
{
  Rstats::Vector* element = Rstats::VectorFunc::new_true();
  SV* sv_element = Rstats::pl_to_perl_obj(element, "Rstats::Vector");
  return_sv(sv_element);
}
#line 2693 "Rstats.c"
	PUTBACK;
	return;
    }
}


XS(XS_Rstats__VectorFunc_new_false); /* prototype to pass -Wmissing-prototypes */
XS(XS_Rstats__VectorFunc_new_false)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	SV *	RETVAL;
#line 1177 "Rstats.xs"
{
  Rstats::Vector* element = Rstats::VectorFunc::new_false();
  SV* sv_element = Rstats::pl_to_perl_obj(element, "Rstats::Vector");
  return_sv(sv_element);
}
#line 2719 "Rstats.c"
	PUTBACK;
	return;
    }
}


XS(XS_Rstats__VectorFunc_new_double); /* prototype to pass -Wmissing-prototypes */
XS(XS_Rstats__VectorFunc_new_double)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	SV *	RETVAL;
#line 1186 "Rstats.xs"
{
  Rstats::Vector* element = Rstats::VectorFunc::new_double(items);
  for (int i = 0; i < items; i++) {
    SV* sv_value = ST(i);
    if (SvOK(sv_value)) {
      char* sv_value_str = SvPV_nolen(sv_value);
      if (strEQ(sv_value_str, "NaN")) {
        Rstats::VectorFunc::set_double_value(element, i, NAN);
      }
      else if (strEQ(sv_value_str, "Inf")) {
        Rstats::VectorFunc::set_double_value(element, i, INFINITY);
      }
      else if (strEQ(sv_value_str, "-Inf")) {
        Rstats::VectorFunc::set_double_value(element, i, -(INFINITY));
      }
      else {
        NV value = SvNV(sv_value);
        Rstats::VectorFunc::set_double_value(element, i, value);
      }
    }
    else {
      Rstats::VectorFunc::add_na_position(element, i);
    }
  }
  SV* sv_element = Rstats::pl_to_perl_obj(element, "Rstats::Vector");
  return_sv(sv_element);
}
#line 2767 "Rstats.c"
	PUTBACK;
	return;
    }
}


XS(XS_Rstats__VectorFunc_new_integer); /* prototype to pass -Wmissing-prototypes */
XS(XS_Rstats__VectorFunc_new_integer)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	SV *	RETVAL;
#line 1217 "Rstats.xs"
{
  Rstats::Vector* element = Rstats::VectorFunc::new_integer(items);
  for (int i = 0; i < items; i++) {
    SV* sv_value = ST(i);
    if (SvOK(sv_value)) {
      IV value = SvIV(sv_value);
      Rstats::VectorFunc::set_integer_value(element, i, value);
    }
    else {
      Rstats::VectorFunc::add_na_position(element, i);
    }
  }
  SV* sv_element = Rstats::pl_to_perl_obj(element, "Rstats::Vector");
  return_sv(sv_element);
}
#line 2803 "Rstats.c"
	PUTBACK;
	return;
    }
}


XS(XS_Rstats__Util_pi); /* prototype to pass -Wmissing-prototypes */
XS(XS_Rstats__Util_pi)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	SV *	RETVAL;
#line 1238 "Rstats.xs"
{
  NV pi = Rstats::Util::pi();
  SV* sv_pi = Rstats::pl_new_sv_nv(pi);

  return_sv(sv_pi);
}
#line 2830 "Rstats.c"
	PUTBACK;
	return;
    }
}


XS(XS_Rstats__Util_is_perl_number); /* prototype to pass -Wmissing-prototypes */
XS(XS_Rstats__Util_is_perl_number)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	SV *	RETVAL;
#line 1248 "Rstats.xs"
{
  SV* sv_str = ST(0);
  IV ret = Rstats::Util::is_perl_number(sv_str);
  SV* sv_ret = ret ? Rstats::pl_new_sv_iv(1) : &PL_sv_undef;
  return_sv(sv_ret);
}
#line 2857 "Rstats.c"
	PUTBACK;
	return;
    }
}


XS(XS_Rstats__Util_looks_like_integer); /* prototype to pass -Wmissing-prototypes */
XS(XS_Rstats__Util_looks_like_integer)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	SV *	RETVAL;
#line 1258 "Rstats.xs"
{
  SV* sv_str = ST(0);
  SV* sv_ret = Rstats::Util::looks_like_integer(sv_str);
  return_sv(sv_ret);
}
#line 2883 "Rstats.c"
	PUTBACK;
	return;
    }
}


XS(XS_Rstats__Util_looks_like_double); /* prototype to pass -Wmissing-prototypes */
XS(XS_Rstats__Util_looks_like_double)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	SV *	RETVAL;
#line 1267 "Rstats.xs"
{
  SV* sv_str = ST(0);
  SV* sv_ret = Rstats::Util::looks_like_double(sv_str);
  return_sv(sv_ret);
}
#line 2909 "Rstats.c"
	PUTBACK;
	return;
    }
}


XS(XS_Rstats__Util_looks_like_na); /* prototype to pass -Wmissing-prototypes */
XS(XS_Rstats__Util_looks_like_na)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	SV *	RETVAL;
#line 1276 "Rstats.xs"
{
  SV* sv_str = ST(0);
  SV* sv_ret = Rstats::Util::looks_like_na(sv_str);
  return_sv(sv_ret);
}
#line 2935 "Rstats.c"
	PUTBACK;
	return;
    }
}


XS(XS_Rstats__Util_looks_like_logical); /* prototype to pass -Wmissing-prototypes */
XS(XS_Rstats__Util_looks_like_logical)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	SV *	RETVAL;
#line 1285 "Rstats.xs"
{
  SV* sv_str = ST(0);
  SV* sv_ret = Rstats::Util::looks_like_logical(sv_str);
  return_sv(sv_ret);
}
#line 2961 "Rstats.c"
	PUTBACK;
	return;
    }
}


XS(XS_Rstats__Util_looks_like_complex); /* prototype to pass -Wmissing-prototypes */
XS(XS_Rstats__Util_looks_like_complex)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	SV *	RETVAL;
#line 1294 "Rstats.xs"
{
  SV* sv_str = ST(0);
  SV* sv_ret = Rstats::Util::looks_like_complex(sv_str);
  return_sv(sv_ret);
}
#line 2987 "Rstats.c"
	PUTBACK;
	return;
    }
}


XS(XS_Rstats__Util_cross_product); /* prototype to pass -Wmissing-prototypes */
XS(XS_Rstats__Util_cross_product)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	SV *	RETVAL;
#line 1303 "Rstats.xs"
{
  SV* sv_ret = Rstats::Util::cross_product(ST(0));
  return_sv(sv_ret);
}
#line 3012 "Rstats.c"
	PUTBACK;
	return;
    }
}


XS(XS_Rstats__Util_pos_to_index); /* prototype to pass -Wmissing-prototypes */
XS(XS_Rstats__Util_pos_to_index)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	SV *	RETVAL;
#line 1311 "Rstats.xs"
{
  SV* sv_ret = Rstats::Util::pos_to_index(ST(0), ST(1));
  return_sv(sv_ret);
}
#line 3037 "Rstats.c"
	PUTBACK;
	return;
    }
}


XS(XS_Rstats__Util_index_to_pos); /* prototype to pass -Wmissing-prototypes */
XS(XS_Rstats__Util_index_to_pos)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	SV *	RETVAL;
#line 1319 "Rstats.xs"
{
  SV* sv_ret = Rstats::Util::index_to_pos(ST(0), ST(1));
  return_sv(sv_ret);
}
#line 3062 "Rstats.c"
	PUTBACK;
	return;
    }
}


XS(XS_Rstats__ArrayFunc_args); /* prototype to pass -Wmissing-prototypes */
XS(XS_Rstats__ArrayFunc_args)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	SV *	RETVAL;
#line 1328 "Rstats.xs"
{
  SV* sv_names = ST(0);
  SV* sv_args = Rstats::pl_new_av_ref();

  for (IV i = 1; i < items; i++) {
    Rstats::pl_av_push(sv_args, ST(i));
  }

  SV* sv_opt = Rstats::Util::args(sv_names, sv_args);

  return_sv(sv_opt);
}
#line 3095 "Rstats.c"
	PUTBACK;
	return;
    }
}


XS(XS_Rstats__ArrayFunc_to_c); /* prototype to pass -Wmissing-prototypes */
XS(XS_Rstats__ArrayFunc_to_c)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	SV *	RETVAL;
#line 1343 "Rstats.xs"
{
  SV* sv_x = Rstats::ArrayFunc::to_c(ST(0));

  return_sv(sv_x);
}
#line 3121 "Rstats.c"
	PUTBACK;
	return;
    }
}


XS(XS_Rstats__ArrayFunc_c); /* prototype to pass -Wmissing-prototypes */
XS(XS_Rstats__ArrayFunc_c)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	SV *	RETVAL;
#line 1351 "Rstats.xs"
{
  SV* sv_values;
  if (sv_derived_from(ST(0), "ARRAY")) {
    sv_values = ST(0);
  }
  else {
    sv_values = Rstats::pl_new_av_ref();
    for (IV i = 0; i < items; i++) {
      Rstats::pl_av_push(sv_values, ST(i));
    }
  }

  SV* sv_x1 = Rstats::ArrayFunc::c(sv_values);

  return_sv(sv_x1);
}
#line 3158 "Rstats.c"
	PUTBACK;
	return;
    }
}

#ifdef __cplusplus
extern "C"
#endif
XS(boot_Rstats); /* prototype to pass -Wmissing-prototypes */
XS(boot_Rstats)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
#if (PERL_REVISION == 5 && PERL_VERSION < 9)
    char* file = __FILE__;
#else
    const char* file = __FILE__;
#endif

    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(items); /* -W */
#ifdef XS_APIVERSION_BOOTCHECK
    XS_APIVERSION_BOOTCHECK;
#endif
    XS_VERSION_BOOTCHECK ;

        newXS("Rstats::Vector::values", XS_Rstats__Vector_values, file);
        newXS("Rstats::Vector::value", XS_Rstats__Vector_value, file);
        newXS("Rstats::Vector::is_character", XS_Rstats__Vector_is_character, file);
        newXS("Rstats::Vector::is_complex", XS_Rstats__Vector_is_complex, file);
        newXS("Rstats::Vector::is_numeric", XS_Rstats__Vector_is_numeric, file);
        newXS("Rstats::Vector::is_double", XS_Rstats__Vector_is_double, file);
        newXS("Rstats::Vector::is_integer", XS_Rstats__Vector_is_integer, file);
        newXS("Rstats::Vector::is_logical", XS_Rstats__Vector_is_logical, file);
        newXS("Rstats::Vector::as", XS_Rstats__Vector_as, file);
        newXS("Rstats::Vector::to_string_pos", XS_Rstats__Vector_to_string_pos, file);
        newXS("Rstats::Vector::to_string", XS_Rstats__Vector_to_string, file);
        newXS("Rstats::Vector::as_character", XS_Rstats__Vector_as_character, file);
        newXS("Rstats::Vector::as_complex", XS_Rstats__Vector_as_complex, file);
        newXS("Rstats::Vector::as_logical", XS_Rstats__Vector_as_logical, file);
        newXS("Rstats::Vector::as_numeric", XS_Rstats__Vector_as_numeric, file);
        newXS("Rstats::Vector::as_double", XS_Rstats__Vector_as_double, file);
        newXS("Rstats::Vector::as_integer", XS_Rstats__Vector_as_integer, file);
        newXS("Rstats::Vector::new_null", XS_Rstats__Vector_new_null, file);
        newXS("Rstats::Vector::length_value", XS_Rstats__Vector_length_value, file);
        newXS("Rstats::Vector::length", XS_Rstats__Vector_length, file);
        newXS("Rstats::Vector::is_na", XS_Rstats__Vector_is_na, file);
        newXS("Rstats::Vector::compose", XS_Rstats__Vector_compose, file);
        newXS("Rstats::Vector::decompose", XS_Rstats__Vector_decompose, file);
        newXS("Rstats::Vector::is_finite", XS_Rstats__Vector_is_finite, file);
        newXS("Rstats::Vector::clone", XS_Rstats__Vector_clone, file);
        newXS("Rstats::Vector::is_infinite", XS_Rstats__Vector_is_infinite, file);
        newXS("Rstats::Vector::is_nan", XS_Rstats__Vector_is_nan, file);
        newXS("Rstats::Vector::type", XS_Rstats__Vector_type, file);
        newXS("Rstats::Vector::flag", XS_Rstats__Vector_flag, file);
        newXS("Rstats::Vector::DESTROY", XS_Rstats__Vector_DESTROY, file);
        newXS("Rstats::VectorFunc::negation", XS_Rstats__VectorFunc_negation, file);
        newXS("Rstats::VectorFunc::remainder", XS_Rstats__VectorFunc_remainder, file);
        newXS("Rstats::VectorFunc::and", XS_Rstats__VectorFunc_and, file);
        newXS("Rstats::VectorFunc::or", XS_Rstats__VectorFunc_or, file);
        newXS("Rstats::VectorFunc::Conj", XS_Rstats__VectorFunc_Conj, file);
        newXS("Rstats::VectorFunc::Re", XS_Rstats__VectorFunc_Re, file);
        newXS("Rstats::VectorFunc::Im", XS_Rstats__VectorFunc_Im, file);
        newXS("Rstats::VectorFunc::less_than_or_equal", XS_Rstats__VectorFunc_less_than_or_equal, file);
        newXS("Rstats::VectorFunc::more_than_or_equal", XS_Rstats__VectorFunc_more_than_or_equal, file);
        newXS("Rstats::VectorFunc::less_than", XS_Rstats__VectorFunc_less_than, file);
        newXS("Rstats::VectorFunc::more_than", XS_Rstats__VectorFunc_more_than, file);
        newXS("Rstats::VectorFunc::not_equal", XS_Rstats__VectorFunc_not_equal, file);
        newXS("Rstats::VectorFunc::equal", XS_Rstats__VectorFunc_equal, file);
        newXS("Rstats::VectorFunc::sum", XS_Rstats__VectorFunc_sum, file);
        newXS("Rstats::VectorFunc::prod", XS_Rstats__VectorFunc_prod, file);
        newXS("Rstats::VectorFunc::cumsum", XS_Rstats__VectorFunc_cumsum, file);
        newXS("Rstats::VectorFunc::cumprod", XS_Rstats__VectorFunc_cumprod, file);
        newXS("Rstats::VectorFunc::add", XS_Rstats__VectorFunc_add, file);
        newXS("Rstats::VectorFunc::atan2", XS_Rstats__VectorFunc_atan2, file);
        newXS("Rstats::VectorFunc::subtract", XS_Rstats__VectorFunc_subtract, file);
        newXS("Rstats::VectorFunc::multiply", XS_Rstats__VectorFunc_multiply, file);
        newXS("Rstats::VectorFunc::divide", XS_Rstats__VectorFunc_divide, file);
        newXS("Rstats::VectorFunc::pow", XS_Rstats__VectorFunc_pow, file);
        newXS("Rstats::VectorFunc::sqrt", XS_Rstats__VectorFunc_sqrt, file);
        newXS("Rstats::VectorFunc::sin", XS_Rstats__VectorFunc_sin, file);
        newXS("Rstats::VectorFunc::asinh", XS_Rstats__VectorFunc_asinh, file);
        newXS("Rstats::VectorFunc::acosh", XS_Rstats__VectorFunc_acosh, file);
        newXS("Rstats::VectorFunc::atanh", XS_Rstats__VectorFunc_atanh, file);
        newXS("Rstats::VectorFunc::asin", XS_Rstats__VectorFunc_asin, file);
        newXS("Rstats::VectorFunc::acos", XS_Rstats__VectorFunc_acos, file);
        newXS("Rstats::VectorFunc::atan", XS_Rstats__VectorFunc_atan, file);
        newXS("Rstats::VectorFunc::cos", XS_Rstats__VectorFunc_cos, file);
        newXS("Rstats::VectorFunc::tan", XS_Rstats__VectorFunc_tan, file);
        newXS("Rstats::VectorFunc::sinh", XS_Rstats__VectorFunc_sinh, file);
        newXS("Rstats::VectorFunc::cosh", XS_Rstats__VectorFunc_cosh, file);
        newXS("Rstats::VectorFunc::tanh", XS_Rstats__VectorFunc_tanh, file);
        newXS("Rstats::VectorFunc::abs", XS_Rstats__VectorFunc_abs, file);
        newXS("Rstats::VectorFunc::log", XS_Rstats__VectorFunc_log, file);
        newXS("Rstats::VectorFunc::logb", XS_Rstats__VectorFunc_logb, file);
        newXS("Rstats::VectorFunc::log10", XS_Rstats__VectorFunc_log10, file);
        newXS("Rstats::VectorFunc::log2", XS_Rstats__VectorFunc_log2, file);
        newXS("Rstats::VectorFunc::Arg", XS_Rstats__VectorFunc_Arg, file);
        newXS("Rstats::VectorFunc::Mod", XS_Rstats__VectorFunc_Mod, file);
        newXS("Rstats::VectorFunc::exp", XS_Rstats__VectorFunc_exp, file);
        newXS("Rstats::VectorFunc::expm1", XS_Rstats__VectorFunc_expm1, file);
        newXS("Rstats::VectorFunc::complex_double", XS_Rstats__VectorFunc_complex_double, file);
        newXS("Rstats::VectorFunc::new_negative_inf", XS_Rstats__VectorFunc_new_negative_inf, file);
        newXS("Rstats::VectorFunc::new_inf", XS_Rstats__VectorFunc_new_inf, file);
        newXS("Rstats::VectorFunc::new_nan", XS_Rstats__VectorFunc_new_nan, file);
        newXS("Rstats::VectorFunc::new_na", XS_Rstats__VectorFunc_new_na, file);
        newXS("Rstats::VectorFunc::new_null", XS_Rstats__VectorFunc_new_null, file);
        newXS("Rstats::VectorFunc::new_character", XS_Rstats__VectorFunc_new_character, file);
        newXS("Rstats::VectorFunc::new_complex", XS_Rstats__VectorFunc_new_complex, file);
        newXS("Rstats::VectorFunc::new_logical", XS_Rstats__VectorFunc_new_logical, file);
        newXS("Rstats::VectorFunc::new_true", XS_Rstats__VectorFunc_new_true, file);
        newXS("Rstats::VectorFunc::new_false", XS_Rstats__VectorFunc_new_false, file);
        newXS("Rstats::VectorFunc::new_double", XS_Rstats__VectorFunc_new_double, file);
        newXS("Rstats::VectorFunc::new_integer", XS_Rstats__VectorFunc_new_integer, file);
        newXS("Rstats::Util::pi", XS_Rstats__Util_pi, file);
        newXS("Rstats::Util::is_perl_number", XS_Rstats__Util_is_perl_number, file);
        newXS("Rstats::Util::looks_like_integer", XS_Rstats__Util_looks_like_integer, file);
        newXS("Rstats::Util::looks_like_double", XS_Rstats__Util_looks_like_double, file);
        newXS("Rstats::Util::looks_like_na", XS_Rstats__Util_looks_like_na, file);
        newXS("Rstats::Util::looks_like_logical", XS_Rstats__Util_looks_like_logical, file);
        newXS("Rstats::Util::looks_like_complex", XS_Rstats__Util_looks_like_complex, file);
        newXS("Rstats::Util::cross_product", XS_Rstats__Util_cross_product, file);
        newXS("Rstats::Util::pos_to_index", XS_Rstats__Util_pos_to_index, file);
        newXS("Rstats::Util::index_to_pos", XS_Rstats__Util_index_to_pos, file);
        newXS("Rstats::ArrayFunc::args", XS_Rstats__ArrayFunc_args, file);
        newXS("Rstats::ArrayFunc::to_c", XS_Rstats__ArrayFunc_to_c, file);
        newXS("Rstats::ArrayFunc::c", XS_Rstats__ArrayFunc_c, file);
#if (PERL_REVISION == 5 && PERL_VERSION >= 9)
  if (PL_unitcheckav)
       call_list(PL_scopestack_ix, PL_unitcheckav);
#endif
    XSRETURN_YES;
}

