Thiago Senhorinha Rose - 12100774
Por ter diagonal dominante a sua convergência para métodos iterativos está garantida. Para evitar "saltos" imprecisos em busca da solução
# Configurações do Git | |
function git_branch () { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' | |
} | |
# Cores http://www.arwin.net/tech/bash.php | |
RED="\[\033[0;31m\]" | |
BROWN="\[\033[0;33m\]" | |
YELLOW="\[\033[1;33m\]" |
package main; | |
import java.util.Arrays; | |
public class GaussSeidel { | |
public static void main(String[] args) { | |
int numeroDePassosMaximo = 10000; | |
double criterioDeParada = 1e-4; |
clc | |
clear | |
format long | |
% O algoritmo do gauss seidel é semelhante ao de jacobi porém utiliza as variáveis atualizadas | |
% Gauss Seidel para função: | |
% 3*x1 - x2 - x3 = 1 | |
% x1 + 3*x2 + x3 = 5 | |
% 2*x1 - 2*x2 + 4*x3 = 4 |
clc | |
clear | |
format long | |
% Jacobi para função: | |
% 3*x1 - x2 - x3 = 1 | |
% x1 + 3*x2 + x3 = 5 | |
% 2*x1 - 2*x2 + 4*x3 = 4 | |
function xi = jacobi(numeroPassos, criterio) | |
passo = 0; |
n = 3 % número de equações | |
A = [1 2 3 4; -5 7 8 1; -7 8 9 13;] | |
% processo de triangularização | |
for k = 1 : n - 1 % passo do escalonamento | |
for i = k + 1 : n % linha a ser escalonada | |
aux = A(i,k)/A(k,k) | |
% para j = k o valor será nulo sempre | |
A(i,k) = 0; |
// EPOS Thread Abstraction Declarations | |
#ifndef __thread_h | |
#define __thread_h | |
#include <utility/queue.h> | |
#include <utility/ostream.h> | |
#include <cpu.h> | |
#include <machine.h> | |
#include <system/kmalloc.h> |
# Configurações do Git | |
function git_branch () { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' | |
} | |
function git_status () { | |
verifica_repositorio=$(ls -la | grep -wc ".git") | |
if [[ $verifica_repositorio != "0" ]]; then | |
count_modificados=$(git status | grep -c modificado ) |