line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
## File: PDL::CCS.pm |
2
|
|
|
|
|
|
|
## Author: Bryan Jurish |
3
|
|
|
|
|
|
|
## Description: top-level PDL::CCS (also pulls in compatibility code) |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
package PDL::CCS; |
6
|
4
|
|
|
4
|
|
928064
|
use PDL; |
|
4
|
|
|
|
|
11
|
|
|
4
|
|
|
|
|
23
|
|
7
|
4
|
|
|
4
|
|
13346
|
use PDL::CCS::Config; |
|
4
|
|
|
|
|
10
|
|
|
4
|
|
|
|
|
219
|
|
8
|
4
|
|
|
4
|
|
2071
|
use PDL::CCS::Compat; |
|
4
|
|
|
|
|
13
|
|
|
4
|
|
|
|
|
44
|
|
9
|
4
|
|
|
4
|
|
1827
|
use PDL::CCS::Functions; |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
28
|
|
10
|
4
|
|
|
4
|
|
694
|
use PDL::CCS::Utils; |
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
28
|
|
11
|
4
|
|
|
4
|
|
499
|
use PDL::CCS::Ufunc; |
|
4
|
|
|
|
|
10
|
|
|
4
|
|
|
|
|
45
|
|
12
|
4
|
|
|
4
|
|
634
|
use PDL::CCS::Ops; |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
17
|
|
13
|
4
|
|
|
4
|
|
2528
|
use PDL::CCS::MatrixOps; |
|
4
|
|
|
|
|
9
|
|
|
4
|
|
|
|
|
27
|
|
14
|
4
|
|
|
4
|
|
3800
|
use PDL::CCS::Nd; |
|
4
|
|
|
|
|
14
|
|
|
4
|
|
|
|
|
202
|
|
15
|
4
|
|
|
4
|
|
2245
|
use PDL::CCS::IO::FastRaw; |
|
4
|
|
|
|
|
14
|
|
|
4
|
|
|
|
|
45
|
|
16
|
4
|
|
|
4
|
|
498
|
use strict; |
|
4
|
|
|
|
|
10
|
|
|
4
|
|
|
|
|
940
|
|
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
our $VERSION = '1.23.11'; ##-- update with perl-reversion from Perl::Version module |
19
|
|
|
|
|
|
|
our @ISA = ('PDL::Exporter'); |
20
|
|
|
|
|
|
|
our @EXPORT_OK = |
21
|
|
|
|
|
|
|
( |
22
|
|
|
|
|
|
|
@PDL::CCS::Config::EXPORT_OK, |
23
|
|
|
|
|
|
|
@PDL::CCS::Compat::EXPORT_OK, |
24
|
|
|
|
|
|
|
@PDL::CCS::Functions::EXPORT_OK, |
25
|
|
|
|
|
|
|
@PDL::CCS::Utils::EXPORT_OK, |
26
|
|
|
|
|
|
|
@PDL::CCS::Ufunc::EXPORT_OK, |
27
|
|
|
|
|
|
|
@PDL::CCS::Ops::EXPORT_OK, |
28
|
|
|
|
|
|
|
@PDL::CCS::MatrixOps::EXPORT_OK, |
29
|
|
|
|
|
|
|
@PDL::CCS::Nd::EXPORT_OK, |
30
|
|
|
|
|
|
|
@PDL::CCS::IO::FastRaw::EXPORT_OK, |
31
|
|
|
|
|
|
|
); |
32
|
|
|
|
|
|
|
our %EXPORT_TAGS = |
33
|
|
|
|
|
|
|
( |
34
|
|
|
|
|
|
|
Func => [ |
35
|
|
|
|
|
|
|
@{$PDL::CCS::Config::EXPORT_TAGS{Func}}, |
36
|
|
|
|
|
|
|
@{$PDL::CCS::Compat::EXPORT_TAGS{Func}}, |
37
|
|
|
|
|
|
|
@{$PDL::CCS::Functions::EXPORT_TAGS{Func}}, |
38
|
|
|
|
|
|
|
@{$PDL::CCS::Utils::EXPORT_TAGS{Func}}, |
39
|
|
|
|
|
|
|
@{$PDL::CCS::Ufunc::EXPORT_TAGS{Func}}, |
40
|
|
|
|
|
|
|
@{$PDL::CCS::Ops::EXPORT_TAGS{Func}}, |
41
|
|
|
|
|
|
|
@{$PDL::CCS::MatrixOps::EXPORT_TAGS{Func}}, |
42
|
|
|
|
|
|
|
@{$PDL::CCS::Nd::EXPORT_TAGS{Func}}, |
43
|
|
|
|
|
|
|
@{$PDL::CCS::IO::FastRaw::EXPORT_TAGS{Func}}, |
44
|
|
|
|
|
|
|
], ##-- respect PDL conventions (hopefully) |
45
|
|
|
|
|
|
|
); |
46
|
|
|
|
|
|
|
our @EXPORT = @{$EXPORT_TAGS{Func}}; |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
1; ##-- make perl happy |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
##====================================================================== |
52
|
|
|
|
|
|
|
## pod: headers |
53
|
|
|
|
|
|
|
=pod |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=head1 NAME |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
PDL::CCS - Sparse N-dimensional PDLs with compressed column storage |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=head1 SYNOPSIS |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
use PDL; |
62
|
|
|
|
|
|
|
use PDL::CCS; |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
## ... stuff happens ... |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=cut |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
##====================================================================== |
69
|
|
|
|
|
|
|
## DESCRIPTION |
70
|
|
|
|
|
|
|
##====================================================================== |
71
|
|
|
|
|
|
|
=pod |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
=head1 DESCRIPTION |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
PDL::CCS is now just a wrapper package which pulls in a number of |
76
|
|
|
|
|
|
|
submodules. See the documentation of the respective modules for details. |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
=cut |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
##====================================================================== |
81
|
|
|
|
|
|
|
## Submodules |
82
|
|
|
|
|
|
|
##====================================================================== |
83
|
|
|
|
|
|
|
=pod |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
=head2 Modules |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
=over 4 |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
=item L |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
Perl class for representing large sparse N-dimensional numeric structures |
92
|
|
|
|
|
|
|
using sorted index vector-vectors and a flat vector of non-missing values. |
93
|
|
|
|
|
|
|
Supports a subset of the perl-side PDL API. |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
=item L |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
Backwards-compatibility module for Harwell-Boeing compressed row- or column-storage. |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
=item L |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
Some useful generic pure-perl functions for dealing directly with |
102
|
|
|
|
|
|
|
CCS-, CRS-, and index-encoded PDLs. |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
=item L |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
Low-level generic PDL::PP utilities for Harwell-Boeing encoding and decoding |
107
|
|
|
|
|
|
|
"pointers" along arbitrary dimensions of a sparse PDL given an index list. |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
=item L |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
Low-level generic PDL::PP utilities for blockwise alignment of pairs |
112
|
|
|
|
|
|
|
of sparse index-encoded PDLs, useful for implementing binary operations. |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
=item L |
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
Various low-level ufunc (accumulator) utilities for index-encoded PDLs. |
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
=item L |
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
Low-level generic PDL::PP utilities for matrix operations |
121
|
|
|
|
|
|
|
on index-encoded PDLs. |
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
=item L |
124
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
PDL::IO::FastRaw wrappers for PDL::CCS::Nd objects. |
126
|
|
|
|
|
|
|
|
127
|
|
|
|
|
|
|
=back |
128
|
|
|
|
|
|
|
|
129
|
|
|
|
|
|
|
=cut |
130
|
|
|
|
|
|
|
|
131
|
|
|
|
|
|
|
|
132
|
|
|
|
|
|
|
##====================================================================== |
133
|
|
|
|
|
|
|
## Footer Administrivia |
134
|
|
|
|
|
|
|
##====================================================================== |
135
|
|
|
|
|
|
|
|
136
|
|
|
|
|
|
|
##--------------------------------------------------------------------- |
137
|
|
|
|
|
|
|
=pod |
138
|
|
|
|
|
|
|
|
139
|
|
|
|
|
|
|
=head1 ACKNOWLEDGEMENTS |
140
|
|
|
|
|
|
|
|
141
|
|
|
|
|
|
|
Perl by Larry Wall. |
142
|
|
|
|
|
|
|
|
143
|
|
|
|
|
|
|
PDL by Karl Glazebrook, Tuomas J. Lukka, Christian Soeller, and others. |
144
|
|
|
|
|
|
|
|
145
|
|
|
|
|
|
|
Original inspiration and algorithms from the SVDLIBC C library by Douglas Rohde; |
146
|
|
|
|
|
|
|
which is itself based on SVDPACKC |
147
|
|
|
|
|
|
|
by Michael Berry, Theresa Do, Gavin O'Brien, Vijay Krishna and Sowmini Varadhan. |
148
|
|
|
|
|
|
|
|
149
|
|
|
|
|
|
|
=cut |
150
|
|
|
|
|
|
|
|
151
|
|
|
|
|
|
|
##---------------------------------------------------------------------- |
152
|
|
|
|
|
|
|
=pod |
153
|
|
|
|
|
|
|
|
154
|
|
|
|
|
|
|
=head1 KNOWN BUGS |
155
|
|
|
|
|
|
|
|
156
|
|
|
|
|
|
|
=over 4 |
157
|
|
|
|
|
|
|
|
158
|
|
|
|
|
|
|
=item * |
159
|
|
|
|
|
|
|
|
160
|
|
|
|
|
|
|
PDL::CCS::Nd supports only a subset of the PDL API |
161
|
|
|
|
|
|
|
(i.e. is not really a PDL). |
162
|
|
|
|
|
|
|
|
163
|
|
|
|
|
|
|
=item * |
164
|
|
|
|
|
|
|
|
165
|
|
|
|
|
|
|
Binary operations via alignment only work correctly when |
166
|
|
|
|
|
|
|
missing values are annihilators. |
167
|
|
|
|
|
|
|
|
168
|
|
|
|
|
|
|
=item * |
169
|
|
|
|
|
|
|
|
170
|
|
|
|
|
|
|
Misleading module name: PDL::CCS::Nd objects actually use a native COO (full coordinate list) |
171
|
|
|
|
|
|
|
format rather than CRS (compressed row storage) or CCS (compressed column storage); |
172
|
|
|
|
|
|
|
see L for a discussion. |
173
|
|
|
|
|
|
|
|
174
|
|
|
|
|
|
|
=back |
175
|
|
|
|
|
|
|
|
176
|
|
|
|
|
|
|
=cut |
177
|
|
|
|
|
|
|
|
178
|
|
|
|
|
|
|
|
179
|
|
|
|
|
|
|
##--------------------------------------------------------------------- |
180
|
|
|
|
|
|
|
=pod |
181
|
|
|
|
|
|
|
|
182
|
|
|
|
|
|
|
=head1 AUTHOR |
183
|
|
|
|
|
|
|
|
184
|
|
|
|
|
|
|
Bryan Jurish Emoocow@cpan.orgE |
185
|
|
|
|
|
|
|
|
186
|
|
|
|
|
|
|
=head2 Copyright Policy |
187
|
|
|
|
|
|
|
|
188
|
|
|
|
|
|
|
Copyright (C) 2005-2018 by Bryan Jurish. All rights reserved. |
189
|
|
|
|
|
|
|
|
190
|
|
|
|
|
|
|
This package is free software, and entirely without warranty. |
191
|
|
|
|
|
|
|
You may redistribute it and/or modify it under the same terms |
192
|
|
|
|
|
|
|
as Perl itself. |
193
|
|
|
|
|
|
|
|
194
|
|
|
|
|
|
|
=head1 SEE ALSO |
195
|
|
|
|
|
|
|
|
196
|
|
|
|
|
|
|
perl(1), |
197
|
|
|
|
|
|
|
PDL(3perl), |
198
|
|
|
|
|
|
|
PDL::CCS::Nd(3perl), |
199
|
|
|
|
|
|
|
PDL::SVDLIBC(3perl), |
200
|
|
|
|
|
|
|
L. |
201
|
|
|
|
|
|
|
|
202
|
|
|
|
|
|
|
=cut |