In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
Most people don't understand the knowledge points of this article "How to express Java matrix vector multiplication", so Xiaobian summarizes the following contents for everyone. The contents are detailed, the steps are clear, and they have certain reference value. I hope everyone can gain something after reading this article. Let's take a look at this article "How to express Java matrix vector multiplication".
vector
point multiplication
Formula: a ·b =| a| * |b| * cosθ dot product, also known as the inner product or quantity product of vectors, is the product of one vector and the length of its projection on another vector; is a scalar. The dot product reflects the "similarity" of two vectors. The more "similar" two vectors are, the larger their dot product is.
Example: If vector a=(a1,b1,c1), vector b=(a2,b2,c2)
Vector a·Vector b=a1a2+b1b2+c1c2
cross-product
Formula: a × b =| a| * |b| * Sinθ cross multiplication is also called outer product of vectors and vector product. And the result is a vector.
Module length:| vector C| =| Vector a× vector b| =| a|| b| sin
Direction: The vector product of vector a and vector b is oriented perpendicular to the plane of the two vectors and obeys the right-hand rule.
cases
Vector a× vector b=
| i j k|
|a1 b1 c1|
|a2 b2 c2|
=(b1c2-b2c1,c1a2-a1c2,a1b2-a2b1)(main diagonal is positive)
(i, j, k are unit vectors of three coordinate axes perpendicular to each other in space)
matrix
Multiplication: np.multiply(a,b)
Matrix multiplication: np.dot(a,b) or np.matmul(a,b) or a.dot (b) or directly with a @ b !
Only note: *, overloaded for element multiplication in np.array, matrix multiplication in np.matrix!
Very good link.
import numpy as npa=np.array ([[1,2],[3,4]])#Generate array matrix b=np.array ([[2,2],[1,3]])print(np.dot(a,b))>>[[ 4 8] [10 18]] The above is about the content of "Java matrix vector multiplication" This article, I believe everyone has a certain understanding, I hope the content shared by Xiaobian is helpful to everyone, if you want to know more related knowledge content, please pay attention to the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.