[#BloombergLP-balm-MetricSample-sampleGroup]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/balm.adoc[balm]::xref:BloombergLP/balm/MetricSample.adoc[MetricSample]::sampleGroup
:relfileprefix: ../../../
:mrdocs:

Return a reference to the non&hyphen;modifiable `MetricSampleGroup` object at the specified `index` in this sample&period;

== Synopsis

Declared in `&lt;balm&lowbar;metricsample&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:BloombergLP/balm/MetricSampleGroup.adoc[MetricSampleGroup] const&
sampleGroup(int index) const;
----

== Description

The behavior is undefined unless `0 &lt;&equals; index &lt; numGroups()`&period; Note that the returned reference will remain valid until this sample is modified by invoking `appendGroup` or `removeAllRecords()`&period;

== Return Value

non&hyphen;modifiable reference to the sample group at `index`

== Parameters

[cols="1,4"]
|===
| Name| Description
| *index*
| zero&hyphen;based index of the sample group
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
