diff --git a/src/vector/flux_vector.c b/src/vector/flux_vector.c index 0a48d70..6def6ec 100644 --- a/src/vector/flux_vector.c +++ b/src/vector/flux_vector.c @@ -1888,6 +1888,118 @@ void __vsort(float *vArr1,int length,int type,float *vArr2){ } } +void __vcorrsort(float *arr1,float *arr2,float *arr3,int length,int type){ + float value1=0; + float value2=0; + float value3=0; + + for(int i=0;iarr1[j]){ + value1=arr1[i]; + arr1[i]=arr1[j]; + arr1[j]=value1; + + if(arr2){ + value2=arr2[i]; + arr2[i]=arr2[j]; + arr2[j]=value2; + } + + if(arr3){ + value3=arr3[i]; + arr3[i]=arr3[j]; + arr3[j]=value3; + } + } + } + else{ // desc + if(arr1[i]arr1[j]){ + value1=arr1[i]; + arr1[i]=arr1[j]; + arr1[j]=value1; + + if(arr2){ + value2=arr2[i]; + arr2[i]=arr2[j]; + arr2[j]=value2; + } + + if(arr3){ + value3=arr3[i]; + arr3[i]=arr3[j]; + arr3[j]=value3; + } + + if(arr4){ + value4=arr4[i]; + arr4[i]=arr4[j]; + arr4[j]=value4; + } + } + } + else{ // desc + if(arr1[i]arr[j]){ _value=arr[i]; arr[i]=arr[j]; arr[j]=_value; } } - else{ // 降 + else{ // desc if(arr[i]