summaryrefslogtreecommitdiff
path: root/gi/posterior-regularisation/prjava/src/optimization/gradientBasedMethods/ProjectedObjective.java
blob: c3d213930dcae92f68a4835e5d9a9712d049bb99 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
package optimization.gradientBasedMethods;

import optimization.util.MathUtils;


/**
 * Computes a projected objective
 * When we tell it to set some parameters it automatically projects the parameters back into the simplex:
 * 
 * 
 * When we tell it to get the gradient in automatically returns the projected gradient:
 * @author javg
 *
 */
public abstract class ProjectedObjective extends Objective{
	
	public abstract double[] projectPoint (double[] point);
	
	public double[] auxParameters;
	
	
	public  void setInitialParameters(double[] params){
		setParameters(projectPoint(params));
	}
	
	
	
	
}