AlignDB-IntSpanXS
view release on metacpan or search on metacpan
typedef intspan* AlignDB__IntSpanXS;
MODULE = AlignDB::IntSpanXS PACKAGE = AlignDB::IntSpanXS
int
POS_INF(itsx)
AlignDB::IntSpanXS itsx
INIT:
int i = POS_INF - 1;
PROTOTYPE: $
PPCODE:
XPUSHs(sv_2mortal(newSViv(i)));
int
NEG_INF(itsx)
AlignDB::IntSpanXS itsx
PROTOTYPE: $
PPCODE:
XPUSHs(sv_2mortal(newSViv(NEG_INF)));
SV *
EMPTY_STRING(itsx)
AlignDB::IntSpanXS itsx
PROTOTYPE: $
PPCODE:
XPUSHs(sv_2mortal(newSVpv(EMPTY_STRING, 0)));
AlignDB::IntSpanXS
_new(pack)
char *pack
PROTOTYPE: $
CODE:
RETVAL = intspan_new();
OUTPUT:
RETVAL
intspan_clear(itsx);
void
edges(itsx)
AlignDB::IntSpanXS itsx
INIT:
int i;
int j;
veci *vec;
PROTOTYPE: $
PPCODE:
vec = intspan_edges(itsx);
for (i = 0; i < veci_size(vec); i++) {
j = veci_get(vec, i);
XPUSHs(sv_2mortal(newSViv(j)));
}
#veci_destroy(vec); //this vec belongs to the intspan object
int
edge_size(itsx)
AlignDB::IntSpanXS itsx
OUTPUT:
RETVAL
SV *
as_string(itsx)
AlignDB::IntSpanXS itsx
PREINIT:
char *tmp_buffer;
int len = 1024;
PROTOTYPE: $
PPCODE:
tmp_buffer = (char *)malloc(len + 1);
if (tmp_buffer == NULL)
XSRETURN_UNDEF;
intspan_as_string(itsx, &tmp_buffer, len);
XPUSHs(sv_2mortal(newSVpv(tmp_buffer, 0)));
free(tmp_buffer);
void
as_array(itsx)
AlignDB::IntSpanXS itsx
INIT:
int i;
int j;
veci *vec;
PROTOTYPE: $
PPCODE:
vec = intspan_as_veci(itsx);
for (i = 0; i < veci_size(vec); i++) {
j = veci_get(vec, i);
XPUSHs(sv_2mortal(newSViv(j)));
}
veci_destroy(vec);
void
ranges(itsx)
AlignDB::IntSpanXS itsx
INIT:
int i;
int j;
veci *vec;
PROTOTYPE: $
PPCODE:
vec = intspan_ranges(itsx);
for (i = 0; i < veci_size(vec); i++) {
j = veci_get(vec, i);
XPUSHs(sv_2mortal(newSViv(j)));
}
veci_destroy(vec);
int
cardinality(itsx)
AlignDB::IntSpanXS itsx
( run in 0.606 second using v1.01-cache-2.11-cpan-71847e10f99 )