PrgT_Vector_Compare_Proc

Abstract

Callback: Called during a quicksort to compare two vector elements.

Syntax

PrgT_Vector_Compare_Proc (elem1_ptr, elem2_ptr)
Argument Type Description
elem1_ptr void * The first element
elem2_ptr void * The second element

Return Type

int

Result of the comparison (see Details).

prg_vector.h

Details

This callback should return one of the following values to indicate the result of the comparison:

  • 1—if elem1 should be closer to the vector head than elem2
  • 0—if elem1 and elem2 are equal in rank
  • -1—if elem2 should be closer to the vector head than elem1

This callback is used by prg_vector_sort().

本站文档由 北京智网畅联科技有限公司 整理、翻译并提供 · Documentation compiled and provided by Beijing ZNetLink Technology Co., Ltd.

交流群 · QQ Group:OPNET/智网妙算网络仿真交流群(群号 486383494)

原文档 © 2017 Riverbed Technology · 本站为公益翻译,由 AI 辅助完成,请仔细甄别

Original documentation © 2017 Riverbed Technology. Community translation, AI-assisted. Contact: jiazequn@znetlink.com