¿ÇÜĹÀ°¿ô¤ÇStein¤ÎGCD¤ò»È¤¦

¼¡¤Î¤è¤¦¤Ê¡¢32bit·Ï¤Î¿ÇÜĹÀ°¿ô¥¯¥é¥¹¤¬¤¢¤Ã¤¿¤È¤·¤Æ¡¢


class Bigint
{
public:
	Bigint();
	...
	... ÍÍ¡¹¤ÊÄêµÁ(»Í§±é»»¡¢operator=,operator<<=Åù)
	...
private:
	int   m_sz;   // ÇÛÎó¿ô
	int*  m_num;  // ÇÛÎó(¥ê¥È¥ë¥¨¥ó¥Ç¥£¥¢¥ó)
};

16¿Ê¤Ç¼¡¤Î¤è¤¦¤Ëɽ¤»¤ëÀ°¿ô¤¬¤¢¤ì¤Ð
0x111100002222000033330000

¤³¤Î¥¯¥é¥¹¤Ç¤Ï¼¡¤Î¤è¤¦¤Ë³ÊǼ¤µ¤ì¤ë¤â¤Î¤È¤¹¤ë¡£(Ãí1)

(m_sz=3)
|- m_num[0]-|- m_num[1]-|- m_num[2]-|
| 3333 0000 | 2222 0000 | 1111 0000 |


¤³¤ì¤òÍѤ¤¤Æ¡¢Stein's algorithm¤Ë¤è¤ëGCD·×»»¤ò¹Í¤¨¤ë¡£


Stein¤ÎGCD¤Ë¤Ä¤¤¤Æ¤ÏWikiPedia¤¬¾Ü¤·¤¤¡£
http://en.wikipedia.org/wiki/Binary_GCD_algorithm

°ìÈÌ¤Ë ¥æ¡¼¥¯¥ê¥Ã¥É¤Î¸ß½üË¡(³ÈÄ¥) ¤ÎÊý¤¬¥ë¡¼¥×²ó¿ô¤Ï¾¯¤Ê¤¤¤¬¡¢
¾ê;·×»»¤¬¥Í¥Ã¥¯¤Ë¤Ê¤ê¡¢±þÅúÀ­¤¬°­¤¯¤Ê¤ë¾ì¹ç¤¬Â¿¤¤¡£

⤷¡¢¼ÂÁõ¤¹¤ë¾è»»¡¦¾ê;»»¤Î¥¢¥ë¥´¥ê¥º¥à¤ä¿ôÃͤηå¿ô¤Ë¤è¤Ã¤Æ¤Ï¡¢
¥ë¡¼¥×²ó¿ô¤Î¾¯¤Ê¤¤¥æ¡¼¥¯¥ê¥Ã¥É¤Î¸ß½üË¡(³ÈÄ¥)¤ÎÊý¤¬Áᤤ¾ì¹ç¤â¤¢¤ë¡£

Stein¤Î¥¢¥ë¥´¥ê¥º¥à¤ÇÃÙ¤¤¤È»×¤ï¤ì¤ë¤Î¤Ï¡¢Shift±é»»¤Î²ó¿ô¤Ë¿Ô¤­¤ë¡£
¥µ¥ó¥×¥ë¥³¡¼¥É¤ò¤½¤Î¤Þ¤Þ»È¤¦¤È¡¢¤¤¤¯¤éÉé²Ù¤Î¾¯¤Ê¤¤Shift±é»»¤È¸À¤¨¤É¤â¡¢
¿·å±é»»¤Ç½èÍý²ó¿ô¤¬Â¿¤¯¤Ê¤ë¤ÈÂ礭¤ÊÃÙ±ä¤ò¾·¤­¤Þ¤¹¡£
WikiPedia¤ÎStein¤Î¥µ¥ó¥×¥ë¥³¡¼¥É¤ÇÌäÂê¤È¤Ê¤ë¤Î¤Ï¡¢


