comparison liboctave/array/fCMatrix.cc @ 18083:938f01339043

maint: Use Octave coding convention for indexing vs. function calls in liboctave/array. * CMatrix.cc, CSparse.cc, Sparse.cc, dMatrix.cc, dSparse.cc, fCMatrix.cc, fMatrix.cc, idx-vector.cc: Use Octave coding convention for indexing vs. function calls in liboctave/array.
author Rik <rik@octave.org>
date Wed, 04 Dec 2013 18:56:47 -0800
parents 49a5a4be04a1
children 8e056300994b
comparison
equal deleted inserted replaced
18080:35464baa7d99 18083:938f01339043
3931 3931
3932 for (octave_idx_type j = 0; j < nc; j++) 3932 for (octave_idx_type j = 0; j < nc; j++)
3933 for (octave_idx_type i = 0; i < nr; i++) 3933 for (octave_idx_type i = 0; i < nr; i++)
3934 { 3934 {
3935 octave_quit (); 3935 octave_quit ();
3936 result (i, j) = xmin (c, m (i, j)); 3936 result(i, j) = xmin (c, m(i, j));
3937 } 3937 }
3938 3938
3939 return result; 3939 return result;
3940 } 3940 }
3941 3941
3951 3951
3952 for (octave_idx_type j = 0; j < nc; j++) 3952 for (octave_idx_type j = 0; j < nc; j++)
3953 for (octave_idx_type i = 0; i < nr; i++) 3953 for (octave_idx_type i = 0; i < nr; i++)
3954 { 3954 {
3955 octave_quit (); 3955 octave_quit ();
3956 result (i, j) = xmin (m (i, j), c); 3956 result(i, j) = xmin (m(i, j), c);
3957 } 3957 }
3958 3958
3959 return result; 3959 return result;
3960 } 3960 }
3961 3961
3980 { 3980 {
3981 int columns_are_real_only = 1; 3981 int columns_are_real_only = 1;
3982 for (octave_idx_type i = 0; i < nr; i++) 3982 for (octave_idx_type i = 0; i < nr; i++)
3983 { 3983 {
3984 octave_quit (); 3984 octave_quit ();
3985 if (std::imag (a (i, j)) != 0.0 || std::imag (b (i, j)) != 0.0) 3985 if (std::imag (a(i, j)) != 0.0 || std::imag (b(i, j)) != 0.0)
3986 { 3986 {
3987 columns_are_real_only = 0; 3987 columns_are_real_only = 0;
3988 break; 3988 break;
3989 } 3989 }
3990 } 3990 }
3991 3991
3992 if (columns_are_real_only) 3992 if (columns_are_real_only)
3993 { 3993 {
3994 for (octave_idx_type i = 0; i < nr; i++) 3994 for (octave_idx_type i = 0; i < nr; i++)
3995 result (i, j) = xmin (std::real (a (i, j)), std::real (b (i, j))); 3995 result(i, j) = xmin (std::real (a(i, j)), std::real (b(i, j)));
3996 } 3996 }
3997 else 3997 else
3998 { 3998 {
3999 for (octave_idx_type i = 0; i < nr; i++) 3999 for (octave_idx_type i = 0; i < nr; i++)
4000 { 4000 {
4001 octave_quit (); 4001 octave_quit ();
4002 result (i, j) = xmin (a (i, j), b (i, j)); 4002 result(i, j) = xmin (a(i, j), b(i, j));
4003 } 4003 }
4004 } 4004 }
4005 } 4005 }
4006 4006
4007 return result; 4007 return result;
4019 4019
4020 for (octave_idx_type j = 0; j < nc; j++) 4020 for (octave_idx_type j = 0; j < nc; j++)
4021 for (octave_idx_type i = 0; i < nr; i++) 4021 for (octave_idx_type i = 0; i < nr; i++)
4022 { 4022 {
4023 octave_quit (); 4023 octave_quit ();
4024 result (i, j) = xmax (c, m (i, j)); 4024 result(i, j) = xmax (c, m(i, j));
4025 } 4025 }
4026 4026
4027 return result; 4027 return result;
4028 } 4028 }
4029 4029
4039 4039
4040 for (octave_idx_type j = 0; j < nc; j++) 4040 for (octave_idx_type j = 0; j < nc; j++)
4041 for (octave_idx_type i = 0; i < nr; i++) 4041 for (octave_idx_type i = 0; i < nr; i++)
4042 { 4042 {
4043 octave_quit (); 4043 octave_quit ();
4044 result (i, j) = xmax (m (i, j), c); 4044 result(i, j) = xmax (m(i, j), c);
4045 } 4045 }
4046 4046
4047 return result; 4047 return result;
4048 } 4048 }
4049 4049
4068 { 4068 {
4069 int columns_are_real_only = 1; 4069 int columns_are_real_only = 1;
4070 for (octave_idx_type i = 0; i < nr; i++) 4070 for (octave_idx_type i = 0; i < nr; i++)
4071 { 4071 {
4072 octave_quit (); 4072 octave_quit ();
4073 if (std::imag (a (i, j)) != 0.0 || std::imag (b (i, j)) != 0.0) 4073 if (std::imag (a(i, j)) != 0.0 || std::imag (b(i, j)) != 0.0)
4074 { 4074 {
4075 columns_are_real_only = 0; 4075 columns_are_real_only = 0;
4076 break; 4076 break;
4077 } 4077 }
4078 } 4078 }
4080 if (columns_are_real_only) 4080 if (columns_are_real_only)
4081 { 4081 {
4082 for (octave_idx_type i = 0; i < nr; i++) 4082 for (octave_idx_type i = 0; i < nr; i++)
4083 { 4083 {
4084 octave_quit (); 4084 octave_quit ();
4085 result (i, j) = xmax (std::real (a (i, j)), std::real (b (i, j))); 4085 result(i, j) = xmax (std::real (a(i, j)), std::real (b(i, j)));
4086 } 4086 }
4087 } 4087 }
4088 else 4088 else
4089 { 4089 {
4090 for (octave_idx_type i = 0; i < nr; i++) 4090 for (octave_idx_type i = 0; i < nr; i++)
4091 { 4091 {
4092 octave_quit (); 4092 octave_quit ();
4093 result (i, j) = xmax (a (i, j), b (i, j)); 4093 result(i, j) = xmax (a(i, j), b(i, j));
4094 } 4094 }
4095 } 4095 }
4096 } 4096 }
4097 4097
4098 return result; 4098 return result;