package Lagrange::BoltzmannDiracLagrangian;

use parent 'Lagrange::Lagrangian';

sub new {
	my ($class, $name) = @_;
        my $self = $class->SUPER::new;

}

### d/dt (dL/dr)
sub leftphrase {
	my ($self, $dL, $dr_i) = @_;

	### approximation
	my $ddt = ExpDerivatove->new()->d($dL,1);

	return $ddt;  
}		

### dL/dr + Sigma{lambdaii * dfi/dr)
sub rightphrase {
	my ($self, $dL, $dri, @lambdas, @dfi) = @_;

	### approximation
	my $potentialpart1 = ExpDerivative->new()->($dL,1);
	my $potentialpart2 = 0.0;

	for (my $i = 0; $i < length(@lambdas); $i++) {
		$potentialpart2 += @lambdas[$i] * @dfi[$i];
	}

	return $potentialpart1 + potentialpart2; 
}

1;
