gtool5 Fortran 90/95 Library 1.0.0-rc5
日本語
Loading...
Searching...
No Matches
dc_scaledsec::operator(>) Interface Reference

Public Member Functions

logical function dcscaledsec_gt_ss (sclsec1, sclsec2)
logical function dcscaledsec_gt_si (sclsec, factor)
logical function dcscaledsec_gt_is (factor, sclsec)

Detailed Description

Definition at line 159 of file dc_scaledsec.f90.

Member Function/Subroutine Documentation

◆ dcscaledsec_gt_is()

logical function dc_scaledsec::operator(>)::dcscaledsec_gt_is ( integer, intent(in) factor,
type(dc_scaled_sec), intent(in) sclsec )

Compare integer with DC_SCALED_SEC (greater than)

Parameters
[in]factorInteger value to compare
[in]sclsecDC_SCALED_SEC variable
Returns
.true. if factor > sclsec, .false. otherwise

Definition at line 749 of file dc_scaledsec.f90.

750 implicit none
751 integer, intent(in):: factor
752 type(DC_SCALED_SEC), intent(in):: sclsec
753 type(DC_SCALED_SEC):: factor_scl
754 integer:: i, sec1, factor_abs
755 logical:: both_negative
756 continue
757 if ( sclsec % flag_negative .and. .not. factor < 0 ) then
758 result = .true.
759 return
760 elseif ( .not. sclsec % flag_negative .and. factor < 0 ) then
761 result = .false.
762 return
763 elseif ( sclsec % flag_negative .and. factor < 0 ) then
764 both_negative = .true.
765 else
766 both_negative = .false.
767 end if
768
769 factor_abs = abs(factor)
770
771 if ( factor_abs > scale_factor_int_xx(3) ) then
772 factor_scl = factor
773 result = factor_scl > sclsec
774 return
775 else
776 if ( .not. all( sclsec % sec_ary(3:imax) == (/0, 0, 0, 0, 0, 0/) ) ) then
777 result = .false.
778 else
779 sec1 = sclsec % sec_ary(0)
780 do i = 1, 2
781 sec1 = sec1 + sclsec % sec_ary(i) * scale_factor_int_xx(i)
782 end do
783 if ( sec1 == factor_abs ) then
784 result = .false.
785 else
786 result = factor_abs > sec1
787 end if
788 end if
789
790 if ( both_negative ) result = .not. result
791 end if

◆ dcscaledsec_gt_si()

logical function dc_scaledsec::operator(>)::dcscaledsec_gt_si ( type(dc_scaled_sec), intent(in) sclsec,
integer, intent(in) factor )

Compare DC_SCALED_SEC with integer (greater than)

Parameters
[in]sclsecDC_SCALED_SEC variable
[in]factorInteger value to compare
Returns
.true. if sclsec > factor, .false. otherwise

Definition at line 688 of file dc_scaledsec.f90.

689 implicit none
690 type(DC_SCALED_SEC), intent(in):: sclsec
691 integer, intent(in):: factor
692 type(DC_SCALED_SEC):: factor_scl
693 integer:: i, sec1, factor_abs
694 logical:: both_negative
695 continue
696 if ( sclsec % flag_negative .and. .not. factor < 0 ) then
697 result = .false.
698 return
699 elseif ( .not. sclsec % flag_negative .and. factor < 0 ) then
700 result = .true.
701 return
702 elseif ( sclsec % flag_negative .and. factor < 0 ) then
703 both_negative = .true.
704 else
705 both_negative = .false.
706 end if
707
708 factor_abs = abs(factor)
709
710 if ( factor_abs > scale_factor_int_xx(3) ) then
711 factor_scl = factor
712 result = sclsec > factor_scl
713 return
714 else
715 if ( .not. all( sclsec % sec_ary(3:imax) == (/0, 0, 0, 0, 0, 0/) ) ) then
716 result = .true.
717 else
718 sec1 = sclsec % sec_ary(0)
719 do i = 1, 2
720 sec1 = sec1 + sclsec % sec_ary(i) * scale_factor_int_xx(i)
721 end do
722 if ( sec1 == factor_abs ) then
723 result = .not. all( sclsec % sec_ary(imin:-1) == (/0, 0/) )
724 else
725 result = sec1 > factor_abs
726 end if
727 end if
728
729 if ( both_negative ) result = .not. result
730 end if
731

◆ dcscaledsec_gt_ss()

logical function dc_scaledsec::operator(>)::dcscaledsec_gt_ss ( type(dc_scaled_sec), intent(in) sclsec1,
type(dc_scaled_sec), intent(in) sclsec2 )

Compare two DC_SCALED_SEC variables (greater than)

Parameters
[in]sclsec1First DC_SCALED_SEC variable
[in]sclsec2Second DC_SCALED_SEC variable
Returns
.true. if sclsec1 > sclsec2, .false. otherwise

Definition at line 635 of file dc_scaledsec.f90.

636 implicit none
637 type(DC_SCALED_SEC), intent(in):: sclsec1, sclsec2
638
639 integer:: i
640 logical:: both_negative, flag_equal
641 continue
642 result = .false.
643 flag_equal = .true.
644
645 if ( sclsec1 % flag_negative .and. .not. sclsec2 % flag_negative ) then
646 result = .false.
647 return
648 elseif ( .not. sclsec1 % flag_negative .and. sclsec2 % flag_negative ) then
649 result = .true.
650 return
651 elseif ( sclsec1 % flag_negative .and. sclsec2 % flag_negative ) then
652 both_negative = .true.
653 else
654 both_negative = .false.
655 end if
656
657 do i = imax, imin, -1
658 if ( sclsec1 % sec_ary(i) > sclsec2 % sec_ary(i) ) then
659 result = .true.
660 flag_equal = .false.
661 exit
662 elseif ( sclsec1 % sec_ary(i) < sclsec2 % sec_ary(i) ) then
663 result = .false.
664 flag_equal = .false.
665 exit
666 end if
667 end do
668
669 if ( .not. flag_equal .and. both_negative ) result = .not. result
670

The documentation for this interface was generated from the following file: