code stringlengths 3 1.18M | language stringclasses 1
value |
|---|---|
/*
CoE 1186
1186 Entertainment
Reversi Game
ReversiGameBoard.java
-----------------------------------------
ReversiGameBoard
- Abstract or Concrete: Concrete
- List of Superclasses: GameBoard, MyPanel, JPanel
- List of Subclasses: N/A
- Purpose: Java Reversi Game
- Collaborations: Loaded b... | Java |
/*
This simple extension of the java.awt.Frame class
contains all the elements necessary to act as the
main window of an application.
*/
import java.sql.*;
import oracle.sql.*;
import oracle.jdbc.driver.*;
import java.awt.*;
public class sqlutil extends Frame
{
public Connection c = null;
public... | Java |
/*
* Author: Natalie Schneider
* Company: 1186 Entertainment
* Date Modified: 4/1/07
* Filename: Server.java
*/
import java.util.*;
import java.io.*;
import java.net.*;
import java.lang.*;
import java.sql.*;
import java.text.SimpleDateFormat;
/** Application that runs on the server and relays... | Java |
/*
CoE 1186
1186 Entertainment
Generic Game
GameBoard.java
-----------------------------------------
ReversiGameBoard
- Abstract or Concrete: Abstract
- List of Superclasses: MyPanel, JPanel
- List of Subclasses: N/A
- Purpose: Java Reversi Game
- Collaborations: Loaded by the ReversiGameR... | Java |
import java.sql.*;
import java.util.*;
//import java.text.DateFormat;
import java.io.*;
import oracle.sql.*;
import oracle.jdbc.driver.*;
/*************************************************************************
* Filename: DB.Java
* Author Ben Johnson
* Company: 1186 Entertainment
* Last Modified: ... | Java |
/*
* Author: Natalie Schneider
* Company: 1186 Entertainment
* Date Modified: 3/25/07
* Filename: Room.java
*/
import java.util.*;
//Room class
//Stores a list of the users in a game lobby or game room
public class Room
{
public ArrayList<ClientThread> roomies;
public boolean isLobby;
publi... | Java |
/*
* Copyright (C) 2010 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicab... | Java |
/*
* Copyright (C) 2010 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicab... | Java |
/*
* Copyright (C) 2010 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicab... | Java |
/*
* Copyright (C) 2010 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to ... | Java |
/*
* Copyright (C) 2010 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicab... | Java |
/*
* Copyright (C) 2009 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by app... | Java |
/*
* Copyright (C) 2008 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by appli... | Java |
/*
* Copyright (C) 2011 Darren Salt
*
* Licensed under the Apache License, Version 2.0 (the "Licence"); you may
* not use this file except in compliance with the Licence. You may obtain
* a copy of the Licence at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to ... | Java |
/*
* Copyright (C) 2010 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by app... | Java |
/*
* Copyright (C) 2010 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to ... | Java |
/*
* Copyright (C) 2008 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicab... | Java |
/*
* Copyright (C) 2008 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by appli... | Java |
/*
* Copyright (C) 2008 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by appli... | Java |
package org.pocketworkstation.pckeyboard;
import android.content.Context;
import android.util.AttributeSet;
public class VibratePreference extends SeekBarPreferenceString {
public VibratePreference(Context context, AttributeSet attrs) {
super(context, attrs);
}
@Override
public void onCha... | Java |
/*
* Copyright (C) 2008 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by app... | Java |
/*
* Copyright (C) 2008 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicab... | Java |
package org.pocketworkstation.pckeyboard;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.util.Log;
import android.view.inputmethod.InputMethodManager;
public class NotificationReceiver extends BroadcastReceiver {
static final String TAG = "PCKe... | Java |
/*
* Copyright (C) 2010 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicab... | Java |
/*
* Copyright (C) 2008 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicab... | Java |
package org.pocketworkstation.pckeyboard;
import java.util.HashMap;
import java.util.Locale;
import java.util.Map;
import android.content.SharedPreferences;
import android.content.res.Resources;
import android.util.Log;
/**
* Global current settings for the keyboard.
*
* <p>
* Yes, globals are evil. But the per... | Java |
/*
* Copyright (C) 2009 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed ... | Java |
/*
* Copyright (C) 2010 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by app... | Java |
package org.pocketworkstation.pckeyboard;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import android.content.Context;
import android.content.res.TypedArray;
import android.util.AttributeSet;
/**
* Variant of SeekBarPreference that stores values as string preferences.
*
* This is for compatibi... | Java |
/*
* Copyright (C) 2008 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicab... | Java |
/*
* Copyright (C) 2010 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to ... | Java |
/*
* Copyright (C) 2010 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to ... | Java |
/*
* Copyright (C) 2010 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to ... | Java |
/*
* Copyright (C) 2011 Darren Salt
*
* Licensed under the Apache License, Version 2.0 (the "Licence"); you may
* not use this file except in compliance with the Licence. You may obtain
* a copy of the Licence at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to ... | Java |
/*
* Copyright (C) 2008 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicab... | Java |
/*
* Copyright (C) 2008-2009 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or ag... | Java |
/*
* Copyright (C) 2010 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to ... | Java |
/*
* Copyright (C) 2010 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to ... | Java |
/*
* Copyright (C) 2010 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by app... | Java |
/*
* Copyright (C) 2010 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by app... | Java |
package org.pocketworkstation.pckeyboard;
import java.util.Locale;
import android.content.Context;
import android.content.res.TypedArray;
import android.preference.DialogPreference;
import android.util.AttributeSet;
import android.view.View;
import android.widget.SeekBar;
import android.widget.TextView;
/**
* SeekB... | Java |
/*
* Copyright (C) 2010 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to ... | Java |
/*
* Copyright (C) 2008 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicab... | Java |
/*
* Copyright (C) 2008 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicab... | Java |
/*
* Copyright (C) 2008 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by appli... | Java |
/**
*
*/
package org.pocketworkstation.pckeyboard;
import android.content.Context;
import android.preference.ListPreference;
import android.util.AttributeSet;
import android.util.Log;
public class AutoSummaryListPreference extends ListPreference {
private static final String TAG = "HK/AutoSummaryListPreference"... | Java |
/*
* Copyright (C) 2009 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by app... | Java |
package org.pocketworkstation.pckeyboard;
import android.content.Context;
import android.preference.EditTextPreference;
import android.util.AttributeSet;
public class AutoSummaryEditTextPreference extends EditTextPreference {
public AutoSummaryEditTextPreference(Context context) {
super(context);
}
... | Java |
/*
* Copyright (C) 2008 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by appli... | Java |
/*
* Copyright (C) 2008 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by appli... | Java |
/*
* Copyright (C) 2008 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicab... | Java |
/*
* Copyright (C) 2008 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicab... | Java |
/*
* Copyright (C) 2010 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to ... | Java |
/*
* Copyright (C) 2011 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicab... | Java |
/*
* Copyright (C) 2008-2009 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agree... | Java |
/*
* Copyright (C) 2011 Darren Salt
*
* Licensed under the Apache License, Version 2.0 (the "Licence"); you may
* not use this file except in compliance with the Licence. You may obtain
* a copy of the Licence at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to ... | Java |
/*
* Copyright (C) 2010 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to ... | Java |
package org.pocketworkstation.pckeyboard;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.xmlpull.v1.XmlPullParserException;
import android.content.BroadcastReceiver;
import android.content.Context;
... | Java |
/*
* Copyright (C) 2008 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by appli... | Java |
//import drasys.or.nonlinear.*;
import gaiatools.numeric.function.Function;
/*
* Utility class for passing around functions
*
* implements the drasys "FunctionI" interface to enable Simpsons method
* outsource.
*/
public abstract class FunctionI extends Function {
public double value(double var) {
r... | Java |
import java.util.StringTokenizer;
/**
* Adapted for heliosphere display
* this one for showing flux as a skymap
*/
public class HelioFluxViewer {
public static double AU = 1.49598* Math.pow(10,11); //meters
public HelioFluxViewer (String filename) {
file f = new file(filename);
//int num2 = 101;
... | Java |
/**
* this routine calculates the distribution function (6D)
* however based on 5D inputs as there is symmetry about inflow axis
*
* NOTE: parameters of distribution must be given in coordinates
* relative to inflow direction for this routine
* Damby & Camm 1957, Mostly from Judge & ... | Java |
/**
* A "hot" neutral helium model of the LISM
* (gaussian)
*/
public class SimpleHeLISM extends InterstellarMedium {
public static double K = 1.380622 * Math.pow(10,-23); //1.380622E-23 kg/m/s/s/K
public static double Mhe = 4*1.6726231 * Math.pow(10,-27); // 4 * 1.6726231 x 10-24 gm
private double t... | Java |
//import drasys.or.nonlinear.*;
//import gaiatools.numeric.function.Function;
import flanagan.integration.*;
/*
* Utility class for passing around functions
*
* implements the drasys "FunctionI" interface to enable Simpsons method
* outsource.
*/
public abstract class FunctionI extends Function implem... | Java |
/**
*
* Use this to calculate the v dist. of int. helium using
* the assumption of isotropic adiabatic cooling
*
*/
public class SemiModel {
public double AU = 1.49598* Math.pow(10,11); //meters
public double NaN = Double.NaN;
public double MAX = Double.MAX_VALUE;
public double U = 440*1000;
p... | Java |
import java.util.StringTokenizer;
/**
* Adapted for heliosphere display
*
*/
public class MCAJ_image {
public static double AU = 1.49598* Math.pow(10,11); //meters
public MCAJ_image(String filename) {
file f = new file(filename);
int num2 = 101;
double[] xArray = new double[num2];
double[] yA... | Java |
import java.util.Date;
import java.lang.Math;
public class NTest {
public static void main(String[] args) {
Date d1 = new Date();
//NeutralDistribution nd = new NeutralDistribution( 12, 123, 142);
double AU = 15 * 10^13; // m
SimpleNeutralDistribution snd = new SimpleNeutralDistribution(
25000,... | Java |
import SimpleInput;
import SimpleOutput;
public class primeSieve {
// This program implements the Sieve of Eratosthenes
public static void main (String args []) {
// declare basic objects
SimpleInput in = new SimpleInput();
SimpleOutput out = new SimpleOutput();
int M; // size of sieve
... | Java |
import java.util.Date;
import java.util.Random;
public class MCThread extends Thread {
public boolean finished = false;
private double[] limits;
private int np;
private final FunctionIII f;
public double tbr;
private Random r;
private double w1,w2,w3;
public MCThread(FunctionIII funk, double[] l... | Java |
import java.util.StringTokenizer;
public class IbexFitter {
public CurveFitter cf;
public IBEXLO_09fit ifit;
public IbexFitter() {
file f = new file("first_pass.txt");
int numLines = 926;
numLines=numLines/3;
f.initRead();
double[] x = new double[numLines];
double[] y = new double[num... | Java |
import java.util.StringTokenizer;
public class TwoDPlot {
public CurveFitter cf;
public TwoDPlot() {
file f = new file("second_pass_ascii.txt");
f.initRead();
double[] x = new double[30];
double[] y = new double[30];
double[] z = new double[900];
for (int i=0; i<x.length; i++) x[i]... | Java |
import java.util.StringTokenizer;
/**
* Simulating response at IBEX_LO with this class
*
* Create interstellar medium and perform integration
*
*/
public class IBEXLO_09fit {
public int mcN = 100000; // number of iterations per 3D integral
public String outFileName = "lo_fit_09.txt";
public stati... | Java |
import java.lang.Math;
import java.util.Date;
import gaiatools.numeric.integration.Simpson;
//import drasys.or.nonlinear.*; // our friend mr. simpson resides here
/**
* This class should take care of doing multi-dimensional numeric integrations.
* This will be slow!!
*
* Actually not half bad...
*
*
* ... | Java |
//import cern.jet.math.Bessel;
import java.lang.Math;
import java.util.Date;
import drasys.or.nonlinear.*;
public class IntegralTest {
public static void main(String[] args) {
Simpsons s = new Simpsons();
MyF myF = new MyF();
Integration i = new Integration();
i.setMaxError(.001);
//s.setEpsi... | Java |
import java.util.Date;
/**
* The usual "hot model" here.. only with one species for now
*
*/
public class GaussianVLISM extends InterstellarMedium {
public HelioVector vBulk;
public double temp, density;
public static double KB = 1.3807*Math.pow(10,-23);
public static double MP = 1.672621*Math.pow(10... | Java |
/** This is a wrapper for some static functions I wrote
*
*/
public class LukeMath {
// recursively computes legendre polynomial of order n, argument x
public static double compute(int n,double x) {
if (n == 0) return 1;
else if (n == 1) return x;
return ( (2*n-1)*x*compute(n-1,x) - (n-1)*compute... | Java |
public class MakeTanAngle135Array {
public static void main(String[] args) {
VIonBulk vib;
file myFile;
double AU = 1.5* Math.pow(10,11);
myFile = new file("135array.txt");
myFile.initWrite(false);
for (int v0=20000; v0<40000; v0=v0+1000) {
vib = new VIonBulk(AU, 28000, 135*3.14159/180);
... | Java |
/**
* A basic power law in ENERGY
*
*/
public class PowerLawVLISM extends InterstellarMedium {
public HelioVector vBulk;
public double power, density, lim1, lim2, norm, ee;
public static double NaN = Double.NaN;
public static double MP = 1.672621*Math.pow(10,-27);
public static double EV = 6.24150965*M... | Java |
import java.lang.Math;
import java.util.Date;
//Put your own function here and intgrate it
// Lukas Saul - Warsaw 2000
// lets use someone elses, shall we?
// nah, they all suck. I'll write my own
public class Integration {
private int startDivision = 5;
private long maxDivision = 100000;
private i... | Java |
import cern.jet.math.Bessel;
import java.lang.Math;
import java.util.Date;
import drasys.or.nonlinear.*;
/** This class computes the pickup distribution as a function of
* vr, vt, ( and r, theta)
*/
public class 2DVelocityDistribution {
// constants not correct yet
public static double Ms = 2 * M... | Java |
import java.util.StringTokenizer;
import java.util.Vector;
/*
* This is to load a given model from a file and give a proper normalization to match the ibex data
* for using a one parameter (normalization) fit.
*/
public class FitData {
public StringTokenizer st;
public double[] days;
public double[] rates;
... | Java |
/*
* Interface MinimisationFunction
*
* This interface provides the abstract method for the function to be
* minimised by the methods in the class, Minimisation
*
* WRITTEN BY: Dr Michael Thomas Flanagan
*
* DATE: April 2003
* MODIFIED: April 2004
*
* DOCUMENTATION:
* See Michael Thoma... | Java |
import gov.noaa.pmel.sgt.swing.JPlotLayout;
import gov.noaa.pmel.sgt.swing.JClassTree;
import gov.noaa.pmel.sgt.swing.prop.GridAttributeDialog;
import gov.noaa.pmel.sgt.JPane;
import gov.noaa.pmel.sgt.GridAttribute;
import gov.noaa.pmel.sgt.ContourLevels;
import gov.noaa.pmel.sgt.CartesianRenderer;
import gov.no... | Java |
import cern.jet.math.Bessel;
import java.lang.Math;
import java.util.Date;
import drasys.or.nonlinear.*;
public class BofTheta {
public static double Ms = 2 * Math.pow(10,30);
public static double G = 667 * Math.pow(10,-13);
public static double AU = 15* Math.pow(10,12);
private double r, v0;
privat... | Java |
/*
* Class MaximisationExample
*
* An example of the use of the class Maximisation
* and the interface MaximisationFunction
*
* Finds the maximum of the function
* z = a + x^2 + 3y^4
* where a is constant
* (an easily solved function has been chosen
* for clar... | Java |
import java.util.StringTokenizer;
import java.util.Random;
public class Benford {
public file inFile, outFile;
public int[][] digitTallies;
public double[] factors = {1, 2, 3, 4, 5, 6, 7, 8, 9, 0}; // last one placeholder
public int skipLines, dataColumn;
public StringTokenizer st;
public Random r;
pu... | Java |
/*
* Class Fmath
*
* USAGE: Mathematical class that supplements java.lang.Math and contains:
* the main physical constants
* trigonemetric functions absent from java.lang.Math
* some useful additional mathematical functions
* some conversion function... | Java |
import java.util.StringTokenizer;
public class ParamPlotter {
public ParamPlotter() {
file f = new file("lVSv_6000_86p5_200k.txt");
double[] x = new double[30];
double[] y = new double[30];
double[] z = new double[900];
// we are going to set the x and y graph params by hand here..
// eas... | Java |
import java.lang.Math;
import java.util.Date;
import java.util.Random;
import flanagan.integration.*;
//import drasys.or.nonlinear.*; // our friend mr. simpson resides here
/**
* This class should take care of doing multi-dimensional numeric integrations.
* This will be slow!!
*
* Actually not half bad..... | Java |
public class MyDouble {
public double value;
public MyDouble(double d) {
value=d;
}
} | Java |
import java.lang.Math;
import java.util.Date;
/**
* Lukas Saul - March 27, 2001
* Taken from C routine Four1, from Numerical Recipes
*/
public class JFFT {
public double[] dOutReal;
public double[] dOutImaginary;
private double[] dInReal;
//private long nn;
//private int iSign;
//private double ... | Java |
/**
* A basic power law in ENERGY
*
*/
public class PowerLawVLISM extends InterstellarMedium {
public HelioVector vBulk;
public double power, density, lim1, lim2, norm, ee;
public static double NaN = Double.NaN;
public static double MP = 1.672621*Math.pow(10,-27);
public static double EV = 6.24150965*M... | Java |
/**
* Utility class for passing around 2D functions
*
* Use this to get a 1D function by fixing one of the variables..
* the index to fix is passed in ( 0 or 1 )
*/
public abstract class FunctionII {
/**
* Override this for the function needed!!
*
*/
public double function2(double x, double y) {
... | Java |
/**
* Simulating response at IBEX_LO with this class
*
* Create interstellar medium and perform integration
*
*/
public class IBEXLO {
public int mcN = 20000; // number of iterations per 3D integral
public String outFileName = "ibex_lo_out17.txt";
String dir = "SPRING";
//String dir = "FALL";
pu... | Java |
/**
*
*
*/
public abstract class Distribution {
} | Java |
import gov.noaa.pmel.sgt.swing.JPlotLayout;
import gov.noaa.pmel.sgt.swing.JClassTree;
import gov.noaa.pmel.sgt.swing.prop.GridAttributeDialog;
import gov.noaa.pmel.sgt.JPane;
import gov.noaa.pmel.sgt.GridAttribute;
import gov.noaa.pmel.sgt.ContourLevels;
import gov.noaa.pmel.sgt.CartesianRenderer;
import gov.no... | Java |
import java.util.*;
//import cern.jet.math.Bessel;
//import com.imsl.math.Complex;
/**
* This calculates the velocity distribution of neutral atoms in the heliosphere.
* (according to the hot model or interstellar neutral dist. of choice)
*
* Also computes losses to ionization!
*
* Uses an input distribu... | Java |
import java.util.Date;
public class LegendreTest {
public static void main(String[] args) {
Date d1 = new Date();
System.out.println(Legendre.compute(3,3));
Date d2 = new Date();
System.out.println(d2.getTime() - d1.getTime());
Legendre l = new Legendre();
file f = new file("deltadata6.tx... | Java |
import java.util.StringTokenizer;
public class TwoDPlot {
public CurveFitter cf;
public TwoDPlot() {
file f = new file("sp_param_65_74_6_5.txt");
f.initRead();
double[] x = new double[30];
double[] y = new double[30];
double[] z = new double[900];
for (int i=0; i<x.length; i++) x[i... | Java |
//import cern.jet.math.Bessel;
import java.lang.Math;
import java.util.Date;
public class YadavaIntegral {
public YadavaIntegral() {
MultipleIntegration mi = new MultipleIntegration();
double[] lims2 = new double[4];
lims2[0]=0.0;
lims2[1]=Math.PI;
lims2[2]=0.0;
lims2[3]=Math.PI;
F... | Java |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.