/* From here on, u is always odd. */
do {
  while ((v & 1) == 0)  /* Loop X */
     v >>= 1;


¤ÎÉôʬ¡£Íפϱ¦Ã¼¤Î£°¤ò½üµî¤·¤Æ¤¤¤ë¤À¤±¤Ç¤¢¤ë¡£
±¦Ã¼¤Ëʤó¤Ç¤¤¤ë£°¤Î¿ô¤ò¿ô¤¨¤ë´Ø¿ô¤òÍÑ°Õ¤·¤Æ¡¢Shift²ó¿ô¤ò¸º¤é¤³¤È¤òÌܻؤ¹¡£

http://en.wikipedia.org/wiki/Count_trailing_zeros ¤Ë¤â¤¢¤ë¤¬¡¢
intel·Ï¤Ç¤¢¤ì¤Ð¡¢¥¢¥»¥ó¥Ö¥é(bsf)¤¬»È¤¨¤ë¡£


//
// ¹â®²½¤Î¤¿¤á¥¼¥í¥Á¥§¥Ã¥¯¤ò¹Ô¤Ã¤Æ¤¤¤Ê¤¤
//  ¥¼¥í¤À¤È¥¢¥¯¥»¥¹°ãÈ¿¤ÎÎã³°¡£
//
int Bigint::bsf() const{
	int* p = m_num;
	__asm{
		mov edx, [p]
		mov eax, edx
bsf_l2:
		bsf ecx, [eax]
		jnz bsf_l1
		add eax, 4
		jmp bsf_l2
bsf_l1:
		sub eax, edx
		shr eax, 2
		mov edx, BITPERBLOCK
		mul edx
		add eax, ecx
	}
}


BITPERBLOCK¤Ï¡¢ÇÛÎ󣱤Ĥ˴ޤޤì¤ë¿ÇÜĹÀ°¿ô¤ÎBit¿ô¤Ç¤¢¤ë¡£
32bit¤Ç¤¢¤ì¤Ð¡¢32¤¬»È¤ï¤ì¤ë¾ì¹ç¤¬Â¿¤¤¡£(Ãí2)
(64bit¤Î¾ì¹ç¡¢bsfq¤ò»È¤¦¡£)

(m_sz=2, BITPERBLOCK=32)¤Î¼¡¤Î¤è¤¦¤Ê¿ÇÜĹÀ°¿ô¤¬¤¢¤ë¤È¤­

|- m_num[0]-|- m_num[1]-|
| 0000 0000 | ABCD 0000 |

bsf()¤Ï¡¢32+16=48 ¤òÊÖ¤¹¡£


¥¢¥»¥ó¥Ö¥é¤ò»È¤ï¤Ê¤¤¼¡¤ÎÊýË¡¤â¤¢¤ë¡£


int Bigint::bsf() const{
	static int table[32] = {0,1,10,2,11,14,22,3,30,12,15,17,19,23,26,4,31,9,13,21,29,16,18,25,8,20,28,24,7,27,6,5};

	int count = 0;
	for (int i=0; i<m_sz; i++){
		int x = m_num[i];
		if (x == 0){
			count += BITPERBLOCK;
		}else{
			count += table[((unsigned int)(x & -x) * 0x07C4ACDDUL) >> 27];
			break;
		}
	}
	return count;
}

// 64bit/Block¤Î¾ì¹ç
int Bigint::bsf64() const{
	static int table[64] = {
		0,1,59,2,60,40,54,3,61,32,49,41,55,19,35,4,62,52,30,33,50,12,14,42,56,16,27,20,36,23,44,5,
		63,58,39,53,31,48,18,34,51,29,11,13,15,26,22,43,57,38,47,17,28,10,25,21,37,46,9,24,45,8,7,6};

	int count = 0;
	for (int i=0; i<m_sz; i++){
		__int64 x = m_num[i];
		if (x == 0){
			count += BITPERBLOCK;
		}else{
			count += table[((unsigned __int64)(x & -x) * 0x03F566ED27179461ULL) >> 58];
			break;
		}
	}
	return count;
}

http://en.wikipedia.org/wiki/Count_trailing_zeros ¤Ë¤â¤¢¤ê¤Þ¤¹¤¬¡¢
£Í·ÏÎó¤ò»È¤Ã¤¿¥Þ¥¸¥Ã¥¯¤Ç¤¹¡£
¤³¤Á¤é¤ÎÊý¤¬¾Ü¤·¤¤¤Ç¤¹¡£ http://d.hatena.ne.jp/siokoshou/20090704


¤¹¤ë¤È¡¢Stein¤Î¥³¡¼¥É¤Ï¼¡¤Î¤è¤¦¤Ë½ñ¤±¤ë¡£


//
// *this = GCD(*this, v)
//
void Bigint::gcd(const Bigint& v) {
	if (v == 0){
		return;
	}
	if (operator==(0)){
		operator= (v);
		return;
	}

	Bigint x[2] = {*this, v};

	if (x[0] < 0)	x[0].operator-();
	if (x[1] < 0)	x[1].operator-();

	int i0 = x[0].bsf();
	int i1 = x[1].bsf();
	int shift = (i0 < i1) ? i0 : i1;
	x[0] >>= i0;
	x[1] >>= shift;

	int id = 0;
	do {
		x[id^1] >>= x[id^1].bsf();

		if (x[id] > x[id^1]){
			id ^= 1;
		}
		x[id^1] -= x[id];
	} while (x[id^1] != 0);

	operator= (x[id] << shift);
}

¤³¤ì¤Ç30¡Á40%¤Ï¡¢½èÍý»þ´Ö¤òû½Ì¤Ç¤­¤Þ¤·¤¿¡£

¤³¤ì¤³¤½¤¬Steins;Gate¤ÎÁªÂò¢ö

¤³¤Î¥³¡¼¥É¤ò¼ÂÁõ¤·¤¿¥µ¥ó¥×¥ë¤Î16¿Ê¡¦£²¿Ê¡¦10¿ÊÅÅÂî¤Ç¤¹¡£
À°¿ô¤À¤±¤Ç¤¹¤¬¤ª¤è¤½100Ëü·å¤Þ¤Ç·×»»¤Ç¤­¤Þ¤¹¡£


(Ãí1) ¸ÇÄêĹ¤Ç¤Ï¤Ê¤¤Bigint¥¯¥é¥¹¤Ç¤Ï¡¢¿­Ä¹¡¦½ÌÂàÅù¤Î¥á¥â¥ê¤Î´ÉÍý¤âɬÍפˤʤë¤Î¤Ç¡¢¤³¤ì¤Û¤Éñ½ã¤Ê¤â¤Î¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡£
(Ãí2) 32bit(Block)Á´¤Æ¤ò»È¤¦¤³¤È¤¬É¬¤º¤·¤âÍ­Íø¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡£SSE¤òÍ­¸ú¤Ë»È¤¦¤Ê¤é·å¤¢¤Õ¤ì¤¬È¯À¸¤·¤Ê¤¤¤è¤¦ 31bit °Ê²¼¤Ë¤·¤Þ¤¹¡£


Tags: ¥×¥í¥°¥é¥à¥á¥â
author : HUNDREDSOFT | - | -

¥«¥é¥Ä¥ÐË¡¤Ç»÷Èó¥´¡¼¥¹¥È°Å»»

¥´¡¼¥¹¥È°Å»»¤è¤êÁᤤ¡ª...¾ì¹ç¤â¤¢¤ë·×»»ÊýË¡....(´À


¥´¡¼¥¹¥È°Å»»¤È¤¤¤¦¤Î¤ò¡¢¾¯¤·Á°¤ËÃΤê¤Þ¤·¤¿¡£
¥´¡¼¥¹¥È°Å»»¤¬É®»»¤Ç¤¢¤ë¤Ê¤é¡¢¾è»»£´²ó¡¦²Ã»»£³¡Á£´²ó¤Î±é»»¤Ë¤Ê¤ê¤Þ¤¹¡£

Î㤨¤Ð¡¢48x53¤ò¹Í¤¨¤Æ¤ß¤ë¤È

¡ÚÄ̾ï¤ÎÉ®»»¡Û
     4 8
   x 5 3
---------
     2 4
   1 2
   4 0
 2 0
---------
 2 5 4 4


¡Ú¥´¡¼¥¹¥È°Å»»¡Û
Àé¤Î°Ì¤È°ì¤Î°Ì¤òÀè¤Ë½Ð¤·¤Æ¡¢»Ä¤ê¤ò¸å¤«¤é²Ã»»¤·¤Þ¤¹¡£
Ä̾ï¤ÎÉ®»»¤Î²Ã»»¤Î½ç½ø¤òÆþ¤ìÂؤ¨¤Æ¤¤¤ë¤³¤È¤¬¤ï¤«¤ê¤Þ¤¹¡£
(¾Ü¤·¤¯¤Ï½ñÀÒ¤ò¤´Í÷¤¯¤À¤µ¤¤¡£µû¤Î³¨¤ò»È¤Ã¤¿¤ï¤«¤ê¤ä¤¹¤¤¤â¤Î¤Ç¤¹)


­¡ (4x5)x10 + 8x5 = 240          ...Àé¤Î°Ì(2)
­¢                   40x10 + 8x3
                  =  424         ...°ì¤Î°Ì(4)
­£                   42 + 4x3    ...Àµ³Î¤Ë¤Ï°ì¤Î°Ì¤È½½¤Î°Ì¤Çʬ²ò¤·¤Æ²Ã»»¤·¤Þ¤¹
                  =  54
-----------------------------
                    2544


¡Ú¥«¥é¥Ä¥Ð¡Û
¤½¤ì¤Ê¤é¤Ð¤È¡¢¥´¡¼¥¹¥È¤Ã¤Ý¤¤¥«¥é¥Ä¥ÐË¡¤ò¹Í¤¨¤Æ¤ß¤Þ¤·¤¿¡£
¤È¤Ï¸À¤Ã¤Æ¤âñ½ã¤Ë ´ð¿ô¤ò£±£° ¤Ë¤·¤¿¤À¤±¤Ç¤¹¤¬¡£
ƱÍͤËÀé¤Î°Ì¤È°ì¤Î°Ì¤òÀè¤Ë½Ð¤·¤Æ¡¢»Ä¤ê¤ò¸å¤«¤é·×»»¤·¤Þ¤¹¡£

­¡ (4x5)x100 + (8x3) = 2024  ¾å°Ì·åƱ»Î¤Î¾è»»¤È²¼°Ì·åƱ»Î¤Î¾è»»¤Ê¤Î¤Ç·«¤ê¾å¤¬¤ê¤Ï¤Ê¤¤¡£Ê¤٤ë¤À¤±¡£
­¢ (4x5)     + (8x3) =  44   ­¡¤Î¾å°ÌÉôʬ¤È²¼°ÌÉôʬ¤Î²Ã»»¡£20+24+2
------------------------------
                        46
­£ -(4-8)x(5-3)      =   8   ¥«¥é¥Ä¥ÐË¡¤Î¥ß¥½¡£
------------------------------
                        54
------------------------------
                       2544

¾å¤ÎÀâÌÀ¤Ç¤Ï¤ï¤«¤ê¤Ë¤¯¤¤¤Î¤Ç¡¢·×»»ÊýË¡¤ò´Êñ¤Ê¥Ñ¥¿¡¼¥ó¤Ë¤·¤Þ¤¹¡£

­¡¾å°Ì·å¤È²¼°Ì·åƱ»Î¤ò³Ý¤±¤Æʤ٤ޤ¹¡£(¢ª2024)
­¢²¼£³·å¤ò­¤·¤Þ¤¹(0+2+4¢ª6)
­£¾å£³·å¤ò­¤·¤Þ¤¹(2+0+2¢ª4)
...¤³¤³¤Ç¸µ¤Î½½¤Î°Ì¤È°ì¤Î°Ì¤Î¿ô¡Ö0,2¡×¤Ï˺¤ì¤Æ¡¢2464¤òµ­²±¤¹¤ë¡£
­¤³Ý¤±¤ë¿ô¡¢³Ý¤±¤é¤ì¤ë¿ô¡¢¤½¤ì¤¾¤ì½½¤Î°Ì¤È°ì¤Î°Ì¤Îº¹¤ò¼è¤Ã¤Æ³Ý¤±¤Þ¤¹¡£(-4x2¢ª-8)
­¥Éä¹æȿž(-8¢ª+8)
­¦ ­£¤È­¢¤Ç¤Ç¤­¤¿¿ô¤Ë¡¢­¥¤Î¿ô¤ò­¤·¤Þ¤¹¡£(46+8¢ª54)
Ê»¤»¤Æ·Ò¤²¤ë¤È¡¢2544¤Î½ÐÍè¾å¤¬¤ê¡£

­¤¤¬¥«¥é¥Ä¥ÐË¡¤Î¥ß¥½¤Ç¡¢¤¿¤¹¤­³Ý¤±¤Î³Ý¤±»»(4x3,8x5)¤ÏɬÍפ¢¤ê¤Þ¤»¤ó¡£

¤¤¤¯¤Ä¤«·×»»¥µ¥ó¥×¥ë¤òʤ٤ޤ¹¡£

¤³¤ì¤â¥«¥é¥Ä¥Ð¤Î¸ú²Ì¤¬Îɤ¯½Ð¤Æ¤¤¤Þ¤¹¡£

ºÇ¤â¸ú²Ì¤¬½Ð¤ë¤Î¤Ï¡¢½½¤È°ì¤Î°Ì¤¬Æ±¤¸¿ô»ú¤Î¾ì¹ç¤Ç¡¢

´Êñ¤¹¤®¤Æ¶Ã¤­¤Þ¤¹¡£

»ÄÇ°¤Ê¤¬¤éÁ´¤Æ¤Î¿ô»ú¤ÎʤӤǴÊñ¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡£
¼¡¤ÎÎã¤ò¤´Í÷¤¯¤À¤µ¤¤¡£

¤³¤ÎÎã¤À¤È¡¢·å¾å¤²¤È·å²¼¤²¤¬È¯À¸¤¹¤ë¤Î¤Ç¡¢¾¯¤·ÌÌÅݤǤ¹¡£

¥«¥é¥Ä¥ÐË¡¤Ë¤Ä¤¤¤Æ¾Ü¤·¤¯¤Ï
http://ja.wikipedia.org/wiki/%E3%82%AB%E3%83%A9%E3%83%84%E3%83%90%E6%B3%95
°ìÈ̤ˤϡ¢Ê¬³äÅý¼£Ë¡¤È¤·¤Æͭ̾¤Ç¡¢¾è»»¤Î¾¤Ë¤â½ü»»¤äÊ¿Êýº¬¤Î¿ÇÜĹ¿ô·×»»¤Ç»È¤ï¤ì¤Þ¤¹¡£(Ãí)
KaratsubaÇî»Î ¤â¤³¤ó¤Ê»È¤¤Êý¤µ¤ì¤ë¤È¤Ï¡¢»×¤ï¤Ê¤«¤Ã¤¿¤Ç¤·¤ç¤¦¡£


¡Ú¤Þ¤È¤á¡Û
´ö¤Ä¤«¤ÎÎã¤Ç¤Ï¡¢¥«¥é¥Ä¥ÐË¡¤ÎÊý¤¬Áᤤ¤è¤¦¤Êµ¤¤â¤·¤Þ¤¹¤¬¡¢
¥´¡¼¥¹¥È°Å»»¤ÎÎɤµ¤Ï¡¢Ã±½ã²½¤µ¤ì¤¿¾®¤µ¤Ê²Ã»»¤òÁȤ߹ç¤ï¤»¤ë¤³¤È¤Ç¡¢¾®³Ø¹»Äã³Øǯ¤Ç¤â·×»»¤Ç¤­¤ë¤È¤³¤í¤Ë¤¢¤ê¤Þ¤¹¡£
¥Ñ¥¿¡¼¥ó¤Ë¤è¤Ã¤ÆÆñ°×ÅÙ¤¬¤¢¤Þ¤ê¾å²¼¤¹¤ë¤Î¤Ï¡¢Äã³Øǯ¤Ç¤Ï¸·¤·¤¤¤«¤â¤·¤ì¤Þ¤»¤ó¡£

¥«¥é¥Ä¥ÐË¡¤Î¾ì¹ç¡¢¾è»»²ó¿ô¤¬¸º¤ê¤Þ¤¹¤¬­¥­¦¤¬¸º»»¤Ë¤Ê¤ë¾ì¹ç¤â¤¢¤ë¤Î¤Ç¤³¤³¤¬°Å»»¾å¤Îµ´Ìç¤Ë¤Ê¤ê¤Þ¤¹¡£
Î㤨¤Ð¡¢¾è¿ô¤äÈï¾è¿ô¤Ë22¤ä77¤Ê¤É¡¢Æ±¤¸¿ô»ú¤¬Ê¤ó¤Ç¤¤¤ë¾ì¹ç¤Ï­¤­¥¤¬¤¤¤é¤Ê¤¯¤Ê¤ë¤Î¤Ç´Êñ¤Ç¤¹¤¬¡¢ºÇ¸å¤ÎÎã¤Ê¤É¥«¥é¥Ä¥Ð°Å»»¤Ç²ò¤¯¤Î¤Ï¸º»»¤Ë¤è¤ë·å²¼¤²¤¬¤¢¤ë¤Î¤ÇÌÌÅݤǤ¹¡£
¤Þ¤¿¡¢¾®¤µ¤Ê·å¿ô¤Ç¤¢¤ì¤Ð¿Í´Ö¤Ë¤È¤Ã¤Æ¤Ï¡¢²Ã»»¤è¤ê¾è»»¤ÎÊý¤¬Áᤤ¤Î¤Ç¡¢
ËÜÍè¤Î¥«¥é¥Ä¥ÐË¡¤Î¸ú²Ì¤Ï¡¢Á´¤¯¤È¸À¤Ã¤Æ¤¤¤¤Äø¤¢¤ê¤Þ¤»¤ó¡£(Ãí)

£²·å£²·å¤Þ¤Ç¤·¤«ÄÌÍѤ·¤Ê¤¤¤È¤«¡Ö¤½¤í¤Ð¤ó¡×¤ÎÊý¤¬Îɤ¤¤È¤«ÈãȽŪ¤Ê°Õ¸«¤â»¶¸«¤·¤Þ¤¹¤¬¡¢
¥´¡¼¥¹¥È°Å»»¤Ï¡¢¥¤¥á¡¼¥¸(µû¥Ñ¥¿¡¼¥ó)¤Ç´Êñ¤Ë¤ï¤«¤ê¤ä¤¹¤¯·×»»ÊýË¡¤ò²òÀ⤷¤¿¤È¤¤¤¦ÅÀ¤Ç¤Ï¡¢
º£¤Þ¤Ç¤Ê¤«¤Ã¤¿¿·¤·¤¤»î¤ß¤Ç¤¢¤ê¡¢¤Á¤ç¤Ã¤È¿¿»÷¤·¤Æ¤ß¤¿¤¯¤Ê¤ê¤Þ¤·¤¿¡£


¤É¤¦¤Ç¤âÎɤ¤¤³¤È¤Ç¤¹¤¬¡¢¤É¤³¤Î¥Ú¡¼¥¸¤â¡Ö48 x 53¡×¤ò»²¹Í¤Ë¤·¤Æ¤¤¤ë¤Î¤Ç¡¢
48x53¤ÎÅú¤¨¤À¤±¤Ï³Ð¤¨¤Á¤ã¤Ã¤Æ¤¤¤ë¿Í¤¬¤¤¤ë¤Î¤Ç¤Ï¤Ê¤¤¤À¤í¤¦¤«¡£



Tags: ¥×¥í¥°¥é¥à¥á¥â
³¤­¤òÆɤà¡ä¡ä
author : HUNDREDSOFT | - | -

Windows7¤Ç´Êñ¤Ë¥Þ¥ë¥Á¥¿¥Ã¥Á¤ò»î¤¹

Windows7¤Ç´Êñ¤Ë¥Þ¥ë¥Á¥¿¥Ã¥Á¤ò»î¤¹ÊýË¡¤È¤·¤Æ¡¢ "Multi-Touch Vista" ¤¬¤¢¤ê¤Þ¤¹¡£
̾Á°¤ÎÄ̤ꡢ¤½¤ì¤Û¤É¿·¤·¤¤¥½¥Õ¥È¤Ç¤Ï¤Ê¤¤¤Î¤Ç¤´Â¸¤¸¤ÎÊý¤â¤¤¤ë¤Ç¤·¤ç¤¦¡£

£²¤Ä¤Î¥Þ¥¦¥¹ÆþÎϤò£²¤Ä¤Î¥¿¥Ã¥Á¥Ý¥¤¥ó¥È¤Ë¸«Î©¤Æ¤Æ¡¢
¥Þ¥ë¥Á¥¿¥Ã¥Á´Ä¶­¤ò¼Â¸½¤·¤Æ¤¯¤ì¤ë¥É¥é¥¤¥Ð¤È¥³¥ó¥È¥í¡¼¥ë¥½¥Õ¥È¤Ç¤¹¡£

Virtual´Ä¶­¤Ç¤³¤ì¤ò²¿¤È¤«Æ°¤«¤»¤Ê¤¤¤«»î¤·¤¿¤Î¤Ç¤¹¤¬¡¢
VMware, VirtualPC, VirtualBox ¤¤¤º¤ì¤âÆ°¤«¤»¤Þ¤»¤ó¤Ç¤·¤¿¡£

¥É¥é¥¤¥Ð¤Îǧ¼±¤Þ¤Ç¤Ï¤Ç¤­¤Æ¡¢¥³¥ó¥È¥í¡¼¥ë¥Ñ¥Í¥ë¤Ë
¡Ö¥Ú¥ó¤È¥¿¥Ã¥Á¡×¤¬Äɲ䵤ì¤ë¤È¤³¤í¤Þ¤Ç¤Ï¹Ô¤¯¤Î¤Ç¤¹¤¬
Multitouch.Configuration.WPF.exe¤Î"Configuer device"¤Ç
Block native windows...¤Î¥Á¥§¥Ã¥¯¤òÆþ¤ì¤ë¤È
¥Þ¥¦¥¹¤¬°ìÀÚ¸ú¤«¤Ê¤¯¤Ê¤ê¤Þ¤¹¡£
¤ä¤Ï¤ê¼Â´Ä¶­¤¬É¬ÍפʤΤ«¤â¤·¤ì¤Þ¤»¤ó¡£

¼Â´Ä¶­¤Ç¤¢¤ì¤Ð¡¢³µ¤ÍÌäÂê¤Ê¤¯»È¤¨¤ë¤Î¤Ç¤¹¤¬¡¢
¥¹¥¿¡¼¥È¥á¥Ë¥å¡¼¤ä¥¿¥¹¥¯¥Þ¥Í¥¸¥ã¡¼¤ò³«¤±¤ë¤È¤Á¤ç¤Ã¤Èº¤¤Ã¤¿ÌäÂ꤬ȯÀ¸¤·¤Þ¤¹¡£
­¡¥¹¥¿¡¼¥È¥á¥Ë¥å¡¼¾å¤Ë¡¢¥¿¥Ã¥Á¤ÎÀÖ¤¤¡û¤Î¥Þ¡¼¥¯¤¬É½¼¨¤µ¤ì¤Ê¤¤¡£
­¢¥¿¥¹¥¯¥Þ¥Í¡¼¥¸¥ã¡¼¾å¤ÇÁàºî¤Ç¤­¤Ê¤¤¡£

­¢¤Ë¤Ä¤¤¤Æ¤Ï¡¢
Multitouch.Service.Console.exe,Multitouch.Driver.Console.exe¤ò
´ÉÍý¼Ô¤È¤·¤Æ¼Â¹Ô¤¹¤ì¤Ð²Äǽ¤Ç¤¹¤¬­¡¤ÎÌäÂ꤬¤¢¤ë¤Î¤Ç¡¢
´ÉÍý¼Ô¸¢¸Â¤Ç¼Â¹Ô¤·¤Æ¤¤¤ëWindow¾å¤Ë¥¿¥Ã¥Á¥Þ¡¼¥¯¤òɽ¼¨¤¹¤ë¤³¤È¤¬¤Ç¤­¤º¤Ë¡¢
´ÉÍý¼Ô¥¢¥×¥ê¤ÎWindowÇØÌ̤˥ޡ¼¥¯¤¬É½¼¨¤µ¤ì¤Æ¤·¤Þ¤¤¤Þ¤¹¡£

"Multi-Touch Vista"¤Ï¡¢¥³¡¼¥É¸ø³«¤µ¤ì¤Æ¤¤¤ë¤Î¤Ç
multitouchvista-30935.zip¤ò¥À¥¦¥ó¥í¡¼¥É¤·¤Æ
Multitouch.InputProviders.sln¤òVS2010¤Ç³«¤¯¤È¡¢
DebugCursor.cs¤¬¥Þ¡¼¥¯¤òɽ¼¨¤·¤Æ¤¤¤ë¤³¤È¤¬¤ï¤«¤ê¤Þ¤¹¡£

Z-Order¤Ë´Ø¤¹¤ëÌäÂê¤Ç¤¹¤¬¡¢¾ï¤ËºÇÁ°Ì̤˥桼¥¶¡¼Window¤òɽ¼¨¤¹¤ëÊýË¡¤Ï¡¢
Windows£Ï£Ó¤Î¥Ð¡¼¥¸¥ç¥ó¤Ë¤è¤Ã¤Æ¤âÊѤï¤ê¤Þ¤¹¡£

¡¦Form¤Î»ØÄê¤äCreateWindow¤ÇTopMost¤ò»ØÄꤹ¤ë
¡¦SetForegroundWindows¤äAttachThreadInput¤Î¸Æ¤Ó½Ð¤·
¡¦BringWindowToTop¤Î¸Æ¤Ó½Ð¤·

Åù¤¬¤¢¤ê¤Þ¤¹¤¬¡¢

Windows7¤ÇC#¤Ê¤é¡¢Control.BringToFront()¤ò»È¤¦¤Î¤¬´Êñ¤Ç¤¹¡£

DebugCursor¤ò¸Æ¤Ó½Ð¤·¤Æ¤¤¤ë¤Î¤Ï¡¢DeviceStatus¥¯¥é¥¹¤Ç¤¹¤Î¤Ç
SyncUpdateLocation()¤Ë°ì¹ÔÄɲä·¤Þ¤¹¡£


void SyncUpdateLocation(object state)
{
   debugCursor.BringToFront(); //<-------------- ¤³¤Î¹Ô¤òÄɲÃ
   debugCursor.Location = new Point(Location.X - debugCursor.Width / 2, Location.Y - debugCursor.Height / 2);
}



¤³¤ì¤òBuild¤·¤Æ¡¢Output¥Õ¥©¥ë¥À¤Ë½ÐÎϤµ¤ì¤¿¥Õ¥¡¥¤¥ë¤ò¾å½ñ¤­¤¹¤ì¤Ð¡¢
­¡¥¹¥¿¡¼¥È¥á¥Ë¥å¡¼¾å¤Ë¡¢¥¿¥Ã¥Á¤ÎÀÖ¤¤¡û¤Î¥Þ¡¼¥¯¤¬É½¼¨¤µ¤ì¤Ê¤¤¡£
­¢¥¿¥¹¥¯¥Þ¥Í¡¼¥¸¥ã¡¼¾å¤ÇÁàºî¤Ç¤­¤Ê¤¤¡£
¤ÎÌäÂ꤬²ò·è¤·¤Þ¤¹¡£




Tags: ¥×¥í¥°¥é¥à¥á¥â¡¡VirtualPC´ØÏ¢¡¡Windows7(x64)´ØÏ¢
author : HUNDREDSOFT | - | -