Branch Coverage

lib/PDL/Stats/Kmeans-pp-_random_cluster.c
Criterion Covered Total %
branch 33 56 58.9


line true false branch
39 6 0 switch (__privtrans->__datatype) { /* Start generic switch */
41 0 6 PDL_DECLARE_PARAMS__random_cluster_0(PDL_Short,S)
0 6 PDL_DECLARE_PARAMS__random_cluster_0(PDL_Short,S)
42 0 6 {if (__privtrans->ind_sizes[0] > __privtrans->ind_sizes[1]) return PDL->make_error(PDL_EUSERERROR, "Error in _random_cluster:" "more cluster than obs!");}
48 0 6 PDL_RETERROR(PDL_err, PDL->redodims_default(__privtrans));
59 0 6 if (!__privtrans->broadcast.incs) return PDL->make_error(PDL_EUSERERROR, "Error in _random_cluster:" "broadcast.incs NULL");
96 6 0 switch (__privtrans->__datatype) { /* Start generic switch */
98 0 6 PDL_DECLARE_PARAMS__random_cluster_1(PDL_Short,S)
6 0 PDL_DECLARE_PARAMS__random_cluster_1(PDL_Short,S)
0 6 PDL_DECLARE_PARAMS__random_cluster_1(PDL_Short,S)
0 6 PDL_DECLARE_PARAMS__random_cluster_1(PDL_Short,S)
6 0 PDL_DECLARE_PARAMS__random_cluster_1(PDL_Short,S)
0 6 PDL_DECLARE_PARAMS__random_cluster_1(PDL_Short,S)
101 0 6 PDL_BROADCASTLOOP_START__random_cluster_readdata
0 6 PDL_BROADCASTLOOP_START__random_cluster_readdata
0 6 PDL_BROADCASTLOOP_START__random_cluster_readdata
0 63 PDL_BROADCASTLOOP_START__random_cluster_readdata
0 63 PDL_BROADCASTLOOP_START__random_cluster_readdata
100 82 PDL_BROADCASTLOOP_START__random_cluster_readdata
82 63 PDL_BROADCASTLOOP_START__random_cluster_readdata
102 690 100 {/* Open o */ PDL_EXPAND2(register PDL_Indx o=0, __o_stop=(__o_size)); for(; o<__o_stop; o+=1) {
104 1380 690 {/* Open c */ PDL_EXPAND2(register PDL_Indx c=0, __c_stop=(__c_size)); for(; c<__c_stop; c+=1) {
108 0 63 PDL_BROADCASTLOOP_END__random_cluster_readdata
57 6 PDL_BROADCASTLOOP_END__random_cluster_readdata
142 0 6 if (!PDL) return (pdl_error){PDL_EFATAL, "PDL core struct is NULL, can't continue",0};
144 0 6 if (!__privtrans) return PDL->make_error_simple(PDL_EFATAL, "Couldn't create trans");
147 0 6 PDL_RETERROR(PDL_err, PDL->type_coerce(__privtrans));
148 0 6 PDL_RETERROR(PDL_err, PDL->make_trans_mutual(__privtrans));