aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.UI/Connectivity/WiFiAuthenticationView.xaml.cs
blob: 690f2321f0eb03eec59f0e1e86823fc20c0d528f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace Tango.PPC.UI.Connectivity
{
    /// <summary>
    /// Interaction logic for WiFiAuthenticationView.xaml
    /// </summary>
    public partial class WiFiAuthenticationView : UserControl
    {
        public WiFiAuthenticationView()
        {
            InitializeComponent();

            this.Loaded += WiFiAuthenticationView_Loaded;
        }

        private void WiFiAuthenticationView_Loaded(object sender, RoutedEventArgs e)
        {
            txtPassword.Focus();
        }
    }
}
ization, and replaced by the L and U factors as one can verify: <table class="example"> <tr> <td>\snippet TutorialInplaceLU.cpp matrixLU </td> <td>\snippet TutorialInplaceLU.out matrixLU </td> </tr> </table> Then, one can use the \c lu object as usual, for instance to solve the Ax=b problem: <table class="example"> <tr> <td>\snippet TutorialInplaceLU.cpp solve </td> <td>\snippet TutorialInplaceLU.out solve </td> </tr> </table> Here, since the content of the original matrix \c A has been lost, we had to declared a new matrix \c A0 to verify the result. Since the memory is shared between \c A and \c lu, modifying the matrix \c A will make \c lu invalid. This can easily be verified by modifying the content of \c A and trying to solve the initial problem again: <table class="example"> <tr> <td>\snippet TutorialInplaceLU.cpp modifyA </td> <td>\snippet TutorialInplaceLU.out modifyA </td> </tr> </table> Note that there is no shared pointer under the hood, it is the \b responsibility \b of \b the \b user to keep the input matrix \c A in life as long as \c lu is living. If one wants to update the factorization with the modified A, one has to call the compute method as usual: <table class="example"> <tr> <td>\snippet TutorialInplaceLU.cpp recompute </td> <td>\snippet TutorialInplaceLU.out recompute </td> </tr> </table> Note that calling compute does not change the memory which is referenced by the \c lu object. Therefore, if the compute method is called with another matrix \c A1 different than \c A, then the content of \c A1 won't be modified. This is still the content of \c A that will be used to store the L and U factors of the matrix \c A1. This can easily be verified as follows: <table class="example"> <tr> <td>\snippet TutorialInplaceLU.cpp recompute_bis0 </td> <td>\snippet TutorialInplaceLU.out recompute_bis0 </td> </tr> </table> The matrix \c A1 is unchanged, and one can thus solve A1*x=b, and directly check the residual without any copy of \c A1: <table class="example"> <tr> <td>\snippet TutorialInplaceLU.cpp recompute_bis1 </td> <td>\snippet TutorialInplaceLU.out recompute_bis1 </td> </tr> </table> Here is the list of matrix decompositions supporting this inplace mechanism: - class LLT - class LDLT - class PartialPivLU - class FullPivLU - class HouseholderQR - class ColPivHouseholderQR - class FullPivHouseholderQR - class CompleteOrthogonalDecomposition */ }