| 61 | } |
| 62 | } |
| 63 | void filter( MatrixXf & out, const MatrixXf & in, bool transpose ) const { |
| 64 | // Read in the values |
| 65 | if( ntype_ == NORMALIZE_SYMMETRIC || (ntype_ == NORMALIZE_BEFORE && !transpose) || (ntype_ == NORMALIZE_AFTER && transpose)) |
| 66 | out = in*norm_.asDiagonal(); |
| 67 | else |
| 68 | out = in; |
| 69 | |
| 70 | // Filter |
| 71 | if( transpose ) |
| 72 | lattice_.compute( out, out, true ); |
| 73 | else |
| 74 | lattice_.compute( out, out ); |
| 75 | // lattice_.compute( out.data(), out.data(), out.rows() ); |
| 76 | |
| 77 | // Normalize again |
| 78 | if( ntype_ == NORMALIZE_SYMMETRIC || (ntype_ == NORMALIZE_BEFORE && transpose) || (ntype_ == NORMALIZE_AFTER && !transpose)) |
| 79 | out = out*norm_.asDiagonal(); |
| 80 | } |
| 81 | // Compute d/df a^T*K*b |
| 82 | MatrixXf kernelGradient( const MatrixXf & a, const MatrixXf & b ) const { |
| 83 | MatrixXf g = 0*f_; |
nothing calls this directly
no test coverage detected