Revision 1630

trunk/tests/GNUmakefile (revision 1630)
167 167
	$(MAKE) --directory=simple_mcmc clean
168 168
	$(MAKE) --directory=testminmax clean
169 169
	$(MAKE) --directory=geolocation clean
170
	$(MAKE) --directory=RC04_solve clean
171
	$(MAKE) --directory=RC04_det clean
172
	$(MAKE) --directory=RC04_inv clean
173
	$(MAKE) --directory=RC10_spline1 clean
174
	$(MAKE) --directory=RC10_spline2 clean
175
	$(MAKE) --directory=RC13_dsort clean
176
	$(MAKE) --directory=RC15_eigen clean
177
	$(MAKE) --directory=RC26_dflndet clean
178
	$(MAKE) --directory=RC27_dfsolve1 clean
179
	$(MAKE) --directory=RC27_dfsolve2 clean
180
	$(MAKE) --directory=RC05_quad clean
181
	$(MAKE) --directory=RC01_svd clean
182 170
	$(MAKE) --directory=betai clean
183 171
	$(MAKE) --directory=beta2 clean
184 172
	$(MAKE) --directory=beta3 clean
trunk/tests/alternatives/RC04_solve/solve.tpl (revision 1630)
1
// This is used to test the following functions:
2
// 
3
// dvar_vector solve(const dvar_matrix & aa, const dvar_vector & z)
4
// dvar_vector solve(const dvar_matrix& aa,const dvector& z)
5
// dvector solve(const dmatrix & aa, const dvector & z)
6
//
7
// test1, test2, test3 should all have avalue of 1.0
8
DATA_SECTION
9
  int n
10
  !! n=4;
11
  matrix M(1,n,1,n)
12
  vector B(1,n)
13
  number test1
14
  number test2
15
  number test3
16
  !! random_number_generator rng(132);
17
  !! M.fill_randn(rng);
18
  !! B.fill_randn(rng);
19

  
20
PARAMETER_SECTION
21
  init_matrix VM(1,n,1,n)
22
  !! VM=M;
23
  init_vector VB(1,n)
24
  !! VB=B;
25
  objective_function_value f
26
PROCEDURE_SECTION
27
  test1 = 1.0 + norm2(value(VM*solve(VM,B))-B);
28
  test2 = 1.0 + norm2(M*solve(M,B)-B);
29
  test3 = 1.0 + value(norm2(VM*solve(VM,VB)-VB));
30
  f=norm2(solve(VM,VB))+square(norm2(VB)-1.0)+norm2(VM);
31

  
32
REPORT_SECTION
33
  report << "#test1" << endl;
34
  report << test1 << endl;
35
  report << "#test2" << endl;
36
  report << test2 << endl;
37
  report << "#test3" << endl;
38
  report << test3 << endl;
39

  
trunk/tests/alternatives/RC04_solve/GNUmakefile (revision 1630)
1
.PHONY: run
2

  
3
TARGET=solve
4

  
5
all: clean $(TARGET) run
6

  
7
$(TARGET): $(TARGET).tpl $(TARGET).dat
8
	export ADMB_HOME=$(ADMB_HOME); export PATH=$(ADMB_HOME)/bin:${PATH}; admb -s $(TARGET)
9

  
10
run:
11
	@printf "Started run:\n"
12
	./$(TARGET); cat $(TARGET).par $(TARGET).rep > $(TARGET).temp; mv $(TARGET).temp $(TARGET).par
13
	@printf "Finished run.\n"
14

  
15
clean:
16
	@rm -vf $(TARGET)
17
	@rm -vf admodel.*
18
	@rm -vf variance
19
	@rm -vf fmin.log
20
	@rm -vf $(TARGET).eva
21
	@rm -vf $(TARGET).htp
22
	@rm -vf $(TARGET).bar
23
	@rm -vf $(TARGET).bgs
24
	@rm -vf $(TARGET).cor
25
	@rm -vf $(TARGET).cpp
26
	@rm -vf $(TARGET).log
27
	@rm -vf $(TARGET).o
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff