Loading...
Searching...
No Matches
Public Member Functions | List of all members
dc_scaledsec::operator(<) Interface Reference

Public Member Functions

logical function dcscaledsec_lt_ss (sclsec1, sclsec2)
 
logical function dcscaledsec_lt_si (sclsec, factor)
 
logical function dcscaledsec_lt_is (factor, sclsec)
 

Detailed Description

Definition at line 102 of file dc_scaledsec.f90.

Member Function/Subroutine Documentation

◆ dcscaledsec_lt_is()

logical function dc_scaledsec::operator(<)::dcscaledsec_lt_is ( integer, intent(in)  factor,
type(dc_scaled_sec), intent(in)  sclsec 
)

Definition at line 793 of file dc_scaledsec.f90.

794 !
795 ! 2 つの DC_SCALED_SEC 型変数の比較
796 !
797 ! Comparison of two "DC_SCALED_SEC" variables
798 !
799 implicit none
800 integer, intent(in):: factor
801 type(DC_SCALED_SEC), intent(in):: sclsec
802 type(DC_SCALED_SEC):: factor_scl
803 integer:: i, sec1, factor_abs
804 logical:: both_negative
805 continue
806 if ( sclsec % flag_negative .and. .not. factor < 0 ) then
807 result = .false.
808 return
809 elseif ( .not. sclsec % flag_negative .and. factor < 0 ) then
810 result = .true.
811 return
812 elseif ( sclsec % flag_negative .and. factor < 0 ) then
813 both_negative = .true.
814 else
815 both_negative = .false.
816 end if
817
818 factor_abs = abs(factor)
819
820 if ( factor_abs > scale_factor_int_xx(3) ) then
821 factor_scl = factor
822 result = factor_scl < sclsec
823 return
824 else
825 if ( .not. all( sclsec % sec_ary(3:imax) == (/0, 0, 0, 0, 0, 0/) ) ) then
826 result = .true.
827 else
828 sec1 = sclsec % sec_ary(0)
829 do i = 1, 2
830 sec1 = sec1 + sclsec % sec_ary(i) * scale_factor_int_xx(i)
831 end do
832 if ( sec1 == factor_abs ) then
833 result = .not. all( sclsec % sec_ary(imin:-1) == (/0, 0/) )
834 else
835 result = factor_abs < sec1
836 end if
837 end if
838
839 if ( both_negative ) result = .not. result
840 end if
841

◆ dcscaledsec_lt_si()

logical function dc_scaledsec::operator(<)::dcscaledsec_lt_si ( type(dc_scaled_sec), intent(in)  sclsec,
integer, intent(in)  factor 
)

Definition at line 741 of file dc_scaledsec.f90.

742 !
743 ! 2 つの DC_SCALED_SEC 型変数の比較
744 !
745 ! Comparison of two "DC_SCALED_SEC" variables
746 !
747 implicit none
748 type(DC_SCALED_SEC), intent(in):: sclsec
749 integer, intent(in):: factor
750 type(DC_SCALED_SEC):: factor_scl
751 integer:: i, sec1, factor_abs
752 logical:: both_negative
753 continue
754 if ( sclsec % flag_negative .and. .not. factor < 0 ) then
755 result = .true.
756 return
757 elseif ( .not. sclsec % flag_negative .and. factor < 0 ) then
758 result = .false.
759 return
760 elseif ( sclsec % flag_negative .and. factor < 0 ) then
761 both_negative = .true.
762 else
763 both_negative = .false.
764 end if
765
766 factor_abs = abs(factor)
767
768 if ( factor_abs > scale_factor_int_xx(3) ) then
769 factor_scl = factor
770 result = sclsec < factor_scl
771 return
772 else
773 if ( .not. all( sclsec % sec_ary(3:imax) == (/0, 0, 0, 0, 0, 0/) ) ) then
774 result = .false.
775 else
776 sec1 = sclsec % sec_ary(0)
777 do i = 1, 2
778 sec1 = sec1 + sclsec % sec_ary(i) * scale_factor_int_xx(i)
779 end do
780 if ( sec1 == factor_abs ) then
781 result = .false.
782 else
783 result = sec1 < factor_abs
784 end if
785 end if
786
787 if ( both_negative ) result = .not. result
788 end if

◆ dcscaledsec_lt_ss()

logical function dc_scaledsec::operator(<)::dcscaledsec_lt_ss ( type(dc_scaled_sec), intent(in)  sclsec1,
type(dc_scaled_sec), intent(in)  sclsec2 
)

Definition at line 697 of file dc_scaledsec.f90.

698 !
699 ! 2 つの DC_SCALED_SEC 型変数の比較
700 !
701 ! Comparison of two "DC_SCALED_SEC" variables
702 !
703 implicit none
704 type(DC_SCALED_SEC), intent(in):: sclsec1, sclsec2
705 integer:: i
706 logical:: both_negative, flag_equal
707 continue
708 result = .false.
709 flag_equal = .true.
710
711 if ( sclsec1 % flag_negative .and. .not. sclsec2 % flag_negative ) then
712 result = .true.
713 return
714 elseif ( .not. sclsec1 % flag_negative .and. sclsec2 % flag_negative ) then
715 result = .false.
716 return
717 elseif ( sclsec1 % flag_negative .and. sclsec2 % flag_negative ) then
718 both_negative = .true.
719 else
720 both_negative = .false.
721 end if
722
723 do i = imax, imin, -1
724 if ( sclsec1 % sec_ary(i) > sclsec2 % sec_ary(i) ) then
725 result = .false.
726 flag_equal = .false.
727 exit
728 elseif ( sclsec1 % sec_ary(i) < sclsec2 % sec_ary(i) ) then
729 result = .true.
730 flag_equal = .false.
731 exit
732 end if
733 end do
734
735 if ( .not. flag_equal .and. both_negative ) result = .not. result
736

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