vector - vector product
the inner product
Givens two vectors \(x,y\in \mathbb{R}^n\), the quantity \(x^\top y\), sometimes called the inner product or dot product of the vectors, is a real number given by:
\[x^\top y=\begin{bmatrix}x_1 , x_2 ,\cdots ,x_n \end{bmatrix}\begin{bmatrix}y_1 \\ y_2 \\ \vdots \\ y_n\end{bmatrix}=\sum_{i=1}^n x_iy_i\]
the inner products are reaully just special case of matrix multiplication.
the outer product
Given vectors \(x\in\mathbb{R}^m,y\in \mathbb{R}^n\)(not necessarily of the same size), \(xy^\top\in\mathbb{R}^{m\times n}\) is called the outer product of the vectors, It is a matrix whose entries are given by \((xy^\top)_{ij}=x_i y_i\) ,i.e.,
\[x y^\top=\begin{bmatrix}x_1 \\ x_2 \\\vdots \\x_m \end{bmatrix}\begin{bmatrix}y_1, y_2, \cdots, y_n\end{bmatrix}=\begin{bmatrix}x_1 y_1, x_1 y_2,\cdots x_1 y_n\\
x_2 y_1, x_2 y_2, \cdots, x_2 y_n\\ \cdots, \cdots, \cdots ,\cdots\\
x_m y_1,x_m y_2, \cdots, x_m y_n\end{bmatrix}\]
vector - vector product的更多相关文章
- vector< vector<int> >类似于二维数组
vector< vector<int> > intVV; vector<int> intV; int i,j; ;i<;++i){ intV.clear(); ...
- NDK GDB 中打印vector , vector<vector <> >
在android上进行native开发的时候,我们需要用NDK-GDB 对native code进行调试,其中很麻烦的是,我使用的NDK版本是4.0,该版本还不支持用NDK-GDB直接打印vector ...
- 对多维向量vector<vector<int> > vec进行操作
直接写作vector<vector<int> > vec在VC++6.0下编译不过改做: typedef std::vector<int> ROW; s ...
- 2016.6.24——vector<vector<int>>【Binary Tree Level Order Traversal】
Binary Tree Level Order Traversal 本题收获: 1.vector<vector<int>>的用法 vector<vector<int ...
- vector vector int 初始化
方法一: vector<vector<int>>array=(2,vector<int>()); array[0].push_back(1); array[i].p ...
- vector<vector<int>> 使用简单示例
#include <iostream> #include <vector> using namespace std; int main() { vector<vector ...
- 由jtable浅谈vector<vector<Object>>的用法(转自a718515028的专栏)
以前只用过vector<Object> ,但是在做从数据库导出数据放到jtable中时,发现还有个vector<vector<Object>>的用法. 先说jta ...
- 关于C++中vector<vector<int> >的使用
1.定义 vector<vector<int>> A;//错误的定义方式 vector<vector<int> > A;//正确的定义方式 2.插入元素 ...
- C++ sort vector<vector<int> > or vector<MyClass> 容器的排序
C++的STL中提供了很强大的排序函数sort,可以对任意数组,结构体及类进行排序,下面我们先来看最简单的数组排序.默认的升序排列,我们也可以在后面加上less或greater来告诉编译器我们想要的排 ...
随机推荐
- css实现一行文字居中,多行文字左对齐
问题及场景: 当内容能一行显示在盒子内时,文字居中对齐. 当内容过多换行后显示在盒子内时,文字左对齐. 其实这种视觉上的需求还是蛮常见的.比如用于弹出提示框,当提示内容比较少时,内容居中显示在弹出框, ...
- javascript代码 调试方法
你的代码可能包含语法错误,逻辑错误,如果没有调试工具,这些错误比较难于发现. 通常,如果 JavaScript 出现错误,是不会有提示信息,这样你就无法找到代码错误的位置. 在程序代码中寻找错误叫做代 ...
- css小技巧(1)
1.-webkit-overflow-scrolling: touch; 解决ios滑动时无缓冲问题 2.::-webkit-scrollbar 设置ios滑动时是否显示滚动条 3.::selecti ...
- 常用的SQL语句
使用prepareStatement对象执行的增.删.改.查sql语句: 查: String sql = "SELECT * FROM 表名 WHERE loginId=? AND pas ...
- 使用ABP EntityFramework连接MySQL数据库
ASP.NET Boilerplate(简称ABP)是在.Net平台下一个很流行的DDD框架,该框架已经为我们提供了大量的函数,非常方便与搭建企业应用. 关于这个框架的介绍我就不多说,有兴趣的可以参见 ...
- Linux下安装 Posgresql 并设置基本参数
在Linux下安装Postgresql有二进制格式安装和源码安装两种安装方式,这里用的是二进制格式安装.各个版本的Linux都内置了Postgresql,所以可直接通过命令行安装便可.本文用的是Cen ...
- python-运算符
1.算数运算: 2.比较运算: 3.赋值运算: 4.逻辑运算: 5.成员运算: 本文转载自http://www.cnblogs.com/wupeiqi/articles/5444685.html
- QC在win7下不能访问QC服务器介绍
本地访问不了服务器QC的主要几个原因总结 服务器serverjbossextensionhpcmd 2016-03-24 兼容性问题: 1.在服务端QC的安装目录下jboss\server\def ...
- BZOJ 1717: [Usaco2006 Dec]Milk Patterns 产奶的模式 [后缀数组]
1717: [Usaco2006 Dec]Milk Patterns 产奶的模式 Time Limit: 5 Sec Memory Limit: 64 MBSubmit: 1017 Solved: ...
- BZOJ 1087: [SCOI2005]互不侵犯King [状压DP]
1087: [SCOI2005]互不侵犯King Time Limit: 10 Sec Memory Limit: 162 MBSubmit: 3336 Solved: 1936[Submit][ ...