ParaMonte Fortran 2.0.0
Parallel Monte Carlo and Machine Learning Library
See the latest version documentation.
pm_clusKmeans.F90
Go to the documentation of this file.
1!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
2!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
3!!!! !!!!
4!!!! ParaMonte: Parallel Monte Carlo and Machine Learning Library. !!!!
5!!!! !!!!
6!!!! Copyright (C) 2012-present, The Computational Data Science Lab !!!!
7!!!! !!!!
8!!!! This file is part of the ParaMonte library. !!!!
9!!!! !!!!
10!!!! LICENSE !!!!
11!!!! !!!!
12!!!! https://github.com/cdslaborg/paramonte/blob/main/LICENSE.md !!!!
13!!!! !!!!
14!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
15!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
16
110
111!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
112
114
115 use pm_kind, only: SK, IK, LK
117
118 implicit none
119
120 character(*, SK), parameter :: MODULE_NAME = "@pm_clusKmeans"
121
122!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
123
246
247 ! Def
248
249 interface setMember
250
251 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
252
253#if RK5_ENABLED
254 PURE module subroutine setMemberEucDef_D0_D1_RK5(membership, disq, sample, center)
255#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
256 !DEC$ ATTRIBUTES DLLEXPORT :: setMemberEucDef_D0_D1_RK5
257#endif
258 use pm_kind, only: RKG => RK5
259 real(RKG) , intent(in) :: sample
260 real(RKG) , intent(in) , contiguous :: center(:)
261 real(RKG) , intent(out) :: disq
262 integer(IK) , intent(out) :: membership
263 end subroutine
264#endif
265
266#if RK4_ENABLED
267 PURE module subroutine setMemberEucDef_D0_D1_RK4(membership, disq, sample, center)
268#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
269 !DEC$ ATTRIBUTES DLLEXPORT :: setMemberEucDef_D0_D1_RK4
270#endif
271 use pm_kind, only: RKG => RK4
272 real(RKG) , intent(in) :: sample
273 real(RKG) , intent(in) , contiguous :: center(:)
274 real(RKG) , intent(out) :: disq
275 integer(IK) , intent(out) :: membership
276 end subroutine
277#endif
278
279#if RK3_ENABLED
280 PURE module subroutine setMemberEucDef_D0_D1_RK3(membership, disq, sample, center)
281#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
282 !DEC$ ATTRIBUTES DLLEXPORT :: setMemberEucDef_D0_D1_RK3
283#endif
284 use pm_kind, only: RKG => RK3
285 real(RKG) , intent(in) :: sample
286 real(RKG) , intent(in) , contiguous :: center(:)
287 real(RKG) , intent(out) :: disq
288 integer(IK) , intent(out) :: membership
289 end subroutine
290#endif
291
292#if RK2_ENABLED
293 PURE module subroutine setMemberEucDef_D0_D1_RK2(membership, disq, sample, center)
294#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
295 !DEC$ ATTRIBUTES DLLEXPORT :: setMemberEucDef_D0_D1_RK2
296#endif
297 use pm_kind, only: RKG => RK2
298 real(RKG) , intent(in) :: sample
299 real(RKG) , intent(in) , contiguous :: center(:)
300 real(RKG) , intent(out) :: disq
301 integer(IK) , intent(out) :: membership
302 end subroutine
303#endif
304
305#if RK1_ENABLED
306 PURE module subroutine setMemberEucDef_D0_D1_RK1(membership, disq, sample, center)
307#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
308 !DEC$ ATTRIBUTES DLLEXPORT :: setMemberEucDef_D0_D1_RK1
309#endif
310 use pm_kind, only: RKG => RK1
311 real(RKG) , intent(in) :: sample
312 real(RKG) , intent(in) , contiguous :: center(:)
313 real(RKG) , intent(out) :: disq
314 integer(IK) , intent(out) :: membership
315 end subroutine
316#endif
317
318 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
319
320#if RK5_ENABLED
321 PURE module subroutine setMemberEucDef_D1_D1_RK5(membership, disq, sample, center)
322#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
323 !DEC$ ATTRIBUTES DLLEXPORT :: setMemberEucDef_D1_D1_RK5
324#endif
325 use pm_kind, only: RKG => RK5
326 real(RKG) , intent(in) , contiguous :: sample(:)
327 real(RKG) , intent(in) , contiguous :: center(:)
328 real(RKG) , intent(out) , contiguous :: disq(:)
329 integer(IK) , intent(out) , contiguous :: membership(:)
330 end subroutine
331#endif
332
333#if RK4_ENABLED
334 PURE module subroutine setMemberEucDef_D1_D1_RK4(membership, disq, sample, center)
335#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
336 !DEC$ ATTRIBUTES DLLEXPORT :: setMemberEucDef_D1_D1_RK4
337#endif
338 use pm_kind, only: RKG => RK4
339 real(RKG) , intent(in) , contiguous :: sample(:)
340 real(RKG) , intent(in) , contiguous :: center(:)
341 real(RKG) , intent(out) , contiguous :: disq(:)
342 integer(IK) , intent(out) , contiguous :: membership(:)
343 end subroutine
344#endif
345
346#if RK3_ENABLED
347 PURE module subroutine setMemberEucDef_D1_D1_RK3(membership, disq, sample, center)
348#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
349 !DEC$ ATTRIBUTES DLLEXPORT :: setMemberEucDef_D1_D1_RK3
350#endif
351 use pm_kind, only: RKG => RK3
352 real(RKG) , intent(in) , contiguous :: sample(:)
353 real(RKG) , intent(in) , contiguous :: center(:)
354 real(RKG) , intent(out) , contiguous :: disq(:)
355 integer(IK) , intent(out) , contiguous :: membership(:)
356 end subroutine
357#endif
358
359#if RK2_ENABLED
360 PURE module subroutine setMemberEucDef_D1_D1_RK2(membership, disq, sample, center)
361#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
362 !DEC$ ATTRIBUTES DLLEXPORT :: setMemberEucDef_D1_D1_RK2
363#endif
364 use pm_kind, only: RKG => RK2
365 real(RKG) , intent(in) , contiguous :: sample(:)
366 real(RKG) , intent(in) , contiguous :: center(:)
367 real(RKG) , intent(out) , contiguous :: disq(:)
368 integer(IK) , intent(out) , contiguous :: membership(:)
369 end subroutine
370#endif
371
372#if RK1_ENABLED
373 PURE module subroutine setMemberEucDef_D1_D1_RK1(membership, disq, sample, center)
374#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
375 !DEC$ ATTRIBUTES DLLEXPORT :: setMemberEucDef_D1_D1_RK1
376#endif
377 use pm_kind, only: RKG => RK1
378 real(RKG) , intent(in) , contiguous :: sample(:)
379 real(RKG) , intent(in) , contiguous :: center(:)
380 real(RKG) , intent(out) , contiguous :: disq(:)
381 integer(IK) , intent(out) , contiguous :: membership(:)
382 end subroutine
383#endif
384
385 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
386
387#if RK5_ENABLED
388 PURE module subroutine setMemberEucDef_D1_D2_RK5(membership, disq, sample, center)
389#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
390 !DEC$ ATTRIBUTES DLLEXPORT :: setMemberEucDef_D1_D2_RK5
391#endif
392 use pm_kind, only: RKG => RK5
393 real(RKG) , intent(in) , contiguous :: sample(:)
394 real(RKG) , intent(in) , contiguous :: center(:,:)
395 real(RKG) , intent(out) :: disq
396 integer(IK) , intent(out) :: membership
397 end subroutine
398#endif
399
400#if RK4_ENABLED
401 PURE module subroutine setMemberEucDef_D1_D2_RK4(membership, disq, sample, center)
402#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
403 !DEC$ ATTRIBUTES DLLEXPORT :: setMemberEucDef_D1_D2_RK4
404#endif
405 use pm_kind, only: RKG => RK4
406 real(RKG) , intent(in) , contiguous :: sample(:)
407 real(RKG) , intent(in) , contiguous :: center(:,:)
408 real(RKG) , intent(out) :: disq
409 integer(IK) , intent(out) :: membership
410 end subroutine
411#endif
412
413#if RK3_ENABLED
414 PURE module subroutine setMemberEucDef_D1_D2_RK3(membership, disq, sample, center)
415#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
416 !DEC$ ATTRIBUTES DLLEXPORT :: setMemberEucDef_D1_D2_RK3
417#endif
418 use pm_kind, only: RKG => RK3
419 real(RKG) , intent(in) , contiguous :: sample(:)
420 real(RKG) , intent(in) , contiguous :: center(:,:)
421 real(RKG) , intent(out) :: disq
422 integer(IK) , intent(out) :: membership
423 end subroutine
424#endif
425
426#if RK2_ENABLED
427 PURE module subroutine setMemberEucDef_D1_D2_RK2(membership, disq, sample, center)
428#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
429 !DEC$ ATTRIBUTES DLLEXPORT :: setMemberEucDef_D1_D2_RK2
430#endif
431 use pm_kind, only: RKG => RK2
432 real(RKG) , intent(in) , contiguous :: sample(:)
433 real(RKG) , intent(in) , contiguous :: center(:,:)
434 real(RKG) , intent(out) :: disq
435 integer(IK) , intent(out) :: membership
436 end subroutine
437#endif
438
439#if RK1_ENABLED
440 PURE module subroutine setMemberEucDef_D1_D2_RK1(membership, disq, sample, center)
441#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
442 !DEC$ ATTRIBUTES DLLEXPORT :: setMemberEucDef_D1_D2_RK1
443#endif
444 use pm_kind, only: RKG => RK1
445 real(RKG) , intent(in) , contiguous :: sample(:)
446 real(RKG) , intent(in) , contiguous :: center(:,:)
447 real(RKG) , intent(out) :: disq
448 integer(IK) , intent(out) :: membership
449 end subroutine
450#endif
451
452 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
453
454#if RK5_ENABLED
455 PURE module subroutine setMemberEucDef_D2_D2_RK5(membership, disq, sample, center)
456#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
457 !DEC$ ATTRIBUTES DLLEXPORT :: setMemberEucDef_D2_D2_RK5
458#endif
459 use pm_kind, only: RKG => RK5
460 real(RKG) , intent(in) , contiguous :: sample(:,:)
461 real(RKG) , intent(in) , contiguous :: center(:,:)
462 real(RKG) , intent(out) , contiguous :: disq(:)
463 integer(IK) , intent(out) , contiguous :: membership(:)
464 end subroutine
465#endif
466
467#if RK4_ENABLED
468 PURE module subroutine setMemberEucDef_D2_D2_RK4(membership, disq, sample, center)
469#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
470 !DEC$ ATTRIBUTES DLLEXPORT :: setMemberEucDef_D2_D2_RK4
471#endif
472 use pm_kind, only: RKG => RK4
473 real(RKG) , intent(in) , contiguous :: sample(:,:)
474 real(RKG) , intent(in) , contiguous :: center(:,:)
475 real(RKG) , intent(out) , contiguous :: disq(:)
476 integer(IK) , intent(out) , contiguous :: membership(:)
477 end subroutine
478#endif
479
480#if RK3_ENABLED
481 PURE module subroutine setMemberEucDef_D2_D2_RK3(membership, disq, sample, center)
482#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
483 !DEC$ ATTRIBUTES DLLEXPORT :: setMemberEucDef_D2_D2_RK3
484#endif
485 use pm_kind, only: RKG => RK3
486 real(RKG) , intent(in) , contiguous :: sample(:,:)
487 real(RKG) , intent(in) , contiguous :: center(:,:)
488 real(RKG) , intent(out) , contiguous :: disq(:)
489 integer(IK) , intent(out) , contiguous :: membership(:)
490 end subroutine
491#endif
492
493#if RK2_ENABLED
494 PURE module subroutine setMemberEucDef_D2_D2_RK2(membership, disq, sample, center)
495#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
496 !DEC$ ATTRIBUTES DLLEXPORT :: setMemberEucDef_D2_D2_RK2
497#endif
498 use pm_kind, only: RKG => RK2
499 real(RKG) , intent(in) , contiguous :: sample(:,:)
500 real(RKG) , intent(in) , contiguous :: center(:,:)
501 real(RKG) , intent(out) , contiguous :: disq(:)
502 integer(IK) , intent(out) , contiguous :: membership(:)
503 end subroutine
504#endif
505
506#if RK1_ENABLED
507 PURE module subroutine setMemberEucDef_D2_D2_RK1(membership, disq, sample, center)
508#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
509 !DEC$ ATTRIBUTES DLLEXPORT :: setMemberEucDef_D2_D2_RK1
510#endif
511 use pm_kind, only: RKG => RK1
512 real(RKG) , intent(in) , contiguous :: sample(:,:)
513 real(RKG) , intent(in) , contiguous :: center(:,:)
514 real(RKG) , intent(out) , contiguous :: disq(:)
515 integer(IK) , intent(out) , contiguous :: membership(:)
516 end subroutine
517#endif
518
519 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
520
521 end interface
522
523 ! Cng
524
525 interface setMember
526
527 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
528
529#if RK5_ENABLED
530 PURE module subroutine setMemberEucCng_D0_D1_RK5(membership, disq, sample, center, changed)
531#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
532 !DEC$ ATTRIBUTES DLLEXPORT :: setMemberEucCng_D0_D1_RK5
533#endif
534 use pm_kind, only: RKG => RK5
535 real(RKG) , intent(in) :: sample
536 real(RKG) , intent(in) , contiguous :: center(:)
537 real(RKG) , intent(out) :: disq
538 integer(IK) , intent(inout) :: membership
539 logical(LK) , intent(out) :: changed
540 end subroutine
541#endif
542
543#if RK4_ENABLED
544 PURE module subroutine setMemberEucCng_D0_D1_RK4(membership, disq, sample, center, changed)
545#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
546 !DEC$ ATTRIBUTES DLLEXPORT :: setMemberEucCng_D0_D1_RK4
547#endif
548 use pm_kind, only: RKG => RK4
549 real(RKG) , intent(in) :: sample
550 real(RKG) , intent(in) , contiguous :: center(:)
551 real(RKG) , intent(out) :: disq
552 integer(IK) , intent(inout) :: membership
553 logical(LK) , intent(out) :: changed
554 end subroutine
555#endif
556
557#if RK3_ENABLED
558 PURE module subroutine setMemberEucCng_D0_D1_RK3(membership, disq, sample, center, changed)
559#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
560 !DEC$ ATTRIBUTES DLLEXPORT :: setMemberEucCng_D0_D1_RK3
561#endif
562 use pm_kind, only: RKG => RK3
563 real(RKG) , intent(in) :: sample
564 real(RKG) , intent(in) , contiguous :: center(:)
565 real(RKG) , intent(out) :: disq
566 integer(IK) , intent(inout) :: membership
567 logical(LK) , intent(out) :: changed
568 end subroutine
569#endif
570
571#if RK2_ENABLED
572 PURE module subroutine setMemberEucCng_D0_D1_RK2(membership, disq, sample, center, changed)
573#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
574 !DEC$ ATTRIBUTES DLLEXPORT :: setMemberEucCng_D0_D1_RK2
575#endif
576 use pm_kind, only: RKG => RK2
577 real(RKG) , intent(in) :: sample
578 real(RKG) , intent(in) , contiguous :: center(:)
579 real(RKG) , intent(out) :: disq
580 integer(IK) , intent(inout) :: membership
581 logical(LK) , intent(out) :: changed
582 end subroutine
583#endif
584
585#if RK1_ENABLED
586 PURE module subroutine setMemberEucCng_D0_D1_RK1(membership, disq, sample, center, changed)
587#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
588 !DEC$ ATTRIBUTES DLLEXPORT :: setMemberEucCng_D0_D1_RK1
589#endif
590 use pm_kind, only: RKG => RK1
591 real(RKG) , intent(in) :: sample
592 real(RKG) , intent(in) , contiguous :: center(:)
593 real(RKG) , intent(out) :: disq
594 integer(IK) , intent(inout) :: membership
595 logical(LK) , intent(out) :: changed
596 end subroutine
597#endif
598
599 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
600
601#if RK5_ENABLED
602 PURE module subroutine setMemberEucCng_D1_D1_RK5(membership, disq, sample, center, changed)
603#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
604 !DEC$ ATTRIBUTES DLLEXPORT :: setMemberEucCng_D1_D1_RK5
605#endif
606 use pm_kind, only: RKG => RK5
607 real(RKG) , intent(in) , contiguous :: sample(:)
608 real(RKG) , intent(in) , contiguous :: center(:)
609 real(RKG) , intent(inout) , contiguous :: disq(:)
610 integer(IK) , intent(inout) , contiguous :: membership(:)
611 logical(LK) , intent(out) :: changed
612 end subroutine
613#endif
614
615#if RK4_ENABLED
616 PURE module subroutine setMemberEucCng_D1_D1_RK4(membership, disq, sample, center, changed)
617#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
618 !DEC$ ATTRIBUTES DLLEXPORT :: setMemberEucCng_D1_D1_RK4
619#endif
620 use pm_kind, only: RKG => RK4
621 real(RKG) , intent(in) , contiguous :: sample(:)
622 real(RKG) , intent(in) , contiguous :: center(:)
623 real(RKG) , intent(inout) , contiguous :: disq(:)
624 integer(IK) , intent(inout) , contiguous :: membership(:)
625 logical(LK) , intent(out) :: changed
626 end subroutine
627#endif
628
629#if RK3_ENABLED
630 PURE module subroutine setMemberEucCng_D1_D1_RK3(membership, disq, sample, center, changed)
631#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
632 !DEC$ ATTRIBUTES DLLEXPORT :: setMemberEucCng_D1_D1_RK3
633#endif
634 use pm_kind, only: RKG => RK3
635 real(RKG) , intent(in) , contiguous :: sample(:)
636 real(RKG) , intent(in) , contiguous :: center(:)
637 real(RKG) , intent(inout) , contiguous :: disq(:)
638 integer(IK) , intent(inout) , contiguous :: membership(:)
639 logical(LK) , intent(out) :: changed
640 end subroutine
641#endif
642
643#if RK2_ENABLED
644 PURE module subroutine setMemberEucCng_D1_D1_RK2(membership, disq, sample, center, changed)
645#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
646 !DEC$ ATTRIBUTES DLLEXPORT :: setMemberEucCng_D1_D1_RK2
647#endif
648 use pm_kind, only: RKG => RK2
649 real(RKG) , intent(in) , contiguous :: sample(:)
650 real(RKG) , intent(in) , contiguous :: center(:)
651 real(RKG) , intent(inout) , contiguous :: disq(:)
652 integer(IK) , intent(inout) , contiguous :: membership(:)
653 logical(LK) , intent(out) :: changed
654 end subroutine
655#endif
656
657#if RK1_ENABLED
658 PURE module subroutine setMemberEucCng_D1_D1_RK1(membership, disq, sample, center, changed)
659#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
660 !DEC$ ATTRIBUTES DLLEXPORT :: setMemberEucCng_D1_D1_RK1
661#endif
662 use pm_kind, only: RKG => RK1
663 real(RKG) , intent(in) , contiguous :: sample(:)
664 real(RKG) , intent(in) , contiguous :: center(:)
665 real(RKG) , intent(inout) , contiguous :: disq(:)
666 integer(IK) , intent(inout) , contiguous :: membership(:)
667 logical(LK) , intent(out) :: changed
668 end subroutine
669#endif
670
671 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
672
673#if RK5_ENABLED
674 PURE module subroutine setMemberEucCng_D1_D2_RK5(membership, disq, sample, center, changed)
675#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
676 !DEC$ ATTRIBUTES DLLEXPORT :: setMemberEucCng_D1_D2_RK5
677#endif
678 use pm_kind, only: RKG => RK5
679 real(RKG) , intent(in) , contiguous :: sample(:)
680 real(RKG) , intent(in) , contiguous :: center(:,:)
681 real(RKG) , intent(out) :: disq
682 integer(IK) , intent(inout) :: membership
683 logical(LK) , intent(out) :: changed
684 end subroutine
685#endif
686
687#if RK4_ENABLED
688 PURE module subroutine setMemberEucCng_D1_D2_RK4(membership, disq, sample, center, changed)
689#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
690 !DEC$ ATTRIBUTES DLLEXPORT :: setMemberEucCng_D1_D2_RK4
691#endif
692 use pm_kind, only: RKG => RK4
693 real(RKG) , intent(in) , contiguous :: sample(:)
694 real(RKG) , intent(in) , contiguous :: center(:,:)
695 real(RKG) , intent(out) :: disq
696 integer(IK) , intent(inout) :: membership
697 logical(LK) , intent(out) :: changed
698 end subroutine
699#endif
700
701#if RK3_ENABLED
702 PURE module subroutine setMemberEucCng_D1_D2_RK3(membership, disq, sample, center, changed)
703#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
704 !DEC$ ATTRIBUTES DLLEXPORT :: setMemberEucCng_D1_D2_RK3
705#endif
706 use pm_kind, only: RKG => RK3
707 real(RKG) , intent(in) , contiguous :: sample(:)
708 real(RKG) , intent(in) , contiguous :: center(:,:)
709 real(RKG) , intent(out) :: disq
710 integer(IK) , intent(inout) :: membership
711 logical(LK) , intent(out) :: changed
712 end subroutine
713#endif
714
715#if RK2_ENABLED
716 PURE module subroutine setMemberEucCng_D1_D2_RK2(membership, disq, sample, center, changed)
717#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
718 !DEC$ ATTRIBUTES DLLEXPORT :: setMemberEucCng_D1_D2_RK2
719#endif
720 use pm_kind, only: RKG => RK2
721 real(RKG) , intent(in) , contiguous :: sample(:)
722 real(RKG) , intent(in) , contiguous :: center(:,:)
723 real(RKG) , intent(out) :: disq
724 integer(IK) , intent(inout) :: membership
725 logical(LK) , intent(out) :: changed
726 end subroutine
727#endif
728
729#if RK1_ENABLED
730 PURE module subroutine setMemberEucCng_D1_D2_RK1(membership, disq, sample, center, changed)
731#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
732 !DEC$ ATTRIBUTES DLLEXPORT :: setMemberEucCng_D1_D2_RK1
733#endif
734 use pm_kind, only: RKG => RK1
735 real(RKG) , intent(in) , contiguous :: sample(:)
736 real(RKG) , intent(in) , contiguous :: center(:,:)
737 real(RKG) , intent(out) :: disq
738 integer(IK) , intent(inout) :: membership
739 logical(LK) , intent(out) :: changed
740 end subroutine
741#endif
742
743 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
744
745#if RK5_ENABLED
746 PURE module subroutine setMemberEucCng_D2_D2_RK5(membership, disq, sample, center, changed)
747#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
748 !DEC$ ATTRIBUTES DLLEXPORT :: setMemberEucCng_D2_D2_RK5
749#endif
750 use pm_kind, only: RKG => RK5
751 real(RKG) , intent(in) , contiguous :: sample(:,:)
752 real(RKG) , intent(in) , contiguous :: center(:,:)
753 real(RKG) , intent(out) , contiguous :: disq(:)
754 integer(IK) , intent(inout) , contiguous :: membership(:)
755 logical(LK) , intent(out) :: changed
756 end subroutine
757#endif
758
759#if RK4_ENABLED
760 PURE module subroutine setMemberEucCng_D2_D2_RK4(membership, disq, sample, center, changed)
761#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
762 !DEC$ ATTRIBUTES DLLEXPORT :: setMemberEucCng_D2_D2_RK4
763#endif
764 use pm_kind, only: RKG => RK4
765 real(RKG) , intent(in) , contiguous :: sample(:,:)
766 real(RKG) , intent(in) , contiguous :: center(:,:)
767 real(RKG) , intent(out) , contiguous :: disq(:)
768 integer(IK) , intent(inout) , contiguous :: membership(:)
769 logical(LK) , intent(out) :: changed
770 end subroutine
771#endif
772
773#if RK3_ENABLED
774 PURE module subroutine setMemberEucCng_D2_D2_RK3(membership, disq, sample, center, changed)
775#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
776 !DEC$ ATTRIBUTES DLLEXPORT :: setMemberEucCng_D2_D2_RK3
777#endif
778 use pm_kind, only: RKG => RK3
779 real(RKG) , intent(in) , contiguous :: sample(:,:)
780 real(RKG) , intent(in) , contiguous :: center(:,:)
781 real(RKG) , intent(out) , contiguous :: disq(:)
782 integer(IK) , intent(inout) , contiguous :: membership(:)
783 logical(LK) , intent(out) :: changed
784 end subroutine
785#endif
786
787#if RK2_ENABLED
788 PURE module subroutine setMemberEucCng_D2_D2_RK2(membership, disq, sample, center, changed)
789#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
790 !DEC$ ATTRIBUTES DLLEXPORT :: setMemberEucCng_D2_D2_RK2
791#endif
792 use pm_kind, only: RKG => RK2
793 real(RKG) , intent(in) , contiguous :: sample(:,:)
794 real(RKG) , intent(in) , contiguous :: center(:,:)
795 real(RKG) , intent(out) , contiguous :: disq(:)
796 integer(IK) , intent(inout) , contiguous :: membership(:)
797 logical(LK) , intent(out) :: changed
798 end subroutine
799#endif
800
801#if RK1_ENABLED
802 PURE module subroutine setMemberEucCng_D2_D2_RK1(membership, disq, sample, center, changed)
803#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
804 !DEC$ ATTRIBUTES DLLEXPORT :: setMemberEucCng_D2_D2_RK1
805#endif
806 use pm_kind, only: RKG => RK1
807 real(RKG) , intent(in) , contiguous :: sample(:,:)
808 real(RKG) , intent(in) , contiguous :: center(:,:)
809 real(RKG) , intent(out) , contiguous :: disq(:)
810 integer(IK) , intent(inout) , contiguous :: membership(:)
811 logical(LK) , intent(out) :: changed
812 end subroutine
813#endif
814
815 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
816
817 end interface
818
819!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
820
904 interface setCenter
905
906 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
907
908#if RK5_ENABLED
909 PURE module subroutine setCenterEuc_D1_D1_RK5(membership, disq, sample, center, size, potential)
910#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
911 !DEC$ ATTRIBUTES DLLEXPORT :: setCenterEuc_D1_D1_RK5
912#endif
913 use pm_kind, only: RKG => RK5
914 real(RKG) , intent(in) , contiguous :: sample(:)
915 real(RKG) , intent(in) , contiguous :: disq(:)
916 integer(IK) , intent(in) , contiguous :: membership(:)
917 real(RKG) , intent(out) , contiguous :: center(:)
918 real(RKG) , intent(out) , contiguous :: potential(:)
919 integer(IK) , intent(out) , contiguous :: size(:)
920 end subroutine
921#endif
922
923#if RK4_ENABLED
924 PURE module subroutine setCenterEuc_D1_D1_RK4(membership, disq, sample, center, size, potential)
925#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
926 !DEC$ ATTRIBUTES DLLEXPORT :: setCenterEuc_D1_D1_RK4
927#endif
928 use pm_kind, only: RKG => RK4
929 real(RKG) , intent(in) , contiguous :: sample(:)
930 real(RKG) , intent(in) , contiguous :: disq(:)
931 integer(IK) , intent(in) , contiguous :: membership(:)
932 real(RKG) , intent(out) , contiguous :: center(:)
933 real(RKG) , intent(out) , contiguous :: potential(:)
934 integer(IK) , intent(out) , contiguous :: size(:)
935 end subroutine
936#endif
937
938#if RK3_ENABLED
939 PURE module subroutine setCenterEuc_D1_D1_RK3(membership, disq, sample, center, size, potential)
940#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
941 !DEC$ ATTRIBUTES DLLEXPORT :: setCenterEuc_D1_D1_RK3
942#endif
943 use pm_kind, only: RKG => RK3
944 real(RKG) , intent(in) , contiguous :: sample(:)
945 real(RKG) , intent(in) , contiguous :: disq(:)
946 integer(IK) , intent(in) , contiguous :: membership(:)
947 real(RKG) , intent(out) , contiguous :: center(:)
948 real(RKG) , intent(out) , contiguous :: potential(:)
949 integer(IK) , intent(out) , contiguous :: size(:)
950 end subroutine
951#endif
952
953#if RK2_ENABLED
954 PURE module subroutine setCenterEuc_D1_D1_RK2(membership, disq, sample, center, size, potential)
955#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
956 !DEC$ ATTRIBUTES DLLEXPORT :: setCenterEuc_D1_D1_RK2
957#endif
958 use pm_kind, only: RKG => RK2
959 real(RKG) , intent(in) , contiguous :: sample(:)
960 real(RKG) , intent(in) , contiguous :: disq(:)
961 integer(IK) , intent(in) , contiguous :: membership(:)
962 real(RKG) , intent(out) , contiguous :: center(:)
963 real(RKG) , intent(out) , contiguous :: potential(:)
964 integer(IK) , intent(out) , contiguous :: size(:)
965 end subroutine
966#endif
967
968#if RK1_ENABLED
969 PURE module subroutine setCenterEuc_D1_D1_RK1(membership, disq, sample, center, size, potential)
970#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
971 !DEC$ ATTRIBUTES DLLEXPORT :: setCenterEuc_D1_D1_RK1
972#endif
973 use pm_kind, only: RKG => RK1
974 real(RKG) , intent(in) , contiguous :: sample(:)
975 real(RKG) , intent(in) , contiguous :: disq(:)
976 integer(IK) , intent(in) , contiguous :: membership(:)
977 real(RKG) , intent(out) , contiguous :: center(:)
978 real(RKG) , intent(out) , contiguous :: potential(:)
979 integer(IK) , intent(out) , contiguous :: size(:)
980 end subroutine
981#endif
982
983 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
984
985#if RK5_ENABLED
986 PURE module subroutine setCenterEuc_D2_D2_RK5(membership, disq, sample, center, size, potential)
987#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
988 !DEC$ ATTRIBUTES DLLEXPORT :: setCenterEuc_D2_D2_RK5
989#endif
990 use pm_kind, only: RKG => RK5
991 real(RKG) , intent(in) , contiguous :: sample(:,:)
992 real(RKG) , intent(in) , contiguous :: disq(:)
993 integer(IK) , intent(in) , contiguous :: membership(:)
994 real(RKG) , intent(out) , contiguous :: center(:,:)
995 integer(IK) , intent(out) , contiguous :: size(:)
996 real(RKG) , intent(out) , contiguous :: potential(:)
997 end subroutine
998#endif
999
1000#if RK4_ENABLED
1001 PURE module subroutine setCenterEuc_D2_D2_RK4(membership, disq, sample, center, size, potential)
1002#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
1003 !DEC$ ATTRIBUTES DLLEXPORT :: setCenterEuc_D2_D2_RK4
1004#endif
1005 use pm_kind, only: RKG => RK4
1006 real(RKG) , intent(in) , contiguous :: sample(:,:)
1007 real(RKG) , intent(in) , contiguous :: disq(:)
1008 integer(IK) , intent(in) , contiguous :: membership(:)
1009 real(RKG) , intent(out) , contiguous :: center(:,:)
1010 integer(IK) , intent(out) , contiguous :: size(:)
1011 real(RKG) , intent(out) , contiguous :: potential(:)
1012 end subroutine
1013#endif
1014
1015#if RK3_ENABLED
1016 PURE module subroutine setCenterEuc_D2_D2_RK3(membership, disq, sample, center, size, potential)
1017#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
1018 !DEC$ ATTRIBUTES DLLEXPORT :: setCenterEuc_D2_D2_RK3
1019#endif
1020 use pm_kind, only: RKG => RK3
1021 real(RKG) , intent(in) , contiguous :: sample(:,:)
1022 real(RKG) , intent(in) , contiguous :: disq(:)
1023 integer(IK) , intent(in) , contiguous :: membership(:)
1024 real(RKG) , intent(out) , contiguous :: center(:,:)
1025 integer(IK) , intent(out) , contiguous :: size(:)
1026 real(RKG) , intent(out) , contiguous :: potential(:)
1027 end subroutine
1028#endif
1029
1030#if RK2_ENABLED
1031 PURE module subroutine setCenterEuc_D2_D2_RK2(membership, disq, sample, center, size, potential)
1032#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
1033 !DEC$ ATTRIBUTES DLLEXPORT :: setCenterEuc_D2_D2_RK2
1034#endif
1035 use pm_kind, only: RKG => RK2
1036 real(RKG) , intent(in) , contiguous :: sample(:,:)
1037 real(RKG) , intent(in) , contiguous :: disq(:)
1038 integer(IK) , intent(in) , contiguous :: membership(:)
1039 real(RKG) , intent(out) , contiguous :: center(:,:)
1040 integer(IK) , intent(out) , contiguous :: size(:)
1041 real(RKG) , intent(out) , contiguous :: potential(:)
1042 end subroutine
1043#endif
1044
1045#if RK1_ENABLED
1046 PURE module subroutine setCenterEuc_D2_D2_RK1(membership, disq, sample, center, size, potential)
1047#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
1048 !DEC$ ATTRIBUTES DLLEXPORT :: setCenterEuc_D2_D2_RK1
1049#endif
1050 use pm_kind, only: RKG => RK1
1051 real(RKG) , intent(in) , contiguous :: sample(:,:)
1052 real(RKG) , intent(in) , contiguous :: disq(:)
1053 integer(IK) , intent(in) , contiguous :: membership(:)
1054 real(RKG) , intent(out) , contiguous :: center(:,:)
1055 integer(IK) , intent(out) , contiguous :: size(:)
1056 real(RKG) , intent(out) , contiguous :: potential(:)
1057 end subroutine
1058#endif
1059
1060 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1061
1062 end interface
1063
1064!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1065
1181 interface setKmeansPP
1182
1183 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1184 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1185 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1186
1187 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1188
1189#if RK5_ENABLED
1190 impure module subroutine setKmeansPPDRNGF_RK5(rng, membership, disq, csdisq, sample, ncls)
1191#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
1192 !DEC$ ATTRIBUTES DLLEXPORT :: setKmeansPPDRNGF_RK5
1193#endif
1194 use pm_kind, only: RKG => RK5
1195 type(rngf_type) , intent(in) :: rng
1196 integer(IK) , intent(in) :: ncls
1197 real(RKG) , intent(in) , contiguous :: sample(:,:)
1198 real(RKG) , intent(out) , contiguous :: disq(:)
1199 real(RKG) , intent(out) , contiguous :: csdisq(0:)
1200 integer(IK) , intent(out) , contiguous :: membership(:)
1201 end subroutine
1202#endif
1203
1204#if RK4_ENABLED
1205 impure module subroutine setKmeansPPDRNGF_RK4(rng, membership, disq, csdisq, sample, ncls)
1206#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
1207 !DEC$ ATTRIBUTES DLLEXPORT :: setKmeansPPDRNGF_RK4
1208#endif
1209 use pm_kind, only: RKG => RK4
1210 type(rngf_type) , intent(in) :: rng
1211 integer(IK) , intent(in) :: ncls
1212 real(RKG) , intent(in) , contiguous :: sample(:,:)
1213 real(RKG) , intent(out) , contiguous :: disq(:)
1214 real(RKG) , intent(out) , contiguous :: csdisq(0:)
1215 integer(IK) , intent(out) , contiguous :: membership(:)
1216 end subroutine
1217#endif
1218
1219#if RK3_ENABLED
1220 impure module subroutine setKmeansPPDRNGF_RK3(rng, membership, disq, csdisq, sample, ncls)
1221#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
1222 !DEC$ ATTRIBUTES DLLEXPORT :: setKmeansPPDRNGF_RK3
1223#endif
1224 use pm_kind, only: RKG => RK3
1225 type(rngf_type) , intent(in) :: rng
1226 integer(IK) , intent(in) :: ncls
1227 real(RKG) , intent(in) , contiguous :: sample(:,:)
1228 real(RKG) , intent(out) , contiguous :: disq(:)
1229 real(RKG) , intent(out) , contiguous :: csdisq(0:)
1230 integer(IK) , intent(out) , contiguous :: membership(:)
1231 end subroutine
1232#endif
1233
1234#if RK2_ENABLED
1235 impure module subroutine setKmeansPPDRNGF_RK2(rng, membership, disq, csdisq, sample, ncls)
1236#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
1237 !DEC$ ATTRIBUTES DLLEXPORT :: setKmeansPPDRNGF_RK2
1238#endif
1239 use pm_kind, only: RKG => RK2
1240 type(rngf_type) , intent(in) :: rng
1241 integer(IK) , intent(in) :: ncls
1242 real(RKG) , intent(in) , contiguous :: sample(:,:)
1243 real(RKG) , intent(out) , contiguous :: disq(:)
1244 real(RKG) , intent(out) , contiguous :: csdisq(0:)
1245 integer(IK) , intent(out) , contiguous :: membership(:)
1246 end subroutine
1247#endif
1248
1249#if RK1_ENABLED
1250 impure module subroutine setKmeansPPDRNGF_RK1(rng, membership, disq, csdisq, sample, ncls)
1251#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
1252 !DEC$ ATTRIBUTES DLLEXPORT :: setKmeansPPDRNGF_RK1
1253#endif
1254 use pm_kind, only: RKG => RK1
1255 type(rngf_type) , intent(in) :: rng
1256 integer(IK) , intent(in) :: ncls
1257 real(RKG) , intent(in) , contiguous :: sample(:,:)
1258 real(RKG) , intent(out) , contiguous :: disq(:)
1259 real(RKG) , intent(out) , contiguous :: csdisq(0:)
1260 integer(IK) , intent(out) , contiguous :: membership(:)
1261 end subroutine
1262#endif
1263
1264 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1265
1266#if RK5_ENABLED
1267 PURE module subroutine setKmeansPPDRNGX_RK5(rng, membership, disq, csdisq, sample, ncls)
1268#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
1269 !DEC$ ATTRIBUTES DLLEXPORT :: setKmeansPPDRNGX_RK5
1270#endif
1271 use pm_kind, only: RKG => RK5
1272 type(xoshiro256ssw_type), intent(inout) :: rng
1273 integer(IK) , intent(in) :: ncls
1274 real(RKG) , intent(in) , contiguous :: sample(:,:)
1275 real(RKG) , intent(out) , contiguous :: disq(:)
1276 real(RKG) , intent(out) , contiguous :: csdisq(0:)
1277 integer(IK) , intent(out) , contiguous :: membership(:)
1278 end subroutine
1279#endif
1280
1281#if RK4_ENABLED
1282 PURE module subroutine setKmeansPPDRNGX_RK4(rng, membership, disq, csdisq, sample, ncls)
1283#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
1284 !DEC$ ATTRIBUTES DLLEXPORT :: setKmeansPPDRNGX_RK4
1285#endif
1286 use pm_kind, only: RKG => RK4
1287 type(xoshiro256ssw_type), intent(inout) :: rng
1288 integer(IK) , intent(in) :: ncls
1289 real(RKG) , intent(in) , contiguous :: sample(:,:)
1290 real(RKG) , intent(out) , contiguous :: disq(:)
1291 real(RKG) , intent(out) , contiguous :: csdisq(0:)
1292 integer(IK) , intent(out) , contiguous :: membership(:)
1293 end subroutine
1294#endif
1295
1296#if RK3_ENABLED
1297 PURE module subroutine setKmeansPPDRNGX_RK3(rng, membership, disq, csdisq, sample, ncls)
1298#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
1299 !DEC$ ATTRIBUTES DLLEXPORT :: setKmeansPPDRNGX_RK3
1300#endif
1301 use pm_kind, only: RKG => RK3
1302 type(xoshiro256ssw_type), intent(inout) :: rng
1303 integer(IK) , intent(in) :: ncls
1304 real(RKG) , intent(in) , contiguous :: sample(:,:)
1305 real(RKG) , intent(out) , contiguous :: disq(:)
1306 real(RKG) , intent(out) , contiguous :: csdisq(0:)
1307 integer(IK) , intent(out) , contiguous :: membership(:)
1308 end subroutine
1309#endif
1310
1311#if RK2_ENABLED
1312 PURE module subroutine setKmeansPPDRNGX_RK2(rng, membership, disq, csdisq, sample, ncls)
1313#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
1314 !DEC$ ATTRIBUTES DLLEXPORT :: setKmeansPPDRNGX_RK2
1315#endif
1316 use pm_kind, only: RKG => RK2
1317 type(xoshiro256ssw_type), intent(inout) :: rng
1318 integer(IK) , intent(in) :: ncls
1319 real(RKG) , intent(in) , contiguous :: sample(:,:)
1320 real(RKG) , intent(out) , contiguous :: disq(:)
1321 real(RKG) , intent(out) , contiguous :: csdisq(0:)
1322 integer(IK) , intent(out) , contiguous :: membership(:)
1323 end subroutine
1324#endif
1325
1326#if RK1_ENABLED
1327 PURE module subroutine setKmeansPPDRNGX_RK1(rng, membership, disq, csdisq, sample, ncls)
1328#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
1329 !DEC$ ATTRIBUTES DLLEXPORT :: setKmeansPPDRNGX_RK1
1330#endif
1331 use pm_kind, only: RKG => RK1
1332 type(xoshiro256ssw_type), intent(inout) :: rng
1333 integer(IK) , intent(in) :: ncls
1334 real(RKG) , intent(in) , contiguous :: sample(:,:)
1335 real(RKG) , intent(out) , contiguous :: disq(:)
1336 real(RKG) , intent(out) , contiguous :: csdisq(0:)
1337 integer(IK) , intent(out) , contiguous :: membership(:)
1338 end subroutine
1339#endif
1340
1341 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1342
1343 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1344 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1345 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1346
1347 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1348
1349#if RK5_ENABLED
1350 impure module subroutine setKmeansPPORNGF_RK5(rng, membership, disq, csdisq, sample, center, size, potential)
1351#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
1352 !DEC$ ATTRIBUTES DLLEXPORT :: setKmeansPPORNGF_RK5
1353#endif
1354 use pm_kind, only: RKG => RK5
1355 type(rngf_type) , intent(in) :: rng
1356 real(RKG) , intent(in) , contiguous :: sample(:,:)
1357 real(RKG) , intent(out) , contiguous :: disq(:)
1358 real(RKG) , intent(out) , contiguous :: csdisq(0:)
1359 real(RKG) , intent(out) , contiguous :: center(:,:)
1360 real(RKG) , intent(out) , contiguous :: potential(:)
1361 integer(IK) , intent(out) , contiguous :: membership(:)
1362 integer(IK) , intent(out) , contiguous :: size(:)
1363 end subroutine
1364#endif
1365
1366#if RK4_ENABLED
1367 impure module subroutine setKmeansPPORNGF_RK4(rng, membership, disq, csdisq, sample, center, size, potential)
1368#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
1369 !DEC$ ATTRIBUTES DLLEXPORT :: setKmeansPPORNGF_RK4
1370#endif
1371 use pm_kind, only: RKG => RK4
1372 type(rngf_type) , intent(in) :: rng
1373 real(RKG) , intent(in) , contiguous :: sample(:,:)
1374 real(RKG) , intent(out) , contiguous :: disq(:)
1375 real(RKG) , intent(out) , contiguous :: csdisq(0:)
1376 real(RKG) , intent(out) , contiguous :: center(:,:)
1377 real(RKG) , intent(out) , contiguous :: potential(:)
1378 integer(IK) , intent(out) , contiguous :: membership(:)
1379 integer(IK) , intent(out) , contiguous :: size(:)
1380 end subroutine
1381#endif
1382
1383#if RK3_ENABLED
1384 impure module subroutine setKmeansPPORNGF_RK3(rng, membership, disq, csdisq, sample, center, size, potential)
1385#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
1386 !DEC$ ATTRIBUTES DLLEXPORT :: setKmeansPPORNGF_RK3
1387#endif
1388 use pm_kind, only: RKG => RK3
1389 type(rngf_type) , intent(in) :: rng
1390 real(RKG) , intent(in) , contiguous :: sample(:,:)
1391 real(RKG) , intent(out) , contiguous :: disq(:)
1392 real(RKG) , intent(out) , contiguous :: csdisq(0:)
1393 real(RKG) , intent(out) , contiguous :: center(:,:)
1394 real(RKG) , intent(out) , contiguous :: potential(:)
1395 integer(IK) , intent(out) , contiguous :: membership(:)
1396 integer(IK) , intent(out) , contiguous :: size(:)
1397 end subroutine
1398#endif
1399
1400#if RK2_ENABLED
1401 impure module subroutine setKmeansPPORNGF_RK2(rng, membership, disq, csdisq, sample, center, size, potential)
1402#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
1403 !DEC$ ATTRIBUTES DLLEXPORT :: setKmeansPPORNGF_RK2
1404#endif
1405 use pm_kind, only: RKG => RK2
1406 type(rngf_type) , intent(in) :: rng
1407 real(RKG) , intent(in) , contiguous :: sample(:,:)
1408 real(RKG) , intent(out) , contiguous :: disq(:)
1409 real(RKG) , intent(out) , contiguous :: csdisq(0:)
1410 real(RKG) , intent(out) , contiguous :: center(:,:)
1411 real(RKG) , intent(out) , contiguous :: potential(:)
1412 integer(IK) , intent(out) , contiguous :: membership(:)
1413 integer(IK) , intent(out) , contiguous :: size(:)
1414 end subroutine
1415#endif
1416
1417#if RK1_ENABLED
1418 impure module subroutine setKmeansPPORNGF_RK1(rng, membership, disq, csdisq, sample, center, size, potential)
1419#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
1420 !DEC$ ATTRIBUTES DLLEXPORT :: setKmeansPPORNGF_RK1
1421#endif
1422 use pm_kind, only: RKG => RK1
1423 type(rngf_type) , intent(in) :: rng
1424 real(RKG) , intent(in) , contiguous :: sample(:,:)
1425 real(RKG) , intent(out) , contiguous :: disq(:)
1426 real(RKG) , intent(out) , contiguous :: csdisq(0:)
1427 real(RKG) , intent(out) , contiguous :: center(:,:)
1428 real(RKG) , intent(out) , contiguous :: potential(:)
1429 integer(IK) , intent(out) , contiguous :: membership(:)
1430 integer(IK) , intent(out) , contiguous :: size(:)
1431 end subroutine
1432#endif
1433
1434 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1435
1436#if RK5_ENABLED
1437 PURE module subroutine setKmeansPPORNGX_RK5(rng, membership, disq, csdisq, sample, center, size, potential)
1438#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
1439 !DEC$ ATTRIBUTES DLLEXPORT :: setKmeansPPORNGX_RK5
1440#endif
1441 use pm_kind, only: RKG => RK5
1442 type(xoshiro256ssw_type), intent(inout) :: rng
1443 real(RKG) , intent(in) , contiguous :: sample(:,:)
1444 real(RKG) , intent(out) , contiguous :: disq(:)
1445 real(RKG) , intent(out) , contiguous :: csdisq(0:)
1446 real(RKG) , intent(out) , contiguous :: center(:,:)
1447 real(RKG) , intent(out) , contiguous :: potential(:)
1448 integer(IK) , intent(out) , contiguous :: membership(:)
1449 integer(IK) , intent(out) , contiguous :: size(:)
1450 end subroutine
1451#endif
1452
1453#if RK4_ENABLED
1454 PURE module subroutine setKmeansPPORNGX_RK4(rng, membership, disq, csdisq, sample, center, size, potential)
1455#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
1456 !DEC$ ATTRIBUTES DLLEXPORT :: setKmeansPPORNGX_RK4
1457#endif
1458 use pm_kind, only: RKG => RK4
1459 type(xoshiro256ssw_type), intent(inout) :: rng
1460 real(RKG) , intent(in) , contiguous :: sample(:,:)
1461 real(RKG) , intent(out) , contiguous :: disq(:)
1462 real(RKG) , intent(out) , contiguous :: csdisq(0:)
1463 real(RKG) , intent(out) , contiguous :: center(:,:)
1464 real(RKG) , intent(out) , contiguous :: potential(:)
1465 integer(IK) , intent(out) , contiguous :: membership(:)
1466 integer(IK) , intent(out) , contiguous :: size(:)
1467 end subroutine
1468#endif
1469
1470#if RK3_ENABLED
1471 PURE module subroutine setKmeansPPORNGX_RK3(rng, membership, disq, csdisq, sample, center, size, potential)
1472#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
1473 !DEC$ ATTRIBUTES DLLEXPORT :: setKmeansPPORNGX_RK3
1474#endif
1475 use pm_kind, only: RKG => RK3
1476 type(xoshiro256ssw_type), intent(inout) :: rng
1477 real(RKG) , intent(in) , contiguous :: sample(:,:)
1478 real(RKG) , intent(out) , contiguous :: disq(:)
1479 real(RKG) , intent(out) , contiguous :: csdisq(0:)
1480 real(RKG) , intent(out) , contiguous :: center(:,:)
1481 real(RKG) , intent(out) , contiguous :: potential(:)
1482 integer(IK) , intent(out) , contiguous :: membership(:)
1483 integer(IK) , intent(out) , contiguous :: size(:)
1484 end subroutine
1485#endif
1486
1487#if RK2_ENABLED
1488 PURE module subroutine setKmeansPPORNGX_RK2(rng, membership, disq, csdisq, sample, center, size, potential)
1489#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
1490 !DEC$ ATTRIBUTES DLLEXPORT :: setKmeansPPORNGX_RK2
1491#endif
1492 use pm_kind, only: RKG => RK2
1493 type(xoshiro256ssw_type), intent(inout) :: rng
1494 real(RKG) , intent(in) , contiguous :: sample(:,:)
1495 real(RKG) , intent(out) , contiguous :: disq(:)
1496 real(RKG) , intent(out) , contiguous :: csdisq(0:)
1497 real(RKG) , intent(out) , contiguous :: center(:,:)
1498 real(RKG) , intent(out) , contiguous :: potential(:)
1499 integer(IK) , intent(out) , contiguous :: membership(:)
1500 integer(IK) , intent(out) , contiguous :: size(:)
1501 end subroutine
1502#endif
1503
1504#if RK1_ENABLED
1505 PURE module subroutine setKmeansPPORNGX_RK1(rng, membership, disq, csdisq, sample, center, size, potential)
1506#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
1507 !DEC$ ATTRIBUTES DLLEXPORT :: setKmeansPPORNGX_RK1
1508#endif
1509 use pm_kind, only: RKG => RK1
1510 type(xoshiro256ssw_type), intent(inout) :: rng
1511 real(RKG) , intent(in) , contiguous :: sample(:,:)
1512 real(RKG) , intent(out) , contiguous :: disq(:)
1513 real(RKG) , intent(out) , contiguous :: csdisq(0:)
1514 real(RKG) , intent(out) , contiguous :: center(:,:)
1515 real(RKG) , intent(out) , contiguous :: potential(:)
1516 integer(IK) , intent(out) , contiguous :: membership(:)
1517 integer(IK) , intent(out) , contiguous :: size(:)
1518 end subroutine
1519#endif
1520
1521 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1522
1523 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1524 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1525 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1526
1527 end interface
1528
1529!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1530
1660
1661 interface setKmeans
1662
1663 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1664 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1665 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1666
1667 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1668
1669#if RK5_ENABLED
1670 PURE module subroutine setKmeansInit_RK5(membership, disq, sample, center, size, potential, failed, niter, maxniter, minsize)
1671#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
1672 !DEC$ ATTRIBUTES DLLEXPORT :: setKmeansInit_RK5
1673#endif
1674 use pm_kind, only: RKG => RK5
1675 integer(IK) , intent(in) , optional :: minsize
1676 integer(IK) , intent(in) , optional :: maxniter
1677 real(RKG) , intent(in) , contiguous :: sample(:,:)
1678 real(RKG) , intent(inout) , contiguous :: disq(:)
1679 real(RKG) , intent(inout) , contiguous :: center(:,:)
1680 real(RKG) , intent(inout) , contiguous :: potential(:)
1681 integer(IK) , intent(inout) , contiguous :: membership(:)
1682 integer(IK) , intent(inout) , contiguous :: size(:)
1683 integer(IK) , intent(out) , optional :: niter
1684 logical(LK) , intent(out) :: failed
1685 end subroutine
1686#endif
1687
1688#if RK4_ENABLED
1689 PURE module subroutine setKmeansInit_RK4(membership, disq, sample, center, size, potential, failed, niter, maxniter, minsize)
1690#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
1691 !DEC$ ATTRIBUTES DLLEXPORT :: setKmeansInit_RK4
1692#endif
1693 use pm_kind, only: RKG => RK4
1694 integer(IK) , intent(in) , optional :: minsize
1695 integer(IK) , intent(in) , optional :: maxniter
1696 real(RKG) , intent(in) , contiguous :: sample(:,:)
1697 real(RKG) , intent(inout) , contiguous :: disq(:)
1698 real(RKG) , intent(inout) , contiguous :: center(:,:)
1699 real(RKG) , intent(inout) , contiguous :: potential(:)
1700 integer(IK) , intent(inout) , contiguous :: membership(:)
1701 integer(IK) , intent(inout) , contiguous :: size(:)
1702 integer(IK) , intent(out) , optional :: niter
1703 logical(LK) , intent(out) :: failed
1704 end subroutine
1705#endif
1706
1707#if RK3_ENABLED
1708 PURE module subroutine setKmeansInit_RK3(membership, disq, sample, center, size, potential, failed, niter, maxniter, minsize)
1709#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
1710 !DEC$ ATTRIBUTES DLLEXPORT :: setKmeansInit_RK3
1711#endif
1712 use pm_kind, only: RKG => RK3
1713 integer(IK) , intent(in) , optional :: minsize
1714 integer(IK) , intent(in) , optional :: maxniter
1715 real(RKG) , intent(in) , contiguous :: sample(:,:)
1716 real(RKG) , intent(inout) , contiguous :: disq(:)
1717 real(RKG) , intent(inout) , contiguous :: center(:,:)
1718 real(RKG) , intent(inout) , contiguous :: potential(:)
1719 integer(IK) , intent(inout) , contiguous :: membership(:)
1720 integer(IK) , intent(inout) , contiguous :: size(:)
1721 integer(IK) , intent(out) , optional :: niter
1722 logical(LK) , intent(out) :: failed
1723 end subroutine
1724#endif
1725
1726#if RK2_ENABLED
1727 PURE module subroutine setKmeansInit_RK2(membership, disq, sample, center, size, potential, failed, niter, maxniter, minsize)
1728#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
1729 !DEC$ ATTRIBUTES DLLEXPORT :: setKmeansInit_RK2
1730#endif
1731 use pm_kind, only: RKG => RK2
1732 integer(IK) , intent(in) , optional :: minsize
1733 integer(IK) , intent(in) , optional :: maxniter
1734 real(RKG) , intent(in) , contiguous :: sample(:,:)
1735 real(RKG) , intent(inout) , contiguous :: disq(:)
1736 real(RKG) , intent(inout) , contiguous :: center(:,:)
1737 real(RKG) , intent(inout) , contiguous :: potential(:)
1738 integer(IK) , intent(inout) , contiguous :: membership(:)
1739 integer(IK) , intent(inout) , contiguous :: size(:)
1740 integer(IK) , intent(out) , optional :: niter
1741 logical(LK) , intent(out) :: failed
1742 end subroutine
1743#endif
1744
1745#if RK1_ENABLED
1746 PURE module subroutine setKmeansInit_RK1(membership, disq, sample, center, size, potential, failed, niter, maxniter, minsize)
1747#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
1748 !DEC$ ATTRIBUTES DLLEXPORT :: setKmeansInit_RK1
1749#endif
1750 use pm_kind, only: RKG => RK1
1751 integer(IK) , intent(in) , optional :: minsize
1752 integer(IK) , intent(in) , optional :: maxniter
1753 real(RKG) , intent(in) , contiguous :: sample(:,:)
1754 real(RKG) , intent(inout) , contiguous :: disq(:)
1755 real(RKG) , intent(inout) , contiguous :: center(:,:)
1756 real(RKG) , intent(inout) , contiguous :: potential(:)
1757 integer(IK) , intent(inout) , contiguous :: membership(:)
1758 integer(IK) , intent(inout) , contiguous :: size(:)
1759 integer(IK) , intent(out) , optional :: niter
1760 logical(LK) , intent(out) :: failed
1761 end subroutine
1762#endif
1763
1764 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1765
1766#if RK5_ENABLED
1767 impure module subroutine setKmeansRNGF_RK5(rng, membership, disq, csdisq, sample, center, size, potential, failed, niter, maxniter, minsize, nfail)
1768#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
1769 !DEC$ ATTRIBUTES DLLEXPORT :: setKmeansRNGF_RK5
1770#endif
1771 use pm_kind, only: RKG => RK5
1772 type(rngf_type) , intent(in) :: rng
1773 integer(IK) , intent(in) , optional :: minsize
1774 integer(IK) , intent(in) , optional :: maxniter
1775 integer(IK) , intent(in) , optional :: nfail
1776 real(RKG) , intent(in) , contiguous :: sample(:,:)
1777 real(RKG) , intent(out) , contiguous :: disq(:)
1778 real(RKG) , intent(out) , contiguous :: csdisq(0:)
1779 real(RKG) , intent(out) , contiguous :: center(:,:)
1780 real(RKG) , intent(out) , contiguous :: potential(:)
1781 integer(IK) , intent(out) , contiguous :: membership(:)
1782 integer(IK) , intent(out) , contiguous :: size(:)
1783 integer(IK) , intent(out) , optional :: niter
1784 logical(LK) , intent(out) :: failed
1785 end subroutine
1786#endif
1787
1788#if RK4_ENABLED
1789 impure module subroutine setKmeansRNGF_RK4(rng, membership, disq, csdisq, sample, center, size, potential, failed, niter, maxniter, minsize, nfail)
1790#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
1791 !DEC$ ATTRIBUTES DLLEXPORT :: setKmeansRNGF_RK4
1792#endif
1793 use pm_kind, only: RKG => RK4
1794 type(rngf_type) , intent(in) :: rng
1795 integer(IK) , intent(in) , optional :: minsize
1796 integer(IK) , intent(in) , optional :: maxniter
1797 integer(IK) , intent(in) , optional :: nfail
1798 real(RKG) , intent(in) , contiguous :: sample(:,:)
1799 real(RKG) , intent(out) , contiguous :: disq(:)
1800 real(RKG) , intent(out) , contiguous :: csdisq(0:)
1801 real(RKG) , intent(out) , contiguous :: center(:,:)
1802 real(RKG) , intent(out) , contiguous :: potential(:)
1803 integer(IK) , intent(out) , contiguous :: membership(:)
1804 integer(IK) , intent(out) , contiguous :: size(:)
1805 integer(IK) , intent(out) , optional :: niter
1806 logical(LK) , intent(out) :: failed
1807 end subroutine
1808#endif
1809
1810#if RK3_ENABLED
1811 impure module subroutine setKmeansRNGF_RK3(rng, membership, disq, csdisq, sample, center, size, potential, failed, niter, maxniter, minsize, nfail)
1812#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
1813 !DEC$ ATTRIBUTES DLLEXPORT :: setKmeansRNGF_RK3
1814#endif
1815 use pm_kind, only: RKG => RK3
1816 type(rngf_type) , intent(in) :: rng
1817 integer(IK) , intent(in) , optional :: minsize
1818 integer(IK) , intent(in) , optional :: maxniter
1819 integer(IK) , intent(in) , optional :: nfail
1820 real(RKG) , intent(in) , contiguous :: sample(:,:)
1821 real(RKG) , intent(out) , contiguous :: disq(:)
1822 real(RKG) , intent(out) , contiguous :: csdisq(0:)
1823 real(RKG) , intent(out) , contiguous :: center(:,:)
1824 real(RKG) , intent(out) , contiguous :: potential(:)
1825 integer(IK) , intent(out) , contiguous :: membership(:)
1826 integer(IK) , intent(out) , contiguous :: size(:)
1827 integer(IK) , intent(out) , optional :: niter
1828 logical(LK) , intent(out) :: failed
1829 end subroutine
1830#endif
1831
1832#if RK2_ENABLED
1833 impure module subroutine setKmeansRNGF_RK2(rng, membership, disq, csdisq, sample, center, size, potential, failed, niter, maxniter, minsize, nfail)
1834#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
1835 !DEC$ ATTRIBUTES DLLEXPORT :: setKmeansRNGF_RK2
1836#endif
1837 use pm_kind, only: RKG => RK2
1838 type(rngf_type) , intent(in) :: rng
1839 integer(IK) , intent(in) , optional :: minsize
1840 integer(IK) , intent(in) , optional :: maxniter
1841 integer(IK) , intent(in) , optional :: nfail
1842 real(RKG) , intent(in) , contiguous :: sample(:,:)
1843 real(RKG) , intent(out) , contiguous :: disq(:)
1844 real(RKG) , intent(out) , contiguous :: csdisq(0:)
1845 real(RKG) , intent(out) , contiguous :: center(:,:)
1846 real(RKG) , intent(out) , contiguous :: potential(:)
1847 integer(IK) , intent(out) , contiguous :: membership(:)
1848 integer(IK) , intent(out) , contiguous :: size(:)
1849 integer(IK) , intent(out) , optional :: niter
1850 logical(LK) , intent(out) :: failed
1851 end subroutine
1852#endif
1853
1854#if RK1_ENABLED
1855 impure module subroutine setKmeansRNGF_RK1(rng, membership, disq, csdisq, sample, center, size, potential, failed, niter, maxniter, minsize, nfail)
1856#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
1857 !DEC$ ATTRIBUTES DLLEXPORT :: setKmeansRNGF_RK1
1858#endif
1859 use pm_kind, only: RKG => RK1
1860 type(rngf_type) , intent(in) :: rng
1861 integer(IK) , intent(in) , optional :: minsize
1862 integer(IK) , intent(in) , optional :: maxniter
1863 integer(IK) , intent(in) , optional :: nfail
1864 real(RKG) , intent(in) , contiguous :: sample(:,:)
1865 real(RKG) , intent(out) , contiguous :: disq(:)
1866 real(RKG) , intent(out) , contiguous :: csdisq(0:)
1867 real(RKG) , intent(out) , contiguous :: center(:,:)
1868 real(RKG) , intent(out) , contiguous :: potential(:)
1869 integer(IK) , intent(out) , contiguous :: membership(:)
1870 integer(IK) , intent(out) , contiguous :: size(:)
1871 integer(IK) , intent(out) , optional :: niter
1872 logical(LK) , intent(out) :: failed
1873 end subroutine
1874#endif
1875
1876 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1877
1878#if RK5_ENABLED
1879 PURE module subroutine setKmeansRNGX_RK5(rng, membership, disq, csdisq, sample, center, size, potential, failed, niter, maxniter, minsize, nfail)
1880#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
1881 !DEC$ ATTRIBUTES DLLEXPORT :: setKmeansRNGX_RK5
1882#endif
1883 use pm_kind, only: RKG => RK5
1884 type(xoshiro256ssw_type), intent(inout) :: rng
1885 integer(IK) , intent(in) , optional :: minsize
1886 integer(IK) , intent(in) , optional :: maxniter
1887 integer(IK) , intent(in) , optional :: nfail
1888 real(RKG) , intent(in) , contiguous :: sample(:,:)
1889 real(RKG) , intent(out) , contiguous :: disq(:)
1890 real(RKG) , intent(out) , contiguous :: csdisq(0:)
1891 real(RKG) , intent(out) , contiguous :: center(:,:)
1892 real(RKG) , intent(out) , contiguous :: potential(:)
1893 integer(IK) , intent(out) , contiguous :: membership(:)
1894 integer(IK) , intent(out) , contiguous :: size(:)
1895 integer(IK) , intent(out) , optional :: niter
1896 logical(LK) , intent(out) :: failed
1897 end subroutine
1898#endif
1899
1900#if RK4_ENABLED
1901 PURE module subroutine setKmeansRNGX_RK4(rng, membership, disq, csdisq, sample, center, size, potential, failed, niter, maxniter, minsize, nfail)
1902#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
1903 !DEC$ ATTRIBUTES DLLEXPORT :: setKmeansRNGX_RK4
1904#endif
1905 use pm_kind, only: RKG => RK4
1906 type(xoshiro256ssw_type), intent(inout) :: rng
1907 integer(IK) , intent(in) , optional :: minsize
1908 integer(IK) , intent(in) , optional :: maxniter
1909 integer(IK) , intent(in) , optional :: nfail
1910 real(RKG) , intent(in) , contiguous :: sample(:,:)
1911 real(RKG) , intent(out) , contiguous :: disq(:)
1912 real(RKG) , intent(out) , contiguous :: csdisq(0:)
1913 real(RKG) , intent(out) , contiguous :: center(:,:)
1914 real(RKG) , intent(out) , contiguous :: potential(:)
1915 integer(IK) , intent(out) , contiguous :: membership(:)
1916 integer(IK) , intent(out) , contiguous :: size(:)
1917 integer(IK) , intent(out) , optional :: niter
1918 logical(LK) , intent(out) :: failed
1919 end subroutine
1920#endif
1921
1922#if RK3_ENABLED
1923 PURE module subroutine setKmeansRNGX_RK3(rng, membership, disq, csdisq, sample, center, size, potential, failed, niter, maxniter, minsize, nfail)
1924#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
1925 !DEC$ ATTRIBUTES DLLEXPORT :: setKmeansRNGX_RK3
1926#endif
1927 use pm_kind, only: RKG => RK3
1928 type(xoshiro256ssw_type), intent(inout) :: rng
1929 integer(IK) , intent(in) , optional :: minsize
1930 integer(IK) , intent(in) , optional :: maxniter
1931 integer(IK) , intent(in) , optional :: nfail
1932 real(RKG) , intent(in) , contiguous :: sample(:,:)
1933 real(RKG) , intent(out) , contiguous :: disq(:)
1934 real(RKG) , intent(out) , contiguous :: csdisq(0:)
1935 real(RKG) , intent(out) , contiguous :: center(:,:)
1936 real(RKG) , intent(out) , contiguous :: potential(:)
1937 integer(IK) , intent(out) , contiguous :: membership(:)
1938 integer(IK) , intent(out) , contiguous :: size(:)
1939 integer(IK) , intent(out) , optional :: niter
1940 logical(LK) , intent(out) :: failed
1941 end subroutine
1942#endif
1943
1944#if RK2_ENABLED
1945 PURE module subroutine setKmeansRNGX_RK2(rng, membership, disq, csdisq, sample, center, size, potential, failed, niter, maxniter, minsize, nfail)
1946#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
1947 !DEC$ ATTRIBUTES DLLEXPORT :: setKmeansRNGX_RK2
1948#endif
1949 use pm_kind, only: RKG => RK2
1950 type(xoshiro256ssw_type), intent(inout) :: rng
1951 integer(IK) , intent(in) , optional :: minsize
1952 integer(IK) , intent(in) , optional :: maxniter
1953 integer(IK) , intent(in) , optional :: nfail
1954 real(RKG) , intent(in) , contiguous :: sample(:,:)
1955 real(RKG) , intent(out) , contiguous :: disq(:)
1956 real(RKG) , intent(out) , contiguous :: csdisq(0:)
1957 real(RKG) , intent(out) , contiguous :: center(:,:)
1958 real(RKG) , intent(out) , contiguous :: potential(:)
1959 integer(IK) , intent(out) , contiguous :: membership(:)
1960 integer(IK) , intent(out) , contiguous :: size(:)
1961 integer(IK) , intent(out) , optional :: niter
1962 logical(LK) , intent(out) :: failed
1963 end subroutine
1964#endif
1965
1966#if RK1_ENABLED
1967 PURE module subroutine setKmeansRNGX_RK1(rng, membership, disq, csdisq, sample, center, size, potential, failed, niter, maxniter, minsize, nfail)
1968#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
1969 !DEC$ ATTRIBUTES DLLEXPORT :: setKmeansRNGX_RK1
1970#endif
1971 use pm_kind, only: RKG => RK1
1972 type(xoshiro256ssw_type), intent(inout) :: rng
1973 integer(IK) , intent(in) , optional :: minsize
1974 integer(IK) , intent(in) , optional :: maxniter
1975 integer(IK) , intent(in) , optional :: nfail
1976 real(RKG) , intent(in) , contiguous :: sample(:,:)
1977 real(RKG) , intent(out) , contiguous :: disq(:)
1978 real(RKG) , intent(out) , contiguous :: csdisq(0:)
1979 real(RKG) , intent(out) , contiguous :: center(:,:)
1980 real(RKG) , intent(out) , contiguous :: potential(:)
1981 integer(IK) , intent(out) , contiguous :: membership(:)
1982 integer(IK) , intent(out) , contiguous :: size(:)
1983 integer(IK) , intent(out) , optional :: niter
1984 logical(LK) , intent(out) :: failed
1985 end subroutine
1986#endif
1987
1988 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1989
1990 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1991 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1992 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1993
1994 end interface
1995
1996!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1997
1998end module pm_clusKmeans
Compute and return the centers of the clusters corresponding to the input sample, cluster membership ...
Compute and return an asymptotically optimal set of cluster centers for the input sample,...
Compute and return an iteratively-refined set of cluster centers given the input sample using the k-m...
Compute and return the memberships and minimum distances of a set of input points with respect to the...
This module contains procedures and routines for the computing the Kmeans clustering of a given set o...
character(*, SK), parameter MODULE_NAME
This module contains classes and procedures for computing various statistical quantities related to t...
type(rngf_type) rngf
The scalar constant object of type rngf_type whose presence signified the use of the Fortran intrinsi...
This module defines the relevant Fortran kind type-parameters frequently used in the ParaMonte librar...
Definition: pm_kind.F90:268
integer, parameter RK5
Definition: pm_kind.F90:478
integer, parameter RK4
Definition: pm_kind.F90:489
integer, parameter RK2
Definition: pm_kind.F90:511
integer, parameter RK3
Definition: pm_kind.F90:500
integer, parameter LK
The default logical kind in the ParaMonte library: kind(.true.) in Fortran, kind(....
Definition: pm_kind.F90:541
integer, parameter IK
The default integer kind in the ParaMonte library: int32 in Fortran, c_int32_t in C-Fortran Interoper...
Definition: pm_kind.F90:540
integer, parameter SK
The default character kind in the ParaMonte library: kind("a") in Fortran, c_char in C-Fortran Intero...
Definition: pm_kind.F90:539
integer, parameter RK1
Definition: pm_kind.F90:522
This is a concrete derived type whose instances can be used to define/request the default uniform ran...
This is the derived type for declaring and generating objects of type xoshiro256ssw_type containing a...