General Discussion Undecided where to post - do it here. |
Reply to Thread New Thread |
|
![]() |
#1 |
|
Code:
Code
IMPLICIT DOUBLE PRECISION(A, T, X-Z) IMPLICIT INTEGER(B-S, U-W) COMMON/PARAMS/SCOEFF(5),SMAX(5),X,Z SAVE/PARAMS/ COMMON/VARS/S(5),W SAVE/VARS/ SMAX(1)=8 SMAX(2)=12 SMAX(3)=16 SMAX(4)=20 SMAX(5)=24 PRINT *, "Enter E1" READ *, SCOEFF(1) PRINT *, "Enter E2" READ *, SCOEFF(2) PRINT *, "Enter E3" READ *, SCOEFF(3) PRINT *, "Enter E4" READ *, SCOEFF(4) PRINT *, "Enter E5" READ *, SCOEFF(5) PRINT *, "Enter x" READ *, X PRINT *, "Enter Z" READ *, Z T = TMIN() PRINT *, S(1), S(2), S(3), S(4), S(5), W, T RETURN END DOUBLE PRECISION FUNCTION TMIN() IMPLICIT DOUBLE PRECISION(A, T, X-Z) IMPLICIT INTEGER(B-S, U-W) DIMENSION SMIN(5) COMMON/PARAMS/SCOEFF(5),SMAX(5),X,Z SAVE/PARAMS/ COMMON/VARS/S(5),W SAVE/VARS/ TMIN = 1.0D10 DO 103 I1=0,1 DO 113 I2=0,1 DO 123 I3=0,1 DO 133 I4=0,1 DO 143 I5=0,1 DO 153 W=1,9 S(1)=I1*SMAX(1) S(2)=I2*SMAX(2) S(3)=I3*SMAX(3) S(4)=I4*SMAX(4) S(5)=I5*SMAX(5) T=TCALC() IF(T.LE.TMIN) THEN TMIN=T DO 173 J=1, 5 SMIN(J)=S(J) 173 CONTINUE WMIN=W ENDIF 153 CONTINUE 143 CONTINUE 133 CONTINUE 123 CONTINUE 113 CONTINUE 103 CONTINUE DO 183 J=1, 5 S(J)=SMIN(J) 183 CONTINUE W=WMIN END DOUBLE PRECISION FUNCTION TCALC() IMPLICIT DOUBLE PRECISION(A, T, X-Z) IMPLICIT INTEGER(B-S, U-W) COMMON/PARAMS/SCOEFF(5),SMAX(5),X,Z SAVE/PARAMS/ COMMON/VARS/S(5),W SAVE/VARS/ TCALC = 1.0D10 C = CCALC(W,Z) A = ACALC() H = HCALC() IF(H.LT.1) GOTO 104 TCALC = C*A/H 104 RETURN END INTEGER FUNCTION CCALC(W,Z) DOUBLE PRECISION Z INTEGER W CCALC = INT(9.0/(W*(1.0+Z))-0.00001)+1 END INTEGER FUNCTION HCALC() IMPLICIT DOUBLE PRECISION(A, T, X-Z) IMPLICIT INTEGER(B-S, U-W) COMMON/PARAMS/SCOEFF(5),SMAX(5),X,Z SAVE/PARAMS/ COMMON/VARS/S(5),W SAVE/VARS/ HCALC = 0 DO 105 I = 1, 5 HCALC=HCALC+SCOEFF(I)*S(I) 105 CONTINUE END DOUBLE PRECISION FUNCTION ACALC() IMPLICIT DOUBLE PRECISION(A, T, X-Z) IMPLICIT INTEGER(B-S, U-W) COMMON/PARAMS/SCOEFF(5),SMAX(5),X,Z SAVE/PARAMS/ COMMON/VARS/S(5),W SAVE/VARS/ ACALC = X DO 106 I = 1, 5 ACALC=ACALC+120.0*W*S(I) 106 CONTINUE END |
![]() |
![]() |
#4 |
|
Originally posted by Lul Thyme
On the boundary in general, if the boundary isn't bounded by hyperplanes like in this case. Also that's IF there is an extremum it has to be on the boundary. You need compactness to omit this part IIRC. I guess I knew this, I never thought about what derivatives of quotients of multivariable linar functions would look like. I guess all the S variable are integers each so all of this is moot since there's only a finite number of possibilities. (Except for w) w is bounded above by 9 And we're on a closed, bounded subset of R^n so bolzano-weierstrass tells me what I need to know here... |
![]() |
![]() |
#5 |
|
|
![]() |
![]() |
#6 |
|
|
![]() |
![]() |
#8 |
|
|
![]() |
![]() |
#10 |
|
Originally posted by KrazyHorse
Once you've done that, open a terminal in your emulator. cd to the nauty22 directory (or whatever version you have). type in "./configure" and hit enter. wait. shouldn't have any errors (i'm assuming your emulator comes with a functioning version of gcc). then type in "make all" and hit enter. wait. now you should be able to run the included utilities. See I'm really new to this. I played around in the emulator with a UNIX tutorial. I was able to cd around a bit and create folders etc... But I couldn't understand how my "root" or "home" was related to my actual hard drive. Meaning I couldn't find my nauty directory from the emulator. Maybe I needed to edit what my root was before running the emulator? EDIT: Anyway, for now, I'll try to see if I can avoid the whole UNIX business and try to compile it manually somehow. |
![]() |
![]() |
#11 |
|
Originally posted by Krill
![]() I'm suprised MRT didn't know about the function minimisation anway. And we all know you like to show off your superiority KH ![]() |
![]() |
![]() |
#12 |
|
Uhhh...no, I don't think so. I think that once you've compiled into an executable its ability to run is highly platform dependent. That's why I had to compile my fortran routine under a Windows compiler on a win-32 system to get a win-32 executable. This executable will not run under *nix, and vice versa.
But I'm not exactly an expert in this. Or even competent. ![]() |
![]() |
![]() |
#13 |
|
Originally posted by Lul Thyme
Btw I'm kind of interested.. Was it civ-related? Can you explain where the question came from? Also, how old are you? Unless I have you confused with someone else, I thought you were over 20. It's a bit surprising to see people studying algebra at that age. By then, they have either gone through it or abandoned forever. Although in any case, it's never too late for more math ![]() It has to do with chopping down forests. |
![]() |
Reply to Thread New Thread |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|