src/KPartialSums.cxx
size_t
decodeBCItoIndexValues
(
   uint64_t BCIval ,
   std::vector<size_t>& indexVals
)
{
   size_t retNumBits = 0;
   std::bitset< sizeof(BCIval) > bitVals( BCIval );
   retNumBits = bitVals.count();
   return( retNumBits );
}
//==+====1====+====2====+====3====+====4====+====5====+====6====+====7====+====8
//
// all returned solutions (returned as BCI Coded Integer Value): have at least
// one bit set - or it would not be a solution ;-)
//
// thus we need a fast convenient way to convert each positive unsigned
// BCI Coded Integer Value to its set of Index Values:
//    BCI Coded (LSB) <<-->>  ZERO-Based [0] Index
//    BCI Coded (MSB) <<-->>  ZERO-Based [N-1] Index
//
// STD::BITSET does the trick here, initialized from unsigned integer
// quickly computes index values of bits set - although its very tempting
// to write cool bit-hack loops forever (and my first draft of both the
// encode and decode portions of this algorithm did just that), BITSET
// will be very much easier, faster, more API Capable, and less error
// prone (although probably not available on embedded platforms).
//
//==+====1====+====2====+====3====+====4====+====5====+====6====+====7====+====8




:BITSET does the trick here, initialized from unsigned integer
quickly computes index values of bits set - although its very tempting
to write cool bit-hack loops forever (and my first draft of both the
encode and decode portions of this algorithm did just that), BITSET
will be very much easier, faster, more API Capable, and less error
prone (although probably not available on embedded platforms).


: BITSET does the trick here initialized from unsigned integer quickly computes index values of bits set - although its very tempting to write cool bit - hack loops forever ( and my first draft of both the encode and decode portions of this algorithm did just that ) BITSET will be very much easier faster more API Capable and less error prone ( although probably not available on embedded platforms ) .
size_t
decodeBCItoIndexValues
(
   uint64_t BCIval ,
   std::vector<size_t>& indexVals
)
{
   size_t retNumBits = 0;
   std::bitset< sizeof(BCIval) > bitVals( BCIval );
   retNumBits = bitVals.count();
   return( retNumBits );
}
size_t decodeBCItoIndexValues ( uint64_t BCIval , std :: vector < size_t > & indexVals ) { size_t retNumBits = 0 ; std :: bitset < sizeof ( BCIval ) > bitVals ( BCIval ) ; retNumBits = bitVals . count ( ) ; return ( retNumBits ) ; }
+====1====+====2====+====3====+====4====+====5====+====6====+====7====+====8
all returned solutions (returned as BCI Coded Integer Value): have at least
one bit set - or it would not be a solution ;-)
+ ==== 1 ==== + ==== 2 ==== + ==== 3 ==== + ==== 4 ==== + ==== 5 ==== + ==== 6 ==== + ==== 7 ==== + ==== 8 all returned solutions ( returned as BCI Coded Integer Value ) : have at least one bit set - or it would not be a solution ; - )