ヒープソートの機能テスト
Type | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|
real, | parameter | :: | test1(10) | = | [-9.0, -1.0, 0.0, 3.0, 5.0, 7.2, 14.4, 99.9, 122.5, 255.0] | |
real, | parameter | :: | test2(11) | = | [-99.0, -9.0, -1.0, 0.0, 3.0, 5.0, 7.2, 14.4, 99.9, 122.5, 255.0] | |
real | :: | test3(10000) |
正解配列(ソート済み配列)を引数に取り、それをシャッフルしたのちにソートを行う 正解配列とソート後の配列を比較し、ソートが機能しているかを検証
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real, | intent(in) | :: | array_correct(:) | |||
character(len=*), | intent(in) | :: | sort_mode |