mirror of
https://github.com/MartinThoma/LaTeX-examples.git
synced 2025-04-25 22:38:04 +02:00
MPI;Prolog; Index ergänzt
This commit is contained in:
parent
926bf6a386
commit
00c02a4fea
10 changed files with 54 additions and 9 deletions
|
@ -1,4 +1,5 @@
|
|||
data Bool = False | True
|
||||
data Color = Red | Green | Blue | Indigo | Violet
|
||||
data Tree a = Leaf a | Branch (Tree a) (Tree a)
|
||||
data Point = Point Float Float deriving (Show)
|
||||
data Point = Point Float Float deriving (Show)
|
||||
data Tree t = Node t [Tree t]
|
|
@ -0,0 +1,5 @@
|
|||
data Tree t = Node t [Tree t]
|
||||
reduceT :: (t -> t -> t) -> Tree t -> t
|
||||
reduceT f (Node x []) = x
|
||||
reduceT f (Node x [y]) = f x y
|
||||
reduceT f (Node x (y:ys)) = reduceT f (f x y) ys
|
1
documents/Programmierparadigmen/scripts/mpi/mpi-bcast.c
Normal file
1
documents/Programmierparadigmen/scripts/mpi/mpi-bcast.c
Normal file
|
@ -0,0 +1 @@
|
|||
MPI_Bcast(buffer, count, datatype, root, comm)
|
|
@ -0,0 +1,2 @@
|
|||
MPI_Scatter(sendbuf, sendcount, sendtype, recvbuf,
|
||||
recvcount, recvtype, root, comm)
|
2
documents/Programmierparadigmen/scripts/prolog/delete.pl
Normal file
2
documents/Programmierparadigmen/scripts/prolog/delete.pl
Normal file
|
@ -0,0 +1,2 @@
|
|||
remove([(X,A)|L],X,[(X,ANew)|L]) :- A>0, ANew is A-1.
|
||||
remove([X|L],Y,[X|L1]) :- remove(L,Y,L1).
|
|
@ -1,6 +1,6 @@
|
|||
// file HelloWorld.x10
|
||||
public class HelloWorld {
|
||||
public static def main(args: Array[String](1)){
|
||||
public static def main(args:Rail[String]) {
|
||||
x10.io.Console.OUT.println("Hello, World");
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue