line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
MODULE = Geo::Geos PACKAGE = Geo::Geos::Index::MonotoneChain |
2
|
|
|
|
|
|
|
PROTOTYPES: DISABLE |
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
Sv new(SV*, Array pts, std::size_t start, std::size_t end) { |
5
|
4
|
50
|
|
|
|
|
auto seq = Helper::convert_coords(pts); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
6
|
2
|
50
|
|
|
|
|
auto seq_ptr = seq.clone(); |
7
|
2
|
50
|
|
|
|
|
auto payload = new MonotoneChain_payload(); |
8
|
2
|
|
|
|
|
|
payload->seq.reset(seq_ptr); |
9
|
|
|
|
|
|
|
|
10
|
4
|
50
|
|
|
|
|
Object wrapped = xs::out<>(new MonotoneChain(*seq_ptr, start, end, NULL)); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
11
|
2
|
50
|
|
|
|
|
wrapped.payload_attach(payload, &payload_marker_MonotoneChain); |
12
|
|
|
|
|
|
|
|
13
|
2
|
50
|
|
|
|
|
RETVAL = wrapped.ref(); |
|
|
50
|
|
|
|
|
|
14
|
|
|
|
|
|
|
} |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
Array getChains(Array pts) { |
17
|
2
|
50
|
|
|
|
|
auto seq = Helper::convert_coords(pts); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
18
|
2
|
50
|
|
|
|
|
std::vector v; |
19
|
1
|
50
|
|
|
|
|
MonotoneChainBuilder::getChains(&seq, NULL, v); |
20
|
|
|
|
|
|
|
|
21
|
2
|
50
|
|
|
|
|
Array result = Array::create(v.size()); |
|
|
50
|
|
|
|
|
|
22
|
6
|
100
|
|
|
|
|
for(auto mc: v) { |
23
|
5
|
50
|
|
|
|
|
result.push(xs::out(mc)); |
|
|
50
|
|
|
|
|
|
24
|
|
|
|
|
|
|
} |
25
|
1
|
50
|
|
|
|
|
RETVAL = result; |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
Envelope* MonotoneChain::getEnvelope () { |
29
|
2
|
|
|
|
|
|
RETVAL = new Envelope(THIS->getEnvelope()); |
30
|
1
|
50
|
|
|
|
|
} |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
31
|
|
|
|
|
|
|
|
32
|
1
|
|
|
|
|
|
size_t MonotoneChain::getStartIndex() |
33
|
|
|
|
|
|
|
|
34
|
1
|
|
|
|
|
|
size_t MonotoneChain::getEndIndex() |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
LineSegment* MonotoneChain::getLineSegment(std::size_t index){ |
37
|
4
|
|
|
|
|
|
LineSegment ls; |
38
|
4
|
50
|
|
|
|
|
THIS->getLineSegment(index, ls); |
39
|
2
|
50
|
|
|
|
|
RETVAL = new LineSegment(ls); |
40
|
2
|
50
|
|
|
|
|
} |
|
|
50
|
|
|
|
|
|
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
Array MonotoneChain::getCoordinates () { |
43
|
2
|
50
|
|
|
|
|
auto smart_ptr = THIS->getCoordinates(); |
|
|
50
|
|
|
|
|
|
44
|
1
|
50
|
|
|
|
|
RETVAL = Helper::convert_copy(smart_ptr.get()); |
45
|
|
|
|
|
|
|
} |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
void MonotoneChain::computeOverlaps(MonotoneChain &mc, MonotoneChainOverlapAction &mco) { |
48
|
1
|
|
|
|
|
|
THIS->computeOverlaps(&mc, &mco); |
49
|
|
|
|
|
|
|
} |
50
|
|
|
|
|
|
|
|
51
|
1
|
|
|
|
|
|
void MonotoneChain::setId(int nId) |
52
|
|
|
|
|
|
|
|
53
|
1
|
|
|
|
|
|
int MonotoneChain::getId() |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
BOOT { |
56
|
46
|
50
|
|
|
|
|
xs::exp::autoexport(Stash(__PACKAGE__)); |
|
|
50
|
|
|
|
|
|
57
|
46
|
|
|
|
|
|
payload_marker_MonotoneChain.svt_free = payload_marker_MonotoneChain_free; |
58
|
|
|
|
|
|
|
} |