|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectgov.nist.microanalysis.EPQLibrary.MACCache
public class MACCache
Implements a simple class for caching mass absorption coefficient values. Calculating MACs can be CPU intensive and since they are required so often by NISTMonte, this class offers a substancial performance optimization.
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
| Field Summary | |
|---|---|
static double |
NOT_IN_CACHE
The value returned by getMAC(...) when the Material/energy combination is not currently stored in the cache. |
| Constructor Summary | |
|---|---|
MACCache(double maxE)
MACCache - Create a new MACCache object. |
|
| Method Summary | |
|---|---|
void |
addMAC(Material mat,
double energy,
double mac)
addMAC - Add a MAC to the cache. |
void |
clear()
|
double |
getMAC(Material mat,
double energy)
getMAC - get a MAC from the cache. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final double NOT_IN_CACHE
| Constructor Detail |
|---|
public MACCache(double maxE)
| Method Detail |
|---|
public void clear()
public double getMAC(Material mat,
double energy)
mat - Material - The absorber materialenergy - double - The x-ray energy
public void addMAC(Material mat,
double energy,
double mac)
mat - Material - The absorber material.energy - double - The x-ray energymac - double - The MAC to be associated in the cache with mat and
energy.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||