ãªã¹ã³ãã®ç½®æåå
æèãã³ã¼ãã£ã³ã°ãæ¯ããæè¡ãã®p.216ã§ã¯ããªã¹ã³ãã®ç½®æååã«ã¤ãã¦èª¬æãã¦ãã¾ããããããp.217ã®ãæ¡ä»¶qãæºãããªãTãçºçãããã¨ãã表ç¾ã¯ãããã«ããããã§ãã®ã§ãããã§ã¹ãã¼ãªã¼ä»ç«ã¦ã«ãã¦è£è¶³èª¬æããã¾ã
ä»æ¥
ã¾ããç¾æç¹ã§Tåã®å¤ã¯ãã¹ã¦æ¡ä»¶qãæºããã¦ããã¨ãã¾ãã
ããªãã¯Tåã®å¼æ°ãã¨ãé¢æ°fãå®è£ ãããã¨ãã¾ããããªãã¯ãã£ã¨ãTåã®å¤ã¯ãã¹ã¦æ¡ä»¶qãæºããã¦ãããã¨ãããã¨ãåæã¨ãã¦ã³ã¼ããæ¸ããã¨ã§ãããã
1ã¶æå¾
ããªãã¯Sãä½ããã¨èãã¾ããSåã®å¤ã®ä¸ã«ã¯æ¡ä»¶qãæºãããªããã®ãããã¾ãããããªãã¯ãã¾ãæèãã¦ãã¾ããã
ããªãã¯ãSã¯Tãç¶æ¿ãã¦ä½ãã¨æ¥½ã ãªãã¨æã£ãã®ã§ããããã¾ããã
Javaãªã©ã®è¨èªå¦çç³»ã§ã¯ãSãTãç¶æ¿ããã¨ãTåã®å¤æ°ã«Såã®å¤ãå ¥ãããã¨ãã§ããããã«ãªãã¾ããã¤ã¾ããã®æç¹ã§Tåã®å¼æ°ãåãé¢æ°fã«Såã®å¤ã渡ããã¨ãå¯è½ã«ãªã£ã¦ãã¾ãã
ããã«1ã¶æå¾
ããªãã2ã¶æåã«å®è£ ãããTåã®å¤ãå¼æ°ã«ã¨ãé¢æ°fãã®ä¸ã§åé¡ãèµ·ãã¾ãã
Tåã®å¤ã¯ãã¹ã¦æ¡ä»¶qãæºããã¯ããªã®ã«ãæ¡ä»¶qãæºãããã¦ãããªãèµ·ããããªããããªãã¨ãèµ·ãã£ã¦ãã¾ããããªãã¯æ©ã¿ã¾ãã
ããªãã¯åå ãæ¡ä»¶qãæºãããªãSåã®å¤ãå¼æ°ã«æ¸¡ããã¦ãããã¨ã ã¨æ°ã¥ãã¾ãããããã§ifæã§åå²ãã¦2éãã®å¦çãæ¸ããã¨ã«ãã¾ããã
ããã§ããã®ã§ããããï¼ãããéãã¾ããããã®2ã¶æã®éã«æ¸ãããä»ã®Tåã®å¤ãæ±ãã³ã¼ãããæ¡ä»¶qãæºãããªãå¤ã ã¨åé¡ãèµ·ããããããã¾ããããã®ç¨®ã®ãã°ã¯ã1å¹ç®ãè¦ã¤ããé ã«ã¯æ¢ã«ä½åå¹ãç©é°ã«æ½ãã§ããã®ã§ãã
ããªãã次ã åºã¦ãããã°ã«æ©ã¾ããã¦ãå¥ã®äººã«ç¸è«ãã¾ããããã¦ããªãã§Sã¯Tãç¶æ¿ãããã ãã¨ææãããã¨ãã¾ããããã§ããããããç¶æ³ã£ã¦æ¢ã«Sãæ¸ããªãããã¨ãã§ããªãç¶æ³ã«ãªã£ã¦ãããããããã§ãã
ãããã«
ãã®ã¨ã³ããªã¼ã§ã¯ãªã¹ã³ãã®ææãããç½®æååãæºããã¦ããªãå ´åã«èµ·ããåé¡ãããæç³»åã«ä¸¦ã¹ã¦è§£èª¬ãã¦ã¿ã¾ãããæ¸ç±ã®æ¹ã¯ç´é¢ã®å¶ç´ãããã¾ããããªãã¨ããããããããªãããã«ä¿®æ£ãããã¨æãã¾ãã
æèãã³ã¼ãã£ã³ã°ãæ¯ããæè¡ãã®èªè ã®ã¿ãªããããé ããã質åã»ãææ³ã«ã¯ããã®ãããªæãã§è£è¶³è¨äºãæ¸ãã¦è¡ãããã¨æã£ã¦ãã¾ãããããããªãã質åã»ãææ³ããå¯ãä¸ããã
æèã«é¢ããä»ã®ã¨ã³ããªã¼ã¯ããã³ã¼ãã£ã³ã°ãæ¯ããæè¡ãèè
å
¬å¼ãã¼ã¸ããããã©ããããã«ãã¾ãã