Skip to content

Commit

Permalink
Generalizing unit test of observation dependent variables
Browse files Browse the repository at this point in the history
  • Loading branch information
DominicDirkx committed Oct 2, 2023
1 parent 3cf6f5b commit e34f190
Show file tree
Hide file tree
Showing 2 changed files with 357 additions and 154 deletions.
13 changes: 13 additions & 0 deletions include/tudat/basics/utilities.h
Original file line number Diff line number Diff line change
Expand Up @@ -897,6 +897,19 @@ Eigen::Matrix< T, Eigen::Dynamic, 1 > getSuccesivelyConcatenatedVector(
return concatenatedVector;
}

template <typename T>
int countNumberOfOccurencesInVector( const std::vector< T >& vector, const T& value )
{
int counter = 0;
for( unsigned int i = 0; i < vector.size( ); i++ )
{
if( vector.at( i ) == value )
{
counter++;
}
}
return counter;
}

} // namespace utilities

Expand Down
Loading

0 comments on commit e34f190

Please sign in to comment.