<commit_before>#ifndef H_GIL_SIMPLE_VIEW
#define H_GIL_SIMPLE_VIEW

namespace boost { namespace gil { struct image_view; }}

namespace gil_simple_view
{
	
	enum struct channel_type
	{
		bits8  ,	//  uint8_t
		bits8s ,	//   int8_t
		bits16 ,	// uint16_t
		bits16s,	//  int16_t
		bits32 ,	// uint32_t
		bits32s,	//  int32_t
		bits32f 	//   double
	};
	
	enum struct color_type
	{
		gray_t   ,	// [gray]scale
		
		alpha_t  ,	// [a]rgb
		red_t    ,	// a[r]gb
		green_t  ,	// ar[g]b
		blue_t   ,	// arg[b]
		
		cyan_t   ,	// [c]myk
		magenta_t,	// c[m]yk
		yellow_t ,	// cm[y]k
		black_t   	// cmy[k]
	};
	
	namespace color_space_type
	{
		std::vector<color_type> gray({ color_type::gray_t });
		std::vector<color_type> rgb ({ color_type::red_t  , color_type::green_t  , color_type::blue_t  });
		std::vector<color_type> bgr ({ color_type::blue_t , color_type::green_t  , color_type::red_t   });
		std::vector<color_type> argb({ color_type::alpha_t, color_type::red_t    , color_type::green_t , color_type::blue_t  });
		std::vector<color_type> abgr({ color_type::alpha_t, color_type::blue_t   , color_type::green_t , color_type::red_t   });
		std::vector<color_type> rgba({ color_type::red_t  , color_type::green_t  , color_type::blue_t  , color_type::alpha_t });
		std::vector<color_type> bgra({ color_type::blue_t , color_type::green_t  , color_type::red_t   , color_type::alpha_t });
		std::vector<color_type> cmyk({ color_type::cyan_t , color_type::magenta_t, color_type::yellow_t, color_type::black_t };
	}
	
	struct simple_view
	{
		std::vector<color_type> color_space;
		boost::gil::image_view* src_view
	};
	
	bool is_grayscale (simple_view& v);
	bool is_rgb       (simple_view& v);
	bool is_argb      (simple_view& v);
	bool is_cmyk      (simple_view& v);
	
	simple_view create_simple_view (boost::gil::image_view& v);
	
}

#endif<commit_msg>Added comments<commit_after>#ifndef H_GIL_SIMPLE_VIEW
#define H_GIL_SIMPLE_VIEW

namespace boost { namespace gil { struct image_view; }}

namespace gil_simple_view
{
	enum struct channel_type
	{
		bits8  ,	//  uint8_t
		bits8s ,	//   int8_t
		bits16 ,	// uint16_t
		bits16s,	//  int16_t
		bits32 ,	// uint32_t
		bits32s,	//  int32_t
		bits32f 	//   double
	};
	
	enum struct color_type
	{
		gray_t   ,	// [gray]scale
		
		alpha_t  ,	// [a]rgb
		red_t    ,	// a[r]gb
		green_t  ,	// ar[g]b
		blue_t   ,	// arg[b]
		
		cyan_t   ,	// [c]myk
		magenta_t,	// c[m]yk
		yellow_t ,	// cm[y]k
		black_t   	// cmy[k]
	};
	
	namespace color_space_type
	{
		std::vector<color_type> gray({ color_type::gray_t });
		std::vector<color_type> rgb ({ color_type::red_t  , color_type::green_t  , color_type::blue_t  });
		std::vector<color_type> bgr ({ color_type::blue_t , color_type::green_t  , color_type::red_t   });
		std::vector<color_type> argb({ color_type::alpha_t, color_type::red_t    , color_type::green_t , color_type::blue_t  });
		std::vector<color_type> abgr({ color_type::alpha_t, color_type::blue_t   , color_type::green_t , color_type::red_t   });
		std::vector<color_type> rgba({ color_type::red_t  , color_type::green_t  , color_type::blue_t  , color_type::alpha_t });
		std::vector<color_type> bgra({ color_type::blue_t , color_type::green_t  , color_type::red_t   , color_type::alpha_t });
		std::vector<color_type> cmyk({ color_type::cyan_t , color_type::magenta_t, color_type::yellow_t, color_type::black_t };
	}
	
	struct simple_view
	{
		channel_type channel;
		std::vector<color_type> color_space;
		boost::gil::image_view* src_view;
	};
	
	// check color space type disregarding the order
	bool is_grayscale (simple_view& v);
	bool is_rgb       (simple_view& v);
	bool is_argb      (simple_view& v);
	bool is_cmyk      (simple_view& v);
	
	// create a simple_view from a boost::gil view
	simple_view create_simple_view (boost::gil::image_view& v);
	
}

#endif
{'fraction_non_alphanumeric': 0.14150943396226415, 'fraction_numerical': 0.011530398322851153, 'mean_word_length': 3.9960732984293195, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '604677', 'n_tokens_mistral': 1692, 'n_tokens_neox': 1566, 'n_words': 260}