libigl v2.5.0
Loading...
Searching...
No Matches
AtA_cached.h
Go to the documentation of this file.
1// This file is part of libigl, a simple c++ geometry processing library.
2//
3// Copyright (C) 2017 Daniele Panozzo <daniele.panozzo@gmail.com>
4//
5// This Source Code Form is subject to the terms of the Mozilla Public License
6// v. 2.0. If a copy of the MPL was not distributed with this file, You can
7// obtain one at http://mozilla.org/MPL/2.0/.
8#ifndef IGL_ATA_CACHED_H
9#define IGL_ATA_CACHED_H
10#include "igl_inline.h"
11#define EIGEN_YES_I_KNOW_SPARSE_MODULE_IS_NOT_STABLE_YET
12#include <Eigen/Dense>
13#include <Eigen/Sparse>
14namespace igl
15{
18 {
20 Eigen::VectorXd W;
21
22 // Flatten composition rules
24 std::vector<int> I_row;
26 std::vector<int> I_col;
28 std::vector<int> I_w;
29
30 // For each entry of AtA, points to the beginning
31 // of the composition rules
33 std::vector<int> I_outer;
34 };
35
57 template <typename Scalar>
59 const Eigen::SparseMatrix<Scalar>& A,
60 AtA_cached_data& data,
61 Eigen::SparseMatrix<Scalar>& AtA
62 );
63
69 template <typename Scalar>
71 const Eigen::SparseMatrix<Scalar>& A,
72 const AtA_cached_data& data,
73 Eigen::SparseMatrix<Scalar>& AtA
74 );
75
76}
77
78#ifndef IGL_STATIC_LIBRARY
79# include "AtA_cached.cpp"
80#endif
81
82#endif
#define IGL_INLINE
Definition igl_inline.h:15
Definition AABB.h:17
void AtA_cached_precompute(const Eigen::SparseMatrix< Scalar > &A, AtA_cached_data &data, Eigen::SparseMatrix< Scalar > &AtA)
Computes At * W * A, where A is sparse and W is diagonal.
void AtA_cached(const Eigen::SparseMatrix< Scalar > &A, const AtA_cached_data &data, Eigen::SparseMatrix< Scalar > &AtA)
Computes At * W * A, where A is sparse and W is diagonal precomputed into data.
Hold precomputed data for AtA_cached.
Definition AtA_cached.h:18
Eigen::VectorXd W
Weights (diagonal of W)
Definition AtA_cached.h:20