お知らせ:
2025 年 4 月 15 日より前に Earth Engine の使用を登録したすべての非商用プロジェクトは、アクセスを維持するために
非商用目的での利用資格を確認する必要があります。2025 年 9 月 26 日までに確認が完了していない場合、アクセスが保留されることがあります。
ee.Array.dotProduct
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
2 つの 1 次元配列のドット積を計算します。
| 用途 | 戻り値 |
|---|
Array.dotProduct(array2) | 数値 |
| 引数 | タイプ | 詳細 |
|---|
これ: array1 | 配列 | 最初の 1 次元配列。 |
array2 | 配列 | 2 番目の 1 次元配列。 |
例
コードエディタ(JavaScript)
print(ee.Array([1]).dotProduct(ee.Array([2]))); // 2
print(ee.Array([1, 2]).dotProduct(ee.Array([3, 4]))); // 1*3 + 2*4 = 11
print(ee.Array([0, 1, 2]).dotProduct(ee.Array([3, 4, 5]))); // 0*3 + 1*4 + 2*5 = 14
print(ee.Array([-1, -2]).dotProduct(ee.Array([3, 4]))); // -1*3 + -2*4 = -11
print(ee.Array([1.5, 2.5]).dotProduct(ee.Array([3, 4]))); // 1.5*3 + 2.5*4 = 14.5
Python の設定
Python API とインタラクティブな開発での geemap の使用については、
Python 環境ページをご覧ください。
import ee
import geemap.core as geemap
Colab(Python)
display(ee.Array([1]).dotProduct(ee.Array([2]))) # 2
display(ee.Array([1, 2]).dotProduct(ee.Array([3, 4]))) # 1*3 + 2*4 = 11
display(ee.Array([0, 1, 2]).dotProduct(ee.Array([3, 4, 5]))) # 0*3 + 1*4 + 2*5 = 14
display(ee.Array([-1, -2]).dotProduct(ee.Array([3, 4]))) # -1*3 + -2*4 = -11
display(ee.Array([1.5, 2.5]).dotProduct(ee.Array([3, 4]))) # 1.5*3 + 2.5*4 = 14.5
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-10-30 UTC。
[null,null,["最終更新日 2025-10-30 UTC。"],[],["The core functionality is to compute the dot product of two one-dimensional arrays. The `dotProduct` method, applied to `array1`, takes `array2` as an argument. Both arrays must be 1-D. It returns a single numerical value representing the dot product result. The function operates by multiplying corresponding elements from each array, and then summing the products.\n"]]