本文整理汇总了C++中Signal::get方法的典型用法代码示例。如果您正苦于以下问题:C++ Signal::get方法的具体用法?C++ Signal::get怎么用?C++ Signal::get使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Signal
的用法示例。
在下文中一共展示了Signal::get方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: correlacion
Signal correlacion(const Signal &imagen, const Signal &filtro) {
int filas = imagen.getRows();
int columnas = imagen.getCols();
Signal Iout(filas, columnas);
for (int i = 0; i < filas; ++i) {
for (int j = 0; j < columnas; ++j) {
Iout.set(i, j, 0.0);
}
}
int mitadF = (filtro.getRows()-1)/2;
int mitadC = (filtro.getCols()-1)/2;
int fila_inicio = mitadF;
int fila_fin = filas-mitadF;
int col_inicio = mitadC;
int col_fin = columnas-mitadC;
for (int i = fila_inicio; i < fila_fin; ++i) {
for (int j = col_inicio; j < col_fin; ++j) {
double suma = 0.0;
for (int k = -mitadF; k <= mitadF; ++k) {
for (int l = -mitadC; l <= mitadC; ++l) {
suma += imagen.get(i+k, j+l)*filtro.get(k+mitadF, l+mitadC);
}
}
Iout.set(i, j, suma);
}
}
return Iout;
}
示例2: send
//returns whether the connection was propagated successfully
bool Connection::send(Signal& S)
{
//weigh the signal down by this connection's weight
S.weigh(weight);
activation = S.get();
if(!connectionEstablished())
return false;
return allNeurons[to] -> receive(S);
}