gtool5 Fortran 90/95 ライブラリ 1.0.0-rc5
English
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 165 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 
)

整数と DC_SCALED_SEC の小なり比較

Parameters
[in]factor比較する整数値
[in]sclsecDC_SCALED_SEC 型変数
Returns
factor < sclsec なら .true., そうでなければ .false.

Definition at line 921 of file dc_scaledsec.f90.

922 implicit none
923 integer, intent(in):: factor
924 type(DC_SCALED_SEC), intent(in):: sclsec
925 type(DC_SCALED_SEC):: factor_scl
926 integer:: i, sec1, factor_abs
927 logical:: both_negative
928 continue
929 if ( sclsec % flag_negative .and. .not. factor < 0 ) then
930 result = .false.
931 return
932 elseif ( .not. sclsec % flag_negative .and. factor < 0 ) then
933 result = .true.
934 return
935 elseif ( sclsec % flag_negative .and. factor < 0 ) then
936 both_negative = .true.
937 else
938 both_negative = .false.
939 end if
940
941 factor_abs = abs(factor)
942
943 if ( factor_abs > scale_factor_int_xx(3) ) then
944 factor_scl = factor
945 result = factor_scl < sclsec
946 return
947 else
948 if ( .not. all( sclsec % sec_ary(3:imax) == (/0, 0, 0, 0, 0, 0/) ) ) then
949 result = .true.
950 else
951 sec1 = sclsec % sec_ary(0)
952 do i = 1, 2
953 sec1 = sec1 + sclsec % sec_ary(i) * scale_factor_int_xx(i)
954 end do
955 if ( sec1 == factor_abs ) then
956 result = .not. all( sclsec % sec_ary(imin:-1) == (/0, 0/) )
957 else
958 result = factor_abs < sec1
959 end if
960 end if
961
962 if ( both_negative ) result = .not. result
963 end if
964

◆ dcscaledsec_lt_si()

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

DC_SCALED_SEC と整数の小なり比較

Parameters
[in]sclsecDC_SCALED_SEC 型変数
[in]factor比較する整数値
Returns
sclsec < factor なら .true., そうでなければ .false.

Definition at line 861 of file dc_scaledsec.f90.

862 implicit none
863 type(DC_SCALED_SEC), intent(in):: sclsec
864 integer, intent(in):: factor
865 type(DC_SCALED_SEC):: factor_scl
866 integer:: i, sec1, factor_abs
867 logical:: both_negative
868 continue
869 if ( sclsec % flag_negative .and. .not. factor < 0 ) then
870 result = .true.
871 return
872 elseif ( .not. sclsec % flag_negative .and. factor < 0 ) then
873 result = .false.
874 return
875 elseif ( sclsec % flag_negative .and. factor < 0 ) then
876 both_negative = .true.
877 else
878 both_negative = .false.
879 end if
880
881 factor_abs = abs(factor)
882
883 if ( factor_abs > scale_factor_int_xx(3) ) then
884 factor_scl = factor
885 result = sclsec < factor_scl
886 return
887 else
888 if ( .not. all( sclsec % sec_ary(3:imax) == (/0, 0, 0, 0, 0, 0/) ) ) then
889 result = .false.
890 else
891 sec1 = sclsec % sec_ary(0)
892 do i = 1, 2
893 sec1 = sec1 + sclsec % sec_ary(i) * scale_factor_int_xx(i)
894 end do
895 if ( sec1 == factor_abs ) then
896 result = .false.
897 else
898 result = sec1 < factor_abs
899 end if
900 end if
901
902 if ( both_negative ) result = .not. result
903 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 
)

2つの DC_SCALED_SEC 型変数の小なり比較

Parameters
[in]sclsec11番目の DC_SCALED_SEC 型変数
[in]sclsec22番目の DC_SCALED_SEC 型変数
Returns
sclsec1 < sclsec2 なら .true., そうでなければ .false.

Definition at line 809 of file dc_scaledsec.f90.

810 implicit none
811 type(DC_SCALED_SEC), intent(in):: sclsec1, sclsec2
812 integer:: i
813 logical:: both_negative, flag_equal
814 continue
815 result = .false.
816 flag_equal = .true.
817
818 if ( sclsec1 % flag_negative .and. .not. sclsec2 % flag_negative ) then
819 result = .true.
820 return
821 elseif ( .not. sclsec1 % flag_negative .and. sclsec2 % flag_negative ) then
822 result = .false.
823 return
824 elseif ( sclsec1 % flag_negative .and. sclsec2 % flag_negative ) then
825 both_negative = .true.
826 else
827 both_negative = .false.
828 end if
829
830 do i = imax, imin, -1
831 if ( sclsec1 % sec_ary(i) > sclsec2 % sec_ary(i) ) then
832 result = .false.
833 flag_equal = .false.
834 exit
835 elseif ( sclsec1 % sec_ary(i) < sclsec2 % sec_ary(i) ) then
836 result = .true.
837 flag_equal = .false.
838 exit
839 end if
840 end do
841
842 if ( .not. flag_equal .and. both_negative ) result = .not. result
843

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