scala introduction 2018.06.12

scala introduction 2018.06.12

scala introduction

82852d7c64083861d2472602e654a0fd?s=128

matsutomu

June 12, 2018
Tweet

Transcript

  1. 4DBMB*OUSPEVDUJPO .BUTVNPUP5TVUPNV !NBUTVUPPN 

  2. ͸͡Ίʹ ࣗݾ঺հ ɹɹদຊɹ຿ ɹɹձࣾһʢ౦ژຊࣾͷاۀۈ຿ʣ ɹɹόϦόϦ։ൃʂͯ͠·ͤΜ ɹɹ͕ɺݸਓతʹ4DBMBʹڵຯΛ࣋ͬͯ೥͕ͨͪ·ͨ͠ ɹɹ΋ͬͱ4DBMBͷྗΛ਎ʹ෇͚͍ͨத೥உͰ͢

  3. ͸͡Ίʹ 4DBMBʢεΧϥʣͱ͸ʁ

  4. ͸͡Ίʹ εΠε࿈๜޻Պେֶ &1'-  ϚʔςΟϯɾΦʔμεΩʔڭत ൚༻ݴޠ͸εέʔϥϒϧͰͳͯ͘͸ͳΒͳ͍ɻ ಉ֓͡೦Ͱɺখ͍͞ϓϩάϥϜ΋େ͖ͳϓϩάϥϜ΋هड़Ͱ͖Δ΂͖Ͱ͋Δɻ εέʔϥϏϦςΟ͸ؔ਺ܕݴޠͱΦϒδΣΫτࢦ޲ݴޠͷ ͭͷϓϩάϥϛϯάͷ֓೦Λ౷߹͠ɺҰൠԽ͢Δ͜ͱʹΑΓ࣮ݱͰ͖Δɻ #Z8JLJQFEJB

  5. ͸͡Ίʹ ྺ࢙ ೥ࠒʹ͸طʹઃܭ͕ਐΊΒΕ͓ͯΓ ೥ʹ͸ެ։͞Ε͍ͯΔɻ ೥ࠒʹ͸UXJUUFSͷόοΫΤϯυʹ࠾༻ ೥ʹେ෯ͳมߋͷ4DBMB͕ϦϦʔε ݱࡏͷόʔδϣϯ͸ IUUQTXXXTDBMBMBOHPSH

  6. ͸͡Ίʹ ΦϒδΣΫτࢦ޲ɹͱɹؔ਺ܕݴޠͷಛ௃Λ ߹Θͤ࣋ͭϓϩάϥϛϯάݴޠ +7.Ͱಈ࡞͠·͢

  7. ͸͡Ίʹ ͱݴ͍ग़͢ͱɺएׯখ೉͍͠ͷͰ

  8. ͸͡Ίʹ ֶͼॳΊ͙ͯ͢ʹಈ͔ͤΔ ߏจͷޡΓ΋ίϯύΠϧ࣌ʹ ͔ͬ͠ΓνΣοΫͯ͘͠ΕΔ ༏͍͠ϓϩάϥϛϯάݴޠ

  9. ͸͡Ίʹ ͱݴ͏ࣄͰ ·ͣಈ͔ͯ͠Έ·͠ΐ͏

  10. 4DBTUJF IUUQTTDBTUJFTDBMBMBOHPSH

  11. 4DBTUJF )FMMP4DBMB

  12. 4DBTUJF ม਺એݴར༻

  13. 3&1- ଞʹ΋

  14. 3&1- ؆୯ʹ4DBMBͷίʔυยΛ࣮ߦՄೳ

  15. 3&1- ৭ʑͳߏจ͕ࢼͤ·͢

  16. 3&1- ৭ʑͳߏจ͕ࢼͤ·͢ WBMOBNFl!NBUTVUPNVz WBSNPOFZ

  17. 3&1- ৭ʑͳߏจ͕ࢼͤ·͢ GPS YUP \ QSJOUMO Y  ^

  18. 3&1- WBMDPOEJUJPOlѱ͍ DPOEJUJPONBUDI\ DBTFྑ͍QSJOUMO ໷஗͘·Ͱ࢓ࣄ͢Δ  DBTFѱ͍QSJOUMO ̎̍࣌͝Ζʹ͸ؼ୐͢Δ  ^

  19. 3&1- WBM BHF DPOEJUJPO  த೥ ѱ͍  BHF DPOEJUJPO

    NBUDI\ DBTF த೥ ྑ͍ QSJOUMO ૣ৸ૣى͖ʹͳΔ  DBTF த೥ ѱ͍ QSJOUMO ૣ৸ૣى͖ʹͳΔ  DBTF த೥ @ QSJOUMO ૣ৸ૣى͖ʹͳΔ  DBTF @ ྑ͍ QSJOUMO ૣ৸ૣى͖ʹͳΔ  DBTF @ ѱ͍ QSJOUMO ૣ৸ૣى͖ʹͳΔ  DBTF @ @ QSJOUMO ૣ৸ૣى͖ʹͳΔ  ^
  20. 4VSQSJTF ಥવͰ͕͢ɾɾɾ

  21. 4VSQSJTF ͜͜ͰΫΠζͰ͢

  22. 4VSQSJTF ϕΫτϧ a, b ͕௚ߦ͢Δ͔Λ൑ఆ͢Δ਺ࣜ͸ʁ (ax1, ay1 ) (ax0 ,

    ay0 ) (bx0 , by0 ) (bx1 , by1 ) a b ʢࢀߟʣʰϓϩάϥϛϯάίϯςετ߈ུͷͨΊͷΞϧΰϦζϜͱσʔλߏ଄ʱɹ *4#/
  23. 4VSQSJTF

  24. 4VSQSJTF ϕΫτϧ a, b ͕௚ߦ͢Δ͔Λ൑ఆ͢Δ਺ࣜ͸ʁ (ax1, ay1 ) (ax0 ,

    ay0 ) (bx0 , by0 ) (bx1 , by1 ) a b ౴͑ ϕΫτϧͷ಺ੵ͕̌ͷ৔߹ʹ௚ߦ͢Δɻ aɾb = |a||b|cosθ = ax * bx + ay * by
  25. 4VSQSJTF PCKFDU$HM4BNQMF\ DBTFDMBTT1PJOU Y%PVCMF Z%PVCMF \ EFG Q1PJOU 1PJOU1PJOU UIJTY

    QY UIJTZ QZ  ^ UZQF(FP7FDUPS1PJOU ಺ੵ EFGEPU B1PJOU C1PJOU %PVCMFBY CY BZ CZ EFGJT0SUIPHPOBM B(FP7FDUPS C(FP7FDUPS #PPMFBOEPU B C  ^
  26. ࣮༻ྫ Ͳ͏Ͱ͠ΐ͏͔ʁ ༏͍͠ϓϩάϥϛϯάݴޠ ͷΠϝʔδΛ࣋ͯ·͔ͨ͠ʁ

  27. ࣮༻ྫ ࣮ࡍͷͱ͜Ζ͸ʁ اۀɾ044

  28. ࣮༻ྫ ɹɹɹɹɹɹɹɹɹɹɹɹɹɹɹʢࢀߟʣʲ4DBMBΛ࠾༻͍ͯ͠Δاۀ ϓϩμΫτ Ұཡʳɹɹɹ IUUQTRJJUBDPNPVCBLJPVJUFNTGEDBEBF ւ֎ 5XJUUFS -JOLFE*O 'PVS4RVBSF 1BZ1BM

    $PVSTFSB 5IF(VBSEJBO UVNCMS
  29. ࣮༻ྫ ɹɹɹɹɹɹɹɹɹɹɹɹɹɹɹʢࢀߟʣʲ4DBMBΛ࠾༻͍ͯ͠Δاۀ ϓϩμΫτ Ұཡʳɹɹɹ IUUQTRJJUBDPNPVCBLJPVJUFNTGEDBEBF ࠃ಺ υϫϯΰ ͸ͯͳ ηϓςʔχɾΦϦδφϧ ϏζϦʔν

    $IBU8PSL ΤϜεϦʔ /VMBC αΠόʔΤʔδΣϯτ
  30. ࣮༻ྫ اۀ͚ͩͰͳ͘ 044΋݁ߏ͋Γ·͢

  31. ࣮༻ྫ 4DBMBͷ044Ұཡ ʢࢀߟʣʲ5IJTJTBNPTUQPQVMBSSFQPTJUPSZMJTUGPS4DBMBTPSUFECZOVNCFSPGTUBSTʳɹɹɹ IUUQTHJUIVCDPNLBYBQBSMCMPCNBTUFS3&"%.&4DBMBNE

  32. ࣮༻ྫ 1MBZ'SBNFXPSL 8FCΞϓϦέʔγϣϯ ϑϨʔϜϫʔΫ

  33. ࣮༻ྫ σʔλϕʔεΞΫηε༻ ʢؔ਺ܕʣ

  34. ࣮༻ྫ TDBMBUSB 8FCϚΠΫϩϑϨʔϜϫʔΫ

  35. ࣮༻ྫ 4LJOOZ'SBNFXPSL 8FCΞϓϦέʔγϣϯ ϑϨʔϜϫʔΫ

  36. ࣮༻ྫ 4DBMJLF+%#$ σʔλϕʔεΞΫηε༻

  37. ࣮༻ྫ ෛՙࢼݧπʔϧʢ8FCʣ

  38. ࣮༻ྫ ϝοηʔδϕʔεͷඇಉظॲཧΛ࣮ݱ

  39. ࣮༻ྫ ετϦʔϛϯάॲཧ༻

  40. ࣮༻ྫ େྔσʔλΛฒྻ෼ࢄॲཧ

  41. ࣮༻ྫ ػցֶश༻ΞϓϦέʔγϣϯͷ։ൃࢧԉ

  42. ࣮༻ྫ 4DBMB੡ͷ(JUϓϥοτϗʔϜ

  43. ·ͱΊ ͪΐͬͱͨ͠εΫϦϓτ 8FCΞϓϦέʔγϣϯ σʔλϕʔεΞΫηε ฒྻॲཧ େྔσʔλॲཧ ։ൃࢧԉʢ(JU 6OJU5FTU ίʔυॻࣜʣ ͳͲͳͲ

    4DBMB͸৭ʑͳιϑτ΢ΣΞ͕ଘࡏ
  44. ·ͱΊ ͦͷഎܠʹ͸ ΦϒδΣΫτࢦ޲ ͱ ؔ਺ܕݴޠ ͱݴͬͨߟ͑ํ͚ͩͰͳ͘ ৭ʑͳར఺͕͋Δͷͩͱࢥ͍·͢

  45. ·ͱΊ ͜Ε͔ΒҰॹʹ4DBMBΛֶͼ·ͤΜ͔ʁ ͦͯ͠044ͷੈքʹೖ໳͠·ͤΜ͔ʁ