prg_profile_avg_and_max_get()

Abstract

Gets the average and maximum values for a profile.

Syntax

prg_profile_avg_and_max_get (profile_handle, avg_ptr, max_ptr)
Argument Type Description
profile_handle PrgT_Profile_Handle Profile of interest.
avg_ptr double * Area to be filled with the abscissa-weighted average profile value.
max_ptr double * Area to be filled with the maximum profile value.

Return Type

PrgT_Compcode

PrgC_Compcode_Success if the average and maximum are obtained; PrgC_Compcode_Failure otherwise (*avg_ptr and *max_ptr will be 0.0).

prg_profile_funcs.h

Details

This function computes the average and maximum values for a profile. If the profile is empty or an error occurs, *avg_ptr and *max_ptr will be 0.0.

The average is weighted by the length of the bucket. If the final value is defined and non-zero, the length of the final bucket is not known; in this case, the final value is weighted for a single unit (of time, or whatever the abscissa value is defined to be).

If the profile contains undefined values, the undefined regions are ignored. Thus:

  • For the average, undefined values are not added into the value or the abscissa sums.
  • For the maximum, undefined values are skipped.

本站文档由 北京智网畅联科技有限公司 整理、翻译并提供 · 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