Déplacer le code et créer un projet Eclipse

This commit is contained in:
francois 2014-07-06 12:06:54 -04:00
parent 6c108afe25
commit 6299c8927f
4 changed files with 44 additions and 18 deletions

24
.project Normal file
View file

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>SolutionCooperators</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>de.walware.docmlet.tex.builders.Tex</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>de.walware.statet.r.builders.RSupport</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>de.walware.statet.base.StatetNature</nature>
<nature>de.walware.statet.r.RNature</nature>
<nature>de.walware.docmlet.tex.natures.Tex</nature>
</natures>
</projectDescription>

View file

@ -0,0 +1,2 @@
eclipse.preferences.version=1
encoding/cooperators.Rnw=UTF-8

View file

@ -88,24 +88,7 @@ représentant les orages, et de déterminer si des assurés sont touchés par le
orages. Les functions suivantes seront utilisées à cette fin:
<<ellipse1>>=
ellipse_param <- function(t,X,Y,a,b,phi)
{
cbind(X + a * cos(t)*cos(phi) - b*sin(t)*sin(phi),Y + a *
cos(t)*sin(phi) + b*sin(t)*cos(phi))
}
dans_ellipse_param <- function(coord,param)
{
x <- coord[,1]
y <- coord[,2]
xc <- param[1]
yc <- param[2]
a <- param[3]
b <- param[4]
phi <- param[5]
(((x-xc)*cos(phi)-(y-yc)*sin(phi))^2/a^2 +
((x-xc)*sin(phi)+(y-yc)*cos(phi))^2/b^2) <= 1
}
source("ellipse.r")
@
\subsection{Importation des données}

View file

@ -3,4 +3,21 @@
# Author: francois
###############################################################################
ellipse_param <- function(t,X,Y,a,b,phi)
{
cbind(X + a * cos(t)*cos(phi) - b*sin(t)*sin(phi),Y + a *
cos(t)*sin(phi) + b*sin(t)*cos(phi))
}
dans_ellipse_param <- function(coord,param)
{
x <- coord[,1]
y <- coord[,2]
xc <- param[1]
yc <- param[2]
a <- param[3]
b <- param[4]
phi <- param[5]
(((x-xc)*cos(phi)-(y-yc)*sin(phi))^2/a^2 +
((x-xc)*sin(phi)+(y-yc)*cos(phi))^2/b^2) <= 1
}