cisst-saw
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
vctRandomDynamicNArray.h
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /* ex: set filetype=cpp softtabstop=4 shiftwidth=4 tabstop=4 cindent expandtab: */
3 
4 /*
5 
6  Author(s): Anton Deguet
7  Created on: 2007-02-11
8 
9  (C) Copyright 2007-2007 Johns Hopkins University (JHU), All Rights
10  Reserved.
11 
12 --- begin cisst license - do not edit ---
13 
14 This software is provided "as is" under an open source license, with
15 no warranty. The complete license can be found in license.txt and
16 http://www.cisst.org/cisst/license.txt.
17 
18 --- end cisst license ---
19 */
20 
21 #pragma once
22 #ifndef _vctRandomDynamicNArray_h
23 #define _vctRandomDynamicNArray_h
24 
32 
35 
49 template <class _nArrayOwnerType, typename _elementType, vct::size_type _dimension>
53 {
56  iterator iter;
57  const iterator end = nArray.end();
58  for (iter = nArray.begin(); iter != end; iter++) {
59  randomSequence.ExtractRandomValue(min, max, *iter);
60  }
61 }
62 
63 
64 #endif // _vctRandomDynamicNArray_h
65 
Portability across compilers and operating systems tools.
Forward declarations and #define for cisstVector.
Declaration of vctDynamicNArray.
void ExtractRandomValue(_valueType &result)
iterator end(void)
Definition: vctDynamicNArrayBase.h:106
static cmnRandomSequence & GetInstance(void)
Definition: cmnRandomSequence.h:138
iterator begin(void)
Definition: vctDynamicNArrayBase.h:93
Definition: vctDynamicNArrayBase.h:42
void vctRandom(vctDynamicNArrayBase< _nArrayOwnerType, _elementType, _dimension > &nArray, const typename vctDynamicNArrayBase< _nArrayOwnerType, _elementType, _dimension >::value_type min, const typename vctDynamicNArrayBase< _nArrayOwnerType, _elementType, _dimension >::value_type max)
Definition: vctRandomDynamicNArray.h:50
Randomization utilities for general use in CISST applications.
Provide an interface to a reproducible random sequence.
Definition: cmnRandomSequence.h:66
OwnerType::iterator iterator
Definition: vctDynamicNArrayBase.h:62