gov.nist.microanalysis.EPQLibrary
Class XRayEvents

java.lang.Object
  extended by gov.nist.microanalysis.EPQLibrary.XRayEvents
All Implemented Interfaces:
XRaySource

public class XRayEvents
extends java.lang.Object
implements XRaySource

A simple implementation of the XRaySource interface.

Copyright: Pursuant to title 17 Section 105 of the United States Code this software is not subject to copyright protection and is in the public domain

Company: National Institute of Standards and Technology

Version:
1.0
Author:
Nicholas W. M. Ritchie

Field Summary
static int XRayEvent
          ScatterEvent - the ID of the ActionEvent that is fired when the model generates an x-ray probability
 
Constructor Summary
XRayEvents(int n)
           
 
Method Summary
 void addEvent(double energy, double amp, double[] pos)
          addEvent- Add a new x-ray event of the specified energy, amplitude originating from the specified position.
 void clear()
          clear - Clear all x-ray events from this container.
 double getEnergy(int n)
          getEnergy - Returns the energy of the n-th x-ray.
 int getEventCount()
          getEventCount - Get the number of events currently contained.
 double getIntensity(int n)
          getIntensity - Returns the fractional likelyhood of the n-th x-ray
 double[] getPosition(int n)
          getPosition - Returns the position from which the x-ray is emitted.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

XRayEvent

public static final int XRayEvent
ScatterEvent - the ID of the ActionEvent that is fired when the model generates an x-ray probability

See Also:
Constant Field Values
Constructor Detail

XRayEvents

public XRayEvents(int n)
Parameters:
n - - The estimated maximum number of events
Method Detail

addEvent

public final void addEvent(double energy,
                           double amp,
                           double[] pos)
addEvent- Add a new x-ray event of the specified energy, amplitude originating from the specified position.

Parameters:
energy -
amp -
pos -

clear

public final void clear()
clear - Clear all x-ray events from this container.


getEventCount

public final int getEventCount()
getEventCount - Get the number of events currently contained.

Specified by:
getEventCount in interface XRaySource
Returns:
int

getEnergy

public final double getEnergy(int n)
getEnergy - Returns the energy of the n-th x-ray.

Specified by:
getEnergy in interface XRaySource
Parameters:
n - int
Returns:
double
See Also:
XRaySource.getEnergy(int)

getIntensity

public final double getIntensity(int n)
getIntensity - Returns the fractional likelyhood of the n-th x-ray

Specified by:
getIntensity in interface XRaySource
Returns:
double
See Also:
XRaySource.getIntensity(int)

getPosition

public final double[] getPosition(int n)
Description copied from interface: XRaySource
getPosition - Returns the position from which the x-ray is emitted.

Specified by:
getPosition in interface XRaySource