Garfield++ v2r0
A toolkit for the detailed simulation of particle detectors based on ionisation measurement in gases and semiconductors
Loading...
Searching...
No Matches
Heed::IterDynArr< T > Class Template Reference

#include <AbsArr.h>

Public Member Functions

 IterDynArr (const DynArr< T > *fdar)
 
T * more (void)
 
T * current (void)
 
T * less (void)
 
const DynLinArr< long > & get_ncur (void) const
 

Detailed Description

template<class T>
class Heed::IterDynArr< T >

Definition at line 2359 of file AbsArr.h.

Constructor & Destructor Documentation

◆ IterDynArr()

template<class T >
Heed::IterDynArr< T >::IterDynArr ( const DynArr< T > *  fdar)
inline

Definition at line 2361 of file AbsArr.h.

2362 : ncur(fdar->get_qdim()), dar((DynArr<T>*)fdar) {
2363 long n;
2364 long qdim1 = ncur.get_qel() - 1;
2365 if (qdim1 >= 0) {
2366 for (n = 0; n < qdim1; n++) ncur[n] = 0;
2367 ncur[qdim1] = -1;
2368 }
2369 }
long get_qel(void) const
Definition: AbsArr.h:283

Member Function Documentation

◆ current()

template<class T >
T * Heed::IterDynArr< T >::current ( void  )
inline

Definition at line 2378 of file AbsArr.h.

2379 {
2380 long n;
2381 long qdim = ncur.get_qel();
2382 if (qdim <= 0) return NULL;
2383 for (n = 0; n < qdim; n++) {
2384 if (ncur[n] < 0 || ncur[n] >= dar->get_qel()[n]) return NULL;
2385 }
2386 return &(dar->ac(ncur));
2387 }

◆ get_ncur()

template<class T >
const DynLinArr< long > & Heed::IterDynArr< T >::get_ncur ( void  ) const
inline

◆ less()

template<class T >
T * Heed::IterDynArr< T >::less ( void  )
inline

Definition at line 2389 of file AbsArr.h.

2391 {
2392 if (find_prev_comb(dar->get_qel(), ncur))
2393 return &(dar->ac(ncur));
2394 else
2395 return NULL;
2396 }
int find_prev_comb(const DynLinArr< long > &qel, DynLinArr< long > &f)
Definition: AbsArr.cpp:501

◆ more()

template<class T >
T * Heed::IterDynArr< T >::more ( void  )
inline

Definition at line 2370 of file AbsArr.h.

2371 {
2372 if (find_next_comb(dar->get_qel(), ncur))
2373 return &(dar->ac(ncur));
2374 else
2375 return NULL;
2376 }
int find_next_comb(const DynLinArr< long > &qel, DynLinArr< long > &f)
Definition: AbsArr.cpp:450

Referenced by Heed::convert_DynArr(), Heed::copy_DynArr(), Heed::operator+(), Heed::operator-(), Heed::operator<<(), Heed::print_DynArr(), Heed::print_DynArr_int_w(), and Heed::DynArr< T >::put_qel().


The documentation for this class was generated from the following file: