Jump to content

  • Log In with Google      Sign In   
  • Create Account


#Actualwqking

Posted 15 October 2012 - 04:26 AM

Quick code, I'm not sure if it's compilable or work, don't have time to test for now.

template <class INT_TYPE,class CONTAINER_INT=uINT,

												  INT_TYPE ContainerSize=sizeof(CONTAINER_INT)*8,

												  class DATA_CONTAINER=BitsetDataContainer<INT_TYPE,CONTAINER_INT,ContainerSize> >

   class BitsetMatrix

   {

   public:

	 typedef INT_TYPE IntType;

		///code

   };





template <class T>

   typename T::IntType Sum(const T &M)

   {

		typename T::IntType Rt;

		if (!M.IsEmpty())

		{

				//count sum using another function

		}

		return Rt;

   }




#1wqking

Posted 15 October 2012 - 04:22 AM

Quick code, I'm not sure if it's compilable or work, don't have time to test for now.

[source lang="cpp"]template <class INT_TYPE,class CONTAINER_INT=uINT, INT_TYPE ContainerSize=sizeof(CONTAINER_INT)*8, class DATA_CONTAINER=BitsetDataContainer<INT_TYPE,CONTAINER_INT,ContainerSize> > class BitsetMatrix { public: typedef INT_TYPE IntType; ///code };template <class T> typename T::IntType Sum(const T &M) { typename T::IntType Rt; if (!M.IsEmpty()) { //count sum using another function } return Rt; }[/source]

PARTNERS