Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Шарафутдинов Ратмир
ЧМ Курсовая работа
Commits
32f62fda
Commit
32f62fda
authored
Oct 16, 2020
by
Шарафутдинов Ратмир
Browse files
Second Commit
parent
ea9309d0
Changes
2
Hide whitespace changes
Inline
Side-by-side
HouseHolder.cs
View file @
32f62fda
...
...
@@ -7,10 +7,10 @@ namespace SVD
{
static
class
HouseHolder
{
static
bool
output1
=
tru
e
;
//пошаговый вывод для метода House
static
bool
output2
=
false
;
//пошаговый вывод для метода HouseRow
static
bool
output3
=
false
;
//пошаговый вывод для метода HouseCol
static
bool
output4
=
true
;
//пошаговый вывод для метода Diag
public
static
bool
output1
=
fals
e
;
//пошаговый вывод для метода House
public
static
bool
output2
=
false
;
//пошаговый вывод для метода HouseRow
public
static
bool
output3
=
false
;
//пошаговый вывод для метода HouseCol
public
static
bool
output4
=
true
;
//пошаговый вывод для метода Diag
//Вычисление вектора Хаусхолдера (работает корректно, проверено на бумаге)
public
static
Matrix
House
(
Matrix
vector1
)
//стр. 183
...
...
Program.cs
View file @
32f62fda
...
...
@@ -7,11 +7,34 @@ namespace SVD
{
static
void
Main
(
string
[]
args
)
{
//Matrix C = new Matrix(2, 2);
//C[0, 0] = 1;
//C[0, 1] = 2;
//C[1, 0] = 3;
//C[1, 1] = 4;
Console
.
WriteLine
(
"=============== Настройки ===============\n"
);
Console
.
WriteLine
(
" 1. Включить пошаговый вывод для метода House"
);
Console
.
WriteLine
(
" 2. Включить пошаговый вывод для метода HouseRow"
);
Console
.
WriteLine
(
" 3. Включить пошаговый вывод для метода HouseCol\n"
);
Console
.
WriteLine
(
" 0. Пропустить - Enter\n"
);
Console
.
Write
(
" Введите номер опции: "
);
string
value
;
value
=
Console
.
ReadLine
();
switch
(
value
)
{
case
"1"
:
HouseHolder
.
output1
=
true
;
break
;
case
"2"
:
HouseHolder
.
output2
=
true
;
break
;
case
"3"
:
HouseHolder
.
output3
=
true
;
break
;
default
:
break
;
}
Console
.
WriteLine
(
"===========================================\n"
);
Matrix
C
=
new
Matrix
(
4
,
3
);
...
...
@@ -29,6 +52,8 @@ namespace SVD
C
[
3
,
2
]
=
12
;
HouseHolder
.
Diag
(
C
);
Console
.
ReadLine
();
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment