summaryrefslogtreecommitdiff
path: root/gi/posterior-regularisation/prjava/src/optimization/gradientBasedMethods/GradientDescent.java
blob: 9a53cef42bf44c03bc211f89e0db4a61f14804c6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
package optimization.gradientBasedMethods;

import optimization.linesearch.LineSearchMethod;



public class GradientDescent extends AbstractGradientBaseMethod{
	
	public GradientDescent(LineSearchMethod lineSearch) {
		this.lineSearch = lineSearch;
	}
		
	public double[] getDirection(){
		for(int i = 0; i< gradient.length; i++){
			direction[i] = -gradient[i];
		}
		return direction;
	}
}