This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Created by https://www.gitignore.io/api/latex | |
### LaTeX ### | |
## Core latex/pdflatex auxiliary files: | |
*.aux | |
*.lof | |
*.log | |
*.lot | |
*.fls |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// On peut aussi représenter un graphe simple en donnant pour chacun de ses sommets la liste des sommets auxquels il est adjacent. Ce sont les listes d’adjacences. | |
// input : liste d'adjacence (S, T), sommet (x) | |
// output : liste des successeurs (LS) | |
function LS = liste_succ (S, T, x) | |
// T(X) désigne la case dans S du début des successeurs de x. | |
// T(X+1) désigne la case dans S du début des successeurs du prochain sommet. (T(x+1)-1)) désigne donc la dernière case avant le prochain sommet. | |
LS = [S(T(x):(T(x+1)-1))] | |
endfunction |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// desc : retourne une liste d'adjacence sous forme de matrice | |
// input : liste d'adjacence (S, T) | |
// output : matrice (MS) | |
function MS=listes2mat (S, T) | |
nbSommets = length(T)-1 // le nombre de sommets | |
MS = zeros(nbSommets, nbSommets) // on initialise une matrice d'adjacence vide | |
for k=1:nbSommets | |
MS(k, liste_succ(S,T,k)) = 1 | |
end | |
endfunction |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// desc : retourne une matrice sous forme de liste d'adjacence | |
// input : matrice d'adjacence (M) | |
// ouput : Liste d'adjacence ([S, T]) | |
function [S, T] = mat2listes(M) | |
tailleMatrice = size(M,1) | |
S = [] // liste des successeurs. | |
T = [1] // initialise forcément à 1. | |
for k=1:tailleMatrice | |
S = [S, find(M(k,:) == 1)] // on récupère les numéros lignes qui sont à 1 | |
T = [T, length(S)+1] // on indique le début du prochain sommet |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// desc : vérife si un ou des sommets sont adjacents. | |
// input : Liste d'adjacence ([S, T]), sommet (x), voisin (y) | |
// output : boolean (bool) | |
function bool = present(S, T, x, y) | |
tblMatch = length(find(liste_succ(S, T, x)==y)) | |
if( tblMatch > 0) then bool = 1; else bool = 0; end | |
endfunction |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// desc : on récupère les prédecesseurs d'un sommet | |
// input : sommet (X), matrice d'adjacence (M) | |
function LP = predecesseurs(M,X) | |
LP = find(M(:,X) == 1) | |
endfunction |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// desc : retourne une matrice adjacence sous forme de matrice d'incidence. | |
// input : matrice d'adjacence (M) | |
// output : matrice d'incidence (res) | |
function res = adja2incidence(M) // soucis : les boucles ne sont pas notées | |
[S, T] = mat2listes(M) | |
res =zeros(length(T), length(S)-1) | |
for k=1:size(M, 1) // on marque tout les arcs rentrant dans le sommet | |
res(k, predecesseurs(M,k)) = -1 | |
end | |
for k=1:size(M, 1) // on marque tout les arcs sortant du sommet |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function LD = descendants (Pred, x) | |
count = length(Pred) | |
LD = [] | |
for k=1:count | |
if (find(chemin_arbre(Pred, k)==x)~=[]) then | |
LD = [LD, k] | |
end | |
end | |
endfunction |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function() { | |
let clique = true | |
let secondes = 10 | |
$('body').on('click', function() { | |
clique = true; | |
}) | |
setInterval(function () { | |
if (clique == true) { | |
clique = false | |
} else { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package classes | |
object ImplicitClassSuperRichString { | |
implicit class SuperRichString(in:String) { | |
def world:String = in+", world" | |
} | |
def main(args: Array[String]): Unit = { | |
println("Hello" world) | |
println("Goodnight" world) | |
} |
OlderNewer