query stringlengths 7 33.1k | document stringlengths 7 335k | metadata dict | negatives listlengths 3 101 | negative_scores listlengths 3 101 | document_score stringlengths 3 10 | document_rank stringclasses 102 values |
|---|---|---|---|---|---|---|
Wait until we are out of fullscreen before finishing this activity | @Override
public void onFullscreen(boolean b) {
if (!b) {
finish();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void onReturnMainScreen() {\r\n\t\tif (mVideoView != null) {\r\n\t\t\tmVideoView.stopPlayback();\r\n\t\t\tmVideoView.setVisibility(View.GONE);\r\n\t\t}\r\n\t}",
"@Override\n public void onBackPressed() {\n boolean finish = true;\n try {\n if (mPlayer != null) {\n if (isFullscreen) {\n finish = false;\n mPlayer.setOnFullscreenListener(new YouTubePlayer.OnFullscreenListener() {\n @Override\n public void onFullscreen(boolean b) {\n //Wait until we are out of fullscreen before finishing this activity\n if (!b) {\n finish();\n }\n }\n });\n mPlayer.setFullscreen(false);\n }\n mPlayer.pause();\n }\n } catch (final IllegalStateException e) {\n //Crashlytics.logException(e);\n }\n\n if (finish) {\n super.onBackPressed();\n }\n }",
"@Override\n public void onYouTubePlayerExitFullScreen() {\n }",
"private void makeFullScreen(){\n requestWindowFeature(Window.FEATURE_NO_TITLE);\n // Make it full Screen\n getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);\n }",
"public void fullscreenChanged(FullscreenEvent e);",
"@Override\n\tpublic void onFullscreen(boolean _isFullscreen) {\n\t\tisFullScreen = _isFullscreen;\n\t\tdoLayout();\n\t}",
"@Override\n public boolean isFullScreen() {\n return false;\n }",
"public void waitToFinish()\n {\n while(!this.finished)\n {\n try\n {\n Thread.sleep(1);\n }\n catch (InterruptedException e)\n {\n e.printStackTrace();\n return;\n }\n }\n }",
"public void onGestureFinish() {\n this.mFsGestureDemoTitleView.notifyFinish();\n this.mDemoActivityView.setVisibility(8);\n finishGestureBack();\n }",
"private static void setFullScreen() {\n\t\tif (Keyboard.isKeyDown(28) && Keyboard.isKeyDown(56)) {\n\t\t\tif (Display.isActive()) {\n\t\t\t\tif (!Display.isFullscreen()) {\n\t\t\t\t\tDisplayManager.setDisplayMode(DisplayManager.getMaxWidth(), DisplayManager.getMaxHeight(), true);\n\t\t\t\t Display.setVSyncEnabled(true);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tDisplayManager.setDisplayMode(DisplayManager.getMaxWidth(), DisplayManager.getMaxHeight(), false);\n\t\t\t\t Display.setVSyncEnabled(false);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"private void disableFullscreen() {\n mainContentView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION);\r\n isFullscreen = false;\r\n\r\n // Schedule a runnable to display UI elements after a delay\r\n fullscreenHandler.removeCallbacks(enableFullscreenRunnable);\r\n fullscreenHandler.postDelayed(disableFullscreenRunnable, UI_ANIMATION_DELAY);\r\n }",
"private void finishReset() {\n DefenceField.fieldActivated = true;\n time.setPaused(false);\n nuiManager.closeScreen(DefenceUris.DEATH_SCREEN);\n }",
"private boolean canShowFullScreen(Call call) {\n boolean canShowFullScreen = true;\n boolean isCallWaiting = (call.getState() == Call.State.CALL_WAITING ||\n (call.getState() == Call.State.INCOMING &&\n CallList.getInstance().getActiveOrBackgroundCall() != null));\n if (isCallWaiting) {\n if (InCallPresenter.getInstance().getProximitySensor().isScreenReallyOff()\n && InCallPresenter.getInstance().isActivityStarted()) {\n canShowFullScreen = true;\n } else {\n Log.d(this, \"[canShowFullScreen]call waiting, skip fullscreen intent\");\n canShowFullScreen = false;\n }\n }\n return canShowFullScreen;\n }",
"public void notifyPausing() {\n if (mSurfaceTexture != null) {\n Log.d(TAG, \"renderer pausing -- releasing SurfaceTexture\");\n mSurfaceTexture.release();\n mSurfaceTexture = null;\n }\n if (mFullScreen != null) {\n mFullScreen.release(false); // assume the GLSurfaceView EGL context is about\n mFullScreen = null; // to be destroyed\n }\n mIncomingWidth = mIncomingHeight = -1;\n }",
"public static void goFullScreen(Activity activity) {\r\n activity.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,\r\n WindowManager.LayoutParams.FLAG_FULLSCREEN);\r\n }",
"public void onWindowFreezeTimeout() {\n Slog.w(TAG, \"Window freeze timeout expired.\");\n this.mWmService.mWindowsFreezingScreen = 2;\n forAllWindows((Consumer<WindowState>) new Consumer() {\n /* class com.android.server.wm.$$Lambda$DisplayContent$2HHBX1R6lnY5GedkE9LUBwsCPoE */\n\n @Override // java.util.function.Consumer\n public final void accept(Object obj) {\n DisplayContent.this.lambda$onWindowFreezeTimeout$23$DisplayContent((WindowState) obj);\n }\n }, true);\n this.mWmService.mWindowPlacerLocked.performSurfacePlacement();\n }",
"public void makeFullScreen() {\n currentApiVersion = android.os.Build.VERSION.SDK_INT;\n final int flags = View.SYSTEM_UI_FLAG_LAYOUT_STABLE |\n View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION |\n View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION |\n View.SYSTEM_UI_FLAG_FULLSCREEN | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY;\n if (currentApiVersion >= Build.VERSION_CODES.KITKAT) {\n getWindow().getDecorView().setSystemUiVisibility(flags);\n final View decorView = getWindow().getDecorView();\n decorView.setOnSystemUiVisibilityChangeListener(new View.OnSystemUiVisibilityChangeListener() {\n @Override\n public void onSystemUiVisibilityChange(int visibility) {\n if ((visibility & View.SYSTEM_UI_FLAG_FULLSCREEN) == 0) {\n decorView.setSystemUiVisibility(flags);\n }\n }\n });\n }\n }",
"private void waitForSplashAnimation(int duration) {\n new Handler().postDelayed(new Runnable() {\n\n @Override\n public void run() {\n clearAndStartActivity(new Intent(SplashActivity.this, MainMenuActivity.class));\n }\n\n }, duration);\n }",
"@Override\n protected void onPause() {\n if (LockscreenReceiver.wasScreenOn){\n finish();\n }\n\n super.onPause();\n }",
"public void onSeamlessRotationTimeout() {\n this.mTmpWindow = null;\n forAllWindows((Consumer<WindowState>) new Consumer() {\n /* class com.android.server.wm.$$Lambda$DisplayContent$vn2WRFHoZv7DB3bbwsmraKDpl0I */\n\n @Override // java.util.function.Consumer\n public final void accept(Object obj) {\n DisplayContent.this.lambda$onSeamlessRotationTimeout$25$DisplayContent((WindowState) obj);\n }\n }, true);\n if (this.mTmpWindow != null) {\n this.mWmService.mWindowPlacerLocked.performSurfacePlacement();\n }\n this.mWmService.handleResumeDispModeChange();\n }",
"public void onDetachedFromWindow() {\n super.onDetachedFromWindow();\n this.mAdjustRelockTimePadLockPresenter.finish();\n }",
"@Override\n\t\t\tpublic boolean queueIdle() {\n\t\t\t\tif (mControlerPopupWindow != null && mVideoView.isShown()) {\n\t\t\t\t\tmControlerPopupWindow.showAtLocation(mVideoView,\n\t\t\t\t\t\t\tGravity.BOTTOM, 0, 0);\n\n\t\t\t\t\tmControlerPopupWindow.update(0, 0, screenWidth,\n\t\t\t\t\t\t\tcontrolViewHeight);\n\n\t\t\t\t\tLog.d(TAG, \"The worker thread id = \"\n\t\t\t\t\t\t\t+ Thread.currentThread().getId() + \"\\n\");\n\t\t\t\t}\n\n\t\t\t\treturn false;\n\t\t\t}",
"public void setFullScreen(){\n\t\trequestWindowFeature(Window.FEATURE_NO_TITLE);\n\t\tgetWindow().setFlags(LayoutParams.FLAG_FULLSCREEN, LayoutParams.FLAG_FULLSCREEN);\n\t}",
"private void asyncInitSurface() {\n\n ViewTreeObserver vto = _gameLayout.getViewTreeObserver();\n vto.addOnGlobalLayoutListener (new ViewTreeObserver.OnGlobalLayoutListener() {\n\n @Override\n public void onGlobalLayout() {\n _gameLayout.getViewTreeObserver().removeOnGlobalLayoutListener(this);\n\n //Log.d(TAG, \"SET SIZES W = \" + width + \" H = \" + height);\n _app.setWindowSize(_gameLayout.getMeasuredWidth(), _gameLayout.getMeasuredHeight());\n\n initSurface();\n }\n });\n }",
"@FXML\n private void handleFullScreen() {\n if (primaryStage.isFullScreen()) {\n primaryStage.setFullScreen(false);\n } else {\n primaryStage.setFullScreen(true);\n }\n }",
"private void fullscreen() {\n Intent intent = DocumentImageFullScreenActivity.newIntent( getContext(), adapter.getItems(), index );\n startActivityForResult(intent, REQUEST_CODE_INDEX);\n }",
"private void tryToFinishActivity() {\n Log.i(TAG, \"[tryToFinishActivity]\");\n finish();\n }",
"private void handleScreenTurnedOff() {\n DejankUtils.startDetectingBlockingIpcs(\"KeyguardUpdateMonitor#handleScreenTurnedOff\");\n Assert.isMainThread();\n this.mHardwareFingerprintUnavailableRetryCount = 0;\n this.mHardwareFaceUnavailableRetryCount = 0;\n for (int i = 0; i < this.mCallbacks.size(); i++) {\n KeyguardUpdateMonitorCallback keyguardUpdateMonitorCallback = this.mCallbacks.get(i).get();\n if (keyguardUpdateMonitorCallback != null) {\n keyguardUpdateMonitorCallback.onScreenTurnedOff();\n }\n }\n DejankUtils.stopDetectingBlockingIpcs(\"KeyguardUpdateMonitor#handleScreenTurnedOff\");\n }",
"@Override\n\tpublic void onClick(View arg0) {\n\t\tmPlayer.setFullscreen(!isFullScreen);\n\t}",
"public void setFullscreen() {\n\n setFullscreen(true);\n }",
"@Override\n public void onAdDismissedFullScreenContent() {\n Log.d(TAG, \"Ad dismissed fullscreen content.\");\n appOpenAd = null;\n isShowingAd = false;\n\n if (hasListeners(AdmobModule.AD_CLOSED)) {\n fireEvent(AdmobModule.AD_CLOSED, new KrollDict());\n }\n\n // load();\n }",
"@Override\n\t\t public void toggledFullscreen(boolean fullscreen)\n\t\t {\n\t\t }",
"public void waitForVideoStop() {\n synchronized (mPlayLock) {\n \t while (mfPlaying) {\n try {\n mPlayLock.wait();\n } catch (InterruptedException ie) {\n \tLog.d(LOG_TAG, \"transition:waitForVideoStop exception \");\n }\n }\n }\n }",
"@Override\n public void onFinish() {\n if (camera == null)\n return;\n\n Camera.Parameters parameters = camera.getParameters();\n parameters.setFocusAreas(null);\n if (supportedFocusModes == null)\n supportedFocusModes = getSupportedFocusModes(parameters);\n if (supportedFocusModes.get(FOCUS_CONTINUOUS_PICTURE)) {\n parameters.setFocusMode(Camera.Parameters.FOCUS_MODE_CONTINUOUS_PICTURE);\n } else if (supportedFocusModes.get(FOCUS_CONTINUOUS_VIDEO)) {\n parameters.setFocusMode(Camera.Parameters.FOCUS_MODE_CONTINUOUS_VIDEO);\n }\n camera.setParameters(parameters);\n }",
"public void notifyFinish() {\n setBackground(getResources().getDrawable(R.drawable.fs_gesture_finish_bg, (Resources.Theme) null));\n this.mTitleView.setVisibility(4);\n this.mSummaryView.setTranslationY(this.mSummaryView.getTranslationX() - 15.0f);\n this.mSummaryView.setText(R.string.fs_gesture_finish);\n this.mSkipView.setVisibility(8);\n }",
"private void onEndGame() {\n Intent intent1 = new Intent(this, MainActivity.class);\n startActivity(intent1);\n finish();\n }",
"final void waitFinished() {\n if (selectionSyncTask != null) {\n selectionSyncTask.waitFinished();\n }\n }",
"private void applyFullscreenWorkaround(AlertDialog dialog) {\n\t\tdialog.getWindow().setFlags(WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE, WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE);\n\t\tdialog.setOnShowListener(x -> dialog.getWindow().clearFlags(WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE));\n\t\tint activitySystemUiVisibility = getActivity().getWindow().getDecorView().getSystemUiVisibility();\n\t\tdialog.getWindow().getDecorView().setSystemUiVisibility(activitySystemUiVisibility);\n\t}",
"@Override\n public void onBackPressed() {\n if (framelayout_id.getVisibility() == View.VISIBLE) {\n // Its visible\n framelayout_id.setVisibility(View.GONE);\n } else {\n // Either gone or invisible\n finish();\n }\n\n }",
"@Override\n protected void end() {\n DemoUtils.fadeOutAndExit(getMainFrame(), 800);\n }",
"@Override\n public void onAdShowedFullScreenContent() {\n Log.d(TAG, \"Ad showed fullscreen content.\");\n if (hasListeners(AdmobModule.AD_SHOWED_FULLSCREEN_CONTENT)) {\n fireEvent(AdmobModule.AD_SHOWED_FULLSCREEN_CONTENT, new KrollDict());\n }\n }",
"protected void end() {\n\t\tRobot.launcher.stopTilt();\n\t\tif (Robot.launcher.getIsTilterAtBottom())\n\t\t\tnew AutoGetStuffIn();\n\t}",
"boolean isActivityFinishing();",
"@SuppressLint(\"NewApi\")\n public void exitByBackKey(){\n PaperSumoView.gamepaused=true;\n dialog = new Dialog(this);\n dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);\n Window window = dialog.getWindow();\n window.setFlags(WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL,\n WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL);\n dialog.setCancelable(false);\n dialog.setContentView(R.layout.pause);\n\n Button exit,resume;\n exit=dialog.findViewById(R.id.bexit);\n\n exit.setOnClickListener(new View.OnClickListener() {\n\n @Override\n public void onClick(View v) {\n // TODO Auto-generated method stub\n System.exit(0);\n }\n });\n resume=dialog.findViewById(R.id.bresume);\n resume.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n PaperSumoView.gamepaused=false;\n dialog.dismiss();\n }\n });\n dialog.show();\n }",
"public void onFinishFetching() {\n\t\t\t\thideLoading();\n\t\t\t\tUiApplication.getUiApplication().invokeLater(new Runnable() {\n\t\t\t\t\t\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\tUiApplication.getUiApplication().pushScreen(new HomeScreen());\n\t\t\t\t\t}\n\t\t\t\t});\t\n\t\t\t}",
"@Override\n public void onCompletion(MediaPlayer mp) {\n mp.release();\n if (!gameOver && !backLayoutVisible) { // Handling the scenario in which user pressed back button while start whistle\n startCountdown(gameDuration, tickTime);\n setFormula();\n vsOverlayView.setClickable(false);\n mainGameView.setClickable(true);\n } else {\n //Countdown stopped because of stopped button\n countDownCouldNotBegin = true;\n }\n }",
"public void finishedWindow() {\n\t\tgameManager.closePiratesEventScreen(this, route);\n\t}",
"private void goToMainScreen() {\n new Handler().postDelayed(new Runnable() {\n @Override\n public void run() {\n Intent mainIntent;\n\n MainActivity act = new MainActivity();\n Intent intent = new Intent(getApplication(), MainActivity.class);\n startActivity(intent);\n finish();\n }\n }, SPLASH_DISPLAY_LENGHT);\n }",
"public void finishActivity() {\r\n if (handler != null)\r\n handler.postDelayed(new Runnable() {\r\n @Override\r\n public void run() {\r\n finish();\r\n }\r\n }, 1000);\r\n\r\n }",
"@Override\r\n\t\t\t\tpublic void onDialogBackPressed() {\n\t\t\t\t\texitVideoPlay();\r\n\t\t\t\t\t// mVideoPlayerHander.sendEmptyMessage(EXIT_VIDEOPLAY);\r\n\t\t\t\t}",
"public void closeCurrentScreen() {\n if (getScreenCount() > 1) {\n fragmentManager.popBackStack();\n screenCount -= 1;\n }\n }",
"public boolean waitUntilClean(Runnable listener) {\n if (!mScreenReady || !mColorFadeReady) {\n mCleanListener = listener;\n return false;\n } else {\n mCleanListener = null;\n return true;\n }\n }",
"@Override\n protected void onPostExecute(Void result) {\n Intent intent = new Intent(game_play.this, user_input.class);\n intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK|Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(intent);\n finish();\n }",
"@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n makeActivityFullScreen();\n setContentView(R.layout.activity_splash);\n }",
"public void onFinishFetching() {\n\t\t\t\thideLoading();\n\t\t\t\tUiApplication.getUiApplication().invokeLater(\n\t\t\t\t\tnew Runnable() {\n\t\t\t\t\t\t\n\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tAlertDialog.showInformMessage(message);\n\t\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t\t// TODO: handle exception\n\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tUiApplication.getUiApplication().pushScreen(new HomeScreen());\n\t\t\t\t\t\t}\n\t\t\t\t\t});\t\t\t\t\n\t\t\t}",
"private void closeActivity() {\n final Handler handler = new Handler(Looper.getMainLooper());\n handler.postDelayed(new Runnable() {\n @Override\n public void run() {\n finish();\n }\n }, 250);\n }",
"public void restoreScreen(){\n\n Window w = vc.getFullScreenWindow();\n if (w != null){\n w.dispose();\n }\n vc.setFullScreenWindow(null);\n }",
"public void waitForDecision(){\n if(gameOver) {\n return;\n }\n if(!decisionActive) {\n try {\n uiWaiting = true;\n synchronized(uiWait) {\n uiWait.wait();\n }\n } catch (Exception e) { logger.log(\"\"+e); }\n }\n }",
"@Override\n public void onBackPressed() {\n if (exit) {\n System.exit(0);\n } else {\n Toast.makeText(this, \"Press Back again to Exit.\",\n Toast.LENGTH_SHORT).show();\n exit = true;\n new Handler().postDelayed(new Runnable() { //3 sn içinde iki defa basıldı mı kontrolu için\n @Override\n public void run() {\n exit = false;\n }\n }, 3 * 1000);\n }\n }",
"void onDetachedFromSurface();",
"public void onBackPressed() {\n if (doubleBackToExitPressedOnce) {\n this.finish();\n super.onBackPressed();\n return;\n }\n\n this.doubleBackToExitPressedOnce = true;\n Toast.makeText(this, \"Please click BACK again to exit the game\", Toast.LENGTH_SHORT).show();\n\n new Handler().postDelayed(new Runnable() {\n\n @Override\n public void run() {\n doubleBackToExitPressedOnce=false;\n }\n }, 2000);\n }",
"@Action\n public final void onJButtonFullscreen() {\n\n final FullscreenImageJFrame frame =\n new FullscreenImageJFrame(\n ImageMediaManagerLogic.getImageBy(this.getLomd()));\n\n SWTGUIApp.getApplication().show(frame);\n\n this.refresh();\n\n }",
"public void onScreenUp() {\n faceUp = true;\n requestForValidationOfQibla();\n }",
"protected void onPreExecute() {\n\t\t\t//Log..d(TAG, \"OnPreExecute'd\");\n\t\t\tif (IS_PAUSING == YES) {\n\t\t\t\tfinish();\n\t\t\t}\n\t\t\tFRAMEBUFFER_IS = BUSY;\n\t\t}",
"@Override\n public void onPositive(MaterialDialog dialog) {\n getWindow().clearFlags(\n WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);\n finish();\n }",
"public void launchEndScreen(boolean won) {\n\t\tnew EndScreen(this, won);\t\n\t}",
"@Override\n\tpublic void onToggleFullScreen() {\n\t\t_isFullScreen = !_isFullScreen;\n\t\tFrameLayout.LayoutParams mNewParams;\n\t\tif(_isFullScreen)\n\t\t{\n\t\t\tmNewParams = new FrameLayout.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);\n\t\t\tmNewParams.gravity = Gravity.TOP | Gravity.LEFT;\n\t\t}else\n\t\t{\n\t\t\tmNewParams = new FrameLayout.LayoutParams(400, 400);\n\t\t\tmNewParams.gravity = Gravity.CENTER_VERTICAL | Gravity.CENTER_HORIZONTAL;\n\t\t}\n\t\t\n\t\t_playerViewConroller.setLayoutParams(mNewParams);\n\t}",
"protected boolean isFinished()\n\t{\n\t\treturn !Robot.oi.respoolWinch.get();\n\t}",
"@Override\r\n public void onGameEnded() {\r\n this.setVisible(true);\r\n }",
"public void toggleFullscreen() {\n if (!isFullscreen) {\n setExtendedState(JFrame.MAXIMIZED_BOTH);\n } else {\n setExtendedState(JFrame.NORMAL);\n }\n isFullscreen = !isFullscreen;\n }",
"@Override\n public final void onGuiClosed() {\n\t\tKeyboard.enableRepeatEvents(false);\n\t\t\n\t\tif(behindScreen != null) {\n\t\t\tTaleCraft.proxy.asClient().sheduleClientTickTask(new Runnable() {\n\t\t\t\t@Override public void run() {\n\t\t\t\t\tmc.displayGuiScreen(behindScreen);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\t\n }",
"public void setFullScreen() {\r\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {\r\n Window window = getWindow();\r\n window.clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS\r\n | WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION);\r\n window.getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN\r\n | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION\r\n | View.SYSTEM_UI_FLAG_LAYOUT_STABLE);\r\n window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);\r\n window.setStatusBarColor(Color.TRANSPARENT);\r\n window.setNavigationBarColor(Color.TRANSPARENT);\r\n }\r\n }",
"public void loadScreen() {\n Intent intent = new Intent(this, DataCapture.class);\n intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK);\n startActivity(intent);\n finish();\n System.exit(0);\n\n }",
"public void onBackPressed() {\r\n \t\r\n \tScreen screen = this.getCurrentScreen();\r\n \tString screenName = screen.getClass().getName();\r\n \t\r\n \t// if we are \"inGame\"\r\n \tif (screenName.endsWith(\"GameScreen\")) {\r\n \t\t\r\n \t\tGameScreen gameScreen = (GameScreen)screen;\r\n \t\t\r\n \t\tif (gameScreen.demoParser != null) {\r\n \t\t\t\r\n \t\t\tthis.finish();\r\n \t \tthis.overridePendingTransition(0, 0);\r\n \t\t}\r\n \t\t\r\n \t\t// restart the race\r\n \t\telse if (gameScreen.map.inRace() || gameScreen.map.raceFinished()) {\r\n \t\t\r\n \t\t\tif (!gameScreen.map.inFinishSequence) {\r\n \t\t\t\t\r\n \t\t\t\tgameScreen.state = GameState.Running;\r\n \t\t\t\tgameScreen.map.restartRace(gameScreen.player);\r\n \t\t\t}\r\n \t\t\t\r\n \t\t// return to maps menu\r\n \t\t} else {\r\n \t\t\t\r\n \t\t\tthis.glView.queueEvent(new Runnable() {\r\n \r\n public void run() {\r\n \r\n \tRacesow.this.setScreen(new MapsScreen(Racesow.this));\r\n }\r\n });\r\n \t\t}\r\n \t\r\n \t// return to main menu\r\n \t} else if (screenName.endsWith(\"MapsScreen\")) {\r\n \t\t\r\n \t\t\tthis.glView.queueEvent(new Runnable() {\r\n \r\n public void run() {\r\n \r\n \tRacesow.this.setScreen(Racesow.this.getStartScreen());\r\n }\r\n });\r\n \t\r\n \t\t// quit the application\r\n \t} else if (screenName.endsWith(\"LoadingScreen\")) {\r\n \t\t\r\n \t\t// if no demo is loading we come from the mapsScreen\r\n \t\tif (((LoadingScreen)screen).demoFile == null) {\r\n \t\t\t\r\n \t\t\t\tthis.glView.queueEvent(new Runnable() {\r\n \t\r\n \t public void run() {\r\n \t \r\n \t \tRacesow.this.setScreen(new MapsScreen(Racesow.this));\r\n \t }\r\n \t });\r\n \t\t\t\r\n \t\t\t// if a demoFile is loading, quit the activity\r\n \t\t\t// as it was started additionally to the main instance.\r\n \t\t\t// will return to the previous activity = DemoList\r\n \t\t} else {\r\n \t\t\t\t\t\r\n \t\t\tthis.finish();\r\n \tthis.overridePendingTransition(0, 0);\r\n \t\t}\r\n \t\r\n \t\t// quit the application\r\n \t} else {\r\n \t\t\r\n \t\tthis.finish();\r\n \tthis.overridePendingTransition(0, 0);\r\n \t\r\n \tAudio.getInstance().stopThread();\r\n \t\r\n \t// If I decide to not kill the process anymore, don't\r\n \t// forget to restart the SoundThread and set this flag\r\n \t// LOOPER_PREPARED = false;\r\n \tProcess.killProcess(Process.myPid());\r\n \t}\r\n }",
"public void waitForUserClick(Player player){\n Log.d(getClass().toString(),\"wait for user click???\");\n }",
"@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)\n @Override\n public void onFinish() {\n textViewInput.setVisibility(View.INVISIBLE);\n buttonStartTime.setVisibility(View.VISIBLE);\n mProgressBar.setVisibility(View.VISIBLE);\n mProgressBar1.setVisibility(View.GONE);\n textViewInput.setText(\"\");\n textViewShuffle.setText(givenWord);\n buttonBuyTime.setVisibility(View.INVISIBLE);\n\n //put the new score into highScore list (if suitable)\n\n SharedPreferences preferences = getSharedPreferences(\"TIME_PREFS\", 0);\n SharedPreferences.Editor editor = preferences.edit();\n editor.putInt(\"latestscore\", score);\n editor.apply();\n\n //Hide the soft keyboard when timer finishes\n// textViewInput.onEditorAction(EditorInfo.IME_ACTION_DONE);\n\n closeKeyboard();\n\n }",
"private void pressBack() {\n mActivityTestRule.waitForActivityNativeInitializationComplete();\n TestThreadUtils.runOnUiThreadBlocking(\n () -> mActivityTestRule.getActivity().onBackPressed());\n }",
"@SuppressLint(\"InlinedApi\")\n @Override\n public void run() {\n int flags = View.SYSTEM_UI_FLAG_LOW_PROFILE\n | View.SYSTEM_UI_FLAG_FULLSCREEN\n | View.SYSTEM_UI_FLAG_LAYOUT_STABLE\n | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY\n | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION\n | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION;\n\n Activity activity = getActivity();\n if (activity != null\n && activity.getWindow() != null) {\n activity.getWindow().getDecorView().setSystemUiVisibility(flags);\n }\n ActionBar actionBar = getSupportActionBar();\n if (actionBar != null) {\n actionBar.hide();\n }\n\n }",
"@Override\n public void endActionMode() {\n if (mActionMode != null) {\n mActionMode.finish();\n }\n }",
"protected void onExit() {\r\n\t\tnew DelayAsyncTask(this, 500).execute();\r\n\t}",
"private void onFullyLoaded() {\n info(\"onFullyLoaded()\");\n cancelProgress();\n\n //Fully loaded, start detection.\n ZiapApplication.getInstance().startDetection();\n\n Intent intent = new Intent(LoadingActivity.this, MainActivity.class);\n if (getIntent().getStringExtra(\"testname\") != null)\n intent.putExtra(\"testname\", getIntent().getStringExtra(\"testname\"));\n startActivity(intent);\n finish();\n }",
"public void awaitDone() {\n try {\n // Wait until the CountDownLatch reaches 0.\n mExitBarrier.await();\n } catch(java.lang.InterruptedException e) {\n errorLog(\"PlatformStrategyAndroid\",\n e.getMessage());\n }\n }",
"@Override\n public void run() {\n thisActivity.setResult(FROM_LOADINGSCREEN_NO_ADS_FOUND);\n thisActivity.finish();\n }",
"public void onFinish() {\n if (!this.finished) {\n this.finished = true;\n if (this.isReply) {\n this.popupMessages.clear();\n }\n for (int i = 0; i < 3; i++) {\n NotificationCenter.getInstance(i).removeObserver(this, NotificationCenter.appDidLogout);\n NotificationCenter.getInstance(i).removeObserver(this, NotificationCenter.updateInterfaces);\n NotificationCenter.getInstance(i).removeObserver(this, NotificationCenter.messagePlayingProgressDidChanged);\n NotificationCenter.getInstance(i).removeObserver(this, NotificationCenter.messagePlayingDidReset);\n NotificationCenter.getInstance(i).removeObserver(this, NotificationCenter.contactsDidLoad);\n }\n NotificationCenter.getGlobalInstance().removeObserver(this, NotificationCenter.pushMessagesUpdated);\n NotificationCenter.getGlobalInstance().removeObserver(this, NotificationCenter.emojiLoaded);\n ChatActivityEnterView chatActivityEnterView2 = this.chatActivityEnterView;\n if (chatActivityEnterView2 != null) {\n chatActivityEnterView2.onDestroy();\n }\n if (this.wakeLock.isHeld()) {\n this.wakeLock.release();\n }\n }\n }",
"private void doFadeCompleted() {\r\n\t\tif (onStarmapClicked != null) {\r\n\t\t\tonStarmapClicked.invoke();\r\n\t\t}\r\n\t\tdarkness = 0f;\r\n\t}",
"private void setUpFullScreen() {\n final ImageView expandButton = findViewById(R.id.expand);\n expandButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n RelativeLayout mapParent = findViewById(R.id.map_parent);\n ConstraintLayout.LayoutParams layoutParams = (ConstraintLayout.LayoutParams) mapParent.getLayoutParams();\n ProgressBar progressBar = findViewById(R.id.progress);\n\n ConstraintLayout constraintLayout = findViewById(R.id.constraint_layout);\n ConstraintSet constraintSet = new ConstraintSet();\n constraintSet.clone(constraintLayout);\n\n\n if (!inFullScreenMode) {\n constraintSet.connect(R.id.map_parent, ConstraintSet.TOP, R.id.constraint_layout, ConstraintSet.TOP, 0);\n constraintSet.connect(R.id.map_parent, ConstraintSet.BOTTOM, R.id.constraint_layout, ConstraintSet.BOTTOM, 0);\n constraintSet.applyTo(constraintLayout);\n\n layoutParams.height = ViewGroup.LayoutParams.MATCH_PARENT;\n layoutParams.setMarginStart(0);\n layoutParams.setMarginEnd(0);\n expandButton.setImageResource(R.drawable.ic_exit);\n\n inFullScreenMode = true;\n } else {\n constraintSet.connect(R.id.map_parent, ConstraintSet.TOP, R.id.textView, ConstraintSet.BOTTOM, 0);\n constraintSet.connect(R.id.map_parent, ConstraintSet.BOTTOM, R.id.progress, ConstraintSet.TOP, 0);\n constraintSet.applyTo(constraintLayout);\n\n layoutParams.height = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 250, getResources().getDisplayMetrics());\n\n int margin = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 16, getResources().getDisplayMetrics());\n layoutParams.setMarginStart(margin);\n layoutParams.setMarginEnd(margin);\n expandButton.setImageResource(R.drawable.ic_expand);\n inFullScreenMode = false;\n }\n\n mapParent.setLayoutParams(layoutParams);\n }\n });\n }",
"private void WaitTalk() {\n // to restart as touched screen.\n if (this.mRestartF) this.RestartTalk();\n }",
"public void onComplete() {\n\t\t\tif (mPlayStauts) {\n\t\t\t\tmHandler.sendEmptyMessage(MESSAGE_PLAY_NEXT);\n\n\t\t\t\ttry {\n\t\t\t\t\tdismissNotSupprot();\n\t\t\t\t} catch (Exception ex) {\n\t\t\t\t\t// ignore the exception\n\t\t\t\t\tex.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\n\t\t}",
"public void loadTryScreen() {\n Intent intent = new Intent(this, TryActivity.class);\n intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK);\n startActivity(intent);\n finish();\n System.exit(0);\n\n }",
"public void updateScreen() {\r\n\t\tsuper.updateScreen();\r\n\r\n\t\tif (!this.mc.thePlayer.isEntityAlive() || this.mc.thePlayer.isDead) {\r\n\t\t\tthis.mc.thePlayer.closeScreen();\r\n\t\t}\r\n\t}",
"@Override\n public boolean onBackPressed() {\n if (doubleBackToExitPressedOnce) {\n requireActivity().finishAffinity();\n System.exit(0);\n }\n\n this.doubleBackToExitPressedOnce = true;\n Toast.makeText(requireActivity(), \"Please click BACK again to exit\", Toast.LENGTH_SHORT).show();\n\n new Handler().postDelayed(new Runnable() {\n\n @Override\n public void run() {\n doubleBackToExitPressedOnce = false;\n }\n }, 2000);\n return true;\n }",
"@JavascriptInterface\n public void finish() {\n OBLogger.e(\"CLOSRE WINDOW\");\n ((Activity) mContext).finish();\n }",
"public void graceFullyExit() {\n Log.e(\"NET\", \"No network.\");\n final AlertDialog.Builder myBuild = new AlertDialog.Builder(Start.this);\n myBuild.setTitle(R.string.noNetworkTitle);\n myBuild.setMessage(R.string.noNetworkText);\n myBuild.setNeutralButton(\"OK\", new DialogInterface.OnClickListener() {\n\n\n public void onClick(DialogInterface dialog, int which) {\n Log.i(\"Start\", \"Kommit hit\");\n finish();\n }\n });\n myBuild.show();\n }",
"@Override\n public void surfaceDestroyed(SurfaceHolder holder)\n {\n // ensure that thread terminates properly\n boolean retry = true;\n gameThread.setRunning(false); // terminate gameThread\n\n while (retry)\n {\n try\n {\n gameThread.join(); // wait for gameThread to finish\n retry = false;\n }\n catch (InterruptedException e)\n {\n Log.e(TAG, \"Thread interrupted\", e);\n }\n }\n }",
"@Override\r\n\tprotected void done() {\r\n\t\ttry {\r\n\t\t\tthis.get();\r\n\r\n\t\t\tRunnable run = new Runnable() {\r\n\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic void run() {\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tMainFrame mf = GUITools.getMainFrame();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// try to restore the window at the last location\r\n\t\t\t\t\t\tPropertyManager pm = PropertyManager.getManager(mf);\r\n\t\t\t\t\t\tProperties p = pm.read();\r\n\t\t\t\t\t\t// first run, write default values\r\n\t\t\t\t\t\tif (p.isEmpty()){\r\n\t\t\t\t\t\t\tDimension dimScreen = Toolkit.getDefaultToolkit().getScreenSize();\r\n\t\t\t\t\t\t\tint width = (int) dimScreen.getWidth() / 9 * 8;\r\n\t\t\t\t\t\t\tint height = (int) dimScreen.getHeight() / 9 * 8;\r\n\t\t\t\t\t\t\tmf.setLocation(width / 9 * 1 / 2, height / 9 * 1 / 3);\r\n\t\t\t\t\t\t\tmf.setPreferredSize(new Dimension(width, height));\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tp.setProperty(\"loc_x\", String.valueOf(mf.getLocation().x));\r\n\t\t\t\t\t\t\tp.setProperty(\"loc_y\", String.valueOf(mf.getLocation().y));\r\n\t\t\t\t\t\t\tp.setProperty(\"width\", String.valueOf(width));\r\n\t\t\t\t\t\t\tp.setProperty(\"height\", String.valueOf(height));\r\n\t\t\t\t\t\t\tp.setProperty(\"extendedState\", String.valueOf(JFrame.MAXIMIZED_BOTH));\r\n\t\t\t\t\t\t\tpm.write();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tmf.setVisible(true);\r\n\t\t\t\t\t\t// start like last time\r\n\t\t\t\t\t\tmf.setLocation(new Point(Integer.valueOf(p.getProperty(\"loc_x\")), Integer.valueOf(p.getProperty(\"loc_y\")))); \r\n\t\t\t\t\t\tmf.setSize(Integer.valueOf(p.getProperty(\"width\")), Integer.valueOf(p.getProperty(\"height\")));\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif (Integer.valueOf(p.getProperty(\"extendedState\")) != JFrame.MAXIMIZED_BOTH){\r\n\t\t\t\t\t\t\tmf.setExtendedState(JFrame.NORMAL);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} catch (Exception e) {\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t};\r\n\t\t\t// finally display (from EDT)\r\n\t\t\tSwingUtilities.invokeLater(run);\r\n\r\n\t\t\tSystem.gc();\r\n\r\n\t\t} catch (InterruptedException e1) {\r\n\t\t\tSystem.out.println(\"IQM Fatal: \"+ e1);\r\n\t\t\tDialogUtil.getInstance().showErrorMessage(null, e1, true);\r\n\t\t\tSystem.exit(-1);\r\n\t\t} catch (ExecutionException e1) {\r\n\t\t\tSystem.out.println(\"IQM Fatal: \"+ e1);\r\n\t\t\tDialogUtil.getInstance().showErrorMessage(null, e1, true);\r\n\t\t\tSystem.exit(-1);\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.out.println(\"IQM Fatal: \"+ e);\r\n\t\t\tDialogUtil.getInstance().showErrorMessage(null, e, true);\r\n\t\t\tSystem.exit(-1);\r\n\t\t}\r\n\t}",
"public boolean checkWaitingForWindows() {\n this.mHaveBootMsg = false;\n this.mHaveApp = false;\n this.mHaveWallpaper = false;\n this.mHaveKeyguard = true;\n if (getWindow(new Predicate() {\n /* class com.android.server.wm.$$Lambda$DisplayContent$BgTlvHbVclnASzMrvERWxyMVA */\n\n @Override // java.util.function.Predicate\n public final boolean test(Object obj) {\n return DisplayContent.this.lambda$checkWaitingForWindows$20$DisplayContent((WindowState) obj);\n }\n }) != null) {\n return true;\n }\n boolean wallpaperEnabled = this.mWmService.mContext.getResources().getBoolean(17891452) && this.mWmService.mContext.getResources().getBoolean(17891393) && !this.mWmService.mOnlyCore;\n if (WindowManagerDebugConfig.DEBUG_SCREEN_ON) {\n Slog.i(TAG, \"******** booted=\" + this.mWmService.mSystemBooted + \" msg=\" + this.mWmService.mShowingBootMessages + \" haveBoot=\" + this.mHaveBootMsg + \" haveApp=\" + this.mHaveApp + \" haveWall=\" + this.mHaveWallpaper + \" wallEnabled=\" + wallpaperEnabled + \" haveKeyguard=\" + this.mHaveKeyguard);\n }\n if (!this.mWmService.mSystemBooted && !this.mHaveBootMsg) {\n return true;\n }\n if (!this.mWmService.mSystemBooted || ((this.mHaveApp || this.mHaveKeyguard) && (!wallpaperEnabled || this.mHaveWallpaper))) {\n return false;\n }\n return true;\n }",
"private void SplashScreen() {\n// if (!mSettings.getBoolean(\"PlayedBefore\", false)) {\n// mSolitaireView.DisplaySplash();\n// }\n splas.setVisibility(View.VISIBLE);\n Handler h = new Handler(Looper.getMainLooper());\n h.postDelayed(new Runnable() {\n @Override\n public void run() {\n splas.setVisibility(View.GONE);\n }\n }, 3000);\n }",
"public static void destroyFullScreenWindow() {\n GraphicsEnvironment env = GraphicsEnvironment\n .getLocalGraphicsEnvironment();\n GraphicsDevice device = env.getDefaultScreenDevice();\n device.setFullScreenWindow(null);\n }",
"@SuppressLint(\"InlinedApi\")\n @Override\n public void run() {\n gameBoard.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE\n | View.SYSTEM_UI_FLAG_FULLSCREEN\n | View.SYSTEM_UI_FLAG_LAYOUT_STABLE\n | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY\n | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION\n | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);\n\n calculateConstants();\n }",
"@Override \r\n public void run() {\n \r\n try {\r\n\t\t\t\t\t\t\tThread.sleep(5000);\r\n\t\t\t\t\t\t\tWaitDialogs.this.dialog.dispose(); \r\n\t\t\t\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t}\r\n \r\n \r\n }"
] | [
"0.6398943",
"0.62413037",
"0.62304837",
"0.6128587",
"0.6084475",
"0.60552883",
"0.6007458",
"0.58792406",
"0.5845535",
"0.5830195",
"0.5813953",
"0.58095056",
"0.57829034",
"0.57654065",
"0.5763371",
"0.5754397",
"0.5732677",
"0.5709443",
"0.5700788",
"0.56925195",
"0.5677163",
"0.56730264",
"0.565029",
"0.564374",
"0.5616081",
"0.5605654",
"0.5602594",
"0.56023985",
"0.56021297",
"0.5598169",
"0.559228",
"0.5576584",
"0.5571394",
"0.55598974",
"0.5545573",
"0.5532837",
"0.5527685",
"0.55196947",
"0.551415",
"0.55126965",
"0.55018795",
"0.5490676",
"0.5479625",
"0.54669696",
"0.54562265",
"0.5450996",
"0.54408497",
"0.54282403",
"0.54170114",
"0.5414587",
"0.5413553",
"0.5404166",
"0.5401099",
"0.538729",
"0.5383043",
"0.5380323",
"0.5378209",
"0.5376575",
"0.5373173",
"0.5372617",
"0.5366631",
"0.5364487",
"0.53511757",
"0.534399",
"0.5340337",
"0.5339048",
"0.5333658",
"0.5323345",
"0.5320925",
"0.53100616",
"0.53098965",
"0.5309013",
"0.53062636",
"0.5299417",
"0.52905",
"0.52878803",
"0.52843094",
"0.5283592",
"0.5278162",
"0.52763516",
"0.5276283",
"0.5274142",
"0.5272672",
"0.5262108",
"0.52561796",
"0.52537125",
"0.5252974",
"0.5243748",
"0.5240254",
"0.523692",
"0.52363104",
"0.5234954",
"0.52301824",
"0.522379",
"0.5219567",
"0.52194595",
"0.5218986",
"0.5217171",
"0.5213201",
"0.5210266"
] | 0.78165597 | 0 |
/ Methods to set how drawn | public void updateHoverNode(MapNode _hoverNode) {
hoverNode = _hoverNode;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void draw() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void draw() {\n\t\t\r\n\t}",
"@Override\r\n public void draw() {\n }",
"@Override\n\tpublic void draw() {\n\n\t}",
"@Override\n\tpublic void draw() {\n\n\t}",
"@Override\n\tpublic void draw() {\n\t\t\n\t}",
"@Override\n\tpublic void draw() {\n\t\t\n\t}",
"@Override\n public void draw()\n {\n }",
"@Override\n\tpublic void draw() {\n\t}",
"@Override\n public void draw() {\n }",
"@Override\n public void draw(GraphicsContext gc, int sides){}",
"public void setPaintMode()\r\n\t{\r\n\t\t// System.out.println(\"setPaintMode\");\r\n\t}",
"@Override\r\n\tprotected void onDraw() {\n\t\t\r\n\t}",
"public void draw() {\n \n // TODO\n }",
"private void init(){\n\n paint.setStyle(Paint.Style.STROKE);\n paint.setStrokeWidth(3);\n paint.setColor(Color.BLACK);\n paint.setTextSize(25);\n firstDraw = true;\n }",
"public void draw() {\n \n }",
"public void draw() {\n }",
"public void draw(){\n }",
"@Override\n\tpublic void setPaint() {\n\t\tisPaint = true;\n\t}",
"@Override\r\n public void draw()\r\n {\n\r\n }",
"public void setDrawn(boolean b);",
"public void draw() {\n\n }",
"public void draw()\r\n {\r\n drawn = true;\r\n }",
"public void beginDrawing();",
"protected abstract void draw();",
"public void draw() {\n\t\tsuper.repaint();\n\t}",
"@Override\n\tpublic void draw() {\n\t\tSystem.out.println(\"绘制矩形\");\n\t\t\n\t}",
"public void draw() {\n StdDraw.clear();\n StdDraw.setPenColor(StdDraw.BLACK);\n StdDraw.setXscale(-drawLength * 0.1, drawLength * 1.2);\n StdDraw.setYscale(-drawLength * 0.65, drawLength * 0.65);\n StdDraw.line(0, 0, drawLength, 0);\n StdDraw.text(-drawLength * 0.05, 0, \"0\");\n StdDraw.text(drawLength * 1.1, 0, Integer.toString(size()));\n }",
"@Override\n\tpublic void draw(Graphics canvas) {}",
"@Override\r\n\tpublic void draw() {\n\t\tdecoratedShape.draw();\r\n\t\tsetRedBorder(decoratedShape);\r\n\t}",
"public void draw();",
"public void draw();",
"public void draw();",
"private void setupDrawing(){\n brushSize = 1;\n lastBrushSize = brushSize;\n drawPath = new Path();\n drawPaint = new Paint();\n drawPaint.setColor(paintColor);\n drawPaint.setAntiAlias(true);\n drawPaint.setStrokeWidth(brushSize);\n drawPaint.setStyle(Paint.Style.STROKE);\n drawPaint.setStrokeJoin(Paint.Join.ROUND);\n drawPaint.setStrokeCap(Paint.Cap.ROUND);\n canvasPaint = new Paint(Paint.DITHER_FLAG);\n }",
"@Override\r\n\tprotected void onDraw(LRenderSystem rs) {\n\r\n\t}",
"@Override\n\tpublic void draw1() {\n\n\t}",
"@Override\n\tpublic void draw() {\n\t\tdecoratedShape.draw();\n\t}",
"@Override\n\tpublic void redraw() {\n\t\t\n\t}",
"public Shapes draw ( );",
"void reDraw();",
"@Override\n\tpublic void draw() {\n\t\tSystem.out.println(\"绘制五角形\");\n\t}",
"private void showDraw() {\n StdDraw.show(0);\n // reset the pen radius\n StdDraw.setPenRadius();\n }",
"public void draw() {\n\t\tp.pushStyle();\n\t\t{\n\t\t\tp.rectMode(PConstants.CORNER);\n\t\t\tp.fill(360, 0, 70, 180);\n\t\t\tp.rect(60f, 50f, p.width - 110f, p.height * 2f * 0.33f - 50f);\n\t\t\tp.rect(60f, p.height * 2f * 0.33f + 50f, p.width - 110f, p.height * 0.33f - 130f);\n\t\t}\n\t\tp.popStyle();\n\n\t\tlineChart.draw(40f, 40f, p.width - 80f, p.height * 2f * 0.33f - 30f);\n\t\tlineChart2.draw(40f, p.height * 2f * 0.33f + 45f, p.width - 80f, p.height * 0.33f - 110f);\n\t\t//p.line(x1, y1, x2, y2);\n\n\t}",
"public abstract void draw( );",
"public void draw()\n {\n myPencil.up();\n myPencil.backward(100);\n myPencil.down();\n myPencil.turnRight(90);\n myPencil.forward(200);\n myPencil.turnLeft(90);\n myPencil.forward(200);\n myPencil.turnLeft(90);\n myPencil.forward(400);\n myPencil.turnLeft(90);\n myPencil.forward(200);\n myPencil.turnLeft(90);\n myPencil.forward(200);\n // Roof\n myPencil.up();\n myPencil.move(0,200);\n myPencil.down();\n myPencil.setDirection(333.435);\n myPencil.forward(223.607);\n myPencil.setColor(new Color(2, 0, 0));\n myPencil.up();\n myPencil.move(0,200);\n myPencil.setDirection(206.565);\n myPencil.down();\n myPencil.forward(223.607);\n // Windows\n myPencil.up();\n myPencil.move(-150,0);\n myPencil.setDirection(0);\n myPencil.down();\n myPencil.forward(75);\n myPencil.turnLeft(90);\n myPencil.forward(75);\n myPencil.turnLeft(90);\n myPencil.forward(75);\n myPencil.turnLeft(90);\n myPencil.forward(75);\n myPencil.up();\n myPencil.move(75,0);\n myPencil.setDirection(0);\n myPencil.down();\n myPencil.forward(75);\n myPencil.turnLeft(90);\n myPencil.forward(75);\n myPencil.turnLeft(90);\n myPencil.forward(75);\n myPencil.turnLeft(90);\n myPencil.forward(75);\n myPencil.up();\n myPencil.move(-50,-100);\n myPencil.setDirection(0);\n myPencil.down();\n myPencil.forward(75);\n myPencil.turnLeft(90);\n myPencil.forward(100);\n myPencil.turnLeft(90);\n myPencil.forward(50);\n myPencil.turnLeft(90);\n myPencil.forward(100);\n myPencil.up();\n myPencil.move(-50,-100);\n myPencil.setDirection(60);\n myPencil.down();\n myPencil.backward(150);\n myPencil.up();\n myPencil.move(50,-100);\n myPencil.setDirection(120);\n myPencil.down();\n myPencil.backward(150);\n myPencil.up();\n myPencil.move(150,-150);\n myPencil.down();\n myPencil.drawCircle(25);\n myPencil.up();\n myPencil.move(-150,-150);\n myPencil.down();\n myPencil.drawCircle(25);\n myPencil.up();\n myPencil.move(-150,-175);\n myPencil.setDirection(90);\n myPencil.down();\n myPencil.backward(20);\n myPencil.up();\n myPencil.move(150,-175);\n myPencil.setDirection(90);\n myPencil.down();\n myPencil.backward(20);\n myPencil.up();\n myPencil.move(-150,37.5);\n myPencil.setDirection(0);\n myPencil.down();\n myPencil.forward(75);\n myPencil.up();\n myPencil.move(75,37.5);\n myPencil.setDirection(0);\n myPencil.down();\n myPencil.forward(75);\n myPencil.up();\n myPencil.move(-112.5,0);\n myPencil.setDirection(90);\n myPencil.down();\n myPencil.forward(75);\n myPencil.up();\n myPencil.move(112.5,0);\n myPencil.setDirection(90);\n myPencil.down();\n myPencil.forward(75);\n // House Sidewalk\n myPencil.up();\n myPencil.move(-250,-112.5);\n myPencil.setDirection(0);\n myPencil.down();\n myPencil.forward(192.5);\n myPencil.up();\n myPencil.move(250,-112.5);\n myPencil.setDirection(180);\n myPencil.down();\n myPencil.forward(192.5);\n myPencil.up();\n myPencil.move(-250,-100);\n myPencil.setDirection(0);\n myPencil.down();\n myPencil.forward(90);\n myPencil.forward(193);\n myPencil.up();\n myPencil.move(250,-100);\n myPencil.setDirection(180);\n myPencil.down();\n myPencil.forward(90);\n myPencil.up();\n myPencil.move(-75,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(-100,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(-125,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(-150,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(-175,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(-200,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(-225,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(-250,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(75,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(100,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(125,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(150,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(175,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(200,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(225,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(250,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n // Chimney\n myPencil.up();\n myPencil.move(125,190);\n myPencil.setDirection(270);\n myPencil.down();\n myPencil.forward(52);\n myPencil.up();\n myPencil.move(100,190);\n myPencil.setDirection(270);\n myPencil.down();\n myPencil.forward(40);\n myPencil.up();\n myPencil.move(100,190);\n myPencil.setDirection(0);\n myPencil.down();\n myPencil.forward(25);\n // Door window\n myPencil.up();\n myPencil.move(0,-25);\n myPencil.setDirection(0);\n myPencil.down();\n myPencil.drawCircle(8);\n myPencil.up();\n myPencil.move(-8,-25);\n myPencil.setDirection(0);\n myPencil.down();\n myPencil.forward(16);\n myPencil.up();\n myPencil.move(0,-17);\n myPencil.setDirection(270);\n myPencil.down();\n myPencil.forward(16);\n // Door knob\n myPencil.up();\n myPencil.move(14,-55);\n myPencil.setDirection(0);\n myPencil.down();\n myPencil.drawCircle(2);\n }",
"@Override\n\tpublic void draw() {\n\t\tSystem.out.println(\"绘制三角形\");\t\n\t}",
"void draw() {\n\t\tSystem.out.println(\"Drawing the Rectange...\");\n\t\t}",
"public void draw(){\n super.repaint();\n }",
"@Override\n protected void paint2d(Graphics2D g) {\n \n }",
"@Override public void draw(){\n // this take care of applying all styles (colors/stroke)\n super.draw();\n // draw our shape\n pg.ellipseMode(PGraphics.CORNER); // TODO: make configurable\n pg.ellipse(0,0,getSize().x,getSize().y);\n }",
"@Override\n\tpublic void draw(Canvas canvas) {\n\t\t\n\t}",
"public void drawOn(Graphics g);",
"@Override\n\tpublic void draw(Canvas canvas) {\n\n\t}",
"@Override\n protected final void setGraphics() {\n super.setGraphics();\n Graphics g = toDraw.getGraphics();\n g.setColor(Color.BLACK); \n \n for (int i = 0; i < choices.size(); i++) { \n g.drawString(choices.get(i).getValue(), wGap, (i + 1) * hItemBox);\n }\n }",
"protected void setDrawing(boolean drawing) {\n\tmDrawing = drawing;\n}",
"public abstract void draw();",
"public abstract void draw();",
"public abstract void draw();",
"public void draw() {\r\n\t\tbackground(255); // Clear the screen with a white background\r\n\r\n\t\ttextSize(12);\r\n\t\tfill(0);\r\n\r\n\t\tstroke(0);\r\n\t\tcurve.draw(this);\r\n\t}",
"@Override\r\n protected void changeDraw(int additionalDraw){\r\n int old_draw = this.getDraw();\r\n this.draw = this.draw + additionalDraw;\r\n if (isOn){\r\n if (this.getDraw() > limit) {\r\n Reporter.report(this, Reporter.Msg.BLOWN, this.getDraw());\r\n isOn = false;\r\n Reporter.report(this, Reporter.Msg.SWITCHING_OFF);\r\n this.getSource().changeDraw(-old_draw);\r\n\r\n //Might have to switch these report statements\r\n isEngaged = false;\r\n disengageLoads();\r\n return;\r\n }\r\n Reporter.report(this, Reporter.Msg.DRAW_CHANGE, additionalDraw);\r\n if (this.source != null) { //I changed this from this.getSource() -> this.source\r\n this.source.changeDraw(additionalDraw);\r\n\r\n }\r\n }\r\n\r\n }",
"@Override\n public void updateDrawState(TextPaint ds) {\n }",
"@Override\r\n\tpublic void withDraw(int x) {\n\t\t\r\n\t}",
"@Override\n\tpublic void draw(Graphics g) {\n\t\t\n\t}",
"@Override\n\tpublic void draw(Graphics g) {\n\t\t\n\t}",
"public void draw() {\n final int columns = (int) (2 * Math.ceil(Math.max(-minx, maxx)));\n final int rows = (int) (2 * Math.ceil(Math.max(-miny, maxy)));\n\n final int drawColumns;\n final int drawRows;\n drawColumns = drawRows = Math.max(columns, rows);\n\n double leftOffsetPx = BORDER;\n double rightOffsetPx = BORDER;\n double topOffsetPx = BORDER;\n double bottomOffsetPx = BORDER;\n\n final double availableWidth = view.getWidth() - leftOffsetPx - rightOffsetPx;\n final double availableHeight = view.getHeight() - topOffsetPx - bottomOffsetPx;\n\n final double drawWidth;\n final double drawHeight;\n drawWidth = drawHeight = Math.min(availableWidth, availableHeight);\n\n leftOffsetPx = rightOffsetPx = (view.getWidth() - drawWidth) / 2;\n topOffsetPx = bottomOffsetPx = (view.getHeight() - drawHeight) / 2;\n\n // Adjust for aspect ratio\n columnWidth = rowHeight = drawHeight / columns;\n\n centerX = (drawColumns / 2.0) * columnWidth + leftOffsetPx;\n centerY = (drawRows / 2.0) * rowHeight + topOffsetPx;\n\n drawVerticalLine((float) centerX, topOffsetPx, bottomOffsetPx);\n drawHorizontalLine((float) centerY, leftOffsetPx, rightOffsetPx);\n\n int yTick = (int) (-drawRows / 2.0 / TICK_INTERVAL) * TICK_INTERVAL;\n while (yTick <= drawRows / 2.0) {\n if (yTick != 0) {\n final String label = yTick % (TICK_INTERVAL * 2) == 0 ? String.format(\"%d\", yTick) : null;\n drawYTick(-yTick * rowHeight + centerY, centerX, label);\n }\n yTick += TICK_INTERVAL;\n }\n\n int xTick = (int) (-drawColumns / 2.0 / TICK_INTERVAL) * TICK_INTERVAL;\n while (xTick <= drawColumns / 2.0) {\n if (xTick != 0) {\n final String label = xTick % (TICK_INTERVAL * 2) == 0 ? String.format(\"%d\", xTick) : null;\n drawXTick(xTick * columnWidth + centerX, centerY, label);\n }\n xTick += TICK_INTERVAL;\n }\n\n double adaptiveTextSize = getAdaptiveTextSize();\n\n final Paint paint = new Paint();\n final float textSize = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_SP, (float)adaptiveTextSize, view.getResources().getDisplayMetrics());\n paint.setTextSize(textSize);\n paint.setTypeface(Typeface.create(Typeface.MONOSPACE, Typeface.NORMAL));\n for (Entry entry : data.getEntries()) {\n final double x = entry.getX();\n final double y = entry.getY();\n\n final double xDraw = x * columnWidth + centerX;\n final double yDraw = -y * rowHeight + centerY;\n\n CharSequence dispStr = entry.getStringLabel();\n if (dispStr == null) {\n dispStr = String.format(\"%.0f\", entry.getValue());\n }\n\n\n\n\n Rect bounds = getTextRectBounds(dispStr, paint);\n int textHeight = bounds.height();\n int textWidth = bounds.width();\n canvas.drawText(dispStr, 0, dispStr.length(),\n (float) xDraw - textWidth * 0.5f, (float) yDraw + textHeight * 0.5f,\n paint);\n }\n\n }",
"abstract void draw();",
"abstract void draw();",
"protected DrawSurface() {\n\t\taiDrawingOrder = new Object[] { RANGE_CURSOR_DRAWSURFACE, GRID_DRAWSURFACE, GRAPH_DRAWSURFACE,\n\t\t\t\tCURSOR_DRAWSURFACE, ZOOM_DRAWSURFACE, };\n\n\t\t// we know that we paint all our own pixels.\n\t\tsetOpaque(false);\n\n\t\t// default background\n\t\tsetBackground(Color.BLACK);\n\n\t\t// give us the same default front as a JPanel\n\t\tsetFont(UIManager.getFont(\"Panel.font\"));\n\n\t\t/*\n\t\t * We create our own cursor because the default cross-hair cursor has\n\t\t * some weird display issues - it seems to fade into some waterfall\n\t\t * graphs, and seems to interact with the green FFT line to produce red\n\t\t * pixels. Weird.\n\t\t */\n\t\tsetCursor(DEFAULT_CROSSHAIR_CURSOR);\n\n\t\tPeralexLibsBundle.addLocaleListener(this); // do after components have\n\t\t\t\t\t\t\t\t\t\t\t\t\t// been initialised\n\t}",
"public void draw(){\n\t\tif(selected){\n\t\t\timg.draw(xpos,ypos,scale,Color.blue);\n\t\t}else{\n\t\t\timg.draw(xpos, ypos, scale);\n\t\t}\n\t}",
"static void InitiateDraw() {\n\t\tshape = new GeneralPath();\n\t\ti1.setOverlay(null);\n\t\tOL = new Overlay();\n\t}",
"@Override\npublic void paint(Graphics g) {\n\tsuper.paint(g);\n\tg.drawImage(bak, 0, 0, null);\n\t\n\t//画线\n\tfor(int i=0;i<Config.ROWS;i++)\n\t{\n\t\tfor(int j=0;j<Config.COLS;j++)\n\t\t{\n\t\t\tg.setColor(new Color(137,92,44));\n\t\t\tg.drawRect(j*Config.CELL+Config.OFFSETX, i*Config.CELL+Config.OFFSETY, Config.CELL, Config.CELL);\n\t\t}\n\t}\n\t//画焦点\n\tfor(int i=0;i<Config.ROWS;i++)\n\t{\n\t\tfor(int j=0;j<Config.COLS;j++)\n\t\t{\n\t\t\tif(Config.MAP[i][j]==Config.FOCUS)\n\t\t\t{\n\t\t\t\tg.setColor(new Color(137,92,44));\n\t\t\t\tg.fillRect(j*Config.CELL+Config.OFFSETX-5, i*Config.CELL+Config.OFFSETY-5, 10, 10);\n\t\t\t}\n\t\t}\n\t}\n\t\n\t//画子\n\t\tfor(int i=0;i<Config.ROWS;i++)\n\t\t{\n\t\t\tfor(int j=0;j<Config.COLS;j++)\n\t\t\t{\n\t\t\t\tif(Config.MAP[i][j]==Config.BLACK)\n\t\t\t\t{\n\t\t\t\t g.drawImage(black, Config.CELL*j+Config.OFFSETX-20, i*Config.CELL+Config.OFFSETY-20, null);\n\t\t\t\t \n\t\t\t\t}\n\t\t\t\tif(Config.MAP[i][j]==Config.WHITE)\n\t\t\t\t{\n\t\t\t\t g.drawImage(white, Config.CELL*j+Config.OFFSETX-20, i*Config.CELL+Config.OFFSETY-20, null);\n\t\t\t\t \n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n //画提拉\n\t\tg.setFont(new Font(\"微软雅黑\",Font.BOLD,24));\n\t\tg.setColor(step%2==0?Color.black:Color.white);\n\t\tg.drawString(step%2==0?\"黑子下\":\"白子下\", 640, 80);\n}",
"public void draw(DrawingContext context) {\n\t\t\t\t}",
"public void draw() \r\n\t{\r\n\t\tdraw(root, new RectHV(0,0,1,1) );\r\n\t}",
"public void draw(){\n StdDraw.picture(this.xCoordinate,this.yCoordinate,this.img);\n }",
"@Override\n public void paint(Graphics g) {\n g2 = (Graphics2D) g;\n drawBackground();\n drawSquares();\n drawLines();\n gui.hint = new TreeSet<>();\n }",
"public void draw(){\n\t\tStdDraw.picture(this.xxPos,this.yyPos,\"images/\"+this.imgFileName);\n\t}",
"@Override\n\tpublic void Draw(float delta) {\n\t\t\n\t}",
"void draw(Graphics g, int xoff, int yoff) {\n this.draw(g, xoff, yoff, 0, 0, this.getWidth(), this.getHeight());\n }",
"@Override\n\tprotected void onDraw(Canvas canvas) {\n\t\tsuper.onDraw(canvas);\n\t\t\n\t\t\n\t}",
"@Override\n public void draw() {\n super.draw(); \n double radius = (this.getLevel() * 0.0001 + 0.025) * 2.5e10;\n double x = this.getR().cartesian(0) - Math.cos(rot) * radius;\n double y = this.getR().cartesian(1) - Math.sin(rot) * radius;\n StdDraw.setPenRadius(0.01);\n StdDraw.setPenColor(StdDraw.RED);\n StdDraw.point(x, y);\n \n }",
"void draw();",
"void updateDrawing() {\n filling = modelRoot.getCDraw().getFilling(this);\n dirtyBufF = true;\n tooltip = modelRoot.getCDraw().getTooltip(this);\n dirtyBufT = true;\n title = modelRoot.getCDraw().getTitle(this);\n dirtyBufTitle = true;\n colorTitle = modelRoot.getCDraw().getTitleColor(this);\n dirtyBufCT = true;\n }",
"@Override\n\tpublic void draw(Graphics2D g) {\n\t\t\n\t}",
"@Override\n\tpublic void draw() {\n\t\tSystem.out.println(\"You are drawing a RECTANGLE\");\n\t}",
"public void draw() {\r\n /* DO NOT MODIFY */\r\n StdDraw.point(x, y);\r\n }",
"@Override\n\tpublic void draw(Graphics g) {\n\t\tsuper.draw(g);\n\t\tif(!satillite){\n\t\t\tdrawTrace(g);\n\t\t}\n\t\t\n \t\tmove();\n\t}",
"private void drawGrid(){\r\n\r\n\t\tdrawHorizontalLines();\r\n\t\tdrawVerticalLines();\r\n\t}",
"public void setGameDraw() {\n this.gameStarted = false; \n this.winner = 0; \n this.isDraw = true; \n }",
"private void draw(){\n GraphicsContext gc = canvasArea.getGraphicsContext2D();\n canvasDrawer.drawBoard(canvasArea, board, gc, currentCellColor, currentBackgroundColor, gridToggle);\n }",
"public void draw(){\n\t\t int startRX = 100;\r\n\t\t int startRY = 100;\r\n\t\t int widthR = 300;\r\n\t\t int hightR = 300;\r\n\t\t \r\n\t\t \r\n\t\t // start points on Rectangle, from the startRX and startRY\r\n\t\t int x1 = 0;\r\n\t\t int y1 = 100;\r\n\t\t int x2 = 200;\r\n\t\t int y2 = hightR;\r\n\t\t \r\n //direction L - false or R - true\r\n\t\t \r\n\t\t boolean direction = true;\r\n\t\t \t\r\n\t\t\r\n\t\t //size of shape\r\n\t\t int dotD = 15;\r\n\t\t //distance between shapes\r\n\t int distance = 30;\r\n\t\t \r\n\t rect(startRX, startRY, widthR, hightR);\r\n\t \r\n\t drawStripesInRectangle ( startRX, startRY, widthR, hightR,\r\n\t \t\t x1, y1, x2, y2, dotD, distance, direction) ;\r\n\t\t \r\n\t\t super.draw();\r\n\t\t}",
"public void draw(Graphics g, int... paneOffsets) { }",
"@Override\n\tpublic void withdraw() {\n\t\t\n\t}",
"public void draw(Graphics window);",
"public void draw() {\n draw(root, true);\n }",
"public void draw() {\n\t\t\r\n\t\tSystem.out.println(\"drawing...\");\r\n\t\t\r\n\t}",
"@Override\n public void draw(Canvas onCanvas) {\n Paint border = new Paint();\n border.setColor(Color.BLACK);\n border.setStyle(Paint.Style.STROKE);\n border.setStrokeWidth(1);\n\n // -1 on width and height because the 1st pixel (0 index) is included\n // Java's placement on the border lines are really weird...\n //\n // It draws the top and left borders on the 0 pixel\n // BUT it draws the right and bottom ones PAST the last pixel\n // WHY U DO DIS\n onCanvas.drawRect(0, 0, getW() - 1, getH() - 1, border);\n\n super.draw(onCanvas);\n }",
"public void draw() {\n /* DO NOT MODIFY */\n StdDraw.point(x, y);\n }",
"public void draw() {\n /* DO NOT MODIFY */\n StdDraw.point(x, y);\n }",
"public void draw() {\n /* DO NOT MODIFY */\n StdDraw.point(x, y);\n }",
"public void draw() {\n /* DO NOT MODIFY */\n StdDraw.point(x, y);\n }",
"@Override\n\tpublic void draw(Graphics2D g2d) {\n\t\t\n\t}"
] | [
"0.6874293",
"0.6874293",
"0.68384707",
"0.68365663",
"0.68365663",
"0.6815909",
"0.6815909",
"0.67765266",
"0.672507",
"0.6710071",
"0.67057157",
"0.6682867",
"0.6679506",
"0.6664977",
"0.6657145",
"0.6613577",
"0.66091776",
"0.65813947",
"0.6579376",
"0.6575818",
"0.6568564",
"0.65612537",
"0.6554447",
"0.6482742",
"0.64685196",
"0.64640635",
"0.6432961",
"0.6432381",
"0.64308196",
"0.6425118",
"0.6423296",
"0.6423296",
"0.6423296",
"0.64195144",
"0.64182824",
"0.64176285",
"0.64043456",
"0.6402561",
"0.6391116",
"0.6382351",
"0.6381868",
"0.63562155",
"0.6355943",
"0.6350037",
"0.63386",
"0.6321921",
"0.63150567",
"0.62989455",
"0.6269418",
"0.6269367",
"0.626457",
"0.62626874",
"0.6253535",
"0.6252788",
"0.62517303",
"0.6248747",
"0.6248747",
"0.6248747",
"0.62441826",
"0.62326103",
"0.6231586",
"0.6222558",
"0.62203753",
"0.62203753",
"0.6219958",
"0.6218765",
"0.6218765",
"0.6209485",
"0.61811686",
"0.6178062",
"0.6173278",
"0.6171698",
"0.6166575",
"0.6151174",
"0.61473596",
"0.61447424",
"0.6144132",
"0.6140325",
"0.61256623",
"0.6123459",
"0.61218816",
"0.6121213",
"0.61129045",
"0.61105657",
"0.61101186",
"0.6108044",
"0.6107254",
"0.6098962",
"0.60973036",
"0.6092154",
"0.60889024",
"0.60878664",
"0.6085889",
"0.60811573",
"0.60784376",
"0.6076354",
"0.60741115",
"0.60741115",
"0.60741115",
"0.60741115",
"0.6065178"
] | 0.0 | -1 |
Een List gemaakt met de toList methode vanuit een array blijft synchroon met het array. | public static void main(String[] args) {
String[] sa = {"vier","een","twee","drie"};
List<String> stringList = Arrays.asList(sa); // fixed-size !
System.out.println("Array: ");
ArrayUtil.showArray(sa);
System.out.println("List: ");
System.out.println(stringList);
// Wijziging in array en list doorvoeren...
sa[0] = "Achttien"; // Wijzig het array
stringList.set(3, "laatste"); // Wijzig de List
System.out.println("Array: ");
ArrayUtil.showArray(sa);
System.out.println("List: ");
System.out.println(stringList);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public COSArray toList() \n {\n return array;\n }",
"public Object[] toArray()\n\t{\n\t\treturn list.toArray();\n\t}",
"public Object[] toArray(){\n\n \tObject[] o = new Object[list.size()];\n\n o = list.toArray();\n\n \treturn o;\n\n }",
"public void newArray() {\n\t\t\n\t\tE[] newArray= (E[]) new Object[list.length * 2]; //Holds the old elements from the list array while new list array is being made\n\t\t\n\t\tfor(int i = 0; i < list.length; i++) {\n\t\t\t\n\t\t\tnewArray[i] = list[i]; //Copy the old list array into the newArray\n\t\t}\n\t\t\n\t\tlist = newArray; //Point the old array at the newArray starting memory location\n\t\t\n\t}",
"public List<Object> toList() {\n int i = this.capacityHint;\n int i2 = this.size;\n ArrayList arrayList = new ArrayList(i2 + 1);\n Object[] head2 = head();\n int i3 = 0;\n while (true) {\n int i4 = 0;\n while (i3 < i2) {\n arrayList.add(head2[i4]);\n i3++;\n i4++;\n if (i4 == i) {\n head2 = head2[i];\n }\n }\n return arrayList;\n }\n }",
"private TaskListItem[] getListArray() {\n return allLists.toArray(new TaskListItem[allLists.size()]);\n }",
"public List getList() {\n return Arrays.asList(toJavaArray()); \n }",
"public List<E> toList() {\r\n ArrayList<E> result = new ArrayList<E>(this.size());\r\n for (E e : this) {\r\n result.add(e);\r\n }\r\n return result;\r\n }",
"public ArrayList<T> getAsList(){\r\n return arrayList;\r\n }",
"Object getTolist();",
"List<Object> toList() {\n List<Object> results = new ArrayList<>(this.myArrayList.size());\n for (Object element : this.myArrayList) {\n if (element == null || PropertyObject.NULL.equals(element)) {\n results.add(null);\n } else if (element instanceof PropertyArray) {\n results.add(((PropertyArray) element).toList());\n } else if (element instanceof PropertyObject) {\n results.add(((PropertyObject) element).toMap());\n } else {\n results.add(element);\n }\n }\n return results;\n }",
"private List<Integer> toList(int[] array) {\n List<Integer> list = new LinkedList<Integer>();\n for (int item : array) {\n list.add(item);\n }\n return list;\n }",
"protected Object[] getList() {\n return list;\n }",
"List <JAVATYPE> convertList(List<JAVATYPE> oldList, final METATYPE meta);",
"private static List<Node> arrayToList(Node[] n) {\n List<Node> listItems = new ArrayList<>();\n for (Node n1 : n) {\n listItems.add(n1);\n }\n return listItems;\n }",
"private void doubleArray()\n\t{\n\t\tT[] oldList = list;\n\t\tint oldSize = oldList.length;\n\t\t\n\t\tlist = (T[]) new Object[2 * oldSize];\n\t\t\n\t\t// copy entries from old array to new, bigger array\n\t\tfor (int index = 0; index < oldSize; index++)\n\t\t\tlist[index] = oldList[index];\n\t}",
"@Override\n\tpublic void writeToParcel(Parcel dest, int flags) {\n\t\tdest.writeList(lista);\n\t}",
"@Override\n\tpublic Object[] toArray() {\n\t\tListNode<L> newHead=first;\n\t\tObject[] array=new Object[size];\n\t\tfor(int i =0;i<size;i++) {\n\t\t\tarray[i]=newHead.storage;\n\t\t\tnewHead=newHead.next;\n\t\t}\n\t\treturn array;\n\t}",
"@Override\n\tpublic Object[] toArray() {\n\t\tif (isEmpty()) {\n\t return null;\n\t }\n\n\t\tObject[] data = new Object[size()];\n\n\t ListNode tmp = head;\n\t for (int i = 0; i < size(); i++) {\n\t data[i] = tmp.datum;\n\t tmp = tmp.next;\n\t }\n\n\t return data;\t\t\n\t}",
"private PyObject[] listtoarray(ArrayList<PyObject> a)\n {\n PyObject[] results = new PyObject[a.size()];\n int iter = 0;\n for (PyObject pt : a) {\n results[iter] = pt;\n iter++;\n }\n return results;\n }",
"@Override\n public int[] toArray() {\n int[] result = new int[size];\n Entry tmp = first;\n for (int i = 0; i < size; i++) {\n result[i] = tmp.value;\n tmp = tmp.next;\n }\n return result;\n }",
"public static void processArrayList(){\n ArrayList<String> newArray = new ArrayList<String>();\n newArray.addAll(groceryList.getGroceryList()); //Method 1: adds all items from the groceryList into the newArray\n\n ArrayList<String> newArray2 = new ArrayList<String>(groceryList.getGroceryList()); //Method 2: same as method 1 but the copying happens at the time of initialising the newArray2\n\n //if for some reason you want to save all the contents of an arrayList into an array\n String[] myArray = new String[groceryList.getGroceryList().size()]; //create the array to be equal to the size of the arraylist\n myArray = groceryList.getGroceryList().toArray(myArray); //convert an arraylist of strings (the outcome of getGroceryList()), and save it into our array\n }",
"public static List toList(Object arr[])\r\n {\r\n return (arr == null) ? null : Arrays.asList(arr);\r\n }",
"public ArrayBackedList(IList list) {\n while (list.size() > stringArray.length) {\n reallocArray();\n }\n for (int i = 0; i < list.size(); i++) {\n stringArray[i] = list.get(i);\n }\n }",
"@SuppressWarnings(\"unchecked\")\n\tprotected void grow(){\n\t\t// makes new arraylist\n\t\tT[] temp = (T[]) new Object[data.length *2];\n\t\tfor(int i = 0; i < data.length; i++ ){\n\t\t\ttemp[i] = data[i];\n\t\t}\n\t\tdata = temp;\n\t}",
"@SuppressWarnings(\"unchecked\")\n\tprivate void growArray() {\n\t\tint tempSize = size * 2;\n\t\tE[] tempList = (E[]) new Object[tempSize];\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\ttempList[i] = list[i];\n\t\t}\n\t\tlist = tempList;\n\t}",
"private void getArbeitspaketArray(ObservableList<ArbeitspaketTableData> paketList) {\r\n\t\t// Initialisieren des Arrays\r\n\t\tpakete = new Arbeitspaket[paketList.size()];\r\n\r\n\t\tfor (int i = 0; i < paketList.size(); i++) {\r\n\t\t\t// herauslesen der externen ID, damit diese nicht verloren geht (Konstruktor\r\n\t\t\t// nimmt nur einen Parameter für die ID entgegen und setzt die interne und\r\n\t\t\t// externe ID auf diesen Wert)\r\n\t\t\tString idExtern = paketList.get(i).getIdExtern();\r\n\r\n\t\t\t// automatisches Setzen der Vorgangsdauer, da diese in der Tabelle nicht\r\n\t\t\t// angegeben wird\r\n\t\t\tint vorgangsdauer = paketList.get(i).getFez() - paketList.get(i).getFaz() + 1;\r\n\r\n\t\t\t// setzen der einzelnen Werte der Arbeitspakte\r\n\t\t\tpakete[i] = new Arbeitspaket(paketList.get(i).getIdIntern(), paketList.get(i).getFaz(),\r\n\t\t\t\t\tpaketList.get(i).getFez(), paketList.get(i).getSaz(), paketList.get(i).getSez(), vorgangsdauer,\r\n\t\t\t\t\tpaketList.get(i).getMitarbeiteranzahl(), paketList.get(i).getAufwand());\r\n\r\n\t\t\t// Da die externe ID auf die interne ID gesetzt wurde, wird diese nun wieder auf\r\n\t\t\t// die vorher herausgelesene externe ID gesetzt\r\n\t\t\tpakete[i].setIdExtern(idExtern);\r\n\t\t}\r\n\t}",
"private void intListToArrayList(int[] list, ArrayList<Integer> arrayList){\n for(int integer: list){\n arrayList.add(integer);\n }\n }",
"void arrayListToArray() {\n List<String> coolStringList = Arrays.asList( \"Java\", \"Scala\", \"Groovy\" ); //Declare &initialize o\n //coolStringList.add( \"Syed\" ); // Exception in thread \"main\" java.lang.UnsupportedOperationException\n coolStringList.set( 0, \"Syed\" );// works well\n System.out.println( coolStringList );\n/*\n /) Its not as fast as Arrays.asList() but more flexible.\n\n 2) This method actually copies the content of the underlying array into ArrayList provided.\n\n\n 3) Since you are creating copy of original array, you can add, modify and remove any element without affecting original one.*/\n\n List<String> assetList = new ArrayList();\n String[] asset = {\"equity\", \"stocks\", \"gold\", \"foriegn exchange\", \"fixed income\", \"futures\", \"options\"};\n Collections.addAll( assetList, asset );\n System.out.println( assetList );\n assetList.add( \"Mohammed\" );\n System.out.println( assetList );\n\n List newAssetList = new ArrayList();\n newAssetList.addAll( Arrays.asList( asset ) );\n System.out.println( newAssetList );\n newAssetList.add( \"YNS\" );\n System.out.println( newAssetList );\n /*String [] currency = {\"SGD\", \"USD\", \"INR\", \"GBP\", \"AUD\", \"SGD\"};\n System.out.println(\"Size of array: \" + currency.length);\n List<String> currencyList = CollectionUtils.arrayToList(currency);\n*/\n }",
"public Object[] getList() {\n Object[] list = new Object[size()];\n copyInto(list);\n return list;\n }",
"public static void main(String[] args) {\n\n Integer[] integers = new Integer[] {1,2,3,4,5};\n List<Integer>list = new ArrayList<>(Arrays.asList(integers)); // correct one\n System.out.println(\"Converted from Array to List = \" + list);\n\n // this will be a fixed-size list- you can not use add method.\n List<Integer>fixedSizeList = Arrays.asList(integers); // bunu da yapabiliriz ama element ekleme yapamayiz.\n //fixedSizeList.add(6); bunda hata verecek. cunku fixedsize olarak convert ettik. \"unsupported operation exception\" uyarisi verir\n\n\n //Converting list to Array\n Integer[] convertedFromList =list.toArray(new Integer[0]); // sifir yerine herhangi bi sey yazilabilir. ama 0 yazmada fayda var.\n System.out.println(\"Converted from List to Array = \"+ Arrays.toString(convertedFromList));\n\n //Converting an Array to set\n Set<Integer>set = new HashSet<>(Arrays.asList(integers));\n System.out.println(\"Converted from Array to Set = \" + set);\n\n // Converting Set to Array\n Integer[] convertedFromSet = set.toArray(new Integer[0]);\n System.out.println(\"Converted from Set to Array = \" + Arrays.toString(convertedFromSet));\n\n // converting List to Set\n Set<Integer>setFromList = new HashSet<>(list); // bu en cok , ayni value varsa isimize yarar. cunku set'de duplicate yok\n System.out.println(\"Converted list to Set = \" + setFromList);\n\n // Converting Set to List\n List<Integer>listFromSet = new ArrayList<>(setFromList);\n listFromSet.add(9); // en sona ekler\n System.out.println(\"Converted Set to List = \" + listFromSet);\n\n }",
"private <T> void populateArrayFromList(T[] arr, ArrayList<T> arrayList) {\n\t\tSystem.out.println(\"Array size \" + arr.length);\n\t\tSystem.out.println(\"ArrayList size \" + arrayList.size());\n\t\tfor (int i = 0; i < arrayList.size(); i++) {\n\t\t\tsavedListModel.addElement(arrayList.get(i).toString());\n\t\t\tarr[i] = arrayList.get(i);\n\t\t}\n\t}",
"public ListConverting getListConverting() {\n return listConverting;\n }",
"public ArrayList<Invitato> getArraylistInvitati(){\n\n\n return AssegnamentiTavolo;\n }",
"public List<New> list();",
"public void create() {\n String[] arrays = new String[100];\n ArrayList<String> list1 = new ArrayList(); //Object[10]\n list1.size(); //0\n list1.add(\"Vivek\"); //object[0] = \"Vivek\"\n list1.size(); //1\n list1.get(0);//\"Vivek\"\n\n list1.remove(1);\n\n list1.add(0, \"Vivek\");\n\n\n ArrayList<String> list3 = new ArrayList<String>(list1);\n\n ArrayList<Student> list = new ArrayList<Student>();\n\n\n\n }",
"@Override\n public List<E> asList() {\n ArrayList<E> result = null;\n\n while (top.next != null) {\n top = top.next;\n result.add(top.data);\n }\n return result;\n }",
"@Override\n public T[] toArray() {\n //create the return array\n T[] result = (T[])new Object[this.getSize()];\n //make a count variable to move through the array and a reference\n //to the first node\n int index = 0;\n Node n = first;\n //copy the node data to the array\n while(n != null){\n result[index++] = n.value;\n n = n.next;\n }\n return result;\n }",
"public List<T> toList() {\n return Query.toList(iterable);\n }",
"@SuppressWarnings(\"unchecked\")\n\tpublic T[] asArray() {\n\t\t// have to use explicit cast because we cannot use the alternative signature of toArray(T[]), as you cannot instantiate an array of a\n\t\t// type parameter (not even an empty array)\n\t\treturn (T[]) this.itemList.toArray();\n\t}",
"static List<Integer> arrayToList(int[] array) {\r\n List<Integer> list = new ArrayList<Integer>();\r\n for(int i : array)\r\n list.add(i);\r\n return list;\r\n }",
"@org.junit.jupiter.api.Test\r\n void toArray() {\n mll.add(\"A\");\r\n Object [] backDoor = mll.toArray();\r\n backDoor[0] = \"HAHHA\";\r\n\r\n assertEquals(\"A\", mll.get(0));\r\n }",
"public static List<Integer> reverseArray(List<Integer> a) {\n int s=a.size();\n List<Integer> list=new ArrayList<Integer>(s);\n for(int i=s-1;i>=0;i--)\n {\n list.add(a.get(i));\n }\n return list;\n }",
"public T[] getMyList() {\n\n return myList;\n }",
"@SuppressWarnings(\"unchecked\")\n public ArrayList(ArrayList<E> lst) {\n list = (E[])new Object[lst.size()];\n capacity = lst.capacity;\n size = lst.size;\n for(int i = 0; i < size; i++) {\n list[i] = lst.list[i];\n }\n }",
"@Override\n public Object[] toArray() {\n Object[] tempArray = new Object[size];\n Node n = this.head;\n int i = 0;\n while (i<size) {\n tempArray[i] = n.getData();\n i++;\n n = n.next;\n }\n return tempArray;\n }",
"public O[] toArray()\r\n {\r\n\r\n @SuppressWarnings(\"unchecked\")\r\n O[] a = (O[]) new Object[count];\r\n \r\n VectorItem<O> vi = first;\r\n \r\n for (int i=0;i<=count-1;i++)\r\n {\r\n a[i] = vi.getObject();\r\n vi = vi.getNext();\r\n }\r\n\r\n return a; \r\n }",
"@Test\r\n\tpublic void testToArrayType() {\r\n\t\tMunitions[] sample1 = new Munitions[5];\r\n\t\tsample1 = list.toArray(sample1);\r\n\t\tAssert.assertEquals(15, sample1.length);\r\n\t\tfor (int i = 0; i < sample1.length; i++) {\r\n\t\t\tAssert.assertNotNull(sample1[i]);\r\n\t\t}\r\n\t\tMunitions[] sample2 = new Munitions[20];\r\n\t\tsample2 = list.toArray(sample2);\r\n\t\tAssert.assertEquals(20, sample2.length);\r\n\t\tfor (int i = 0; i < sample2.length - list.size(); i++) {\r\n\t\t\tAssert.assertNotNull(sample1[i]);\r\n\t\t}\r\n\t}",
"public BubSortList() {\n\t\tray = new int[MAXSIZE];\n\t\tnowLength = 0;\n\t}",
"private ArrayList<Entidad> GetArrayItems(){\n // ArrayList<Entidad> listItems = new ArrayList<>();\n listItems.add(new Entidad(\"Agree\", \"Disagree\", \"Level: \", \"Bajo\", 0,0,0,0, 0,0,0, \" Spotify\",\"\", 0, false, false, false, null, \"\", 1,0,0,0,0,\"\"));\n listItems.add(new Entidad(\"Agree\", \"Disagree\", \"Level: \", \"Bajo\", 0,0,0,0, 0,0,0, \" Spotify\",\"\", 0, false, false, false, null, \"\", 1,0,0,0,0,\"\"));\n listItems.add(new Entidad(\"Agree\", \"Disagree\", \"Level: \", \"Bajo\", 0,0,0,0, 0,0,0, \" Spotify\",\"\", 0, false, false, false, null, \"\", 1,0,0,0,0,\"\"));\n listItems.add(new Entidad(\"Agree\", \"Disagree\", \"Level: \", \"Bajo\", 0,0,0,0, 0,0,0, \" Spotify\",\"\", 0, false, false, false, null, \"\", 1,0,0,0,0,\"\"));\n listItems.add(new Entidad(\"Agree\", \"Disagree\", \"Level: \", \"Bajo\", 0,0,0,0, 0,0,0, \" Spotify\",\"\", 0, false, false, false, null, \"\", 1,0,0,0,0,\"\"));\n\n return listItems;\n }",
"private Object[] deepCopy()\n {\n Object[] newList = new Object[size];\n\n int newListPosition = 0;\n for (int i =0; i < size; i++)\n {\n if (list[i] != null)\n {\n newList[newListPosition++] = list[i];\n }\n }\n\n return newList;\n }",
"public ArrayList<Richiesta> riempi2(){\n ArrayList<Richiesta> array = new ArrayList<>();\n Richiesta elemento = new Richiesta();\n elemento.setIdRichiesta(1);\n elemento.setStato(\"C\");\n elemento.setTipo(\"Prescrizione\");\n elemento.setData_richiesta(\"2016/07/02 alle 08:30 \");\n elemento.setNome_farmaco(\"Brufen\");\n elemento.setQuantita_farmaco(2);\n elemento.setCf_paziente(\"NLSFLP94T45L378G\");\n array.add(elemento);\n\n elemento.setIdRichiesta(2);\n elemento.setStato(\"R\");\n elemento.setTipo(\"Visita specialistica\");\n elemento.setNote_richiesta(\"Specialistica dermatologica presso dottoressa A.TASIN \");\n elemento.setData_richiesta(\"2016/05/06 alle 15:30 \");\n elemento.setCf_paziente(\"MRORSS94T05E378A\");\n array.add(elemento);\n\n elemento.setIdRichiesta(3);\n elemento.setStato(\"R\");\n elemento.setTipo(\"Visita di controllo\");\n elemento.setData_richiesta(\"2016/07/02 alle 08:30 \");\n elemento.setNome_farmaco(\"dermatologica\");\n elemento.setCf_paziente(\"MRORSS94T05E378A\");\n array.add(elemento);\n\n return array;\n }",
"public Object[] toArray() {\n Object[] myarray = new Object[size];\n DoublyLinkedListNode<T> pointer = head;\n for (int i = 0; i < size; i++) {\n myarray[i] = pointer.getData();\n pointer = pointer.getNext();\n }\n return myarray;\n\n\n }",
"private int[] arrayListToIntList(ArrayList<Integer> arrayList){\n int[] list=new int[arrayList.size()];\n for(Integer integer:arrayList){\n list[arrayList.indexOf(integer)]=integer;\n }\n return list;\n }",
"@ZenCodeType.Caster\n @ZenCodeType.Method\n default List<IData> asList() {\n \n return notSupportedCast(\"IData[]\");\n }",
"public ArrayList61B() {\n\t\tthis.size = 1;\n\t\tthis.arrayList = (E[]) new Object[this.size];\n\t}",
"@SuppressWarnings(\"unchecked\")\n public void testListToArray() throws Exception\n {\n List<PSKeyword> sourceList = new ArrayList<PSKeyword>();\n sourceList.add(createKeyword(\"1\"));\n sourceList.add(createKeyword(\"2\"));\n \n List<PSKeyword> targetList = roundTripListConversion(\n com.percussion.webservices.content.PSKeyword[].class, \n sourceList);\n\n assertTrue(sourceList.equals(targetList));\n }",
"private void cargarLista(ArrayList<CarritoDTO> arrayList)\n {\n DefaultListModel modelo = new DefaultListModel();\n //Recorrer el contenido del ArrayList\n for(int i=0; i<arrayList.size(); i++) \n {\n CarritoDTO item =(CarritoDTO) arrayList.get(i);\n //Añadir cada elemento del ArrayList en el modelo de la lista\n modelo.add(i, item.toString());\n }\n //Asociar el modelo de lista al JList\n jList1.setModel(modelo);\n }",
"@Override\n public void writeToParcel(Parcel dest, int flags) {\n dest.writeList(listData);\n }",
"public Item[] getList() {\n\t\treturn list;\n\t}",
"public int[] toArray() {\nNode current = head;\nint[] array = new int[size];\nfor(int i = 0; i < array.length; i++) {\narray[i] = current.value;\ncurrent = current.next;\n}\nreturn array;\n}",
"public List getList(List oldList) {\n List newList = new ArrayList();\n Collections.copy(newList, oldList);\n return newList;\n }",
"Object[] toArray();",
"Object[] toArray();",
"Object[] toArray();",
"public void revolver() {\n this.lista = Lista.escojerAleatorio(this, this.size()).lista;\n }",
"@SuppressWarnings(\"unchecked\")\n\tprivate void growArray() {\n\t\tObject[] newList = new Object[size * 2];\n\t\tfor (int i = 0; i < size(); i++) {\n\t\t\tnewList[i] = get(i);\n\t\t}\n\t\tlist = (E[]) newList;\n\t\tsize *= 2;\n\t}",
"public static void main(String[] args)\r\n\t{\nArrayList al = new ArrayList<>();\r\nal.add(10);\r\nal.add(\"manu\");\r\nal.add('m');\r\nObject [] ob=al.toArray();\r\nfor (int i = 0; i < ob.length; i++)\r\n{\r\n\tSystem.out.println(ob[i]);\r\n\t\r\n}\r\n\t}",
"public ArrayList getList() {\n \t\treturn list;\n \t}",
"public static List<ViajeEntidad> getListaViajesEntidad(){\n List<ViajeEntidad> viajes = new ArrayList<>();\n Date date = new Date();\n ViajeEntidadPK viajePK = new ViajeEntidadPK();\n TaxiEntidad taxiByPkPlacaTaxi = new TaxiEntidad();\n ClienteEntidad clienteByPkCorreoCliente = new ClienteEntidad();\n clienteByPkCorreoCliente.setPkCorreoUsuario(\"gerente11@gerente.com\");\n TaxistaEntidad taxistaByCorreoTaxi = new TaxistaEntidad();\n taxistaByCorreoTaxi.setPkCorreoUsuario(\"gerente11@gerente.com\");\n OperadorEntidad agendaOperador = new OperadorEntidad();\n agendaOperador.setPkCorreoUsuario(\"gerente11@gerente.com\");\n\n viajePK.setPkPlacaTaxi(\"CCC11\");\n viajePK.setPkFechaInicio(\"2019-01-01 01:01:01\");\n viajes.add(new ViajeEntidad(viajePK, \"2019-01-01 02:01:01\",\"5000\", 2, \"origen\",\"destino\", \"agenda\", \"agenda2\", taxiByPkPlacaTaxi, clienteByPkCorreoCliente, taxistaByCorreoTaxi, agendaOperador));\n viajePK.setPkPlacaTaxi(\"DDD11\");\n viajes.add(new ViajeEntidad(viajePK, \"2019-01-01 02:01:01\",\"5000\", 2, \"origen\",\"destino\", \"agenda\", \"agenda2\", taxiByPkPlacaTaxi, clienteByPkCorreoCliente, taxistaByCorreoTaxi, agendaOperador));\n viajePK.setPkPlacaTaxi(\"EEE11\");\n viajes.add(new ViajeEntidad(viajePK, \"2019-01-01 02:01:01\",\"5000\", 2, \"origen\",\"destino\", \"agenda\", \"agenda2\", taxiByPkPlacaTaxi, clienteByPkCorreoCliente, taxistaByCorreoTaxi, agendaOperador));\n\n return viajes;\n }",
"@SuppressWarnings( \"rawtypes\" )\n private XmlElement toXmlArray(List list)\n {\n XmlElement array = new XmlElement(\"array\");\n for (Object o : list)\n {\n array.add(objectToXml(o));\n }\n return array;\n }",
"private static <T> List<T> list(T... elements) {\n return ImmutableList.copyOf(elements);\n }",
"private static String[] listToArray(List<String> list){\n\t\tString[] arr = new String[list.size()];\n\t\tfor (int i = 0; i < list.size(); i++){\n\t\t\t\n\t\t\tarr[i] = list.get(i);\n\t\t}\n\t\t\n\t\treturn arr;\n\t}",
"public List<Pair<Integer, Integer>> getArray(){\n return qtadePorNum;\n }",
"@Override\n public Object[] toArray() {\n return Arrays.copyOf(data, size);\n }",
"@Override\n public String toString() {\n return \"ArrayTaskList{\" +\n \"list=\" + Arrays.toString(list) +\n \", currentPos=\" + currentPos +\n \", listLength=\" + listLength +\n '}';\n }",
"@Override\r\n public ListADT<T> toMutable() {\r\n return new ListADTImpl<T>(this.head);\r\n }",
"private List<T> getCompList(){\n\t\tList<T> l = new ArrayList<T>();\n\t\tfor(int i=0; i<list.size(); i++){\n\t\t\tif(indices[i]==1){\n\t\t\t\tl.add(list.get(i));\n\t\t\t}\n\t\t}\n\t\treturn l;\n\t}",
"public String[] getArray(){\n return (String[])this.items.toArray();\n }",
"@Override\n\tpublic ArrayList<T> toArrayList() {\n\t\tArrayList<T> out = new ArrayList<T>();\n\t\ttoArrayListRecursive(out,root);\n\t\treturn out;\n\t}",
"public Object[] toArray() {\n Object[] arr = new Object[size];\n Node<E> cur = head;\n for(int i = 0; i < size; i++) {\n arr[i] = cur.item;\n cur = cur.next;\n }\n return arr;\n }",
"public DList2 list(){\r\n return this.list;\r\n }",
"private void caricaLista() {\n /** variabili e costanti locali di lavoro */\n ArrayList unaLista = null;\n CampoDati unCampoDati = null;\n CDBLinkato unCampoDBLinkato = null;\n //@todo da cancellare\n try { // prova ad eseguire il codice\n /* recupera il campo DB specializzato */\n unCampoDBLinkato = (CDBLinkato)unCampoParente.getCampoDB();\n\n /* recupera la lista dal campo DB */\n unaLista = unCampoDBLinkato.caricaLista();\n\n /* recupera il campo dati */\n unCampoDati = unCampoParente.getCampoDati();\n\n /* registra i valori nel modello dei dati del campo */\n if (unaLista != null) {\n unCampoDati.setValoriInterni(unaLista);\n// unCampoDatiElenco.regolaElementiAggiuntivi();\n } /* fine del blocco if */\n\n } catch (Exception unErrore) { // intercetta l'errore\n /* mostra il messaggio di errore */\n Errore.crea(unErrore);\n } /* fine del blocco try-catch */\n\n }",
"public JList obtenirList() {\r\n\t\treturn list;\r\n\t}",
"E[] toArray();",
"public Object[] toArray() {\n return Arrays.copyOf(this.values, this.index);\n }",
"void writeBack(Comparable[] arr, int list) {\n\n\t\t// Iterate array and put sorted elements in it \n\t\tfor (int i = 0; i < arr.length; i++) {\n\t\t\t\n\t\t\tarr[i] = this.array[list];\n\t\t\tlist = next[list];\n\t\t}\n\t\t\n\t\t/*\n\t\t * Release resources.\n\t\t */\n\t\t\n\t\tthis.array = null;\n\t\tthis.data = null;\n\t\tthis.next = null;\n\t\tthis.queue = null;\n\t}",
"Listof<X> toList();",
"public List getList();",
"public ArrayList<OrderItem> getOrderArray(){return orderInfo;}",
"private List<Double> double2List(final double[] array) {\n\t\tList<Double> result = new ArrayList<Double>();\n\t\tfor (double n : array) {\n\t\t\tresult.add(new Double(n));\n\t\t}\n\t\treturn result;\n\t}",
"public void convertHashtoArray(ArrayList<Manufacturer> manu){\r\n\t\tfor(Manufacturer d: manu){\r\n\t\tManlist.add(t.get(d.code));\r\n\t\t}\r\n\t}",
"public List<Tag> getAsList() {\n return Collections.unmodifiableList(data);\n }",
"public static Edge[] listToArray(ArrayList<Edge> list){\n\t\t\tEdge[] EdgeAry = new Edge[list.size()];\n\t\t\tfor (int i = 0; i < list.size(); i++) {\n\t\t\t\tEdgeAry[i] = list.get(i);\n\t\t\t}\n\t\t\treturn EdgeAry;\n\t\t}",
"@Override\r\n public NumericObjectArrayList makeDeepCopy() {\r\n NumericObjectArrayList list = new NumericObjectArrayList();\r\n for (int i = 0; i < this.getCount(); i++) {\r\n try {\r\n list.insert(i, this.getValueAt(i));\r\n } catch (IndexRangeException ex) {\r\n //Shouldn't happen\r\n }\r\n }\r\n return list;\r\n }",
"@Override\r\n\tpublic Object[] toArray() {\n\t\treturn set.toArray();\r\n\t}",
"@Override\n\tpublic Object[] toArray() {\n\t\tObject[] result = copyArray(elements, size);\n\n\t\treturn result;\n\t}",
"protected Object[] getArray(){\r\n\t \treturn array;\r\n\t }",
"@Override\n public Object[] toArray() {\n Object[] result = new Object[size];\n int i = 0;\n for (E e : this) {\n result[i++] = e;\n }\n return result;\n }",
"List<ParqueaderoEntidad> listar();",
"public void updateList() \n { \n model.clear();\n for(int i = ScholarshipTask.repository.data.size() - 1; i >= 0; i--) \n {\n model.addElement(ScholarshipTask.repository.data.get(i));\n }\n }"
] | [
"0.7363284",
"0.6939287",
"0.6720924",
"0.66019416",
"0.6547739",
"0.6522892",
"0.65099806",
"0.64902145",
"0.6442443",
"0.6440856",
"0.64348936",
"0.6433003",
"0.64119434",
"0.6249655",
"0.6247639",
"0.61550957",
"0.6143194",
"0.6137708",
"0.61345416",
"0.6117941",
"0.6079365",
"0.60723865",
"0.6071866",
"0.60541534",
"0.60282123",
"0.60202247",
"0.60042906",
"0.6001831",
"0.5971761",
"0.59698826",
"0.5968895",
"0.5968801",
"0.5961885",
"0.5913889",
"0.59082115",
"0.5908024",
"0.59036076",
"0.588482",
"0.58426726",
"0.5835382",
"0.58231086",
"0.5822983",
"0.58074015",
"0.5806717",
"0.5802373",
"0.58011997",
"0.579567",
"0.57916534",
"0.5791199",
"0.5780933",
"0.5762494",
"0.5754436",
"0.57538944",
"0.57461375",
"0.5745353",
"0.57399935",
"0.57336694",
"0.5729447",
"0.5724528",
"0.5723284",
"0.5719731",
"0.5719616",
"0.57110393",
"0.57110393",
"0.57110393",
"0.57107395",
"0.56999844",
"0.56992805",
"0.56960225",
"0.5693197",
"0.5684664",
"0.5684386",
"0.5682119",
"0.5671438",
"0.56700057",
"0.5664972",
"0.56598485",
"0.5641509",
"0.5628941",
"0.56280226",
"0.56231683",
"0.56172246",
"0.5614602",
"0.56134087",
"0.56109565",
"0.5609645",
"0.56093645",
"0.5608124",
"0.5601874",
"0.5598291",
"0.55971473",
"0.5596247",
"0.5595853",
"0.5594122",
"0.55937076",
"0.5592393",
"0.5587463",
"0.557828",
"0.5550187",
"0.5549366",
"0.5547229"
] | 0.0 | -1 |
Updates the viewPoint based on given point Essential for camera moving | static void setViewPointRelevantTo(Point point) {
point.translate(-1 * viewPoint.x, -1 * viewPoint.y);
point.x /= Map.zoom;
point.y /= Map.zoom;
point.translate(viewPoint.x, viewPoint.y);
viewPoint.setLocation(point.x - GAME_WIDTH / 2, point.y - GAME_HEIGHT / 2);
verifyViewPoint();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void changeCameraPosition() {\n yPosition = mPerspectiveCamera.position.y;\n if (isMovingUp) {\n yPosition += 0.1;\n if (yPosition > 20)\n isMovingUp = false;\n } else {\n yPosition -= 0.1;\n if (yPosition < 1)\n isMovingUp = true;\n }\n\n mPerspectiveCamera.position.set(xPosition, yPosition, zPosition);\n mPerspectiveCamera.update();\n }",
"@Override\n public void move() {\n this.point.x += vector.x * getCurrentSpeed();\n this.point.y += vector.y * getCurrentSpeed();\n }",
"private void updateCamera() {\n\t\tVector3f x = new Vector3f();\n\t\tVector3f y = new Vector3f();\n\t\tVector3f z = new Vector3f();\n\t\tVector3f temp = new Vector3f(this.mCenterOfProjection);\n\n\t\ttemp.sub(this.mLookAtPoint);\n\t\ttemp.normalize();\n\t\tz.set(temp);\n\n\t\ttemp.set(this.mUpVector);\n\t\ttemp.cross(temp, z);\n\t\ttemp.normalize();\n\t\tx.set(temp);\n\n\t\ty.cross(z, x);\n\n\t\tMatrix4f newMatrix = new Matrix4f();\n\t\tnewMatrix.setColumn(0, x.getX(), x.getY(), x.getZ(), 0);\n\t\tnewMatrix.setColumn(1, y.getX(), y.getY(), y.getZ(), 0);\n\t\tnewMatrix.setColumn(2, z.getX(), z.getY(), z.getZ(), 0);\n\t\tnewMatrix.setColumn(3, mCenterOfProjection.getX(),\n\t\t\t\tmCenterOfProjection.getY(), mCenterOfProjection.getZ(), 1);\n\t\ttry {\n\t\t\tnewMatrix.invert();\n\t\t\tthis.mCameraMatrix.set(newMatrix);\n\t\t} catch (SingularMatrixException exc) {\n\t\t\tLog.d(\"Camera\",\n\t\t\t\t\t\"SingularMatrixException on Matrix: \"\n\t\t\t\t\t\t\t+ newMatrix.toString());\n\t\t}\n\t}",
"private void updateView(){\n \n camera.updateView();\n }",
"public void setViewLocation(Point p) {\n\tviewport.setViewLocation(p.x, p.y);\n\t\n}",
"public void updatePosition(double timestep){\n\t\tx = x + vx * timestep;\n\t y = y + vy * timestep;\n\t}",
"private void adjustCameraPosition() {\n if (upward) {\n\n if (tilt<90) {\n tilt ++;\n zoom-=0.01f;\n } else {\n upward=false;\n }\n\n } else {\n if (tilt>0) {\n tilt --;\n zoom+=0.01f;\n } else {\n upward=true;\n }\n }\n }",
"public void updateCamera() {\n\t}",
"private void pointWalkBehavior() {\n\t\tif (moving) {\n\t\t\tif (remainingSteps > 0) {\n\t\t\t\tupdatePixels(action);\n\t\t\t\tremainingSteps -= speed;\n\t\t\t} else {\n\t\t\t\tupdateCoordinate(action, false);\n\t\t\t\tif (coordX != endPoint.x || coordY != endPoint.y) {\n\t\t\t\t\tif (validMoveEh(action)) {\n\t\t\t\t\t\tremainingSteps = STEP_SIZE;\n\t\t\t\t\t\tupdateCoordinate(action, true);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tmoving = false;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tcurrentImage = stopAnimation(action);\n\t\t\t\t\tpointWalking = false;\n\t\t\t\t\tmoving = false;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tif (validMoveEh(action)) {\n\t\t\t\tmoving = true;\n\t\t\t\tremainingSteps = STEP_SIZE;\n\t\t\t\tupdateCoordinate(action, true);\n\t\t\t\tcurrentImage = startAnimation(action);\n\t\t\t}\n\t\t}\n\t}",
"public void update(Point point)\n {\n rectangle.set(point.x - rectangle.width()/2, point.y - rectangle.height()/2, point.x + rectangle.width()/2,point.y + rectangle.height()/2);\n\n //hitBox(this.rectangle);\n }",
"void mo2268a(View view, PointF pointF, float f);",
"public void setFrameXY(RMPoint aPoint) { setFrameXY(aPoint.x, aPoint.y); }",
"public void moveTo(Point point){\n updateUndoBuffers(new LinkedList<>());\n xPos = point.getMyX()+myGrid.getWidth()/ HALF;\n yPos = myGrid.getHeight()/ HALF-point.getMyY();\n }",
"private void updateView(GL2 gl) {\r\n gl.glLoadIdentity();\r\n final float eyeX = (float) camera.getEye().get(0);\r\n final float eyeY = (float) camera.getEye().get(1);\r\n final float eyeZ = (float) camera.getEye().get(2);\r\n final float refX = (float) camera.getRef().get(0);\r\n final float refY = (float) camera.getRef().get(1);\r\n final float refZ = (float) camera.getRef().get(2);\r\n final float upX = (float) camera.getUp().get(0);\r\n final float upY = (float) camera.getUp().get(1);\r\n final float upZ = (float) camera.getUp().get(2);\r\n glu.gluLookAt(eyeX, eyeY, eyeZ, refX, refY, refZ, upX, upY, upZ);\r\n }",
"void setPosition(Point point);",
"@NonNull\n @Override\n public PointF transformMeteringPoint(@NonNull PointF point) {\n final PointF referencePoint = new PointF(point.x, point.y);\n Size referenceSize = previewSize;\n\n // 1. Account for cropping.\n // This will enlarge the preview size so that aspect ratio matches.\n referenceSize = applyPreviewCropping(referenceSize, referencePoint);\n\n // 2. Scale to the preview stream coordinates.\n // This will move to the preview stream coordinates by scaling.\n referenceSize = applyPreviewScale(referenceSize, referencePoint);\n\n // 3. Rotate to the stream coordinate system.\n // This leaves us with sensor stream coordinates.\n referenceSize = applyPreviewToSensorRotation(referenceSize, referencePoint);\n\n // 4. Move to the crop region coordinate system.\n // The crop region is the union of all currently active streams.\n referenceSize = applyCropRegionCoordinates(referenceSize, referencePoint);\n\n // 5. Move to the active array coordinate system.\n referenceSize = applyActiveArrayCoordinates(referenceSize, referencePoint);\n LOG.i(\"input:\", point, \"output (before clipping):\", referencePoint);\n\n // 6. Probably not needed, but make sure we clip.\n if (referencePoint.x < 0) referencePoint.x = 0;\n if (referencePoint.y < 0) referencePoint.y = 0;\n if (referencePoint.x > referenceSize.getWidth()) referencePoint.x = referenceSize.getWidth();\n if (referencePoint.y > referenceSize.getHeight()) referencePoint.y = referenceSize.getHeight();\n LOG.i(\"input:\", point, \"output (after clipping):\", referencePoint);\n return referencePoint;\n }",
"public void setPoint(double point){\r\n this.point = point;\r\n }",
"public void moveViewRelative(int newX, int newY) {\n\n targetXOffset = (int) (currentXOffset - newX);\n targetYOffset = (int) (currentYOffset - newY);\n\n doPan = true;\n\n gameChanged = true;\n }",
"private void adjustEViewPosition() {\n double aVec[] = theRocket.getCoordSys().getPositionVec();\n CoordSys eViewSys = new CoordSys();\n eViewSys.setZAxis(VMath.normalize(aVec));\n\n aVec = VMath.vecMultByScalar(aVec, 2.5);\n eViewSys.setPositionAsVec(aVec);\n\n double[] zAxis = VMath.normalize(eViewSys.zAxis().getVectorForm());\n double[] yAxis = VMath.normalize(theRocket.getCoordSys().yAxis().getVectorForm());\n double[] xAxis = VMath.normalize(VMath.crossprd(yAxis, zAxis));\n yAxis = VMath.crossprd(zAxis, xAxis);\n eViewSys.setXAxis(xAxis);\n eViewSys.setYAxis(yAxis);\n eViewSys.setZAxis(zAxis);\n\n eViewSys.xRotate(180);\n eViewSys.zRotate(-90);\n eView.setViewingCoordSys(eViewSys);\n }",
"public void updateCamera(Camera cam, double distance) {\r\n camera = cam;\r\n screenDistance = distance;\r\n }",
"public void updatePosition(Matrix4x4 transform, Vector yawPitchRoll) {\n if (this.posSet) {\n Vector v = new Vector(this.posX, this.posY, this.posZ);\n transform.transformPoint(v);\n updatePosition(v, yawPitchRoll);\n } else {\n updatePosition(transform.toVector(), yawPitchRoll);\n }\n }",
"public void setLocation(Point2D p);",
"protected void updatePosition() {\n\t\tif(motion == null) {\n\t\t\tmotion = new Motion3D(player, true);\n\t\t} else motion.update(player, true);\n\t\t\n\t\tmotion.applyToEntity(this);\n\t\tthis.rotationPitch = player.rotationPitch;\n\t\tthis.rotationYaw = player.rotationYaw;\n\t}",
"public void update() {\n\t\tupdateCamera();\n\t}",
"boolean mo2269a(View view, PointF pointF);",
"void turnToPoint(float x, float y) {\n _rotVector.set(x - _x, y - _y, 0);\n _rotVector.setMag(1);\n }",
"public T setPoint(@NonNull View view) {\n int[] location = new int[2];\n view.getLocationInWindow(location);\n int x = location[0] + view.getWidth() / 2;\n int y = location[1] + view.getHeight() / 2;\n return setPoint(x, y);\n }",
"public void relocateToPoint(boolean isUserClick){\n// System.out.println(\"Scene x: \"+point.getX()+\", y: \"+point.getY());\n// System.out.println(\"Local x: \"+getParent().sceneToLocal(point).getX()+\", y: \"+getParent().sceneToLocal(point).getY());\n// System.out.println(\"Relocate x: \"+(getParent().sceneToLocal(point).getX() - (getWidth() / 2))+\", y: \"+(getParent().sceneToLocal(point).getY() - (getHeight() / 2)));\n// System.out.println(getBoundsInLocal().getWidth());\n// System.out.println(widthProperty());\n\n if (isUserClick) {\n double new_x=getParent().sceneToLocal(x,y).getX();\n double new_y=getParent().sceneToLocal(x,y).getY();\n setX(new_x);\n setY(new_y);\n relocate(\n// (getParent().sceneToLocal(x,y).getX() - (widthCountry / 2)),\n// (getParent().sceneToLocal(x,y).getY() - (heightCountry / 2))\n new_x,new_y\n );\n } else {\n relocate(x,y);\n }\n\n\n }",
"@NonNull\n @Override\n public PointF transformMeteringPoint(@NonNull PointF point) {\n PointF scaled = new PointF();\n scaled.x = -1000F + (point.x / previewSize.getWidth()) * 2000F;\n scaled.y = -1000F + (point.y / previewSize.getHeight()) * 2000F;\n\n // Apply rotation to this point.\n // https://academo.org/demos/rotation-about-point/\n PointF rotated = new PointF();\n double theta = ((double) displayToSensor) * Math.PI / 180;\n rotated.x = (float) (scaled.x * Math.cos(theta) - scaled.y * Math.sin(theta));\n rotated.y = (float) (scaled.x * Math.sin(theta) + scaled.y * Math.cos(theta));\n LOG.i(\"scaled:\", scaled, \"rotated:\", rotated);\n return rotated;\n }",
"public void updatePosition(double dt)\n {\n if (!projectedVelocity.equals(Vector3.ZERO))\n {\n projectedPosition = projectedPosition.add(projectedVelocity.multiply(dt));\n }\n }",
"public void setPosition(Point newPosition);",
"public void mou(){\n\n this.setY(getY() + getVelocitatY());\n this.setX(getX() + getVelocitatX());\n\n }",
"public void moveToPoint(int x, int y) {\n /**\n * DO NOT EDIT THIS CODE TO REMOVE DUPLICATIONS IT WILL BREAK MULTIPLAYER\n * SERIOUSLY JUST DO NOT DO IT\n *\n * DON'T DO IT\n *\n *\n * JUST DON'T TOUCH THIS CODE AT ALL\n */\n AbstractHero hero = map.getCurrentTurnHero();\n\n // This short circuits but if it's not multiplayer the second statement will do nothing\n if (map.moveEntity(map.getCurrentTurnHero(), x, y)) {\n map.updateVisibilityArray();\n visionChanged = true;\n gameState.updateMovementGoal(x, y);\n }\n\n updateLiveTileEffectsOnCharacter(hero);\n gameChanged = true;\n minimapChanged = true;\n visionChanged = true;\n movementChanged = true;\n\n\n centerMapOnCurrentHero();\n }",
"public void moveCamera(int dX, int dY) {\n cameraX += dX;\n cameraY += dY;\n reposition();\n }",
"public void offsetCamera(Location offset){\n //updateCoordinateToScreenPosition();\n xCameraOffset = offset.getX();\n yCameraOffset = offset.getY();\n }",
"public void updateCamera(int x, int y) {\n gc.getCamera().setPosition(x, y);\n\n // DOWN\n if (gc.getCamera().getY() > gc.getHeight()\n - gc.getCamera().getViewportSizeY()) {\n gc.getCamera().setY(gc.getHeight()\n - gc.getCamera().getViewportSizeY());\n }\n\n // RIGHT\n if (gc.getCamera().getX() > gc.getWidth()\n - gc.getCamera().getViewportSizeX()) {\n gc.getCamera().setX(gc.getWidth()\n - gc.getCamera().getViewportSizeX());\n }\n\n // LEFT\n if (gc.getCamera().getX() < 0) {\n gc.getCamera().setX(0);\n }\n\n // UP\n if (gc.getCamera().getY() < 0) {\n gc.getCamera().setY(0);\n }\n }",
"public void setPoint( Float point ) {\n this.point = point;\n }",
"public void panView() {\n double xDistance = currentXOffset - targetXOffset;\n double yDistance = currentYOffset - targetYOffset;\n\n xDistance *= -0.5;\n yDistance *= -0.5;\n\n boolean clearX = Math.abs(xDistance) < 2;\n if (clearX) {\n currentXOffset = targetXOffset;\n } else {\n currentXOffset += xDistance;\n }\n\n boolean clearY = Math.abs(xDistance) < 2;\n if (clearY) {\n currentYOffset = targetYOffset;\n } else {\n currentYOffset += yDistance;\n }\n\n doPan = !clearX || !clearY;\n\n gameChanged = true;\n\n }",
"public void updateMvpMatrix()\n\t\t{\n\t\t\t// Set the matrix, specifying the edges of the visible canvas and the near and far clipping planes.\n\t\t\tMatrix.orthoM(mvpMatrix, 0,\n\t\t\t\t\t-viewportWidth / (2f * zoom) + cameraX,\n\t\t\t\t\tviewportWidth / (2f * zoom) + cameraX,\n\t\t\t\t\t-viewportHeight / (2f * zoom) + cameraY,\n\t\t\t\t\tviewportHeight / (2f * zoom) + cameraY, -1, 1);\n\t\t}",
"public void relocateToPoint (Point2D p) {\n\n\t\t//relocates the object to a point that has been converted to\n\t\t//scene coordinates\n\t\tPoint2D localCoords = getParent().sceneToLocal(p);\n\n\t\tdouble x = localCoords.getX() - (getBoundsInLocal().getWidth() / 2);\n\t\tdouble y = localCoords.getY() - (getBoundsInLocal().getHeight() / 2);\n\n\t\trelocate ( (int) (x), (int) (y) );\n\t}",
"void updateStepCoordiantes(){\n if(xIncreasing) {\n lat = lat + STEP_LENGTH * yCompMotion * degToMRatio;\n displayLat = displayLat + STEP_LENGTH*yCompMotion*degToMRatio;\n }\n else{\n lat = lat - STEP_LENGTH * yCompMotion * degToMRatio;\n displayLat = displayLat - STEP_LENGTH*yCompMotion*degToMRatio;\n }\n if(yIncreasing) {\n lon = lon + STEP_LENGTH * xCompMotion * degToMRatio;\n dispalyLon= dispalyLon + STEP_LENGTH*xCompMotion*degToMRatio;\n }\n else{\n lon = lon - STEP_LENGTH * xCompMotion * degToMRatio;\n dispalyLon= dispalyLon - STEP_LENGTH*xCompMotion*degToMRatio;\n }\n }",
"public void setRobotLocation(Point p);",
"public void updatePosition() {\n \t\r\n \tx += dx;\r\n \ty += dy;\r\n \t\r\n\t}",
"public void moveCam() {\n float x = this.cam_bind_x; //current pos the camera is binded to\n float y = this.cam_bind_y;\n\n //this amazing camera code is from: https://stackoverflow.com/questions/24047172/libgdx-camera-smooth-translation\n Vector3 target = new Vector3(x+MathUtils.cos(Global.m_angle)*20,y+MathUtils.sin(Global.m_angle)*20,0);\n final float speed = 0.1f, ispeed=1.0f-speed;\n\n Vector3 cameraPosition = cam.position;\n cameraPosition.scl(ispeed);\n target.scl(speed);\n cameraPosition.add(target);\n cam.position.set(cameraPosition);\n\n this.updateCam();\n\n }",
"public void setLookAtPoint(Vector3f lookAtPoint) {\n\t\tthis.mLookAtPoint = lookAtPoint;\n\t\tthis.update();\n\t}",
"void moveToPoint(float x, float y) {\n _x = x;\n _y = y;\n }",
"public void setMoveModifier(Point point) {\n\t\tthis.translation = point;\n\t}",
"@Override\n public void simpleUpdate(float tpf) {\n listener.setLocation(cam.getLocation());\n listener.setRotation(cam.getRotation());\n }",
"public void moveViewTo(int newX, int newY) {\n int scaledWidth = (int) (TileDataRegister.TILE_WIDTH * scale);\n int scaledHeight = (int) (TileDataRegister.TILE_HEIGHT * scale);\n int baseX = (int) (map.getWidth() * TileDataRegister.TILE_WIDTH * scale) / 2;\n\n int x = baseX + (newY - newX) * scaledWidth / 2;\n x -= viewPortWidth * 0.5;\n\n int y = (newY + newX) * scaledHeight / 2;\n y -= viewPortHeight * 0.5;\n\n targetXOffset = -1 * x;\n targetYOffset = -1 * y;\n\n doPan = true;\n\n gameChanged = true;\n }",
"private void moveCamera(float tpf) {\n //Place the camera at the node\n this.getCamera().setLocation(cameraNode.getLocalTranslation().multLocal(1,0,1).add(0, 2, 0));\n cameraNode.lookAt(cam.getDirection().mult(999999), new Vector3f(0,1,0)); //Makes the gun point\n if (im.up) {\n cameraNode.move(getCamera().getDirection().mult(tpf).mult(10));\n }\n else if (im.down) {\n cameraNode.move(getCamera().getDirection().negate().mult(tpf).mult(10));\n }\n if (im.right) {\n cameraNode.move(getCamera().getLeft().negate().mult(tpf).mult(10));\n }\n else if (im.left) {\n cameraNode.move(getCamera().getLeft().mult(tpf).mult(10));\n }\n }",
"public void setCameraPosition(Point position) {\n setCamera(position, getCamera().lookAt);\n }",
"public void update(Vehicle v, float dt) {\nPoint2D.Float p = v.getPosition();\r\nPoint2D.Float tp = target.getPosition();\r\nPoint2D.Float desired_velocity = new Point2D.Float(tp.x - p.x , tp.y - p.y);\r\nVehicle.scale(desired_velocity, v.getMaxSpeed());\r\nv.updateSteering(desired_velocity.x, desired_velocity.y);\r\n}",
"@Override\n public void moveToWaypoint(Vector3f location, float secTime) {\n motionPath.clearWayPoints();\n motionPath.addWayPoint(new Vector3f((int)Math.round(getWorldTranslation().x),Main.BLOCKHEIGHT,(int)Math.round(getWorldTranslation().z)));\n motionPath.addWayPoint(location);\n motionPath.addListener(this);\n if(motionEvent != null && motionEvent.isEnabled())\n motionEvent.stop();\n motionEvent = new MotionEvent(this,motionPath, secTime);\n motionEvent.setDirectionType(MotionEvent.Direction.Path);\n motionEvent.play();\n Quaternion quat = motionEvent.getRotation();\n }",
"@Override\n public void onLocationUpdated(Location location) {\n fromPosition = new LatLng(location.getLatitude(), location.getLongitude());\n btn1.setVisibility(View.VISIBLE);\n moveCamera(new LatLng(location.getLatitude(), location.getLongitude()),\n DEFAULT_ZOOM, \"My Location\");\n }",
"private synchronized void updatePose(Move event) {\n\t\tfloat angle = event.getAngleTurned() - angle0;\n\t\tfloat distance = event.getDistanceTraveled() - distance0;\n\t\tdouble dx = 0, dy = 0;\n\t\tdouble headingRad = (Math.toRadians(heading));\n\n\t\tif (event.getMoveType() == Move.MoveType.TRAVEL\n\t\t\t\t|| Math.abs(angle) < 0.2f) {\n\t\t\tdx = (distance) * (float) Math.cos(headingRad);\n\t\t\tdy = (distance) * (float) Math.sin(headingRad);\n\t\t} else if (event.getMoveType() == Move.MoveType.ARC) {\n\t\t\tdouble turnRad = Math.toRadians(angle);\n\t\t\tdouble radius = distance / turnRad;\n\t\t\tdy = radius\n\t\t\t\t\t* (Math.cos(headingRad) - Math.cos(headingRad + turnRad));\n\t\t\tdx = radius\n\t\t\t\t\t* (Math.sin(headingRad + turnRad) - Math.sin(headingRad));\n\t\t}\n\t\tx += dx;\n\t\ty += dy;\n\t\theading = normalize(heading + angle); // keep angle between -180 and 180\n\t\tangle0 = event.getAngleTurned();\n\t\tdistance0 = event.getDistanceTraveled();\n\t\tcurrent = !event.isMoving();\n\t}",
"public void changePos(double xP, double yP){ \n this.xCoor += xP;\n this.yCoor += yP;\n \n }",
"protected synchronized void updatePoints(double points)\n\t{\n\t\tif(Config.VIT_MAX_PLAYER_LVL > _player.getLevel())\n\t\t{\n\t\t\tif(Config.VIT_CHECK_LUCKY_SKILL)\n\t\t\t{\n\t\t\t\tif(_player.getSkillLevel(LUCKY_SKILL) > 0)\n\t\t\t\t\treturn;\n\t\t\t}\n\t\t\telse\n\t\t\t\treturn;\n\t\t}\n\n\t\tint prevLvl = getLevel();\n\t\tint prevPoints = (int) _vitPoints;\n\n\t\tchangePoints(points);\n\t\tsendChangeMessage(prevPoints, prevLvl);\n\t}",
"@Override\n public void onDrawFrame(GL10 gl10) {\n glClear(GL_COLOR_BUFFER_BIT);\n\n Location drawCameraLocation;\n\n //Don't draw until camera location is known\n if (mCurrentCameraLocation == null && mNewCameraLocation == null) {\n //Log.d(LOG_TAG, \"onDraw 1\");\n return;\n } else if (mCurrentCameraLocation == null && mNewCameraLocation != null) {\n //Log.d(LOG_TAG, \"onDraw 2\");\n mCurrentCameraLocation = mNewCameraLocation;\n drawCameraLocation = mCurrentCameraLocation;\n } else if (mCurrentCameraLocation != null && mNewCameraLocation != null && mTargetCameraLocation == null) {\n //Log.d(LOG_TAG, \"onDraw 3\");\n\n float distance = mNewCameraLocation.distanceTo(mCurrentCameraLocation);\n\n ///Increment step to target location when new camera location\n // is greater than 1.5 meters from current location\n if (distance > 1.5f) {\n mTargetCameraLocation = mNewCameraLocation;\n }\n\n drawCameraLocation = mCurrentCameraLocation;\n }\n\n //Provide increment location (if necessary) for smooth changes in camera positions\n else if (mCurrentCameraLocation != null && mTargetCameraLocation != null) {\n //Log.d(LOG_TAG, \"onDraw 4\");\n float cameraDistance = mCurrentCameraLocation.distanceTo(mTargetCameraLocation);\n\n\n float x = (float) mCameraStep / TOTALCAMERASTEPS;\n //float y = (float)Math.pow(x,3)*(x*(6*x-15)+10);\n //float y = (float)Math.pow(x,2)*(3-2*x); //smoothstep\n float y = x;\n\n float incDistance = y * cameraDistance;\n float bearing = mCurrentCameraLocation.bearingTo(mTargetCameraLocation);\n\n bearing = (bearing + 360) % 360;\n\n drawCameraLocation = calculateDestinationLocation(mCurrentCameraLocation, bearing, incDistance);\n drawCameraLocation.setAccuracy(mTargetCameraLocation.getAccuracy());\n\n mCameraStep++;\n\n if (mCameraStep == TOTALCAMERASTEPS) {\n //mCurrentCameraLocation = mTargetCameraLocation;\n mCurrentCameraLocation = drawCameraLocation;\n mTargetCameraLocation = null;\n mCameraStep = 0;\n }\n } else {//Never should come to this\n Log.d(LOG_TAG, \"onDraw 5\");\n\n drawCameraLocation = mCurrentCameraLocation;\n }\n\n /*\n setLookAtM(viewMatrix, 0, viewValues[0], viewValues[1], viewValues[2]\n , viewValues[3], viewValues[4], viewValues[5]\n , viewValues[6], viewValues[7], viewValues[8]);\n */\n\n multiplyMM(viewMatrix, 0, rotationMatrix, 0, modelSensorMatrix, 0);\n // Multiply the view and projection matrices together.\n multiplyMM(viewProjectionMatrix, 0, projectionMatrix, 0, viewMatrix, 0);\n\n\n //Process each image texture with drawCameraLocation\n for (ImageTexture it : mImageTextures) {\n\n\n if (it == null) {\n return;\n }\n\n double ItAngle;\n double distance = drawCameraLocation.distanceTo(it.mLocation);\n\n\n\n /*\n if (distance > (drawCameraLocation.getAccuracy() /0.68f))\n {\n ItAngle = (drawCameraLocation.bearingTo(it.mLocation) + 360) % 360;\n it.rotateAroundCamera((float) ItAngle );\n\n Log.d(LOG_TAG, \"onDrawFrame: distance = \" + distance + \" > \" + (drawCameraLocation.getAccuracy() /0.68f) + \", ItAngle = \" +ItAngle );\n }\n //Within accuracy radius\n else {\n distance = 4;\n }\n\n */\n\n ItAngle = (drawCameraLocation.bearingTo(it.mLocation) + 360) % 360;\n\n\n if (distance != 0 || ItAngle != 0.0f) {\n it.rotateAroundCamera((float) ItAngle);\n it.moveFromToCamera((float) -distance * 0.79f);\n }\n\n\n Log.d(LOG_TAG, \"onDrawFrame: distance = \" + distance + \" > \" + (drawCameraLocation.getAccuracy() / 0.68f) + \", ItAngle = \" + ItAngle);\n Log.d(LOG_TAG, \"onDrawFrame: drawCameraLocation = \" + drawCameraLocation.getLatitude() + \", \" + drawCameraLocation.getLongitude()\n + \" \" + it.mLocation.getLatitude() + \", \" + it.mLocation.getLongitude());\n\n\n String debugStr = \"Camera: \" + String.format(\"%5.6f\", drawCameraLocation.getLatitude()) + \", \" + String.format(\"%5.6f\", drawCameraLocation.getLongitude())\n + \"\\nAccuracy: \" + String.format(\"%5.7f\", drawCameraLocation.getAccuracy()) + \", Z: \" + String.format(\"%3.1f\", mAzimuth)\n //+ \"\\nImage: \" + String.format(\"%5.7f\",it.mLocation.getLatitude()) + \", \" + String.format(\"%5.7f\",it.mLocation.getLongitude())\n + \"\\nDistance: \" + String.format(\"%5.5f\", distance) + \", ItAngle: \" + String.format(\"%3.7f\", it.mCameraRotationAngle);\n\n\n float[] modelMatrix = it.calculateModelMatrix();\n multiplyMM(modelViewProjectionMatrix, 0, viewProjectionMatrix, 0, modelMatrix, 0);\n mTextureShaderProgram.useProgram();\n mTextureShaderProgram.setUniforms(modelViewProjectionMatrix, it.mTextureId, it.opacity);//every object sets its own mvpMatrix, texture, and alpha values\n it.bindData(mTextureShaderProgram);\n it.draw();\n }\n }",
"private void setView( boolean reset_zoom )\n {\n float azimuth = getAzimuthAngle();\n float altitude = getAltitudeAngle();\n float distance = getDistance();\n\n float r = (float)(distance * Math.cos( altitude * Math.PI/180.0 ));\n\n float x = (float)(r * Math.cos( azimuth * Math.PI/180.0 ));\n float y = (float)(r * Math.sin( azimuth * Math.PI/180.0 ));\n float z = (float)(distance * Math.sin( altitude * Math.PI/180.0 ));\n\n float vrp[] = getVRP().get();\n \n setCOP( new Vector3D( x + vrp[0], y + vrp[1], z + vrp[2] ) );\n\n apply( reset_zoom );\n }",
"private Point getUpdatedPoint(Movable obj, double newX, double newY){\n\t if(obj.getMovingScheme() == Movable.APPROX){\n\t return new Point((int) ((newX + GRID_SIZE / 2) / GRID_SIZE),\n (int) ((newY + GRID_SIZE / 2) / GRID_SIZE));\n } else if(obj.getMovingScheme() == Movable.EXACT){\n Point newPoint = obj.getLocation().clone();\n int mapX, mapY;\n switch (obj.getFacing()){\n case LEFT:\n if((mapX = (int)(newX + GRID_SIZE) / GRID_SIZE) == obj.getLocation().getX())\n break;\n newPoint.setX(mapX);\n break;\n case UP:\n if((mapY = (int)(newY + GRID_SIZE) / GRID_SIZE) == obj.getLocation().getY())\n break;\n newPoint.setY(mapY);\n break;\n case RIGHT:\n if((mapX = (int)newX / GRID_SIZE) == obj.getLocation().getX())\n break;\n newPoint.setX(mapX);\n break;\n case DOWN:\n if((mapY = (int)newY / GRID_SIZE) == obj.getLocation().getY())\n break;\n newPoint.setY(mapY);\n break;\n }\n return newPoint;\n }\n return null;\n }",
"public void setCameraPos(CamPos in){\r\n\t\tresolveCamPos(in);\r\n\t\tpan_servo.setAngle(cur_pan_angle);\r\n\t\ttilt_servo.setAngle(cur_tilt_angle);\r\n\t\t\r\n\t\t\r\n\t}",
"public void move(TrackerState state) {\n\t\t\n\t\tcurrentPosition[0] = state.devicePos[0];\n\t\tcurrentPosition[1] = state.devicePos[1];\n\t\tcurrentPosition[2] = state.devicePos[2];\n\t\t\n\t\tboolean processMove = false;\n\t\t\n\t\tboolean isWheel = (state.actionType == TrackerState.TYPE_WHEEL);\n\t\tboolean isZoom = (isWheel || state.ctrlModifier);\n\t\t\n\t\tif (isZoom) {\n\t\t\t\n\t\t\tdirection[0] = 0;\n\t\t\tdirection[1] = 0;\n\t\t\t\n\t\t\tif (isWheel) {\n\t\t\t\tdirection[2] = state.wheelClicks * 0.1f;\n\t\t\t\t\n\t\t\t} else if (state.ctrlModifier) {\n\t\t\t\tdirection[2] = (currentPosition[1] - startPosition[1]);\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\tdirection[2] = 0;\n\t\t\t}\n\t\t\t\n\t\t\tif (direction[2] != 0) {\n\t\t\t\t\n\t\t\t\tdirection[2] *= 16;\n\t\t\t\t\n\t\t\t\tdata.viewpointTransform.getTransform(startViewMatrix);\n\t\t\t\tstartViewMatrix.get(positionVector);\n\t\t\t\t\n\t\t\t\tinVector.x = startViewMatrix.m02;\n\t\t\t\tinVector.y = startViewMatrix.m12;\n\t\t\t\tinVector.z = startViewMatrix.m22;\n\t\t\t\tinVector.normalize();\n\t\t\t\tinVector.scale(direction[2]);\n\t\t\t\t\n\t\t\t\tpositionVector.add(inVector);\n\t\t\t\t\n\t\t\t\t// stay above the floor\n\t\t\t\tif (positionVector.y > 0) {\n\t\t\t\t\tdestViewMatrix.set(startViewMatrix);\n\t\t\t\t\tdestViewMatrix.setTranslation(positionVector);\n\t\t\t\t\t\n\t\t\t\t\tprocessMove = true;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t\n\t\t\tdirection[0] = -(startPosition[0] - currentPosition[0]);\n\t\t\tdirection[1] = -(currentPosition[1] - startPosition[1]);\n\t\t\tdirection[2] = 0;\n\t\t\t\n\t\t\tfloat Y_Rotation = direction[0];\n\t\t\tfloat X_Rotation = direction[1];\n\t\t\t\n\t\t\tif( ( Y_Rotation != 0 ) || ( X_Rotation != 0 ) ) {\n\t\t\t\t\n\t\t\t\tdouble theta_Y = -Y_Rotation * Math.PI;\n\t\t\t\tdouble theta_X = -X_Rotation * Math.PI;\n\t\t\t\t\n\t\t\t\tdata.viewpointTransform.getTransform(startViewMatrix);\n\t\t\t\tstartViewMatrix.get(positionVector);\n\t\t\t\t\n\t\t\t\tpositionVector.x -= centerOfRotation.x;\n\t\t\t\tpositionVector.y -= centerOfRotation.y;\n\t\t\t\tpositionVector.z -= centerOfRotation.z;\n\t\t\t\t\n\t\t\t\tif (theta_Y != 0) {\n\n\t\t\t\t\trot.set(0, 1, 0, (float)theta_Y);\n\t\t\t\t\tmtx.set(rot);\n\t\t\t\t\tmtx.transform(positionVector);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (theta_X != 0) {\n\t\t\t\t\t\n\t\t\t\t\tvec.set(positionVector);\n\t\t\t\t\tvec.normalize();\n\t\t\t\t\tfloat angle = vec.angle(Y_AXIS);\n\t\t\t\t\t\n\t\t\t\t\tif (angle == 0) {\n\t\t\t\t\t\tif (theta_X > 0) {\n\t\t\t\t\t\t\trightVector.x = startViewMatrix.m00;\n\t\t\t\t\t\t\trightVector.y = startViewMatrix.m10;\n\t\t\t\t\t\t\trightVector.z = startViewMatrix.m20;\n\t\t\t\t\t\t\trightVector.normalize();\n\t\t\t\t\t\t\trot.set(rightVector.x, 0, rightVector.z, (float)theta_X);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\trot.set(0, 0, 1, 0);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif ((theta_X + angle) < 0) {\n\t\t\t\t\t\t\ttheta_X = -(angle - 0.0001f);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tvec.y = 0;\n\t\t\t\t\t\tvec.normalize();\n\t\t\t\t\t\trot.set(vec.z, 0, -vec.x, (float)theta_X);\n\t\t\t\t\t}\n\t\t\t\t\tmtx.set(rot);\n\t\t\t\t\tmtx.transform(positionVector);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tpositionPoint.x = positionVector.x + centerOfRotation.x;\n\t\t\t\tpositionPoint.y = positionVector.y + centerOfRotation.y;\n\t\t\t\tpositionPoint.z = positionVector.z + centerOfRotation.z;\n\t\t\t\t\n\t\t\t\t// don't go below the floor\n\t\t\t\tif (positionPoint.y > 0) {\n\t\t\t\t\t\n\t\t\t\t\tmatrixUtils.lookAt(positionPoint, centerOfRotation, Y_AXIS, destViewMatrix);\n\t\t\t\t\tmatrixUtils.inverse(destViewMatrix, destViewMatrix);\n\t\t\t\t\t\n\t\t\t\t\tprocessMove = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (processMove) {\n\t\t\t\n\t\t\tboolean collisionDetected = \n\t\t\t\tcollisionManager.checkCollision(startViewMatrix, destViewMatrix);\n\t\t\t\n\t\t\tif (!collisionDetected) {\n\t\t\t\tAV3DUtils.toArray(destViewMatrix, array);\n\t\t\t\tChangePropertyTransientCommand cptc = new ChangePropertyTransientCommand(\n\t\t\t\t\tve, \n\t\t\t\t\tEntity.DEFAULT_ENTITY_PROPERTIES, \n\t\t\t\t\tViewpointEntity.VIEW_MATRIX_PROP,\n\t\t\t\t\tarray,\n\t\t\t\t\tnull);\n\t\t\t\tcmdCntl.execute(cptc);\n\t\t\t\tif (statusManager != null) {\n\t\t\t\t\tstatusManager.fireViewMatrixChanged(destViewMatrix);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tstartPosition[0] = currentPosition[0];\n\t\tstartPosition[1] = currentPosition[1];\n\t\tstartPosition[2] = currentPosition[2];\n\t}",
"public void updatePosition() {\n\n this.x = this.temp_x;\n this.y = this.temp_y;\n this.ax = 0;\n this.ay = 0;\n\t\tthis.axplusone = 0;\n this.ayplusone = 0;\n \n }",
"public void updatePlayer() {\n if(this.hasCam) {\n this.camDir.set(cam.getDirection()).multLocal(0.3f);\n this.camLeft.set(cam.getLeft()).multLocal(0.2f);\n //initialize the walkDirection value so it can be recalculated\n walkDirection.set(0,0,0);\n if (this.left) {\n this.walkDirection.addLocal(this.camLeft);\n }\n if (this.right) {\n this.walkDirection.addLocal(this.camLeft.negate());\n }\n if (this.up) {\n this.walkDirection.addLocal(this.camDir);\n }\n if (this.down) {\n this.walkDirection.addLocal(this.camDir.negate());\n }\n this.mobControl.setWalkDirection(this.walkDirection);\n //player.get\n cam.setLocation(this.mobControl.getPhysicsLocation().add(0,1.5f,0));\n this.setRootPos(this.mobControl.getPhysicsLocation().add(0,-0.75f,0));\n this.setRootRot(this.camDir, this.camLeft);\n }\n // If the actor control does not have ownership of cam, do nothing\n }",
"public Point applyToPoint(Point p, double dt) {\r\n p.setX(p.getX() + dt * this.dx);\r\n p.setY(p.getY() + dt * this.dy);\r\n return p;\r\n }",
"public void move(Point p);",
"@Override\n public void onLocationChanged(Location location) {\n //Log.i(TAG, \"New Location: \" + location.getLatitude() + \" \" + location.getLongitude());\n if (isDrawing) {\n //We are drawing so add a point and move the camera accordingly\n currentDrawing.addPoint(new LatLng(location.getLatitude(), location.getLongitude()), currentColor);\n LatLng userLocation = new LatLng(location.getLatitude(), location.getLongitude());\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(userLocation, 20));\n }\n }",
"public abstract void setPosition(Point2D position);",
"void updatePosition() {\n\t\t\n\t\tcoords.x = body.getPosition().x*Simulation.meterToPixel;\n\t\tcoords.y = body.getPosition().y*Simulation.meterToPixel;\n\t\tspeed.x = body.m_linearVelocity.x;\n\t\tspeed.y = body.m_linearVelocity.y;\n\t}",
"private void setCamera() {\n\t\tVector viewTranslation = controller.getCameraPosition();\n\n\t\tGL11.glClear(GL11.GL_COLOR_BUFFER_BIT | GL11.GL_DEPTH_BUFFER_BIT);\n\t\tGL11.glMatrixMode(GL11.GL_PROJECTION);\n\t\tGL11.glLoadIdentity();\n\n\t\tfloat whRatio = (float) windowWidth / (float) windowHeight;\n\t\tGLU.gluPerspective(controller.getFOV(), whRatio, 1, 100000);\n\t\tGLU.gluLookAt((float) viewTranslation.x, (float) viewTranslation.y,\n\t\t\t\t(float) controller.getCameraDistance(), (float) viewTranslation.x,\n\t\t\t\t(float) viewTranslation.y, 0, 0, 1, 0);\n\n\t\tGL11.glMatrixMode(GL11.GL_MODELVIEW);\n\t\tGL11.glLoadIdentity();\n\t}",
"@Override\n public void setSetpoint(double setpoint) {\n if (getController() != null) {\n getController().setSetpoint(Utilities.clip(setpoint, Constants.Hood.MIN_ANGLE, Constants.Hood.MAX_ANGLE));\n }\n super.setSetpoint(Utilities.clip(setpoint, Constants.Hood.MIN_ANGLE, Constants.Hood.MAX_ANGLE));\n }",
"public void setPosition(Point position);",
"private static void verifyViewPoint() {\n if (viewPoint.x < 0)\n viewPoint.x = 0;\n if (viewPoint.y < 0)\n viewPoint.y = 0;\n if (viewPoint.x > map.WIDTH - GAME_WIDTH * zoom)\n viewPoint.x = map.WIDTH - ((int) (GAME_WIDTH * zoom));\n if (viewPoint.y > map.HEIGHT - GAME_HEIGHT * zoom)\n viewPoint.y = map.HEIGHT - ((int) (GAME_HEIGHT * zoom));\n }",
"public abstract void setPoint(Point p);",
"@Override\n\tpublic void moveCamera() {\n\n\t}",
"public void relocateToPoint (Point2D p) {\n\t\tPoint2D localCoords = getParent().sceneToLocal(p);\r\n\r\n\t\trelocate ( \r\n\t\t\t\t(int) (localCoords.getX() - (getBoundsInLocal().getWidth() / 2)),\r\n\t\t\t\t(int) (localCoords.getY() - (getBoundsInLocal().getHeight() / 2))\r\n\t\t\t\t);\r\n\t}",
"public void setLocation(Point newLocation) {\r\n this.p = newLocation;\r\n }",
"private void pointCameraAt(Point3D target,Group root){\n for(Node node: root.getChildren()){\n node.setTranslateX(node.getTranslateX()-xOffset);\n node.setTranslateY(node.getTranslateY()-yOffset);\n node.setTranslateZ(node.getTranslateZ()-zOffset);\n }\n\n xOffset = -target.getX(); yOffset = -target.getY(); zOffset = -target.getZ();\n\n for(Node node: root.getChildren()){\n node.setTranslateX(node.getTranslateX()+xOffset);\n node.setTranslateY(node.getTranslateY()+yOffset);\n node.setTranslateZ(node.getTranslateZ()+zOffset);\n }\n }",
"public void setPoint(double value) {\r\n this.point = value;\r\n }",
"public void updateLocation();",
"public T setPoint(@NonNull PointF point) {\n return setPoint(point.x, point.y);\n }",
"public void setPosition(ScreenPoint p) {\n setX(p.x);\n setY(p.y);\n }",
"public Point applyToPoint(Point p) {\n Point newP;\n double x = p.getX() + this.dxVelocity;\n double y = p.getY() + this.dyVelocity;\n newP = new Point(x, y);\n return newP;\n }",
"protected void update(){\n\t\t_offx = _x.valueToPosition(0);\n\t\t_offy = _y.valueToPosition(0);\n\t}",
"private void updatePosition(){\n updateXPosition(true);\n updateYPosition(true);\n }",
"public void reach(Pose pose) throws ManipulatorException;",
"private void updateLocation() {\n myLocationOnScreenRef.set(myComponent.getLocationOnScreen());\n }",
"public abstract void move(Point point);",
"Viewpoint createViewpoint();",
"void setPose(IPose2D newPose);",
"@Override\n public void move(){\n setDirectionSpeed(180, 7);\n this.moveTowardsAPoint(target.getCenterX(), target.getCenterY());\n }",
"public final void setToPoint(Vector toPoint) {\n\t\ttransform.setToPoint(toPoint);\n\t}",
"public void update()\n {\n scene.realDistance(cfg,\n segway.position(),\n segway.pitch(),\n segway.yaw(),\n result);\n \n scale.setX(result.distance());\n }",
"public void update(){\r\n\t\tList<Point> list = new ArrayList<Point>();\r\n\t\t\r\n\t\tlist.addAll(Arrays.asList(points));\r\n\t\t\r\n\t\tsetPoints(list);\r\n\t}",
"public void updatePosition(Coordinate c) {\n\t\tpointMoveTo.setCoordinate(c);\n\t\tPedSimCity.agents.setGeometryLocation(agentLocation, pointMoveTo);\n\t}",
"public void updatePositionOnMap(RVOAgent agent, double x, double y) {\n agentSpace.setObjectLocation(agent, new Double2D(x, y));\n if(agent.hasDevice()){\n deviceSpace.setObjectLocation(agent.getDevice(), new Double2D(x, y));\n }\n }",
"private void updateUserPosition()\n {\n LatLng current = new LatLng(mCurrentLocation.getLatitude(), mCurrentLocation.getLongitude());\n circle.setCenter(current);\n Log.i(\"ZOOM:\", \" \" + mMap.getCameraPosition().zoom);\n mMap.moveCamera(CameraUpdateFactory.newLatLng(current));//move map to the user's position\n updateMap();\n }",
"public void setLocation(float x, float y);",
"@Override\n public void mousePressed(MouseEvent e) {\n // this.getVision().getCare().set(this.getVision().getSoul().newMemento());\n if (e.getButton() != MouseEvent.BUTTON1) {\n return;\n }\n if (getVerticallyPointOnGraph(e.getX(), e.getY()) != null) {\n setCurrentPoint(getVerticallyPointOnGraph(e.getX(), e.getY()));\n } else {\n setCurrentPoint(null);\n }\n \n if (getCurrentPoint() != null) {\n double toy = Math.min(Math.max(tCanvasPadding, e.getY()), getHeight() - bCanvasPadding);\n // System.out.println(\"moving to [\"+tox+\",\"+toy+\"]\");\n adapter.moveImagePoint(getCurrentPoint(), c2gy(toy));\n // getCurrentPoint().movePoint(getCurrentPoint(),\n // c2gx(tox),c2gy(toy,getCurrentPoint().getDataSet()));\n }\n // System.out.println(\"Current point is \"+currentPoint);\n }",
"public void navigateToPoint(LatLng latLng,float tilt, float bearing, float zoom,boolean animate) {\n CameraPosition position =\n new CameraPosition.Builder().target(latLng)\n .zoom(zoom)\n .bearing(bearing)\n .tilt(tilt)\n .build();\n\n changeCameraPosition(position, animate);\n\n }"
] | [
"0.6709527",
"0.6681653",
"0.6457044",
"0.6419269",
"0.62626916",
"0.6236605",
"0.6228098",
"0.6191519",
"0.6155839",
"0.61548084",
"0.6148317",
"0.6107881",
"0.60703826",
"0.6066992",
"0.6063006",
"0.603616",
"0.6019495",
"0.600718",
"0.60062146",
"0.59332067",
"0.5924844",
"0.59153885",
"0.5912857",
"0.5895213",
"0.58900845",
"0.58696187",
"0.5866333",
"0.5862041",
"0.58576804",
"0.5852648",
"0.58439714",
"0.5833874",
"0.5832961",
"0.58285135",
"0.5825553",
"0.5817217",
"0.5810805",
"0.5804803",
"0.58041185",
"0.5800155",
"0.579948",
"0.57975507",
"0.57974374",
"0.5788492",
"0.57673436",
"0.5765404",
"0.5765403",
"0.5760571",
"0.57510877",
"0.5747789",
"0.5745725",
"0.5739741",
"0.5733773",
"0.57118255",
"0.5691568",
"0.5688117",
"0.5673158",
"0.5650587",
"0.5648888",
"0.56460166",
"0.5645887",
"0.564376",
"0.5631114",
"0.5619515",
"0.5615841",
"0.56086797",
"0.5604752",
"0.55976546",
"0.5590737",
"0.55837405",
"0.55777615",
"0.5575062",
"0.5571073",
"0.5568918",
"0.55586165",
"0.5547078",
"0.5537972",
"0.55276275",
"0.5522277",
"0.55129135",
"0.5508907",
"0.5499999",
"0.5498262",
"0.5496913",
"0.54951733",
"0.54901016",
"0.5487027",
"0.5486568",
"0.5484971",
"0.5483418",
"0.548265",
"0.548241",
"0.54787064",
"0.54760516",
"0.5467423",
"0.5463044",
"0.5453612",
"0.54410934",
"0.5440294",
"0.5433571"
] | 0.708188 | 0 |
Checks that viewpoint doesn't be invalid | private static void verifyViewPoint() {
if (viewPoint.x < 0)
viewPoint.x = 0;
if (viewPoint.y < 0)
viewPoint.y = 0;
if (viewPoint.x > map.WIDTH - GAME_WIDTH * zoom)
viewPoint.x = map.WIDTH - ((int) (GAME_WIDTH * zoom));
if (viewPoint.y > map.HEIGHT - GAME_HEIGHT * zoom)
viewPoint.y = map.HEIGHT - ((int) (GAME_HEIGHT * zoom));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean hasValidPoint() {\n return mPoint.x != 0 || mPoint.y != 0;\n }",
"void pointCheck(LatLng point, boolean valid);",
"private boolean isViewerPositionInvalid(ViewerPosition3D position)\n {\n Vector3d location = new Vector3d(position.getLocation());\n double terrainTolerance = TERRAIN_SAFETY_TOLERANCE;\n if (position.getGeoPosition() != null && position.getGeoPosition().getAlt().getReferenceLevel() != ReferenceLevel.TERRAIN)\n {\n terrainTolerance *= 10;\n }\n\n if (!myMapContext.getProjection().isOutsideModel(location.add(location.multiply(terrainTolerance)))\n || Math.abs(location.getX()) > ourMaxOriginDistance\n || Math.abs(location.getY()) > ourMaxOriginDistance\n || Math.abs(location.getZ()) > ourMaxOriginDistance)\n {\n return true;\n }\n\n return false;\n }",
"private boolean isValidPosition(Point pos){\r\n return (0 <= pos.getFirst() && pos.getFirst() < 8 && \r\n 0 <= pos.getSecond() && pos.getSecond() < 8);\r\n }",
"public boolean validStopCheck(){\n return points.validPolygon();\n }",
"public boolean isValid(){\n\t\treturn points.size() >= 2;\n\t}",
"protected boolean checkRep() {\n if ( this.getX() < 0 || this.getY() < 0 || this.getX() >= 20 || this.getY() >= 20 ) {\n return false;\n }\n return true;\n }",
"private boolean verifyBounds() {\r\n\t if((x>RobotController.BOUNDS_X || y>RobotController.BOUNDS_Y)\r\n\t || x<0 || y<0){\r\n\t return false;\r\n\t }\r\n\t return true;\r\n\t }",
"boolean isValid(View view);",
"public boolean inValidSpot(Path p1){\n\t\t// Checks to see it the path piece placed expects an entrance or exit piece out of bounds\n\t\t\n\t\tint largestRow = (height*width-1)/width;\n\t\t\n\t\t// if entrance or exit pos expected is negative, know it is expecting a path outside the top bound\n\t\tif(p1.getEntry()<0 || p1.getExit()<0){\n\t\t\treturn false;\n\t\t}\n\t\t// if entrance or exit's row greater than the maximum row, know it is expecting a path outside bottom bound\n\t\tif(p1.getEntryRow()>largestRow || p1.getExitRow()>largestRow){\n\t\t\treturn false;\n\t\t}\n\t\tint currentRow = p1.getRow();\n\t\tint nextRow=0;\n\t\tif(Math.abs(p1.getPos()-p1.getEntry())==1){\n\t\t\t// If the absolute value of the difference between the current position and its entrance is 1 ...\n\t\t\t// Checking to see if the entrance is expected to be outside of the left or right edges of Map\n\t\t\tnextRow = p1.getEntryRow();\n\t\t\tif(currentRow!=nextRow){\n\t\t\t\t// This means that the entrance expected is not to the left or to the right\n\t\t\t\t// In other words, the entrance is expected in another row\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\tif(Math.abs(p1.getPos()-p1.getExit())==1){\n\t\t\t// If the absolute value of the difference between the current position and its exit is 1 ...\n\t\t\t// Checking to see if the exit is expected to be outside of the left or right edges of Map\n\t\t\tnextRow = p1.getExitRow();\n\t\t\tif(currentRow!=nextRow){\n\t\t\t\t// This means that the exit expected is not to the left or to the right\n\t\t\t\t// In other words, the exit is expected in another row\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t/*\n\t\tif(Math.abs(p1.getPos()-p1.getEntry())==width){\n\t\t\tnextRow = p1.getEntryRow();\n\t\t\tif(p1.getEntry()<0 || nextRow>(height-1/width)){//it used to be calculaterow(height*width-1\n\t\t\t\t//Less than zero would make it on top of the top edge\n\t\t\t\t//First term calculated in this manner because any negative entrance between -1 and \n\t\t\t\t// -width+1 will have an integer rounded to zero. The double casting will give an \n\t\t\t\t// accurate number without losing the sign\n\t\t\t\t\n\t\t\t\t//Greater than height*width-1 would make in lower than the bottom edge\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\tif(Math.abs(p1.getPos()-p1.getExit())==width){\n\t\t\tnextRow = p1.getExitRow();\n\t\t\tif(p1.getEntry()<0 || nextRow>(height-1/width)){//it used to be calculaterow(height*width-1\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t*/\n\t\treturn true;\n\t\t\n\t}",
"public void checkRep()\n {\n assert (x>=0 && x<=19 && y >=0 && y<=19 && (orientation == 0 || orientation == 90 || orientation == 180 || orientation == 270));\n }",
"private boolean hasValidBounds() {\n\n\n\n return false;\n }",
"protected void checkViewDistanceExpiration(DrawContext dc)\n {\n // Determine whether the distance of this shape from the eye has changed significantly. Invalidate the previous\n // extent and expire the shape geometry if it has. \"Significantly\" is considered a 10% difference.\n\n if (!this.isViewDistanceExpiration())\n return;\n\n Vec4 refPt = this.currentData.getReferencePoint();\n if (refPt == null)\n return;\n\n double newRefDistance = dc.getView().getEyePoint().distanceTo3(refPt);\n Double oldRefDistance = this.currentData.getReferenceDistance();\n if (oldRefDistance == null || Math.abs(newRefDistance - oldRefDistance) / oldRefDistance > 0.10)\n {\n this.currentData.setExpired(true);\n this.currentData.setExtent(null);\n this.currentData.setReferenceDistance(newRefDistance);\n }\n }",
"@Override\n\tpublic boolean outOfBounds() {\n\t\treturn this.getY() < 0;\n\t}",
"public void checkOutOfBounds(Point p){\r\n /*If the point is out of bounds, the rotation will be reversed (*(-1)) and the speed in the axis in which\r\n * it is out of bounds is also reversed (*(-1))*/\r\n //If out of bounds on the left\r\n if(p.x <= 0){\r\n p.x = 0;\r\n this.rotationSpeed = this.rotationSpeed * (-1); \r\n this.xSpeed = this.xSpeed * (-1); \r\n }\r\n //If out of bounds on the right\r\n else if(p.x >= this.grid.gridWidth){\r\n p.x = this.grid.gridWidth; \r\n this.rotationSpeed = this.rotationSpeed * (-1); \r\n this.xSpeed = this.xSpeed * (-1); \r\n }\r\n //If out of bounds on the top\r\n if(p.y <= 0){\r\n p.y = 0;\r\n this.rotationSpeed = this.rotationSpeed * (-1);\r\n this.ySpeed = this.ySpeed * (-1);\r\n }\r\n //If out of bounds on the bottom\r\n else if(p.y >= grid.gridHeight){\r\n p.y = grid.gridHeight;\r\n this.rotationSpeed = this.rotationSpeed * (-1);\r\n this.ySpeed = this.ySpeed * (-1);\r\n }\r\n }",
"private boolean isLegalPositon(Position checkPosition){\n if (checkPosition.equalPosition(start)||checkPosition.equalPosition(end))\n return true;\n if(checkPosition.getRow()<0 || checkPosition.getCol()<0 || checkPosition.getRow()>=this.rows || checkPosition.getCol() >= this.cols){\n return false;\n }\n\n if(maze[checkPosition.getRow()][checkPosition.getCol()]== WallType.wall){\n return false;\n }\n return true;\n }",
"private boolean validateOutOfRangeCoordinate() throws IOException {\n int maxValue = Integer.parseInt(Objects.requireNonNull(FileUtils.getProperty(\"max-coordinate-value\")));\n return (Math.abs(getX()) > maxValue) || (Math.abs(getY()) > maxValue);\n }",
"private boolean check(int[] bestPoint) {\n\t\tif (bestPoint[0] > Mirror.spec || bestPoint[1] > Mirror.spec || bestPoint[0] < width - Mirror.spec\n\t\t\t\t|| bestPoint[1] < width - Mirror.spec) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\n\t}",
"protected static boolean outOfFrame(@NotNull Shape shape) {\n\t\tif (shape.position.x + shape.size.x / 2 < Camera.getPosition().x)\n\t\t\treturn (true);\n\t\tif (shape.position.x - shape.size.x / 2 > Display.getWidth() + Camera.getPosition().x)\n\t\t\treturn (true);\n\t\tif (shape.position.y - shape.size.y / 2 > Display.getHeight() + Camera.getPosition().y)\n\t\t\treturn (true);\n\t\treturn shape.position.y + shape.size.y / 2 < Camera.getPosition().y;\n\t}",
"public boolean outOfRange(){\r\n\t\t\treturn (shape.x <=0 ? true : false);\r\n\t\t}",
"public boolean checkVisibility() {\n LocalDateTime now = LocalDateTime.now();\n return (this.viewer != 0 && !now.isAfter(this.destructTime));\n }",
"public void checkInvariant() {\n\t\tif (!(getPositionX() >= 0 && getPositionX() < getEngine().getWidth()))\r\n\t\t\tthrow new InvariantError(\"Error checkInvariant: getPositionX() > 0 && getPositionX() < getEngine().getWidth()\");\r\n\r\n\t\t// inv: getPositionY() >= 0 && getPositionY() < Engine::getHeight()\r\n\t\tif (!(getPositionY() >= 0 && getPositionY() < getEngine().getHeight()))\r\n\t\t\tthrow new InvariantError(\"Error checkInvariant: getPositionY() > 0 && getPositionY() < getEngine().getHeight()\");\r\n\r\n\t\t// inv: isDead() == not (getLife() >= 0)\r\n\t\tif (!(isDead() == !(getLife() > 0)))\r\n\t\t\tthrow new InvariantError(\"Error checkInvariant: isDead() == !getLife() > 0\");\r\n\t\t\r\n\t}",
"boolean judgeValid()\r\n\t{\r\n\t\tif(loc.i>=0 && loc.i<80 && loc.j>=0 && loc.j<80 && des.i>=0 && des.i<80 && des.j>=0 && des.j<80)\r\n\t\t{\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t\t\r\n\t}",
"public boolean checkRep() {\n return location.x() >= 0 && location.x() < board.getWidth() && \n location.y() >= 0 && location.y() < board.getHeight(); \n }",
"private boolean isLegalPos(int row, int col){\r\n return !(row < 0 || row > 7 || col < 0 || col > 7);\r\n }",
"@Override\n protected boolean isValid(java.security.spec.ECPoint point) {\n return convertECPoint(point).isValid();\n }",
"public boolean isInViewport(ObjectWithPosition obj){\n Point viewPoint = convertToViewCoordinates(obj.xCoordinate,obj.yCoordinate);\n if(viewPoint.getX() > 0 && viewPoint.getX() < 1024){\n if(viewPoint.getY() > 0 && viewPoint.getY() < 528){\n return true;\n }\n else return false;\n }\n else return false;\n }",
"private boolean isLegalCoordinate(int row, int col) {\n return row > 0 && row <= getSize() && col > 0 && col <= getSize();\n }",
"private boolean isOutsideParameters(HudPosition hudPosition, int x, int y) {\n int width = x + hudPosition.getWidth();\n int height = y + hudPosition.getHeight();\n\n int[] dimensions = this.getScreenDimensions();\n\n if (width > dimensions[0] - 5) {\n return true;\n\n } else if (height > dimensions[1] - 5) {\n return true;\n\n } else if (hudPosition.getX() < 5) {\n return true;\n\n } else return hudPosition.getY() < 5;\n }",
"private boolean wrongPositioning(int x, int y, LoadedMap map) {\n boolean ans = false;\n if(hasAbove(x, y, map)&&(hasLeft(x, y, map)||hasRight(x, y, map))){\n ans = true;\n }else if (hasBelow(x, y, map)&&(hasLeft(x, y, map)||hasRight(x, y, map))) {\n ans = true;\n }\n return ans;\n }",
"@Test(expected = InvalidWaypointsException.class)\n public void pipeDrawerMisPlacedPoints() {\n Point2D[] waypoints = {\n new Point2D(1, 1),\n new Point2D(2, 2)\n };\n new PipeDrawer(waypoints, null, 1);\n }",
"static Boolean pointInPgm(int x, int y) {\n return (x >= 0 ) && (y >= 0) && (x <= pgmInf.width) && (y <= pgmInf.height);\n }",
"private Vector2d checkOutOfBounds(Vector2d position) {\n\t\t//Check for x\n\t\tif (position.x < 0) position.x = 0;\n\t\tif (position.x > course.TERRAIN_SIZE) position.x = course.TERRAIN_SIZE;\n\t\t//Check for y\n\t\tif (position.y < 0) position.y = 0;\n\t\tif (position.y > course.TERRAIN_SIZE) position.y = course.TERRAIN_SIZE;\n\n\t\treturn new Vector2d(position.x,position.y);\n\t}",
"private void checkRep() {\n assert (width <= Board.SIDELENGTH);\n assert (height <= Board.SIDELENGTH);\n assert (this.boundingBoxPosition.x() >= 0 && this.boundingBoxPosition.x() <= Board.SIDELENGTH);\n assert (this.boundingBoxPosition.y() >= 0 && this.boundingBoxPosition.y() <= Board.SIDELENGTH);\n }",
"public void testSetLocationNegX() {\n try {\n container.setLocation(new Point(-1, 1));\n fail(\"the x of the point is -1, IllegalArgumentException is expected.\");\n } catch (IllegalArgumentException e) {\n // expected\n }\n }",
"public boolean isAtPositionSetPoint(double marginOfError) {\n return isNumberinRange(positionSetPoint, countsToUnits(motor.getSelectedSensorPosition()), marginOfError);\n }",
"boolean checkValidPt(DoubleMatrix1D y){\n for(int dof=0; dof<numDOFs; dof++){\n if(y.get(dof)<DOFmin.get(dof) || y.get(dof)>DOFmax.get(dof))\n return false;\n }\n \n if(of.getValue(y)>thresh)\n return false;\n \n return true;\n }",
"private boolean isOutOfBounds(int row, int col) {\n if (row < 0 || row >= this.getRows()) {\n return true;\n }\n else if (col < 0 || col >= this.getColumns()) {\n return true;\n }\n else {\n return false; // the placement is valid\n }\n }",
"public boolean isValid(int index) {\n\t\treturn points.get(index).isValid();\n\t}",
"boolean hasAgeRangeView();",
"private void checkAnnotation() {\n if (annotMin != -1)\n Assert.condition(annotMin >= 0, \"min isn't >= 0: '\" + annotMin + \"'\");\n if (annotMax != -1)\n Assert.condition(annotMax >= 0, \"max isn't >= 0: '\" + annotMax + \"'\");\n if ((annotMin != -1) && (annotMax != -1))\n Assert.condition(annotMin <= annotMax,\n \"min isn't <= max: '\" + annotMin + \"', '\" + annotMax + \"'\");\n }",
"void test2() {\r\n\t\t\t\t\tPoint3D p = new Point3D(32.103315,35.209039,670);\r\n\t\t\t\t\tassertEquals(true,myCoords.isValid_GPS_Point(p));\r\n\t\t\t\t}",
"boolean hasDistanceView();",
"public boolean hasPoints() {\n\t\treturn !divided && points.size() != 0;\n\t}",
"boolean isPileValid();",
"boolean mo2269a(View view, PointF pointF);",
"private static boolean m36199a(View view, Rect rect) {\n if (!view.getGlobalVisibleRect(rect)) {\n return false;\n }\n int[] iArr = {LinearLayoutManager.INVALID_OFFSET, LinearLayoutManager.INVALID_OFFSET};\n view.getLocationInWindow(iArr);\n int[] iArr2 = {LinearLayoutManager.INVALID_OFFSET, LinearLayoutManager.INVALID_OFFSET};\n view.getLocationOnScreen(iArr2);\n rect.offset(iArr2[0] - iArr[0], iArr2[1] - iArr[1]);\n return true;\n }",
"private boolean outOfBounds(int nidx1){\n\t\treturn (nidx1 < 0 || nidx1 >= numofvert);\n\t}",
"private boolean checkSurroundingOfPoint(Point p) {\n\t\tPoint check = new Point();\n\t\tcheck.x\t\t= p.x;\n\t\tcheck.y \t= p.y;\n\t\t\n\t\tfor(int y = -1; y <= 1; y++) {\n\t\t\tcheck.y += y;\n\t\t\tfor(int x = -1; x <= 1; x++) {\n\t\t\t\tcheck.x += x;\n\t\t\t\tif(occupiedPositions.contains(check)) return false;\n\t\t\t\t//restore values\n\t\t\t\tcheck.x\t= p.x;\n\t\t\t}\n\t\t\t//restore values\n\t\t\tcheck.y = p.y;\n\t\t}\n\t\treturn true;\n\t}",
"@Override\n public boolean isLocationValid(int x, int y)\n {\n return master.isLocationValid(x, y);\n }",
"boolean testCoords(Tester t) {\n return t.checkExpect(this.p3.xCoord(), 50) && t.checkExpect(this.p4.yCoord(), 600);\n }",
"public static boolean isValidPlace(int[] setPos){\n if(setPos[0]<=4 && setPos[0]>=0)\n return (setPos[1]<=4 && setPos[1]>=0);\n return false;\n }",
"private boolean isValid(int x,int y){\n\t\treturn x > -1 && y > -1 && x < width && y<height;\n\t }",
"protected boolean validCoord(int row, int col) {\n\t\treturn (row >= 0 && row < b.size() && col >= 0 && col < b.size());\n\t}",
"@Test\n public void testGPSpingInvalid() {\n assertEquals(0.0, err1.getLat(), PRECISION);\n assertEquals(0.0, err1.getLon(), PRECISION);\n assertEquals(0.0, err2.getLon(), PRECISION);\n assertEquals(0,err1.getTime());\n assertEquals(0,err2.getTime());\n }",
"private boolean isValidCoordinate(int x, int y) {\n return x >= 0 && x < gameState.mapSize\n && y >= 0 && y < gameState.mapSize;\n }",
"public boolean isOnSegment(Point2D point) {\n double x = point.getX();\n double y = point.getY();\n double val = this.a * x + this.b * y + this.c;\n if (val < 0.0) {\n val = -val;\n }\n if (val > EPS) {\n return false;\n }\n\n if ((x < (this.minx - EPS)) || (x > (this.maxx + EPS))) {\n return false;\n }\n if ((y < (this.miny - EPS)) || (y > (this.maxy + EPS))) {\n return false;\n }\n return true;\n }",
"boolean isInview();",
"private boolean canCaptureSomewhere(int x, int y){\n\t\tfor (int i = -2; i <= 2; i=i+4){\n\t\t\tfor (int j = -2; j <= 2; j=j+4){\n\t\t\t\tif (!(x+i < 0 || x+i > N\t\t\n\t\t\t\t|| y+j < 0 || y+j > N)){\t\t//don't give validMove impossible final coordinates\n\t\t\t\t\tif (validMove(x, y, x+i, y+j)) return true;\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"private void assertValidity() {\n if (latitudes.size() != longitudes.size()) {\n throw new IllegalStateException(\"GIS location needs equal number of lat/lon points.\");\n }\n if (!(latitudes.size() == 1 || latitudes.size() >= 3)) {\n throw new IllegalStateException(\"GIS location needs either one point or more than two.\");\n }\n }",
"public boolean getValid(int index) {\n\t\treturn points.get(index).getValid();\n\t}",
"boolean hasLocationView();",
"public abstract boolean isOutOfBounds(int x, int y);",
"private boolean isValid(int index) {\r\n return index >= 0 && index < dimension;\r\n }",
"public boolean isValidVx(double vx) {\n\t\treturn ((-getVxmax() <= vx && vx <= -getVxi())\n\t\t\t\t|| (vx == 0)\n\t\t\t\t|| (getVxi() <= vx && vx <= getVxmax()));\n\t}",
"private boolean rangeHasChanged() {\n\t\tboolean tester = true;\n\t\t\n\t\ttester &= plotSheet.getxRange()[0] == this.xrange[0];\n\t\ttester &= plotSheet.getxRange()[1] == this.xrange[1];\n\t\ttester &= plotSheet.getyRange()[0] == this.yrange[0];\n\t\ttester &= plotSheet.getyRange()[1] == this.yrange[1];\n\t\t\n\t\tif(!tester) {\n\t\t\tthis.xrange = plotSheet.getxRange().clone();\n\t\t\tthis.yrange = plotSheet.getyRange().clone();\n\t\t}\n\t\t\n\t\treturn !tester || this.depthSearchAborted;\n\t}",
"private boolean checkM(){\n if(currentLocation.x == previousLocation.x && currentLocation.y == previousLocation.y) {\n return false;\n }\n // Is outside the border\n if(currentLocation.x < size || currentLocation.y < size || currentLocation.x > map.numRows - size || currentLocation.y > map.numCols - size) {\n return false;\n }\n // Is on the land\n double angle2 = 0;\n while (angle2 < 6.3) {\n if (map.getTerrainGrid()[currentLocation.x + (int) (size/2 * cos(angle2))][currentLocation.y + (int) (size/2 * sin(angle2))] == Colors.OCEAN) {\n return false;\n }\n angle2 += 0.3;\n }\n return true;\n }",
"public boolean testPoint(Point p){\n\t\tif(parents.contains(p)) return false;\n\t\treturn true;\n\t}",
"private boolean isValid(int row, int col) {\n if (row < 1 || row > this.side || col < 1 || col > this.side)\n return false;\n return true;\n }",
"boolean canSet(Coordinates coord, double horizon, long time) throws AstrometryException;",
"public boolean isValid() {\n boolean isvalid = true;\n\n if (java.lang.Double.isInfinite(x) || java.lang.Double.isNaN(x) || java.lang.Double.isInfinite(y) || java.lang.Double.isNaN(y) || java.lang.Double.isInfinite(width) || java.lang.Double.isNaN(width) || java.lang.Double.isInfinite(height)\n || java.lang.Double.isNaN(height)) {\n isvalid = false;\n }\n\n return isvalid;\n }",
"public boolean canWalk() {\n\t\treturn rangeBottomLeft != null && !rangeBottomLeft.equals(location)\n\t\t\t\t&& rangeTopRight != null && !rangeTopRight.equals(location);\n\t}",
"private boolean isValid() throws InvalidStateException{\n if (this.homeTeam == null || this.visitingTeam == null){\n return false;\n }else{\n return true;\n }\n }",
"@Test\n\tvoid testCheckCoordinates4() {\n\t\tassertFalse(DataChecker.checkCoordinate(-100));\n\t}",
"public Boolean valid() {\n\t\treturn this.getMeasuredBy()!=null && this.getMeasuredBy().valid();\n\t}",
"boolean hasGeographicView();",
"public boolean isValid() {\n return latitudeSouth != INVALID_LAT_LON;\n }",
"boolean outOfSight();",
"private boolean isBlocked(View v){\n\t\treturn !v.mayMove(facingDirection);\n\t}",
"public boolean outOfBounds()\n {\n if((lastpowerUp.equals(\"BLUE\") || lastpowerUp.equals(\"RAINBOW\")) && powerupTimer > 0)\n {\n return false;\n }\n \n if(head.getA() < 150 || head.getA() >= 1260)\n return true;\n else if(head.getB() <150 || head.getB() >=630)\n return true;\n else \n return false;\n \n \n }",
"private void improperArgumentCheck(Point[] points) {\n int N = points.length;\n for (int i = 0; i < N; i++) {\n if (null == points[i])\n throw new NullPointerException();\n }\n\n Arrays.sort(points);\n for (int i = 1; i < N; i++) {\n if (points[i-1].equals(points[i]))\n throw new IllegalArgumentException();\n }\n }",
"public boolean isPosValid(int x, int y, int tokNum, int rotNum) {\n int [] xArray = xRotations[tokNum][rotNum];\n int [] yArray = yRotations[tokNum][rotNum];\n \n for (int i = 0; i < 4; i++) {\n \n //Positions to check \n int xIndex = x+xArray[i];\n int yIndex = y+yArray[i];\n \n //Check range\n if (xIndex < 0) return false;\n if (xIndex >= 10) return false;\n if (yIndex < 0) return false;\n if (yIndex >= 20) return false;\n \n //Check to see if space is occupied\n if (gameBoard[xIndex][yIndex] == 1) return false;\n }\n\n return true;\n }",
"public boolean someLegalPos() {\n return !legalPos.isEmpty();\n }",
"public boolean validPosition(Player p, double x, double y) {\n\n\t\tTile tile = getTile(p, x + p.BOUNDING_BOX_X, y);\n\t\tif (tile == null || !tile.canEnter(p)) {\n\t\t\treturn false;\n\t\t}\n\n\t\ttile = getTile(p, x, y + p.BOUNDING_BOX_Y);\n\t\tif (tile == null || !tile.canEnter(p)) {\n\t\t\treturn false;\n\t\t}\n\n\t\ttile = getTile(p, x - p.BOUNDING_BOX_X, y);\n\t\tif (tile == null || !tile.canEnter(p)) {\n\t\t\treturn false;\n\t\t}\n\n\t\ttile = getTile(p, x, y - p.BOUNDING_BOX_Y);\n\t\tif (tile == null || !tile.canEnter(p)) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}",
"public boolean valid() {\r\n\t\tif(habitat != 0 && habitat != -1 && minKnight() <= 4 - numKnights)\r\n\t\t\treturn true;\r\n\t\treturn false;\r\n\t}",
"public boolean isValidPlacementSpot() {\n return isEmpty() && ! getNeighbours().stream().allMatch(Spot::isEmpty);\n }",
"private boolean check_vicinity(FishTankItem TankItem) {\r\n if (getDirection()) {\r\n return 0 <= (TankItem.firstCoordinate - this.firstCoordinate)\r\n && (TankItem.firstCoordinate - this.firstCoordinate) <= 7;\r\n } else {\r\n return 0 <= (this.firstCoordinate - TankItem.firstCoordinate)\r\n && (this.firstCoordinate - TankItem.firstCoordinate) <= 5;\r\n }\r\n }",
"private Element validateSegment(Element p_tuv, Element p_seg)\n throws Exception\n {\n return validateSegment(p_tuv, p_seg, new IntHolder(1));\n }",
"protected void onBadCoords()\n\t{\n\t}",
"void checkBounds()\n {\n assertEquals(\"Bounds doesn't match\", boundsPair.getKey(),boundsPair.getValue());\n }",
"public boolean isAtVelocitySetPoint(double marginOfError) {\n return isNumberinRange(countsToUnits(velocitySetPoint) * 600.0,\n countsToUnits(motor.getSelectedSensorVelocity()) * 600.0, marginOfError);\n }",
"public boolean hasPt() {\n return fieldSetFlags()[0];\n }",
"public void checkRep() {\n assert(wall.p1().x() >= BOARD_MIN_BOUND && wall.p1().x() <= BOARD_MAX_BOUND) :\n \"x coordinate of p1 must be within in the board\";\n assert(wall.p2().x() >= BOARD_MIN_BOUND && wall.p2().x() <= BOARD_MAX_BOUND) :\n \"x coordinate of p2 must be within in the board\";\n assert(wall.p1().y() >= BOARD_MIN_BOUND && wall.p1().y() <= BOARD_MAX_BOUND) :\n \"y coordinate of p1 must be within in the board\";\n assert(wall.p2().y() >= BOARD_MIN_BOUND && wall.p2().y() <= BOARD_MAX_BOUND) :\n \"y coordinate of p2 must be within in the board\";\n }",
"public static boolean pointInView(float x, float y, View v) {\n\t\tv.getLocationInWindow(sLocation);\n\t\treturn x >= sLocation[0] && x < (sLocation[0] + v.getWidth())\n\t\t\t\t&& y >= sLocation[1] && y < (sLocation[1] + v.getHeight());\n\t}",
"private boolean isValid() {\n // If start is greater or equal to end then it's invalid\n return !(start.compareTo(end) >= 0);\n }",
"public void checkCameraLimits()\n {\n //Daca camera ar vrea sa mearga prea in stanga sau prea in dreapta (Analog si pe verticala) ea e oprita (practic cand se intampla acest lucru Itemul asupra caruia se incearca centrarea nu mai e in centrul camerei )\n\n if(xOffset < 0 )\n xOffset = 0;\n else if( xOffset > refLinks.GetMap().getWidth()* Tile.TILE_WIDTH - refLinks.GetWidth())\n xOffset =refLinks.GetMap().getWidth()* Tile.TILE_WIDTH - refLinks.GetWidth();\n if(yOffset<0)\n yOffset = 0;\n if(yOffset > refLinks.GetMap().getHeight()*Tile.TILE_HEIGHT - refLinks.GetHeight())\n {\n yOffset = refLinks.GetMap().getHeight()*Tile.TILE_HEIGHT - refLinks.GetHeight();\n }\n }",
"public boolean checkValidSelection(Point start, Point end){\n \t\tboolean flag = false;\n \t\tif (start.x == end.x) {\n \t\t\tflag = true;\n \t\t}\n \t\telse if (start.y == end.y) {\n \t\t\tflag = true;\n \t\t}\n \t\telse if ((start.x - start.y) == (end.x - end.y)) {\n \t\t\tflag = true;\n \t\t}\n \t\telse if ((start.x + start.y) == (end.x + end.y)) {\n \t\t\tflag = true;\n \t\t}\n \t\treturn flag;\n \t}",
"public boolean isValid()\r\n {\r\n \treturn this.vp.data != null;\r\n }",
"boolean isSetControlPosition();",
"@Test\n\tpublic void testTOutOfBoundsLeftMargin3() {\n\t\ttank.setX(182);\n\t\tassertEquals(true, tank.isWithinMarginsLeft());\n\t}"
] | [
"0.6733788",
"0.6686669",
"0.6546131",
"0.6342929",
"0.6251405",
"0.6231597",
"0.62103575",
"0.6129846",
"0.60909474",
"0.5971751",
"0.5961582",
"0.59609276",
"0.5955608",
"0.5912561",
"0.5890582",
"0.57820845",
"0.57697344",
"0.57587457",
"0.57556736",
"0.5739457",
"0.5736189",
"0.5730845",
"0.5722877",
"0.5707001",
"0.5699349",
"0.5680065",
"0.56589895",
"0.5640395",
"0.5632707",
"0.5632672",
"0.5594337",
"0.55785817",
"0.5562904",
"0.55582505",
"0.55496037",
"0.55429053",
"0.55266356",
"0.5526457",
"0.55134356",
"0.55107313",
"0.5507302",
"0.5505955",
"0.5495089",
"0.5492432",
"0.5485838",
"0.5479936",
"0.5467608",
"0.5467538",
"0.54623896",
"0.5461618",
"0.54572856",
"0.54568696",
"0.5429212",
"0.5418144",
"0.54173577",
"0.5413935",
"0.54119",
"0.5404118",
"0.54028755",
"0.5399398",
"0.5394774",
"0.53874934",
"0.53839016",
"0.53814524",
"0.5372614",
"0.53724694",
"0.5372425",
"0.53562623",
"0.53511024",
"0.5338343",
"0.5334417",
"0.533334",
"0.5330198",
"0.53201187",
"0.53186995",
"0.5316268",
"0.53118294",
"0.53098977",
"0.52979594",
"0.5296119",
"0.5295403",
"0.52873665",
"0.5285729",
"0.5284132",
"0.52810186",
"0.5279526",
"0.5277712",
"0.52769417",
"0.52721226",
"0.5271778",
"0.5266303",
"0.52662987",
"0.52645296",
"0.52632964",
"0.5261952",
"0.5259452",
"0.52530634",
"0.5251842",
"0.524823",
"0.5246427"
] | 0.73186296 | 0 |
Checks if input rectangle intersects anything in the currentMap | boolean isInterested(Polygon p, ObjectInMap exclusion) {
for (ObjectInMap objectInMap : objectsInMap)
if (!objectInMap.equals(exclusion) && objectInMap.isBlocking && objectInMap.intersects(p))
if (!(objectInMap instanceof Bullet && ((Bullet) objectInMap).owner.equals(exclusion))) {
return true;
}
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean intersects(Rectangle rect){\n\t\tRectangle rectIntersect = (Rectangle) rect.clone();\n\t\trectIntersect.translate(-x, -y);\n\t\treturn rectangle.intersects(rectIntersect);\n\t}",
"Multimap<String, String> intersects(RectangleLatLng bounds);",
"@Override\n\tpublic boolean intersects(Rectangle2D arg0) {\n\t\treturn false;\n\t}",
"private static boolean doBoundingBoxesIntersect(Rectangle a, Rectangle b) {\r\n\t return a.getMinX() <= b.getMaxX() \r\n\t && a.getMaxX() >= b.getMinX() \r\n\t && a.getMinY() <= b.getMaxY()\r\n\t && a.getMaxY() >= b.getMinY();\r\n\t}",
"boolean hasRect();",
"public boolean isIntersecting(RectF other){\n return RectF.intersects(other,this.hitBox);//|| hitBox.contains(other.getHitBox())||other.getHitBox().contains(this.hitBox)\n }",
"public boolean intersects(Rectangle r) {\r\n return this.getRectangle().intersects(r);\r\n }",
"Multimap<String, String> intersects(Polygon bounds);",
"public static boolean rectIntersect(Rectangle a, Rectangle b){\n\t\treturn !(b.x > (a.x + a.width) \n\t\t\t\t|| (b.x + b.width) < a.x\n\t\t\t\t|| b.y > (a.y + a.height)\n\t\t\t\t|| (b.y + b.height) < a.y);\n\t}",
"public boolean isInside(){\n\t\tinside = true;\n\t\tif(map.contains(new Rectangle(x,y,(int)spriteSize.getHeight(), (int)spriteSize.getWidth()))==false){\n\t\t\tinside = false;\n\t\t}\n\t\treturn(inside);\n\t}",
"public boolean intersects(HitBox h){\n\t\treturn rect.intersects(h.getRectangle());\n\t}",
"@Override\n\tpublic boolean collidesWithRectangle(Rectangle rectangle) {\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean contains(Rectangle2D arg0) {\n\t\treturn false;\n\t}",
"boolean intersects( Geometry gmo );",
"public abstract boolean hit(Rectangle2D r);",
"public boolean intersects(OnScreenObject other) {\r\n if (other == null) {\r\n return false;\r\n }\r\n Rectangle r1 = getRectangle();\r\n Rectangle r2 = other.getRectangle();\r\n\r\n return r1.intersects(r2);\r\n }",
"@Override\n public Rectangle intersects( Rectangle boundingBox )\n {\n return null;\n }",
"public boolean intersecta(ObjetoMapa o) {\n\t\tRectangle r1 = getRectangulo();\n\t\tRectangle r2 = o.getRectangulo();\n\t\t\n\t\treturn r1.intersects(r2);\n\t}",
"Multimap<String, String> intersects(Circle bounds);",
"private boolean collision1() {\n return game.racket1.getBounds1().intersects(getBounds()); // returns true if the two rectangles intersect\r\n }",
"static boolean rectanglesOverlap(Rectangle r1, Rectangle r2){\n List<int[]> pointsOfInterest = new ArrayList<int[]>();\n for (int[] i : r1.getPoints())\n for (int[] j : r2.getPoints())\n if (i[0] >= j[0] && i[1] >= j[1])\n pointsOfInterest.add(i); \n\n if (!pointsOfInterest.isEmpty())\n for (int[] i : pointsOfInterest)\n for (int[] j : r2.getPoints())\n if (i[0] <= j[0] && i[1] <= j[1])\n return true;\n\n // Check if any points in rectangle 2 fall in 1\n //List<int[]> pointsOfInterest = new ArrayList<int[]>();\n pointsOfInterest.clear();\n for (int[] i : r2.getPoints())\n for (int[] j : r1.getPoints())\n if (i[0] >= j[0] && i[1] >= j[1])\n pointsOfInterest.add(i); \n\n if (!pointsOfInterest.isEmpty())\n for (int[] i : pointsOfInterest)\n for (int[] j : r1.getPoints())\n if (i[0] <= j[0] && i[1] <= j[1])\n return true;\n \n return false;\n }",
"boolean overlaps(MyRectangle2D r) {\r\n\t\t//cordinates of the first corner of the parametar's rectangle\r\n\t\tdouble x1 = r.getX() - (r.getWidth() / 2);\r\n\t\tdouble y1 = r.getY() + (r.getHeight() / 2);\r\n\r\n\t\t//cordinates of the second corner of the parametar's rectangle\r\n\t\tdouble x2 = r.getX() + (r.getWidth() / 2);\r\n\t\tdouble y2 = r.getY() - (r.getHeight() / 2);\r\n\r\n\t\t//cordinates of the third corner of the parametar's rectangle\r\n\t\tdouble x3 = r.getX() - (r.getWidth() / 2);\r\n\t\tdouble y3 = r.getY() - (r.getHeight() / 2);\r\n\r\n\t\t//cordinates of the fourth corner of the parametar's rectangle\r\n\t\tdouble x4 = r.getX() + (r.getWidth() / 2);\r\n\t\tdouble y4 = r.getY() + (r.getHeight() / 2);\r\n\r\n\t\t//checking if calling rectangle has any of the corners inside itself\r\n\t\tboolean corner1Overlaps = this.contains(x1, y1);\r\n\t\tboolean corner2Overlaps = this.contains(x2, y2);\r\n\t\tboolean corner3Overlaps = this.contains(x3, y3);\r\n\t\tboolean corner4Overlaps = this.contains(x4, y4);\r\n\r\n\t\t//if it does contain any of the corners they overlap\r\n\t\treturn corner1Overlaps || corner2Overlaps || corner3Overlaps\r\n\t\t\t\t|| corner4Overlaps ? true : false;\r\n\t}",
"public boolean intersects(BoundingBox other) {\r\n\t\treturn !(other.left > getRight()\r\n\t\t\t || other.getRight() < left\r\n\t\t\t || other.top > getBottom()\r\n\t\t\t || other.getBottom() < top);\r\n\t}",
"public abstract boolean intersect(BoundingBox bbox);",
"static boolean intersectsRect(R2Vector a, R2Vector b, R2Rect rect) {\n // First check whether the bound of AB intersects \"rect\".\n R2Rect bound = R2Rect.fromPointPair(a, b);\n if (!rect.intersects(bound)) {\n return false;\n }\n\n // Otherwise AB intersects \"rect\" if and only if all four vertices of \"rect\"\n // do not lie on the same side of the extended line AB. We test this by\n // finding the two vertices of \"rect\" with minimum and maximum projections\n // onto the normal of AB, and computing their dot products with the edge\n // normal.\n R2Vector n = R2Vector.sub(b, a).ortho();\n int i = (n.x >= 0) ? 1 : 0;\n int j = (n.y >= 0) ? 1 : 0;\n double max = n.dotProd(R2Vector.sub(rect.getVertex(i, j), a));\n double min = n.dotProd(R2Vector.sub(rect.getVertex(1 - i, 1 - j), a));\n return (max >= 0) && (min <= 0);\n }",
"public boolean intersects(GraphicalFigure fig) {\n\n\t\t// Get the distance between the 2 figures on the x axis\n\t\tint xDist = pos.xCoord() - fig.getOffset().xCoord();\n\n\t\t// Get the distance on the y axis\n\t\tint yDist = pos.yCoord() - fig.getOffset().xCoord();\n\n\t\t// All if's allow for if the x's are the same\n\t\t// Check to see if the figure is on the right and overlaps\n\t\tif (xDist >= 0 && xDist < fig.getWidth()) {\n\n\t\t\t// For loop variables\n\t\t\tint initial = 0;\n\t\t\tint compare = 0;\n\t\t\tBoolean loopCheck = false;\n\n\t\t\t// All if's allow for if the y's are the same\n\t\t\t// Check if it's above the object and within range\n\t\t\tif (yDist >= 0 && xDist < fig.getHeight()) {\n\n\t\t\t\t// Set loopCheck to true\n\t\t\t\tloopCheck = true;\n\n\t\t\t\t// For loop variables\n\t\t\t\t// Set initial to the location of the y coordinate\n\t\t\t\tinitial = pos.yCoord();\n\n\t\t\t\t// Set the compare value to the location of the y + the height of the figure -\n\t\t\t\t// the y distance\n\t\t\t\tcompare = pos.yCoord() + fig.getHeight() - yDist;\n\t\t\t}\n\n\t\t\t// Check if it's below the object and within range\n\t\t\telse if (yDist <= 0 && xDist < height) {\n\n\t\t\t\t// Set loopCheck to true\n\t\t\t\tloopCheck = true;\n\n\t\t\t\t// For loop variables\n\t\t\t\t// Set initial to the location of the y coordinate\n\t\t\t\tinitial = fig.getOffset().yCoord();\n\n\t\t\t\t// Set the compare value to the location of the y + the height of the figure -\n\t\t\t\t// the y distance\n\t\t\t\tcompare = fig.getOffset().yCoord() + fig.getHeight() + yDist;\n\t\t\t}\n\n\t\t\t// If the loop check is true, do a for loop\n\t\t\tif (loopCheck) {\n\n\t\t\t\t// Create a location variable\n\t\t\t\tLocation loc;\n\t\t\t\t// Loop through the intersecting rectangle\n\t\t\t\t// Loop Horizontally\n\t\t\t\tfor (int i = pos.xCoord(); i < pos.xCoord() + fig.getWidth() - xDist; i++) {\n\t\t\t\t\t// Loop through vertically\n\t\t\t\t\tfor (int j = initial; j < compare; j++) {\n\t\t\t\t\t\t// Create a location for the new pixel\n\t\t\t\t\t\tloc = new Location(i, j);\n\n\t\t\t\t\t\t// Check for overlap, return true\n\t\t\t\t\t\tif (findPixel(loc) && fig.findPixel(loc)) {\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// All if's allow for if the x's are the same\n\t\t// Check if the figure is on the left and overlaps\n\t\telse if (xDist >= 0 && xDist < width) {\n\t\t\t// For loop variables\n\t\t\tint initial = 0;\n\t\t\tint compare = 0;\n\t\t\tBoolean loopCheck = false;\n\n\t\t\t// All if's allow for if the y's are the same\n\t\t\t// Check if it's above the object and within range\n\t\t\tif (yDist >= 0 && xDist < fig.getHeight()) {\n\n\t\t\t\t// Set loopCheck to true\n\t\t\t\tloopCheck = true;\n\n\t\t\t\t// For loop variables\n\t\t\t\t// Set initial to the location of the y coordinate\n\t\t\t\tinitial = pos.yCoord();\n\n\t\t\t\t// Set the compare value to the location of the y + the height of the figure -\n\t\t\t\t// the y distance\n\t\t\t\tcompare = pos.yCoord() + fig.getHeight() - yDist;\n\t\t\t}\n\n\t\t\t// Check if it's below the object and within range\n\t\t\telse if (yDist <= 0 && xDist < height) {\n\n\t\t\t\t// Set loopCheck to true\n\t\t\t\tloopCheck = true;\n\n\t\t\t\t// For loop variables\n\t\t\t\t// Set initial to the location of the y coordinate\n\t\t\t\tinitial = fig.getOffset().yCoord();\n\n\t\t\t\t// Set the compare value to the location of the y + the height of the figure -\n\t\t\t\t// the y distance\n\t\t\t\tcompare = fig.getOffset().yCoord() + fig.getHeight() + yDist;\n\t\t\t}\n\n\t\t\t// If the loop check is true, do a for loop\n\t\t\tif (loopCheck) {\n\n\t\t\t\t// Create a location variable\n\t\t\t\tLocation loc;\n\t\t\t\t// Loop through the intersecting rectangle\n\t\t\t\t// Loop Horizontally\n\t\t\t\tfor (int i = fig.getOffset().xCoord(); i < fig.getOffset().xCoord() + width + xDist; i++) {\n\t\t\t\t\t// Loop through vertically\n\t\t\t\t\tfor (int j = initial; j < compare; j++) {\n\t\t\t\t\t\t// Create a location for the new pixel\n\t\t\t\t\t\tloc = new Location(i, j);\n\n\t\t\t\t\t\t// Check for overlap, return true\n\t\t\t\t\t\tif (findPixel(loc) && fig.findPixel(loc)) {\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// If no intersection found, return false\n\t\treturn false;\n\t}",
"@Test\n void shouldBeInsideMap()\n {\n assertTrue(map.isInsideMap(new Vector2(0,0)));\n\n assertTrue(map.isInsideMap(new Vector2(4,0)));\n\n assertTrue(map.isInsideMap(new Vector2(4,4)));\n\n assertTrue(map.isInsideMap(new Vector2(1,3)));\n }",
"boolean hasRect2Value();",
"public boolean intersects(final ConstRect other)\r\n {\r\n final Rectangle rect = toRectangle();\r\n if(width == 0 && height == 0 && other.width == 0 && other.height == 0)\r\n {\r\n return new Point(x, y).equals(new Point(other.x, other.y));\r\n }\r\n else if(width == 0 && height == 0)\r\n {\r\n return other.toRectangle().contains(new Point(x, y));\r\n }\r\n else if(other.width == 0 && other.height == 0)\r\n {\r\n return rect.contains(new Point(other.x, other.y));\r\n }\r\n else if(other.width == 0 || other.height == 0)\r\n {\r\n return rect.intersectsLine(new Line2D.Double(other.x, other.y, other.x + other.width,\r\n other.y + other.height));\r\n }\r\n else if(width == 0 || height == 0)\r\n {\r\n return other.toRectangle().intersectsLine(\r\n new Line2D.Double(x, y, x + width, y + height));\r\n }\r\n else\r\n {\r\n return rect.intersects(other.toRectangle());\r\n }\r\n }",
"private boolean isOverRect(Point p) {\n Rectangle r = (Rectangle)component.rect.clone();\n r.grow(PROX_DIST, PROX_DIST);\n return r.contains(p);\n }",
"public boolean isInRect(Point p) {\n\t\tLine AB = new Line(A1, B1);\n\t\tLine CD = new Line(C1, AB.getU());\n\t\tLine AD = new Line(A1, D1);\n\t\tLine BC = new Line(B1, AD.getU());\n\n\t\tif (Line.isBetween2Lines(AB, CD, p) && Line.isBetween2Lines(AD, BC, p)) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}",
"public boolean intersects(final Rectangle2D other)\r\n {\r\n return other.intersects(new Rectangle2D.Float(x, y, width, height));\r\n }",
"public boolean inBounds(Rectangle bounds)\n\t{\n\t\treturn bounds.contains(mX, mY);\n\t}",
"public boolean containsRectangle(double x, double y, double width, double height) {\n\t\treturn rectangleSelection.contains(x,y) && rectangleSelection.contains(x + width, y + height);\n\t}",
"public boolean whithinRectangle(Point point1, Point point2) {\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean intersectsRectangle(final int ax1, final int ax2, final int ay1, final int ay2)\n\t{\n\t\tif (isInsideZone(ax1, ay1, (zoneZ2 - 1)))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\tif (isInsideZone(ax1, ay2, (zoneZ2 - 1)))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\tif (isInsideZone(ax2, ay1, (zoneZ2 - 1)))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\tif (isInsideZone(ax2, ay2, (zoneZ2 - 1)))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\t// Check if any point from this rectangle is inside the other one\n\t\tif (zoneX1 > ax1 && zoneX1 < ax2 && zoneY1 > ay1 && zoneY1 < ay2)\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\tif (zoneX1 > ax1 && zoneX1 < ax2 && zoneY2 > ay1 && zoneY2 < ay2)\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\tif (zoneX2 > ax1 && zoneX2 < ax2 && zoneY1 > ay1 && zoneY1 < ay2)\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\tif (zoneX2 > ax1 && zoneX2 < ax2 && zoneY2 > ay1 && zoneY2 < ay2)\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\t// Horizontal lines may intersect vertical lines\n\t\tif (lineIntersectsLine(zoneX1, zoneY1, zoneX2, zoneY1, ax1, ay1, ax1, ay2))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\tif (lineIntersectsLine(zoneX1, zoneY1, zoneX2, zoneY1, ax2, ay1, ax2, ay2))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\tif (lineIntersectsLine(zoneX1, zoneY2, zoneX2, zoneY2, ax1, ay1, ax1, ay2))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\tif (lineIntersectsLine(zoneX1, zoneY2, zoneX2, zoneY2, ax2, ay1, ax2, ay2))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\t// Vertical lines may intersect horizontal lines\n\t\tif (lineIntersectsLine(zoneX1, zoneY1, zoneX1, zoneY2, ax1, ay1, ax2, ay1))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\tif (lineIntersectsLine(zoneX1, zoneY1, zoneX1, zoneY2, ax1, ay2, ax2, ay2))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\tif (lineIntersectsLine(zoneX2, zoneY1, zoneX2, zoneY2, ax1, ay1, ax2, ay1))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\tif (lineIntersectsLine(zoneX2, zoneY1, zoneX2, zoneY2, ax1, ay2, ax2, ay2))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\treturn false;\n\t}",
"public boolean isIntersecting(GameObject other){\n if(other.isSolid()&&this.solid){\n return RectF.intersects(other.getHitBox(),this.hitBox);//|| hitBox.contains(other.getHitBox())||other.getHitBox().contains(this.hitBox)\n }\n return false;\n }",
"boolean isInsideScreen() {\n if (_hitbox.length == 1) {\n float r = _hitbox[0].x;\n PVector c = _getCenter();\n return 0 <= c.x + r && c.x - r < width && 0 <= c.y + r && c.y - r < height;\n }\n \n PVector[] points = this._getPoints();\n for(PVector p : points) {\n if(0 <= p.x && p.x < width && 0 <= p.y && p.y < height) {\n return true;\n }\n }\n return false;\n }",
"public void isIntersects(WorldObject worldObject) {\n Area areaFromThisObject = new Area(this.getShape());\n Area areaFromWorldObject = new Area(worldObject.getShape());\n areaFromThisObject.intersect(areaFromWorldObject);\n this.collided = !areaFromThisObject.isEmpty();\n }",
"public boolean intersects(Rectangle2D r) {\n Geometry rect = rectangleToGeometry(r);\n\n return geometry.intersects(rect);\n }",
"public boolean contains(Rectangle r) {\n\t\treturn (r.getX1() >= getX1() && r.getY1() >= getY1()\n\t\t\t\t&& r.getX2() < getX2() && r.getY2() < getY2());\n\t}",
"public boolean isWithinMap(int x, int y) {\n return ((x >= 0 && x < this.width_) && (y >= 0 && y < this.height_));\n }",
"boolean isIncludeBounds();",
"public boolean areIntersecting() {\n return intersection != null;\n }",
"private boolean intersects(Circle range) {\n\t\treturn range.intersects(boundary);\n\t}",
"@Test\n public void isCollidingTestCollision(){\n TileMap tileMap = new TileMap(24, 24, new byte[][]{{1,1},{1,1},{1,1},{1,1}},new byte[][]{{1,1},{1,1},{1,1},{1,1}}, tilepath);\n Rect cBox = new Rect(24,24,24,24);\n assertTrue(tileMap.isColliding(cBox));\n assertEquals(true, tileMap.isColliding(cBox));\n }",
"public boolean intersects(BaseGameObject other) {\r\n return (other.getPosx() - this.getPosx())\r\n * (other.getPosx() - this.getPosx())\r\n + (other.getPosy() - this.getPosy())\r\n * (other.getPosy() - this.getPosy())\r\n < (other.bound + this.bound) * (other.bound + this.bound);\r\n }",
"@Override\n final boolean intersect(Bounds bounds, Point4d pickPos) {\n\treturn bounds.intersect(this.bounds, pickPos);\n }",
"public boolean intersects(Platform p){\n \treturn box.intersects(p.getBox());\r\n }",
"protected boolean isOverlapping(ArrayList<Rectangle> first, ArrayList<Rectangle> second) {\n\t\tfor (Rectangle f : first) {\n\t\t\tfor (Rectangle s : second) {\n\t\t\t\tif (f.overlaps(s)) return true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"private boolean collision2() {\n return game.racket2.getBounds2().intersects(getBounds()); // returns true if the two rectangles intersect\r\n }",
"@Test\n public void isCollidingTestNoCollision(){\n TileMap tileMap = new TileMap(24, 24, new byte[][]{{1,1},{1,1},{1,1},{1,1}},new byte[][]{{1,1},{1,1},{1,1},{1,1}}, tilepath);\n Rect cBox = new Rect(0, 0, 0, 0);\n assertFalse(tileMap.isColliding(cBox));\n assertEquals(false, tileMap.isColliding(cBox));\n }",
"public boolean intersects(Obstacle v){\n \treturn box.intersects(v.getBox()); \t\r\n }",
"private void setCollision(){\n\t\tMapObjects mapObjects = map.getLayers().get(\"COLLISION\").getObjects();\n\t\tfor (int ii = 0; ii < mapObjects.getCount(); ++ii){\n\t\t\tRectangleMapObject rectangle_map_object = (RectangleMapObject) mapObjects.get(ii);\n\t\t\tareaCollision.add(new Rectangle(rectangle_map_object.getRectangle()));\n\t\t}\n\t}",
"@java.lang.Override\n public boolean hasRect() {\n return instance.hasRect();\n }",
"private boolean intersects(int x, int y, int size){\n count++;\n return(!(\n x > this.x + this.width ||\n x + size < this.x ||\n y > this.y + this.height ||\n y + size < this.y\n ));\n }",
"boolean contains(MyRectangle2D r) {\r\n\t\t// check if 1 pair of diagonal corner points\r\n\t\t// are contained in this rectangle\r\n\r\n\t\tdouble x1 = r.getX() - (r.getWidth() / 2);\r\n\t\tdouble y1 = r.getY() + (r.getHeight() / 2);\r\n\r\n\t\tdouble x2 = r.getX() + (r.getWidth() / 2);\r\n\t\tdouble y2 = r.getY() - (r.getHeight() / 2);\r\n\t\t\r\n\t\t//if diagonal corners are inside, the whole rectangle is contained\r\n\t\treturn this.contains(x1, y1) && this.contains(x2, y2) ? true : false;\r\n\t}",
"public static Boolean intersectPixels(Rectangle rectangleA, Color[][] dataA, Rectangle rectangleB, Color[][] dataB)\r\n {\n int top = (int) Math.max(rectangleA.getMinY(), rectangleB.getMinY());\r\n int bottom = (int) Math.min(rectangleA.getMaxY(), rectangleB.getMaxY());\r\n int left = (int) Math.max(rectangleA.getMinX(), rectangleB.getMinX());\r\n int right = (int) Math.min(rectangleA.getMaxX(), rectangleB.getMaxX());\r\n\r\n // Check every point within the intersection bounds\r\n for (int y = top; y < bottom; y++)\r\n {\r\n for (int x = left; x < right; x++)\r\n {\r\n // Get the color of both pixels at this point\r\n \tColor colorA = dataA[(int) (x - rectangleA.getMinX())][(int) (y - rectangleA.getMinY())];\r\n \tColor colorB = dataB[(int) (x - rectangleB.getMinX())][(int) (y - rectangleB.getMinY())];\r\n\r\n // If both pixels are not completely transparent,\r\n if (colorA.getAlpha() != 0 && colorB.getAlpha() != 0)\r\n {\r\n // then an intersection has been found\r\n return true;\r\n }\r\n }\r\n }\r\n // No intersection found\r\n return false;\r\n }",
"private boolean isInBounds(float x, float y) {\n\n if (x <= 0 || x >= this.getWidth() || y <= 0 || y >= this.getHeight()) {\n\n return false;\n }\n return new RectF(0, 0, this.getWidth(), this.getHeight())\n .contains(x, y);\n }",
"public boolean collision( Point cur, ArrayList<Point> bounds ) {\n\t\t\n\t\tfor ( int i = 0; i < bounds.size(); i++ )\n\t\t\tif ( cur.equals( bounds.get(i) ) )\n\t\t\t\treturn true;\n\t\t\n\t\treturn false;\n\t}",
"public static boolean pointInRectangle(int minX, int minY, int maxX, int maxY, int x, int y) {\n\t\treturn minX < x && maxX > x && minY < y && maxY > y;\n\t}",
"@Override\n public boolean hitTest(double x, double y) {\n return rect.hitTest(x, y) || marker.hitTest(x, y);\n }",
"boolean rectRect(float r1x, float r1y, float r1w, float r1h, float r2x, float r2y, float r2w, float r2h) {\n\t \n\t // are the sides of one rectangle touching the other?\n\t \n\t if (r1x + r1w >= r2x && // r1 right edge past r2 left\n\t r1x <= r2x + r2w && // r1 left edge past r2 right\n\t r1y + r1h >= r2y && // r1 top edge past r2 bottom\n\t r1y <= r2y + r2h) { // r1 bottom edge past r2 top\n\t return true;\n\t }\n\t return false;\n\t}",
"public void checkClickedArea(int xMouse,int yMouse)\n {\n\n isSelected=false;\n if(targetable==true&&(xMouse>=xBeginMap+15&&xMouse<=xEndMap-15\n &&yMouse>=yBeginMap+15&&yMouse<=yEndMap-15))\n {\n\n isSelected=true;\n }\n\n }",
"boolean contains(double x, double y) {\r\n\t\t//cordinate of the left edge\r\n\t\tdouble xLeftEdge = this.getX() - this.width / 2;\r\n\t\t//cordinate of the right edge\r\n\t\tdouble xRightEdge = this.getX() + this.width / 2;\r\n\t\t////cordinate of the top edge\r\n\t\tdouble yTopEdge = this.getY() + this.height / 2;\r\n\t\t//cordinate of the bottom edge\r\n\t\tdouble yBottomEdge = this.getY() - this.height / 2;\r\n\r\n\t\t//if the point is between the edges it is inside the rectangle\r\n\t\treturn (x < xRightEdge) && (x > xLeftEdge) && (y < yTopEdge)\r\n\t\t\t\t&& (y > yBottomEdge) ? true : false;\r\n\t}",
"public boolean isInRect2(Point p) {\n\t\tLine AB = new Line(A1, B1);\n\t\tLine CD = new Line(C1, AB.getU());\n\t\tLine AD = new Line(A1, D1);\n\t\tLine BC = new Line(B1, AD.getU());\n\n\t\t// if(Line.isBetween2Lines2(AB, CD, p))\n\t\t// System.out.println(1);\n\t\t// if(Line.isBetween2Lines2(AD, BC, p))\n\t\t// System.out.println(2);\n\n\t\tif (Line.isBetween2Lines2(AB, CD, p) && Line.isBetween2Lines2(AD, BC, p)) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}",
"public boolean equals(Object other) {\n if (this == other) {\n return true;\n }\n if (!(other instanceof Rectangle)) {\n return false;\n }\n Rectangle r = (Rectangle) other;\n return (this.name.equals(r.name))\n && (this.color.equals(r.color))\n && (this.xPos == r.xPos)\n && (this.yPos == r.yPos)\n && (Double.compare(this.width, r.width) == 0)\n && (Double.compare(this.height, r.height) == 0)\n && this.startTime == r.startTime\n && this.endTime == r.endTime;\n }",
"public boolean intersects(GISArea other) {\n if (this.isPoint() && other.isPoint()) {\n return this.latitudes.equals(other.latitudes) && this.longitudes.equals(other.longitudes);\n }\n // 2. We're a point, they're not.\n else if (this.isPoint() && other.isRegion()) {\n Area them = new Area(other.path);\n return them.contains(this.latitudes.get(0), this.longitudes.get(0));\n }\n // 3. We're a region, they're a point.\n else if (this.isRegion() && other.isPoint()) {\n Area us = new Area(this.path);\n return us.contains(other.latitudes.get(0), other.longitudes.get(0));\n }\n // 4. We're both regions.\n else {\n // Make the shapes for both areas.\n // Take the intersect\n // If an empty shape, no intersection.\n Area us = new Area(path);\n Area them = new Area(other.path);\n us.intersect(them);\n return !us.isEmpty();\n }\n }",
"public boolean intersects( final float tx, final float ty, final float width, final float height )\r\n {\r\n if ( this.transform.tx( ) > tx + width ) return false;\r\n if ( this.transform.tx( ) + this.width( ) < tx ) return false;\r\n if ( this.transform.ty( ) > ty + height ) return false;\r\n if ( this.transform.ty( ) + this.height( ) < ty ) return false;\r\n\r\n return true;\r\n }",
"private boolean isInBounds(int x, int y) {\r\n\t\treturn x >= 0 && y >= 0 && x < getWidth() && y < getHeight();\r\n\t}",
"public static boolean intersectsRectangleRectangle(int r1x, int r1y, int r1width, int r1height, int r2x, int r2y, int r2width, int r2height) {\n\t\t\n\t\tif(r1width == 0 || r1height == 0) { return false; }\n\t\tif(r2width == 0 || r2height == 0) { return false; }\n\t\t\n\t\tint r1MinX = r1x;\n\t\tint r1MinY = r1y;\n\t\tint r1MaxX = r1x+r1width;\n\t\tint r1MaxY = r1y+r1height;\n\t\tint r2MinX = r2x;\n\t\tint r2MinY = r2y;\n\t\tint r2MaxX = r2x+r2width;\n\t\tint r2MaxY = r2y+r2height;\n\t\t\n\t\tboolean intersects =\tr1MaxX > r2MinX &&\n\t\t\t\t\t\t\t\tr1MinX < r2MaxX &&\n\t\t\t\t\t\t\t\tr1MaxY > r2MinY &&\n\t\t\t\t\t\t\t\tr1MinY < r2MaxY;\n\t\treturn intersects;\n\t}",
"@Override\n public boolean detectedCollision(int xCoordinate, int yCoordinate) {\n return xCoordinate >= x && xCoordinate <= x + width\n && yCoordinate >= y && yCoordinate <= y + height;\n }",
"private boolean colisionPalas() {\r\n\t\treturn game.racketIzq.getBounds().intersects(getBounds())\r\n\t\t\t\t|| game.racketDer.getBounds().intersects(getBounds());\r\n\t}",
"public boolean adjoins(Rectangle rectangle) {\n int startX = Math.max(start.getX(), rectangle.start.getX());\n int startY = Math.max(start.getY(), rectangle.start.getY());\n\n int endX = Math.min(end.getX(), rectangle.end.getX());\n int endY = Math.min(end.getY(), rectangle.end.getY());\n\n return startX <= endX && startY <= endY;\n }",
"public boolean intersects(Circle2D circle, Rectangle2D rect) {\n\t\tfinal double radiusSquared = circle.getRadius() * circle.getRadius();\n\n\t\t/* translate coordinates, placing circle at origin */\n\t\tfinal Rectangle2D.Double r = new Rectangle2D.Double(rect.getX()\n\t\t\t\t- circle.getCenterX(), rect.getY() - circle.getCenterY(), rect\n\t\t\t\t.getWidth(), rect.getHeight());\n\n\t\tif (r.getMaxX() < 0) {\n\t\t\t/* rectangle to left of circle center */\n\t\t\tif (r.getMaxY() < 0) {\n\t\t\t\t/* rectangle in lower left corner */\n\t\t\t\treturn ((r.getMaxX() * r.getMaxX() + r.getMaxY() * r.getMaxY()) < radiusSquared);\n\t\t\t} else if (r.getMinY() > 0) {\n\t\t\t\t/* rectangle in upper left corner */\n\t\t\t\treturn ((r.getMaxX() * r.getMaxX() + r.getMinY() * r.getMinY()) < radiusSquared);\n\t\t\t} else {\n\t\t\t\t/* rectangle due west of circle */\n\t\t\t\treturn (Math.abs(r.getMaxX()) < circle.getRadius());\n\t\t\t}\n\t\t} else if (r.getMinX() > 0) {\n\t\t\t/* rectangle to right of circle center */\n\t\t\tif (r.getMaxY() < 0) {\n\t\t\t\t/* rectangle in lower right corner */\n\t\t\t\treturn ((r.getMinX() * r.getMinX() + r.getMaxY() * r.getMaxY()) < radiusSquared);\n\t\t\t} else if (r.getMinY() > 0) {\n\t\t\t\t/* rectangle in upper right corner */\n\t\t\t\treturn ((r.getMinX() * r.getMinX() + r.getMinY() * r.getMinY()) <= radiusSquared);\n\t\t\t} else {\n\t\t\t\t/* rectangle due east of circle */\n\t\t\t\treturn (r.getMinX() <= circle.getRadius());\n\t\t\t}\n\t\t} else {\n\t\t\t/* rectangle on circle vertical centerline */\n\t\t\tif (r.getMaxY() < 0) {\n\t\t\t\t/* rectangle due south of circle */\n\t\t\t\treturn (Math.abs(r.getMaxY()) < circle.getRadius());\n\t\t\t} else if (r.getMinY() > 0) {\n\t\t\t\t/* rectangle due north of circle */\n\t\t\t\treturn (r.getMinY() <= circle.getRadius());\n\t\t\t} else {\n\t\t\t\t/* rectangle contains circle center point */\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t}",
"@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.Boolean isIntersection();",
"private boolean verifyBounds() {\r\n\t if((x>RobotController.BOUNDS_X || y>RobotController.BOUNDS_Y)\r\n\t || x<0 || y<0){\r\n\t return false;\r\n\t }\r\n\t return true;\r\n\t }",
"public boolean intersects( final Layer.HasSize layer )\r\n {\r\n return this.intersects( layer.transform( ).tx( ), layer.transform( ).ty( ), layer.width( ), layer.height( ) );\r\n }",
"@Override\n protected <M> TestResult testIntersection(IntersectionType t, MatchContext<M> matchContext) {\n return testable(bounds).testAll(m -> testable(t.getBounds()).testAny(b -> m.testInstance(b, matchContext)));\n }",
"protected boolean checkPoiInside( CFWPoint poiBegI, CFWPoint poiEndI)\t{\r\n\t\t//[begin point in area 1] unintersect: 1,2,3,7,8\r\n\t\t//[begin point in area 2] unintersect: 1,2,3\r\n\t\t//[begin point in area 3] unintersect: 1,2,3,4,5\r\n\t\t//[begin point in area 4] unintersect: 3,4,5\r\n\t\t//[begin point in area 5] unintersect: 3,4,5,6,7\r\n\t\t//[begin point in area 6] unintersect: 5,6,7\r\n\t\t//[begin point in area 7] unintersect: 5,6,7,8,1\r\n\t\t//[begin point in area 8] unintersect: 7,8,1\r\n\t\t//[begin point in area 9] unintersect: 9\r\n\t\tif(isInsideArea( 1, poiBegI))\t{\r\n\t\t\tif(isInsideArea( 1, poiEndI))\r\n\t\t\t\treturn(false);\r\n\t\t\telse if(isInsideArea( 2, poiEndI))\r\n\t\t\t\treturn(false);\r\n\t\t\telse if(isInsideArea( 3, poiEndI))\r\n\t\t\t\treturn(false);\r\n\t\t\telse if(isInsideArea( 7, poiEndI))\r\n\t\t\t\treturn(false);\r\n\t\t\telse if(isInsideArea( 8, poiEndI))\r\n\t\t\t\treturn(false);\r\n\t\t}\r\n\t\tif(isInsideArea( 2, poiBegI))\t{\r\n\t\t\tif(isInsideArea( 1, poiEndI))\r\n\t\t\t\treturn(false);\r\n\t\t\telse if(isInsideArea( 2, poiEndI))\r\n\t\t\t\treturn(false);\r\n\t\t\telse if(isInsideArea( 3, poiEndI))\r\n\t\t\t\treturn(false);\r\n\t\t}\r\n\t\tif(isInsideArea( 3, poiBegI))\t{\r\n\t\t\tif(isInsideArea( 1, poiEndI))\r\n\t\t\t\treturn(false);\r\n\t\t\telse if(isInsideArea( 2, poiEndI))\r\n\t\t\t\treturn(false);\r\n\t\t\telse if(isInsideArea( 3, poiEndI))\r\n\t\t\t\treturn(false);\r\n\t\t\telse if(isInsideArea( 4, poiEndI))\r\n\t\t\t\treturn(false);\r\n\t\t\telse if(isInsideArea( 5, poiEndI))\r\n\t\t\t\treturn(false);\r\n\t\t}\r\n\t\tif(isInsideArea( 4, poiBegI))\t{\r\n\t\t\tif(isInsideArea( 3, poiEndI))\r\n\t\t\t\treturn(false);\r\n\t\t\telse if(isInsideArea( 4, poiEndI))\r\n\t\t\t\treturn(false);\r\n\t\t\telse if(isInsideArea( 5, poiEndI))\r\n\t\t\t\treturn(false);\r\n\t\t}\r\n\t\tif(isInsideArea( 5, poiBegI))\t{\r\n\t\t\tif(isInsideArea( 3, poiEndI))\r\n\t\t\t\treturn(false);\r\n\t\t\telse if(isInsideArea( 4, poiEndI))\r\n\t\t\t\treturn(false);\r\n\t\t\telse if(isInsideArea( 5, poiEndI))\r\n\t\t\t\treturn(false);\r\n\t\t\telse if(isInsideArea( 6, poiEndI))\r\n\t\t\t\treturn(false);\r\n\t\t\telse if(isInsideArea( 7, poiEndI))\r\n\t\t\t\treturn(false);\r\n\t\t}\r\n\t\tif(isInsideArea( 6, poiBegI))\t{\r\n\t\t\tif(isInsideArea( 5, poiEndI))\r\n\t\t\t\treturn(false);\r\n\t\t\telse if(isInsideArea( 6, poiEndI))\r\n\t\t\t\treturn(false);\r\n\t\t\telse if(isInsideArea( 7, poiEndI))\r\n\t\t\t\treturn(false);\r\n\t\t}\r\n\t\tif(isInsideArea( 7, poiBegI))\t{\r\n\t\t\tif(isInsideArea( 5, poiEndI))\r\n\t\t\t\treturn(false);\r\n\t\t\telse if(isInsideArea( 6, poiEndI))\r\n\t\t\t\treturn(false);\r\n\t\t\telse if(isInsideArea( 7, poiEndI))\r\n\t\t\t\treturn(false);\r\n\t\t\telse if(isInsideArea( 8, poiEndI))\r\n\t\t\t\treturn(false);\r\n\t\t\telse if(isInsideArea( 1, poiEndI))\r\n\t\t\t\treturn(false);\r\n\t\t}\r\n\t\tif(isInsideArea( 8, poiBegI))\t{\r\n\t\t\tif(isInsideArea( 7, poiEndI))\r\n\t\t\t\treturn(false);\r\n\t\t\telse if(isInsideArea( 8, poiEndI))\r\n\t\t\t\treturn(false);\r\n\t\t\telse if(isInsideArea( 1, poiEndI))\r\n\t\t\t\treturn(false);\r\n\t\t}\r\n\t\treturn true;\r\n\t}",
"int checkInside(Rectangle r1, Rectangle r2) {\n if (r1.x - r1.w / 2 >= r2.x - r2.w / 2 // left edge\n && r1.x + r1.w / 2 <= r2.x + r2.w / 2 // right edge\n && r1.y + r1.h / 2 <= r2.y + r2.h / 2 // top\n && r1.y - r1.h / 2 >= r2.y - r2.h / 2 // bottom\n ) {\n return 1;\n }\n // check if r2 is inside r1\n if (r2.x - r2.w / 2 >= r1.x - r1.w / 2 // left edge\n && r2.x + r2.w / 2 <= r1.x + r1.w / 2 // right edge\n && r2.y + r2.h / 2 <= r1.y + r1.h / 2 // top\n && r2.y - r2.h / 2 >= r1.y - r1.h / 2 // bottom\n ) {\n return 2;\n }\n\n return 0;\n }",
"@Override\n public boolean inBounds(int x, int y) {\n return x >= 0 && y >= 0 && x < this.bounds.width\n && y < this.bounds.height;\n }",
"Rectangle getCollisionRectangle();",
"Rectangle getCollisionRectangle();",
"public boolean contains(Rectangle2D r) {\n Geometry rect = rectangleToGeometry(r);\n\n return geometry.contains(rect);\n }",
"public boolean pointIsIntersecting(PointF point, RectF other){//also checks if one contains the other\n return RectF.intersects(other,new RectF(point.x, point.y, point.x, point.y));//|| hitBox.contains(other.getHitBox())||other.getHitBox().contains(this.hitBox)\n }",
"@Override\n\tpublic void intersects(unit unit) {\n\t\t\n\t}",
"public boolean isIntersectingWithViewport(ObjectWithPosition obj){\n if(this.bounds.intersect(obj.getBounds()))\n return true;\n else return false;\n }",
"@Override\n public boolean\n doIntersection(Ray inOut_Ray) {\n // TODO!\n return false;\n }",
"private boolean pInRect(Point2D p, RectHV rect) {\n if (p.x() >= rect.xmin() && p.x() <= rect.xmax() && p.y() >= rect.ymin() && p.y() <= rect.ymax()) return true;\n else return false;\n }",
"public boolean inBounds(Actor a)\n {\n boolean inX = Math.abs(a.getXPos()) < levelWidth/2;\n boolean inY = Math.abs(a.getYPos()) < levelHeight/2;\n return inX && inY;\n }",
"@Test\n public void isCollidingTestBodyOfInnerFor(){\n TileMap tileMap = new TileMap(24, 24, new byte[][]{},new byte[][]{{1,0},{1,1}}, tilepath);\n Rect cBox = new Rect(2,2,2,200);\n assertTrue(tileMap.isColliding(cBox));\n assertEquals(true, tileMap.isColliding(cBox));\n }",
"public abstract boolean isInSelectionImage(final Rectangle _r);",
"public boolean isInRect(Line l1, Line l2, Line l3, Line l4, Point p) {\n\t\tif (Line.isBetween2Lines(l1, l2, p) && Line.isBetween2Lines(l3, l4, p)) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}",
"public boolean intersects( Dimension d ) {\r\n return ( drawx > 0 && drawx < d.width && drawy>0 && drawy < d.height );\r\n }",
"private boolean checkCollision(int x, int y) {\r\n\t\tRectangle r = new Rectangle(); // Location Rectangle\r\n\t\tr.width = Tile.TILEWIDTH;\r\n\t\tr.height = Tile.TILEHEIGHT;\r\n\t\tr.x = x * Tile.TILEWIDTH;\r\n\t\tr.y = y * Tile.TILEHEIGHT;\r\n\t\tfor(Nonmoving n : handler.getWorld().getEntityManager().getNonmoving()) {\r\n\t\t\tif(n.getCollisionBounds(0, 0).intersects(r)) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor(Objects o : handler.getWorld().getEntityManager().getObjects()) {\r\n\t\t\tif(o.getCollisionBounds(0, 0).intersects(r)) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"@Override\n\tpublic boolean hasCollide(Entity e) {\n\t\treturn rect.intersects(e.getRectangle());\n\t}",
"public boolean isColliding(){\n for(int i = 0; i < eng.getIDManager().getObjectsWithID(\"GameObject\").size(); i++){\n GameObject temp = eng.getIDManager().getObjectsWithID(\"GameObject\").get(i);\n \n if(temp.getHitBox().getBounds().intersects(rect.getBounds()) &&\n temp.getHitBox() != this){\n currentCollidingObject = temp;\n return true;\n }\n }\n \n return false;\n }",
"public boolean requiresUpdate(final Rectangle rect) {\n if (!viewport.intersects(rect)) {\n return false;\n }\n \n return fullUpdate || (getDirtyArea(rect) != null);\n }",
"Rectangle getCollisionBox();",
"public boolean intersects (GraphicalFigure fig) {\n\t\t\n\t\t// Check to see if there is any overlap between the 2 figures horizontally\n\t\tif (fig.getOffset().xCoord() > this.gfPos.xCoord() + this.getWidth() || this.gfPos.xCoord() > fig.getOffset().xCoord() + fig.getWidth()) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t// Check to see if there is any overlap between the 2 figures vertically\n\t\tif (fig.getOffset().yCoord() > this.gfPos.yCoord() + this.getHeight() || this.gfPos.yCoord() > fig.getOffset().yCoord() + fig.getHeight()) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}"
] | [
"0.7293077",
"0.72029907",
"0.70859146",
"0.6956152",
"0.6922904",
"0.68740684",
"0.6842259",
"0.68295324",
"0.6808846",
"0.6805312",
"0.6722607",
"0.67123026",
"0.66987365",
"0.6692891",
"0.6677556",
"0.6640155",
"0.66231275",
"0.6616906",
"0.6543772",
"0.65407884",
"0.6532505",
"0.6477027",
"0.6452827",
"0.64523673",
"0.6426078",
"0.639715",
"0.6394671",
"0.63936114",
"0.6389187",
"0.6373718",
"0.634346",
"0.6335752",
"0.6335557",
"0.63206816",
"0.6320248",
"0.63133",
"0.63125813",
"0.62793416",
"0.6223266",
"0.62098145",
"0.620352",
"0.6202441",
"0.61903346",
"0.61647815",
"0.6155896",
"0.6155231",
"0.6145351",
"0.6132944",
"0.61095417",
"0.6077805",
"0.60397315",
"0.60292006",
"0.6026704",
"0.6025914",
"0.6020426",
"0.60160136",
"0.6006754",
"0.60061705",
"0.6005061",
"0.60022026",
"0.59956306",
"0.5994017",
"0.59928584",
"0.5981449",
"0.5978357",
"0.59699",
"0.59582865",
"0.5956918",
"0.59491974",
"0.59319466",
"0.59243846",
"0.59159386",
"0.5908115",
"0.59066767",
"0.5903539",
"0.58901227",
"0.5885099",
"0.5879055",
"0.5877332",
"0.5860977",
"0.5858075",
"0.58541614",
"0.5846814",
"0.5846814",
"0.5846758",
"0.5828675",
"0.5828487",
"0.58212525",
"0.5810317",
"0.5804857",
"0.58008695",
"0.5797812",
"0.57744616",
"0.5770963",
"0.57695615",
"0.5767234",
"0.57669234",
"0.57590467",
"0.5746248",
"0.5738519",
"0.5736426"
] | 0.0 | -1 |
Spawns an item based on probability | void spawnItem(@NotNull Point point) {
int anInt = r.nextInt(100) + 1;
if (anInt <= 10)
objectsInMap.add(new AmmoItem(point));
else if (anInt <= 20)
objectsInMap.add(new HealthItem(point));
else if (anInt <= 30)
objectsInMap.add(new ShieldItem(point));
else if (anInt <= 40)
objectsInMap.add(new StarItem(point));
else if (anInt <= 45)
objectsInMap.add(new LivesItem(point));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void SetSpawnProb(double SP){\n if(SP > 0.5){\n spawn = true;\n }else{\n spawn = false;\n }\n }",
"private void spawnSomeGold() {\n if (goldSpawned.size() >= goldSpawnPoints.size()) {\n return;\n }\n Location loc = goldSpawnPoints.get(random.nextInt(goldSpawnPoints.size()));\n Item item = loc.getWorld().dropItem(loc, new ItemStack(Material.GOLD_INGOT, 1));\n goldSpawned.add(item);\n }",
"public void act()\n {\n if (Greenfoot.getRandomNumber(200) < 3)\n {\n addObject(new Cabbage(), Greenfoot.getRandomNumber(600), 0);\n }\n \n if (Greenfoot.getRandomNumber(200) < 3)\n {\n addObject(new Eggplant(), Greenfoot.getRandomNumber(600), 0);\n }\n \n if (Greenfoot.getRandomNumber(200) < 3)\n {\n addObject(new Onion(), Greenfoot.getRandomNumber(600), 0);\n }\n \n if (Greenfoot.getRandomNumber(300) < 3)\n {\n addObject(new Pizza(), Greenfoot.getRandomNumber(600), 0);\n }\n \n if (Greenfoot.getRandomNumber(400) < 3)\n {\n addObject(new Cake(), Greenfoot.getRandomNumber(600), 0);\n }\n \n if (Greenfoot.getRandomNumber(400) < 3)\n {\n addObject(new Icecream(), Greenfoot.getRandomNumber(600), 0);\n }\n countTime();\n }",
"public ItemSpawnTick() {\n super(100);\n }",
"private void mutate(float probability) {\r\n\r\n individual[] temp_pop = new individual[this.pop_size];\r\n\r\n for (int i = 0; i < this.pop_size; i++) {\r\n\r\n float temp_genes[] = this.offspring_population.getPopulation()[i].getGenes();\r\n\r\n // mutation can now mutate wild cards\r\n for (int j = 0; j < temp_genes.length; j++) {\r\n float k = new Random().nextFloat();\r\n\r\n if (k <= probability) {\r\n float temp = new Random().nextFloat();\r\n temp_genes[j] = temp; // add a float between 0-1 // just mutate a new float\r\n }\r\n }\r\n individual child = new individual(temp_genes, solutions, output);\r\n temp_pop[i] = child;\r\n }\r\n this.main_population.setPopulation(temp_pop);\r\n this.main_population.update_population();\r\n }",
"private void addRandomAsteroid() {\n ThreadLocalRandom rng = ThreadLocalRandom.current();\n Point.Double newAsteroidLocation;\n //TODO: dont spawn on top of players\n Point.Double shipLocation = new Point2D.Double(0,0);\n double distanceX, distanceY;\n do { // Iterate until a point is found that is far enough away from the player.\n newAsteroidLocation = new Point.Double(rng.nextDouble(0.0, 800.0), rng.nextDouble(0.0, 800.0));\n distanceX = newAsteroidLocation.x - shipLocation.x;\n distanceY = newAsteroidLocation.y - shipLocation.y;\n } while (distanceX * distanceX + distanceY * distanceY < 50 * 50); // Pythagorean theorem for distance between two points.\n\n double randomChance = rng.nextDouble();\n Point.Double randomVelocity = new Point.Double(rng.nextDouble() * 6 - 3, rng.nextDouble() * 6 - 3);\n AsteroidSize randomSize;\n if (randomChance < 0.333) { // 33% chance of spawning a large asteroid.\n randomSize = AsteroidSize.LARGE;\n } else if (randomChance < 0.666) { // 33% chance of spawning a medium asteroid.\n randomSize = AsteroidSize.MEDIUM;\n } else { // And finally a 33% chance of spawning a small asteroid.\n randomSize = AsteroidSize.SMALL;\n }\n this.game.getAsteroids().add(new Asteroid(newAsteroidLocation, randomVelocity, randomSize));\n }",
"private void generateLoot( Integer lootLevel ){\n }",
"public float getSpawningChance()\n {\n return 0.1F;\n }",
"public void putRandomOnTile(Item item) {\n/* 4677 */ float newPosX = (this.tilex << 2) + 0.5F + Server.rand.nextFloat() * 3.0F;\n/* 4678 */ float newPosY = (this.tiley << 2) + 0.5F + Server.rand.nextFloat() * 3.0F;\n/* 4679 */ item.setPosXY(newPosX, newPosY);\n/* */ }",
"public synchronized void spawnMe()\n\t{\n\t\t_itemInstance = ItemTable.getInstance().createItem(\"Combat\", _itemId, 1, null, null);\n\t\t_itemInstance.dropMe(null, _location.getX(), _location.getY(), _location.getZ());\n\t}",
"@SuppressWarnings(\"unused\")\n void spawn(Entity entity);",
"public ProbabilityDistribution() {\n\t\trandom_ = new Random();\n\t\titemProbs_ = new MutableKeyMap<T, Double>();\n\t}",
"public void spawnItem(AItemBase item, WrapperNBT data, Point3d point){\r\n\t\tItemStack stack = item.getNewStack();\r\n\t\tif(data != null){\r\n\t\t\tstack.setTagCompound(data.tag);\r\n\t\t}\r\n\t\t//Spawn 1 block above in case we're right on a block.\r\n\t\tworld.spawnEntity(new EntityItem(world, point.x, point.y + 1, point.z, stack));\r\n\t}",
"public void growLiving(){\n living += Math.round(Math.random());\n living -= Math.round(Math.random());\n \n if(living > 100){\n living = 100;\n }\n \n if(living < 0){\n living = 0;\n }\n }",
"public void addRandomItem(double x, double y) {\r\n\r\n\t\tint choice = random.nextInt(3);\r\n\r\n\t\tString weaponchoices = Resources.getString(\"weaponchoices\");\r\n\t\tString delim = Resources.getString(\"delim\");\r\n\r\n\t\tString[] options = weaponchoices.split(delim);\r\n\t\tString option = options[choice];\r\n\r\n\t\tBufferedImage itemimage = Resources.getImage(option);\r\n\t\tSpriteGroup items = playField.getGroup(\"Items\");\r\n\t\tint healthOption = Resources.getInt(\"healthOption\");\r\n\r\n\t\tif (choice == healthOption) {\r\n\t\t\tgetHealthItem(x, y, option, itemimage, items);\r\n\t\t} else {\r\n\t\t\tgetWeaponItem(x, y, option, itemimage, items);\r\n\t\t}\r\n\r\n\t}",
"public void act() {\n if (System.currentTimeMillis() - lastTime > 5000) {\n lastTime = System.currentTimeMillis();\n int y = (int)(Math.random() * ((BackGround1.height-30)+1)+30);\n int x = (int)(Math.random() * ((BackGround1.width-15)+1)+15);\n addObject(new Coin(),x ,y);\n }\n }",
"public ProbabilityDistribution(Random random) {\n\t\trandom_ = random;\n\t\titemProbs_ = new MutableKeyMap<T, Double>();\n\t}",
"public void spawnParticle(String particle, double x, double y, double z, double dx, double dy, double dz, double speed, int count);",
"private void spawnRandomAsteroid() {\n\t\tRandom r = new Random();\n\n\t\t// The size of the asteroid is randomised.\n\t\tdouble size = r. nextDouble() * (AsteroidsAsteroid.maximumSize - AsteroidsAsteroid.minimumSize) + AsteroidsAsteroid.minimumSize;\n\n\t\t// The spawn distance is a fair distance away from the action.\n\t\tfinal double spawnDistance = cameraZoom * 2 + size;\n\n\t\t// Same with its velocity magnitude.\n\t\tdouble decidedVelocity = r.nextDouble() * (AsteroidsAsteroid.maximumVelocity - AsteroidsAsteroid.minimumVelocity) + AsteroidsAsteroid.minimumVelocity;\n\n\t\t// And the angle.\n\t\tdouble decidedAngle = r.nextDouble() * 360 - 180;\n\n\t\t// The velocity is then converted to a Vector3.\n\t\tVector3 velocity = new Vector3(decidedVelocity * -Math.sin(Math.toRadians(decidedAngle)), decidedVelocity * Math.cos(Math.toRadians(decidedAngle)));\n\n\t\t// Then we pick a random point on the screen.\n\t\tVector3 randomPoint = new Vector3(r.nextDouble() * 2 * cameraZoom - cameraZoom, r.nextDouble() * 2 * cameraZoom - cameraZoom);\n\n\t\t// We then set the asteroid's starting position as that spawn distance away from the point\n\t\t// in the reverse direction to its velocity.\n\t\tVector3 startingPosition = randomPoint.add(new Vector3(spawnDistance * Math.sin(Math.toDegrees(-decidedAngle)), spawnDistance * -Math.cos(Math.toDegrees(-decidedAngle))));\n\n\t\t// Then we just create the asteroid.\n\t\tAsteroidsAsteroid asteroid = new AsteroidsAsteroid(GameObject.ROOT, this, size, velocity);\n\t\tasteroid.translate(startingPosition);\n\t\tasteroids.add(asteroid);\n\n\t}",
"@Override\n public boolean act() {\n float variation = (random.nextFloat() / 2f) - 1;\n\n // Reconfigure the time to wait before spawning another enemy.\n this.deltaLimit = Math.max(100, INITIAL_SPAWN_TIME + variation - (100 * round));\n\n spawnEnemy();\n return false;\n }",
"public void spawnNpcOnChance(Location location) {\r\n\t\t\tif(location.isOutdoors() && Math.random() < 0.20) {\r\n\t\t\t\tthis.spawnEnemy(location);\r\n\t\t\t}\r\n\t\t}",
"int randomPoint() { return 1 + (int)Math.round((Math.random()*20) % (size - 2)); }",
"public static Weapon spawnWeapon()\r\n\t{\r\n\t\tfinal int numberOfWeapons = 5; //update as weapons are added\r\n\t\t\r\n\t\t//Create weapons in order to access attributes / randomly select a weapon\r\n\t\tSword sword = new Sword();\r\n\t\tStick stick = new Stick();\r\n\t\tBazooka bazooka = new Bazooka();\r\n\t\tAtomicBomb atomicBomb = new AtomicBomb();\r\n\t\tPotatoCannon potatoCannon = new PotatoCannon();\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tWeapon[] weapons = new Weapon[] {sword, stick,bazooka,atomicBomb,potatoCannon}; //store weapons in an array to randomly grab one to use in Game\r\n\t\t\r\n\t\tint randomWeapon; //weapon chosen\t\t\r\n\t\tRandom rng = new Random (); //create generator based upon current number of weapons\r\n\t\trandomWeapon = rng.nextInt(numberOfWeapons); //get a weapon object at random from array\r\n\r\n\t\treturn (weapons[randomWeapon]); //we have no need to create separate instance\r\n\t}",
"float genChance();",
"public void doTimeStep() {\r\n\t\twalk(getRandomInt(8));\r\n\t\tif (getEnergy() < 6 * Params.min_reproduce_energy && getEnergy() > Params.min_reproduce_energy) {\r\n\t\t\tCritter1 child = new Critter1();\r\n\t\t\treproduce(child, getRandomInt(8));\r\n\t\t\tnumberSpawned += 1;\r\n\t\t}else if(getEnergy() < Params.min_reproduce_energy) {\r\n\t\t\treturn;\r\n\t\t}else {\r\n\t\t\tCritter1 child1 = new Critter1();\r\n\t\t\treproduce(child1, getRandomInt(8));\r\n\t\t\tCritter1 child2 = new Critter1();\r\n\t\t\treproduce(child2, getRandomInt(8));\r\n\t\t\tnumberSpawned += 2;\r\n\t\t}\t\r\n\t}",
"private void chance(Player currentPlayer) {\n Random rand = new Random();\n int randomNum = rand.nextInt((3 - 1) + 1) + 1;\n\n if(randomNum == 1){\n convertTextToSpeech(\"Advance to Bond Street\");\n currentPlayer.setCurrentPosition(34);\n }\n if(randomNum == 2){\n convertTextToSpeech(\"Unpaid charges. Go to jail\");\n setJail(currentPlayer);\n }\n if(randomNum == 3){\n convertTextToSpeech(\"Build a rooftop swimming pool on your apartment, pay 300\");\n if(m_manageFunds) {\n currentPlayer.subtractMoney(300);\n funds.setText(String.valueOf(currentPlayer.getMoney()));\n m_freeParking += 300;\n Log.d(\"chance subtract 300\", currentPlayer.getName() +\n String.valueOf(currentPlayer.getMoney()));\n Log.d(\"chance free parking\", String.valueOf(m_freeParking));\n }\n }\n }",
"public void dropBlockAsItemWithChance(World worldIn, BlockPos pos, IBlockState state, float chance, int fortune) {\n/* 78 */ if (!worldIn.isRemote && worldIn.getGameRules().getGameRuleBooleanValue(\"doTileDrops\")) {\n/* */ \n/* 80 */ EntitySilverfish var6 = new EntitySilverfish(worldIn);\n/* 81 */ var6.setLocationAndAngles(pos.getX() + 0.5D, pos.getY(), pos.getZ() + 0.5D, 0.0F, 0.0F);\n/* 82 */ worldIn.spawnEntityInWorld((Entity)var6);\n/* 83 */ var6.spawnExplosionParticle();\n/* */ } \n/* */ }",
"public abstract int getRandomDamage();",
"public void act()\r\n {\n if (Greenfoot.getRandomNumber(1000)< flyRate)\r\n {\r\n addObject(new Fly(), getWidth(), Greenfoot.getRandomNumber(300));\r\n //flyRate++;\r\n }\r\n }",
"private void spawnEnemy() {\n float randomEnemy = (float) Math.random();\n\n if (round == 1) {\n addActorFunction.accept(new SimpleEnemy(tileSet));\n } else {\n float speedMultiplier = 1 + (0.08f * round);\n float healthMultiplier = 1 + (0.01f * round * round);\n\n if (randomEnemy < (round - 1) * 0.1) {\n addActorFunction.accept(new HeavyEnemy(tileSet, speedMultiplier, healthMultiplier));\n } else {\n addActorFunction.accept(new SimpleEnemy(tileSet, speedMultiplier, healthMultiplier));\n }\n }\n }",
"public abstract void initiateRandomCells(double probabilityForEachCell);",
"void move()\n {\n Random rand = new Random();\n int moveOrNot = rand.nextInt(2);//50% chance\n if(moveOrNot == 1)\n super.move();\n }",
"public void initiateRandomCells(double probabilityForEachCell){\n for(int y = 0; y < getHeight(); y++){\n for(int x = 0; x < getWidth(); x++){\n if(rand.nextDouble() < probabilityForEachCell)\n turnToLiving(x, y);\n }\n }\n }",
"public void addRandomItem(RandomItem item);",
"public Item() {\n\t\tthis(rand.nextDouble() * GameManager.NATIVE_WIDTH, -30.0, PowerUp[new Random().nextInt(PowerUp.length)]);\n\t}",
"private void GenerateHealth(){\t\t\n\t\t\n\t\t//Update for the health powerup\n\t\tint randGen = rand.nextInt((int)((float)HEALTH_FREQUENCY * RANDOM_DEVIATION));\n\t\trandGen = (rand.nextBoolean()) ?-randGen :randGen;\n\t\t\n\t\t//D.BUG(\"RandGen is: \" + String.valueOf(randGen));\n\t\t\n\t\tif(timeSinceLastSpawns.get(CollectibleType.Health.ordinal()).intValue() > (HEALTH_FREQUENCY + randGen)){\n\t\t\t\n\t\t\t//D.BUG(\"We have Spawned another health collectible after \" + String.valueOf(randGen + HEALTH_FREQUENCY) + \" milliseconds!\");\n\t\t\ttimeSinceLastSpawns.set(CollectibleType.Health.ordinal(), 0);\n\t\t\t\n\t\t\t//SPAWN HEALTH COLLECTIBLE HERE\n\t\t}\n\t}",
"public static Item generate(){\n\n //this method lists a collection of new items. it then uses a random number generator\n //to pick one of the objects, and then returns the object so that the main method\n //can add it to the inventory.\n\n ItemType weapon = ItemType.weapon;\n Item IronSword = new Item(weapon, \"Iron Sword\", 8, 50, 10);\n Item GoldenSword = new Item(weapon, \"Golden Sword\", 10, 75, 15);\n Item AllumSword = new Item(weapon, \"Alluminum Sword\", 6, 35, 8);\n Item BowandQuiver = new Item(weapon, \"Bow & Quiver\", 4, 45, 7);\n Item BattleAxe = new Item(weapon, \"Battle Axe\", 12, 55, 13);\n\n ItemType armor = ItemType.armor;\n Item ChainChest = new Item(armor, \"Chain Mail Chestplate\", 8, 40, 30);\n Item IronChest = new Item(armor, \"Iron Chestplate\", 10, 50, 40);\n Item GoldenChest = new Item(armor, \"Golden Chestplate\", 12, 65, 50);\n Item ChainPants = new Item(armor, \"Chain Mail Pants\", 7, 40, 30);\n Item IronPants = new Item(armor, \"Iron Pants\", 9, 50, 40);\n Item GoldenPants = new Item(armor, \"Golden Pants\", 11, 65, 50);\n Item Helmet = new Item(armor, \"Helmet\", 5, 40, 20);\n\n ItemType other = ItemType.other;\n Item Bandage = new Item(other, \"Bandage\", 1, 2, 0);\n Item Wrench = new Item(other, \"Wrench\", 3, 10, 5);\n Item Bread = new Item(other, \"Bread Loaf\", 2, 4, 0);\n Item Water = new Item(other, \"Water Flask\", 3, 2, 0);\n\n Item Initializer = new Item(other, \"init\", 0, 0, 0);\n\t\tint ItemPick = RandomNum();\n Item chosen = Initializer;\n\n switch (ItemPick){\n case 1:\n chosen = IronSword;\n break;\n case 2:\n chosen = GoldenSword;\n break;\n case 3:\n chosen = AllumSword;\n break;\n case 4:\n chosen = BowandQuiver;\n break;\n case 5:\n chosen = BattleAxe;\n break;\n case 6:\n chosen = ChainChest;\n break;\n case 7:\n chosen = IronChest;\n break;\n case 8:\n chosen = GoldenChest;\n break;\n case 9:\n chosen = ChainPants;\n break;\n\t\t\t case 10:\n chosen = IronPants ;\n break;\n case 11:\n chosen = GoldenPants;\n break;\n case 12:\n chosen = Helmet;\n break;\n case 13:\n chosen = Bandage;\n break;\n case 14:\n chosen = Wrench;\n break;\n case 15:\n chosen = Bread;\n break;\n case 16:\n chosen = Water;\n break;\n }\n\n return chosen;\n }",
"public Predator reproduce() {\n if(eaten < 2) return null;\n else {\n if ((int) (Math.random() * 100) >= 80) {\n predatorsSpawned++;\n return new Predator(((int) ((speed + Math.random()) * 5)), ((int) (maxEnergy + Math.random()\n * 50)), world, true);\n }\n predatorsSpawned++;\n return new Predator(speed, maxEnergy, world);\n }\n }",
"public static void spawnPlant (Species map[][], int plantSpawnRate, int plantHealth) {\n \n // Declare random coordinates\n int y, x; \n \n // Declare new plant\n Plant plant;\n \n // Spawn plants randomly until spawn rate is reached per turn\n for (int i = 0; i < plantSpawnRate; i++) {\n \n // Generate random coordinates\n y = (int)(Math.random() * map[0].length);\n x = (int)(Math.random() * map.length);\n \n // Check if space is empty and available to spawn\n if (map[y][x] == null) { \n \n // Get plant choice\n int plantChoice = (int) Math.ceil(Math.random() * 100);\n \n // Spawn different types of plants\n if ((plantChoice <= 100) && (plantChoice >= 50)) {\n plant = new HealthyPlant(plantHealth, x, y, plantSpawnRate);\n } else if ((plantChoice < 50) && (plantChoice >= 25)) {\n plant = new EnergizingPlant(plantHealth, x, y, plantSpawnRate);\n } else {\n plant = new PoisonousPlant(plantHealth, x, y, plantSpawnRate);\n }\n \n // Set plant location\n plant.setX(x);\n plant.setY(y);\n map[y][x] = plant;\n \n // No space\n } else {\n i -= 1;\n }\n }\n \n }",
"@Override\n public String execute(Actor actor, GameMap map) {\n // Set the bound for use in generating a random integer within the range [0-bound)\n // There will be 5 possible integers\n int bound = 5;\n // Pick up fruit by chance\n // To yield 1 or 2 when there are 5 possible integers = 40% chance\n Random random = new Random();\n int number = random.nextInt(bound);\n if (number == 1 || number == 2) {\n String result = \"\\n- Your eco points increases from \" + ((Player) actor).getEcoPoints();\n // Increment eco points of Player\n ((Player) actor).setEcoPoints(((Player) actor).getEcoPoints() + 10);\n result += \" to \" + ((Player) actor).getEcoPoints();\n return super.execute(actor, map) + result;\n }\n return \"You search the tree or bush for fruit, but you can't find any ripe ones\";\n }",
"public Critter1() {\r\n\t\tnumberSpawned = 0;\r\n\t\twhile (fearfullness < 50) {//at minimum fearfullness is 50%\r\n\t\t\tfearfullness = getRandomInt(100);\r\n\t\t}\r\n\t}",
"@SideOnly(Side.CLIENT)\n @Override\n public void randomDisplayTick(IBlockState state, World world, BlockPos pos, Random rand) {\n if(!ResynthConfig.PLANTS_GENERAL.enableSmokingPlants)\n return;\n\n IBlockState iblockstate = world.getBlockState(pos);\n int amount = 3;\n\n if(!MathUtil.chance(2.0F))\n return;\n\n if (iblockstate.getMaterial() != Material.AIR) {\n for (int i = 0; i < amount; ++i){\n double d0 = rand.nextGaussian() * 0.02D;\n double d1 = rand.nextGaussian() * 0.02D;\n double d2 = rand.nextGaussian() * 0.02D;\n world.spawnParticle(EnumParticleTypes.SMOKE_NORMAL,\n (double)((float)pos.getX() + rand.nextFloat()),\n (double)pos.getY() + (double)rand.nextFloat()\n * iblockstate.getBoundingBox(world, pos).maxY,\n (double)((float)pos.getZ() + rand.nextFloat()), d0, d1, d2);\n }\n }\n else {\n for (int i1 = 0; i1 < amount; ++i1) {\n double d0 = rand.nextGaussian() * 0.02D;\n double d1 = rand.nextGaussian() * 0.02D;\n double d2 = rand.nextGaussian() * 0.02D;\n world.spawnParticle(EnumParticleTypes.SMOKE_NORMAL,\n (double)((float)pos.getX() + rand.nextFloat()),\n (double)pos.getY() + (double)rand.nextFloat() * 1.0f,\n (double)((float)pos.getZ() + rand.nextFloat()), d0, d1, d2);\n }\n }\n }",
"public void dropBlockAsItemWithChance(World p_149690_1_, int p_149690_2_, int p_149690_3_, int p_149690_4_, int p_149690_5_, float p_149690_6_, int p_149690_7_) {}",
"private Item createWinItem()\n { \n boolean valid = false;\n int randomNumber = random.nextInt(items.size());\n \n // repeat until the winning situation is reached, and valid is true.\n while (!valid){\n // the winning situation check.\n if(!(items.get(randomNumber).getWeight() > characters.get(0).getCARRYLIMIT()) && trackItems.contains(items.get(randomNumber).getName())){\n valid = true;\n return items.get(randomNumber);\n }\n else{\n randomNumber = random.nextInt(items.size());\n }\n }\n Item winItem = items.get(randomNumber);\n return winItem;\n }",
"private void spawnZombie(int choose) {\n\t\tswitch (choose) {\n\t\tcase (0):\n\t\t// spawn one zombie at once.\n\t\t\tint r = (new Random()).nextInt(5);\n\t\t\tint r1 = (new Random()).nextInt(2);\n\t\t\tArrayList<AbstractZombie> z = new ArrayList();\n\t\t\tConeHeadZombie cz = new ConeHeadZombie();\n\t\t\tFastZombie fz = new FastZombie();\n\t\t\tz.add(cz);\n\t\t\tz.add(fz);\n\t\t\tAbstractZombie a = z.get(r1);\n\t\t\tthis.board.addModel(a, r, this.board.getLength() - 1);\n\t\t\tbreak;\n\n\t\tcase (1):\n\t\t// spawn two zombies at once.\n\t\t\tint r2 = (new Random()).nextInt(5);\n\t\t\tint r3 = (new Random()).nextInt(5);\n\t\t\tConeHeadZombie cr = new ConeHeadZombie();\n\t\t\tFastZombie fr = new FastZombie();\n\t\t\tif (r2 != r3) {\n\t\t\t\tthis.board.addModel(fr, r2, this.board.getLength() - 1);\n\t\t\t\tthis.board.addModel(cr, r3, this.board.getLength() - 1);\n\t\t\t} \n\t\t\tif (r2==r3){\n\t\t\twhile(r3==r2) {\n\t\t\t\tr2 = (new Random()).nextInt(5);\n\t\t\t\tr3 = (new Random()).nextInt(5);\n\t\t\t\t}\n\t\t\tthis.board.addModel(fr, r2, this.board.getLength() - 1);\n\t\t\tthis.board.addModel(cr, r3, this.board.getLength() - 1);\n\t\t\t}\n\t\t break;\n\t\t\n\t\tcase (2):\n\t\t// spawn three zombies at once\n\t\t\tint r4 = (new Random()).nextInt(5);\n\t\t int r5 = (new Random()).nextInt(5);\n\t\t int r6 = (new Random()).nextInt(5);\n\t\t ConeHeadZombie cq = new ConeHeadZombie();\n\t\t\tFastZombie fq = new FastZombie();\n\t\t\tConeHeadZombie cqq = new ConeHeadZombie();\n\t\t\tif (r4 != r5 && r4 !=r6 && r5 != r6 ) {\n\t\t\t\tthis.board.addModel(cqq, r4, this.board.getLength() - 1);\n\t\t\t\tthis.board.addModel(cq, r5, this.board.getLength() - 1);\n\t\t\t\tthis.board.addModel(fq, r6, this.board.getLength() - 1);\n\t\t\t} \n\t\t\telse {\n\t\t\t\twhile(r4==r5 || r5==r6 || r4==r6) {\n\t\t\t\tr4 = (new Random()).nextInt(5);\n\t\t\t\tr5 = (new Random()).nextInt(5);\n\t\t\t\tr6 = (new Random()).nextInt(5);\n\t\t\t }\n\t\t\t this.board.addModel(cqq,r5, this.board.getLength() - 1);\n\t\t\t this.board.addModel(cq, r4, this.board.getLength() - 1);\n\t\t\t this.board.addModel(fq, r6, this.board.getLength() - 1);\n\t\t break;\n\t\t\t}\n\t\t}\n\t}",
"@Override\n public void run() {\n// handler.addObject(new Enemy(rnd.nextInt(Game.WIDTH), rnd.nextInt(200), ID.Trump));\n// handler.addObject(new Enemy(rnd.nextInt(Game.WIDTH), rnd.nextInt(200), ID.Trump));\n int rnd_x = rnd.nextInt(Game.WIDTH);\n handler.addObject(new Enemy(getX() + 30, y, ID.Trump, 0));\n handler.addObject(new Enemy(getX() -30, y, ID.Trump, 0));\n handler.addObject(new Enemy(getX() , y+30, ID.Trump, 0));\n handler.addObject(new Enemy(getX() , y-30, ID.Trump, 0));\n\n\n }",
"public void spawnObstacle(){\n\t\tif(this.seconds > this.nextSpawn && !this.gameOver){\n\t\t\tint pX = this.radom.nextInt(350);\n\t\t\tthis.obstacles.add(new Obstacle(WIDTH,0,30,pX,0));\n\t\t\tthis.obstacles.add(new Obstacle(WIDTH,pX+110,30,HEIGHT-pX-111,0));\n\t\t\tthis.goals.add(new Goal(WIDTH,pX,30,110,0xffffff));\n\t\t\tthis.nextSpawn = this.seconds + this.spawnRate;\n\t\t}\n\t}",
"public static void handleSpawners(World world, BlockPos dataBlockPos, Entry<BlockPos, String> e, int weight)\n\t{\n\t\tint chance = (int) (Math.random() * weight);\n\t\tif (chance != 0) return; // return if the chance doesn't equal zero.\n\t\t\n\t\tTileEntity tileentity;\n\t\t\n\t\tswitch (e.getValue())\n\t\t{\n\t\t\t// TODO: implement differences between spawners\n\t\t\t\n\t\t\t\n\t\t\tcase \"common_mob_spawner\":\n\t\t\t\tworld.setBlockState(dataBlockPos, Blocks.MOB_SPAWNER.getDefaultState(), 3);\n\t\t\t\ttileentity = world.getTileEntity(dataBlockPos);\n\t\t\t\t\n\t\t\t\tif (tileentity instanceof TileEntityMobSpawner)\n\t\t\t\t{\n\t\t\t\t\tTileEntityMobSpawner spawner = (TileEntityMobSpawner) tileentity;\n\t\t\t\t\tMobSpawnerBaseLogic logic = spawner.getSpawnerBaseLogic();\n\t\t\t\t\tsetSpawnerLogic(logic, world.rand);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase \"uncommon_mob_spawner\":\n\t\t\t\tworld.setBlockState(dataBlockPos, Blocks.MOB_SPAWNER.getDefaultState(), 3);\n\t\t\t\ttileentity = world.getTileEntity(dataBlockPos);\n\t\t\t\t\n\t\t\t\tif (tileentity instanceof TileEntityMobSpawner)\n\t\t\t\t{\n\t\t\t\t\tTileEntityMobSpawner spawner = (TileEntityMobSpawner) tileentity;\n\t\t\t\t\tMobSpawnerBaseLogic logic = spawner.getSpawnerBaseLogic();\n\t\t\t\t\tsetSpawnerLogic(logic, world.rand);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase \"rare_mob_spawner\":\n\t\t\t\tworld.setBlockState(dataBlockPos, Blocks.MOB_SPAWNER.getDefaultState(), 3);\n\t\t\t\ttileentity = world.getTileEntity(dataBlockPos);\n\t\t\t\t\n\t\t\t\tif (tileentity instanceof TileEntityMobSpawner)\n\t\t\t\t{\n\t\t\t\t\tTileEntityMobSpawner spawner = (TileEntityMobSpawner) tileentity;\n\t\t\t\t\tMobSpawnerBaseLogic logic = spawner.getSpawnerBaseLogic();\n\t\t\t\t\tsetSpawnerLogic(logic, world.rand);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t}",
"public boolean launch() {\n\t\treturn ( Math.random() > this.explodProb);\r\n\t\t \r\n\t}",
"private void deliverBomb(Player me, Location location) \n {\n for (int i = 0; i < NUMBER_OF_BOMBS; i++) \n {\n double plusX = Math.random() * 5;\n if ((Math.random() * 10) < 6) \n {\n \t plusX = (0 - plusX);\n }\t\t\t\n double plusZ = Math.random() * 5;\n if ((Math.random() * 10) < 6) \n {\n plusZ = (0 - plusZ);\n }\n Location newLocation = new Location(location.getWorld(),\n location.getX() + plusX, \n location.getY() + (Math.random() + 20),\n location.getZ() + plusZ);\n // This spawns the creeper at the location provided\n me.getWorld().spawn(newLocation, Creeper.class);\n } \n }",
"@Override\r\n public Food createFood(List<Coordinate> obstacles) {\r\n Random random = new Random();\r\n double num = random.nextDouble();\r\n\r\n if (num <= MushroomPowerUp.rarity) {\r\n return new MushroomPowerUp(randomCoordinates(obstacles));\r\n }\r\n if (num <= DoubleScorePowerUp.rarity + MushroomPowerUp.rarity) {\r\n return new DoubleScorePowerUp(randomCoordinates(obstacles));\r\n }\r\n return new AppleFactory().createFood();\r\n }",
"public void populateGrid() {\n for (int i=0; i<5; i++) {\n int chance = (int) random(10);\n if (chance <= 3) {\n int hh = ((int) random(50) + 1) * pixelSize;\n int ww = ((int) random(30) + 1) * pixelSize;\n\n int x = ((int) random(((width/2)/pixelSize))) * pixelSize + width/4;\n int y = ((int) random((height-topHeight)/pixelSize)) * pixelSize + topHeight;\n\n new Wall(w/2, 190, hh, ww).render();\n }\n }\n\n int fewestNumberOfPowerUps = 3;\n int greatesNumberOfPowerUps = 6;\n int wSize = 2;\n int hSize = 2;\n\n powerUps = new ArrayList <PowerUp> ();\n createPowerUps (fewestNumberOfPowerUps, greatesNumberOfPowerUps, wSize, hSize);\n}",
"public void createItem()\n {\n \n necklace_red = new Item (\"Red Necklace\",\"This is a strange red necklace\");\n poolroom.addItem(necklace_red);\n \n // items in dancing room // \n gramophone = new Item (\"Gramophone\",\"This is a nice gramophone but without disk\");\n candelar = new Item(\"Candelar\",\"This candelar gives light and is really beautiful\");\n dancingroom.addItem(gramophone);\n dancingroom.addItem(candelar);\n \n //items in hall //\n potion2HP = new Potion(\"Potion 2 HP\",\"This potion gives 2 HP to the player\",2);\n hall.addItem(potion2HP);\n \n //items in corridor //\n halberd = new Weapon(\"Halberd\",\"This the statut halberd. It was not a really good idea to take it\",4,60);\n corridor.addItem(halberd);\n \n // items in bathroom //\n potion6HP = new Potion(\"Potion6HP\",\"This potions gives 6 HP to the player\",6);\n bathroom.addItem(potion6HP);\n \n // items in guestbedroom //\n Exit exit_from_corridor_to_bedroom = new Exit(\"south\",corridor,false, null);\n bedroomkey = new Keys(\"Bedroom key\",\"This key opens the master bedroom door\",exit_from_corridor_to_bedroom);\n guestbedroom.addItem(bedroomkey);\n \n // items in kitchen // \n set_of_forks_and_knives = new Weapon(\"Set of forks and knives\",\"This weapon is a set of silver forks and silver knives\",2,40);\n kitchen.addItem(set_of_forks_and_knives);\n \n // items in bedroom //\n Item disk = new Item(\"Disk\",\"This disk can be used with the gramophone\");\n bedroom.addItem(disk);\n \n Potion potion3HP = new Potion (\"Potion3HP\",\"This potions gives 3 HP to the player\",3);\n bedroom.addItem(potion3HP);\n \n Item money = new Item(\"Money\",\"You find 60 pounds\");\n bedroom.addItem(money);\n \n // items in the library //\n Item book = new Item(\"Book\",\"The title book is 'The best human friend : the cat'\");\n library.addItem(book);\n \n // items in laboratory //\n Exit exit_from_corridor_to_attic = new Exit(\"up\",corridor,false, null);\n Keys attickey = new Keys(\"Attic key\",\"This key is a shaped bone from a squeletor\", exit_from_corridor_to_attic); \n laboratory.addItem(attickey);\n \n Item construction_drawing = new Item(\"Construction drawing\",\"You find construction drawings. Mr Taylor planed to dig really deeply to the east of the gardener hut\");\n laboratory.addItem(construction_drawing);\n \n //items in garden //\n Weapon fork = new Weapon(\"Fork\",\"This fork is green and brown\",3,50);\n garden.addItem(fork);\n \n Potion apple = new Potion(\"Apple\",\"This apples gives you 2 HP\",2);\n garden.addItem(apple);\n \n // items in gardenerhut //\n \n Item pliers = new Item(\"Pliers\",\"You can cut a chain with this object\");\n gardenerhut.addItem(pliers);\n \n Item ritual_cape = new Item(\"Ritual cape\",\"You find a black ritual cape. It is very strange !\");\n gardenerhut.addItem(ritual_cape);\n \n Item necklace_black_1 = new Item(\"Necklace\",\"You find a very strange necklace ! It is a black rond necklace with the same symbol than in the ritual cape\");\n gardenerhut.addItem(necklace_black_1);\n \n //items in anteroom //\n \n Potion potion4HP = new Potion(\"Potion4HP\",\"This potion gives 4 HP to the player\",4);\n anteroom.addItem(potion4HP);\n \n Weapon sword = new Weapon(\"Sword\",\"A really sharp sword\",6,70);\n anteroom.addItem(sword);\n // items in ritual room //\n \n Item red_ritual_cape = new Item(\"Red ritual cape\", \"This is a ritual cape such as in the gardener hut but this one is red. There are some blond curly hairs\");\n ritualroom.addItem(red_ritual_cape);\n \n Item black_ritual_cape_1 = new Item(\"Black ritual cape\",\"This is a black ritual cape\");\n ritualroom.addItem(black_ritual_cape_1);\n \n Item black_ritual_cape_2 = new Item (\"Black ritual cape\",\"Another black ritual cape\");\n ritualroom.addItem(black_ritual_cape_2);\n \n }",
"public void spawnInvincibilityPickup() {\n\n Random random = new Random();\n\n invincibilityTimer.cancel();\n invincibilityTimer.purge();\n invincibilityTimer = new Timer();\n invincibilityTimer.schedule(\n new TimerTask() {\n @Override\n public void run() {\n Pickup pickup = new InvincibilityPickup(canvas);\n pickup.spawn();\n activePickups.add(pickup);\n spawnInvincibilityPickup();\n }\n }, (random.nextInt(INVINCIBILITY_MAX_SPAWN_TIME - INVINCIBILITY_MIN_SPAWN_TIME) + INVINCIBILITY_MIN_SPAWN_TIME));\n }",
"@Override\n public int quantityDroppedWithBonus(int par1, Random par2Random)\n {\n return 1 + par2Random.nextInt(par1 * 2 + 1);\n }",
"public PunchingMonster(int health, Random random) {\r\n\t\tsuper(75);\r\n\t\tif (random == null) {\r\n\t\t\tthrow new IllegalArgumentException(\"Invalid random number\");\r\n\t\t}\t\t\r\n\r\n\t\tthis.randomObject = random;\r\n\t}",
"public void roam(){\r\n Random rand = new Random();\r\n String aniName = this.getName();\r\n String aniType = this.getAniType();\r\n //Chance will be a number between 1 and 100\r\n int chance = rand.nextInt(100) + 1;\r\n //25% chance that the pachyderm will charge\r\n if (chance <= 25){\r\n System.out.println(aniName + \" the \" + aniType + \" charges.\");\r\n }\r\n //75% chance the method works as originally intended.\r\n else{\r\n System.out.println(aniName + \" the \" + aniType + \" roams.\");\r\n }\r\n }",
"void spawnEntityAt(String typeName, int x, int y);",
"public MobSpawner(Vector2D position, Game game)\n {\n super(position, new Vector2D(0,0), RADIUS);\n ships = new ArrayList<>();\n double maximumAngle = Math.toRadians(360/ENEMIES_CAN_SPAWN);\n for (double i = 0; i < Math.toRadians(360); i+= maximumAngle)\n {\n double randomAngle = Math.random() * maximumAngle;\n Vector2D newPos = Vector2D.polar(i + randomAngle, SPAWN_RADIUS).add(position);\n ships.add(new EnemyShip(new HlAiController(game, this), newPos));\n }\n }",
"public void spawnCoinPickup() {\n\n Random random = new Random();\n\n coinTimer.cancel();\n coinTimer.purge();\n coinTimer = new Timer();\n coinTimer.schedule(\n new TimerTask() {\n @Override\n public void run() {\n Pickup pickup = new CoinPickup(canvas);\n pickup.spawn();\n activePickups.add(pickup);\n spawnCoinPickup();\n }\n }, (random.nextInt(COIN_MAX_SPAWN_TIME - COIN_MIN_SPAWN_TIME) + COIN_MIN_SPAWN_TIME));\n }",
"void setSpawnsRequired(double spawnsRequired);",
"public void spawnNew() {\n\t\tif (tier> 1) {\n\t\t\ttier--;\n\t\t\thealth = tier;\n\t\t\tdamage = tier;\n\t\t\tspeed = 5;\n\t\t\timg = getImage(updateImage(tier)); // converted getImage to protected b/c it wasn't accessible by Balloon class (child class)\n\t\t}\n\t\telse {\n\t\t\tisAlive = false;\n\t\t\tdeletePath();\t\t\t\n\t\t}\n\t}",
"public void onUpdate() {\n super.onUpdate();\n\n if (this.world.isRemote) {\n double d0 = this.posX + (this.rand.nextDouble() * 2.0D - 1.0D) * (double) this.width * 0.5D;\n double d1 = this.posY + 0.05D + this.rand.nextDouble() * 1.0D;\n double d2 = this.posZ + (this.rand.nextDouble() * 2.0D - 1.0D) * (double) this.width * 0.5D;\n //double d3 = (this.rand.nextDouble() * 2.0D - 1.0D) * 0.3D;\n double d4 = this.rand.nextDouble() * 0.1D;\n //double d5 = (this.rand.nextDouble() * 2.0D - 1.0D) * 0.3D;\n this.world.spawnParticle(ticksExisted % 2 == 0 ? EnumParticleTypes.FLAME : EnumParticleTypes.SMOKE_NORMAL, d0, d1, d2, 0, d4, 0);\n } else if (--this.lifeTicks < 0) {\n this.setDead();\n }\n }",
"private void spawnZombie(Player p, String world, int x, int y, int z, byte rotation, int itemID, int stand) {\r\n\t\tint eid = DisguiseSystemHandler.newEntityID();\r\n\t\tentityIDs.add(eid);\r\n\t\tstandIDs.put(eid, stand);\r\n\t\t\r\n\t\t//save positioninfo for respawning\r\n\t\tItem3DInfo info = new Item3DInfo();\r\n\t\tinfo.setWorldName(world);\r\n\t\tinfo.setX(x);\r\n\t\tinfo.setY(y);\r\n\t\tinfo.setZ(z);\r\n\t\tinfo.setRotation(rotation);\r\n\t\tinfo.setItemID(itemID);\r\n\t\tentityInfo.put(eid, info);\r\n\t\t\r\n\t\tsendPacket(p, world, x, y, z, rotation, eid, itemID);\r\n\t}",
"@Override\n public void run() {\n if (random.nextInt(10) == 0)\n addPowerUp(random.nextInt(256));\n }",
"public static void reproduce (Species [][] map, int sheepHealth, int wolfHealth, int plantHealth) {\n \n // Place the baby\n int babyY, babyX;\n \n // Check if the baby has been placed\n int spawned = 0;\n \n for (int y = 0; y < map[0].length; y++){\n for (int x = 0; x < map.length; x++){\n \n boolean [][] breeding = breedChoice (map, x, y, plantHealth);\n \n // Sheep upwards to breed with\n if (breeding[0][0]) {\n ((Sheep)map[y][x]).reproduceHealthLost(10);\n ((Sheep)map[y-1][x]).reproduceHealthLost(10);\n \n // Make baby sheep\n Sheep sheep = new Sheep(sheepHealth, x, y);\n \n // Place the baby sheep\n do {\n babyY = (int)(Math.random() * map.length);\n babyX = (int)(Math.random() * map.length);\n if (map[babyY][babyX] == null) {\n map[babyY][babyX] = sheep;\n spawned = 1;\n }\n } while (spawned == 0);\n \n // Sheep downwards to breed with\n } else if (breeding[1][0]) {\n ((Sheep)map[y][x]).reproduceHealthLost(10);\n ((Sheep)map[y+1][x]).reproduceHealthLost(10);\n \n // Make baby sheep\n Sheep sheep = new Sheep(sheepHealth, x, y);\n \n // Place the baby sheep\n do {\n babyY = (int)(Math.random() * map.length);\n babyX = (int)(Math.random() * map.length);\n if (map[babyY][babyX] == null) {\n map[babyY][babyX] = sheep;\n spawned = 1;\n }\n } while (spawned == 0);\n \n // Sheep to the left to breed with\n } else if (breeding[2][0]) {\n ((Sheep)map[y][x]).reproduceHealthLost(10);\n ((Sheep)map[y][x-1]).reproduceHealthLost(10);\n \n // Make baby sheep\n Sheep sheep = new Sheep(sheepHealth, x, y);\n \n // Place the baby sheep\n do {\n babyY = (int)(Math.random() * map.length);\n babyX = (int)(Math.random() * map.length);\n if (map[babyY][babyX] == null) {\n map[babyY][babyX] = sheep;\n spawned = 1;\n }\n } while (spawned == 0);\n \n // Sheep to the right to breed with\n } else if (breeding[3][0]) {\n ((Sheep)map[y][x]).reproduceHealthLost(10);\n ((Sheep)map[y][x+1]).reproduceHealthLost(10);\n \n // Make baby sheep\n Sheep sheep = new Sheep(sheepHealth, x, y);\n \n // Place the baby sheep\n do {\n babyY = (int)(Math.random() * map.length);\n babyX = (int)(Math.random() * map.length);\n if (map[babyY][babyX] == null) {\n map[babyY][babyX] = sheep;\n spawned = 1;\n }\n } while (spawned == 0);\n \n // Wolf upwards to breed with\n } else if (breeding[0][1]) {\n ((Wolf)map[y][x]).reproduceHealthLost(10);\n ((Wolf)map[y-1][x]).reproduceHealthLost(10);\n \n // Make baby wolf\n Wolf wolf = new Wolf(wolfHealth, x, y);\n \n // Place the baby wolf\n do { \n babyY = (int)(Math.random() * map.length);\n babyX = (int)(Math.random() * map.length);\n if (map[babyY][babyX] == null) {\n map[babyY][babyX] = wolf;\n spawned = 1; \n }\n } while (spawned == 0);\n \n // Wolf downwards to breed with\n } else if (breeding[1][1]) {\n ((Wolf)map[y][x]).reproduceHealthLost(10);\n ((Wolf)map[y+1][x]).reproduceHealthLost(10);\n \n // Make baby wolf\n Wolf wolf = new Wolf(wolfHealth, x, y);\n \n // Place the baby wolf\n do { \n babyY = (int)(Math.random() * map.length);\n babyX = (int)(Math.random() * map.length);\n if (map[babyY][babyX] == null) {\n map[babyY][babyX] = wolf;\n spawned = 1; \n }\n } while (spawned == 0);\n \n // Wolf to the left to breed with\n } else if (breeding[2][1]) {\n ((Wolf)map[y][x]).reproduceHealthLost(10);\n ((Wolf)map[y][x-1]).reproduceHealthLost(10);\n \n // Make baby wolf\n Wolf wolf = new Wolf(wolfHealth, x, y);\n \n // Place the baby wolf\n do { \n babyY = (int)(Math.random() * map.length);\n babyX = (int)(Math.random() * map.length);\n if (map[babyY][babyX] == null) {\n map[babyY][babyX] = wolf;\n spawned = 1; \n }\n } while (spawned == 0);\n \n // Wolf to the right to breed with\n } else if (breeding[3][1]) {\n ((Wolf)map[y][x]).reproduceHealthLost(10);\n ((Wolf)map[y][x+1]).reproduceHealthLost(10);\n \n // Make baby wolf\n Wolf wolf = new Wolf(wolfHealth, x, y);\n \n // Place the baby wolf\n do { \n babyY = (int)(Math.random() * map.length);\n babyX = (int)(Math.random() * map.length);\n if (map[babyY][babyX] == null) {\n map[babyY][babyX] = wolf;\n spawned = 1; \n }\n } while (spawned == 0);\n \n }\n \n }\n }\n \n }",
"@Override\n public void dropBlockAsItemWithChance(@Nonnull World worldIn, @Nonnull BlockPos pos, @Nonnull IBlockState state, float chance, int fortune)\n {\n }",
"public void Attack(){\n float randomx = (float)(Math.random()-0.5)*attackRange*GameView.instance.cameraSize/10;\n float randomy = (float)(Math.random()-0.5)*attackRange*GameView.instance.cameraSize/5;\n Vector2 target = GameView.instance.player.aimFor();\n float dx = target.x-creationPoint.x;\n float dy =target.y-creationPoint.y;\n float l= (float)Math.sqrt(dx*dx+dy*dy);\n dx = dx/l-((float)Math.random()-0.5f)/2;\n dy = dy/l-(float)(Math.random())/10;\n ProjectilePool.instance.shootArrow(creationPoint.x, creationPoint.y, 1, dx, dy, 3);\n }",
"private final Item createPileItem(Item posItem, boolean starting) {\n/* */ try {\n/* 4519 */ Item pileItem = ItemFactory.createItem(177, 60.0F, null);\n/* */ \n/* 4521 */ float newXPos = ((this.tilex << 2) + 1) + Server.rand.nextFloat() * 2.0F;\n/* 4522 */ float newYPos = ((this.tiley << 2) + 1) + Server.rand.nextFloat() * 2.0F;\n/* */ \n/* 4524 */ float height = posItem.getPosZ();\n/* 4525 */ if (Server.getSecondsUptime() > 0) {\n/* 4526 */ height = Zones.calculatePosZ(newXPos, newYPos, this, isOnSurface(), false, posItem\n/* 4527 */ .getPosZ(), null, posItem.onBridge());\n/* */ }\n/* */ \n/* */ \n/* */ \n/* 4532 */ pileItem.setPos(newXPos, newYPos, height, posItem\n/* 4533 */ .getRotation(), posItem.getBridgeId());\n/* */ \n/* 4535 */ pileItem.setZoneId(this.zone.getId(), this.surfaced);\n/* 4536 */ int data = posItem.getTemplateId();\n/* 4537 */ pileItem.setData1(data);\n/* 4538 */ byte material = 0;\n/* 4539 */ boolean multipleMaterials = false;\n/* */ \n/* */ \n/* */ \n/* 4543 */ if (this.vitems != null)\n/* */ {\n/* 4545 */ for (Item item : this.vitems.getAllItemsAsArray()) {\n/* */ \n/* 4547 */ if (!item.isDecoration() && item.getFloorLevel() == pileItem.getFloorLevel()) {\n/* */ \n/* 4549 */ if (!starting)\n/* 4550 */ sendRemoveItem(item, false); \n/* 4551 */ if (!multipleMaterials)\n/* */ {\n/* */ \n/* */ \n/* 4555 */ if (item.getMaterial() != material)\n/* */ {\n/* 4557 */ if (material == 0) {\n/* */ \n/* */ \n/* */ \n/* 4561 */ material = item.getMaterial();\n/* */ \n/* */ \n/* */ \n/* */ }\n/* */ else {\n/* */ \n/* */ \n/* */ \n/* 4570 */ material = 0;\n/* 4571 */ multipleMaterials = true;\n/* */ } \n/* */ }\n/* */ }\n/* 4575 */ if (!item.equals(posItem))\n/* 4576 */ pileItem.insertItem(item, true); \n/* 4577 */ if (data != -1 && item.getTemplateId() != data) {\n/* */ \n/* 4579 */ pileItem.setData1(-1);\n/* 4580 */ data = -1;\n/* */ } \n/* */ } \n/* */ } \n/* */ }\n/* 4585 */ String name = pileItem.getName();\n/* 4586 */ String modelname = pileItem.getModelName();\n/* 4587 */ if (data != -1) {\n/* */ \n/* 4589 */ ItemTemplate template = ItemTemplateFactory.getInstance().getTemplate(data);\n/* 4590 */ String tname = template.getName();\n/* 4591 */ name = \"Pile of \" + template.sizeString + tname;\n/* 4592 */ if (material == 0) {\n/* 4593 */ pileItem.setMaterial(template.getMaterial());\n/* */ } else {\n/* 4595 */ pileItem.setMaterial(material);\n/* 4596 */ } StringBuilder build = new StringBuilder();\n/* 4597 */ build.append(pileItem.getTemplate().getModelName());\n/* 4598 */ build.append(tname);\n/* 4599 */ build.append(\".\");\n/* 4600 */ build.append(MaterialUtilities.getMaterialString(material));\n/* 4601 */ modelname = build.toString().replaceAll(\" \", \"\").trim();\n/* 4602 */ pileItem.setName(name);\n/* */ } \n/* */ \n/* */ \n/* 4606 */ if (!starting && this.watchers != null)\n/* */ {\n/* 4608 */ for (VirtualZone vz : getWatchers()) {\n/* */ \n/* */ \n/* */ try {\n/* 4612 */ if (vz.isVisible(pileItem, this)) {\n/* */ \n/* 4614 */ boolean onGroundLevel = true;\n/* 4615 */ if (pileItem.getFloorLevel() > 0) {\n/* 4616 */ onGroundLevel = false;\n/* */ \n/* */ }\n/* 4619 */ else if ((getFloors(0, 0)).length > 0) {\n/* 4620 */ onGroundLevel = false;\n/* */ } \n/* 4622 */ vz.addItem(pileItem, this, onGroundLevel);\n/* 4623 */ if (data != -1) {\n/* 4624 */ vz.renameItem(pileItem, name, modelname);\n/* */ }\n/* */ } \n/* 4627 */ } catch (Exception e) {\n/* */ \n/* 4629 */ logger.log(Level.WARNING, e.getMessage(), e);\n/* */ } \n/* */ } \n/* */ }\n/* 4633 */ return pileItem;\n/* */ }\n/* 4635 */ catch (FailedException fe) {\n/* */ \n/* 4637 */ logger.log(Level.WARNING, fe.getMessage(), (Throwable)fe);\n/* */ }\n/* 4639 */ catch (NoSuchTemplateException nst) {\n/* */ \n/* 4641 */ logger.log(Level.WARNING, nst.getMessage(), (Throwable)nst);\n/* */ } \n/* 4643 */ return null;\n/* */ }",
"public boolean launch() {\n\t\treturn (Math.random() > this.explodProb);\r\n\t}",
"void forceSpawn() throws SpawnException;",
"public void randomGenerateMap(int width, int height, int monsterChance, int objectChance) \r\n {\r\n for (int x = 0; x < width; x++) \r\n {\r\n for (int y = 0; y < height; y++) \r\n {\r\n Room r = new Room(x, y);\r\n if (random.nextInt(100) <= monsterChance) \r\n {\r\n r.addMonster(MonsterGenerator.GenerateRandomMonster());\r\n }\r\n if (random.nextInt(100) < objectChance)\r\n {\r\n RoomObject tempObj = RoomObjectGenerator.GenerateRandomObject();\r\n if (tempObj != null)\r\n {\r\n r.addObject(tempObj);\r\n }\r\n }\r\n map.add(r);\r\n }\r\n }\r\n currentRoom = getRoom(0, 0);\r\n if (currentRoom.getMonster() != null) \r\n {\r\n currentRoom.removeMonster();\r\n }\r\n placeMandatoryObjects();\r\n placeMandatoryItems();\r\n prepareMerchant();\r\n }",
"public void attemptSpawn(Player player) {\n\n int min = plugin.CONFIG.SPAWNING_RADIUS_MIN;\n int max = plugin.CONFIG.SPAWNING_RADIUS_MAX;\n\n // choose random x,z coordinates within the allowed radius range\n int distance = rand.nextInt((max - min) + 1) + min;\n double angle = 2 * Math.PI * rand.nextDouble();\n double deltaX = distance * Math.cos(angle);\n double deltaZ = distance * Math.sin(angle);\n Location loc = player.getLocation().clone();\n loc.setX(player.getLocation().getX() + deltaX);\n loc.setZ(player.getLocation().getZ() + deltaZ);\n\n // pick a new y coordinate if the same level is not possible\n if (!isSpawnable(loc)) {\n int high = (loc.getBlockY() + 10 >= 255) ? 254 : loc.getBlockY() + 10;\n int low = (loc.getBlockY() - 10 <= 0) ? 1 : loc.getBlockY() - 10;\n for (int i = high; i >= low; i--) {\n loc.setY(i);\n if (!isSpawnable(loc)) return;\n }\n }\n\n // do the spawn\n player.getWorld().spawnEntity(loc, EntityType.ZOMBIE);\n\n }",
"IEquipableItem create(int power, int min, int max);",
"private int getRandomPiece() {\r\n return new Random().nextInt(Constants.NUM_PIECES);\r\n }",
"private void greedyEnemySpawner(float enemyCap, IEnemyService spawner, World world, GameData gameData) {\r\n while (enemyCap >= MEDIUM_ENEMY_COST) {\r\n\r\n if (enemyCap >= MEDIUM_ENEMY_COST + BIG_ENEMY_COST) {\r\n spawnBigAndMediumEnemy(spawner, world, gameData);\r\n enemyCap -= MEDIUM_ENEMY_COST + BIG_ENEMY_COST;\r\n\r\n } else if (enemyCap >= BIG_ENEMY_COST) {\r\n spawnBigEnemy(spawner, world, gameData);\r\n enemyCap -= BIG_ENEMY_COST;\r\n\r\n } else {\r\n spawnMediumEnemy(spawner, world, gameData);\r\n enemyCap -= MEDIUM_ENEMY_COST;\r\n }\r\n }\r\n }",
"private void generateItemEntities(){\n final int NUM_POTIONS = 6;\n final int NUM_IRON_ARMOUR = 1;\n final int NUM_CHESTS = 2;\n final String ITEM_BOX_STYLE = \"volcano\";\n\n\n for (int i = 0; i < NUM_POTIONS; i++) {\n Tile tile = getTile(Item.randomItemPositionGenerator(DEFAULT_WIDTH),\n Item.randomItemPositionGenerator(DEFAULT_HEIGHT));\n if (Integer.parseInt(tile.getTextureName().split(\"_\")[1]) < 5\n && !tile.hasParent()) {\n HealthPotion potion = new HealthPotion(tile,false,\n (PlayerPeon) getPlayerEntity(), ITEM_BOX_STYLE);\n entities.add(potion);\n this.allVolcanoDialogues.add(potion.getDisplay());\n } else {\n i--;\n }\n }\n for (int i =0; i < NUM_IRON_ARMOUR; i++){\n Tile tile = getTile(Item.randomItemPositionGenerator(DEFAULT_WIDTH),\n Item.randomItemPositionGenerator(DEFAULT_HEIGHT));\n if (Integer.parseInt(tile.getTextureName().split(\"_\")[1]) < 5\n && !tile.hasParent()) {\n IronArmour ironArmour = new IronArmour(tile, false,\n (PlayerPeon) getPlayerEntity(),ITEM_BOX_STYLE,200);\n entities.add(ironArmour);\n this.allVolcanoDialogues.add(ironArmour.getDisplay());\n } else {\n i--;\n }\n }\n for (int i = 0; i <NUM_CHESTS; i++){\n Tile tile = getTile(Item.randomItemPositionGenerator(DEFAULT_WIDTH),\n Item.randomItemPositionGenerator(DEFAULT_HEIGHT));\n if (Integer.parseInt(tile.getTextureName().split(\"_\")[1]) < 5\n && !tile.hasParent()) {\n Treasure chest = new Treasure(tile, false,\n (PlayerPeon) getPlayerEntity(),ITEM_BOX_STYLE);\n entities.add(chest);\n this.allVolcanoDialogues.add(chest.getDisplay());\n } else {\n i--;\n }\n }\n\n Tile cooldownring = getTile(20,-7);\n CooldownRing cdring = new CooldownRing(cooldownring, false,\n (PlayerPeon) this.getPlayerEntity(), ITEM_BOX_STYLE,0.5f);\n entities.add(cdring);\n this.allVolcanoDialogues.add(cdring.getDisplay());\n\n Tile attackAmuletTile = getTile(2,14);\n Amulet attackAmulet = new Amulet(attackAmuletTile, false,\n (PlayerPeon) this.getPlayerEntity(), ITEM_BOX_STYLE,10);\n entities.add(attackAmulet);\n this.allVolcanoDialogues.add(attackAmulet.getDisplay());\n\n }",
"public void croisements(double probability) {\n\t\tRandom rand = new Random();\n\t\tint nbCroisements = rand.nextInt(10);\n\t\tfor (int i = 0; i < nbCroisements; i++) {\n\t\t\tint index1 = 0, index2 = 0;\n\t\t\twhile(index1 == index2) {\n\t\t\t\tindex1 = rand.nextInt(this.individus.size());\n\t\t\t\tindex2 = rand.nextInt(this.individus.size());\n\t\t\t}\n\t\t\tif(rand.nextDouble() <= probability) {\n\t\t\t\tthis.individus.get(index1).cross(this.individus.get(index2));\n\t\t\t}\n\t\t}\n\t}",
"@Override\r\n\tpublic void spawn(Location location) {\n\t\t\r\n\t}",
"public int dmg(){\r\n dmg = rand.nextInt(att);\r\n if(att == 1)\r\n dmg = 1;\r\n return dmg;\r\n }",
"public static void main(String[] args) {\n Hero aventurier = new Hero(200, 100);\n Equipement epee = new Equipement(\"epee\", 0);\n Monsters sorciere = new Monsters(\"witch\", 180, 0);\n Monsters barbare = new Monsters(\"olaf\", 160, 0);//Degat et point attaque sont à 0 car ils prendront les valeurs du random\n\n\n System.out.println(\"Bienvenue dans le dongeon\");\n System.out.println(\"Vous avez \" + aventurier.getPointDeVie() + \" Point de vie, \" + aventurier.getFlasqueDeau() + \" flasques pour combatre vos ennemies et une \");\n\n // i=room ;si pointdevie > room-->room+1 sinon game over(pas besoin de creer une classe)\n int i = 1;\n do {\n\n if (aventurier.getPointDeVie() > 0) ;\n {\n System.out.println(\"Room\" + i);\n\n Monsters enemieActuel = barbare;\n//nbr aleatoire entre sorcier et monster\n Random random = new Random();\n int nbrAl = random.nextInt(2 );\n//si nbr=0 = sorcier sinon barbare\n if (nbrAl == 0) {\n enemieActuel = sorciere;\n //sinon barbare\n } else {\n enemieActuel = barbare;\n }\n\n\n //Si barbare faire le do while\n\n if (enemieActuel == barbare) {\n\n do { //Faire des degats aleatoire grace au random à l'aide de l'epee\n epee.setDegat((int) (5 + (Math.random() * 30)));//comme .set dega=0 on lui donne la valeur de math.random\n int degat = epee.getDegat(); //.get renvoi la valeur au int nommer degat\n barbare.setPointDeVie(barbare.getPointDeVie() - degat);//vie - degat\n System.out.println(\"Il reste au barbare \" + barbare.getPointDeVie());//nouvelle valeur de point de vie\n\n\n //idem avec l'aventurier\n barbare.setPointAttaque((int) (5 + (Math.random() * 30)));\n int pointDattaque = barbare.getPointAttaque();\n aventurier.setPointDeVie(aventurier.getPointDeVie() - pointDattaque);\n System.out.println(\"il vous reste \" + aventurier.getPointDeVie());\n\n // tant que les Pvie de l'aventurier >= 0 et idem barbare continuer le combat\n } while (aventurier.getPointDeVie() >= 0 && barbare.getPointDeVie() >= 0);\n //à la fin du combat si pvie de l'aventurier sont >0 et que i (room) egale 5 \"gagné\"\n if (aventurier.getPointDeVie() > 0 && i==5) {\n System.out.println(\"Bravo vous avez gagné ! =)\");\n\n //Si juste pvie de l'aventurier > 0 --->room suivante\n }else if (aventurier.getPointDeVie() > 0 ){\n System.out.println(\"Bravo tu passes à la pièce suivante\");\n //on redonne les valeurs de depart pdeVie pour la nouvelle room\n aventurier.setPointDeVie(200);\n barbare.setPointDeVie(180);\n i+=1;\n }\n\n // sinon room = 6 pour envoyer le sout \"game over\"\n else {\n System.out.println(\"Game Over\");\n i = 6;\n }\n\n\n\n }\n\n //IDEM avec sorciere\n else {\n do {\n\n\n aventurier.setFlasqueDeau((int) (5 + (Math.random() * 30)));\n int degat = aventurier.getFlasqueDeau();\n sorciere.setPointDeVie(sorciere.getPointDeVie() - degat);\n System.out.println(\"Il reste à la sorciere \" + sorciere.getPointDeVie());\n\n sorciere.setPointAttaque((int) (5 + (Math.random() * 30)));\n int pointDattaque = sorciere.getPointAttaque();\n aventurier.setPointDeVie(aventurier.getPointDeVie() - pointDattaque);\n System.out.println(\"il vous reste \" + aventurier.getPointDeVie());\n\n } while (aventurier.getPointDeVie() >= 0 && sorciere.getPointDeVie() >= 0);\n if (aventurier.getPointDeVie() > 0 && i==5) {\n System.out.println(\"Bravo vous avez gagné ! =)\");\n }else if (aventurier.getPointDeVie() > 0 ){\n System.out.println(\"Bravo tu passes à la pièce suivante\");\n aventurier.setPointDeVie(200);\n sorciere.setPointDeVie(160);\n i+=1;\n }\n else {\n System.out.println(\"Game Over\");\n i = 6;\n }\n }\n } } while (i <= 5 && aventurier.getPointDeVie() > 0);\n\n\n }",
"public void spawnParticle ( Particle particle , double x , double y , double z , int count , double offsetX ,\n\t\t\tdouble offsetY , double offsetZ , double extra ) {\n\t\tspawnParticle ( particle , x , y , z , count , offsetX , offsetY , offsetZ );\n\t}",
"public Item generateItem()\n {\n Random rand = new Random();\n int item = rand.nextInt(itemList.size());\n return itemList.get(item);\n }",
"private void placePiece() {\r\n pieces[numPieces] = getRandomPoint();\r\n Game.movePiece(new PositionData(-1,-1,Constants.PLAYER_A_ID), pieces[numPieces]);\r\n numPieces++;\r\n }",
"public void spawnParticle ( Particle particle , Location location , int count ) {\n\t\thandleOptional ( ).ifPresent ( handle -> {\n\t\t\tof ( particle ).display ( location , 0.0F , 0.0F , 0.0F , 1.0F , count , null , handle );\n\t\t} );\n\t}",
"public void attack(String spell, character opponent){\n Random rand = new Random();\n int prob;\n String attack;\n \n prob = rand.nextInt(2); //we need two random numbers to allow us to use the two attacks:\n if(prob==0){\n attack = \"punch\";\n opponent.setHealth(opponent.getHealth() - 10);\n System.out.println(getName() + \" has landed \" + attack);\n System.out.println(opponent.getName() + \" health now \" + opponent.getHealth());\n }\n \n else if(prob==1){\n attack = \"kick\";\n opponent.setHealth(opponent.getHealth() - 15);\n System.out.println(getName() + \" has landed \" + attack);\n System.out.println(opponent.getName() + \" health now \" + opponent.getHealth());\n }\n \n \n }",
"private void triggerDropPotion(double percentage) {\n if (isDropped(percentage)) {\n loadItem(\"Potion\");\n }\n }",
"protected void spawnDeadParticles() {\r\n\t\tfloat timed = (float) deathTicks / DeathAction.deathLingeringTicks;\r\n\t\ttimed = Math.max(0, timed - 0.1f) / 0.9f;\r\n\t\tint particleCount = (int) (20 * Math.pow(timed, 4));\r\n\t\tfor (int i = 0; i < particleCount; i++) {\r\n\t\t\tdouble randX = rand.nextDouble(), randZ = rand.nextDouble(), randY = rand.nextDouble();\r\n\t\t\trandX = randX * (this.getEntityBoundingBox().maxX - getEntityBoundingBox().minX)\r\n\t\t\t\t\t+ getEntityBoundingBox().minX;\r\n\t\t\trandZ = randZ * (getEntityBoundingBox().maxZ - getEntityBoundingBox().minZ) + getEntityBoundingBox().minZ;\r\n\t\t\trandY = Math.pow(randY, 3) * (getEntityBoundingBox().maxY - getEntityBoundingBox().minY)\r\n\t\t\t\t\t+ getEntityBoundingBox().minY;\r\n\t\t\tdouble velX = this.rand.nextGaussian() * 0.01D;\r\n\t\t\tdouble velY = Math.abs(this.rand.nextGaussian() * 0.7D);\r\n\t\t\tdouble velZ = this.rand.nextGaussian() * 0.01D;\r\n\t\t\tworld.spawnParticle(EnumParticleTypes.SUSPENDED_DEPTH, randX, randY, randZ, velX, velY, velZ);\r\n\t\t}\r\n\t}",
"public void createPowerUps (int low, int high, int h, int w) {\n int num = (int) (random (low, high + 1));\n for (int i = 0; i < num; i++) {\n int x = ((int) random((width/pixelSize))) * pixelSize;\n int y = ((int) random((height-topHeight)/pixelSize)) * pixelSize + topHeight;\n if (getLocation(x, y).getType() == LocationType.AIR) {\n powerUps.add (new PowerUp (x, y, w, h));\n }\n }\n}",
"public Scenario generate() {\n\n //generate random number of Passenger(all human)\n ArrayList liPsg = new ArrayList();\n int totalNumOfPsg = (int) (rd.nextDouble() * PassengerCountMax + PassengerCountMin); //at least one Psg\n for (int i = 0; i < totalNumOfPsg; i++) {\n liPsg.add(getRandomPerson());\n }\n //System.out.println(\"PassengerNum= \"+totalNumOfPsg);\n\n\n //generate random number of Pedestrians(with Max 5) & allocate person+animal randomly(human+animal)\n ArrayList liPdt = new ArrayList();\n int totalNumOfPdst = (int) (rd.nextDouble() * PedestrianCountMax + PedestrianCountMin);//at least one Pdg\n int NumOfPerson = (int) Math.round(rd.nextDouble() * totalNumOfPdst);//if only 1 pdt,along with randomDouble<0.5 , 0.4x*1 rounded=0, will only an animal\n //so if you are random being in pdt but pdt only an animal, you neither wont be in scenario, so your negative probability in scenario is higher.\n int NumOfAnimal = totalNumOfPdst - NumOfPerson;\n for (int i = 0; i < NumOfPerson; i++) {\n liPdt.add(getRandomPerson());\n }\n for (int i = 0; i < NumOfAnimal; i++) {\n liPdt.add(getRandomAnimal());\n }\n //System.out.println(\"PedestrianNum= \"+totalNumOfPdst+\" with \"+NumOfPerson+\" human and \"+NumOfAnimal+\" animals\");\n\n\n //allocating where you are, 0=you absence & do nothing, 1=you in car, 2=you on road !!!!yeah happy solving\n int allocate_of_user = (int) Math.round(rd.nextDouble() * 2);\n if (allocate_of_user == 1) {\n ((Person) liPsg.get(0)).setAsYou(true); //set the first psg is you. !!!!!important Cast Obj into Person!!!!\n } else if (allocate_of_user == 2) {\n for (int i = 0; i < liPdt.size(); i++) {\n if (liPdt.get(i) instanceof Person) {//check whether a person\n ((Person) liPdt.get(i)).setAsYou(true);\n break; // only set once than break rather than set all of people of pdt is you\n }\n }\n }\n\n //Scenario(ArrayList<Character> passengers, ArrayList<Character> pedestrians, boolean isLegalCrossing)\n S = new Scenario(liPsg, liPdt, rd.nextBoolean()); //isLegalCrossing = red or green light;\n return S;\n }",
"public void newGame() {\n\t\ttheNumber = (int)(Math.random()* 100 + 1);\r\n\t\t\r\n\t}",
"public Item()\r\n {\r\n gen = new Random();\r\n color = new Color(gen.nextInt());\r\n x = 200;\r\n w = 100;\r\n h = 18;\r\n }",
"@Override\n public void tick() {\n x+=velX;\n y+=velY;\n\n if(Dante.getInstance().getX() <= x)\n displayedImage = left;\n else\n displayedImage = right;\n\n choose = r.nextInt(50);\n\n for(int i = 0; i < Handler1.getInstance().objects.size(); i++) {\n GameObject temp = Handler1.getInstance().objects.get(i);\n\n if(temp.getId() == ID.Block||temp.getId()==ID.Door|| temp.getId() == ID.Obstacle) {\n if(getBoundsBigger().intersects(temp.getBounds())) {\n x += (velX*2) * -1;\n y += (velY*2) * -1;\n velX *= -1;\n velY *= -1;\n } else if(choose == 0) {\n velX = (r.nextInt(2 + 2) - 2) + speed;\n velY = (r.nextInt(2 + 2) - 2) + speed;\n\n if (velX!=0){\n if (velY<0){\n velY+=1;\n }else {\n velY-=1;\n }\n }\n\n if (velY!=0){\n if (velX>0){\n velX-=1;\n }else {\n velX+=1;\n }\n }\n }\n }\n if(temp.id==ID.Dante){\n if (++tickCounter % (r.nextInt(50) + 50) == 0) {\n\n Handler1.getInstance().addObject(new Bullet(x, y, ID.Bullet,\n temp.getX() +(r.nextInt( 11+11) -11),\n temp.getY()+(r.nextInt(11 +11) -11),\n 30, 1, bulletImage,30));\n }\n }\n }\n\n if(hp <= 0) {\n Random rand = new Random();\n if(rand.nextInt(100) <= 33)\n Handler1.getInstance().addObject(new Coin(x, y));\n Handler1.getInstance().removeObject(this);\n }\n }",
"public void addRandoms() {\n //Add random boulders on tiles that aren't Lava\n int tileNumber;\n int selector;\n Tile t;\n String tileTexture;\n Random random = new Random();\n SquareVector playerPos = getPlayerEntity().getPosition();\n int tileCount = GameManager.get().getWorld().getTiles().size();\n AbstractWorld world = GameManager.get().getWorld();\n int randIndex;\n\n for (int i = 0; i < 20; i++) {\n //Get respective volcano tile (5 <= Lava tiles Index <= 8\n do {\n randIndex = random.nextInt(tileCount);\n t = world.getTile(randIndex);\n } while (t.getCoordinates().isCloseEnoughToBeTheSame(playerPos));\n\n tileTexture = t.getTextureName();\n tileNumber = Integer.parseInt(tileTexture.split(\"_\")[1]);\n\n selector = random.nextInt(2);\n if (tileNumber < 5 && tileNumber > 1 && selector == 1 && !t.hasParent()) {\n entities.add(new Rock(t, true));\n } else if (t != null && (tileNumber == 3 || tileNumber == 4) &&\n selector == 0 && !t.hasParent()) {\n entities.add(new VolcanoBurningTree(t, true));\n } else {\n i--;\n }\n }\n }",
"public void goAdventuring() {\n\n game.createRandomMonster(4);\n if(RandomClass.getRandomTenPercent() == 5) {\n System.out.println(\"Your are walking down the road... Everything looks peaceful and calm.. Hit enter to continue!\");\n sc.nextLine();\n\n } else {\n game.battle();\n p.checkXp();\n }\n }",
"@Override public void run()\n {\n final Set<E> elements = process.elements();\n if (elements.isEmpty() || random.nextDouble() * 3 - 2/*(-2..1]*/ < 0)\n send(process.add(randomNewElement()));\n else\n send(process.remove(randomElement(elements)));\n }",
"@Override\r\n public Collection<Item> roll() {\r\n Collection<Item> dropItems = new ArrayList();\r\n \r\n for (LootTableItem item : this.items) {\r\n if (random.nextDouble() <= 1 / item.getChance()) {\r\n dropItems.add(item.create());\r\n }\r\n if (dropItems.size() == amount) break;\r\n }\r\n \r\n return dropItems;\r\n }",
"private void createParticleOutsideOfBB(){\n\t\tint x = 0;\n\t\tint y = 0;\n\t\tint r = randInt.getRandInt(1, 4);\n\t\tif(movementType == 0){\n\t\t\tx = randInt.getRandInt(0,xMin);\n\t\t\ty = randInt.getRandInt(0,799);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tswitch (r) {\n\t\t\tcase 1: \n\t\t\t\tx = randInt.getRandInt(0,599);\n\t\t\t\ty = randInt.getRandInt(0,yMin);\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tx = randInt.getRandInt(0,599);\n\t\t\t\ty = randInt.getRandInt(yMax,799);\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\tx = randInt.getRandInt(0,xMin);\n\t\t\t\ty = randInt.getRandInt(0,799);\n\t\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\tx = randInt.getRandInt(xMax,599);\n\t\t\t\ty = randInt.getRandInt(0,799);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tparticleCollection.add(new Particle(x,y,1,1,width,height,randInt.getRandInt(0,1),randInt.getRandInt(0,1),worldMatrix));\n\t}",
"@Override\n\tpublic int buy(Weapon item) {\n\t\treturn 0;\n\t}",
"private void newPowerUp() {\r\n int row = 0;\r\n int column = 0;\r\n do {\r\n row = Numbers.random(0,maxRows-1);\r\n column = Numbers.random(0,maxColumns-1);\r\n } while(isInSnake(row,column,false));\r\n powerUp = new Location(row,column,STOP);\r\n grid[powerUp.row][powerUp.column].setBackground(POWER_UP_COLOR);\r\n }"
] | [
"0.66119736",
"0.6449095",
"0.6180851",
"0.6180631",
"0.6138265",
"0.61376685",
"0.60830456",
"0.6042978",
"0.60344964",
"0.6025565",
"0.60129356",
"0.5959775",
"0.59479856",
"0.5914938",
"0.5906822",
"0.59049016",
"0.5902486",
"0.5866937",
"0.5827174",
"0.58263165",
"0.58226866",
"0.5807133",
"0.57926536",
"0.5791378",
"0.57802874",
"0.57787997",
"0.577841",
"0.57560205",
"0.5753422",
"0.5750771",
"0.57495403",
"0.5735786",
"0.57068366",
"0.5700501",
"0.5692656",
"0.568699",
"0.56735927",
"0.5668585",
"0.56590724",
"0.5656929",
"0.5656182",
"0.56504244",
"0.5648532",
"0.5639679",
"0.5631145",
"0.5629734",
"0.5614661",
"0.56094605",
"0.56086975",
"0.5602824",
"0.5601448",
"0.55942833",
"0.55936116",
"0.5592152",
"0.5591138",
"0.55892956",
"0.5587541",
"0.5570536",
"0.55635524",
"0.55586106",
"0.5523392",
"0.5517011",
"0.5514395",
"0.5512522",
"0.55072916",
"0.5499776",
"0.5472075",
"0.5465565",
"0.5455357",
"0.5448007",
"0.5445226",
"0.54341596",
"0.5429845",
"0.5428689",
"0.54276407",
"0.5422733",
"0.5418053",
"0.54172754",
"0.5410536",
"0.5388424",
"0.5387206",
"0.53812903",
"0.537499",
"0.5366851",
"0.5365322",
"0.5363058",
"0.5360553",
"0.53592676",
"0.5356855",
"0.5356113",
"0.53517085",
"0.53456813",
"0.53434455",
"0.53425545",
"0.53423566",
"0.53416115",
"0.5338398",
"0.5336894",
"0.5324129",
"0.5323411"
] | 0.73670036 | 0 |
Used to draw things on currentMap that are visible | public ArrayList<ObjectInMap> getVisibleObjects() {
//To ensure Obstacles will be drawn at last
objectsInMap.sort((o1, o2) -> {
if (o1 instanceof Bush)
return 1;
else if (o2 instanceof Bush)
return -1;
else if (o1 instanceof Obstacle)
return -1;
else if (o2 instanceof Obstacle)
return 1;
else
return 0;
});
Polygon visible = new Polygon(new int[]{viewPoint.x, ((int) (viewPoint.x + zoom * GAME_WIDTH)), ((int) (viewPoint.x + zoom * GAME_WIDTH)), viewPoint.x}
, new int[]{viewPoint.y, viewPoint.y, ((int) (viewPoint.y + zoom * GAME_HEIGHT)), ((int) (viewPoint.y + zoom * GAME_HEIGHT))}, 4);
return objectsInMap.stream().filter(o -> o.intersects(visible)).collect(Collectors.toCollection(ArrayList::new));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void drawMap() {\r\n\t\tfor (int x = 0; x < map.dimensionsx; x++) {\r\n\t\t\tfor (int y = 0; y < map.dimensionsy; y++) {\r\n\t\t\t\tRectangle rect = new Rectangle(x * scalingFactor, y * scalingFactor, scalingFactor, scalingFactor);\r\n\t\t\t\trect.setStroke(Color.BLACK);\r\n\t\t\t\tif (islandMap[x][y]) {\r\n\t\t\t\t\tImage isl = new Image(\"island.jpg\", 50, 50, true, true);\r\n\t\t\t\t\tislandIV = new ImageView(isl);\r\n\t\t\t\t\tislandIV.setX(x * scalingFactor);\r\n\t\t\t\t\tislandIV.setY(y * scalingFactor);\r\n\t\t\t\t\troot.getChildren().add(islandIV);\r\n\t\t\t\t} else {\r\n\t\t\t\t\trect.setFill(Color.PALETURQUOISE);\r\n\t\t\t\t\troot.getChildren().add(rect);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void printMap()\n {\n if(this.firstTime)\n {\n SwingUtilities.invokeLater(new Runnable() {\n @Override\n public void run() { setVisible(true); }\n });\n this.firstTime = false;\n }\n screen.repaint();\n }",
"public void printMap()\n {\n this.mapFrame.paint();\n this.miniMapFrame.paint();\n }",
"private void render() {\n\t\ttheMap.draw(g);\n\t\ttheTrainer.draw(g);\n\t}",
"public void drawMap() {\n\t\tRoad[] roads = map.getRoads();\r\n\t\tfor (Road r : roads) {\r\n\t\t\tif (r.turn) {\r\n\t\t\t\tcity_squares[r.location.y][r.location.x].oneway_road = true;\r\n\t\t\t\tcity_squares[r.location.y][r.location.x].oneway_road_vert = true;\r\n\t\t\t} else if (r.direction == Direction.NORTH)\r\n\t\t\t\tcity_squares[r.location.y][r.location.x].oneway_road_north = true;\r\n\t\t\telse if (r.direction == Direction.SOUTH)\r\n\t\t\t\tcity_squares[r.location.y][r.location.x].oneway_road_south = true;\r\n\t\t\telse if (r.direction == Direction.WEST)\r\n\t\t\t\tcity_squares[r.location.y][r.location.x].oneway_road_west = true;\r\n\t\t\telse if (r.direction == Direction.EAST)\r\n\t\t\t\tcity_squares[r.location.y][r.location.x].oneway_road_east = true;\r\n\t\t\ttry {\r\n\t\t\t\tcity_squares[r.location.y][r.location.x].updateImage();\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"private void drawComponents () {\n // Xoa het nhung gi duoc ve truoc do\n mMap.clear();\n // Ve danh sach vi tri cac thanh vien\n drawMembersLocation();\n // Ve danh sach cac marker\n drawMarkers();\n // Ve danh sach cac tuyen duong\n drawRoutes();\n }",
"public void paintVisible(Graphics g){\n\n for (int i = 0; i < listOfTiles.size(); i++) {\n //In setPixels, the 3rd arguement is essentially the \"z\" height\n TileView holder = listOfTiles.get(i);\n\n //The tile Y pixels should be increased based on the z coordinate per column\n yPixel -= 8; //Now this will be the same as paintMapObjects\n holder.setPixels(xPixel, yPixel);\n holder.paintComponent(g);\n }\n }",
"@Override\n\tpublic void drawMap(Map map) {\n\t\tSystem.out.println(\"Draw map\"+map.getClass().getName()+\"on SD Screen\");\n\t}",
"private void render() {\n\n // Clear the whole screen\n gc.clearRect(0, 0, canvas.getWidth(), canvas.getHeight());\n\n // Draw the background image\n gc.drawImage(curMap.getMap(), 0,0, canvas.getWidth(), canvas.getHeight());\n\n // Draw Paths\n for(DrawPath p : pathMap.values()) {\n p.draw(gc);\n }\n\n // Draw all of the lines and edges\n\n // Lines\n for(Line l : lineMap.values()) {\n l.draw(gc);\n }\n\n // Points\n for(Point p : pointMap.values()) {\n p.draw(gc);\n }\n\n // Images\n for(Img i : imgMap.values()) {\n i.draw(gc);\n }\n\n // Text\n for(Text t : textMap.values()) {\n t.draw(gc);\n }\n }",
"@Override\r\n public void mapshow() {\r\n showMap l_showmap = new showMap(d_playerList, d_country);\r\n l_showmap.check();\r\n }",
"private void setUpMap() {\n if (points.size()>2) {\n drawCircle();\n }\n\n\n }",
"public void displayMap() {\n MapMenuView mapMenu = new MapMenuView();\r\n mapMenu.display();\r\n \r\n }",
"private void draw() {\n this.player.getMap().DrawBackground(this.cameraSystem);\n\n //Dibujamos al jugador\n player.draw();\n\n for (Character character : this.characters) {\n if (character.getMap() == this.player.getMap()) {\n character.draw();\n }\n }\n\n //Dibujamos la parte \"superior\"\n this.player.getMap().DrawForeground();\n\n //Sistema de notificaciones\n this.notificationsSystem.draw();\n\n this.player.getInventorySystem().draw();\n\n //Hacemos que la cámara se actualice\n cameraSystem.draw();\n }",
"void display(Map m) {\r\n\t\tm.tour = this;\r\n\t\tm.update(m.getGraphics());\r\n\t}",
"synchronized void updateActivatedLandmarks () {\n calculateViewportOffset (tmpXY, visitorX, visitorY);\n\n int offsetX = tmpXY[X];\n int offsetY = tmpXY[Y];\n\n for (int i = 0; i < mapLandmarks.length; ++i) {\n if (mapLandmarks[i].isActive ()) {\n int x0 = mapLandmarks[i].getX () - 16 - offsetX;\n int y0 = mapLandmarks[i].getY () - 16 - offsetY;\n repaint (x0, y0, 32, 32);\n }\n }\n }",
"private void drawMap(HashMap<String, TrailObj> trailCollection,\n\t\t\tGoogleMap mMap2) {\n\n\t\tfor (TrailObj trail : trailCollection.values()) {\n\t\t\tfor (PlacemarkObj p : trail.getPlacemarks()) {\n\t\t\t\tPolylineOptions rectOptions = new PolylineOptions();\n\t\t\t\tfor (LatLng g : p.getCoordinates()) {\n\t\t\t\t\trectOptions.add(g);\n\t\t\t\t}\n\t\t\t\tPolyline polyline = mMap2.addPolyline(rectOptions);\n\t\t\t\tpolyline.setColor(Color.RED);\n\t\t\t\tpolyline.setWidth(5);\n\t\t\t\tpolyline.setVisible(true);\n\t\t\t}\n\t\t}\n\t}",
"public void drawMap(ArrayList<Entity> entities){\n\t\t//draw map\n\t\tmap.draw(graphics, entities);\n\t}",
"public void paint(Map map, Graphics graphics, Camera camera, GraphicsManager graphicsManager)\r\n\t{\r\n\t\tgraphics.drawImage(graphicsManager.getPanelGaucheBas(), 0, 0, GameConfiguration.WINDOW_WIDTH, GameConfiguration.WINDOW_HEIGHT, null);\r\n\t\tint tileSize = GameConfiguration.TILE_SIZE;\r\n\t\t\r\n\t\tTile[][] tiles = map.getTiles();\r\n\t\tint width = GameConfiguration.WINDOW_WIDTH;\r\n\t\tint height = GameConfiguration.WINDOW_HEIGHT;\r\n\t\tif(GameConfiguration.launchInFullScreen) {\r\n\t\t\twidth = Toolkit.getDefaultToolkit().getScreenSize().width;\r\n\t\t\theight = Toolkit.getDefaultToolkit().getScreenSize().height;\r\n\t\t}\r\n\t\t//draw map\r\n\t\tfor (int lineIndex = 0; lineIndex < map.getLineCount(); lineIndex++) \r\n\t\t{\r\n\t\t\tfor (int columnIndex = 0; columnIndex < map.getColumnCount(); columnIndex++) \r\n\t\t\t{\r\n\t\t\t\tTile tile = tiles[lineIndex][columnIndex];\r\n//tilePos.x + tilePos.w >= 0 && tilePos.y + tilePos.h >= 0 && tilePos.x <= GAME_WIDTH && tilePos.y <= GAME_HEIGHT\r\n\t\t\t\tif(tile.getColumn() * tileSize - camera.getX() + tileSize >= 0 \r\n\t\t\t\t\t&& tile.getLine() * tileSize - camera.getY() + tileSize >= 0 \r\n\t\t\t\t\t&& tile.getColumn() * tileSize - camera.getX() <= width && tile.getLine() * tileSize - camera.getY() <= height) {\r\n\t\t\t\t\tAnimation animation = tile.getAnimation();\r\n\t\t\t\t\tgraphics.drawImage(graphicsManager.getGrassTile(), tile.getColumn() * tileSize - camera.getX(), tile.getLine() * tileSize - camera.getY(), tileSize, tileSize, null);\r\n\t\t\t\t\tgraphics.drawImage(animation.getFrame(), tile.getColumn() * tileSize - camera.getX(), tile.getLine() * tileSize - camera.getY(), tileSize, tileSize, null);\r\n\t\t\t\t\t/*graphics.setColor(Color.white);\r\n\t\t\t\t\tgraphics.drawRect(tile.getColumn() * tileSize - camera.getX(), tile.getLine() * tileSize - camera.getY(), tileSize, tileSize);*/\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void draw() {\n for (Point2D point : pointSet) {\n point.draw();\n }\n }",
"public void draw() {\n for (Point2D i : pointsSet)\n i.draw();\n }",
"public void paint()\n {\n try { Thread.sleep(SPEED); } \n catch (Exception e) { }\n \n this.printMap();\n }",
"public void paint()\n {\n try { Thread.sleep(SPEED); } \n catch (Exception e) { }\n \n this.printMap();\n }",
"public void draw() {\r\n if(isVisible()) {\r\n Canvas canvas = Canvas.getCanvas();\r\n canvas.draw(this,getColor(),\r\n new Rectangle(\r\n (int)round(getXposition()),\r\n (int)round(getYposition()),\r\n (int)round(size),\r\n (int)round(size)));\r\n canvas.wait(10);\r\n }\r\n }",
"@Override\n\tpublic void show () {\n overWorld = new Sprite(new TextureRegion(new Texture(Gdx.files.internal(\"Screens/overworldscreen.png\"))));\n overWorld.setPosition(0, 0);\n batch = new SpriteBatch();\n batch.getProjectionMatrix().setToOrtho2D(0, 0, 320, 340);\n\n // Creates the indicator and sets it to the position of the first grid item.\n indicator = new MapIndicator(screen.miscAtlases.get(2));\n // Creates the icon of Daur that indicates his position.\n icon = new DaurIcon(screen.miscAtlases.get(2));\n // Sets the mask position to zero, as this screen does not lie on the coordinate plane of any tiled map.\n screen.mask.setPosition(0, 0);\n screen.mask.setSize(320, 340);\n Gdx.input.setInputProcessor(inputProcessor);\n\n // Creates all relevant text.\n createText();\n // Sets numX and numY to the position of Daur on the map.\n numX = storage.cellX;\n numY = storage.cellY;\n indicator.setPosition(numX * 20, numY * 20 + 19);\n // Sets the icon to the center of this cell.\n icon.setPosition(numX * 20 + 10 - icon.getWidth() / 2, numY * 20 + 29 - icon.getHeight() / 2);\n // Creates all the gray squares necessary.\n createGraySquares();\n }",
"public void showMap(boolean isEnd) {\n\t\t// Map shown inbetween games. Works by grabbing the system time in milliseconds,\n\t\t// adding 5000, and then counting down 1 second every second. Effectively keeping\n\t\t// the map screen up for 5 seconds.\n//\t\tif(legnum == 4) {\n//\t\t\treplay = new JButton(\"Replay\");\n//\t\t\treplay.setSize(frameWidth*5/100, frameHeight*5/100);\n//\t\t\tif(isOsprey) {\n//\t\t\t\treplay.setLocation((frameWidth/2)+frameWidth*30/100, frameHeight/2);\n//\t\t\t}\n//\t\t\telse {\n//\t\t\t\treplay.setLocation((frameWidth/2)+frameWidth*15/100, frameWidth/2);\n//\t\t\t}\n//\t\t\tframe.add(replay);\n//\t\t}\n\t\tlong tEnd = System.currentTimeMillis();\n\t\tframe.setVisible(true);\n\t\tlong tStart = tEnd + 3*1000;\n\t\twhile(tStart > tEnd) {\n\t\t\ttStart -= 1000;\n\t\t\ttry {\n\t\t\t\tThread.sleep(1000);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}",
"public synchronized void draw() {\n // Clear the canvas\n// canvas.setFill(Color.BLACK);\n// canvas.fillRect(0, 0, canvasWidth, canvasHeight);\n canvas.clearRect(0, 0, canvasWidth, canvasHeight);\n\n // Draw a grid\n if (drawGrid) {\n canvas.setStroke(Color.LIGHTGRAY);\n canvas.setLineWidth(1);\n for (int i = 0; i < mapWidth; i++) {\n drawLine(canvas, getPixel(new Point(i - mapWidth / 2, -mapHeight / 2)), getPixel(new Point(i - mapWidth / 2, mapHeight / 2)));\n drawLine(canvas, getPixel(new Point(-mapWidth / 2, i - mapHeight / 2)), getPixel(new Point(mapWidth / 2, i - mapHeight / 2)));\n }\n }\n\n // Draw each player onto the canvas\n int height = 0;\n for (Player p : playerTracking) {\n canvas.setStroke(p.getColor());\n\n drawName(canvas, p.getName(), height, p.getColor());\n height += 30;\n\n canvas.setLineWidth(7);\n\n // Draw each position\n Point last = null;\n int direction = 0;\n for (Point point : p.getPoints()) {\n if (last != null) {\n drawLine(canvas, getPixel(last), getPixel(point));\n\n Point dir = point.substract(last);\n if (dir.X > dir.Y && dir.X > 0) {\n direction = 1;\n } else if (dir.X < dir.Y && dir.X < 0) {\n direction = 3;\n } else if (dir.Y > dir.X && dir.Y > 0) {\n direction = 2;\n } else if (dir.Y < dir.X && dir.Y < 0) {\n direction = 0;\n }\n }\n last = point;\n }\n\n drawSlug(canvas, p.getId() - 1, getPixel(last), direction);\n }\n }",
"public synchronized void draw(Graphics2D g) {\n\t\t\n\t\tfor(Car car : world.carList){\n\t\t\tcar.pointMap.draw(g);\n\t\t}\n\t\t\n\t\tworld.map.draw(g);\n\t\t\n\t}",
"public void paintGui(Map map, Fog fog, List<Entity> entities, Graphics graphics, Camera camera, JPanel infoTargetPanel, JPanel infoUpPanel, JPanel minimapPanel, Minimap minimap, GraphicsManager graphicsManager)\r\n\t{\t\r\n\t\tTile[][] tiles = map.getTiles();\r\n\t\tboolean[][] removeFog = fog.getFog();\r\n\t\t\r\n\t\t//draw the rect of the minimap\r\n\t\tgraphics.drawImage(graphicsManager.getPanelGaucheBas(), minimapPanel.getX() + minimapPanel.getWidth() / 2, minimapPanel.getY(), minimapPanel.getWidth() / 2, minimapPanel.getHeight(), null);\r\n\t\t\t\t\r\n\t\t//draw the minimap\r\n\t\tfor (int lineIndex = 0; lineIndex < map.getLineCount(); lineIndex++) \r\n\t\t{\r\n\t\t\tfor (int columnIndex = 0; columnIndex < map.getColumnCount(); columnIndex++) \r\n\t\t\t{\r\n\t\t\t\tTile tile = tiles[lineIndex][columnIndex];\r\n\t\t\t\tgraphics.setColor(tile.getColor());\r\n\t\t\t\t\t\r\n\t\t\t\tgraphics.fillRect(tile.getColumn() * minimap.getGridMapWidth() + minimap.getFirstGridXOfMap(), tile.getLine() * minimap.getGridMapHeight() + minimap.getFirstGridYOfMap(), minimap.getGridMapWidth(), minimap.getGridMapHeight());\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tfor(Entity entity : entities)\r\n\t\t{\r\n\t\t\tpaintEntityGui(entity, graphics, camera, minimap);\r\n\t\t}\r\n\t\t\r\n\t\tgraphics.setColor(Color.black);\r\n\t\tfor (int lineIndex = 0; lineIndex < fog.getLineCount(); lineIndex++) \r\n\t\t{\r\n\t\t\tfor (int columnIndex = 0; columnIndex < fog.getColumnCount(); columnIndex++) \r\n\t\t\t{\r\n\t\t\t\tif(removeFog[lineIndex][columnIndex] == true) {\r\n\t\t\t\t\tgraphics.fillRect(columnIndex * minimap.getGridMapWidth() + minimap.getFirstGridXOfMap(), lineIndex * minimap.getGridMapHeight() + minimap.getFirstGridYOfMap(), minimap.getGridMapWidth(), minimap.getGridMapHeight());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\t\t\r\n\t\t//draw rect of the camera on the minimap\r\n\t\tgraphics.setColor(Color.white);\r\n\t\tgraphics.drawRect(camX + (camera.getX() * minimap.getGridMapWidth()) / GameConfiguration.TILE_SIZE, camY + (camera.getY() * minimap.getGridMapHeight()) / GameConfiguration.TILE_SIZE, camW, camH);\t\r\n\t\t\r\n\t\tgraphics.drawImage(graphicsManager.getPanelGaucheBas(), infoTargetPanel.getX(), infoTargetPanel.getY(), infoTargetPanel.getWidth(), infoTargetPanel.getHeight(), null);\r\n\t\tgraphics.drawImage(graphicsManager.getPanelGaucheBas(), infoUpPanel.getX(), infoUpPanel.getY(), infoUpPanel.getWidth(), infoUpPanel.getHeight(), null);\r\n\t}",
"private void generateMap(){\n if(currDirections != null){\n\n\t \tPoint edge = new Point(mapPanel.getWidth(), mapPanel.getHeight());\n \tmapPanel.paintImmediately(0, 0, edge.x, edge.y);\n\t \t\n\t \t\n\t \t// setup advanced graphics object\n\t Graphics2D g = (Graphics2D)mapPanel.getGraphics();\n\t g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);\n\t g.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL, RenderingHints.VALUE_STROKE_NORMALIZE);\n\n\t \n\t Route rt = currDirections.getRoute();\n\t\n\t boolean singleStreet = rt.getGeoSegments().size() == 1;\n\t Route contextRoute = (!singleStreet ? rt : \n\t \t\tnew Route( virtualGPS.findFullSegment(rt.getEndingGeoSegment()) ) );\n\t \n\t // calculate the longitude and latitude bounds\n\t int[] bounds = calculateCoverage( contextRoute , edge);\n\t \n\t Collection<StreetSegment> map = virtualGPS.getContext(bounds, contextRoute);\n\t \n\t \n\t // draw every segment of the map\n\t g.setColor(Color.GRAY);\n\t for(GeoSegment gs : map){\n\t \tdrawSegment(g, bounds, edge, gs);\n\t }\n\t \n\t // draw the path over the produced map in BLUE\n\t g.setColor(Color.BLUE);\n\t for(GeoFeature gf : rt.getGeoFeatures()){\n\t for(GeoSegment gs : gf.getGeoSegments()){\n\t\t \tdrawSegment(g, bounds, edge, gs);\n\t }\n\t Point start = derivePoint(bounds, edge, gf.getStart());\n\t Point end = derivePoint(bounds, edge, gf.getEnd());\n\t \n\t int dX = (int)(Math.abs(start.x - end.x) / 2.0);\n\t int dY = (int)(Math.abs(start.y - end.y) / 2.0);\n\n if(!jCheckBoxHideStreetNames.isSelected()){\n \tg.setFont(new Font(g.getFont().getFontName(), Font.BOLD, g.getFont().getSize()));\n \tg.drawString(gf.getName(), start.x + (start.x<end.x ? dX : -dX),\n \t\t\tstart.y + (start.y<end.y ? dY : -dY));\n }\n\t }\n }\n }",
"static void draw()\n {\n for (Viewport viewport : viewports)\n viewport.draw(renderers);\n }",
"protected void drawMap(Canvas canvas) {\n\t\tcanvas.save();\n\t\t\n\t\tif (mImage != null) {\n\t\t\tif (!mImage.isRecycled()) {\n\t\t\t\tcanvas.drawBitmap(mImage, mScrollLeft, mScrollTop, null);\n\t\t\t}\n\t\t}\n\t\tcanvas.restore();\n\t}",
"public void paint(Graphics g)\n\t\t{\n\t\t\t\n\t\t\tif (!gameStarted)\n\t\t\t\ttown.show (g); //when the game first starts draws the map\n//\t\t\ttown.show(g);\n//\t\t\ttestPlayer.show(g);\n//\t\t\thouse1.show (g);\n//\t\t\thome.show (g);\n//\t\t\thouse2.show (g);\n//\t\t\tpokecentre.show (g);\n//\t\t\toakLab.show(g);\n\t\t}",
"public void drawMap(Graphics g) {\r\n\t\tfor (UIElement field : fields.values())\r\n\t\t\tfield.draw(g);\r\n\r\n\t\tfor (UIElement stargate : stargates.values())\r\n\t\t\tstargate.draw(g);\r\n\t}",
"public void showMap() {\n//\t\tSystem.out.print(\" \");\n//\t\tfor (int i = 0; i < maxY; i++) {\n//\t\t\tSystem.out.print(i);\n//\t\t\tSystem.out.print(' ');\n//\t\t}\n\t\tSystem.out.println();\n\t\tfor (int i = 0; i < maxX; i++) {\n//\t\t\tSystem.out.print(i + \" \");\n\t\t\tfor (int j = 0; j < maxY; j++) {\n\t\t\t\tSystem.out.print(coveredMap[i][j]);\n\t\t\t\tSystem.out.print(' ');\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t\tSystem.out.println();\n\t}",
"public void updateMap(boolean animate) {\n\t\tgetContentPane().add(mapContainer);\n\t\trevalidate();\n\t\t\n\t\t// Setting up map\n\t\tint width = mapContainer.getWidth();\n\t\tint height = mapContainer.getHeight();\n\t\tBufferedImage I = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);\n\t\tGraphics2D g2d = I.createGraphics();\n\t\tg2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);\n\t\t\n\t\t// Setting up map dimensions\n\t\tdouble xM = width*zoom, yM = height*zoom;\n\t\tdouble xL = Math.abs(mapBounds[1]-mapBounds[3]), yL = Math.abs(mapBounds[0]-mapBounds[2]);\n\t\tdouble xI = (xM-(yM-60)*(xL/yL))/2, yI = 30;\n\t\tif(xM/yM < xL/yL) {\n\t\t\txI = 30;\n\t\t\tyI += (yM-(xM-60)*(yL/xL))/2;\n\t\t}\n\t\tdouble yP = yM*yF-yM/zoom/2, xP = xM*xF-xM/zoom/2;\n\t\t\n\t\tg2d.setColor(Color.white);\n\t\tg2d.fillRect(20, 20, width-40, height-40);\n\t\tg2d.setColor(roadColor);\n\t\tg2d.setStroke(new BasicStroke(roadWidth));\n\t\t\n\t\t// Drawing each road\n\t\tint i, n = G.getSize();\n\t\tdouble[] v1, v2;\n\t\tfor(i = 0; i < n; i++) {\n\t\t\tfor(Edge e : G.getEdges(i)) {\t\t\t\t\n\t\t\t\tv1 = V.get(i);\n\t\t\t\tv2 = V.get(e.next);\n\t\t\t\tif(animate)\n\t\t\t\t\tdrawRoad(xM, yM, xL, yL, xI, yI, xP, yP, v1[0], v1[1], v2[0], v2[1], 0, g2d);\n\t\t\t\telse {\n\t\t\t\t\tdrawRoad(xM, yM, xL, yL, xI, yI, xP, yP, v1[0], v1[1], v2[0], v2[1], (int)(v1[2]*v2[2]), g2d);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Drawing each path\n\t\tif(animate) {\n\t\t\tn = P.size()-1;\n\t\t\tfor(i = 0; i < n; i++) {\n\t\t\t\t\n\t\t\t\tv1 = V.get(P.get(i));\n\t\t\t\tv2 = V.get(P.get(i+1));\n\t\t\t\t\n\t\t\t\tdrawRoad(xM, yM, xL, yL, xI, yI, xP, yP, v1[0], v1[1], v2[0], v2[1], 1, g2d);\n\t\n\t\t\t\t\ttry {\n\t\t\t\t\t\tThread.sleep(10);\n\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\tmapContainer.setIcon(new ImageIcon(I));\n\t\t\t\trevalidate();\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Creating image base\n\t\tg2d.setStroke(new BasicStroke(1));\n\t\tg2d.setColor(Color.lightGray);\n\t\tg2d.fillRect(0, 0, width, 20);\n\t\tg2d.fillRect(0, 0, 20, height);\n\t\tg2d.fillRect(width-20, 0, 20, height);\n\t\tg2d.fillRect(0, height-20, width, 20);\n\t\tg2d.setColor(Color.black);\n\t\tg2d.drawRect(20, 20, width-40, height-40);\n\t\tg2d.setFont(titleFont);\n\t\tg2d.drawString(title, 40, 15);\n\t\tint tw = g2d.getFontMetrics().stringWidth(title);\n\t\tg2d.setFont(subtitleFont);\n\t\tg2d.drawString(subtitle, 50+tw, 15);\n\t\t\n\t\t\n\t\tmapContainer.setIcon(new ImageIcon(I));\n\t\trevalidate();\n\t}",
"public void draw() {\n draw(clientController.getUser().getShows());\n }",
"public void draw() {\n GraphicsContext gc = getGraphicsContext2D();\n /*gc.clearRect(0, 0, getWidth(), getHeight());\n\n if (squareMap != null) {\n squareMap.draw(gc);\n }\n if (hexMap != null) {\n hexMap.draw(gc);\n }*/\n\n // Draw animations\n for (SpriteAnimationInstance anim : animationList) {\n anim.draw(gc);\n }\n\n // Lastly draw the dialogue window, no matter which canvas\n // we are on, all the same.\n DfSim.dialogueWindow.draw(gc);\n\n /*if (landMap != null) {\n landMap.draw(gc);\n }*/\n\n // Draw a border around the canvas\n //drawBorder(gc);\n\n // And now just draw everything directly from the simulator\n /*for (Raindrop item : sim.getDrops()) {\n drawMovableCircle(gc, item);\n }\n for (Earthpatch item : sim.getPatches()) {\n drawMovableCircle(gc, item);\n }\n for (SysShape item : sim.getShapes()) {\n drawSysShape(gc, item);\n }\n for (Spike item : sim.getSpikes()) {\n drawMovablePolygon(gc, item);\n }\n for (GravityWell item : sim.getGravityWells()) {\n drawGravityWell(gc, item);\n }*/\n }",
"private void drawMap(final Graphics2D theGraphics) {\n for (int y = 0; y < myGrid.length; y++) {\n final int topy = y * SQUARE_SIZE;\n\n for (int x = 0; x < myGrid[y].length; x++) {\n final int leftx = x * SQUARE_SIZE;\n\n switch (myGrid[y][x]) {\n case STREET:\n theGraphics.setPaint(Color.LIGHT_GRAY);\n theGraphics.fillRect(leftx, topy, SQUARE_SIZE, SQUARE_SIZE);\n drawStreetLines(theGraphics, x, y);\n break;\n\n case WALL:\n theGraphics.setPaint(Color.BLACK);\n theGraphics.fillRect(leftx, topy, SQUARE_SIZE, SQUARE_SIZE);\n break;\n\n case TRAIL:\n theGraphics.setPaint(Color.YELLOW.darker().darker());\n theGraphics.fillRect(leftx, topy, SQUARE_SIZE, SQUARE_SIZE);\n break;\n\n case LIGHT:\n // draw a circle of appropriate color\n theGraphics.setPaint(Color.LIGHT_GRAY);\n theGraphics.fillRect(leftx, topy, SQUARE_SIZE, SQUARE_SIZE);\n theGraphics.setPaint(myLightColor);\n theGraphics.fillOval(leftx, topy, SQUARE_SIZE, SQUARE_SIZE);\n break;\n \n case CROSSWALK:\n theGraphics.setPaint(Color.LIGHT_GRAY);\n theGraphics.fillRect(leftx, topy, SQUARE_SIZE, SQUARE_SIZE);\n \n drawCrossWalkLines(theGraphics, x, y);\n \n // draw a small circle of appropriate color centered in the square\n theGraphics.setPaint(myLightColor);\n theGraphics.fillOval(leftx + (int) (SQUARE_SIZE * CROSSWALK_SCALE),\n topy + (int) (SQUARE_SIZE * CROSSWALK_SCALE),\n SQUARE_SIZE / 2, SQUARE_SIZE / 2);\n break;\n\n default:\n }\n\n drawDebugInfo(theGraphics, x, y);\n }\n }\n }",
"public void draw() {\r\n\t\tif (active_)\r\n\t\t\tGlobals.getInstance().getCamera().drawImageOnHud(posx_, posy_, currentImage());\r\n\t}",
"public void getLandmarksToBeDrawn(){\n ((Pane) mapImage.getParent()).getChildren().removeIf(x->x instanceof Circle || x instanceof Text || x instanceof Line);\n int landmark1 = l1.getSelectionModel().getSelectedIndex();\n int landmark2 = l2.getSelectionModel().getSelectedIndex();\n GraphNodeAL<MapPoint> lm1 = landmarkList.get(landmark1);\n GraphNodeAL<MapPoint> lm2 = landmarkList.get(landmark2);\n CostedPath path=shortestRouteDij(lm1,lm2); \n GraphNodeAL<MapPoint> prev=null;\n for(GraphNodeAL<?> n : path.pathList) { \n drawLandmarks((GraphNodeAL<MapPoint>) n);\n if(prev!=null) lineDraw(prev, (GraphNodeAL<MapPoint>) n);\n prev= (GraphNodeAL<MapPoint>) n;\n }\n }",
"@Override\n public void draw(ElapsedTime elapsedTime, IGraphics2D graphics2D) {\n\n\n // Clear the screen and draw the buttons\n graphics2D.clear(Color.WHITE);\n mOverworldMap.draw(elapsedTime, graphics2D, mLayerViewport, mScreenViewport);\n mLocationButton.draw(elapsedTime, graphics2D, null, null);\n mLocationButton1.draw(elapsedTime, graphics2D, null, null);\n mLocationButton2.draw(elapsedTime, graphics2D, null, null);\n mLocationButton3.draw(elapsedTime, graphics2D, null, null);\n mLocationButton4.draw(elapsedTime, graphics2D, null, null);\n\n\n }",
"public void showAllLandmarks(){\n ((Pane) mapImage.getParent()).getChildren().removeIf(x->x instanceof Circle || x instanceof Text || x instanceof Line);\n for(int i = 0; i<landmarkList.size(); i++){\n if(landmarkList.get(i).data.type == \"Landmark\")\n drawLandmarks(landmarkList.get(i));\n }\n }",
"public void showMapTypePanel(){\n mapTypePanel.showMapTypePanel();\n if(mapTypePanel.isVisible() && optionsPanel.isVisible()){\n optionsPanel.setVisible(false);\n if(iconPanel.isVisible()) iconPanel.setVisible(false);\n }\n if(routePanel.isVisible()) routePanel.setVisible(false); closeDirectionList();\n canvas.repaint();\n }",
"void draw() {\n\t\t// display debug information\n\t\t// if (debugMode)\n\t\t// displayDebugInformation();\n\n\t\tupdate();\n\t\trender(); // display freetransform points, lines and colorings\n\n\t\t// display opposite objects\n\t\t// displayOppositeObject();\n\t}",
"public void setDynamicOverlayVisible(boolean vis)\n/* 111: */ {\n/* 112:174 */ this.mapPanel.showDynamicOverlay = vis;\n/* 113: */ }",
"private void viewMap() {\r\n \r\n // Get the current game \r\n theGame = cityofaaron.CityOfAaron.getTheGame();\r\n \r\n // Get the map \r\n Map map = theGame.getMap();\r\n Location locations = null;\r\n \r\n // Print the map's title\r\n System.out.println(\"\\n*** Map: CITY OF AARON and Surrounding Area ***\\n\");\r\n // Print the column numbers \r\n System.out.println(\" 1 2 3 4 5\");\r\n // for every row:\r\n for (int i = 0; i < max; i++){\r\n // Print a row divider\r\n System.out.println(\" -------------------------------\");\r\n // Print the row number\r\n System.out.print((i + 1) + \" \");\r\n // for every column:\r\n for(int j = 0; j<max; j++){\r\n // Print a column divider\r\n System.out.print(\"|\");\r\n // Get the symbols and locations(row, column) for the map\r\n locations = map.getLocation(i, j);\r\n System.out.print(\" \" + locations.getSymbol() + \" \");\r\n }\r\n // Print the ending column divider\r\n System.out.println(\"|\");\r\n }\r\n // Print the ending row divider\r\n System.out.println(\" -------------------------------\\n\");\r\n \r\n // Print a key for the map\r\n System.out.println(\"Key:\\n\" + \"|=| - Temple\\n\" + \"~~~ - River\\n\" \r\n + \"!!! - Farmland\\n\" + \"^^^ - Mountains\\n\" + \"[*] - Playground\\n\" \r\n + \"$$$ - Capital \" + \"City of Aaron\\n\" + \"### - Chief Judge/Courthouse\\n\" \r\n + \"YYY - Forest\\n\" + \"TTT - Toolshed\\n\" +\"xxx - Pasture with \"\r\n + \"Animals\\n\" + \"+++ - Storehouse\\n\" +\">>> - Undeveloped Land\\n\");\r\n }",
"public void repaintMap() {\r\n\t\tpolygonMap.repaint();\r\n\t}",
"public void draw(){\n if(isVisible) {\n double diameter = calcularLado(area);\n double side = 2*diameter;\n Canvas circle = Canvas.canvas;\n circle.draw(this, color, \n new Ellipse2D.Double(xPosition, yPosition, \n (int)diameter, side));\n }\n }",
"static void visible() {\n int x, y;\n int[][] res = deepClone( pgmInf.img );\n\n System.out.print(\"Enter reference point: \");\n y = scan.nextInt();\n x = scan.nextInt();\n scan.nextLine(); // flush\n \n System.out.printf(\"Marking all pixels visible from %d,%d as white.\\n\", x, y);\n // mark visible points\n for (int i=0 ; i < pgmInf.width ; i++) {\n for (int j=0 ; j < pgmInf.height ; j++) {\n if ( lineBetween(x, y, i, j) ) res[j][i] = 9;\n }\n }\n pgmInf.img = res;\n System.out.println(\"Done.\");\n }",
"public void draw()\r\n\t\t{\r\n\t\tfor(PanelStationMeteo graph: graphList)\r\n\t\t\t{\r\n\t\t\tgraph.repaint();\r\n\t\t\t}\r\n\t\t}",
"public void renderMap(GameMap gameMap, Player player)\n\t{\n\t\tthis.drawMapGlyphs(gameMap, player);\n\t\t// this.getGlyphs(gameMap, player);\n\t\t// for(Text text : this.getGlyphs(gameMap))\n\t\t// window.getRenderWindow().draw(text);\n\t}",
"public void figure() {\n this.isMap = false;\n System.out.println(\"Switch to figure mode\");\n }",
"private void draw() {\n gsm.draw(g);\n }",
"public void printMiniMap() \n { \n /* this.miniMapFrame(); */\n }",
"public void drawPiece(Graphics g){\n if (current == null){\n return;\n }\n\n for (int y = 1; y < 21; y++){\n for (int x = 1; x < 13; x++){\n if (map[x][y]){\n g.setColor(colors[x][y]);\n g.fillRoundRect(26 * x - 13, 26 * (21 - y) - 13, 25, 25, 2, 2);\n }\n }\n }\n }",
"public void draw()\r\n {\r\n drawn = true;\r\n }",
"public static void drawMapPoints(ArrayList<PointOfInterest> points) {\n\t\t// Use a label to display the image\n\t\tJFrame frame = new JFrame();\n\t\tframe.setSize(1080, 540);\n\t\tMap map = new Map(null, (ArrayList<PointOfInterest>)(points), null, 2, 0, 0);\n\t\tframe.add(map);\n\t\tframe.setLocationRelativeTo(null);\n\t\tframe.setVisible(true);\n\t}",
"private void drawStuff() {\n //Toolkit.getDefaultToolkit().sync();\n g = bf.getDrawGraphics();\n bf.show();\n Image background = window.getBackg();\n try {\n g.drawImage(background, 4, 24, this);\n\n for(i=12; i<264; i++) {\n cellKind = matrix[i];\n\n if(cellKind > 0)\n g.drawImage(tile[cellKind], (i%12)*23-3, (i/12)*23+17, this);\n }\n\n drawPiece(piece);\n drawNextPiece(pieceKind2);\n\n g.setColor(Color.WHITE);\n g.drawString(\"\" + (level+1), 303, 259);\n g.drawString(\"\" + score, 303, 339);\n g.drawString(\"\" + lines, 303, 429);\n\n } finally {bf.show(); g.dispose();}\n }",
"public void show() {\r\n\t\tif ((polygon.npoints > 1)\r\n\t\t\t\t&& ((polygon.xpoints[0] != polygon.xpoints[1]) || (polygon.ypoints[0] != polygon.ypoints[1]))) {\r\n\t\t\tGraphics2D gr = (Graphics2D) graphics;\r\n\t\t\tgr.setRenderingHint(RenderingHints.KEY_ANTIALIASING,\r\n\t\t\t\t\tRenderingHints.VALUE_ANTIALIAS_ON);\r\n\t\t\tgr.setPaint(colorPar.getDevColor());\r\n\t\t\tgr.setStroke(new BasicStroke((float) lineWidth));\r\n\t\t\tPolygon p = isTransformed ? transformed() : polygon;\r\n\t\t\tGeneralPath gp = new GeneralPath();\r\n\t\t\tgp.moveTo((float) (p.xpoints[0]), (float) (p.ypoints[0]));\r\n\t\t\tfor (int i = 1; i < p.npoints; i++) {\r\n\t\t\t\tgp.lineTo((float) (p.xpoints[i]), (float) (p.ypoints[i]));\r\n\t\t\t}\r\n\t\t\tgr.draw(gp);\r\n\t\t\tif (validBounds) {\r\n\t\t\t\tsetBounds(gp.getBounds());\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void afficherPoints(){\n for(Point point : pointArrayList){\n getMapPane().getChildren().add(point.getImageView());\n visualObjects.add(point);\n }\n }",
"public void mapClick(View v) {\n ImageView mapView = (ImageView) findViewById(R.id.mapButton);\n if(mapView.getVisibility() == ImageView.VISIBLE) {\n mapView.setVisibility(ImageView.INVISIBLE);\n }\n else {\n mapView.setVisibility(ImageView.VISIBLE);\n }\n toggleDrawer();\n }",
"public void draw() {\n \n // TODO\n }",
"private void draw(){\n GraphicsContext gc = canvasArea.getGraphicsContext2D();\n canvasDrawer.drawBoard(canvasArea, board, gc, currentCellColor, currentBackgroundColor, gridToggle);\n }",
"@Override\n\tpublic void DrawMap(Graphics g, float scale, Map m, DeliveryQuery delivery, RouteHelper routeHelper) {\n\t\t// No action\n\t}",
"public void draw() {\n for (Point2D p: mPoints) {\n StdDraw.filledCircle(p.x(), p.y(), 0.002);\n }\n }",
"public void drawOnMapFragment(){\n if(!ifFieldTooBig()){\n isFreeDraw = true;\n mFreeDrawView.setVisibility(View.INVISIBLE);\n mFreeDrawView.cleanCanvas();\n drawPolygonWithMarker(mMapInterface.getPathFrame(), Color.WHITE);\n\n dronePath.findDronePath(mMapInterface.getPathFrame(), RESOLUTION);\n dronePath.drawRout(getDronePath(), googleMap, Color.GREEN);\n isPathReady=true;\n mMapInterface.setFullDronePath(getDronePath());\n Toast.makeText(getContext(), getString(R.string.edit_explain), Toast.LENGTH_LONG).show();\n }\n else{\n deletePath();\n }\n }",
"public void ShowAll (View paramView)\n\t{\n\t\tfinal MapView mapView = (MapView) findViewById(R.id.mapView);\n\n\n\t\tmapView.getOverlays().clear();\n\t\titemizedoverlay.clear();\n\t\tmapView.setBuiltInZoomControls(false);\n\n\t\t// add our position to map\n\t\tmapView.getOverlays().add(myLocationOverlay);\n\t\tmapView.postInvalidate();\n\n\t\tfinal List<Overlay> mapOverlays = mapView.getOverlays();\n\t\tmyLocationOverlay.enableMyLocation();\n\n\t\t// add our position to map and refresh it\n\t\tmapView.getOverlays().add(myLocationOverlay);\n\t\tmapView.postInvalidate();\n\t\tmyLocationOverlay.enableMyLocation();\n\n\t\t// add all points from list to map\n\t\tfor(int i = 0; i<MiejscaArray.length; i++)\n\t\t{\t\n\t\t\t@SuppressWarnings(\"rawtypes\")\n\t\t\tHashMap MojaMapa = (HashMap) MiejscaArray[i];\n\t\t\t@SuppressWarnings(\"rawtypes\")\n\t\t\tHashMap MyMap = (HashMap) MojaMapa.get(\"Category\");\n\t\t\tSystem.out.println(MojaMapa);\n\n\t\t\tfloat Lat = Float.parseFloat(\"\"+MojaMapa.get(\"latitude\"));\n\t\t\tfloat Long = Float.parseFloat(\"\"+MojaMapa.get(\"longitude\"));\n\t\t\tint MicroLat = (int) (Lat*1e6);\n\t\t\tint MicroLong = (int) (Long*1e6);\n\n\t\t\tGeoPoint point = new GeoPoint(MicroLat, MicroLong);\n\t\t\tMyOverlayItem overlayitem = new MyOverlayItem(point, \n\t\t\t\t\t\"\"+i, \n\t\t\t\t\t\"\"+category, \n\t\t\t\t\t\"\"+MojaMapa.get(\"address\"),\n\t\t\t\t\t\"\"+MojaMapa.get(\"city\"),\n\t\t\t\t\t\"\"+MojaMapa.get(\"zip_code\"),\n\t\t\t\t\t\"\"+MojaMapa.get(\"country\"),\n\t\t\t\t\tString.format(\"%.2f\", Float.parseFloat(MojaMapa.get(\"kilometers\").toString())),\n\t\t\t\t\t\"\"+MojaMapa.get(\"latitude\"),\n\t\t\t\t\t\"\"+MojaMapa.get(\"longitude\"),\n\t\t\t\t\t\"\"+MyMap.get(\"icon\"), \n\t\t\t\t\tLat+\",\"+Long);\n\n\t\t\tSetDrawable(\"\"+MyMap.get(\"icon\"), \"\"+MyMap.get(\"color\"));\n\t\t\titemizedoverlay = new HelloItemizedOverlay(drawable, this);\n\t\t\titemizedoverlay.addOverlay(overlayitem);\n\t\t\tmapOverlays.add(itemizedoverlay);\n\t\t}\n\n\t\t// Remove WebView and place MapView in his place\n\t\tWebView webView = (WebView) findViewById(R.id.webView);\n\t\twebView.setVisibility(View.GONE);\n\n\t\tmylistView =(ListView)findViewById(android.R.id.list);\n\n\t\tif (isThisTablet == false)\n\t\t{\n\t\t\tmylistView.setVisibility(View.GONE);\n\t\t\tmapView.setVisibility(View.VISIBLE);\n\n\t\t\tButton Mapbutton = (Button) findViewById(R.id.map_button);\n\t\t\tMapbutton.setBackgroundColor(Color.BLUE);\n\n\t\t\tButton ListButton = (Button) findViewById(R.id.list_button);\n\t\t\tListButton.setBackgroundColor(Color.rgb(192, 192, 192));\n\n\t\t\tButton SzczeButton = (Button) findViewById(R.id.szczegoly_button);\n\t\t\tSzczeButton.setBackgroundColor(Color.rgb(192, 192, 192));\n\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//Button Mapbutton = (Button) findViewById(R.id.map);\n\t\t\t//Mapbutton.setVisibility(View.GONE);\n\n\t\t\t//Button Szczebutton = (Button) findViewById(R.id.szczegoly);\n\t\t\t//Szczebutton.setVisibility(View.VISIBLE);\n\n\t\t\tmapView.setVisibility(View.VISIBLE);\t\n\t\t}\n\t}",
"public void draw() {\n mGameBoard.draw();\n }",
"private boolean visible() {\r\n return NOT(GO() && CATS(Cc,Cn,Co,Cs,Zl,Zp)) && POINT();\r\n }",
"@Override\n public void draw() \n {\n background(color(0,0,0));\n kinect.update();\n //int[] depthValues = kinect.depthMap();\n //liveMap.width = 640;\n //liveMap.height = 480;\n //liveMap.loadPixels();\n \n //for (int y = 0; y < 480; y++) {\n // for (int x = 0; x < 640; x++) {\n //int i = x + (y * 640);\n //int currentDepthValue = depthValues[i];\n //if (currentDepthValue > maxDistance) {\n // liveMap.pixels[i] = color(0, 0, 0); \n // } \n // else {\n // int lum = (int) (-0.2684 * currentDepthValue + 402.63);\n // liveMap.pixels[i] = color(lum, lum, lum);\n // }\n // } \n //}\n \n //liveMap.updatePixels();\n \n // draw depthImageMap\n //image(liveMap, 0, 0);\n image(kinect.depthImage(), 0, 0);\n\n // draw irImageMap\n // image(ContextTest.rgbImage(), ContextTest.depthWidth() + 10, 0);\n if (recordFlag)\n {\n saveFrame(saveFrameDir);\n }\n }",
"@Override\n protected void onDraw(Canvas canvas) {\n // draw background screen\n canvas.drawBitmap(mBitmap, 0, 0, mPaintScreen);\n\n // draw line for each path\n for( Integer key : pathMap.keySet() ){\n canvas.drawPath(pathMap.get(key), mPaintLine);\n }\n }",
"@Override\r\n\tpublic void draw(Canvas arg0, MapView arg1, boolean arg2) {\n\t\tsuper.draw(arg0, arg1, arg2);\r\n\t}",
"public void draw() {\n\t\tsuper.repaint();\n\t}",
"@Override\n\tpublic void paintComponent(Graphics g)\n\t{\n\t\tsuper.paintComponent(g);\n\t\t//Draw the board and the table\n\t\tif (isTableVisible) {\n\t\t\tdrawBackground(this, g, gameInstance);\n\t\t}\n\n\t\tGraphics2D g2 = (Graphics2D)g;\n\t\tRenderingHints rh = new RenderingHints(RenderingHints.KEY_RENDERING,RenderingHints.VALUE_RENDER_QUALITY);\n\t\tg2.setRenderingHints(rh);\n\t\tg2.setTransform(boardToScreenTransformation);\n\t\tdrawPlayerIcons(this, g, gameInstance);\n\t\t//Draw all player related information\n\t\tdrawPlayerPositions(this, g, gameInstance, player, infoText);\n\n\t\t//Draw all objects not in some private area\n\t\tObjectFunctions.getDrawOrder(gameInstance, ial);\n\t\toiList.clear();\n\t\tgameInstance.getObjects(oiList);\n\t\tArrayList<ObjectInstance> drawableObjects = new ArrayList<>();\n\t\tCheckFunctions.drawableObjectsOnTable(oiList, drawableObjects);\n\t\tdrawableObjects.sort(ObjectFunctions.objectInstanceDrawValueComparator);\n\t\tial.clear();\n\t\tObjectFunctions.addObjectListToIdList(drawableObjects, ial);\n\t\tdrawObjectsFromList(this,g,gameInstance,player, ial);\n\n\t\t//Draw selection rectangle\n\t\tdrawSelection(this, g, player);\n\n\t\t//Draw Private Area\n\t\tif (!player.visitor) {\n\t\t\tdrawPrivateArea(this, g);\n\t\t}\n\n\n\t\tAffineTransform tmp = g2.getTransform();\n\t\tg2.setTransform(boardToScreenTransformation);\n\n\t\t//Redraw selected objects not in some private area\n\t\tial.clear();\n\t\tIntegerArrayList selectedObjects = new IntegerArrayList();\n\t\tObjectFunctions.getSelectedObjects(gameInstance, selectedObjects);\n\t\tfor (int id : selectedObjects){\n\t\t ial.addUnique(id);\n\t\t\tObjectFunctions.getAllAboveLyingObjects(gameInstance, player, gameInstance.getObjectInstanceById(id), ial2);\n ial.addUnique(ial2);\n\t\t}\n\t\tObjectFunctions.sortByDrawValue(gameInstance, ial);\n\t\t//ArrayUtil.unifySorted(ial);\n\t\tdrawObjectsFromList(this, g, gameInstance, player, ial, ial2);\n\n\n\t\t//Draw objects in private area\n\t\tif (!player.visitor && privateArea.zooming != 0) {\n\t\t\tdrawTokensInPrivateArea(this, g, gameInstance, player, hoveredObject);\n\t\t}\n\n\n\t\tg2.setTransform(tmp);\n\n\t\t//Draw debug informations\n\t\tif (isDebug) {\n\t\t\tDrawFunctions.drawDebugInfo(this, g2, gameInstance, player);\n\t\t}\n\t\tif (show_ping) {\n\t\t\tg2.drawString(\"Last Signal\", getWidth() - 100, 80);\n\t\t\tfor (int i = 0; i < gameInstance.getPlayerCount(); ++i)\n\t\t\t{\n\t\t\t\tPlayer pl = gameInstance.getPlayerByIndex(i);\n\t\t\t\tg2.drawString(pl.getName() + \" \" + ((System.nanoTime() - pl.lastReceivedSignal) / 100000000) / 10f, getWidth() - 100, 100 + 20 * i);\n\t\t\t}\n\t\t}\n\t}",
"public void update()\n\t{\n\t\tGViewMapManager gViewMapManager = this.guiController.getCurrentStyleMapManager();\n\t\tLayout layout = gViewMapManager.getLayout();\n\n\t\tswitch (layout)\n\t\t{\n\t\t\tcase LINEAR:\n\t\t\t\tthis.linear.setSelected(true);\n\t\t\t\tbreak;\n\t\t\tcase CIRCULAR:\n\t\t\t\tthis.circular.setSelected(true);\n\t\t\t\tbreak;\n default:\n break;\n\t\t}\n\t}",
"public void drawTile() {\n\n }",
"public void setMap2D(FXMap map);",
"void diplayNeighborPoints() {\n\t\tfor (int i = 0; i < amount; i++) {\n\t\t\tif (point[i].position.dist(P) < 10) {\n\t\t\t\tmyParent.pushStyle();\n\t\t\t\tmyParent.fill(255, 255, 0);\n\t\t\t\tmyParent.text(i, point[i].x + 10, point[i].y + 5); // draw\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// selected\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// point\n\t\t\t\tmyParent.text(\"left neighbor\", point[neighbor(i)[0]].x, point[neighbor(i)[0]].y);\n\t\t\t\tmyParent.text(\"right neighbor\", point[neighbor(i)[1]].x, point[neighbor(i)[1]].y);\n\t\t\t\tmyParent.text(\"opposite\", point[neighbor(i)[2]].x, point[neighbor(i)[2]].y);\n\t\t\t\t// neighbor(int sourcePointId)\n\t\t\t\tmyParent.noFill();\n\t\t\t\tmyParent.popStyle();\n\t\t\t}\n\t\t}\n\n\t\tif (state == State.SCALE_PORPORTIONALLY_POINT || state == State.SCALE_FREE_POINT)\n\t\t\tdisplayLineBetweenCurrentAndOppositePoints();\n\t}",
"private static void showMap() {\n\t\tSet<Point> pointSet = map.keySet();\n\t\tfor (Point p : pointSet) {\n\t\t\tSystem.out.println(map.get(p));\n\t\t}\n\t}",
"private void updateMap(final PlayerVision vision){\r\n\t\tint i, y, x;\n\t\t\n\t\t// add the current point to the map\n\t\taddToMap(east, north, vision.CurrentPoint);\n\t\t\n\t\t// add everything west to the map\n\t\tfor (i = 0; i < vision.mWest; i++){\n\t\t\tx = east - i - 1;\r\n\t\t\t\n\t\t\taddToMap(x, north, vision.West[i]);\n\t\t}\r\n\t\t\r\n\t\t// add everything east to the map\n\t\tfor (i = 0; i < vision.mEast; i++){\n\t\t\tx = east + i + 1;\r\n\t\t\t\n\t\t\taddToMap(x, north, vision.East[i]);\n\t\t}\r\n\t\t\r\n\t\t// add everything north to the map\n\t\tfor (i = 0; i < vision.mNorth; i++){\n\t\t\ty = north + i + 1;\r\n\t\t\t\n\t\t\taddToMap(east, y, vision.North[i]);\n\t\t}\r\n\t\t\n\t\t// add everything south to the map\n\t\tfor (i = 0; i < vision.mSouth; i++){\n\t\t\ty = north - i - 1;\r\n\t\t\t\n\t\t\taddToMap(east, y, vision.South[i]);\n\t\t}\r\n\t\t\n\t}",
"void renderHotspots() {\n boolean afterCurrent = false;\n boolean hasLastPos = false;\n float lastX = 0.0f;\n float lastY = 0.0f;\n float lastZ = 0.0f;\n \n final float halfWidth = 0.1f / 2;\n final float halfLength = 0.1f / 2;\n final float halfHeight = 0.1f / 2;\n final float eyeHeight = 0.91712f;//1.1f;\n \n // Find pan position offset vector\n if (selectedTimeInterval.getLocationMetadataEntry() == null) {\n return;\n }\n \n if (!dstLocationVectorExists)\n return;\n \n GL11.glLoadIdentity();\n // set up for tracking hotspot screen x,y\n\t\tfloat projectedXYZ[] = new float[3]; \t\t\n\t\tprojectionMatrix.clear();\n\t\tGL11.glGetFloat(GL11.GL_PROJECTION_MATRIX, projectionMatrix);\n\t\tgetMatrixAsArray(projectionMatrix, projectionArray);\n\t\tviewportMatrix.clear();\n\t\tGL11.glGetInteger(GL11.GL_VIEWPORT, viewportMatrix);\n\t\tviewportArray[0] = viewportMatrix.get(0);\n\t\tviewportArray[1] = viewportMatrix.get(1);\n\t\tviewportArray[2] = viewportMatrix.get(2);\n\t\tviewportArray[3] = viewportMatrix.get(3);\n //System.out.println(\"\"+viewportArray[0] + \" \"+ viewportArray[1]+\" \"+viewportArray[2]+\" \"+viewportArray[3] ); \n\t\tmodelMatrix.clear();\n\t\tGL11.glGetFloat(GL11.GL_MODELVIEW_MATRIX, modelMatrix);\n\t\tgetMatrixAsArray(modelMatrix, modelArray);\n \n GL11.glBindTexture(GL11.GL_TEXTURE_2D, 0); // no texture\n \n for (int i=0; i<roverTrackingList.size()-1; i++) {\n \tRoverTrackingListEntry listEntry = (RoverTrackingListEntry) roverTrackingList.get(i);\n\t\t\tlistEntry.screenX = 0.0f;\n\t\t\tlistEntry.screenY = 0.0f;\n \t\n double da = listEntry.locationMetadataEntry.rover_origin_offset_vector_a + listEntry.siteMetadataEntry.offset_vector_a - currentLocationVectorA;\n double db = listEntry.locationMetadataEntry.rover_origin_offset_vector_b + listEntry.siteMetadataEntry.offset_vector_b - currentLocationVectorB;\n double dc = listEntry.locationMetadataEntry.rover_origin_offset_vector_c + listEntry.siteMetadataEntry.offset_vector_c - currentLocationVectorC;\n \n float x = (float) db;\n float y = (-(float)dc) - eyeHeight;\n float z = - (float) da;\n\n // calculate brightness of point based on number of images visible for location\n float brightness = 0.0f;\n \n if (listEntry.locationListEntry != null && listEntry.locationListEntry.getNumEnabledImages() > 2) {\n \t// track screen x, y of hotspot\n \t\t\tGLU.gluProject(x, y, z, modelArray, projectionArray, viewportArray, projectedXYZ);\n \t\t\tif (projectedXYZ[2] < 1.0f) {\n\t \t\t\tlistEntry.screenX = projectedXYZ[0];\n\t \t\t\t// transform y from opengl screen coords to regular screen coords\n\t \t\t\tlistEntry.screenY = viewportArray[3] - projectedXYZ[1];\n \t\t\t}\n \t\n \t// render hotspot\n GL11.glLoadIdentity();\n GL11.glTranslatef(x, y, z);\n //System.out.println(\"\"+listEntry.screenX+\" \"+listEntry.screenY);\n \n brightness = 0.5f + 0.1f * listEntry.locationListEntry.getNumEnabledImages();\n if (brightness > 1.0f) {\n brightness = 1.0f;\n }\n \n GL11.glBegin(GL11.GL_QUADS); // D draw A Quad\n \n if (listEntry.locationListEntry.getStartLocation().equals(selectedTimeInterval.getStartLocation())) {\n GL11.glColor3f(brightness, 0.0f, brightness); \n }\n else if (afterCurrent) {\n GL11.glColor3f(0.0f, 0.0f, brightness);\n }\n else {\n GL11.glColor3f(brightness, 0.0f, 0.0f);\n }\n \n GL11.glVertex3f(halfWidth, halfHeight, -halfLength); // Top Right Of The Quad (Top)\n GL11.glVertex3f(-halfWidth, halfHeight, -halfLength); // Top Left Of The Quad (Top)\n GL11.glVertex3f(-halfWidth, halfHeight, halfLength); // Bottom Left Of The Quad (Top)\n GL11.glVertex3f(halfWidth, halfHeight, halfLength); // Bottom Right Of The Quad (Top)\n\n GL11.glVertex3f(halfWidth, -halfHeight, halfLength); // Top Right Of The Quad (Bottom)\n GL11.glVertex3f(-halfWidth, -halfHeight, halfLength); // Top Left Of The Quad (Bottom)\n GL11.glVertex3f(-halfWidth, -halfHeight, -halfLength); // Bottom Left Of The Quad (Bottom)\n GL11.glVertex3f(halfWidth, -halfHeight, -halfLength); // Bottom Right Of The Quad (Bottom)\n\n GL11.glVertex3f(halfWidth, halfHeight, halfLength); // Top Right Of The Quad (Front)\n GL11.glVertex3f(-halfWidth, halfHeight, halfLength); // Top Left Of The Quad (Front)\n GL11.glVertex3f(-halfWidth, -halfHeight, halfLength); // Bottom Left Of The Quad (Front)\n GL11.glVertex3f(halfWidth, -halfHeight, halfLength); // Bottom Right Of The Quad (Front)\n\n GL11.glVertex3f(halfWidth, -halfHeight, -halfLength); // Bottom Left Of The Quad (Back)\n GL11.glVertex3f(-halfWidth, -halfHeight, -halfLength); // Bottom Right Of The Quad (Back)\n GL11.glVertex3f(-halfWidth, halfHeight, -halfLength); // Top Right Of The Quad (Back)\n GL11.glVertex3f(halfWidth, halfHeight, -halfLength); // Top Left Of The Quad (Back)\n\n GL11.glVertex3f(-halfWidth, halfHeight, halfLength); // Top Right Of The Quad (Left)\n GL11.glVertex3f(-halfWidth, halfHeight, -halfLength); // Top Left Of The Quad (Left)\n GL11.glVertex3f(-halfWidth, -halfHeight, -halfLength); // Bottom Left Of The Quad (Left)\n GL11.glVertex3f(-halfWidth, -halfHeight, halfLength); // Bottom Right Of The Quad (Left)\n\n GL11.glVertex3f(halfWidth, halfHeight, -halfLength); // Top Right Of The Quad (Right)\n GL11.glVertex3f(halfWidth, halfHeight, halfLength); // Top Left Of The Quad (Right)\n GL11.glVertex3f(halfWidth, -halfHeight, halfLength); // Bottom Left Of The Quad (Right)\n GL11.glVertex3f(halfWidth, -halfHeight, -halfLength); // Bottom Right Of The Quad (Right)\n \n GL11.glEnd(); // Done Drawing The Quads\n\t }\n \n if (hasLastPos && !listEntry.segmentStart) {\n brightness = 0.5f;\n if (afterCurrent) {\n GL11.glColor3f(0.0f, 0.0f, brightness);\n }\n else {\n GL11.glColor3f(brightness, 0.0f, 0.0f);\n } \n GL11.glLoadIdentity();\n GL11.glBegin(GL11.GL_LINES); \n// GL11.glColor3f(1.0f, 0.0f, 0.0f); \n GL11.glVertex3f(lastX, lastY, lastZ);\n GL11.glVertex3f(x, y, z);\n GL11.glEnd();\n }\n \n lastX = x;\n lastY = y;\n lastZ = z;\n hasLastPos = true;\n if (listEntry.locationListEntry != null && listEntry.locationListEntry.getStartLocation().equals(this.selectedTimeInterval.getStartLocation())) {\n afterCurrent = true;\n }\n }\n }",
"@Override\n public void paintComponent(final Graphics theGraphics) {\n super.paintComponent(theGraphics);\n final Graphics2D g2 = (Graphics2D) theGraphics;\n g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,\n RenderingHints.VALUE_ANTIALIAS_ON);\n\n g2.setStroke(STROKE);\n\n // draw city map\n\n drawMap(g2);\n\n // draw vehicles\n for (final Vehicle v : myVehicles) {\n final String imageFilename = \"icons//\" + v.getImageFileName();\n //final String imageFilename = v.getImageFileName();\n ImageIcon imgIcon = new ImageIcon(imageFilename);\n\n if (imgIcon.getImageLoadStatus() != MediaTracker.COMPLETE) {\n imgIcon = new ImageIcon(getClass().getResource(imageFilename));\n }\n\n final Image img = imgIcon.getImage();\n g2.drawImage(img, v.getX() * SQUARE_SIZE, v.getY() * SQUARE_SIZE,\n SQUARE_SIZE, SQUARE_SIZE, this);\n\n if (myDebugFlag) {\n drawDebugInfo(g2, v);\n }\n }\n\n if (myDebugFlag) {\n g2.setColor(Color.WHITE);\n g2.drawString(\"Update # \" + myTimestep, DEBUG_OFFSET / 2,\n FONT.getSize() + DEBUG_OFFSET / 2);\n }\n }",
"private void drawMap( Graphics2D g2 )\r\n {\r\n MobilityMap map = sim.getMap();\r\n \r\n /* Draw map nodes and their links */\r\n int numNodes = map.getNumberOfNodes();\r\n \r\n for( int i=0; i < numNodes; i++ )\r\n {\r\n MapNode node = map.getNodeAt(i);\r\n Point2D.Double nodeLoc = node.getLocation();\r\n \r\n // Draw the node\r\n drawCircle( g2, nodeLoc, MAP_NODE_COLOUR, MAP_NODE_RADIUS, false );\r\n \r\n // Draw the node's links\r\n int numLinks = node.getNumberOfLinks();\r\n for( int j=0; j < numLinks; j++ )\r\n {\r\n MapNode destNode = node.getLinkAt(j).getGoesTo();\r\n Point2D.Double destNodeLoc = destNode.getLocation();\r\n drawLine( g2, nodeLoc, destNodeLoc, MAP_LINK_COLOUR );\r\n }\r\n }\r\n }",
"public void drawSelf() {\n for (Point p : matches) {\n this.drawPoint(p, Color.WHITE);\n }\n }",
"@Override\n\tprotected void onDraw(Canvas canvas)\n\t{\n\t\tdrawMap(canvas);\n\t\t\n\t\t screenwidth= context.getResources().getDisplayMetrics().widthPixels;\n\t\t screenheight= context.getResources().getDisplayMetrics().heightPixels;\n//\t\t\n//\t\tFMDBDatabaseAccess fdb = new FMDBDatabaseAccess(context);\n//\t\tsm = fdb.getSnagsXYvalue(this.getTag().toString());\n//\t\t//sm[0].setXValue(0.4);\n\t\t//sm[0].setYValue(0.5);\n\t\t if(sm==null)\n\t\t {\n\t\t\t sm=getSnag();\n\t\t }\n\t\tif(isFirst)\n\t\t{\n\t\t\tisFirst=false;\n\t\t\ttry{\n\t\t\tfor(int i=0;i<sm.length;i++)\n\t\t\t{\n\t\t\t paint.setStrokeWidth(30);\n\t\t\t //String str=\"\"+(sm[i].getXValue()*screenwidth);\n\t\t\t x = sm[i].getXValue()*screenwidth;\n\t\t\t //str=\"\"+(sm[i].getYValue()*screenheight);\n\t\t\t y = sm[i].getYValue()*screenheight;\n\t\t\t paint.setColor(Color.RED);\n\t\t\t if(x!=0.0f && y!=0.0f)\n\t\t\t {\n\t\t\t\t // canvas.drawRect(x+7.5f, y+7.5f, x-7.5f, y-7.5f,paint);\n\t\t\t\t // canvas.drawRect(x+7.5f, y+7.5f, x-7.5f, y-7.5f,paint);\n\t\t\t\t SnagImageMapping objmap=(SnagImageMapping) context;\n//\t\t\t\t \n\t\t\t\t mapLayout =(RelativeLayout)(objmap).findViewById(R.id.plot_image_layout);\n\t\t\t\t ImageView mapImage = new ImageView(context);\n//\t\t\t\t \n\t\t\t float value;\n\t\t\t\t if(getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE)\n\t\t\t\t {\n\t\t\t\t\t value=screenheight*0.078125f;\n\t\t\t }\n\t\t\t\t else\n \t\t\t {\n\t\t\t\t\t value=screenheight*0.052083332f;\n \t\t\t \n\t\t\t\t }\n\t\t\t\t \n\t\t\t\t float imght=value;\n\t\t\t\t float imgwdth=imght;\n\t\t\t\t RelativeLayout.LayoutParams par=new RelativeLayout.LayoutParams((int)imgwdth,(int)imght);\n\t\t\t\t par.leftMargin=(int)(x-(value/2));\n\t\t\t\t par.topMargin=(int)(y-(value/2));\n\t\t\t\t if(sm[i].getSnagStatus().equalsIgnoreCase(\"pending\"))\n\t\t\t\t {\n\t\t\t\t\t mapImage.setBackgroundResource(R.drawable.plot_yellow);\n\t\t\t\t }\n\t\t\t\t else if(sm[i].getSnagStatus().equalsIgnoreCase(\"reinspected & unresolved\"))\n\t\t\t\t {\n\t\t\t\t\t mapImage.setBackgroundResource(R.drawable.plot_red);\n\t\t\t\t }\n\t\t\t\t else if(sm[i].getSnagStatus().equalsIgnoreCase(\"resolved\"))\n\t\t\t\t {\n\t\t\t\t\t mapImage.setBackgroundResource(R.drawable.plot_green);\n\t\t\t\t }\n\t\t\t\t// R.drawable.pl\n\t\t\t\t mapImage.setId(i);\n\t\t\t\t // mapImage.setTag();\n\t\t\t\t mapImage.setOnClickListener(new OnClickListener() {\n\t\t\t\t\t\n\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\n\t\t\t\t\t\tint id=v.getId();\n\t\t\t\t\t\tfloat setX,setY;\n\t\t\t\t\t\t String str2=\"\"+(sm[id].getXValue()*screenwidth);\n\t\t\t\t\t\t setX = Float.parseFloat(str2);\n\t\t\t\t\t\t \n\t\t\t\t\t\t \n\t\t\t\t\t\t str2=\"\"+(sm[id].getYValue()*screenheight);\n\t\t\t\t\t\t setY = Float.parseFloat(str2);\n\t\t\t\t\t\t//Toast.makeText(getContext(), \"By image click\",Toast.LENGTH_SHORT).show();\n\t\t\t\t\t\t//Log.d(\"x y\",\"\"+setX+\" \"+setY);\n\t\t\t\t\t\t//Button img=new Button(context);\n\t\t\t\t\t\t//img.setBackgroundResource(R.drawable.back_blue_button);\n\t\t\t\t\t\t//img.setText(\"from\"+\"\"+sm[id].getID());\n//\t\t\t\t\t\t RelativeLayout.LayoutParams par2=new RelativeLayout.LayoutParams(android.widget.RelativeLayout.LayoutParams.WRAP_CONTENT,android.widget.RelativeLayout.LayoutParams.WRAP_CONTENT);\n//\t\t\t\t\t\t par2.leftMargin=(int)(setX);\n//\t\t\t\t\t\t par2.topMargin=(int)(setY);\n//\t\t\t\t\t\t popMsg.setLayoutParams(par2);\n//\t\t\t\t\t\t popMsg.setText(\"from\"+\"\"+sm[id].getID());\n//\t\t\t\t\t\t //popMsg.setText(\"from sfsf dfdfsfd dfdsf df dfdfdf d fdfedfd dfdfdf dfdf df dfdfd \");\n//\t\t\t\t\t\t popMsg.setVisibility(View.VISIBLE);\n\t\t\t\t\t\t//RelativeLayout.LayoutParams par2=v.(RelativeLayout.LayoutParams)getTag();\n\t\t\t\t\t\t // img.setLayoutParams(par2);\n\t\t\t\t\t\t // mapLayout.addView(img);\n\t\t\t\t\t\t String text=\"Project - \"+sm[id].getProjectName()+\"\\n\"+\"Building - \"+sm[id].getBuildingName()+\"\\n\"+\"Floor - \"+sm[id].getFloor()+\"\\n\"+\"Apartment - \"+sm[id].getApartment()+\"\\n\"+\"Area - \"+sm[id].getAptAreaName()+\"\\n\"+\"SnagType - \"+sm[id].getSnagType()+\"\\n\"+\"FaultType - \"+sm[id].getFaultType()+\"\\n\"+\"Status - \"+sm[id].getSnagStatus()+\"\\n\"+\"ReportDate - \"+sm[id].getReportDate()+\"\\n\"+\"SnagDetails - \"+sm[id].getSnagDetails()+\"\\n\"+\"PriorityLevel - \"+sm[id].getSnagPriority()+\"\\n\"+\"Cost - \"+sm[id].getCost()+\"\\n\"+\"CostTO - \"+sm[id].getCostTo()+\"\\n\"+\"AllocatedToName - \"+sm[id].getAllocatedToName()+\"\\n\"+\"InspectorName - \"+sm[id].getInspectorName()+\"\\n\"+\"ContractorName - \"+sm[id].getContractorName()+\"\\n\"+\"SubContractorName - \"+sm[id].getSubContractorName()+\"\\n\"+\"ContractorStatus - \"+sm[id].getContractorStatus();\n\t\t\t\t\t\t \n\t\t\t\t\t\t \n//\t\t\t\t\t\t \n\t\t\t\t\t\t final int loc=id;\n\t\t\t\t\t\t new AlertDialog.Builder(context)\n\t\t\t\t \t .setTitle(\"Snag Detail\")\n\t\t\t\t \t .setMessage(\"\"+text)\n\t\t\t\t \t .setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n\t\t\t\t \t public void onClick(DialogInterface dialog, int which) { \n\t\t\t\t \t \t//Toast.makeText(context,\"\"+0.052083332*screenwidth+\" \"+0.078125*screenheight,Toast.LENGTH_LONG).show();\n\t\t\t\t \t // continue with delete\n\t\t\t\t \t }\n\t\t\t\t \t })\n\t\t\t\t \t .show();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\t \n\t\t\t\t mapImage.setLayoutParams(par);\n\t\t\t\t mapLayout.addView(mapImage);\n\t\t\t\t \n\t\t\t }\n\t\t\t if(touched)\n\t\t\t {\n\t\t\t// if((currentX>=(x-7.5f) && currentX<=(x+7.5f)) && ((currentY<=(y+7.5f)) && currentY>=( y-7.5f)))\n\t\t\t // {\n\t\t\t\t if((currentX>=(x-7.5f) && currentX<=(x+7.5f)) && ((currentY<=(y+7.5f)) && currentY>=( y-7.5f)))\n\t\t\t\t {\n\t\t\t\t\t \n\t\t\t\t\t // Toast.makeText(getContext(), \"Click\",Toast.LENGTH_SHORT).show();\n\t\t\t\t\t// Log.d(\"in the touch\",\"\");\n //\t\t\t String strID=sm[i].getID();\n //\t\t\t \t\tSnagImageMapping objmap=(SnagImageMapping) context;\n////\t\t\t\t \n//\t\t\t\t RelativeLayout mapLayout =(RelativeLayout)(objmap).findViewById(R.id.plot_image_layout);\n//\t\t\t\t ImageView mapImage = new ImageView(context);\n////\t\t\t\t \n//\t\t\t\t RelativeLayout.LayoutParams par=new RelativeLayout.LayoutParams(300,300);\n//\t\t\t\t mapImage.setBackgroundResource(R.drawable.plot_pink_gray);\n//\t\t\t\t par.setMargins((int)(x+7.5f), (int)(y+7.5f), (int)(x-7.5f), (int)(y-7.5f));\n//\t\t\t\t mapImage.setLayoutParams(par);\n//\t\t\t\t mapLayout.addView(mapImage);\n//\t\t\t\t Toast.makeText(getContext(), \"Green\",Toast.LENGTH_SHORT).show();\n\t\t\t\t \n\t\t\t }\n\t\t\t touched=false;\n\t\t\t }\n\t\t\t \n\t\t}\n\t\t}\n\t\tcatch(Exception e){\n\t\t}\t\n\t }\n\t\t\n\t}",
"public void draw(Graphics g, int... paneOffsets) { }",
"void setMapChanged();",
"@Override\n public void onMapReady(GoogleMap mMap) {\n mMap.setOnMarkerClickListener(this);\n mapready = true;\n googleMap = mMap;\n googleMap.animateCamera(CameraUpdateFactory.zoomTo(11));\n draw();\n }",
"private void updateMap(){\n mMap.clear();\n // this instruction clears the Map object from the other object, it's needed in orther to display\n //the right current geofences without having the previous ones still on screen\n\n mOptions.setOption(mOptions.getOption().center(circle.getCenter()));\n mOptions.setOption(mOptions.getOption().radius(circle.getRadius()));\n\n\n circle=mMap.addCircle(mOptions.getOption());//i need to add again the user circle object on screen\n\n //TODO have to implement settings\n //set markers based on the return objects of the geoquery\n for (int ix = 0; ix < LOCATIONS.length; ix++) {\n mMap.addMarker(new MarkerOptions()\n .title(LOCATIONS[ix].getExplaination())\n .snippet(\"TODO\")\n .position(LOCATIONS[ix].getPosition()));\n }\n }",
"public void mapProgressOn (){\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n if (tabTourMapBinding.mapProgress.getVisibility() != View.VISIBLE) {\n tabTourMapBinding.mapProgress.setVisibility(View.VISIBLE);\n }\n if (tabTourMapBinding.mapLayout.getVisibility() != View.GONE) {\n tabTourMapBinding.mapLayout.setVisibility(View.GONE);\n }\n }\n });\n }",
"@Override\n public void onCameraMove() {\n zoom = GMap.getCameraPosition().zoom;\n if(zoom >= 17.2f){\n map_label.setVisible(true);\n mapOverlay.setVisible(false);\n }\n else{\n map_label.setVisible(false);\n mapOverlay.setVisible(true);\n }\n\n }",
"private void updateBoxes(){\n if(model.getMap() != null) {\n DoubleVec position = invModelToView(new DoubleVec(canvas.getWidth()*0.5,canvas.getHeight()*0.5));\n inner = new Rectangle(position, 1.0/zoomFactor * fi * canvas.getWidth(), 1.0/zoomFactor * fi * canvas.getHeight(), 0);\n outer = new Rectangle(position, 1.0/zoomFactor * fo * canvas.getWidth(), 1.0/zoomFactor * fo * canvas.getHeight(), 0);\n }\n }",
"@Override\n public void render(Graphics g) {\n if (isVisible()) { \n g.drawImage(getImage(), (int)position.getX(), (int) position.getY(), width, height, null);\n }\n }",
"public void Draw (Graphics graphics, MainJPanel JPanel){ // draw the player game pieces\n for(Piece piece : pieces.values())\n piece.Draw(graphics,JPanel);\n }",
"public void draw(){\n\t\tcomponent.draw();\r\n\t}",
"private void drawMembersLocation () {\n // Ve tat ca cac vi tri thanh vien tren ban do\n ArrayList<TourMember> tourMembers = OnlineManager.getInstance().mTourList.get(tourOrder).getmTourMember();\n for (int i = 0; i < tourMembers.size(); i++) {\n TourMember tourMember = tourMembers.get(i);\n // Neu khong co vi tri thi khong ve\n if (tourMember.getmLocation() == null) {\n break;\n }\n // Thay doi mau vi tri thanh vien\n MapMemberPositionLayoutBinding memberLocationLayoutBinding = DataBindingUtil.inflate(getLayoutInflater(), R.layout.map_member_position_layout, null, false);\n // Thay doi trang thai markup\n // Kiem tra xem vai tro cua thanh vien trong tour\n int function = tourMember.getmFunction();\n // Kiem tra xem tour da dien ra chua\n if (function == 1) {\n // Truong doan, thay doi mau sac markup thanh do\n memberLocationLayoutBinding.memberLocationImage.setColorFilter(Color.RED, PorterDuff.Mode.SRC_ATOP);\n } else {\n // Cac thanh vien con lai, thay doi mau sac markup thanh xanh\n memberLocationLayoutBinding.memberLocationImage.setColorFilter(Color.BLUE, PorterDuff.Mode.SRC_ATOP);\n }\n // Marker google map\n View markerView = memberLocationLayoutBinding.getRoot();\n // Khoi tao marker\n MarkerOptions markerOptions = new MarkerOptions()\n .draggable(false)\n .title(tourMember.getUserInfo().getFullName())\n .position(tourMember.getmLocation())\n .icon(BitmapDescriptorFactory.fromBitmap(getMemberLocationBitmapFromView(markerView)));\n if (tourMember.getmFunction() == 0) {\n // Thanh vien\n markerOptions.snippet(getString(R.string.tour_function_member));\n } else if (tourMember.getmFunction() == 1) {\n // Truong doan\n markerOptions.snippet(getString(R.string.tour_function_leader));\n } else if (tourMember.getmFunction() == 2) {\n // Pho doan\n markerOptions.snippet(getString(R.string.tour_function_vice_leader));\n } else {\n // Phu huynh\n markerOptions.snippet(getString(R.string.tour_function_parent));\n }\n mMap.addMarker(markerOptions);\n\n // Goi su kien khi nhan vao tieu de thanh vien\n mMap.setOnInfoWindowClickListener(new GoogleMap.OnInfoWindowClickListener() {\n @Override\n public void onInfoWindowClick(Marker marker) {\n // TODO: Chuyen sang man hinh nhan tin khi nhan vao tieu de thanh vien\n return;\n// openTimesheetInfo(marker.getTitle());\n }\n });\n }\n }",
"private void updateTempVisiblePoints() {\n for (int[] point : tempVisiblePoints) {\n point[3] -= 1;\n if (point[3] <= 0) {\n map.setPointHidden(point[0], point[1]);\n }\n }\n }",
"private void showBounds(){\n\n LatLngBounds.Builder boundBuilder = new LatLngBounds.Builder();\n\n\n for (int i = 0; i < points.size(); i++) {\n LatLng b_position = new LatLng(points.get(i).getLatitude(),points.get(i).getLongitude());\n boundBuilder.include(b_position);\n }\n\n LatLngBounds bounds = boundBuilder.build();\n\n int deviceWidth = getResources().getDisplayMetrics().widthPixels;\n int deviceHeight = getResources().getDisplayMetrics().heightPixels;\n int devicePadding = (int) (deviceHeight * 0.20); // offset from edges of the map 10% of screen\n\n CameraUpdate cu = CameraUpdateFactory.newLatLngBounds(bounds, deviceWidth, deviceHeight, devicePadding);\n mMap.animateCamera(cu);\n\n }",
"public void show(int i){\n if (i == 0){\n this.showmap();\n } else \n this.showfigure();\n }",
"private void draw() {\n\t\tCanvas c = null;\n\t\ttry {\n\t\t\t// NOTE: in the LunarLander they don't have any synchronization here,\n\t\t\t// so I guess this is OK. It will return null if the holder is not ready\n\t\t\tc = mHolder.lockCanvas();\n\t\t\t\n\t\t\t// TODO this needs to synchronize on something\n\t\t\tif (c != null) {\n\t\t\t\tdoDraw(c);\n\t\t\t}\n\t\t} finally {\n\t\t\tif (c != null) {\n\t\t\t\tmHolder.unlockCanvasAndPost(c);\n\t\t\t}\n\t\t}\n\t}",
"public void draw(WorldLocation coord){\n \n }"
] | [
"0.739563",
"0.72234863",
"0.7120485",
"0.69792116",
"0.69207096",
"0.69134057",
"0.6885732",
"0.68393046",
"0.68062174",
"0.6655854",
"0.6641791",
"0.66267943",
"0.6619893",
"0.66101366",
"0.6579963",
"0.6544126",
"0.6449506",
"0.6423087",
"0.6403842",
"0.63868743",
"0.63792014",
"0.63780385",
"0.634839",
"0.6337502",
"0.6336489",
"0.63353086",
"0.6334063",
"0.6317567",
"0.63110065",
"0.630401",
"0.6278154",
"0.62661964",
"0.6263906",
"0.6235412",
"0.6232793",
"0.6228411",
"0.62274534",
"0.62162375",
"0.619553",
"0.6194319",
"0.6185014",
"0.61783487",
"0.61759645",
"0.61546135",
"0.6150412",
"0.6145982",
"0.61429346",
"0.6139343",
"0.61258537",
"0.61208016",
"0.6119545",
"0.61177826",
"0.6110538",
"0.61021674",
"0.6101105",
"0.609976",
"0.6088071",
"0.60475945",
"0.6043793",
"0.6040261",
"0.6038458",
"0.6023495",
"0.60212755",
"0.6015176",
"0.6007824",
"0.5980509",
"0.5979239",
"0.59615254",
"0.5943541",
"0.59393746",
"0.59382224",
"0.59188104",
"0.5913426",
"0.58879066",
"0.58828825",
"0.58798635",
"0.5878899",
"0.5878633",
"0.5877243",
"0.5874987",
"0.587494",
"0.586706",
"0.586668",
"0.5865511",
"0.58648723",
"0.58590263",
"0.5843191",
"0.58399034",
"0.58393365",
"0.5831986",
"0.5830087",
"0.58237725",
"0.5820178",
"0.5807732",
"0.580678",
"0.58048445",
"0.58005124",
"0.5790525",
"0.57843775",
"0.57770103",
"0.5776286"
] | 0.0 | -1 |
Removing dead enemies and changing target of them | void updateEnemies() {
getEnemies().forEach(e -> {
if (!e.isAlive()) {
e.die();
SoundPlayer.play(SoundPlayer.enemyDestroyed);
}
});
objectsInMap.removeIf(o -> o instanceof Enemy && !(((Enemy) o).isAlive()));//Removing Dead Enemies
getEnemies().forEach(e -> e.setTarget(objectsInMap.stream().filter(p -> p.identifier.contains("PlayerTank0.") &&
p.isBlocking && ((Tank) p).isVisible()).collect(Collectors.toList())));//Giving Possible target to enemies to decide
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void enemyoff(){\n getWorld().removeObject(this);\n }",
"public void tick()\n{\n y+=speed;\n\n for(int i=0; i<game.ea.size(); i++)\n {\n EntityA tempEnt= game.ea.get(i);\n if(Physics.Coliision(this,tempEnt))\n {\n c.removeEntity(tempEnt); //zeby po trafieniu znikal pocisk\n c.removeEntity(this);\n game.setEnemy_killed(game.getEnemy_killed()+1);\n\n }\n }\n\n/*\n* If Enemy is out of bounds player get - points\n* and loses some stamina.\n*\n* Enemies are removed from list after disapears\n */\n\n if(y>(App.getHEIGHT()-20)*2)\n {\n App.addHealth(-10);\n App.addPOINTS(-3);\n c.removeEntity(this);\n }\n\n anim.runAnimation();\n\n /*\n * If App is not in game state it doesn't\n * need to have any enemies\n */\n\n if(App.State != App.STATE.GAME)\n {\n delEnemies();\n\n }\n}",
"public void killedByPlayer() {\r\n\t\tscreen.enemiesKilled++;\r\n\t\tMazeCrawler mc = screen.mazeHandler.mazeCrawler;\r\n\t\tint n = 2; //if enemy is large do movement n+1 times\r\n\t\tswitch (enemyType) {\r\n\t\tcase DOWN:\r\n\t\t\tmc.moveDown();\r\n\t\t\tif(large) {for(int i = 0; i < n; i++) mc.moveDown();}\r\n\t\t\tbreak;\r\n\t\tcase LEFT:\r\n\t\t\tmc.moveLeft();\r\n\t\t\tif(large) {for(int i = 0; i < n; i++) mc.moveLeft();}\r\n\t\t\tbreak;\r\n\t\tcase RIGHT:\r\n\t\t\tmc.moveRight();\r\n\t\t\tif(large) {for(int i = 0; i < n; i++) mc.moveRight();}\r\n\t\t\tbreak;\r\n\t\tcase UP:\r\n\t\t\tmc.moveUp();\r\n\t\t\tif(large) {for(int i = 0; i < n; i++) mc.moveUp();}\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tscreen.enemyDeath.play(.5f);\r\n\t\tdestroy();\r\n\t}",
"private void removeDeadEnemies() {\n ArrayList<Entity> deadEnemies = getAllEnemiesDead();\n if (deadEnemies.size() > 0) {\n for (Entity enemy : deadEnemies) {\n enemiesInCombat.remove(enemy);\n }\n }\n isStillInCombat();\n }",
"public static void enemy(){\n\t\tenemy = null;\n\t\twhile(enemy == null){\n\t\t spawnEnemy();\n\t\t}\n\t}",
"private void killBullet() {\r\n this.dead = true;\r\n }",
"public void dispara()\r\n {\r\n BulletEnemy bala = new BulletEnemy();\r\n getWorld().addObject(bala,getX(),getY()+25);\r\n }",
"public void damageTargets(List<Slicer> activeEnemies) {\n // Create list of explosives that have been detonated (regardless of they have hit enemies)\n // These explosives will be removed from the map\n List<Explosive> detExp = new ArrayList<>();\n for (int i=0; i<this.explosives.size(); i++) {\n Explosive explosive = this.explosives.get(i);\n if (explosive != null && explosive.getDetTime()>=DET_TIME) {\n numDetonated++;\n detExp.add(explosive);\n // Checks if enemy is in the area\n // Does damage accordingly\n for (Slicer target: activeEnemies) {\n if (explosive.getCenter().distanceTo(target.getCenter()) <= getEffectRadius()) {\n target.reduceHealth(getDamage());\n }\n }\n }\n }\n // Removes all explosives that have detonated\n explosives.removeAll(detExp);\n }",
"public void killAll() {\n for (Map.Entry<Integer, Enemy> entry :enemies.entrySet()) {\n if (!!!entry.getValue().isDead()) {\n entry.getValue().setHealth(0);\n }\n }\n }",
"int defend(Unit unit, Unit enemy);",
"public void nullEnemy(){\n enemy = null;\n nullEntity();\n }",
"public void clearEnemies() {\n\t\tIterator<Entity> it = entities.iterator();\n\t\twhile (it.hasNext()) {\n\t\t\tEntity e = it.next();\n\t\t\t//Skip playerfish\n\t\t\tif (e instanceof PlayerFish) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t//Kill and remove the entity\n\t\t\te.kill();\n\t\t\tit.remove();\n\t\t}\n\t\t\n\t\t//Remove all non playerfish from collidables\n\t\tcollidables.removeIf(c -> !(c instanceof PlayerFish));\n\t\tdrawables.removeIf(c -> !(c instanceof PlayerFish));\n\t}",
"public void cleanupBattle(List<Enemy> defeatedEnemies){\r\n Character character = world.getCharacter();\r\n updateAllies();\r\n\r\n ArrayList<MovingEntity> deadFriendlies = new ArrayList<MovingEntity>();\r\n for (MovingEntity friendly: world.getFriendlyEntities()) {\r\n if (friendly.getCurrHP() <= 0) {\r\n deadFriendlies.add(friendly);\r\n friendly.destroy();\r\n }\r\n }\r\n world.getFriendlyEntities().removeAll(deadFriendlies);\r\n\r\n \r\n //ArrayList<Enemy> defeatedEnemies = battle.getDefeated();\r\n for(Enemy defeatedEnemy : defeatedEnemies) {\r\n killEnemy(defeatedEnemy);\r\n }\r\n\r\n if (character.getCurrHP() <= 0) {\r\n world.setGameStateLose();\r\n }\r\n }",
"public void kill()\r\n {\n if(isTouching(TopDownPlayer.class))\r\n {\r\n health(1);\r\n\r\n getWorld().removeObject(player);\r\n //getWorld().addObject (new Test(), 20, 20);\r\n\r\n }\r\n // if(healthCount >= 1)\r\n // {\r\n // World world;\r\n // world = getWorld();\r\n // getWorld().removeObject(player);\r\n // \r\n // getWorld().addObject (new Test(), 20, 20);\r\n // }\r\n }",
"public void moveTowards(){\n \n \n \n if(!exploded){\n \n \n move(speed);\n \n if(isTouching(Enemy.class)){\n move(explosionRadius); \n \n inRange = (ArrayList) getObjectsInRange(explosionRadius + 25, Enemy.class);\n for(Enemy e : inRange){\n e.hit(damage);\n }\n \n //explode\n exploded = true;\n \n image = new GreenfootImage(\"50x50 aoe.png\");\n image.scale(explosionRadius*2, explosionRadius*2);\n setImage(image);\n //getWorld().removeObject(this);\n }\n else if (isAtEdge())\n {\n getWorld().removeObject(this);\n }\n else if ( radius < distance) {\n getWorld().removeObject(this); \n }\n }\n else{\n setImage(image);\n image.setTransparency(image.getTransparency() - 5);\n if(image.getTransparency() <= 0) getWorld().removeObject(this);\n }\n }",
"public void battleEnemyAttack() {\n if(battleEnemy != null){ // If all enemies have attacked, they cannot attack anymore for this round\n\n MovingEntity target = battleEnemy.getAttackPreference(targetAllies);\n if(target == null){\n target = targetAlly;\n }\n\n battleEnemy.attack(target, targetEnemies, targetAllies);\n //System.out.println(battleEnemy.getID() + \" is attacking \" + target.getID() + \" remaining hp: \" + target.getCurrHP());\n if (updateTarget(target) == false) {\n // if target still alive, check if its still friendly incase of zombify\n targetAlly = checkSideSwap(targetAlly, false, battleEnemies, targetEnemies, battleAllies, targetAllies);\n }\n\n battleEnemy = nextAttacker(battleEnemy, battleEnemies);\n\n }\n }",
"private void setEnemy(){\n depths.setEnemy(scorpion);\n throne.setEnemy(rusch);\n ossuary.setEnemy(skeleton);\n graveyard.setEnemy(zombie);\n ramparts.setEnemy(ghoul);\n bridge.setEnemy(concierge);\n deathRoom1.setEnemy(ghost);\n deathRoom2.setEnemy(cthulu);\n deathRoom3.setEnemy(wookie); \n }",
"private void updateEnemies()\n\t \n\t {\n\t for(int i = 0; i < EnemyList.size(); i++)\n\t {\n\t \t//get and update enemy for the enemy list\n\t Enemy eh = EnemyList.get(i);\n\t eh.Update();\n\t \n\t //checks for enemy and player crashes \n\t Rectangle playerRectangel = new Rectangle(pl.xCoord, pl.yCoord, pl.PlayerImage.getWidth(), pl.PlayerImage.getHeight());\n\t Rectangle enemyRectangel = new Rectangle(eh.xCoord, eh.yCoord, eh.EnemyHelicopterImage.getWidth(), eh.EnemyHelicopterImage.getHeight());\n\t if(playerRectangel.intersects(enemyRectangel)){\n\t \n\t \t//set player health to zero\n\t \tpl.Health = 0;\n\t \n\t // Remove helicopter from the list.\n\t EnemyList.remove(i);\n\t \n\t //creates new explosion coordinates \n\t enExplosionX = eh.xCoord; \n\t enExplosionY = eh.yCoord; \n\t plExplosionX = pl.xCoord+120;\n\t plExplosionY = pl.yCoord;\n\t GameOn = false;\n\t \n\t }\n\t \n\t // Check health.\n\t if(eh.Health <= 0){\n\t \n\t // Increase the number of destroyed enemies and removes a helicopter froma list.\n\t DestroyedEnemies++;\n\t \n\t \n\t if(DestroyedEnemies == 10)\n\t {\n\t \t//WinsState = true; \n\t \t\n\t }\n\t EnemyList.remove(i);\n\t \n\t }\n\t \n\t // If the current enemy has left the scree it is removed from the list and the number of runAwayEnemies is increased.\n\t if(eh.HasLeftScreen())\n\t {\n\t \tEnemyList.remove(i);\n\t RunAwayEnemies++;\n\t }\n\t \n\t if(RunAwayEnemies > 5)\n\t {\n\t \tGameOn = false; \n\t \t\n\t }\n\t }\n\t \n\t }",
"public void attack(Person target) {\r\n target.setHealthPoints(target.getHealthPoints() - 1);\r\n }",
"void garbageCollector() {\n Enemy ETR = null;\n Sprite BTR = null;\n Medkit MTR = null;\n for (Enemy e: enemies) {\n if (e.eTank.getX() < -100) {\n ETR = e;\n }\n }\n for (Sprite c: smBullets) {\n if (c.getX() > width + 100) {\n BTR = c;\n }\n if (c.getY() > height + 100) {\n BTR = c;\n }\n if (c.getX() < -100) {\n BTR = c;\n }\n if (c.getY() < -100) {\n BTR = c;\n }\n }\n \n for (Medkit med : health) {\n if (med.timer <= 0) {\n MTR = med;\n }\n }\n //gets rid of bullets that went off-screen\n if (BTR != null) {\n smBullets.remove(BTR);\n println(\"Deleted bullet\");\n }\n if (ETR != null) {\n enemies.remove(ETR);\n }\n //Medkits to despawn\n if (MTR != null) {\n health.remove(MTR);\n }\n}",
"public void tick(){\r\n scoreKeep++;\r\n if(scoreKeep >= 500){\r\n scoreKeep = 0;\r\n hud.setLevel(hud.getLevel()+1);\r\n // continuous addition of enemies at each new level\r\n if(game.diff == 0) {\r\n \tif((hud.getLevel() >= 2 && hud.getLevel() <= 3)||(hud.getLevel() >= 7 && hud.getLevel() <= 9))\r\n \thandler.addObject(new BasicEnemy(r.nextInt(Game.width-50), r.nextInt(Game.height-50), ID.BasicEnemy, handler));\r\n if(hud.getLevel() == 4 || hud.getLevel() == 6)\r\n handler.addObject(new FastEnemy(r.nextInt(Game.width-50), r.nextInt(Game.height-50), ID.FastEnemy, handler));\r\n if(hud.getLevel() == 5)\r\n \thandler.addObject(new SmartEnemy(r.nextInt(Game.width-50), r.nextInt(Game.height-50), ID.SmartEnemy, handler));\r\n if(hud.getLevel() == 10){\r\n handler.clearEnemies();\r\n handler.addObject(new SmartEnemy(r.nextInt(Game.width-50), r.nextInt(Game.height-50), ID.SmartEnemy, handler));\r\n handler.addObject(new BossEnemy((Game.width/2)-48, -100, ID.BossEnemy, handler));\r\n }\r\n }else if(game.diff == 1) {\r\n \tif((hud.getLevel() >= 2 && hud.getLevel() <= 3)||(hud.getLevel() >= 7 && hud.getLevel() <= 9))\r\n \thandler.addObject(new HardEnemy(r.nextInt(Game.width-50), r.nextInt(Game.height-50), ID.BasicEnemy, handler));\r\n if(hud.getLevel() == 4 || hud.getLevel() == 6)\r\n handler.addObject(new FastEnemy(r.nextInt(Game.width-50), r.nextInt(Game.height-50), ID.FastEnemy, handler));\r\n if(hud.getLevel() == 5)\r\n \thandler.addObject(new SmartEnemy(r.nextInt(Game.width-50), r.nextInt(Game.height-50), ID.SmartEnemy, handler));\r\n if(hud.getLevel() == 10){\r\n handler.clearEnemies();\r\n handler.addObject(new SmartEnemy(r.nextInt(Game.width-50), r.nextInt(Game.height-50), ID.SmartEnemy, handler));\r\n handler.addObject(new BossEnemy((Game.width/2)-48, -100, ID.BossEnemy, handler));\r\n }\r\n }\r\n }\r\n }",
"public void execute() {\n\t\tif (getTargetEnemies() != null && getTargetEnemies().size() > 0) {\n\t\t\tBuff buff = new Buff(getHero().getId(), null, Buff.SPEED, getAbility().getValue(), CHARGE_DURATION, \"0\", 0);\n\t\t\tThread buffDurationThread = new Thread(() -> {\n\t\t\t\ttry {\n\t\t\t\t\tThread.sleep(CHARGE_DURATION);\n\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\tgetHero().removeBuff(buff);\n\t\t\t\tgetGameServer().sendGameStatus();\n\t\t\t\tLog.i(TAG, \"Removed buff, now have these many buffs left : \" + getHero().getBuffs().size());\n\t\t\t});\n\t\t\tbuffDurationThread.start();\n\n\t\t\tgetHero().getBuffs().add(buff);\n\n\t\t\t// Set the cooldown for this ability\n\t\t\tgetAbility().setMillisLastUse(getTime());\n\t\t\tgetAbility().setTimeWhenOffCooldown(\"\" + (getTime() + getAbility().calculateCooldown(getHero(), this)));\n\n\t\t\t// Send castbar information\n\t\t\tgetGameServer().sendCastBarInformation(getHero().getId(), getAbility());\n\n\t\t\t// Add animation to list\n\t\t\tgetGameServer().getAnimations().add(new GameAnimation(\"CHARGE\", 0, getHero().getId(), null, 1));\n\t\t}else{\n\t\t\tLog.i(TAG, \"Hero had no target, canceling ability\");\n\t\t}\n\t\tsuper.execute();\n\t}",
"private static void attack(RobotInfo target) throws GameActionException {\n if (SOLDIER_DEBUG) {\n System.out.println(\"attacking\");\n }\n BulletInfo[] bullets = rc.senseNearbyBullets(EvasiveSoldier.BULLET_DETECT_RADIUS);\n RobotInfo[] robots = rc.senseNearbyRobots(EvasiveSoldier.ENEMY_DETECT_RADIUS);\n MapLocation targetLocation = target.getLocation();\n move(bullets, robots, targetLocation);\n //RobotUtils.tryMoveDestination(targetLocation);\n if (TargetingUtils.clearShot(here, target) || (rc.getType() == RobotType.GARDENER && rc.getOpponentVictoryPoints() > 10)) {\n if (SOLDIER_DEBUG) {\n System.out.println(\"clearShot to target\");\n }\n Direction towardsEnemy = here.directionTo(targetLocation);\n float distanceEnemy = here.distanceTo(targetLocation);\n if (distanceEnemy <= 3.5 && rc.canFirePentadShot() && rc.getTeamBullets() > 200) {\n rc.firePentadShot(towardsEnemy);\n }\n else {\n if (rc.canFireTriadShot() && rc.getTeamBullets() > 50) {\n rc.fireTriadShot(towardsEnemy);\n }\n else if (rc.canFireSingleShot()) {\n rc.fireSingleShot(towardsEnemy);\n }\n }\n }\n }",
"private void subtractEnemyMissile() {\n this.enemyMissile -= 1;\n }",
"public void takeDamage()\n {\n if(getWorld()!= null)\n {\n if(this.isTouching(Enemies.class))\n {\n Life = Life - Enemies.damage;\n if(Life <=0)\n {\n getWorld().removeObject(this);\n Store.wealth += Game.credit;\n }\n }\n }\n }",
"public void tick() {\n\t\tif (Math.abs(disToPlayerX()) > Math.abs(disToPlayerY())) {\r\n\t\t\tif (disToPlayerX()<0) {\r\n\t\t\t\tx -= speed;\t//moves enemy to the left\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tx += speed; //moves enemy to the right\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tif (disToPlayerY()<0) {\r\n\t\t\t\ty-=speed; //moves enemy up\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\ty+=speed; //moves enemy down\r\n\t\t\t}\r\n\t\t}\r\n\t\tenemyRectangle.setLocation((int)x,(int) y); //updates hitbox of enemy\r\n\r\n\t\t//checks all enemies and see if they run into player\r\n\t\tfor (int i=0;i<c.getEnemys().size();i++) {\r\n\t\t\tif (enemyRectangle.getBounds().intersects(player.getRectangle().getBounds())) {\r\n\t\t\t\tkillEnemy(); //removes the enemy\r\n\t\t\t\tPlayer.health -=10; //removes 10 health\r\n\t\t\t\tbreak; //doesn't work without this BREAK. DO NOT REMOVE\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//checks all bullets if they hit an enemy\r\n\t\tfor (int i = 0;i<c.getBullets().size();i++) {\r\n\t\t\tif (enemyRectangle.getBounds().intersects(c.getBullets().get(i).getRect().getBounds())) {\r\n\t\t\t\tkillEnemy(); //removes enemy\r\n\t\t\t\tc.removeBullet(c.getBullets().get(i)); //removes the bullet\r\n\t\t\t\tPlayer.score += 50; //adds 50 to the score\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void popEnemies() {\n\t\t\n\t\tEnemyList.add(orc);\n\t\tEnemyList.add(goblin);\n\t\tEnemyList.add(necromancer);\n\t\tEnemyList.add(troll);\n\t\tEnemyList.add(minotaur);\n\t\tEnemyList.add(hydra);\n\t\tEnemyList.add(zombie);\n\t\tEnemyList.add(thrall);\n\t\tEnemyList.add(demon);\n\t\tEnemyList.add(witch);\n\t\tEnemyList.add(boss);\n\t}",
"public void removeEnemy(Enemy e) {\r\n this.enemies.remove(e);\r\n this.numOfEnemies.decrease(1);\r\n }",
"@Override\n void planted() {\n super.planted();\n TimerTask Task = new TimerTask() {\n @Override\n public void run() {\n\n for (Drawable drawables : gameState.getDrawables()) {\n if (drawables instanceof Zombie) {\n int distance = (int) Math.sqrt(Math.pow((drawables.x - x), 2) + Math.pow((drawables.y - y), 2));\n if (distance <= explosionradious) {\n ((Zombie) drawables).hurt(Integer.MAX_VALUE);\n }\n }\n }\n\n life = 0;\n }\n\n };\n\n Timer timer = new Timer();\n timer.schedule(Task, 2000);\n }",
"void playerHit() {\n if (lives == 0) {//if no lives left\n isDead = true;\n } else {//remove a life and reset positions\n lives -=1;\n immortalityTimer = 100;\n resetPositions();\n }\n }",
"public void remTarget(){\n rem(DmpDMSAG.__target);\n }",
"private boolean updateTarget(MovingEntity target) {\n // check if the target died\n if (target.getCurrHP() > 0) {\n return false;\n }\n // else, target is dead and update accordingly\n\n if (battleEnemies.contains(target)) {\n if (battleEnemy != null && battleEnemy.equals(target)) {\n battleEnemy = nextAttacker(battleEnemy, battleEnemies);\n }\n targetEnemy = nextTarget(targetEnemy, targetEnemies, battleEnemies);\n battleEnemies.remove(target);\n\n } else if (battleAllies.contains(target)) {\n if (battleAlly != null && battleAlly.equals(target)) {\n battleAlly = nextAttacker(battleEnemy, battleAllies);\n }\n targetAlly = nextTarget(targetAlly, targetAllies, battleAllies);\n battleAllies.remove(target);\n }\n return true;\n }",
"void removeAllSpawn();",
"public void act() \r\n {\r\n Controller world = (Controller) getWorld();\r\n player = world.getPlayer();\r\n if (this.isTouching(Player.class))\r\n {\r\n player.minusHealth(5);\r\n world.removeObject(this);\r\n }\r\n }",
"private void removeEnemy(int e_num){\n\t\tint i;\n\t\tfor(i=e_num;i<enemy_num-1;i++){\n\t\t\tenemy[i][0] = enemy[i+1][0];\n\t\t\tenemy[i][1] = enemy[i+1][1];\n\t\t\tenemy[i][2] = enemy[i+1][2];\n\t\t\tenemy_arrow_num[i] = enemy_arrow_num[i+1];\n\t\t\tenemy_arrows[i] = enemy_arrows[i+1];\n\t\t}\n\t\tenemy_num -= 1;\n\t\tenemy[i][0] = 0;\n\t\tenemy[i][1] = 0;\n\t\tenemy[i][2] = 0;\n\t\tenemy_arrow_num[i] = 0;\n\t\t\n\t\t\n\t\n\t}",
"private void reviveAttacker() {\n\t\tString type = (mRandom.nextFloat() > mKnightSpawnChance) ? \"normal\" : \"knight\";\n\t\treviveAttacker(type);\n\t}",
"public void attack() {\n energy = 2;\n redBull = 0;\n gun = 0;\n target = 1;\n // if Player is in range take off a life.\n if (CharacterTask.ghostLocation == GameWindow.playerLocation) {\n playerLives = playerLives - 1;\n System.out.println(\"Player Lives: \" + playerLives);\n }\n }",
"public void playEnemy(){\n // System.out.println(\"staaaaaaaaaaaaaaaaaaaaar\"+character.getBlock());\n for(int i = 0 ; i < enemyController.getSize() ; i++){\n if (! enemies.get(i).isDead())\n effectHandler.playEnemy( i );\n }\n for( int i = 0 ; i < enemyController.getSize() ; i++){\n if (! enemies.get(i).isDead())\n effectHandler.endEnemyTurn(i);\n }\n\n }",
"private void reset() {\n\n\n spaceShips.clear();\n playerOne = null;\n playerTwo = null;\n friendlyBullets.clear();\n enemyBullets.clear();\n powerUps.clear();\n enemyGenerator.reset();\n difficulty.reset();\n Bullets.BulletType.resetSpeed();\n\n for (int i = 0; i < enemies.size(); i++) {\n enemies.get(i).getEnemyImage().delete();\n }\n enemies.clear();\n }",
"private void addEnemySheild() {\n this.enemyShield += 1;\n }",
"@Override\n\tpublic void doCollideEnemy(SlowEnemy enemy) {\n\t\t\n\t}",
"@Override\n\tpublic void despawn() {\n\t\t\n\t}",
"public void enemySpawner(){\n\t\tif (spawnFrame >= spawnTime){\n\t\t\tfor(int i =0;i<enemies.size();i++){\n\t\t\t\tif (!enemies.get(i).getInGame()){\n\t\t\t\t\tenemies.get(i).spawnEnemy(Map.enemy);\n\t\t\t\t\tbreak;\n\t\t\t\t\t/*if (enemies.get(i).getNum()==1){\n\t\t\t\t\t\tenemies.get(i).spawnEnemy(Map.enemy1);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t} else if (enemies.get(i).getNum()==2){\n\t\t\t\t\t\tenemies.get(i).spawnEnemy(Map.enemy2);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t} else if (enemies.get(i).getNum()==3){\n\t\t\t\t\t\tenemies.get(i).spawnEnemy(Map.enemy3);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}*/\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\tspawnFrame=0;\n\t\t} else{\n\t\t\tspawnFrame+=1;\n\t\t}\n\t}",
"public void enemyShoot()\r\n\t{\r\n\t\tfor (Enemy enemies : enemy)\r\n\t\t{\r\n\t\t\tif (enemies.getHasFired())\r\n\t\t\t{\r\n\t\t\t\tBullet enemyPew = enemies.shoot();\r\n\t\t\t\tif (enemyPew != null)\r\n\t\t\t\t{\r\n\t\t\t\t\tbullets.add(enemyPew);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void update() {\r\n super.update();\r\n life -= 1;\r\n if(life <= 0) {\r\n killBullet();\r\n }\r\n }",
"public void act() \n {\n if(timer > 0){\n timer--;\n }else{\n Greenfoot.playSound(\"explosionSound.wav\");\n getWorld().removeObject(this);\n }\n }",
"BossEnemy(){\n super();\n totallyDied = true;\n }",
"public void demorph(EntityLivingBase target)\n {\n /* 20 is default player's health */\n this.setHealth(target, 20);\n\n for (IAbility ability : this.abilities)\n {\n ability.onDemorph(target);\n }\n }",
"public void killed(Target target){\r\n\t\tif(this.crashed(target.getShape()))\r\n\t\t\tthis.lives--;\r\n\t}",
"@Override\n\tpublic void loadEnemies() {\n\t\t\n\t}",
"public void removeEnemy(String name){\n\t\tint remove = findEnemyNamePosition(name);\r\n\t\t\r\n\t\t//subtract in one the size of the array\r\n\t\tsize--;\r\n\t\t\r\n\t\t//make all the values in the array down in one position, in the position to remove\r\n\t\tfor(int i = remove + 1; i < size; i++){\r\n\t\t\tenemy[i - 1] = enemy[i];\r\n\t\t}\r\n\t}",
"protected abstract void defineEnemy();",
"public void act() \r\n {\r\n Actor hitMC = getOneIntersectingObject(MC.class);\r\n if (hitMC != null) {\r\n ((Hall) getWorld()).player.health++;\r\n getWorld().removeObject(this);\r\n }\r\n }",
"public void attack(int idx)\n {\n CreatureWorld playerWorld = ;\n \n }",
"@Override\r\n public boolean dye() {\r\n if (getX() > 3100 || getX() < 10 || getY() < 10 || getY() > 3100) {\r\n return true;\r\n }\r\n// int pixel = mapRGB.getRGB((int) getX(), (int) getY());\r\n// int red = (pixel >> 16) & 0xff;\r\n// if(red==255){this.handler.getWaves().removeEnemy(); return true;}\r\n int k = collision(velX, velY, this.getX(), this.getY());\r\n if(k!=0) {\r\n this.handler.getWaves().removeEnemy(); \r\n return true;\r\n }\r\n else{\r\n zombie_x = getX(); \r\n zombie_y = getY();\r\n }\r\n //I proiettili hanno una portata limitata o se ha colpito il player o se è uscito dalla mappa o se è andato contro un muro\r\n if ((this.getHealth() == 0) || (handler.getPlayer().getBounds().contains(getX(), getY()))) {\r\n int n = (int) (Math.random() * 10);\r\n if(n>1) n=2;\r\n switch (n) {\r\n case 2:\r\n this.handler.addSprite(new StandardZombie(zombie_x, zombie_y, 3, 200, 25, handler.getPlayer(), this.handler, 30, 60, 60, 5, new Animation(Assets.zombie, 20), new Animation(Assets.zombieAttack, 35), new Sound(Assets.zombieBite), new Sound(Assets.zombieHit)));\r\n break;\r\n case 0:\r\n this.handler.addSprite(new StandardZombie(zombie_x, zombie_y, 4, 70, 50, handler.getPlayer(), this.handler, 0, 60, 60, 20, new Animation(Assets.zombie2, 15), new Animation(Assets.zombie2Attack, 15), new Sound(Assets.zombieBite), new Sound(Assets.zombieHit)));\r\n break;\r\n case 1:\r\n this.handler.addSprite(new SpittleZombie(zombie_x, zombie_y, 3, 500, 40, handler.getPlayer(), this.handler, 0, 60, 60, 45, new Animation(Assets.zombie3, 15), new Animation(Assets.zombie3Attack, 15), new Sound(Assets.zombieBite), new Sound(Assets.zombieHit)));\r\n break;\r\n }\r\n return true;\r\n }\r\n \r\n return false;\r\n }",
"@Override\n\tpublic void onDeath() {\n\t\tsuper.onDeath();\n\n\t\ttentacles.stream().filter(npc -> !npc.isDead()).forEach(npc -> npc.setDead(true));\n\t\trespiratorySystems.stream().filter(npc -> !npc.isDead()).forEach(npc -> npc.setDead(true));\n\t\tspawns.stream().filter(npc -> !npc.isDead()).forEach(npc -> npc.setDead(true));\n\n\t\ttentacles.clear();\n\t\trespiratorySystems.clear();\n\t\tspawns.clear();\n\t}",
"private void enemyMove() {\n\t\tArrayList<EnemySprite> enemylist = this.model.getEnemy();\n\t\tfor(EnemySprite sp :enemylist) {\n\t\t\tif(sp instanceof NormalEnemySprite) {\n\t\t\t\t\n\t\t\t\t((NormalEnemySprite)sp).move();\n\t\t\t}\n\t\t\t\n\t\t\telse if(sp instanceof PatrollingEnemySprite) {\n\t\t\t\t\n\t\t\t\t((PatrollingEnemySprite) sp).move();\n\t\t\t\t\n\t\t\t} \n\t\t\t\n\t\t\telse if (sp instanceof BigEnemySprite) {\n\t\t\t\t((BigEnemySprite)sp).move();\n\t\t\t}\n\t\t\t\n\t\t\telse if (sp instanceof PatrollingBigEnemySprite) {\n\t\t\t\t((PatrollingBigEnemySprite) sp).move();\n\t\t\t}\n\t\t\t\n\t\t\telse if (sp instanceof CircleBigEnemySprite) {\n\t\t\t\t((CircleBigEnemySprite) sp).move();\n\t\t\t}\n\t\t}\n\t\t\n\t\t\t\t\n\t}",
"private void nullify() {\n paint = null;\n bg1 = null;\n bg2 = null;\n madafacka = null;\n for(int i=0; i<enemies.size(); i++){\n enemies.remove(i);\n i--;\n }\n currentSprite = null;\n ship = null;\n shipleft1 = null;\n shipleft2 = null;\n shipright1 = null;\n shipright2 = null;\n basicInv1 = null;\n basicInv2 = null;\n badBoyAnim = null;\n\n // Call garbage collector to clean up memory.\n System.gc();\n }",
"private void addEnemies() {\n\t\tred_ghost = new Enemy();\r\n\t\tthis.add(red_ghost);\r\n\t\tenemies.add(red_ghost);\r\n\t\t\r\n\t}",
"@Override\n public void kill() {\n alive = false;\n Board.getInstance().setPoints(points);\n }",
"public void act() \r\n {\r\n // Add your action code here.\r\n espacio esp=(espacio)getWorld();\r\n Actor act=getOneIntersectingObject(nave.class);//Cuando la nave tome el poder \r\n if(act!=null)\r\n {\r\n for(int i=1;i<=10;i++)//incrementa el poder mediante el metodo solo 1s disparos\r\n esp.poder.incrementar();\r\n getWorld().removeObject(this);\r\n Greenfoot.playSound(\"Poder.wav\");\r\n }\r\n \r\n }",
"public void checkIfAlive()\n {\n if(this.health<=0)\n {\n targetable=false;\n monstersWalkDistanceX=0;\n monstersWalkDistanceY=0;\n this.health=0;\n new TextureChanger(this,0);\n isSelected=false;\n if(monsterType==1)\n {\n visible=false;\n }\n if(gaveResource==false) {\n int gameResource = Board.gameResources.getGameResources();\n Board.gameResources.setGameResources(gameResource + resourceReward);\n gaveResource=true;\n }\n }\n }",
"public void updateEnemies() {\n for (Map.Entry<Integer, Enemy> entry :enemies.entrySet()) {\n entry.getValue().update(mainPlayerPosX, mainPlayerPosY);\n if (entry.getValue().isDead()) {\n enemiesSize--;\n }\n }\n }",
"public void attack(RobotReference target) {\n if (target != null) {\n turnToVector(target.getLocation());\n pointGunToVector(target.getLocation());\n setAhead(60);\n fire(3);\n\n\n }\n }",
"private void bringToLife(){\n this.dead = false;\n }",
"public void act()\n {\n if (health == 0)\n {\n this.remove();\n }\n }",
"public void kill() {\n // leben abziehen und geister sowie pacman respawnen\n lives--;\n pacman.respawn(level.getRandomPacmanSpawn());\n for (GameEntity entity : entities)\n if (entity instanceof Ghost)\n ((Ghost) entity).respawn(level.getNextGhostSpawn());\n }",
"public abstract void turnToDead(int x, int y);",
"public void setAlive(boolean alive){\n // make sure the enemy can be alive'nt\n this.alive = alive; \n }",
"void unsetTarget();",
"public void setChargerTarget() {\n if (getEnemies().size() > 0) {\n ArrayList<RobotReference> enemies = getEnemies();\n RobotReference closestEnemy = enemies.get(0);\n if (chargerTarget == null && teamTarget != null) {\n for (RobotReference enemy : enemies) {\n if (!enemy.isTeammate()) {\n if (Vector2d.getDistanceTo(closestEnemy.getLocation(), getLocation()) > Vector2d.getDistanceTo(enemy.getLocation(), getLocation()))\n closestEnemy = enemy;\n }\n }\n chargerTarget = closestEnemy;\n } else {\n chargerTarget = enemies.get(0);\n }\n }\n }",
"public abstract void attack(Vector2 spawnPos, Vector2 target);",
"private void UpdateBullets()\n\t {\n\t for(int i = 0; i < BulletList.size(); i++)\n\t {\n\t Bullet bullet = BulletList.get(i);\n\t \n\t // Move the bullet.\n\t bullet.Update();\n\t \n\t // checks if the bullet has it left the screen\n\t if(bullet.HasLeftScreen()){\n\t BulletList.remove(i);\n\t \n\t continue;\n\t }\n\t \n\t // checks if the bullet hit the enemy\n\t Rectangle BulletRectangle = new Rectangle((int)bullet.xCoord, (int)bullet.yCoord, bullet.BulletImage.getWidth(), bullet.BulletImage.getHeight());\n\t // Go trough all enemies.\n\t for(int j = 0; j < EnemyList.size(); j++)\n\t {\n\t Enemy eh = EnemyList.get(j);\n\n\t \n\t Rectangle EnemyRectangel = new Rectangle(eh.xCoord, eh.yCoord, eh.EnemyHelicopterImage.getWidth(), eh.EnemyHelicopterImage.getHeight());\n\n\t // Checks whether the the bullet has hit the enemy\n\t if(BulletRectangle.intersects(EnemyRectangel))\n\t {\n\t // Bullet hit the enemy so we reduce his health.\n\t eh.Health -= Bullet.DamagePower;\n\t \n\t // Bullet was also destroyed so we remove it.\n\t BulletList.remove(i);\n\t \n\t \n\t }\n\t }\n\t }\n\t }",
"@Override\n public boolean hasTarget() {\n if (targets.size < Rules.Player.SideKicks.HeatTurret.MAX_TARGETS) {\n return false;\n }\n for (int i = 0; i < targets.size; i++) {\n Enemy currentTarget = targets.get(i);\n if (currentTarget.isDead()) {\n targets.removeIndex(i);\n return true;\n }\n }\n return false;\n }",
"public void act() \n {\n if(foundAvatar())\n {\n int delta = getFun();\n timeRem.addTime(delta);\n getWorld().removeObject(this);\n // setLocation(Greenfoot.getRandomNumber(800), Greenfoot.getRandomNumber(600));\n }\n\n }",
"public void act() \r\n {\r\n if(timeInterval > 0) {\r\n timeInterval--;\r\n }else{\r\n if(currentSprite < 30) {\r\n currentSprite++;\r\n GreenfootImage img = new GreenfootImage(\"explosion_\" + currentSprite + \".png\");\r\n img.scale(img.getWidth() / 2 + 25, img.getHeight() / 2 + 25);\r\n setImage(img);\r\n timeInterval = timeIntervalDef;\r\n }else{\r\n getWorld().removeObject(this);\r\n }\r\n }\r\n }",
"public void toSelectingAttackTarget(INodeTargetEnemy targetMenu) {\n }",
"@Override\n\t\t\tpublic void attack(Base enemy) {\n\t\t\t}",
"private void checkForDeaths() {\n Iterator<Entity> entityIter = this.entities.iterator();\n\n //geht alle teilnehmer durch\n while ( entityIter.hasNext() ) {\n Entity entity = entityIter.next();\n\n //und entfernt sie wenn sie tot sind aus der liste und der engine\n if ( this.combatMapper.get(entity).curHealth <= 0 ) {\n entityIter.remove();\n\n //alle actions der entity entfernen, können ja nichts machen wenn sie tot sind\n Iterator<IAction> actionIter = this.actions.iterator();\n\n while ( actionIter.hasNext() ) {\n if ( actionIter.next().getOwner().equals(entity) ) {\n actionIter.remove();\n }\n }\n\n this.combatExp += this.combatMapper.get(entity).level * 5; //TODO\n\n EventSystem.getInstance().commitEvent(new Event(EventSystem.EventType.KILL_EVENT, entity));\n\n this.combatSystem.getEngine().removeEntity(entity);\n }\n }\n }",
"public void dies(){\n currentNode.deleteAnt(this);\n \n }",
"private void checkExplosionKill() {\n\t\t\n\t\texplosion.expand();\n\t\t\n\t\tfor (ArrayList<Invader> row : enemyArray) {\n\t\t\tfor (Invader a : row) {\n\t\t\t\tif (explosion.detectDownwardCollision(a.getX(), a.getY())) {\n\t\t\t\t\ta.setVisibility(false);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public void setDead(){\n\t\t//queue this blood for cleanup\n\t\tvisible = false;\n\t\tDEAD = true;\n\t\tcleanUp();\n\t}",
"@Override\r\n\tpublic void update() {\n\t\tAlly.update();\r\n\t\tEnemy.update();\r\n\t\tfor(int i = 0 ; i < GroundList.size();i++){\r\n\t\t\tif(GroundList.get(i).kill) {\r\n\t\t\t\tGroundList.remove(i);\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor(int i = 0; i < BarelList.size(); i++) {\r\n\t\t\tif(BarelList.get(i).kill) {\r\n\t\t\t\tBarelList.remove(i);\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor(int i = 0; i < WoodList.size(); i++) {\r\n\t\t\tif(WoodList.get(i).kill) {\r\n\t\t\t\tWoodList.remove(i);\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor(int i = 0; i < FireBallList.size(); i++) {\r\n\t\t\tif(FireBallList.get(i).kill) {\r\n\t\t\t\tFireBallList.remove(i);\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor(int i = 0; i < BulletList.size(); i++) {\r\n\t\t\tif(BulletList.get(i).kill) {\r\n\t\t\t\tBulletList.remove(i);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tfor(int i = 0 ; i < GroundList.size();i++){\r\n\t\t\tGroundList.get(i).update();\r\n\t\t}\r\n\t\tfor(int i = 0 ; i < BarelList.size(); i++) {\r\n\t\t\tBarelList.get(i).update();\r\n\t\t}\r\n\t\tfor(int i = 0; i < BulletList.size(); i++) {\r\n\t\t\tBulletList.get(i).update();\r\n\t\t}\r\n\t\tfor(int i = 0; i < FireBallList.size(); i++) {\r\n\t\t\tFireBallList.get(i).update();\r\n\t\t}\r\n\t\tfor(int i = 0; i < WoodList.size(); i++) {\r\n\t\t\tWoodList.get(i).update();\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\tif(GamePanel.updateTimes%60 == 0) {\r\n\t\t\tEnemy.PushEntity(2, new Vector2f(width*1/2, height/4),enemy);\r\n\t\t}\r\n\t\tfor(int i = 0; i < AllyDeadList.size(); i++) {\r\n\t\t\tAlly.entityList.remove(AllyDeadList.get(i)-i);\r\n\t\t}\r\n\t\tfor(int i = 0; i < EnemyDeadList.size(); i++) {\r\n\t\t\tEnemy.entityList.remove(EnemyDeadList.get(i)-i);\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\tAllyDeadList.clear();\r\n\t\tEnemyDeadList.clear();\r\n\t\tfor(int i = 0; i < Ally.entityList.size(); i++) {\r\n\t\t\tif(Ally.entityList.get(i).returnHealth() <= 0) {\r\n\t\t\t\tAllyDeadList.add(i);\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor(int i = 0; i < Enemy.entityList.size(); i++) {\r\n\t\t\tif(Enemy.entityList.get(i).returnHealth() <= 0) {\r\n\t\t\t\tEnemyDeadList.add(i);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"private void generateEnemies() {\n for(int i =0; i < currentEnemies.length; i++) {\n Attributes a = genAttributes();\n double[] healthSpeed = genHealthAndSpeed();\n LinkedList<Pathing> paths = map.getPathings();\n this.currentEnemies[i] = new Enemy(determineImage(a, healthSpeed[0]), healthSpeed[0], healthSpeed[1], 10+currentDifficulty/20, a, paths);\n }\n\n }",
"private static void checkForEnemies() throws GameActionException {\n //No need to hijack code for structure\n if (rc.isWeaponReady()) {\n // basicAttack(enemies);\n HQPriorityAttack(enemies, attackPriorities);\n }\n \n //Old splash damage code\n //Preserve because can use to improve current splash damage code\n //But not so simple like just checking directions, since there are many more \n //locations to consider hitting.\n /*if (numberOfTowers > 4) {\n //can do splash damage\n RobotInfo[] enemiesInSplashRange = rc.senseNearbyRobots(37, enemyTeam);\n if (enemiesInSplashRange.length > 0) {\n int[] enemiesInDir = new int[8];\n for (RobotInfo info: enemiesInSplashRange) {\n enemiesInDir[myLocation.directionTo(info.location).ordinal()]++;\n }\n int maxDirScore = 0;\n int maxIndex = 0;\n for (int i = 0; i < 8; i++) {\n if (enemiesInDir[i] >= maxDirScore) {\n maxDirScore = enemiesInDir[i];\n maxIndex = i;\n }\n }\n MapLocation attackLoc = myLocation.add(directions[maxIndex],5);\n if (rc.isWeaponReady() && rc.canAttackLocation(attackLoc)) {\n rc.attackLocation(attackLoc);\n }\n }\n }//*/\n \n }",
"public void run()\n {\n List<Entity> ms = new LinkedList<Entity>(monsters);\n for (Entity e : ms)\n if (e.isDead())\n monsters.remove(e);\n \n // Compare the current size with the previous size.\n if (monsters.size() < spawnThread.getPreviousSize() || spawnThread.getPreviousSize() == 0 || bossWave != null)\n {\n resetIdleTimer();\n return;\n }\n \n // Clear all player inventories, and \"kill\" all players.\n List<Player> ps = new LinkedList<Player>(arenaPlayers);\n for (Player p : ps)\n {\n MAUtils.clearInventory(p);\n MAUtils.tellPlayer(p, Msg.FORCE_END_IDLE);\n playerDeath(p);\n }\n }",
"private void collectDeadEnemyResources(Enemy enemy) {\n for (Item itemToTransfer : enemy.getInventory()) {\n playerInCombat.addToInventory(itemToTransfer);\n enemy.dropFromInventory(itemToTransfer);\n }\n playerInCombat.receiveXp(enemy.xp());\n }",
"@Override public void takeAction(Player[] players, Enemy[] enemies, char action)\n {\n \n if (action == 'a') //ATTACK!!!!\n {\n if(gun.isEmpty())\n { \n System.out.println(name+\"'s weapon is empty!\");\n gun.reload();\n }\n else\n {\n Enemy target = target(this, enemies, gun.getAccuracy());\n Attack(target);\n }\n } \n else if (action == 'd')//Hold this position!\n {\n this.defend();\n System.out.println(name+\" hunkers down!\");\n }\n else if (action == 'r')//Reloading! Cover me!\n {\n gun.reload();\n }\n else if (action == 'm')//Fall back! There's too many of them!\n {\n run();\n }\n else\n {\n System.out.println(\"Invalid command.\");\n }\n }",
"public void update(MazeEventEnemyWalkedKilled e) {\r\n }",
"private void deleteAttacks(){\n while(!attacksToDelete.isEmpty()){\n attacks.remove(attacksToDelete.remove());\n }\n }",
"public void gettingAttacked(HitByBulletEvent e) {\r\n\t\tif (gotTarget) {\r\n\t\t\tfor (int i = 0; i < enemyTracker.getEnemyList().size(); i++) {\r\n\t\t\t\tif (enemyTracker.getEnemyList().get(i).getName().equals(e.getName()) && (!e.getName().equals(radarTarget.getName()))) {\r\n\t\t\t\t\t\tmrRobot.sendMessage(5, \"2\");\r\n\t\t\t\t\t\tradarTarget = enemyTracker.getEnemyList().get(getIndexForEnemy(e.getName()));\r\n\t\t\t\t\t\ttargetTracking.get(getIndexForName(mrRobot.getName())).updateTarget(radarTarget);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"private void enemyAttack() {\n\t\t\n\t\tRandom rand = new Random();\t\n\t\t\n\t\tint roll = rand.nextInt(101);\n\t\t\n\t\tint sroll = rand.nextInt(101);\n\t\t\n\t\tevents.appendText(e.getName() + \" attacks!\\n\");\n\t\t\n\t\tif(roll <= p.getEV()) { // Player evades\n\t\t\t\n\t\t\tevents.appendText(\"You evaded \"+e.getName()+\"\\'s Attack!\\n\");\n\t\t\t\n\t\t}else if(roll > p.getEV()) { // Player is hit and dies if HP is 0 or less\n\t\t\t\n\t\t\tp.setHP(p.getHP() - e.getDMG());\n\t\t\t\n\t\t\tString newHp = p.getHP()+\"/\"+p.getMaxHP();\n\t\t\t\n\t\t\tString effect = e.getSpecial(); // Stats are afflicted\n\t\t\t\n\t\t\tif(sroll < 51){\n\t\t\t\t\n\t\t\tif(effect == \"Bleed\") { // Bleed Special\n\t\t\t\t\n\t\t\t\tp.setHP(p.getHP() - 100);\n\t\t\t\t\n\t\t\t\tevents.appendText(\"You bleed profusely. - 100 HP\\n\");\n\t\t\t\t\n\t\t\t\tnewHp = String.valueOf(p.getHP()+\"/\"+p.getMaxHP());\n\t\t\t}\n\t\t\tif(effect == \"Break\") { // Break Special \n\t\t\t\t\n\t\t\t\tif(p.getEV()-5>0)\n\t\t\t\t\tp.setEV(p.getEV() - 5);\n\t\t\t\telse\n\t\t\t\t\tp.setEV(0);\n\t\t\t\t\n\t\t\t\tevents.appendText(\"You feel a bone break restricting movement. - 5 EV\\n\");\n\t\t\t\t\n\t\t\t\tString newEV = String.valueOf(p.getEV());\n\t\t\t\t\n\t\t\t\tgev.setText(newEV);\n\t\t\t\t\n\t\t\t}\n\t\t\tif(effect == \"Fear\") { // Fear Special \n\t\t\t\t\n\t\t\t\tif(p.getDMG()-40>0)\n\t\t\t\t\tp.setDMG(p.getDMG() - 40);\n\t\t\t\telse\n\t\t\t\t\tp.setDMG(0);\n\t\t\t\t\n\t\t\t\tevents.appendText(\"A crippling fear rattles your resolve. - 40 DMG\\n\");\n\t\t\t\t\n\t\t\t\tString newDMG = String.valueOf(p.getDMG());\n\t\t\t\t\n\t\t\t\tgdmg.setText(newDMG);\n\t\t\t\t\n\t\t\t}\n\t\t\tif(effect == \"Rend\") { // Rend Special \n\t\t\t\t\n\t\t\t\tif(p.getDMG()-30>0)\n\t\t\t\t\tp.setDMG(p.getDMG() - 30);\n\t\t\t\telse\n\t\t\t\t\tp.setDMG(0);\n\t\t\t\t\n\t\t\t\tif(p.getEV()-5>0)\n\t\t\t\t\tp.setEV(p.getEV() - 5);\n\t\t\t\telse\n\t\t\t\t\tp.setEV(0);\n\t\t\t\t\n\t\t\t\tevents.appendText(\"Morthar unleashes a pillar of flame! - 30 DMG and - 5 EV\\n\");\n\t\t\t\t\n\t\t\t\tString newDMG = String.valueOf(p.getDMG());\n\t\t\t\t\n\t\t\t\tString newEV = String.valueOf(p.getEV());\n\t\t\t\t\n\t\t\t\tgdmg.setText(newDMG);\n\t\t\t\t\n\t\t\t\tgev.setText(newEV);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\t\n\t\t\tif(p.getHP() <= 0) {\n\t\t\t\t\n\t\t\t\tp.setDead(true);\n\t\t\t\t\n\t\t\t\tcurrentHp.setText(0+\"/\"+e.getMaxHP());\n\t\t\t\tplayerHPBar.setProgress((double)0);\n\t\t\t}else {\n\t\t\t\t\n\t\t\t\tcurrentHp.setText(newHp);\n\t\t\t\tplayerHPBar.setProgress((double)p.getHP()/p.getMaxHP());\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\tif(p.isDead()) { // Game over if player dies\n\t\t\t\n\t\t\ttry {\n\t\t\t\tLoadGO();\n\t\t\t} catch (IOException e1) {\n\t\t\t\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t\tcombat = false;\n\t\t}\n\t}",
"void update() {\n for (int i = 0; i < bullets.size(); i++) {//if any bullets expires remove it\n if (bullets.get(i).off) {\n bullets.remove(i);\n i--;\n }\n }\n move();//move everything\n checkPositions();//check if anything has been shot or hit\n }",
"private void fadeOutandDetachSprites() {\n\t\t\t\t\tdetachChild(greenTick);\t\n\t\t\t\t\tdetachChild(redx);\n\t\t\t\t\tdetachChild(sprite1);\n\t\t\t\t\tdetachChild(sprite2);\n\t\t\t\t\tdetachChild(sprite3);\n\t\t\t\t\tdetachChild(sprite4);\n\n\t\t\t\t}",
"private void moveEnemies(){\n \t\tdouble dirX = 0;\n\t\tdouble dirY = 0;\n \t\tdouble length = 99999;\n \t\tint speed = 2;\n\n\t\tfor(int i=0;i<enemy_num;i++){\n\t\t\tdirX = players[enemy[i][2]][1] - enemy[i][0];\n\t\t\tdirY = players[enemy[i][2]][2] - enemy[i][1];\n\t\t\tlength = Math.sqrt(dirX*dirX + dirY*dirY);\n\t\t\tdirX /= length;\n\t\t\tdirY /= length;\n\t\t\tdirX *= speed;\n\t\t\tdirY *= speed;\n\t\t\tenemy[i][0] += dirX;\n\t\t\tenemy[i][1] += dirY;\n\t\t\n\t\t}\n\t\n\t}",
"public void removePawn() {\n lives = 0;\n }",
"private void createEnemy()\n {\n scorpion = new Enemy(\"Giant Scorpion\", 5, 10); \n rusch = new Enemy(\"Mr. Rusch\", 10, 1000);\n skeleton = new Enemy(\"Skeleton\", 10, 50);\n zombie = new Enemy(\"Zombie\", 12, 25);\n ghoul = new Enemy(\"Ghoul\", 15, 45);\n ghost = new Enemy(\"Ghost\", 400, 100);\n cthulu = new Enemy(\"Cthulu\", 10000000, 999999);\n concierge = new Enemy(\"Concierge\", 6, 100);\n wookie = new Enemy(\"Savage Wookie\", 100, 300);\n }",
"public void bossReset(){\n bossTimer.start();\n this.getView().setTranslateX(x);\n this.getView().setTranslateY(y);\n this.getView().setRotate(0);\n bossTimer.start();\n setHitPoints(getDefaultHp());\n }",
"public static void playerEffectivelyEndsBattlePhase() {\r\n for (int index = 1; index <= 5; index++){\r\n SummonedMonster MonsterCPU = SummonedMonster.getNthSummonedMonster(index, false);\r\n if (MonsterCPU.isExisting) {\r\n MonsterCPU.canStillAttackThisTurn = false;\r\n }\r\n }\r\n endAttack(false);\r\n }",
"private void subtractEnemySheild(int damage) {\n this.enemyShield -= damage;\n }"
] | [
"0.73517257",
"0.6985404",
"0.6865439",
"0.68192434",
"0.6816871",
"0.6756048",
"0.66879284",
"0.6629752",
"0.65923405",
"0.6533172",
"0.6461461",
"0.6456066",
"0.6453808",
"0.6397052",
"0.63961446",
"0.63611877",
"0.6345435",
"0.63221425",
"0.63197565",
"0.63109505",
"0.63004017",
"0.6296717",
"0.62881744",
"0.6283341",
"0.6282247",
"0.62566924",
"0.6254144",
"0.6251059",
"0.62510586",
"0.6241971",
"0.62340826",
"0.6209284",
"0.62023973",
"0.6201868",
"0.6157173",
"0.6145284",
"0.6144647",
"0.61363244",
"0.61274403",
"0.61093426",
"0.61050147",
"0.6095936",
"0.6091097",
"0.60793275",
"0.60707426",
"0.606693",
"0.605203",
"0.6023125",
"0.6004315",
"0.5997042",
"0.5993841",
"0.59926933",
"0.5986798",
"0.59737325",
"0.5967144",
"0.5960554",
"0.5960339",
"0.5960329",
"0.59500414",
"0.5946471",
"0.5935331",
"0.5934952",
"0.5915269",
"0.5898036",
"0.58859575",
"0.5871636",
"0.58664864",
"0.5857671",
"0.5844242",
"0.5838038",
"0.5834006",
"0.5831816",
"0.58222336",
"0.5816034",
"0.5811344",
"0.58055097",
"0.57978195",
"0.57818854",
"0.57772154",
"0.5774772",
"0.57719654",
"0.5771866",
"0.5770307",
"0.5769021",
"0.57686543",
"0.57634985",
"0.5762094",
"0.57619864",
"0.5756273",
"0.5756103",
"0.5754851",
"0.5751474",
"0.57491714",
"0.57482225",
"0.5747878",
"0.57433724",
"0.57433045",
"0.5736617",
"0.5727404",
"0.5727266"
] | 0.7918217 | 0 |
Update view with new data from MovieModel | @Override
public void update(Observable o, Object arg) {
// DESIGN PATTERN: command
movieListView.setListView((ObservableList<Movie>) arg);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void updateViewFromModel();",
"void updateModelFromView();",
"public void update()\n\t{\n\t\t//update the view's list of movies...\n\t\tthis.getRemoveButton().setEnabled((this.database.getNumberOfMovies()>0));\n\t\tthis.movieList.setListData(this.database.toList());\n\t}",
"@GetMapping(\"/updateMovie/{id}\") // This is Movie ID\n public String updateMovie(@PathVariable(\"id\") long id, Model model)\n {\n Movie m = movieRepo.findOne(id);\n model.addAttribute(\"newMovie\", m);\n return \"movieForm\";\n }",
"public void update() {\n\n dbWork.cleanAll();\n\n List<DataFromServiceKudaGo> list = requestDataFromService();\n\n List<Film> films = new ArrayList<>();\n for (DataFromServiceKudaGo data : list) {\n Film film = new Film(list.indexOf(data), data.getNameMovie(), data.getPosterMoviePath(),\n data.getRunning_time(), data.getPrice(), data.getImax(),\n data.getCountryFilm(), data.getYearFilm(), data.getTrailerFilm(),\n data.getAgeFilm(), data.getDirectorFilm(), data.getNameCinema(),\n data.getAddressCinema(), data.getPhone(), data.getStationAboutCinema(),\n data.getPosterCinemaPath(), data.getBeginning_time(), data.getDescription());\n films.add(film);\n }\n\n dbWork.setFilms(films);\n\n fillShows();\n }",
"public void updateData(List<Movie> movies) {\n mMovies = movies;\n notifyDataSetChanged();\n }",
"@GetMapping(\"/movieForm/{id}\") // This is Director ID\n public String addMovies(@PathVariable(\"id\") long id, Model model) {\n\n Director d = directorRepo.findOne(id);\n model.addAttribute(\"newDirector\", d);\n Movie m = new Movie();\n m.setDirector(d);\n model.addAttribute(\"newMovie\", m);\n// movieRepo.save(m); // save only director_id here, all other movie fields: nulls\n return \"movieForm\";\n }",
"private void updateReviews(){\r\n FetchReviewsTask reviewsTask = new FetchReviewsTask();\r\n reviewsTask.execute(MovieId);\r\n }",
"private void updateVideo() {\n ArrayList<String> movieVideoArrayList = new ArrayList<String>();\n videoRecyclerView = findViewById(R.id.trailer_recycler_view);\n videoRecyclerView.setLayoutManager(new GridLayoutManager(this, 4));\n movieVideoAdapter = new MovieVideoAdapter(movieVideoArrayList, MovieDetailActivity.this);\n videoRecyclerView.setAdapter(movieVideoAdapter);\n }",
"private void updateView(ArrayList<MovieDetails> movieData){\n movieDetailsAdapter = new MovieDetailsAdapter(this, movieData);\n //Get a reference to the gridView and attach the adapter to it\n GridView mGridView = (GridView) findViewById(R.id.movies_grid);\n mGridView.setAdapter(movieDetailsAdapter);\n //Set a OnItemClickListener for the GridView attached to the Adapter\n mGridView.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {\n //Get the MovieDetails Object and pass it to the new activity as parcelable object\n MovieDetails movieDetails = movieDetailsAdapter.getItem(i);\n Intent intent = new Intent(MainActivity.this,MovieDetailActivity.class);\n intent.putExtra(\"movieDetails\",movieDetails);\n startActivity(intent);\n }\n });\n }",
"public static void updateMovie(Context context, MyMovie M) {\n\n String sqlStr = \"\";\n MovieSqlHelper movieDB = new MovieSqlHelper(context);\n ContentValues values = new ContentValues();\n\n values.put(DBConstants.SUBJECT_C, M.getSubject());\n values.put(DBConstants.BODY_C, M.getBody());\n values.put(DBConstants.IMAGE_URL_C, M.getImageUrl());\n\n if (AppConstants.saveImageLocaly)\n {\n values.put(DBConstants.MOVIE_IMAGE_C, M.getImageString64());\n }\n\n if ( M.getId() == AppConstants.EMPTY_ID || M.getId() == AppConstants.WEB_ID )\n {\n // New movie - do call insert instead of update\n Log.d(\"\",\"new movie: \" + M.getSubject());\n movieDB.getWritableDatabase().insert(DBConstants.MOVIES_T,null,values);\n\n } else\n {\n // Existing movie - call an update\n Log.d (\"-updateMovie\",\"id : \" + M.getId());\n movieDB.getWritableDatabase().update(DBConstants.MOVIES_T,values,DBConstants.ID_C+\"=?\",new String[]{\"\"+M.getId()});\n\n }\n\n // TODO verify successful completion\n movieDB.close();\n\n }",
"@PostMapping(\"/movieForm\")\n public String resultMovies(@ModelAttribute(\"newMovie\") Movie movie, Model model){\n\n movieRepo.save(movie);\n System.out.println(movie.getDirector().getId());\n// System.out.println(movie.getDirector().getName());\n\n model.addAttribute(\"newMovie\", movie);\n\n// String directorName = movie.getDirector().getName();\n// model.addAttribute(\"directorname\", directorName);\n\n long dirId = movie.getDirector().getId();\n Director d = directorRepo.findOne(dirId);\n model.addAttribute(\"directorname\", d.getName());\n System.out.println(d.getName());\n\n return \"resultMovie\";\n }",
"@Override\r\n\tpublic void updateFilm(Film film) {\n\r\n\t}",
"private void updateReviews() {\n ArrayList<MovieReview> movieReviewArrayList = new ArrayList<>();\n reviewRecyclerView = findViewById(R.id.reviews_recycler_view);\n reviewRecyclerView.setLayoutManager(new LinearLayoutManager(this));\n movieReviewAdapter = new MovieReviewAdapter(movieReviewArrayList, MovieDetailActivity.this);\n reviewRecyclerView.setAdapter(movieVideoAdapter);\n }",
"@Override\r\n public void update(int index, Movie object, String value) {\n \tobject.setName(value);\r\n \tmovieTable.redraw();\r\n }",
"private void updateMovieData() {\n fetchMoviesDataTask = new FetchMoviesDataTask(this);\n fetchMoviesDataTask.execute(sortOrder);//get short method param using DefaultSharedPrefs\n }",
"public void setMovie(Movie movie) {\n this.movie = movie;\n }",
"public void movieRequestCompleted(MovieModel model){\n //convert movie model to movie item data\n mMovieStaff.prepareMovieItem(model, mMovie);\n\n //show movie item data\n showMovieInfo(mMovie);\n }",
"@Override\r\n\tpublic void updateView(List<Pays> models) {\n\t}",
"static public void set_movie_data(){\n\n\t\tEdit_row_window.attrs = new String[]{\"movie name:\", \"rating:\", \"release year:\"};\n\t\tEdit_row_window.attr_vals = new String[]\n\t\t\t\t{Edit_row_window.selected[0].getText(1), Edit_row_window.selected[0].getText(2), \n\t\t\t\tEdit_row_window.selected[0].getText(3)};\n\t\t\n\t\tEdit_row_window.linked_query =\t\" select distinct a.id, a.name, a.num_links, a.year_born \" +\n\t\t\t\t\t\t\t\t\t\t\t\" from curr_cinema_actors a, \" +\n\t\t\t\t\t\t\t\t\t\t\t\" curr_cinema_actor_movie am\" +\n\t\t\t\t\t\t\t\t\t\t\t\" where am.actor_id=a.id and am.movie_id=\"+Edit_row_window.id+\n\t\t\t\t\t\t\t\t\t\t\t\" order by num_links desc \";\n\t\t\n\t\t\n\t\tEdit_row_window.not_linked_query = \" select distinct a.id, a.name, a.num_links, a.year_born \" +\n\t\t\t\t\" from curr_cinema_actors a \";\n\t\t\n\t\tEdit_row_window.linked_attrs = new String[]{\"id\", \"actor name\", \"rating\", \"birth year\"};\n\t\tEdit_row_window.label_min_parameter=\"min. birth year:\";\n\t\tEdit_row_window.linked_category_name = \"ACTORS\";\n\t}",
"public ResponseEntity<Movie> updateMovie(Long id, Movie movieToUpdate) {\n if (movieRepository.existsById(id)) {\n if (id == movieToUpdate.getId()) {\n Movie movie = movieRepository.findById(id).get();\n\n if (movieToUpdate.getTitle() != null)\n movie.setTitle(movieToUpdate.getTitle());\n\n if (movieToUpdate.getDirector() != null)\n movie.setDirector(movieToUpdate.getDirector());\n\n if (movieToUpdate.getPicture() != null)\n movie.setPicture(movieToUpdate.getPicture());\n\n if (movieToUpdate.getFranchise() != null){\n Franchise franchise = movieToUpdate.getFranchise();\n if (franchiseRepository.existsById(franchise.getId()))\n movie.setFranchise(franchise);\n else\n return new ResponseEntity<>(null, HttpStatus.NOT_FOUND);\n }\n\n if (movieToUpdate.getGenre() != null)\n movie.setGenre(movieToUpdate.getGenre());\n\n if (movieToUpdate.getReleaseYear() != 0)\n movie.setReleaseYear(movieToUpdate.getReleaseYear());\n\n if (movieToUpdate.getTrailer() != null)\n movie.setTrailer(movieToUpdate.getTrailer());\n\n if (movieToUpdate.getCharacters() != null) {\n List<Character> characters = movieToUpdate.getCharacters();\n List<Character> newCharacters = new ArrayList<>();\n for (Character character : characters) {\n if (characterRepository.existsById(character.getId()))\n newCharacters.add(character);\n else\n return new ResponseEntity<>(null, HttpStatus.NOT_FOUND);\n }\n movie.setCharacters(newCharacters);\n }\n movieRepository.save(movie);\n return new ResponseEntity<>(movie,HttpStatus.OK);\n }\n return new ResponseEntity<>(null, HttpStatus.BAD_REQUEST);\n }\n return new ResponseEntity<>(null, HttpStatus.NO_CONTENT);\n }",
"@RequestMapping(path = \"updateFilm.do\", method = RequestMethod.POST)\n\tpublic ModelAndView updateFilm(@ModelAttribute(\"film\") Film film) {\n\t\tModelAndView mv = new ModelAndView();\n\t\tdao.saveFilm(film);\n\t\tmv.addObject(\"created\", true);\n\t\tmv.addObject(\"film\", dao.newFindFilmById(film.getId()));\n\t\tmv.setViewName(\"WEB-INF/search.jsp\");\n\t\treturn mv;\n\t}",
"@GetMapping(\"/movieDetails/{id}\")\n public String showMovieDetails(@PathVariable(\"id\") long id, Model model) {\n\n Movie m = movieRepo.findOne(id);\n\n model.addAttribute(\"movie\", m);\n // model.addAttribute(\"directorname\", directorName);\n\n return \"movieDetails\";\n }",
"public void update(DVDCollection model, int selectedDVD) {\n ArrayList<DVD> theList = model.getDvds();\n tList.setItems(FXCollections.observableArrayList(theList));\n\n DVD d = tList.getSelectionModel().getSelectedItem();\n if (d != null) {\n tField.setText(d.getTitle());\n yField.setText(\"\"+d.getYear());\n lField.setText(\"\"+d.getDuration());\n }\n else {\n tField.setText(\"\");\n yField.setText(\"\");\n lField.setText(\"\");\n }\n tList.getSelectionModel().select(selectedDVD);\n }",
"public Boolean updateMovieDetails(String title, int year, String director, String actors, int rating, String review, int fav){\n SQLiteDatabase DB = this.getWritableDatabase();\n ContentValues cv = new ContentValues();\n\n cv.put(\"title\", title);\n cv.put(\"year\", year);\n cv.put(\"director\", director);\n cv.put(\"actors\", actors);\n cv.put(\"rating\", rating);\n cv.put(\"review\", review);\n cv.put(\"fav\", fav);\n\n DB.update(\"MovieDetails\", cv, \"title=?\", new String[]{title});\n return true;\n }",
"void setMovieId(int movieID) {\n this.movieID = movieID;\n }",
"@Override\r\n public void update(int index, Movie object, String value) {\n \tobject.setPlace(value);\r\n \tmovieTable.redraw();\r\n }",
"public MovieDetails editMovieFlexEntry(MovieDetails md);",
"@Override\n\tpublic void updateMovie(Movie movie) {\n\t\tString sql=\"Update movie set MOVIE_ID=?,MOVIE_NAME=?,LANGUAGE=?,GENERE=?,TYPE=?,DURATION=?\";\n\t\tObject[] params={movie.getMovieId(),movie.getMovieName(),movie.getLanguage(),movie.getGenere(),movie.getType(),movie.getDuration()};\n\t\tint[] types={Types.INTEGER,Types.VARCHAR,Types.VARCHAR,Types.VARCHAR,Types.VARCHAR,Types.INTEGER};\n\t\tJdbcTemplate jdbcTemplate=JdbcTemplateFactory.getJdbcTemplate();\n\t\tjdbcTemplate.update(sql, params, types);\n\t}",
"public void showMovieInfo(MovieItem movie){\n //get houseKeeper in charge of displaying movie item info\n DetailKeeper keeper = (DetailKeeper)mKeeperStaff.getHouseKeeper(DetailHelper.NAME_ID);\n //update View with movie item data\n keeper.updateDetails(movie);\n }",
"private void ObserveAnyChange(){\n movieListViewModel.getMovies().observe(getViewLifecycleOwner(), new Observer<List<MovieModel>>() {\n @Override\n public void onChanged(List<MovieModel> movieModels) {\n\n if (movieModels != null){\n for (MovieModel movieModel: movieModels){\n // get data in Log\n Log.v(TAG, \" onChanged: \"+ movieModel.getTitle());\n movieRecyclerAdapter.setmMovieModels(movieModels);\n }\n }\n\n }\n });\n }",
"public void editMovie(int id, Movie movie)\n {\n // Since SQLite does not support Booleans, an Integer is used with 0 as false and 1 as true\n int favorite = 0;\n\n if (movie.isFavorite())\n\n favorite = 1;\n\n /* the execSQL Method simply executes this query on the Database, in this Query REPLACE INTO\n * replaces a Row in the table based on the movieId value specified\n */\n this.getWritableDatabase().execSQL(\n \"REPLACE INTO \" + TABLE_NAME +\n \" (movieId, title, year, director, actor_actress, rating, review, favorite)\" +\n \" Values(\" + id + \", '\" + movie.getTitle() + \"', '\" + movie.getYear() + \"', '\" + movie.getDirector() +\n \"', '\" + movie.getActorActress() + \"', \" + movie.getRating() + \", '\" + movie.getReview() +\n \"', \" + favorite + \")\");\n }",
"void updateView();",
"void updateView();",
"@Override\r\n public void update(int index, Movie object, String value) {\n \tobject.setDescription(value);\r\n \tmovieTable.redraw();\r\n }",
"@Override\n public void Update(Model model) {\n\n }",
"public void updateView() {\n// LocalDate startDate = LocalDate.of(2017, Month.SEPTEMBER, 1);\n// LocalDate endDate = LocalDate.of(2017, Month.SEPTEMBER, 6);\n// getRecords(startDate, endDate);\n }",
"private void setMovie() {\n Movie movie = getIntent().getExtras().getParcelable(MOVIE);\n Glide.with(mMoviePoster).setDefaultRequestOptions(new RequestOptions().diskCacheStrategy(DiskCacheStrategy.ALL)).load(BuildConfig.IMG_DIR + movie.getPosterPath())\n .into(mMoviePoster);\n setTitle(movie.getTitle());\n mMovieTitle.setText(movie.getTitle());\n mMovieRating.setText(String.valueOf(movie.getVoteAverage()));\n mMovieDate.setText(movie.getReleaseDate());\n mMovieGenre.setText(movie.isAdult() ? getString(R.string.genre_type_adults) : getString(R.string.genre_type_all));\n mMovieDesc.setText(movie.getOverview());\n }",
"@Override\r\n public void update(int index, Movie object, String value) {\n \tif (!value.matches(\"^[0-9]*$\")){\r\n \t\ttimeCell.clearViewData(selectionModel.getSelectedObject()); \r\n \t\tmovieProvider.refresh();\r\n \t\tmovieTable.redraw(); \r\n \t Window.alert(value + \" ist keine gueltige eingabe. Bitte eine positive Zahl eingeben!\");\r\n \t\t}\r\n \telse {\r\n \t\tobject.setTime(Integer.valueOf(value));\r\n \t\t\tmovieTable.redraw();\r\n \t\t\t}\r\n \t}",
"private void updateView() {\n model.inlezenHighscore();\n for (int i = 0; i < 10; i++) {\n view.getNaamLabels(i).setText(model.getNaam(i));\n view.getScoreLabels(i).setText(model.getScores(i));\n }\n }",
"public int update(MovieUrl movieUrl){\n ContentValues initialValues = new ContentValues();\n initialValues.put(DbMediaContract.VideoColumns.TITLE_VIDEO, movieUrl.getTitleMovie());\n initialValues.put(DbMediaContract.VideoColumns.URL_VIDEO, movieUrl.getUrlMovie());\n return database.update(DATABASE_TABLE, initialValues, _ID + \"= '\" + movieUrl.getId() + \"'\", null);\n }",
"public interface MainView extends BaseView{\n\n void addMoreMoviesToTheList(List<MovieInfoModel> movieInfoModelList);\n void showMovieList(List<MovieInfoModel> movieInfoModelList);\n void resetPageNumberToDefault();\n void showNoMovieInfo();\n\n}",
"public void updateUI(Movie[] movies) {\n\n if (movies.length == 0) {\n noFavsSavedTV.setVisibility(View.VISIBLE);\n } else {\n noFavsSavedTV.setVisibility(View.GONE);\n }\n\n mTileAdapter.setMovieData(movies);\n }",
"public void edit(ArrayList<Movie> movies)\n {\n String deleteMovie = \"\";\n String newact1 = \"\";\n String newact2 = \"\";\n String newact3 = \"\";\n int newrating = 0; \n String title = \"\";\n int movieIndex = 0; \n ArrayList<Movie> result = new ArrayList<Movie>();\n \n title = insertTitle();\n result = checkExistence(movies, title);\n boolean value = displayExistanceResult(result, title);\n \n if (value == false)\n return;\n \n int options = insertNumberOption(result, \"modify\");\n \n options = options - 1;\n String head = result.get(options).getTitle();\n String director = result.get(options).getDirector();\n String actor1 = result.get(options).getActor1();\n String actor2 = result.get(options).getActor2(); \n String actor3 = result.get(options).getActor3();\n int rating = result.get(options).getRating();\n \n newact1 = actor1;\n newact2 = actor2;\n newact3 = actor3;\n newrating = rating; \n \n int ans = insertEditMenuAnswer();\n \n if (ans == 1)\n {\n newact1 = insertActor(1);\n newact2 = insertActor(2);\n \n if (newact2.length() != 0)\n {\n newact3 = insertActor(3);\n \n if (newact3.length() == 0)\n newact3 = actor3;\n }\n else \n if (newact2.length() == 0)\n newact2 = actor2;\n }\n else \n if (ans == 2)\n newrating = insertRating();\n else\n if (ans == 3)\n {\n newact1 = insertActor(1);\n newact2 = insertActor(2);\n \n if (newact2.length() != 0)\n {\n newact3 = insertActor(3);\n \n if (newact3.length() == 0)\n newact3 = actor3;\n }\n else \n if (newact2.length() == 0)\n newact2 = actor2; \n newrating = insertRating();\n }\n else\n if (ans == 4)\n return;\n \n actor1 = newact1;\n actor2 = newact2;\n actor3 = newact3;\n rating = newrating;\n \n for (Movie film : movies)\n {\n String titles = film.getTitle();\n \n if (head.equalsIgnoreCase(titles))\n break;\n \n movieIndex = movieIndex + 1;\n }\n \n Movie film = new Movie(head,director,actor1,actor2,actor3,rating);\n movies.set(movieIndex, film);\n \n System.out.println(\"\\n\\t\\t >>>>> As you want, \" + head.toUpperCase() + \" has been UPDATED! <<<<<\");\n displayOneFilm(film);\n }",
"private void setupViewModel() {\n mDb = AppDatabase.getsInstance(getApplicationContext());\n ShowFavoritesViewModel viewModel = ViewModelProviders\n .of(this)\n .get(ShowFavoritesViewModel.class);\n\n viewModel.getFavorites()\n .observe(this, new android.arch.lifecycle.Observer<List<Movie>>() {\n @Override\n public void onChanged(@Nullable final List<Movie> favoritesEntries) {\n Log.d(TAG, \"Updating list of favorites from LiveData in ViewModel: \" + favoritesEntries);\n // Lesson 12.13 4:29 This needs to be run on the UI thread\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n mMovieAdapter.setMovieData((ArrayList<Movie>)favoritesEntries);\n }\n });\n }\n });\n }",
"@Override\n\tpublic void updateFilm(com.dutproject.cinemaproject.model.bean.Film film) throws SQLException {\n\t\t\n\t}",
"public interface IMovieReviewView extends BaseView{\n void setReviewData(Review reviewData);\n}",
"@POST\n public JsonMovie createUpdateOne(JsonMovie movie) {\n \tJsonMovie jmovie = movie;\n \tif (movie.getId() == null) {\n \t\tMovie m = new Movie();\n \t\tm.setTitle(movie.getTitle());\n \t\tm.setDescription(movie.getDescription());\n \t\tm.setReleasedate(movie.getReleaseDate());\n \t\tm.setLength(movie.getLength());\n \t\tm.setIscollector(movie.getIsCollector());\n \t\tm.setSupportBean(supportDAO.getSupport(movie.getSupportId()));\n \t\tm.setStorygenre(storygenreDAO.getStorygenre(movie.getGenreId()));\n \t\tmovieDao.saveMovie(m);\n\t \tjmovie.setId(m.getId());\n \t} else {\n \tMovie m = movieDao.getMovie(movie.getId());\n \t\tm.setTitle(movie.getTitle());\n \t\tm.setDescription(movie.getDescription());\n \t\tm.setReleasedate(movie.getReleaseDate());\n \t\tm.setLength(movie.getLength());\n \t\tm.setIscollector(movie.getIsCollector());\n \t\tm.setSupportBean(supportDAO.getSupport(movie.getSupportId()));\n \t\tm.setStorygenre(storygenreDAO.getStorygenre(movie.getGenreId()));\n \t\tmovieDao.updateMovie(m);\n \t}\n \treturn jmovie;\n }",
"public void updateView() {\n if (mData.isEmpty()) {\n Logger.d(TAG, \"The mData is empty\");\n return;\n }\n Set<View> viewSet = mData.keySet(); // keySet() returns [] if map is\n // empty\n Iterator<View> viewIterator = viewSet.iterator();\n if (viewIterator == null) {\n Logger.d(TAG, \"The viewIterator is null\");\n return;\n }\n while (viewIterator.hasNext()) {\n View view = viewIterator.next();\n if (view == null) {\n Logger.d(TAG, \"The view is null\");\n } else {\n Object obj = mData.get(view);\n if (obj == null) {\n Logger.d(TAG, \"The value is null\");\n } else {\n if (obj instanceof ChatsStruct) {\n ChatsStruct chatStruct = (ChatsStruct) obj;\n updateChats(view, chatStruct);\n } else if (obj instanceof InvitationStruct) {\n InvitationStruct inviteStruct = (InvitationStruct) obj;\n updateInvitations(view, inviteStruct);\n } else {\n Logger.d(TAG, \"Unknown view type\");\n }\n }\n }\n }\n }",
"private void addDataToRv() {\n RealmResults<NewsModel> newsModels = realm.where(NewsModel.class).findAll();\n //initialize our adapter\n adapter = new NewsAdapter(new ArrayList<>(newsModels), this);\n mRvNewsList.setLayoutManager(new LinearLayoutManager(this));\n mRvNewsList.setAdapter(adapter);\n //notify the adapter that we have new data\n adapter.notifyDataSetChanged();\n }",
"void updateModel() {\n updateModel(false);\n }",
"@Override\r\n\tpublic boolean updateFilm(Film film) {\n\t\treturn false;\r\n\t}",
"public void updateBook(View view){\n update();\n }",
"@Override\n public void getMovieContentData() {\n Cursor movieCursor = queryMovieData();\n\n ArrayList<MovieData> movieData = new ArrayList<>();\n\n if(movieCursor != null) {\n //do stuff\n while(movieCursor.moveToNext()) {\n MovieData movie = new MovieData();\n movie.setName(movieCursor.getString(movieCursor.getColumnIndex(MovieUriContract.MovieEntry.COLUMN_NAME)));\n movie.setDate(movieCursor.getString(movieCursor.getColumnIndex(MovieUriContract.MovieEntry.COLUMN_RELEASE_DATE)));\n movie.setGenreId(movieCursor.getInt(movieCursor.getColumnIndex(MovieUriContract.MovieEntry.COLUMN_GENRE)));\n }\n movieCursor.close();\n }\n\n //query genre data next, using the GenreId in Movie Data\n for (MovieData movie : movieData) {\n Cursor genreCursor = queryGenreData(movie.getGenreId());\n\n if(genreCursor != null) {\n //do stuff\n if (genreCursor.moveToFirst()) {\n movie.setGenre(movieCursor.getString(movieCursor.getColumnIndex(MovieUriContract.GenreEntry.COLUMN_NAME)));\n }\n genreCursor.close();\n }\n }\n\n view.updateMovieDataView(movieData);\n }",
"@Override\r\n\tpublic int updateFilm(Film film) {\n\t\treturn 0;\r\n\t}",
"public interface MovieDetailView extends MvpView {\n void bindCastMembers(CreditsResponse movieResponse);\n\n void bindMovieDetails(MovieDetails movieResponse);\n\n void bindRecommendations(MovieResponse movieResponse);\n}",
"@Override\r\n\tpublic String update() {\n\t\tSystem.out.println(\"updateView.\");\r\n\t\t\r\n\t\t//javax.servlet.http.HttpSession session=request.getSession();\r\n\t\t//javax.servlet.ServletContext application=request.getServletContext();\r\n\t\t\r\n\t\t//String vId=request.getParameter(\"id\");\r\n\t\tif(!SysFun.isNullOrEmpty(id)) {\r\n\t\t\tLong iId=SysFun.parseLong(id);\r\n\t\t\tHeadLine bean=headLineService.load(iId);\r\n\t\t\t\r\n\t\t\tif(bean!=null) {\r\n\t\t\t\t\r\n\t\t\t\trequest.put(\"Id\", bean.getId());\r\n\t\t\t\trequest.put(\"lineName\", bean.getLineName());\r\n\t\t\t\trequest.put(\"lineLink\", bean.getLineLink());\r\n\t\t\t\t//request.put(\"lineImg\", bean.getLineImg());\r\n\t\t\t\treturn \"update\";\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\treturn \"go_preload\";\r\n\t}",
"@Override\r\n\tpublic int updateByPrimaryKey(Movie record) {\n\t\treturn this.movieMapper.updateByPrimaryKey(record);\r\n\t}",
"@Override\n\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\tif (model == null){\n\t\t\t\treturn;\n\t\t\t\t//if model is empty, its useless\n\t\t\t}\n\t\t\tString series = (String) episodeView.selectSeries.getSelectedItem();\n\t\t\tString title= episodeView.titleBox.getText();\n\t\t\tString startYear= episodeView.yearBox.getText();\n\t\t\tString seasonNum = episodeView.seasonBox.getText();\n\t\t\tString episodeNum = episodeView.episodeBox.getText();\n\t\t\tboolean suspended = episodeView.isSuspended;\n\t\t\t\n\t\t\tMediaCollection episodes = model.getEpisodes();\n\t\t\tArrayList<Media> episodesList = episodes.getMedia();\n\t\t\tArrayList<String> episodesTitles = new ArrayList<String>();\n\t\t\t\n\t\t\tfor(int index = 0; index < episodesList.size(); ++index){\n\t\t\t\tString temp = episodesList.get(index).getEpisodeTitle();\n\t\t\t\tepisodesTitles.add(temp);\n\t\t\t}\n\t\t\t\n\t\t\tif(episodesTitles.contains(title)){\n\t\t\t\t//Ep is already there\n\t\t\t\t\n\t\t\t\tObject[] options= {\"Cancel\", \"Replace\"};\n\t\t\t\tint answer= JOptionPane.showOptionDialog(null, \"Please choose one\", \"\",\n\t\t\t\t\t\tJOptionPane.DEFAULT_OPTION, JOptionPane.CANCEL_OPTION, null, options, options[0]);\n\t\t\t\t\n\t\t\t\tint response=answer;\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif(response==0){\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse if (response==1){\n\t\t\t\t\t//Call mutator\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t//COULD BE AN ERROR CHECK THIS\n\t\t\t\t\tint releaseYear = Integer.getInteger(startYear);\n\t\t\t\t\tEpisodes newEpisodes= new Episodes(series, title, releaseYear);\n\t\t\t\t\tmodel.addEpisode(newEpisodes);\n\t\t\t\t\t//model.replaceSeries(newSeries);\n\t\t\t\t\t//error bc it hasnt been created yet, do we\n\t\t\t\t\t//even want this?\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t//TODO: error case\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\telse{\n\t\t\t\t//episode not in collection\n\t\t\t\tint releaseYear = Integer.decode(startYear);\n\t\t\t\tEpisodes newEpisode= new Episodes(series, title, releaseYear);\n\t\t\t\tmodel.addEpisode(newEpisode);\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.print(model.getEpisodes().getMedia().toString());\n\t\t\tepisodeView.frame.dispose();\n\t\t}",
"public void setPage(View view){\n\n HashMap movie = movieDataJson.getItem(0);\n\n String movieName = (String)movie.get(\"name\");\n String movieStars = (String)movie.get(\"stars\");\n String movieYear = (String)movie.get(\"year\");\n String movieDescription = (String)movie.get(\"description\");\n movieDescrip = movieDescription;\n String movieDirector = (String)movie.get(\"director\");\n String movieLength = (String)movie.get(\"length\");\n double movieRating = (double)movie.get(\"rating\");\n\n\n movieNameTV = (TextView)view.findViewById(R.id.movieName);\n movieStarsIV = (TextView)view.findViewById(R.id.stars);\n movieYearIV = (TextView)view.findViewById(R.id.year);\n movieDescriptionIV = (TextView)view.findViewById((R.id.description));\n movieDirectorIV = (TextView)view.findViewById(R.id.director);\n movieLengthIV = (TextView)view.findViewById(R.id.length);\n movieRatingIV = (TextView)view.findViewById(R.id.rating);\n movieRatingBar = (RatingBar)view.findViewById(R.id.ratingBar);\n\n movieNameTV.setText(movieName);\n movieStarsIV.setText(movieStars);\n movieDescriptionIV.setText(movieDescription);\n movieYearIV.setText(\"(\"+movieYear+\")\");\n movieDirectorIV.setText(movieDirector);\n movieLengthIV.setText(movieLength);\n movieRatingIV.setText(String.valueOf(movieRating)+\"/10\");\n movieRatingBar.setRating((float)movieRating/2);\n }",
"public void updateModel() {\n\t\t// Set the mode to validation\n\t\tmode = UPDATE;\n\t\t// Traverses the source and updates the model when UML elements are\n\t\t// missing\n\t\tinspect();\n\t}",
"@Generated(hash = 70566292)\n public void setMovie(@NotNull MovieOverviewModel movie) {\n if (movie == null) {\n throw new DaoException(\n \"To-one property 'movieId' has not-null constraint; cannot set to-one to null\");\n }\n synchronized (this) {\n this.movie = movie;\n movieId = movie.getId();\n movie__resolvedKey = movieId;\n }\n }",
"private void editRating() throws MovieDAOException {\n String title = displayNameAndGetTitle();\n\n // get rating\n String newRating = view.getNewRating();\n\n // edit rating\n DVD updatedDVD = service.editRating(title, newRating);\n \n view.displayInfo(updatedDVD);\n }",
"private void update(){\n if(!((EditText)findViewById(R.id.bookTitle)).getText().toString().trim().isEmpty()){\n if(!appData.getCurrentBookId().isEmpty()){\n mRealm.executeTransactionAsync(new Realm.Transaction() {\n @Override\n public void execute(Realm realm) {\n BookInfo mBookInfo= realm.where(BookInfo.class).equalTo(\"mBookId\",\n appData.getCurrentBookId()).findFirst();\n mBookInfo.setBookTitle(((EditText) findViewById(R.id.bookTitle))\n .getText().toString());\n mBookInfo.setAuthorsNames(((EditText) findViewById(R.id.bookAuthor))\n .getText().toString());\n mBookInfo.setGenre(mSelectedGenre.get(\"position\"));\n }\n });\n Intent main = new Intent(this,BookListActivity.class);\n startActivity(main);\n finish();\n }else{\n\n mRealm.executeTransactionAsync(new Realm.Transaction() {\n @Override\n public void execute(Realm realm) {\n\n BookInfo mBookInfo = realm.createObject(BookInfo.class,\n UUID.randomUUID().toString());\n mBookInfo.setBookTitle(((EditText) findViewById(R.id.bookTitle))\n .getText().toString());\n mBookInfo.setAuthorsNames(((EditText) findViewById(R.id.bookAuthor))\n .getText().toString());\n mBookInfo.setGenre(mSelectedGenre.get(\"position\"));\n }\n });\n Intent main = new Intent(this,BookListActivity.class);\n startActivity(main);\n finish();\n\n }\n }else{\n new AlertDialog.Builder(EditOrAddBookActivity.this)\n .setTitle(\"No Book Title\")\n .setMessage(\"You must at the very least have a book title\")\n .setCancelable(false)\n .setPositiveButton(\"ok\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n // Whatever...\n }\n }).show();\n }\n }",
"public void setDetails(){\n\n TextView moviename = (TextView) findViewById(R.id.moviename);\n TextView moviedate = (TextView) findViewById(R.id.moviedate);\n TextView theatre = (TextView) findViewById(R.id.theatre);\n\n TextView seats = (TextView) findViewById(R.id.seats);\n\n moviename.setText(ticket.movieName);\n moviedate.setText(ticket.getMovieDate());\n theatre.setText(ticket.theatreDetails);\n\n seats.setText(ticket.seats);\n }",
"@RequestMapping(value = \"/films\", //\n\t\t\t\t\tmethod = RequestMethod.PUT, //\n\t\t\t\t\tproduces = {MediaType.APPLICATION_JSON_VALUE})\n\t@ResponseBody\n\tpublic Film updateFilm(@RequestBody Film film) {\n\t\treturn filmService.modifier(film);\n\t}",
"public Movie getMovie() { return movie; }",
"public void putMovieData(String movieName, String movieDate, String genre) {\n String[] columns = {MovieUriContract.GenreEntry._ID, MovieUriContract.GenreEntry.COLUMN_NAME};\n\n try{\n Cursor cursor = providerClient.query(\n MovieUriContract.GenreEntry.CONTENT_URI,\n columns,\n null,\n null,\n null\n );\n\n int genreId = -1;\n if(cursor.moveToFirst()) {\n genreId = cursor.getColumnIndex(genre);\n }\n cursor.close();\n\n if(genreId >= 0) {\n ContentValues movieValues = new ContentValues();\n movieValues.put(MovieUriContract.MovieEntry.COLUMN_NAME, movieName);\n movieValues.put(MovieUriContract.MovieEntry.COLUMN_RELEASE_DATE, movieDate);\n movieValues.put(MovieUriContract.MovieEntry.COLUMN_GENRE, genreId);\n providerClient.update(\n MovieUriContract.GenreEntry.CONTENT_URI,\n movieValues,\n null,\n null);\n }\n else {\n view.setErrorMessage();\n }\n } catch (RemoteException e) {\n e.printStackTrace();\n }\n }",
"public void actualizarMovie(long id, int rating, String comment, boolean view) {\n ContentValues values = new ContentValues();\n\n //Seteando body y author\n values.put(ColumnMovie.USER_RATING, rating);\n values.put(ColumnMovie.COMMENT, comment);\n values.put(ColumnMovie.VIEWED, view);\n\n //Clausula WHERE\n String selection = ColumnMovie.ID + \" = ?\";\n String[] selectionArgs = {Long.toString(id)};\n\n //Actualizando\n database.update(MOVIE_TABLE_NAME, values, selection, selectionArgs);\n }",
"public void updateView() {\n\t\tif(columns_view != null){\n\t\t\tint rowCount = newModel.getRowCount();\n\t\t\tfor (int i = rowCount - 1; i >= 0; i--) {\n\t\t\t newModel.removeRow(i);\n\t\t\t}\n\t\t\t\n\t\t\tint columns_size = columns_view.size();\n\t\t\tfor(int i =0 ; i < columns_size;i++){\n\t\t\t\tString index = Integer.toString(i);\n\t\t\t\tString name = \"Obs \" + index;\n\t\t\t\tif(columns_view.get(i) == model.bird){\n\t\t\t\t\tname = \"Bird\";\n\t\t\t\t}\n\t\t\t\tString obstacle_x = Integer.toString(columns_view.get(i).x);\n\t\t\t\tString obstacle_y = Integer.toString(columns_view.get(i).y);\n\t\t\t\tString obstacle_width = Integer.toString(columns_view.get(i).width);\n\t\t\t\tString obstacle_height = Integer.toString(columns_view.get(i).height);\n\t\t\t\tnewModel.addRow(new Object[]{name,obstacle_x,obstacle_y,obstacle_width,obstacle_height});\n\t\t\t}\n\t\t\t//System.out.println(\"this is view1 updateview\");\n\t\t\t//System.out.println(\"columns size\" + columns_view.size());\n\t\t}\n\t\t\n\t}",
"public boolean update(ModelObject obj);",
"private void setupView() {\n refresh();\n if (isEmpty(movies)) {\n // Ok. so we have no movies. THat means one of two things. Either\n // we're trying to download the movies, or we tried and failed to\n // download them. In the former case just wait. We'll get a\n // notification when they're done. In the latter case, let the user\n // know.\n if (!isNullOrEmpty(getService().getUserAddress()) && getService().getDataProviderState() == DataProvider.State.Finished) {\n showNoInformationFoundDialog();\n }\n } else {\n setupMovieGrid();\n }\n }",
"public Movie getMovie() {\n return mv;\n }",
"private void loadMoviesData()\n {\n showMoviesDataView();\n new FetchMovieData(this, new FetchMovieDataCompleteListener()).execute(MOVIE_DB_URL_POPULAR+API_Key);\n\n }",
"public void updateContent(){\r\n\t\tthis.initRecords();\r\n\t\tlist.show(records);\r\n\t}",
"public void setMovies(List<Movies> mvoies)\n {\n for ( Movies movie: mvoies)\n {\n if (!mMovies.contains(movie))\n {\n mMovies.add(movie);\n moviesRViewAdapter.notifyItemInserted(mMovies.indexOf(movie));\n }\n }\n }",
"@Override\n public void onClick(View view) {\n\n Movie movie = new Movie(\"abc\");\n ContentValues contentValues = new ContentValues();\n contentValues.put(MoviesContract.Movies.TITLE,movie.getTitle());\n getContentResolver().insert(MoviesContract.Movies.CONTENT_URI,contentValues);\n //fetchMovies();\n\n }",
"private void showMovieList(ArrayList<MovieItem> movies, int request){\n //instantiate HouseKeeper that is in charge of displaying the movie list\n SwipeKeeper swipe = (SwipeKeeper)mKeeperStaff.getHouseKeeper(SwipeHelper.NAME_ID);\n\n //notify houseKeeper to update movie list\n swipe.updateMovieList(movies, request);\n }",
"public void onClickAddTask(View view) {\n\n // Insert new Movie data via a ContentResolver\n\n\n ContentValues mUpdateValues = new ContentValues();\n // Defines selection criteria for the rows you want to update\n /*\n * Sets the updated value and updates the selected words.\n */\n\n if (fav == 0) {\n mRatingBar.setImageDrawable(ContextCompat.getDrawable(getApplicationContext(), android.R.drawable.btn_star_big_on));\n mUpdateValues.put(MoviesContract.MovieEntry.COLUMN_PRIORITY, 1);\n } else {\n mRatingBar.setImageDrawable(ContextCompat.getDrawable(getApplicationContext(), android.R.drawable.btn_star_big_off));\n mUpdateValues.put(MoviesContract.MovieEntry.COLUMN_PRIORITY, 0);\n }\n int mRowsUpdated = getContentResolver().update(\n MoviesContract.MovieEntry.buildMoviesUri(_id),\n mUpdateValues,\n MoviesContract.MovieEntry._ID+\"=?\",\n new String[] {String.valueOf(_id)});\n\n\n }",
"public void clickMovie()\n\t{\n\n\t\t// code to change the displayed photo\n\t\tSystem.out.println(\"clicked on \" + movieList.getSelectionModel().getSelectedItem());\n\n\t\t// code to change the displayed description, available times and the displayed photo\n\t\tfor (int i = 0; i < movieListItems.size(); i++)\n\t\t{\n\t\t\tif (movieList.getSelectionModel().getSelectedItem().equals(movieListItems.get(i)))\n\t\t\t{ Image validImage = null;\n\t\t\tVariableTracker.movieTitle=movieListItems.get(i);\n\t\t\tVariableTracker.movieDescription=movieDescription.get(i);\n\t\t\t\tdescription.setText(movieDescription.get(i));\n\t\t\t\ttry {\n\t\t\t\t\tFile file = new File(ImagesPath.get(i));\n\t\t\t\t\tImage image = new Image(file.toURI().toString());\n\t\t\t\t\tvalidImage = image;\n\t\t\t\t}\n\t\t\t\tcatch (NullPointerException e)\n\t\t\t\t{\n\t\t\t\t\tFile file = new File(\"assets/placeholder.png\");\n\t\t\t\t\tImage image = new Image(file.toURI().toString());\n\t\t\t\t\tvalidImage = image;\n\t\t\t\t}\n\t\t\t\tVariableTracker.movieImage=validImage;\n\t\t\t\tiv.setImage(validImage);\n\t\t\t\tObservableList<String> movieTimesItems = FXCollections.observableArrayList();\n\t\t\t\tfor (int j = 0; j < movieTimesList.get(i).length; j++)\n\t\t\t\t{\n\t\t\t\t\tmovieTimesItems.add(movieTimesList.get(i)[j]);\n\t\t\t\t}\n\t\t\t\tmovieTimes.setItems(movieTimesItems);\n\t\t\t}\n\t\t}\n\n\t\t// code to change the available times\n\n\t}",
"private void refreshView() {\n this.view.updateRobots();\n }",
"public ObservableList<Movie> getFilmData() {\r\n return ser.movieData;\r\n }",
"public void updateData(String name,int year,String director,String cast,int rating , String reviews , boolean fav ){\n SQLiteDatabase db = this.getWritableDatabase();\n ContentValues updateValues = new ContentValues();\n updateValues.put(MOVIE_NAME,name);\n updateValues.put(MOVIE_YEAR,year);\n updateValues.put(MOVIE_DIRECTOR,director);\n updateValues.put(MOVIE_CAST,cast);\n updateValues.put(MOVIE_RATING,rating);\n updateValues.put(MOVIE_REVIEWS,reviews);\n updateValues.put(FAVOURITES,fav);\n db.update(Db_Table,updateValues,\"movie_name = ?\",new String[]{ name });\n }",
"@GetMapping(\"/updateDirector/{id}\")\n public String updateDirector(@PathVariable(\"id\") long id, Model model)\n {\n Director d = directorRepo.findOne(id);\n model.addAttribute(\"newDirector\", d);\n return \"directorForm\";\n }",
"public void update(){\r\n\t\tthis.loadRecords();\r\n\t}",
"public void update(Reponses item) {\n this.model = item;\n \n this.loadData();\n \n if (this.model != null) {\n MultiLoader loader = new MultiLoader(this);\n String baseUri = \n ReponsesProviderAdapter.REPONSES_URI \n + \"/\" \n + this.model.getId();\n\n loader.addUri(Uri.parse(baseUri), new UriLoadedCallback() {\n\n @Override\n public void onLoadComplete(android.database.Cursor c) {\n ReponsesShowFragment.this.onReponsesLoaded(c);\n }\n\n @Override\n public void onLoaderReset() {\n\n }\n });\n loader.addUri(Uri.parse(baseUri + \"/question\"), \n new UriLoadedCallback() {\n\n @Override\n public void onLoadComplete(android.database.Cursor c) {\n ReponsesShowFragment.this.onQuestionLoaded(c);\n }\n\n @Override\n public void onLoaderReset() {\n\n }\n });\n loader.init();\n }\n }",
"public void updateViews() {\n updateViews(null);\n }",
"@Override\n\tpublic List<Object> modifyMovies(JSONObject param) {\n\t\tString name =StringUtil.ToString(param.getString(\"movieName\"));\n\t\tSystem.out.println(name);\n\t\tMap<String, Object> movie = new HashMap<String, Object>();\n\t\tmovie.put(\"name\", name);\n\t\tList<Object> movies = this.queryForList(\"Movie.selectByName\", movie);\n\t\treturn movies;\n\t}",
"@Override\r\n \t\t\tpublic void onClick(ClickEvent event) {\n \t\t\t\tmovieProvider.getList().add(new Movie(\"\", 0, Language.English, \"\", \"\"));\r\n \t\t\t\tmovieTable.redraw();\r\n \t\t\t\t//movieProvider.refresh();\r\n \t\t\t\tWindow.alert(\"Added\");\r\n \t\t }",
"@Override\n public void onTaskComplete(Movie[] movies) {\n viewModel.init(movies, currentSelection);\n\n //hide loading button\n loadingIndicatorPB.setVisibility(View.INVISIBLE);\n //Update UI\n updateUI(movies);\n\n\n }",
"protected abstract void populateView(View v, T model);",
"@Override public void refresh() {\n if (search == null) {\n movies = new ArrayList<Movie>(getService().getMovies());\n }\n \n if (movies == null) {\n movies = new ArrayList<Movie>();\n }\n // sort movies according to the default sort preference.\n final Comparator<Movie> comparator = MOVIE_ORDER.get(getService().getAllMoviesSelectedSortIndex());\n if (movies != null && comparator != null) {\n Collections.sort(movies, comparator);\n }\n super.refresh();\n }",
"private void updateViewsWithRecievedData() {\n\n //check if user has rated the data\n if (dataModel.getUser_has_rated().equalsIgnoreCase(\"true\")) {\n //user has rated\n ratingBar.setRating(Float.parseFloat(Integer.toString(dataModel.getUser_rating())));\n isRated = true;\n }\n //check if user has liked post\n if (dataModel.getUser_has_liked().equalsIgnoreCase(\"true\")) {\n //user has liked post, change imageview background\n likes_imv.setBackgroundColor(getColor(R.color.colorAccent));\n isLiked = true;\n }\n\n tv_title.setText(dataModel.getTitle() + \"\\n\" + dataModel.getArtist_actors());\n tv_views.setText(HelperMethods.getStringViewsFromInt(dataModel.getViews(), \"\"));\n tv_likes.setText(HelperMethods.getStringViewsFromInt(dataModel.getLikes(), \"likes\"));\n tv_synopsis.setText(dataModel.getSynop_desc());\n tv_artists.setText(dataModel.getArtist_actors());\n tv_contacts.setText(dataModel.getContacts());\n\n }",
"public int update(ReviewVO review_memberVO);",
"public void setMovieData(MovieInfo[] movieInfoData) {\n mMovieInfoData = movieInfoData;\n notifyDataSetChanged();\n }",
"private void updateMovies(){\n FetchMovieTask movieTask = new FetchMovieTask();\n SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getActivity());\n String order_by = prefs.getString(getString(R.string.pref_order_by_key), getString(R.string.pref_order_by_default));\n movieTask.execute(order_by);\n\n }",
"private void getAllFavorite(){\n\n\n MainViewModel viewModel = ViewModelProviders.of(this).get(MainViewModel.class);\n viewModel.getFavorite().observe(this, new Observer<List<FavoriteEntry>>() {\n @Override\n public void onChanged(@Nullable List<FavoriteEntry> imageEntries) {\n List<Movie> movies = new ArrayList<>();\n for (FavoriteEntry entry : imageEntries){\n Movie movie = new Movie();\n movie.setId(entry.getMovieid());\n movie.setOverview(entry.getOverview());\n movie.setOriginalTitle(entry.getTitle());\n movie.setPosterPath(entry.getPosterpath());\n movie.setVoteAverage(entry.getUserrating());\n movie.setReleaseDate(entry.getReleasedate());\n movies.add(movie);\n }\n\n adapter.setMovies(movies);\n }\n });\n }",
"public MutableLiveData<Movie> getMovieDetails(Movie movie) {\n final MutableLiveData<Movie> movieDetails = new MutableLiveData<>();\n Api.ApiInterface api = Api.getApi();\n String movieId = String.valueOf(movie.getId());\n String apiKey = Api.getApiKey();\n\n sAppExecutors.networkIO().execute(() -> {\n try {\n movie.setReviews(api.fetchReviews(movieId, apiKey).execute().body().getReviews());\n movie.setVideos(api.fetchVideos(movieId, apiKey).execute().body().getVideos());\n movieDetails.postValue(movie);\n } catch (IOException e) {\n movieDetails.postValue(null);\n e.printStackTrace();\n }\n });\n return movieDetails;\n }",
"@Override\n public void update(BookUpdateViewModel viewModel) {\n Book bookDb = repository.findById(viewModel.getId())\n .orElseThrow(RecordNotFoundException::new);\n\n\n // check the validity of the fields\n if (viewModel.getTitle().strip().length() < 5) {\n throw new DomainValidationException();\n }\n\n // apply the update\n BeanUtils.copyProperties(viewModel, bookDb);\n\n // save and flush\n repository.saveAndFlush(bookDb);\n }",
"@Override\n public void onClick(View v) {\n int position = getAdapterPosition();\n Movies movies = mData.get(position);\n\n movies.setTitle(movies.getTitle());\n movies.setOverview(movies.getOverview());\n\n Intent intent = new Intent(itemView.getContext(), DetailMovieActivity.class);\n intent.putExtra(DetailMovieActivity.EXTRA_MOVIE, movies);\n itemView.getContext().startActivity(intent);\n }"
] | [
"0.73988664",
"0.7339622",
"0.7221972",
"0.68851924",
"0.66566503",
"0.63820875",
"0.6244071",
"0.61812866",
"0.61560535",
"0.6138744",
"0.611976",
"0.6079364",
"0.6025497",
"0.5983849",
"0.5973454",
"0.59707314",
"0.5933014",
"0.5873755",
"0.58668333",
"0.5864006",
"0.5838493",
"0.58348453",
"0.58091974",
"0.58055085",
"0.5776943",
"0.5764011",
"0.5750938",
"0.5727404",
"0.5721423",
"0.5711761",
"0.5706704",
"0.57054853",
"0.5652257",
"0.5652257",
"0.5649431",
"0.5628378",
"0.5612883",
"0.5609017",
"0.56018776",
"0.55903345",
"0.55879843",
"0.55805576",
"0.55681556",
"0.5551842",
"0.5532403",
"0.5506176",
"0.5501324",
"0.5497856",
"0.54970074",
"0.5494676",
"0.5479259",
"0.5475441",
"0.54750437",
"0.5464157",
"0.5461122",
"0.5450072",
"0.5449861",
"0.5443307",
"0.5443288",
"0.5437564",
"0.54191375",
"0.540133",
"0.5393245",
"0.53783554",
"0.53746116",
"0.5356015",
"0.5349836",
"0.53345686",
"0.53322154",
"0.53293747",
"0.5328036",
"0.5326944",
"0.53248614",
"0.53057414",
"0.530398",
"0.5302832",
"0.53002805",
"0.5295016",
"0.5292297",
"0.52888095",
"0.5284587",
"0.5280209",
"0.5277572",
"0.52752244",
"0.52738965",
"0.5267833",
"0.52643734",
"0.52632576",
"0.5262222",
"0.5260257",
"0.5259162",
"0.5254878",
"0.52538824",
"0.5249145",
"0.52488047",
"0.5247312",
"0.52388495",
"0.5221328",
"0.52148205",
"0.5211306"
] | 0.5417716 | 61 |
Creates an instance of OperationStatusResultInner class. | public OperationStatusResultInner() {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public OperationStatusResultInner withStatus(String status) {\n this.status = status;\n return this;\n }",
"public OperationStatusResultInner withName(String name) {\n this.name = name;\n return this;\n }",
"public OperationStatusResultInner withId(String id) {\n this.id = id;\n return this;\n }",
"OperationStatusInner innerModel();",
"public OperationStatusResultInner withError(ManagementError error) {\n this.error = error;\n return this;\n }",
"OperationStatusType status();",
"public getStatus_result(getStatus_result other) {\n if (other.isSetSuccess()) {\n this.success = new GetStatusTResponse(other.success);\n }\n if (other.isSetE()) {\n this.e = new alluxio.thrift.AlluxioTException(other.e);\n }\n }",
"public OperationStatusResultInner withOperations(List<OperationStatusResultInner> operations) {\n this.operations = operations;\n return this;\n }",
"com.google.container.v1beta1.Operation.Status getStatus();",
"public listStatus_result(listStatus_result other) {\n if (other.isSetSuccess()) {\n this.success = new ListStatusTResponse(other.success);\n }\n if (other.isSetE()) {\n this.e = new alluxio.thrift.AlluxioTException(other.e);\n }\n }",
"public Status createFailedResult(Status status) {\n return status;\n }",
"trinsic.services.common.v1.CommonOuterClass.ResponseStatus getStatus();",
"public interface OperationStatus {\n /**\n * Gets the status property: The status of the long running operation.\n *\n * @return the status value.\n */\n OperationStatusType status();\n\n /**\n * Gets the reportUrl property: The CSV file from the reportUrl blob link consists of reservation usage data with\n * the following schema at daily granularity.\n *\n * @return the reportUrl value.\n */\n ReservationReportSchema reportUrl();\n\n /**\n * Gets the validUntil property: The time at which report URL becomes invalid.\n *\n * @return the validUntil value.\n */\n OffsetDateTime validUntil();\n\n /**\n * Gets the inner com.azure.resourcemanager.costmanagement.fluent.models.OperationStatusInner object.\n *\n * @return the inner object.\n */\n OperationStatusInner innerModel();\n}",
"public <ResultType> MonitoringResponseBuilder(StatusType status, ResultType result) {\n PrismaResponseWrapper<?> prismaResponseWrapper =\n PrismaResponseWrapper.status(status, result).build();\n responseBuilder = Response.status(status).entity(prismaResponseWrapper);\n }",
"public abstract R createFailedResult(Status status);",
"com.google.rpc.StatusOrBuilder getStatusOrBuilder();",
"com.google.rpc.StatusOrBuilder getStatusOrBuilder();",
"public GameManagerClient.GameManagerInstanceResult createFailedResult(Status status) {\n return new zzd(status, null);\n }",
"public Result(Status status, String message) {\n this.status = status;\n this.message = message;\n this.value = Optional.empty();\n }",
"public static Result with(final Status status) {\n requireNonNull(status, \"A HTTP status is required.\");\n return new Result().status(status);\n }",
"public IStatus getResult();",
"public OperationStatusResultInner withStartTime(OffsetDateTime startTime) {\n this.startTime = startTime;\n return this;\n }",
"public Result(int status) {\n this(status, (String) null, Collections.emptyMap(), HttpEntity.NO_ENTITY);\n }",
"public OperationStatusResultInner withPercentComplete(Float percentComplete) {\n this.percentComplete = percentComplete;\n return this;\n }",
"public com.clarifai.grpc.api.status.Status.Builder getStatusBuilder() {\n \n onChanged();\n return getStatusFieldBuilder().getBuilder();\n }",
"public com.clarifai.grpc.api.status.Status.Builder getStatusBuilder() {\n \n onChanged();\n return getStatusFieldBuilder().getBuilder();\n }",
"public static Status OK() {\n return new Status();\n }",
"public interface OperationStatusFactory{\n\n /**\n * Return true if all is good, throw status specific exception if not.\n *\n * @return {@code true} if there is no error thrown\n * @throws IOException\n */\n boolean processPutStatus(MutationStatus operationStatus) throws IOException;\n\n MutationStatus getCorrectStatus(MutationStatus status,MutationStatus oldStatus);\n\n MutationStatus success();\n\n MutationStatus notRun();\n\n MutationStatus failure(String message);\n\n MutationStatus failure(Throwable t);\n\n ConstraintChecker getNoOpConstraintChecker();\n}",
"public Builder setStatus(trinsic.services.common.v1.CommonOuterClass.ResponseStatus value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n status_ = value.getNumber();\n onChanged();\n return this;\n }",
"public messages.Statusmessage.StatusMessage.Builder getStatusBuilder() {\n bitField0_ |= 0x00000040;\n onChanged();\n return getStatusFieldBuilder().getBuilder();\n }",
"public ExperimentStartOperationResultInner() {\n }",
"@SuppressWarnings(\"static-method\")\n\tpublic IStatus createOkStatus() {\n\t\treturn Status.OK_STATUS;\n\t}",
"public Status getStatus() {\n return result;\n }",
"public static Result with(final int status) {\n requireNonNull(status, \"A HTTP status is required.\");\n return new Result().status(status);\n }",
"public static OperationResponse builder() {\n\t\treturn new OperationResponse();\n\t}",
"long getInnerStatusCode();",
"public List<OperationStatusResultInner> operations() {\n return this.operations;\n }",
"public messages.Statusmessage.StatusMessageOrBuilder getStatusOrBuilder() {\n return status_;\n }",
"public messages.Statusmessage.StatusMessageOrBuilder getStatusOrBuilder() {\n if (statusBuilder_ != null) {\n return statusBuilder_.getMessageOrBuilder();\n } else {\n return status_;\n }\n }",
"public GameManagerClient.GameManagerResult createFailedResult(Status status) {\n return new zze(status, null, -1, null);\n }",
"public com.vodafone.global.er.decoupling.binding.request.ServiceStatusType createServiceStatusType()\n throws javax.xml.bind.JAXBException\n {\n return new com.vodafone.global.er.decoupling.binding.request.impl.ServiceStatusTypeImpl();\n }",
"@java.lang.Override public trinsic.services.common.v1.CommonOuterClass.ResponseStatus getStatus() {\n @SuppressWarnings(\"deprecation\")\n trinsic.services.common.v1.CommonOuterClass.ResponseStatus result = trinsic.services.common.v1.CommonOuterClass.ResponseStatus.valueOf(status_);\n return result == null ? trinsic.services.common.v1.CommonOuterClass.ResponseStatus.UNRECOGNIZED : result;\n }",
"@java.lang.Override\n public trinsic.services.common.v1.CommonOuterClass.ResponseStatus getStatus() {\n @SuppressWarnings(\"deprecation\")\n trinsic.services.common.v1.CommonOuterClass.ResponseStatus result = trinsic.services.common.v1.CommonOuterClass.ResponseStatus.valueOf(status_);\n return result == null ? trinsic.services.common.v1.CommonOuterClass.ResponseStatus.UNRECOGNIZED : result;\n }",
"com.clarifai.grpc.api.status.StatusOrBuilder getStatusOrBuilder();",
"public Status getStatus();",
"public OperationResultInfoBaseResourceInner() {\n }",
"com.google.protobuf.ByteString\n getStatusBytes();",
"com.google.protobuf.ByteString\n getStatusBytes();",
"public Builder setStatus(com.github.tomj0101.grpc.Status value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n status_ = value.getNumber();\n onChanged();\n return this;\n }",
"public ReturnStatus getStatus() {\n return (ReturnStatus) get(\"status\");\n }",
"public TReturnStatus getStatus() {\n\n\t\treturn retStatus;\n\t}",
"messages.Statusmessage.StatusMessageOrBuilder getStatusOrBuilder();",
"public SearchResponse getStatus();",
"public RunResult(\n Status status,\n ImmutableList<TestResult> testResults,\n ImmutableMap<String, byte[]> logs) {\n Preconditions.checkNotNull(status);\n Preconditions.checkNotNull(testResults);\n Preconditions.checkNotNull(logs);\n this.status = status;\n this.testResults = testResults;\n this.logs = logs;\n }",
"public TReturnStatus() {\n\n\t\tthis(TStatusCode.SRM_CUSTOM_STATUS);\n\t}",
"T getStatus();",
"com.google.protobuf.ByteString\n getStatusBytes();",
"public ExecutionStatus status() {\n return this.status;\n }",
"public ApiResult getResponseStatus() {\n return responseStatus;\n }",
"public DescribeTestExecutionResult withTestExecutionStatus(TestExecutionStatus testExecutionStatus) {\n this.testExecutionStatus = testExecutionStatus.toString();\n return this;\n }",
"public com.clarifai.grpc.api.status.StatusOrBuilder getStatusOrBuilder() {\n if (statusBuilder_ != null) {\n return statusBuilder_.getMessageOrBuilder();\n } else {\n return status_ == null ?\n com.clarifai.grpc.api.status.Status.getDefaultInstance() : status_;\n }\n }",
"public com.clarifai.grpc.api.status.StatusOrBuilder getStatusOrBuilder() {\n if (statusBuilder_ != null) {\n return statusBuilder_.getMessageOrBuilder();\n } else {\n return status_ == null ?\n com.clarifai.grpc.api.status.Status.getDefaultInstance() : status_;\n }\n }",
"public int getStatus(){\n if (ans != null){\n return RESULT_OK;\n } else if (ex != null){\n if (ex instanceof StringListTokenizer.InvalidElementOrderException ||\n ex instanceof StringListTokenizer.InvalidBracketCountException ||\n ex instanceof NoElementException) {\n return RESULT_EXPECTED_EXCEPTION;\n } else if (ex instanceof NumberFormatException){\n return RESULT_UNEXPECTED_EXCEPTION;\n } else {\n return RESULT_UNEXPECTED_EXCEPTION;\n }\n } else {\n return RESULT_EXPECTED_EXCEPTION;\n }\n }",
"com.google.protobuf.UInt32ValueOrBuilder getStatusOrBuilder();",
"public messages.Statusmessage.StatusMessage getStatus() {\n if (statusBuilder_ == null) {\n return status_;\n } else {\n return statusBuilder_.getMessage();\n }\n }",
"public Builder setStatus(protogalaxy.tictactoe.proto.TurnReply.ResponseStatus value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n status_ = value.getNumber();\n onChanged();\n return this;\n }",
"public Builder mergeStatus(com.clarifai.grpc.api.status.Status value) {\n if (statusBuilder_ == null) {\n if (status_ != null) {\n status_ =\n com.clarifai.grpc.api.status.Status.newBuilder(status_).mergeFrom(value).buildPartial();\n } else {\n status_ = value;\n }\n onChanged();\n } else {\n statusBuilder_.mergeFrom(value);\n }\n\n return this;\n }",
"public Builder mergeStatus(com.clarifai.grpc.api.status.Status value) {\n if (statusBuilder_ == null) {\n if (status_ != null) {\n status_ =\n com.clarifai.grpc.api.status.Status.newBuilder(status_).mergeFrom(value).buildPartial();\n } else {\n status_ = value;\n }\n onChanged();\n } else {\n statusBuilder_.mergeFrom(value);\n }\n\n return this;\n }",
"private MetadataOperationResultProto createMetadataOperationResult(Map<String, String> metadata) {\n val resultMap = MetadataQueryOperationExecutor.createResultMapNode(metadata);\n\n return MetadataOperationResultProto.newBuilder()\n .setOperationType(getOperationType())\n .setResult(resultMap)\n .setStatus(OperationResultStatus.OK)\n .build();\n }",
"public int getStatusValue() {\n return status_;\n }",
"public int getStatusValue() {\n return status_;\n }",
"public int getStatusValue() {\n return status_;\n }",
"public int getStatusValue() {\n return status_;\n }",
"public int getStatusValue() {\n return status_;\n }",
"public int getStatusValue() {\n return status_;\n }",
"public int getStatusValue() {\n return status_;\n }",
"public int getStatusValue() {\n return status_;\n }",
"public int getStatusValue() {\n return status_;\n }",
"public int getStatusValue() {\n return status_;\n }",
"public int getStatusValue() {\n return status_;\n }",
"public Integer getStatus() {\n return status;\n }",
"public Integer getStatus() {\n return status;\n }",
"public Integer getStatus() {\n return status;\n }",
"public Integer getStatus() {\n return status;\n }",
"public Integer getStatus() {\n return status;\n }",
"public Integer getStatus() {\n return status;\n }",
"public Integer getStatus() {\n return status;\n }",
"public Integer getStatus() {\n return status;\n }",
"public Integer getStatus() {\n return status;\n }",
"public Integer getStatus() {\n return status;\n }",
"public Integer getStatus() {\n return status;\n }",
"public Integer getStatus() {\n return status;\n }",
"public Integer getStatus() {\n return status;\n }",
"public Integer getStatus() {\n return status;\n }",
"public Integer getStatus() {\n return status;\n }",
"public Integer getStatus() {\n return status;\n }",
"public Integer getStatus() {\n return status;\n }",
"public Integer getStatus() {\n return status;\n }",
"public Integer getStatus() {\n return status;\n }",
"public Integer getStatus() {\n return status;\n }"
] | [
"0.7220699",
"0.6582957",
"0.65543425",
"0.6388222",
"0.5985615",
"0.59313476",
"0.58611274",
"0.5816149",
"0.57705474",
"0.5653465",
"0.56031394",
"0.5567703",
"0.5489078",
"0.54115397",
"0.540158",
"0.5377645",
"0.5377645",
"0.53749007",
"0.53242433",
"0.53169113",
"0.5302761",
"0.5297194",
"0.5292609",
"0.5289762",
"0.52594614",
"0.52594614",
"0.5258635",
"0.52524906",
"0.5239844",
"0.5238921",
"0.52319705",
"0.522605",
"0.5197448",
"0.516575",
"0.5147291",
"0.5128697",
"0.5115021",
"0.50588876",
"0.50501615",
"0.5048013",
"0.50289136",
"0.50038505",
"0.49827066",
"0.4970751",
"0.4944448",
"0.49195763",
"0.49123856",
"0.49123856",
"0.4883342",
"0.48729756",
"0.48565364",
"0.4842799",
"0.48352075",
"0.4810137",
"0.47953066",
"0.47907865",
"0.47899127",
"0.47752932",
"0.475829",
"0.47523603",
"0.4749349",
"0.4749349",
"0.4748409",
"0.4745193",
"0.47423342",
"0.47101268",
"0.47020206",
"0.47020206",
"0.47017047",
"0.46966",
"0.46966",
"0.46966",
"0.46966",
"0.46851945",
"0.46851945",
"0.46851945",
"0.46851945",
"0.46851945",
"0.46851945",
"0.46851945",
"0.46674544",
"0.46674544",
"0.46674544",
"0.46674544",
"0.46674544",
"0.46674544",
"0.46674544",
"0.46674544",
"0.46674544",
"0.46674544",
"0.46674544",
"0.46674544",
"0.46674544",
"0.46674544",
"0.46674544",
"0.46674544",
"0.46674544",
"0.46674544",
"0.46674544",
"0.46674544"
] | 0.7579605 | 0 |
Get the id property: Fully qualified ID for the async operation. | public String id() {
return this.id;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"OperationIdT getOperationId();",
"@javax.annotation.Nullable\n @ApiModelProperty(value = \"Define the identifier for the task.\")\n @JsonProperty(JSON_PROPERTY_ID)\n @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)\n\n public String getId() {\n return id;\n }",
"java.lang.String getOperationId();",
"String getForOperationId();",
"public final String getId() {\n return id;\n }",
"@JsonIgnore\n public String getId() {\n return UriHelper.getLastUriPart(getUri());\n }",
"com.google.protobuf.ByteString getOperationIdBytes();",
"public final String getId() {\r\n\t\treturn id;\r\n\t}",
"public java.lang.String getId() {\n return id;\n }",
"public java.lang.String getId() {\n return id;\n }",
"public java.lang.String getId() {\n return id;\n }",
"public java.lang.String getId() {\n return id;\n }",
"public java.lang.String getId() {\n return id;\n }",
"public java.lang.String getId() {\n return id;\n }",
"public java.lang.String getId() {\n return id;\n }",
"java.lang.String getId();",
"java.lang.String getId();",
"java.lang.String getId();",
"java.lang.String getId();",
"java.lang.String getId();",
"java.lang.String getId();",
"java.lang.String getId();",
"java.lang.String getId();",
"java.lang.String getId();",
"java.lang.String getId();",
"java.lang.String getId();",
"java.lang.String getId();",
"java.lang.String getId();",
"java.lang.String getId();",
"java.lang.String getId();",
"java.lang.String getId();",
"java.lang.String getId();",
"java.lang.String getId();",
"java.lang.String getId();",
"public static String id()\n {\n return _id;\n }",
"public java.lang.String getId() {\n return id;\n }",
"public java.lang.String getId() {\n return id;\n }",
"public String getId() {\n return id;\n }",
"public String getId() {\n\t\treturn this.token.get(\"id\").toString();\n\t}",
"public java.lang.String getId() {\n return _id;\n }",
"public String getId () {\n return id;\n }",
"public String getId () {\n return id;\n }",
"public java.lang.String getId() {\r\n return id;\r\n }",
"public java.lang.String getId() {\r\n return id;\r\n }",
"public java.lang.String getId() {\r\n return id;\r\n }",
"public String getId ()\n {\n return id;\n }",
"public String getId () {\n return id;\n }",
"@java.lang.Override\n public java.lang.String getId() {\n java.lang.Object ref = id_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n id_ = s;\n return s;\n }\n }",
"@java.lang.Override\n public java.lang.String getId() {\n java.lang.Object ref = id_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n id_ = s;\n return s;\n }\n }",
"@java.lang.Override\n public java.lang.String getId() {\n java.lang.Object ref = id_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n id_ = s;\n return s;\n }\n }",
"@java.lang.Override\n public java.lang.String getId() {\n java.lang.Object ref = id_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n id_ = s;\n return s;\n }\n }",
"@java.lang.Override\n public java.lang.String getId() {\n java.lang.Object ref = id_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n id_ = s;\n return s;\n }\n }",
"@java.lang.Override\n public java.lang.String getId() {\n java.lang.Object ref = id_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n id_ = s;\n return s;\n }\n }",
"@java.lang.Override\n public java.lang.String getId() {\n java.lang.Object ref = id_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n id_ = s;\n return s;\n }\n }",
"public long getId() {\n return id_;\n }",
"public long getId() {\n return id_;\n }",
"public long getId() {\n return id_;\n }",
"public long getId() {\n return id_;\n }",
"public long getId() {\n return id_;\n }",
"public long getId() {\n return id_;\n }",
"public long getId() {\n return id_;\n }",
"public long getId() {\n return id_;\n }",
"@java.lang.Override\n public java.lang.String getId() {\n java.lang.Object ref = id_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n id_ = s;\n return s;\n }\n }",
"@java.lang.Override\n public java.lang.String getId() {\n java.lang.Object ref = id_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n id_ = s;\n return s;\n }\n }",
"@java.lang.Override\n public java.lang.String getId() {\n java.lang.Object ref = id_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n id_ = s;\n return s;\n }\n }",
"@java.lang.Override\n public java.lang.String getId() {\n java.lang.Object ref = id_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n id_ = s;\n return s;\n }\n }",
"public long getId() {\n return id_;\n }",
"public java.lang.String getId() {\n java.lang.Object ref = id_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n id_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getId() {\n java.lang.Object ref = id_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n id_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"@java.lang.Override\n public java.lang.String getId() {\n java.lang.Object ref = id_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n id_ = s;\n return s;\n }\n }",
"public java.lang.String getId() {\n java.lang.Object ref = id_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n id_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getId() {\n java.lang.Object ref = id_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n id_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getId() {\n java.lang.Object ref = id_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n id_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getId() {\n java.lang.Object ref = id_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n id_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getId() {\n java.lang.Object ref = id_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n id_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getId() {\n java.lang.Object ref = id_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n id_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getId() {\n java.lang.Object ref = id_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n id_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getId() {\n java.lang.Object ref = id_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n id_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getId() {\n java.lang.Object ref = id_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n id_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"@Nonnull\n String getId();",
"public java.lang.String getId() {\n java.lang.Object ref = id_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n id_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getId() {\n java.lang.Object ref = id_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n id_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public String getId() {\r\n return id;\r\n }",
"public String getId() {\r\n return id;\r\n }",
"public String getId() {\r\n return id;\r\n }",
"public String getId() {\r\n return id;\r\n }",
"public String getId() {\r\n return id;\r\n }",
"public String getId() {\r\n return id;\r\n }",
"public String getId() {\r\n return id;\r\n }",
"public String getId() {\r\n return id;\r\n }",
"public String getId() {\r\n return id;\r\n }",
"public String getId() {\r\n return id;\r\n }",
"public String getId() {\r\n return id;\r\n }",
"public String getId() {\r\n return id;\r\n }",
"public String getId() {\n return id;\n }",
"public String getId() {\n return id;\n }",
"public String getId() {\n return id;\n }",
"public String getId() {\n return id;\n }",
"public String getId() {\n return id;\n }",
"public String getId() {\n return id;\n }",
"public String getId() {\n return id;\n }"
] | [
"0.73959255",
"0.72589284",
"0.72474617",
"0.7074759",
"0.6943247",
"0.6916348",
"0.68909425",
"0.67577565",
"0.6740998",
"0.6740998",
"0.6740998",
"0.6725993",
"0.6725993",
"0.6725993",
"0.6706031",
"0.66882956",
"0.66882956",
"0.66882956",
"0.66882956",
"0.66882956",
"0.66882956",
"0.66882956",
"0.66882956",
"0.66882956",
"0.66882956",
"0.66882956",
"0.66882956",
"0.66882956",
"0.66882956",
"0.66882956",
"0.66882956",
"0.66882956",
"0.66882956",
"0.66882956",
"0.6685304",
"0.6684831",
"0.6684831",
"0.66585726",
"0.6656883",
"0.6656162",
"0.6654144",
"0.6654144",
"0.6637501",
"0.6637501",
"0.6637501",
"0.6625384",
"0.6619998",
"0.6615356",
"0.65995145",
"0.65995145",
"0.6592895",
"0.6592895",
"0.6592895",
"0.6592895",
"0.65656716",
"0.65656716",
"0.65656716",
"0.65656716",
"0.65656716",
"0.65656716",
"0.65656716",
"0.65656716",
"0.6565473",
"0.6565473",
"0.6565473",
"0.6565473",
"0.656037",
"0.65592974",
"0.65592974",
"0.6558859",
"0.65556043",
"0.65556043",
"0.65556043",
"0.65556043",
"0.65556043",
"0.65556043",
"0.65556043",
"0.65556043",
"0.6554346",
"0.65526915",
"0.6551876",
"0.6551876",
"0.65510744",
"0.65510744",
"0.65510744",
"0.65510744",
"0.65510744",
"0.65510744",
"0.65510744",
"0.65510744",
"0.65510744",
"0.65510744",
"0.65510744",
"0.65510744",
"0.65427375",
"0.65427375",
"0.65427375",
"0.65427375",
"0.65427375",
"0.65427375",
"0.65427375"
] | 0.0 | -1 |
Set the id property: Fully qualified ID for the async operation. | public OperationStatusResultInner withId(String id) {
this.id = id;
return this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setId(Object id) {\n this.id = id;\n }",
"public void setId(Object id) {\n this.id = id;\n }",
"@JsonSetter(\"id\")\r\n public void setId(String id) {\r\n this.id = id;\r\n }",
"public void setId(String id) {\n this.id = id;\n }",
"public void setId(String id) {\r\n this.id = id;\r\n }",
"public void setId (String id) {\n this.id = id;\n }",
"public void setId(String id) {\r\n this.id = id;\r\n }",
"public void setId(String id) {\n this.id = id;\n }",
"public void setId(String id) {\n this.id = id;\n }",
"public void setId(String id) {\n this.id = id;\n }",
"public void setId(String id) {\n this.id = id;\n }",
"public void setId(String id) {\n this.id = id;\n }",
"public void setId(String id) {\n this.id = id;\n }",
"public void setId (String id) {\n this.id = id;\n }",
"public void setId (String id) {\n this.id = id;\n }",
"public void setId (String id)\n {\n _id = id;\n }",
"public void setId(String id) {\n this.id = id;\n }",
"public void setId(String id) {\n this.id = id;\n }",
"public void setId(String id) {\n this.id = id;\n }",
"public void setId(String id) {\n this.id = id;\n }",
"public void setId(String id) {\n this.id = id;\n }",
"public void setId(String id) {\n this.id = id;\n }",
"public void setId(String id) {\n this.id = id;\n }",
"public void setId(String id) {\n this.id = id;\n }",
"public void setId(String id) {\n this.id = id;\n }",
"public void setId(String id) {\n this.id = id;\n }",
"public void setId(String id) {\n this.id = id;\n }",
"public void setId(String id) {\n this.id = id;\n }",
"public void setId(String id) {\n this.id = id;\n }",
"public void setId(String id) {\n this.id = id;\n }",
"public void setId(String id) {\n this.id = id;\n }",
"public void setId(String id) {\n this.id = id;\n }",
"public void setId(String id) {\n this.id = id;\n }",
"public void setId(String id) {\n this.id = id;\n }",
"public void setId(String id) {\n this.id = id;\n }",
"public void setId(String id) {\n this.id = id;\n }",
"public void setId(String id) {\n this.id = id;\n }",
"public void setId(String id) {\n this.id = id;\n }",
"public void setId(String id) {\n this.id = id;\n }",
"public void setId(String id) {\n this.id = id;\n }",
"public void setId(String id) {\n this.id = id;\n }",
"public void setId(String id) {\n this.id = id;\n }",
"public void setId(String id) {\n this.id = id;\n }",
"public void setId(String id) {\n this.id = id;\n }",
"public void setId(String id) {\n this.id = id;\n }",
"public void setId(String id) {\n this.id = id;\n }",
"public void setId(String id) {\n this.id = id;\n }",
"public void setId(String id) {\n this.id = id;\n }",
"public void setId(String id) {\n this.id = id;\n }",
"public void setId(String id) {\n this.id = id;\n }",
"public void setId( final String id )\r\n {\r\n this.id = id;\r\n }",
"@JsonProperty(\"id\")\n public void setId(String id) {\n this.id = id;\n }",
"@JsonProperty(\"id\")\n public void setId(String id) {\n this.id = id;\n }",
"@JsonProperty(\"id\")\n public void setId(String id) {\n this.id = id;\n }",
"public void setId(String id) {\n _id = id;\n }",
"public void setId(String id)\n {\n this.id = id;\n }",
"public void setId(String id)\n {\n data().put(_ID, id);\n }",
"public void setId(String id) {\r\n\t\tthis.id = id;\r\n\t}",
"public void setId(String id) {\r\n\t\tthis.id = id;\r\n\t}",
"public void setId(String id) {\r\n\t\tthis.id = id;\r\n\t}",
"public void setId(String id) {\r\n\t\tthis.id = id;\r\n\t}",
"public final void setId(final String id) {\r\n\t\tthis.id = id;\r\n\t}",
"public void setId(String id) {\r\n\t\tsId = id;\r\n\t}",
"public void setId(String id){\r\n\t\tthis.id = id;\r\n\t}",
"@javax.annotation.Nullable\n @ApiModelProperty(value = \"Define the identifier for the task.\")\n @JsonProperty(JSON_PROPERTY_ID)\n @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)\n\n public String getId() {\n return id;\n }",
"@Override\r\n\tpublic void setId(String id) {\n\t\tthis.id = id;\r\n\t}",
"public void setId(String id) {\n\t\tthis._id = id;\n\t}",
"public void setId(java.lang.String id) {\r\n this.id = id;\r\n }",
"public void setId(java.lang.String id) {\r\n this.id = id;\r\n }",
"public void setId(java.lang.String id) {\r\n this.id = id;\r\n }",
"public void setId(String id) {\r\n \t\tthis.id = id;\r\n \t}",
"public void setId(final java.lang.String id) {\n this.id = id;\n }",
"public void setId(final String id);",
"public void setId(final String id);",
"@Override\n\tpublic void setId(String id) {\n\t\tthis.id = id;\n\t}",
"public void setId(String id) {\n\t\tthis.id = id;\n\t}",
"public void setId(String id) {\n\t\tthis.id = id;\n\t}",
"public void setId(String id) {\n\t\tthis.id = id;\n\t}",
"public void setId(String id) {\n\t\tthis.id = id;\n\t}",
"public void setId(String id) {\n\t\tthis.id = id;\n\t}",
"public void setId(String id) {\n\t\tthis.id = id;\n\t}",
"public void setId(String id) {\n\t\tthis.id = id;\n\t}",
"public void setId(String id) {\n\t\tthis.id = id;\n\t}",
"public void setId(String id) {\n\t\tthis.id = id;\n\t}",
"public void setId(String id) {\n\t\tthis.id = id;\n\t}",
"public void setId(String id) {\n mId = id;\n }",
"void setId(final String id);",
"public void setId(java.lang.String id) {\n this.id = id;\n }",
"public void setId(java.lang.String id) {\n this.id = id;\n }",
"public void setId(final java.lang.String id) {\r\n this._id = id;\r\n }",
"protected void setId(final String id) {\r\n\t\tthis.id = id;\r\n\t}",
"public void setId(String id) {\n if (this.id == null) {\n this.id = id;\n }\n }",
"public void setId(java.lang.String value) {\n this.id = value;\n }",
"public void setId(java.lang.String value) {\n this.id = value;\n }",
"public void setId(java.lang.String value) {\n this.id = value;\n }",
"public void setId(String id)\n\t{\n\t\tthis.id = id;\n\t}",
"public void setId(String id) {\n this.id = id;\n }",
"public void setId(ID id)\n {\n this.id = id;\n }",
"public void setId (long id)\r\n {\r\n _id = id;\r\n }",
"public void setId(java.lang.String id) {\n this._id = id;\n }",
"public void setId(String id) {\n\t\t_id = id;\n\t}"
] | [
"0.69690776",
"0.69690776",
"0.68873245",
"0.685478",
"0.684091",
"0.682497",
"0.68179584",
"0.6817139",
"0.6817139",
"0.6817139",
"0.6817139",
"0.6817139",
"0.6817139",
"0.6815684",
"0.6815684",
"0.6809698",
"0.6780683",
"0.6780683",
"0.6780683",
"0.6780683",
"0.6780683",
"0.6780683",
"0.6780683",
"0.6780683",
"0.6780683",
"0.6780683",
"0.6780683",
"0.6780683",
"0.6780683",
"0.6780683",
"0.6780683",
"0.6780683",
"0.6780683",
"0.6780683",
"0.6780683",
"0.6780683",
"0.6780683",
"0.6780683",
"0.6780683",
"0.6780683",
"0.6780683",
"0.6780683",
"0.6780683",
"0.6780683",
"0.6780683",
"0.6780683",
"0.6780683",
"0.6780683",
"0.6780683",
"0.6780683",
"0.6771527",
"0.67644465",
"0.67644465",
"0.67644465",
"0.67621624",
"0.6743933",
"0.67381555",
"0.67250586",
"0.67250586",
"0.67250586",
"0.67250586",
"0.67216086",
"0.6711383",
"0.67092067",
"0.66975075",
"0.669717",
"0.6662362",
"0.6653875",
"0.6653875",
"0.6653875",
"0.6647404",
"0.6637092",
"0.6635093",
"0.6635093",
"0.66348124",
"0.66308516",
"0.66308516",
"0.66308516",
"0.66308516",
"0.66308516",
"0.66308516",
"0.66308516",
"0.66308516",
"0.66308516",
"0.66308516",
"0.66265124",
"0.6624344",
"0.6621035",
"0.6621035",
"0.6620406",
"0.6609367",
"0.66056836",
"0.66010237",
"0.66010237",
"0.66010237",
"0.65889925",
"0.6578555",
"0.65757704",
"0.65636736",
"0.6544983",
"0.6537833"
] | 0.0 | -1 |
Get the resourceId property: Fully qualified ID of the resource against which the original async operation was started. | public String resourceId() {
return this.resourceId;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getResourceId() {\n return resourceId;\n }",
"public String getResourceId() {\r\n\t\treturn resourceId;\r\n\t}",
"public String getResourceId() {\n\t\treturn resourceId;\n\t}",
"public String getResourceId() {\n\t\treturn resourceId;\n\t}",
"public Integer getResourceId() {\n return resourceId;\n }",
"public String getResourceID() {\n\t\treturn resourceID;\n\t}",
"public String getResourceId() {\n return this.resourceId;\n }",
"public String getResourceId() {\n return this.resourceId;\n }",
"public int getResourceId() {\n\t\t\treturn resourceId;\n\t\t}",
"@Schema(description = \"Subscription ID for the event\")\n public UUID getResourceId() {\n return resourceId;\n }",
"public java.lang.Object getInitiatingResourceID() {\n return initiatingResourceID;\n }",
"public int getResourceID() {\n\t\treturn m_resourceID;\n\t}",
"public String getResourceId();",
"int getResourceId();",
"public final String getResourceId(\n ExecutionContext context,\n ExecutionScript script) throws InterruptedException, IOException {\n return resourceId;\n }",
"public String getResourceId() {\n return this.ResourceId;\n }",
"public Long getResourceId(){\n return id;\n }",
"protected abstract ID getResourceId(T resource);",
"protected final XMLResourceIdentifier resourceId() {\n /***/\n fResourceId.clear();\n return fResourceId;\n}",
"String resourceGuid();",
"java.lang.String getOperationId();",
"String getResourceID();",
"public String getResouceId() {\n return id;\n }",
"OperationIdT getOperationId();",
"@Path(\"sourceId/\")\n public SourceResource getSourceIdResource() {\n SourceIdResourceSub resource = resourceContext.getResource(SourceIdResourceSub.class);\n resource.setParent(getEntity());\n return resource;\n }",
"public String targetResourceId() {\n return this.targetResourceId;\n }",
"public final ResourceLocation getIdentifier() {\n return identifier;\n }",
"ResourceID getHeartbeatTargetId();",
"String getForOperationId();",
"@javax.annotation.Nullable\n @ApiModelProperty(value = \"Define the identifier for the task.\")\n @JsonProperty(JSON_PROPERTY_ID)\n @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)\n\n public String getId() {\n return id;\n }",
"public String managedIdentityResourceId() {\n return this.managedIdentityResourceId;\n }",
"static public int getResourceId(ObjectNode schemeId)\n\t{\n\t\treturn schemeId.path(\"resourceId\").asInt(0);\n\t}",
"@JsonIgnore\n public String getId() {\n return UriHelper.getLastUriPart(getUri());\n }",
"public Object getCorrelationId()\n {\n return getUnderlyingId(false);\n }",
"public UUID executionId();",
"public String getOriginalId()\r\n {\r\n return originalId;\r\n }",
"public ResourceId component() {\n return this.component;\n }",
"com.google.protobuf.ByteString getOperationIdBytes();",
"@Nullable\n public String getResourceKey() {\n return mResourceKey;\n }",
"protected String getIdentifier() {\n return getBaseUrl() + normalizePath(getRequest().getPath());\n }",
"public Integer getOperationId() {\n return operationId;\n }",
"public String getOperationId() {\n return this.operationId;\n }",
"public static int getImageResourceId() {\n return mImageResourceId;\n }",
"public String correlationId() {\n return correlationId;\n }",
"public String sourceResourceId() {\n return this.sourceResourceId;\n }",
"public String sourceResourceId() {\n return this.sourceResourceId;\n }",
"public String getOrigId () {\n return origId;\n }",
"public String getOrigId () {\n return origId;\n }",
"public String getOperationID() {\n\t\treturn operationId;\n\t}",
"String getExistingId();",
"public String keyVaultResourceArmId() {\n return this.keyVaultResourceArmId;\n }",
"public String targetResourceGroupId() {\n return this.targetResourceGroupId;\n }",
"@ApiModelProperty(value = \"Uniquely identifies the resource within the collection of like resources.\")\n @JsonProperty(\"Id\")\n public String getId() {\n return id;\n }",
"String getExecRefId();",
"public Optional<String> getOperationId() {\n return operationId;\n }",
"public String getEndpointId()\n {\n return endpointId; // Field is final; no need to sync.\n }",
"Optional<CompletableFuture<List<ResourceModel>>> generateResource(ResourceModel resource) throws IllegalIDException;",
"@Override\n public URI getId() {\n return id;\n }",
"public Resource getPrimaryResource() {\n return primaryResource;\n }",
"public String getBindingItemIdResourceBlob(){\n return resourceBlobBindingSetItemId;\n }",
"public final String getId() {\n return id;\n }",
"@DISPID(-2147417110)\n @PropGet\n java.lang.String id();",
"public byte getResponseId() {\n return responseId;\n }",
"IIdType getEncodeForceResourceId();",
"public String getResourceId1Sql()\r\n \t{\r\n \t\treturn \"select RESOURCE_ID from CONTENT_RESOURCE where RESOURCE_UUID=?\";\r\n \t}",
"final protected int getId() {\n\t\treturn id;\n\t}",
"public int getImageResourceId() {\n return mImageResourceId;\n }",
"public int getImageResourceId() {\n return mImageResourceId;\n }",
"public int getImageResourceId() {\n return mImageResourceId;\n }",
"public int getImageResourceId() {\n return mImageResourceId;\n }",
"public int getImageResourceId() {\n return mImageResourceId;\n }",
"long getRpcId();",
"public Integer getsId() {\n return sId;\n }",
"public int getImageResourceId() {\r\n return mImageResourceId;\r\n }",
"public String getResponseId() {\n return responseId;\n }",
"public static int getCurrentId() {\n return currentId;\n }",
"public String getId() {\n return _theId;\n }",
"public String getIdString() {\n return Server.getChunkIdString(this.parent.getSourceFile().getId(), this.chunkID);\n }",
"@java.lang.Override\n public int getId() {\n return id_;\n }",
"@java.lang.Override\n public int getId() {\n return id_;\n }",
"@java.lang.Override\n public int getId() {\n return id_;\n }",
"@java.lang.Override\n public int getId() {\n return id_;\n }",
"java.lang.String getWorkerId();",
"public void setResourceId(Integer resourceId) {\n this.resourceId = resourceId;\n }",
"public String jobRunResourceId() {\n return this.jobRunResourceId;\n }",
"@java.lang.Override\n public int getId() {\n return id_;\n }",
"@java.lang.Override\n public int getId() {\n return id_;\n }",
"public String getIdrequest() {\r\n\t\treturn idrequest;\r\n\t}",
"public String getParentId() {\n return getProperty(Property.PARENT_ID);\n }",
"public void setResourceId(String resourceId) {\r\n\t\tthis.resourceId = resourceId;\r\n\t}",
"@java.lang.Override\n public int getId() {\n return id_;\n }",
"@java.lang.Override\n public int getId() {\n return id_;\n }",
"String getExecId();",
"public abstract T getCreatedResource();",
"public String getResourceName() {\n return this.resourceName;\n }",
"public void setResourceId(String resourceId) {\n this.resourceId = resourceId;\n }"
] | [
"0.7337493",
"0.7234258",
"0.72169274",
"0.72169274",
"0.7137223",
"0.7099857",
"0.7004769",
"0.7004769",
"0.69863963",
"0.6875371",
"0.6863754",
"0.6739936",
"0.66907954",
"0.6632598",
"0.65579224",
"0.654697",
"0.6500709",
"0.64278936",
"0.63770247",
"0.63503855",
"0.6323254",
"0.6273899",
"0.6269894",
"0.6261887",
"0.6244759",
"0.62411124",
"0.62390673",
"0.61531526",
"0.60828143",
"0.5983028",
"0.5965744",
"0.5939747",
"0.5890515",
"0.58851874",
"0.58617",
"0.58591473",
"0.58503896",
"0.5827984",
"0.5710493",
"0.56881523",
"0.56879705",
"0.56655747",
"0.5658724",
"0.5645405",
"0.5645354",
"0.5645354",
"0.5625504",
"0.5625504",
"0.56176174",
"0.5602761",
"0.5588742",
"0.5575699",
"0.55728596",
"0.5532791",
"0.55272156",
"0.5525744",
"0.55210865",
"0.5500808",
"0.54973775",
"0.54938465",
"0.5482949",
"0.5466515",
"0.545812",
"0.5458018",
"0.54388785",
"0.54386073",
"0.5435297",
"0.5435297",
"0.5435297",
"0.5435297",
"0.5435297",
"0.54258144",
"0.54210305",
"0.54104227",
"0.5409169",
"0.54081374",
"0.5405764",
"0.5402474",
"0.53933775",
"0.53933775",
"0.53933775",
"0.53933775",
"0.5392504",
"0.53897357",
"0.53746146",
"0.5369453",
"0.5369453",
"0.53683287",
"0.53675807",
"0.53660715",
"0.53624386",
"0.53624386",
"0.5362241",
"0.53617054",
"0.5359879",
"0.5358797"
] | 0.7454725 | 4 |
Get the name property: Name of the async operation. | public String name() {
return this.name;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\t/**\n\t * @return commandName\n\t */\n\tpublic String getOperationName() {\n\t\treturn commandName;\n\t}",
"public java.lang.String getOperationName(){\n return localOperationName;\n }",
"@XmlElement(name = \"operationName\", namespace = Namespaces.SRV)\n final String getOperationName() {\n if (LEGACY_XML) {\n final OperationMetadata operation = getOperation();\n if (operation != null) {\n return operation.getOperationName();\n }\n }\n return null;\n }",
"public String getName()\r\n {\r\n return taskName;\r\n }",
"@Override\r\n\tpublic String getOperationName() {\n\t\treturn null;\r\n\t}",
"public final String name() {\n return name;\n }",
"public final String name() {\n\t\treturn name;\n\t}",
"String getTaskName();",
"String getTaskName();",
"public String name() {\n this.use();\n\n return name;\n }",
"Object getName() {\n return name;\n }",
"public final String getName() {\n return name;\n }",
"public String getTaskName();",
"public String getName()\r\n\t{\r\n\t\treturn name; // gives the value of the name to the caller\r\n\t}",
"public final String getName()\n {\n return name;\n }",
"public final String getName() {\n return name;\n }",
"public final String getName() {\n return name;\n }",
"public final String getName() {\n return name;\n }",
"public final String getName() {\n return name;\n }",
"public final String getName() {\n return name;\n }",
"public final String getName() {\r\n return name;\r\n }",
"private String getName() {\n\t\treturn name;\n\t}",
"public final String name ()\r\n {\r\n return _name;\r\n }",
"public String getName() {\n return name.get();\n }",
"@Nullable\n @Override\n public String getName() {\n return /*this.requestMethod + \" \" +*/ this.url;\n }",
"@Override\n\tpublic String getName() {\n\n\t\treturn name;\n\t}",
"@Required\n public String getName() {\n return name;\n }",
"@Required\n public String getName() {\n return name;\n }",
"@Required\n public String getName() {\n return name;\n }",
"public String getName() {\n return name;\n }",
"public String getName() {\n return name;\n }",
"public String getName() {\n return name;\n }",
"public RemoteCall<String> name() {\n final Function function = new Function(FUNC_NAME,\n Arrays.<Type>asList(),\n Arrays.<TypeReference<?>>asList(new TypeReference<Utf8String>() {}));\n return executeRemoteCallSingleValueReturn(function, String.class);\n }",
"public final String getName() {\n return name;\n }",
"@Basic @Immutable\n\tpublic String getName() {\n\t\treturn name;\n\t}",
"public String getName() {\n return name_;\n }",
"public String name() {\n return name;\n }",
"public String getName() {\n return name_;\n }",
"public String getName() {\n return name_;\n }",
"public String getName() {\n return name_;\n }",
"public String getName() {\r\n\t\treturn name.get();\r\n\t}",
"@Override\n\tpublic String name() {\n\n\t\treturn NAME;\n\t}",
"@ApiModelProperty(example = \"null\", value = \"The name of the reporting task.\")\n public String getName() {\n return name;\n }",
"public String getName() {\n return name;\r\n }",
"String name() {\n return name;\n }",
"public String getName() {\n return name;\n }",
"public String getName() {\n return name;\n }",
"@ApiModelProperty(example = \"nodeinfo\", required = true, value = \"The name of the function\")\n public String getName() {\n return name;\n }",
"public static String getName()\n {\n read_if_needed_();\n \n return _get_name;\n }",
"public String getTaskName() {\n Object ref = taskName_;\n if (ref instanceof String) {\n return (String) ref;\n } else {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n taskName_ = s;\n return s;\n }\n }",
"@Override\n public String name() {\n return this._name;\n }",
"public String getName() {\r\n return name;\r\n }",
"public String getName() {\r\n return name;\r\n }",
"public String getName() {\r\n return name;\r\n }",
"public String getName() {\r\n return name;\r\n }",
"public java.lang.String getName();",
"public String getName() {\n\t\treturn name;\r\n\t}",
"public String getName() {\n\t\treturn name;\r\n\t}",
"public String getName() {\n\t\treturn name;\r\n\t}",
"public String getName() {\n return name;\n }",
"public String getName() {\n return name;\n }",
"public String getName() {\n return name;\n }",
"public String getName() {\n return name;\n }",
"public String getName() {\n return name;\n }",
"public String getName() {\n return name;\n }",
"public String getName() {\n return name;\n }",
"public String getName() {\n return name;\n }",
"public String getName() {\n return name;\n }",
"public String getName() {\n return name;\n }",
"public String getName() {\n return name;\n }",
"public String getName() {\n return name;\n }",
"public String getName() {\n return name;\n }",
"public String getName() {\n return name;\n }",
"public String getName() {\n return name;\n }",
"public String getName() {\n return name;\n }",
"public String getName() {\n return name;\n }",
"public String getName() {\n return name;\n }",
"public String getName() {\n return name;\n }",
"public String getName() {\n return name;\n }",
"public String getName() {\n return name;\n }",
"public String getName() {\n return name;\n }",
"public String getName() {\n return name;\n }",
"public String getName() {\n return name;\n }",
"public String getName() {\n return name;\n }",
"public String getName() {\n return name;\n }",
"public String getName() {\n return name;\n }",
"public String getName() {\n return name;\n }",
"public String getName() {\n return name;\n }",
"public String getName() {\n return name;\n }",
"public String getName() {\n return name;\n }",
"public String getName() {\n return name;\n }",
"public String getName() {\n return name;\n }",
"public String getName() {\n return name;\n }",
"public String getName() {\n return name;\n }",
"public String getName() {\n return name;\n }",
"public String getName() {\n return name;\n }",
"public String getName() {\n return name;\n }",
"public String getName() {\n return name;\n }",
"public String getName() {\n return name;\n }",
"public String getName() {\n return name;\n }",
"public String getName() {\n return name;\n }"
] | [
"0.6949375",
"0.6932156",
"0.67938155",
"0.6724194",
"0.6660321",
"0.6581226",
"0.64827687",
"0.6453153",
"0.6453153",
"0.6452976",
"0.64152265",
"0.6403212",
"0.6402563",
"0.6362366",
"0.63591695",
"0.6354141",
"0.6354141",
"0.6354141",
"0.6354141",
"0.6354141",
"0.63511395",
"0.63510686",
"0.6346999",
"0.6342228",
"0.6341729",
"0.6337972",
"0.6335207",
"0.6335207",
"0.6335207",
"0.6335197",
"0.6335197",
"0.6335197",
"0.63332635",
"0.63330925",
"0.6319216",
"0.63181996",
"0.6309195",
"0.6308536",
"0.6308536",
"0.6308536",
"0.63048255",
"0.63008314",
"0.63007116",
"0.63002723",
"0.62987536",
"0.629534",
"0.629534",
"0.6292941",
"0.62894547",
"0.6288951",
"0.62847686",
"0.6280501",
"0.6280501",
"0.6280501",
"0.6280501",
"0.6276279",
"0.6276093",
"0.6276093",
"0.6276093",
"0.62685966",
"0.62685966",
"0.62685966",
"0.62685966",
"0.62685966",
"0.62685966",
"0.62685966",
"0.62685966",
"0.62685966",
"0.62685966",
"0.62685966",
"0.62685966",
"0.62685966",
"0.62685966",
"0.62685966",
"0.62685966",
"0.62685966",
"0.62685966",
"0.62685966",
"0.62685966",
"0.62685966",
"0.62685966",
"0.62685966",
"0.62685966",
"0.62685966",
"0.62685966",
"0.62685966",
"0.62685966",
"0.62685966",
"0.62685966",
"0.62685966",
"0.62685966",
"0.62685966",
"0.62685966",
"0.62685966",
"0.62685966",
"0.62685966",
"0.62685966",
"0.62685966",
"0.62685966",
"0.62685966",
"0.62685966"
] | 0.0 | -1 |
Set the name property: Name of the async operation. | public OperationStatusResultInner withName(String name) {
this.name = name;
return this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void setName(String name) {\n this.name = name;\n }",
"@Override\n public void setName(String name) {\n this.name = name;\n }",
"@Override\r\n\tpublic void setTaskName(String name) {\n\r\n\t}",
"@Override\n public void setName(String name)\n {\n checkState();\n this.name = name;\n }",
"@Override\n public void setName(String name) {\n this.name = name;\n }",
"@Override\n public void setName(String name) {\n this.name = name;\n }",
"public void setName (String name) {\n this.name = name;\n }",
"public void setName (String name) {\n this.name = name;\n }",
"public void setName (String name) {\n this.name = name;\n }",
"@Override\r\n\tpublic void setName(String name) {\n\t\tthis.name = name;\r\n\t}",
"@Override\n\t\t\tpublic void setTaskName(String name) {\n\t\t\t\t\n\t\t\t}",
"public void setName (String name) {\n this.name = name;\n }",
"public void setName(String name) {\r\n this.name = name;\r\n }",
"public void setName(String name) {\r\n this.name = name;\r\n }",
"public void setName(String name) {\r\n this.name = name;\r\n }",
"public void setName(String name) {\r\n this.name = name;\r\n }",
"public void setName(String name) {\r\n this.name = name;\r\n }",
"public void setName(String name) {\r\n this.name = name;\r\n }",
"public void setName(String name) {\r\n this.name = name;\r\n }",
"public void setName(String name) {\r\n this.name = name;\r\n }",
"public void setName(String name) {\r\n this.name = name;\r\n }",
"public void setName(String name) {\r\n this.name = name;\r\n }",
"public void setName(String name) {\r\n this.name = name;\r\n }",
"public void setName(String name) {\r\n this.name = name;\r\n }",
"public void setName(String name) {\r\n this.name = name;\r\n }",
"public void setName(String name) {\r\n this.name = name;\r\n }",
"public void setName(String name) {\r\n this.name = name;\r\n }",
"public void setName(String name) {\r\n this.name = name;\r\n }",
"public void setName(String name) {\r\n this.name = name;\r\n }",
"public void setName(String name) {\r\n this.name = name;\r\n }",
"public void setName(String name) {\r\n this.name = name;\r\n }",
"public void setName(String name) {\r\n this.name = name;\r\n }",
"public void setName(String name) {\r\n this.name = name;\r\n }",
"public void setName(String name) {\r\n this.name = name;\r\n }",
"public final void setName(String name) {_name = name;}",
"public void setName(String name) {\n this.name = name;\n }",
"public void setName(String name) {\n this.name = name;\n }",
"public void setName(String name) {\n this.name = name;\n }",
"public void setName(String name) {\n this.name = name;\n }",
"public void setName(String name) {\r\n this.name = name;\r\n }",
"public void setName(String name) {\n this.name = name;\n }",
"public void setName(String name) {\n this.name = name;\n }",
"public void setName(String name) {\n this.name = name;\n }",
"public void setName(String name) {\n this.name = name;\n }",
"public void setName(String name) {\n this.name = name;\n }",
"public void setName(String name) {\n this.name = name;\n }",
"public void setName(String name) {\n this.name = name;\n }",
"public void setName(String name) {\n this.name = name;\n }",
"public void setName(String name) {\n this.name = name;\n }",
"public void setName(String name) {\n this.name = name;\n }",
"public void setName(String name) {\n this.name = name;\n }",
"public void setName(String name) {\n _name = name;\n }",
"public void setOperationName(java.lang.String param){\n localOperationNameTracker = true;\n \n this.localOperationName=param;\n \n\n }",
"public void setName(final String name) {\n this.name = name;\n }",
"public void setName(final String name) {\n this.name = name;\n }",
"public void setName(String name) {\n this.name = name;\n }",
"public void setName(String name) {\n this.name = name;\n }",
"public void setName(String name) {\n this.name = name;\n }",
"public void setName(String name) {\n this.name = name;\n }",
"public void setName(String name) {\n this.name = name;\n }",
"public void setName(String name) {\n this.name = name;\n }",
"public void setName(String name) {\n this.name = name;\n }",
"public void setName(String name) {\n this.name = name;\n }",
"public void setName(String name) {\n this.name = name;\n }",
"public void setName(String name) {\n this.name = name;\n }",
"public void setName(String name) {\n this.name = name;\n }",
"public void setName(String name) {\n this.name = name;\n }",
"public void setName(String name) {\n this.name = name;\n }",
"public void setName(String name) {\n this.name = name;\n }",
"public void setName(String name) {\n this.name = name;\n }",
"public void setName(String name) {\n this.name = name;\n }",
"public void setName(String name) {\n this.name = name;\n }",
"public void setName(String name) {\n this.name = name;\n }",
"public void setName(String name) {\n this.name = name;\n }",
"public void setName(String name) {\n this.name = name;\n }",
"public void setName(String name) {\n this.name = name;\n }",
"public void setName(String name) {\n this.name = name;\n }",
"public void setName(String name) {\n this.name = name;\n }",
"public void setName(String name) {\n this.name = name;\n }",
"public void setName(String name) {\n this.name = name;\n }",
"public void setName(String name) {\n this.name = name;\n }",
"public void setName(String name) {\n this.name = name;\n }",
"public void setName(String name) {\n this.name = name;\n }",
"public void setName(String name) {\n this.name = name;\n }",
"public void setName(String name) {\n this.name = name;\n }",
"public void setName(String name) {\n this.name = name;\n }",
"public void setName(String name) {\n this.name = name;\n }",
"public void setName(String name) {\n this.name = name;\n }",
"public void setName(String name) {\n this.name = name;\n }",
"public void setName(String name) {\n this.name = name;\n }",
"public void setName(String name) {\n this.name = name;\n }",
"public void setName(String name) {\n this.name = name;\n }",
"public void setName(String name) {\n this.name = name;\n }",
"public void setName(String name) {\n this.name = name;\n }",
"public void setName(String name) {\n this.name = name;\n }",
"public void setName(String name) {\n this.name = name;\n }",
"public void setName(String name) {\n this.name = name;\n }",
"public void setName(String name) {\n this.name = name;\n }",
"public void setName(String name) {\n this.name = name;\n }",
"public void setName(String name) {\n this.name = name;\n }",
"public void setName(String name) {\n this.name = name;\n }"
] | [
"0.66972935",
"0.66972935",
"0.6686754",
"0.6674699",
"0.6647442",
"0.6647442",
"0.66378194",
"0.66378194",
"0.66378194",
"0.66375047",
"0.66346043",
"0.6622826",
"0.6618679",
"0.6618679",
"0.6618679",
"0.66112715",
"0.66112715",
"0.66112715",
"0.66112715",
"0.66112715",
"0.66112715",
"0.66112715",
"0.66112715",
"0.66112715",
"0.66112715",
"0.66112715",
"0.66112715",
"0.66112715",
"0.66112715",
"0.66112715",
"0.66112715",
"0.66112715",
"0.66112715",
"0.66112715",
"0.66098386",
"0.66035366",
"0.66035366",
"0.66035366",
"0.66035366",
"0.66016394",
"0.6601477",
"0.6601477",
"0.6601477",
"0.6601477",
"0.6601477",
"0.6601477",
"0.6601477",
"0.6601477",
"0.6601477",
"0.6601477",
"0.6601477",
"0.65964377",
"0.6593692",
"0.659249",
"0.659249",
"0.659083",
"0.659083",
"0.659083",
"0.659083",
"0.659083",
"0.659083",
"0.659083",
"0.659083",
"0.659083",
"0.659083",
"0.659083",
"0.659083",
"0.659083",
"0.659083",
"0.659083",
"0.659083",
"0.659083",
"0.659083",
"0.659083",
"0.659083",
"0.659083",
"0.659083",
"0.659083",
"0.659083",
"0.659083",
"0.659083",
"0.659083",
"0.659083",
"0.659083",
"0.659083",
"0.659083",
"0.659083",
"0.659083",
"0.659083",
"0.659083",
"0.659083",
"0.659083",
"0.659083",
"0.659083",
"0.659083",
"0.659083",
"0.659083",
"0.659083",
"0.659083",
"0.659083",
"0.659083"
] | 0.0 | -1 |
Get the status property: Operation status. | public String status() {
return this.status;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"OperationStatusType status();",
"public Integer getStatus() {\n return this.status;\n }",
"public String getStatus() {\n return getProperty(Property.STATUS);\n }",
"public Integer getStatus() {\n\t\treturn status;\n\t}",
"public Integer getStatus() {\n\t\treturn status;\n\t}",
"public Integer getStatus() {\r\n return status;\r\n }",
"public Integer getStatus() {\r\n return status;\r\n }",
"public Integer getStatus() {\n return status;\n }",
"public Integer getStatus() {\n return status;\n }",
"public Integer getStatus() {\n return status;\n }",
"public Integer getStatus() {\n return status;\n }",
"public Integer getStatus() {\n return status;\n }",
"public Integer getStatus() {\n return status;\n }",
"public Integer getStatus() {\n return status;\n }",
"public Integer getStatus() {\n return status;\n }",
"public Integer getStatus() {\n return status;\n }",
"public Integer getStatus() {\n return status;\n }",
"public Integer getStatus() {\n return status;\n }",
"public Integer getStatus() {\n return status;\n }",
"public Integer getStatus() {\n return status;\n }",
"public Integer getStatus() {\n return status;\n }",
"public Integer getStatus() {\n return status;\n }",
"public Integer getStatus() {\n return status;\n }",
"public Integer getStatus() {\n return status;\n }",
"public Integer getStatus() {\n return status;\n }",
"public Integer getStatus() {\n return status;\n }",
"public Integer getStatus() {\n return status;\n }",
"com.google.container.v1beta1.Operation.Status getStatus();",
"public java.lang.Object getStatus() {\n return status;\n }",
"public int getStatus() {\n return status_;\n }",
"public int getStatus() {\n return status_;\n }",
"public int getStatus() {\n return status_;\n }",
"public int getStatus() {\n return status_;\n }",
"public int getStatus() {\n return status_;\n }",
"public int getStatus() {\n return status_;\n }",
"public int getStatus() {\n return status_;\n }",
"public int getStatus() {\n return status_;\n }",
"public int getStatus() {\n return status_;\n }",
"public int getStatus(){\r\n\t\treturn this.status;\r\n\t}",
"public int getStatus() {\n return status_;\n }",
"public int getStatus() {\n return status_;\n }",
"public int getStatus() {\n return status_;\n }",
"public int getStatus() {\n return status_;\n }",
"public int getStatus() {\n return status_;\n }",
"public int getStatus() {\n return status_;\n }",
"public int getStatus() {\n return status_;\n }",
"public int getStatus() {\n return status_;\n }",
"public int getStatus() {\n return status_;\n }",
"public Status getStatus()\n {\n return (this.status);\n }",
"public int getStatus()\r\n\t{\r\n\t\treturn this.m_status;\r\n\t}",
"public int getStatus ()\n {\n return status;\n }",
"public int getStatus ()\n {\n return status;\n }",
"public String getStatus(){\n\t\t\n\t\treturn this.status;\n\t}",
"public int getStatus() {\n return status;\n }",
"public int getStatus() {\n return status;\n }",
"public int getStatus() {\n return status;\n }",
"public int getStatus() {\n return status;\n }",
"public int getStatus() {\n return status;\n }",
"public Long getStatus() {\n return this.Status;\n }",
"public String getStatus() {\n return this.status;\n }",
"public String getStatus() {\n return this.status;\n }",
"public String getStatus() {\n return this.status;\n }",
"public String getStatus() {\n return this.status;\n }",
"public String getStatus() {\n return this.status;\n }",
"public String getStatus() {\n return this.status;\n }",
"public String getStatus() {\n return this.status;\n }",
"public String getStatus() {\n\t\treturn _status;\n\t}",
"public Status getStatus() {\n\t\treturn status;\n\t}",
"public long getStatus() {\r\n return status;\r\n }",
"public Status getStatus()\n\t{\n\t\treturn status;\n\t}",
"public String getStatus () {\r\n return status;\r\n }",
"public java.lang.String getStatus() {\r\n return status;\r\n }",
"public String getStatus() {\n return status.toString();\n }",
"public String getStatus() {\n return _status;\n }",
"public java.lang.String getStatus() {\n return status;\n }",
"public java.lang.String getStatus() {\n return status;\n }",
"public String getStatus() {\r\n\t\treturn status;\r\n\t}",
"public String getStatus() {\r\n\t\treturn status;\r\n\t}",
"public String getStatus() {\r\n\t\treturn status;\r\n\t}",
"public String getStatus() {\r\n\t\treturn status;\r\n\t}",
"public String getStatus() {\r\n\t\treturn status;\r\n\t}",
"public String getStatus() {\n return status;\n }",
"public int getStatus()\n {\n return status;\n }",
"public String getStatus() {\n return this.Status;\n }",
"public String getStatus() {\n return this.Status;\n }",
"public String getStatus() {\n\t\treturn status;\n\t}",
"public String getStatus() {\n\t\treturn status;\n\t}",
"public String getStatus() {\n\t\treturn status;\n\t}",
"public String getStatus() {\n\t\treturn status;\n\t}",
"public String getStatus() {\r\n return status;\r\n }",
"public String getStatus() {\r\n return status;\r\n }",
"public String getStatus() {\r\n return status;\r\n }",
"public String getStatus() {\r\n return status;\r\n }",
"public String getStatus() {\r\n return status;\r\n }",
"public Status getStatus() {\r\n return status;\r\n }",
"public java.lang.String getStatus () {\r\n\t\treturn status;\r\n\t}",
"public String getStatus() {\r\n return status;\r\n }",
"public String getStatus() {\r\n return status;\r\n }",
"public StatusEnum getStatus() {\n return status;\n }",
"public java.lang.String getStatus() {\n\t\treturn status;\n\t}",
"public java.lang.String getStatus() {\n\t\treturn status;\n\t}"
] | [
"0.85924244",
"0.79437166",
"0.79148835",
"0.79070115",
"0.79070115",
"0.7887185",
"0.7887185",
"0.78761",
"0.78761",
"0.78761",
"0.78761",
"0.78761",
"0.78761",
"0.78761",
"0.78761",
"0.78761",
"0.78761",
"0.78761",
"0.78761",
"0.78761",
"0.78761",
"0.78761",
"0.78761",
"0.78761",
"0.78761",
"0.78761",
"0.78761",
"0.782061",
"0.78135854",
"0.7797393",
"0.7797393",
"0.7797393",
"0.7797393",
"0.7797393",
"0.7797393",
"0.7797393",
"0.7797393",
"0.7797393",
"0.7784593",
"0.7777669",
"0.7777669",
"0.7777669",
"0.7777669",
"0.7777669",
"0.7777669",
"0.7777669",
"0.7777669",
"0.7777669",
"0.77768844",
"0.77712625",
"0.7761841",
"0.7761841",
"0.7758114",
"0.7736505",
"0.7736505",
"0.7736505",
"0.7736505",
"0.7736505",
"0.77352965",
"0.7719738",
"0.7719738",
"0.7719738",
"0.7719738",
"0.7719738",
"0.7719738",
"0.7719738",
"0.7714315",
"0.768803",
"0.7685535",
"0.7681842",
"0.76765484",
"0.7671773",
"0.7669235",
"0.7667658",
"0.766531",
"0.766531",
"0.76641583",
"0.76641583",
"0.76641583",
"0.76641583",
"0.76641583",
"0.7658563",
"0.76545125",
"0.76454914",
"0.76454914",
"0.7644262",
"0.7644262",
"0.7644262",
"0.7644262",
"0.7640183",
"0.7640183",
"0.7640183",
"0.7640183",
"0.7640183",
"0.76352614",
"0.76280576",
"0.76241374",
"0.76241374",
"0.7621706",
"0.76209176",
"0.76209176"
] | 0.0 | -1 |
Set the status property: Operation status. | public OperationStatusResultInner withStatus(String status) {
this.status = status;
return this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setStatus(long status) {\r\n this.status = status;\r\n }",
"public void setStatus(Integer status) {\r\n this.status = status;\r\n }",
"public void setStatus(Integer status) {\r\n this.status = status;\r\n }",
"public void setStatus(Integer status)\n {\n data().put(_STATUS, status);\n }",
"public void setStatus(Integer status) {\n this.status = status;\n }",
"public void setStatus(Integer status) {\n this.status = status;\n }",
"public void setStatus(Integer status) {\n this.status = status;\n }",
"public void setStatus(Integer status) {\n this.status = status;\n }",
"public void setStatus(Integer status) {\n this.status = status;\n }",
"public void setStatus(Integer status) {\n this.status = status;\n }",
"public void setStatus(Integer status) {\n this.status = status;\n }",
"public void setStatus(Integer status) {\n this.status = status;\n }",
"public void setStatus(Integer status) {\n this.status = status;\n }",
"public void setStatus(Integer status) {\n this.status = status;\n }",
"public void setStatus(Integer status) {\n this.status = status;\n }",
"public void setStatus(Integer status) {\n this.status = status;\n }",
"public void setStatus(Integer status) {\n this.status = status;\n }",
"public void setStatus(Integer status) {\n this.status = status;\n }",
"public void setStatus(Integer status) {\n this.status = status;\n }",
"public void setStatus(Integer status) {\n this.status = status;\n }",
"public void setStatus(Integer status) {\n this.status = status;\n }",
"public void setStatus(Integer status) {\n this.status = status;\n }",
"public void setStatus(Integer status) {\n this.status = status;\n }",
"public void setStatus(STATUS status) {\n this.status = status;\n }",
"public void setStatus(int status) {\n this.status = status;\n }",
"public void setStatus(int status) {\n this.status = status;\n }",
"public void setStatus(int value) {\n this.status = value;\n }",
"public void setStatus(int value) {\n this.status = value;\n }",
"public void setStatus(int status) {\n STATUS = status;\n }",
"public void setStatus(Integer status) {\n\t\tthis.status = status;\n\t}",
"public void setStatus(Integer status) {\n\t\tthis.status = status;\n\t}",
"public void setStatus(Status status) {\r\n\t this.status = status;\r\n\t }",
"public void setStatus(StatusEnum status) {\n this.status = status;\n }",
"public void setStatus(Status status) {\r\n this.status = status;\r\n }",
"public void setStatus(int status){\r\n\t\tthis.status=status;\r\n\t}",
"public void setStatus(int status)\r\n\t{\r\n\t\tthis.m_status = status;\r\n\t}",
"public void setStatus(EnumVar status) {\n this.status = status;\n }",
"public void setStatus(java.lang.Object status) {\n this.status = status;\n }",
"public void setStatus(Status status) {\n this.status = status;\n }",
"public void setStatus(Status status) {\n this.status = status;\n }",
"public void setStatus(Status status) {\n this.status = status;\n }",
"public void setStatus(Status status) {\n this.status = status;\n }",
"public void setStatus(Status status)\n {\n this.status = status;\n }",
"public void setStatus(int status);",
"public void setStatus(int status);",
"public void setStatus(@NotNull Status status) {\n this.status = status;\n }",
"public void setStatus(int status) {\n\t\tthis.status = (byte) status;\n\t\trefreshStatus();\n\t}",
"public void setStatus(String status) {\r\n this.status = status;\r\n }",
"void setStatus(STATUS status);",
"public void setStatus(String status) {\r\n this.status = status;\r\n }",
"public void setStatus(String status) {\r\n this.status = status;\r\n }",
"public void setStatus(String status) { this.status = status; }",
"public void setStatus(int v) \n {\n \n if (this.status != v)\n {\n this.status = v;\n setModified(true);\n }\n \n \n }",
"public void setStatus(Byte status) {\r\n this.status = status;\r\n }",
"public void setStatus(Byte status) {\r\n this.status = status;\r\n }",
"public void setStatus(Byte status) {\r\n this.status = status;\r\n }",
"public void setStatus(Byte status) {\r\n this.status = status;\r\n }",
"public void setStatus(Byte status) {\r\n this.status = status;\r\n }",
"public void setStatus(Byte status) {\r\n this.status = status;\r\n }",
"public void setStatus(Byte status) {\r\n this.status = status;\r\n }",
"public void setStatus(String status) {\n this.status = status;\n }",
"public void setStatus(String status) {\n this.status = status;\n }",
"public void setStatus(String status) {\n this.status = status;\n }",
"public void setStatus(String status) {\n this.status = status;\n }",
"public void setStatus(String status) {\n this.status = status;\n }",
"public void setStatus(String status) {\n this.status = status;\n }",
"public void setStatus(String status) {\n this.status = status;\n }",
"public void setStatus(String status) {\n this.status = status;\n }",
"public void setStatus(String status) {\n this.status = status;\n }",
"public void setStatus(String status) {\n this.status = status;\n }",
"public void setStatus(String status) {\n this.status = status;\n }",
"public void setStatus(String status) {\n this.status = status;\n }",
"public void setStatus(String status) {\n this.status = status;\n }",
"public void setStatus(String status) {\n this.status = status;\n }",
"public void setStatus(String status) {\n this.status = status;\n }",
"public void setStatus(String status) {\n this.status = status;\n }",
"public void setStatus(String status) {\n this.status = status;\n }",
"public void setStatus(String status) {\n this.status = status;\n }",
"public void setStatus(Enumerations.status status) {\n\t\tthis.status = status;\n\t}",
"public void setStatus(Byte status) {\n this.status = status;\n }",
"public void setStatus(Byte status) {\n this.status = status;\n }",
"public void setStatus(Byte status) {\n this.status = status;\n }",
"public void setStatus(Byte status) {\n this.status = status;\n }",
"public void setStatus(Byte status) {\n this.status = status;\n }",
"public void setStatus(Byte status) {\n this.status = status;\n }",
"public void setStatus(Byte status) {\n this.status = status;\n }",
"public void setStatus(Byte status) {\n this.status = status;\n }",
"public void setStatus(Byte status) {\n this.status = status;\n }",
"public void setStatus(Byte status) {\n this.status = status;\n }",
"public void setStatus(Byte status) {\n this.status = status;\n }",
"public void setStatus(Byte status) {\n this.status = status;\n }",
"public void setStatus(Byte status) {\n this.status = status;\n }",
"public void setStatus(String status) {\r\n\t\tthis.status = status;\r\n\t}",
"public void setStatus(String status) {\r\n\t\tthis.status = status;\r\n\t}",
"public void setStatus(String status) {\r\n\t\tthis.status = status;\r\n\t}",
"public void setStatus(String status) {\r\n\t\tthis.status = status;\r\n\t}",
"public void setStatus(String status) {\r\n\t\tthis.status = status;\r\n\t}",
"public void setStatus(boolean value) {\n this.status = value;\n }",
"public void setStatus(boolean value) {\n this.status = value;\n }",
"public void setStatus(int status)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(STATUS$12, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(STATUS$12);\n }\n target.setIntValue(status);\n }\n }",
"public void setStatus(Byte status) {\r\n\t\tthis.status = status;\r\n\t}"
] | [
"0.7745119",
"0.77418905",
"0.77418905",
"0.77191263",
"0.7706533",
"0.7706533",
"0.7706533",
"0.7706533",
"0.7706533",
"0.7706533",
"0.7706533",
"0.7706533",
"0.7706533",
"0.7706533",
"0.7706533",
"0.7706533",
"0.7706533",
"0.7706533",
"0.7706533",
"0.7706533",
"0.7706533",
"0.7706533",
"0.7706533",
"0.7699582",
"0.7698444",
"0.7698444",
"0.7698141",
"0.7698141",
"0.7692525",
"0.76663584",
"0.76663584",
"0.76480544",
"0.76296437",
"0.76210535",
"0.76118356",
"0.76059127",
"0.76004726",
"0.75782734",
"0.7565668",
"0.7565668",
"0.7565668",
"0.7565668",
"0.75535834",
"0.752819",
"0.752819",
"0.7494027",
"0.74921894",
"0.748007",
"0.74798775",
"0.7461619",
"0.7461619",
"0.7458318",
"0.7452219",
"0.7434114",
"0.7434114",
"0.7434114",
"0.7434114",
"0.7434114",
"0.7434114",
"0.7434114",
"0.74322337",
"0.74322337",
"0.74206674",
"0.74206674",
"0.74206674",
"0.74206674",
"0.74206674",
"0.74206674",
"0.74206674",
"0.74206674",
"0.74206674",
"0.74206674",
"0.74206674",
"0.74206674",
"0.74206674",
"0.74206674",
"0.74206674",
"0.74206674",
"0.74170256",
"0.7416147",
"0.7416147",
"0.7416147",
"0.7416147",
"0.7416147",
"0.7416147",
"0.7416147",
"0.7416147",
"0.7416147",
"0.7416147",
"0.7416147",
"0.7416147",
"0.7416147",
"0.7409961",
"0.7409961",
"0.7409961",
"0.7409961",
"0.7409961",
"0.7406402",
"0.7406402",
"0.7401798",
"0.7391887"
] | 0.0 | -1 |
Get the percentComplete property: Percent of the operation that is complete. | public Float percentComplete() {
return this.percentComplete;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Double percentComplete() {\n return this.percentComplete;\n }",
"public Number getPercentageComplete()\r\n {\r\n return (m_percentageComplete);\r\n }",
"public Float completionPercent() {\n return this.completionPercent;\n }",
"public String percentComplete() {\r\n\tdouble percent = ((double) bytesRead / (double) bytesLength);\r\n\tpercent *= 100;\r\n\treturn fmt.format(percent);\r\n }",
"public double getPercentComplete() {\n\t\tthis.percent_complete = ((double) lines_produced / (double) height) * 100.0;\n\t\treturn this.percent_complete;\n\t}",
"public int getPercentageComplete() {\n\t\tlong rawPercentage = (100*(System.currentTimeMillis() - startingTime))/(duration);\n\t\treturn rawPercentage >= 100 ? 100 : (int) rawPercentage;\n\t}",
"public double getPercentCompleted() {\n\t\treturn -1;\n\t}",
"private int getCompleteProgress()\n {\n int complete = (int)(getProgress() * 100);\n \n if (complete >= 100)\n complete = 100;\n \n return complete;\n }",
"public final double getPercentageComplete() {\n \t\tdouble percentageComplete = 0;\n \t\tfor (StoppingCondition condition : stoppingConditions) {\n \t\t\tif (condition.getPercentageCompleted() > percentageComplete) {\n \t\t\t\tpercentageComplete = condition.getPercentageCompleted();\n \t\t\t}\n \t\t}\n \t\treturn percentageComplete;\n \t}",
"public int getOverallProgressPercent() {\n return overallProgressPercent;\n }",
"public Double getProgressPercent();",
"public void setPercentComplete(double percentComplete) {\n\t\t\n\t}",
"public double getPercent() { return this.percentage; }",
"public void setPercentageComplete(Number percentComplete)\r\n {\r\n m_percentageComplete = percentComplete;\r\n }",
"public float getPercent() {\n return percent;\n }",
"public double getPercent() {\r\n\t\treturn percent;\r\n\t}",
"public double getPercentage() {\n\t\treturn this.percentage;\n\t}",
"public int percentSaveDone() {\n if (isSaveDone()) {\n return 100;\n }\n return percent;\n }",
"@IcalProperty(pindex = PropertyInfoIndex.PERCENT_COMPLETE,\n jname = \"percentComplete\",\n todoProperty = true)\n public void setPercentComplete(final Integer val) {\n percentComplete = val;\n }",
"public double getProgress()\n {\n return ((double)getCount() / (double)getGoal());\n }",
"public int getPercentage() {\r\n return Percentage;\r\n }",
"java.lang.String getPercentage();",
"public java.lang.String getPercentage() {\n java.lang.Object ref = percentage_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n percentage_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"com.google.protobuf.ByteString\n getPercentageBytes();",
"public float getProgress() {\r\n\t\treturn ((float) dDownloaded / dFileSize);\r\n\t}",
"public java.lang.String getPercentage() {\n java.lang.Object ref = percentage_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n percentage_ = s;\n }\n return s;\n }\n }",
"public static float getReadProgress() {\n\t\treturn mrpl.getPercentComplete();\n\t}",
"public OperationStatusResultInner withPercentComplete(Float percentComplete) {\n this.percentComplete = percentComplete;\n return this;\n }",
"public float getPercentage() {\r\n\t\tif(!isValid)\r\n\t\t\treturn -1;\r\n\t\treturn percentage;\r\n\t}",
"public String percentCompleteCountQATasks() {\n\t\tint fixed = closedQATasks().count();\n\t\tint total = qaTasks().count();\n\t\t\n return percentCompleteStringFromDouble(((double)fixed/(double)total) * 100);\n\t}",
"public int getProgress() {\n return Math.round(mProgress);\n }",
"double getpercentage() {\n return this.percentage;\n }",
"public com.google.protobuf.ByteString\n getPercentageBytes() {\n java.lang.Object ref = percentage_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n percentage_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public Long getProgressDone();",
"public com.google.protobuf.ByteString\n getPercentageBytes() {\n java.lang.Object ref = percentage_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n percentage_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public Long getProgressTotalToDo();",
"public float getProgressPct() {\n return (float) currentCompactedKVs / getTotalCompactingKVs();\n }",
"public void setPercentComplete(int percentComplete) {\n\t\tthis.percentComplete = Math.max(0, Math.min(100, percentComplete));\n\t}",
"public Number getPercentage() {\n return (Number) getAttributeInternal(PERCENTAGE);\n }",
"public float getProgress() {\n // Depends on the total number of tuples\n return 0;\n }",
"public String getProgress() {\n return this.progress;\n }",
"public int getProgress();",
"@ApiModelProperty(value = \"Percentage for the Detailed Estimate Deduction\")\n\n\t@Min(0)\n\tpublic Integer getPercentage() {\n\t\treturn percentage;\n\t}",
"public BigDecimal getUsagePercentage() {\n return this.usagePercentage;\n }",
"public DoubleExpression getProgress()\n {\n return progress;\n }",
"public int getProgress() {\n\t\treturn activeQuest.getThreshold() - getRemaining();\n\t}",
"@java.lang.Override\n public com.clarifai.grpc.api.Progress getProgress() {\n return progress_ == null ? com.clarifai.grpc.api.Progress.getDefaultInstance() : progress_;\n }",
"public int progress() {\n return _progress;\n }",
"public int getPercentage() {\r\n\r\n\t\treturn (getAmount() - offeredQuantity) / 100;\r\n\r\n\t}",
"public double getUnitsPerPercent()\n {\n return unitsPerPercent;\n }",
"public int getProgress() {\n long d = executable.getParent().getEstimatedDuration();\n if(d<0) return -1;\n \n int num = (int)((System.currentTimeMillis()-startTime)*100/d);\n if(num>=100) num=99;\n return num;\n }",
"public long getCompleted() { return completed; }",
"public int getProgress() {\n\t\treturn mProgress;\n\t}",
"public int uploadingProgressBarGetRate() {\n return uploadingProgressBar.getProgress();\n }",
"public SimpleDoubleProperty getTotalAbsencePercentageProperty() {\n return totalAbsencePercentageProperty;\n }",
"public float getProgress() throws IOException {\r\n\t\tif (start == totalend) {\r\n\t\t\treturn 0.0f;\r\n\t\t} else {\r\n\t\t\treturn Math.min(1.0f, ((getFilePosition() - start) + finishLen) / (float) totalend);\r\n\t\t}\r\n\t}",
"public int percent() {\n\t\tdouble meters = meters();\n\t\tif (meters < MIN_METERS) {\n\t\t\treturn 0;\n\t\t}\n\t\treturn (int) (Math.pow((meters - MIN_METERS)\n\t\t\t\t/ (MAX_METERS - MIN_METERS) * Math.pow(100, CURVE),\n\t\t\t\t1.000d / CURVE));\n\t}",
"public double getPercentChange() {\n return percentChange;\n }",
"public com.clarifai.grpc.api.Progress getProgress() {\n if (progressBuilder_ == null) {\n return progress_ == null ? com.clarifai.grpc.api.Progress.getDefaultInstance() : progress_;\n } else {\n return progressBuilder_.getMessage();\n }\n }",
"@Test\n public void testGetPercentComplete_1()\n throws Exception {\n ScriptProgressContainer fixture = new ScriptProgressContainer(1, \"\");\n\n int result = fixture.getPercentComplete();\n\n assertEquals(1, result);\n }",
"public int completed() {\n return this.completed;\n }",
"public boolean getSpreadPercentComplete()\r\n {\r\n return (m_spreadPercentComplete);\r\n }",
"@FloatRange(from = 0, to = 1) float getProgress();",
"int getPercentageHeated();",
"public double getEfficiencyPercentual()\n\t{\n\t\t//Difference from Jsprit algorithm path cost and transport service provider path cost\n\t\tdouble difference = algBestPathDistance - providerBestPathDistance;\n\t\t\n\t\t//Efficiency percentual obtained by Jsprit algorithm\n\t\treturn Math.round(100 * (1 - difference / providerBestPathDistance));\n\t}",
"public double getHitsPercentual()\n\t{\n\t\t//Convert int to double values\n\t\tdouble doubleHits = hits;\n\t\tdouble doubleTotalProcessedStops = totalProcessedStops;\n\t\t\n\t\t//Hits percentual obtained by Jsprit algorithm\n\t\treturn Math.round(100 * (doubleHits / doubleTotalProcessedStops));\n\t}",
"public double getMainPercentage(){return mainPercentage;}",
"public Double getProgress() {\r\n\treturn progress;\r\n}",
"public int getQualifyingPercentage() {\n return qualifyingPercentage;\n }",
"public static int getProgressPercentage(long currentDuration, long totalDuration){\r\n Double percentage = (double) 0;\r\n \r\n long currentSeconds = (int) (currentDuration / 1000);\r\n long totalSeconds = (int) (totalDuration / 1000);\r\n \r\n // calculating percentage\r\n percentage =(((double)currentSeconds)/totalSeconds)*100;\r\n \r\n // return percentage\r\n return percentage.intValue();\r\n }",
"public double getPercentMutants() {\n\t\tdouble count = (double) getNumMutants();\n\t\tdouble pSize = (double) this.getPopSize();\n\n\t\treturn count*100.0 / pSize;\n\t}",
"public int getProgressPercentage(long currentDuration, long totalDuration){\n\t\tDouble percentage = (double) 0;\n\t\t\n\t\tlong currentSeconds = (int) (currentDuration / 1000);\n\t\tlong totalSeconds = (int) (totalDuration / 1000);\n\t\t\n\t\t// calculating percentage\n\t\tpercentage =(((double)currentSeconds)/totalSeconds)*100;\n\t\t\n\t\t// return percentage\n\t\treturn percentage.intValue();\n\t}",
"Double getCompletion();",
"float getPercentHealth();",
"@ManagedMetric(category=\"UDPOpRequests\", metricType=MetricType.COUNTER, description=\"total number of agent operations completed\")\n\tpublic long getRequestsCompleted() {\n\t\treturn getMetricValue(\"RequestsCompleted\");\n\t}",
"public int getProgress() {\r\n\t\tint progress = Math.round((float)mMax * mProgressDegrees / mTotalCircleDegrees);\r\n\t\treturn progress;\r\n\t}",
"public Progress progress() {\n return _progress;\n }",
"public double getProgressFraction() {\n return (double) schedule.getSteps() / config.getSimulationIterations();\n }",
"public float getProgress() {\r\n if (start == end) {\r\n return 0.0f;\r\n } else {\r\n return Math.min(1.0f, (pos - start) / (float)(end - start));\r\n }\r\n }",
"public boolean hasPercentage() {\n return ((bitField0_ & 0x00000008) == 0x00000008);\n }",
"@Override\n\tpublic int estimateCurrentProgress() {\n\t\treturn counter.getCurrent();\n\t}",
"public String getPercentageformat() {\n\t\treturn this.percentageFormat = Math.round(this.percentage) + \"%\";\n\t}",
"public float getProgress() throws IOException {\n return currentRow / (endRow - header);\n }",
"public double getTotalAbsencePercentage() {\n return totalAbsencePercentageProperty.get();\n }",
"public double getPercentRem(){\n return ((double)freeSpace / (double)totalSpace) * 100d;\n }",
"public boolean hasPercentage() {\n return ((bitField0_ & 0x00000008) == 0x00000008);\n }",
"@Override\n public String toString() {\n return 100 * current / total + \"%\";\n }",
"public Long get_cacherecentpercentsuccessfulrevalidation() throws Exception {\n\t\treturn this.cacherecentpercentsuccessfulrevalidation;\n\t}",
"public float getRemainingPercentage() {\n float percentage = (float) getRemainingTime() / this.duration;\n if (Float.isNaN(percentage)) {\n percentage = 1;\n }\n return Math.min(Math.max(0, percentage), 1);\n }",
"int getRemainderPercent();",
"public int getProgressCount() {\n return progress_.size();\n }",
"public int getProgressCount() {\n return progress_.size();\n }",
"public int getProgressCount() {\n return progress_.size();\n }",
"public int getOverallCompletionAmount() {\n\t\treturn Times;\n\t}",
"public int getThroughPut() {\n\t\treturn completed;\n\t}",
"@Override\n\tpublic double percentualeGruppiCompletati () throws DAOException{\n\t\tConnection connection = null;\n\t\tPreparedStatement statement = null;\n\t\tResultSet resultSet = null;\n\t\tdouble numeroGruppiCompletati = 0.0;\n\t\ttry {\n\t\t\tconnection = DataSource.getInstance().getConnection();\n\t\t\tstatement = connection.prepareStatement(\"SELECT COUNT (GRUPPO.ID)*100/(SELECT COUNT(ID) FROM GRUPPO) FROM GRUPPO WHERE COMPLETO = 1 GROUP BY(GRUPPO.COMPLETO)\");\n\t\t\tresultSet = statement.executeQuery();\n\t\t\tif (resultSet.next()) {\n\t\t\t\tnumeroGruppiCompletati = BigDecimal.valueOf(resultSet.getDouble(1)).setScale(2, RoundingMode.HALF_UP).doubleValue();\n\t\t\t}\n\t\t} catch (SQLException | DAOException e) {\n\t\t\tthrow new DAOException(\"ERRORE percentualeGruppiCompletati utenteAdmin\" + e.getMessage(), e);\n\t\t} finally {\n\t\t\tDataSource.getInstance().close(resultSet);\n\t\t\tDataSource.getInstance().close(statement);\n\t\t\tDataSource.getInstance().close(connection);\n\t\t}\n\t\treturn numeroGruppiCompletati;\n\t}",
"public void setOverallProgressPercent(int value) {\n this.overallProgressPercent = value;\n }",
"public float getProgress() throws IOException {\n if (end == start) {\n return 0.0f;\n } else {\n return Math.min(1.0f, (in.getPosition() - start) / (float)(end - start));\n }\n }",
"public int getProgressCount() {\n return progress_.size();\n }",
"public int getProgressCount() {\n return progress_.size();\n }"
] | [
"0.85911876",
"0.841037",
"0.8035488",
"0.8024576",
"0.7986356",
"0.7883817",
"0.7787802",
"0.7665737",
"0.7656204",
"0.76510453",
"0.7623058",
"0.7248048",
"0.7214943",
"0.7153492",
"0.712644",
"0.71257687",
"0.7089528",
"0.70862013",
"0.706011",
"0.70333034",
"0.70255715",
"0.7005122",
"0.68859094",
"0.6872402",
"0.6869686",
"0.6864637",
"0.6862663",
"0.68345964",
"0.6829457",
"0.68166375",
"0.6805085",
"0.67929226",
"0.6785459",
"0.67525434",
"0.675185",
"0.6748934",
"0.6718397",
"0.67099434",
"0.66590846",
"0.66523784",
"0.6628084",
"0.65830106",
"0.6578261",
"0.6569824",
"0.6563322",
"0.65531594",
"0.6519484",
"0.65113896",
"0.64050263",
"0.63865024",
"0.6375526",
"0.63753927",
"0.63459194",
"0.6329855",
"0.63296574",
"0.63295305",
"0.62831956",
"0.62650305",
"0.6256946",
"0.6252446",
"0.62323225",
"0.6208103",
"0.6207128",
"0.620433",
"0.61999696",
"0.6163338",
"0.61630005",
"0.61609554",
"0.6134037",
"0.612871",
"0.6122165",
"0.6116344",
"0.6114444",
"0.6098356",
"0.60950965",
"0.6094719",
"0.6084404",
"0.60798407",
"0.6077893",
"0.607614",
"0.606587",
"0.6065296",
"0.6063121",
"0.60423464",
"0.60254014",
"0.60216504",
"0.60120547",
"0.6009806",
"0.6004988",
"0.6004306",
"0.60033935",
"0.60033935",
"0.60033935",
"0.5986323",
"0.59806144",
"0.59795016",
"0.5975419",
"0.5966442",
"0.59647566",
"0.59647566"
] | 0.8618896 | 0 |
Set the percentComplete property: Percent of the operation that is complete. | public OperationStatusResultInner withPercentComplete(Float percentComplete) {
this.percentComplete = percentComplete;
return this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setPercentageComplete(Number percentComplete)\r\n {\r\n m_percentageComplete = percentComplete;\r\n }",
"public void setPercentComplete(double percentComplete) {\n\t\t\n\t}",
"public void setPercentComplete(int percentComplete) {\n\t\tthis.percentComplete = Math.max(0, Math.min(100, percentComplete));\n\t}",
"@IcalProperty(pindex = PropertyInfoIndex.PERCENT_COMPLETE,\n jname = \"percentComplete\",\n todoProperty = true)\n public void setPercentComplete(final Integer val) {\n percentComplete = val;\n }",
"public void setOverallProgressPercent(int value) {\n this.overallProgressPercent = value;\n }",
"public Float percentComplete() {\n return this.percentComplete;\n }",
"public Double percentComplete() {\n return this.percentComplete;\n }",
"@Test\n public void testSetPercentComplete_1()\n throws Exception {\n ScriptProgressContainer fixture = new ScriptProgressContainer(1, \"\");\n int percentComplete = 1;\n\n fixture.setPercentComplete(percentComplete);\n\n }",
"public void setProgress(int percent) {\n setProgress((float) percent / 100);\n }",
"public void setExecutionPercentage(double percentage);",
"public void setPercent(float value) {\n this.percent = value;\n }",
"public String percentComplete() {\r\n\tdouble percent = ((double) bytesRead / (double) bytesLength);\r\n\tpercent *= 100;\r\n\treturn fmt.format(percent);\r\n }",
"public Number getPercentageComplete()\r\n {\r\n return (m_percentageComplete);\r\n }",
"private void setProgressPercent(Integer integer) {\n\t\t\n\t}",
"public Float completionPercent() {\n return this.completionPercent;\n }",
"public synchronized void setComplete() {\n status = Status.COMPLETE;\n }",
"public void setPercent(double percent) {\r\n\t\tthis.percent = percent;\r\n\t}",
"@Override public void onInitProgress(int pctComplete) {\n publishProgress(Integer.valueOf(pctComplete));\n }",
"public double getPercent() { return this.percentage; }",
"public void updatePercentComplete(String step) {\n\t\tif (step2ProgressMap.containsKey(step)) {\n\t\t\tthis.percentComplete = step2ProgressMap.get(step);\n\t\t}\n\t}",
"void setProgress(float progress);",
"public Double getProgressPercent();",
"public void setComplete(boolean complete) {\n }",
"public double getPercentCompleted() {\n\t\treturn -1;\n\t}",
"public double getPercentComplete() {\n\t\tthis.percent_complete = ((double) lines_produced / (double) height) * 100.0;\n\t\treturn this.percent_complete;\n\t}",
"public void setProgress(int value);",
"public void setProgress(BigValue progress) {\n this.progress = progress;\n this.checkProgress();\n }",
"public void setSpreadPercentComplete(boolean spreadPercentComplete)\r\n {\r\n m_spreadPercentComplete = spreadPercentComplete;\r\n }",
"public void done(Integer percentDone) {\n if (percentDone == 100) {\n mApp.updateDialogProgress(percentDone, \"Finishing..\");\n } else {\n mApp.updateDialogProgress(percentDone, \"Uploading: \" + percentDone + \"%\");\n }\n }",
"public void setComplete(Boolean complete){\n this.complete = complete;\n }",
"private int getCompleteProgress()\n {\n int complete = (int)(getProgress() * 100);\n \n if (complete >= 100)\n complete = 100;\n \n return complete;\n }",
"public void setComplete(boolean complete) {\n\t\t\n\t}",
"public int getPercentageComplete() {\n\t\tlong rawPercentage = (100*(System.currentTimeMillis() - startingTime))/(duration);\n\t\treturn rawPercentage >= 100 ? 100 : (int) rawPercentage;\n\t}",
"void setProgress(int progress);",
"void setProgress(int progress);",
"public void setPercentage(Number value) {\n setAttributeInternal(PERCENTAGE, value);\n }",
"public int getOverallProgressPercent() {\n return overallProgressPercent;\n }",
"@ApiModelProperty(value = \"Percentage for the Detailed Estimate Deduction\")\n\n\t@Min(0)\n\tpublic Integer getPercentage() {\n\t\treturn percentage;\n\t}",
"public void setComplete(boolean param){\n \n // setting primitive attribute tracker to true\n localCompleteTracker =\n true;\n \n this.localComplete=param;\n \n\n }",
"public int percentSaveDone() {\n if (isSaveDone()) {\n return 100;\n }\n return percent;\n }",
"void setProgress(@FloatRange(from = 0, to = 1) float progress);",
"@Override\n\tpublic void execute()\n\t{\n\t\tintake.set(percentage);\n\t}",
"private void updateProgressBar() {\n\t\tdouble current = model.scannedCounter;\n\t\tdouble total = model.fileCounter;\n\t\tdouble percentage = (double)(current/total);\n\t\t\n\t\t//Update Progress indicators\n\t\ttxtNumCompleted.setText((int) current + \" of \" + (int) total + \" Completed (\" + Math.round(percentage*100) + \"%)\");\n\t\tprogressBar.setProgress(percentage);\n\t}",
"public DiskRestorePointProperties withCompletionPercent(Float completionPercent) {\n this.completionPercent = completionPercent;\n return this;\n }",
"public abstract void setPercentDead(double percent);",
"public void setComplete(boolean value) {\n\t\tif (value) {\n\t\t\tcountdown = EXIT_COUNT;\n\t\t}\n\t\tcomplete = value;\n\t\t//\t\tif (value) waitSeconds(3);\n\t}",
"public float getPercent() {\n return percent;\n }",
"public Builder setPercentage(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000008;\n percentage_ = value;\n onChanged();\n return this;\n }",
"public double getPercent() {\r\n\t\treturn percent;\r\n\t}",
"public void setProgress(float p) {\n _progress = Math.max(0.0f, Math.min(1.0f, p));\n }",
"public void setPercent(int percent) {\n\t\tdouble multiplier = Math.pow((double) percent, CURVE)\n\t\t\t\t/ Math.pow(100.00d, CURVE);\n\t\tLog.v(TAG, \"setting percent to: \" + percent + \" via multiplier: \"\n\t\t\t\t+ multiplier);\n\t\tsetMeters(((MAX_METERS - MIN_METERS) * multiplier) + MIN_METERS);\n\t}",
"public void markComplete()\n {\n setCount(getGoal());\n }",
"public Builder clearPercentage() {\n bitField0_ = (bitField0_ & ~0x00000008);\n percentage_ = getDefaultInstance().getPercentage();\n onChanged();\n return this;\n }",
"@Override\n public void onProgress(float percent, SpeedTestReport report) {\n System.out.println(\"[PROGRESS] progress : \" + percent + \"%\");\n System.out.println(\"[PROGRESS] rate in octet/s : \" + report.getTransferRateOctet());\n System.out.println(\"[PROGRESS] rate in bit/s : \" + report.getTransferRateBit());\n }",
"@Override\r\n\tpublic void setPercentage(BigDecimal percentage) {\r\n\t\tif(percentage==null) return;\r\n\t\tsuper.setCalculationPercent(new Percent(percentage));\r\n\t}",
"public Builder setPercentageBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000008;\n percentage_ = value;\n onChanged();\n return this;\n }",
"public synchronized void updateProgress(boolean completedOK) {\n\n if (completedOK) mCompletedOKCount++;\n\n mCompletedCount++;\n\n double total = mMusicObjectList.size();\n double count = mCompletedCount;\n int percent = (int) ((count / total) * 100d);\n\n mDownloadListener.onUpdate(percent);\n }",
"public void setProgress(final int percentage, final String user) {\r\n\t\tif (this.statusBar != null) {\r\n\t\t\tif (this.progressBarUser == null || user == null || this.progressBarUser.equals(user)) {\r\n\t\t\t\tif (percentage > 99 | percentage == 0)\r\n\t\t\t\t\tthis.progressBarUser = null;\r\n\t\t\t\telse\r\n\t\t\t\t\tthis.progressBarUser = user;\r\n\r\n\t\t\t\tif (Thread.currentThread().getId() == DataExplorer.application.getThreadId()) {\r\n\t\t\t\t\tthis.statusBar.setProgress(percentage);\r\n\t\t\t\t\tif (this.taskBarItem != null) {\r\n\t\t\t\t\t\tif (user == null)\r\n\t\t\t\t\t\t\tthis.taskBarItem.setProgressState(SWT.DEFAULT);\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\tthis.taskBarItem.setProgressState(GDE.IS_MAC ? SWT.PAUSED : SWT.NORMAL);\r\n\r\n\t\t\t\t\t\tthis.taskBarItem.setProgress(percentage);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tGDE.display.asyncExec(new Runnable() {\r\n\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\tDataExplorer.this.statusBar.setProgress(percentage);\r\n\t\t\t\t\t\t\tif (DataExplorer.this.taskBarItem != null) {\r\n\t\t\t\t\t\t\t\tif (user == null)\r\n\t\t\t\t\t\t\t\t\tDataExplorer.this.taskBarItem.setProgressState(SWT.DEFAULT);\r\n\t\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\t\tDataExplorer.this.taskBarItem.setProgressState(GDE.IS_MAC ? SWT.PAUSED : SWT.NORMAL);\r\n\r\n\t\t\t\t\t\t\t\tDataExplorer.this.taskBarItem.setProgress(percentage);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t\tthis.progessPercentage = percentage;\r\n\t\t\t\tif (percentage >= 100) DataExplorer.this.resetProgressBar();\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void setGraphicsDataReadProgress(final int percentage) {\n\t\tthis.graphicsDataProgressBar.setSelection(percentage);\n\t}",
"public void setProgress(String progress) {\n this.progress = progress;\n }",
"public void setPercentage(int i){\n\t\tif(loadBar != null) loadBar.setValue(i);\n\t\tif(i >= 100){\n\t\t\tdispose();\n\t\t}\n\t}",
"public void setComplete(boolean isComplete) { \n this.isComplete = isComplete; \n }",
"void progress(int pUnitsCompleted);",
"public ChannelProgressivePromise setProgress(long progress, long total)\r\n/* 63: */ {\r\n/* 64: 95 */ super.setProgress(progress, total);\r\n/* 65: 96 */ return this;\r\n/* 66: */ }",
"public final double getPercentageComplete() {\n \t\tdouble percentageComplete = 0;\n \t\tfor (StoppingCondition condition : stoppingConditions) {\n \t\t\tif (condition.getPercentageCompleted() > percentageComplete) {\n \t\t\t\tpercentageComplete = condition.getPercentageCompleted();\n \t\t\t}\n \t\t}\n \t\treturn percentageComplete;\n \t}",
"@SuppressLint(\"DefaultLocale\")\n @Override\n public void onSeriesItemAnimationProgress(float percentComplete, float currentPosition) {\n float percentFilled = ((currentPosition - seriesItem1.getMinValue()) / (seriesItem1.getMaxValue() - seriesItem1.getMinValue()));\n //se lo pasamos al TextView\n tvPorciento.setText(String.format(\"%.0f%%\", percentFilled * 100f));\n }",
"@Override\n protected void onProgressUpdate(Integer... progress) {\n pDialog.setProgress(progress[0]);\n\n // updating percentage value\n //txtPercentage.setText(String.valueOf(progress[0]) + \"%\");\n }",
"public void updateProgress(int remaining, int total) {\n try {\n setProgress.invoke(bossBar, ((double) remaining) / ((double) total));\n } catch (IllegalAccessException | InvocationTargetException ex) {\n Bukkit.getLogger().log(Level.SEVERE, \"An error occurred while updating boss bar progress, are you using Minecraft 1.9 or higher?\", ex);\n }\n }",
"public abstract void onProgress(short percentage, long downloadedSoFar);",
"public int getPercentage() {\r\n return Percentage;\r\n }",
"double getpercentage() {\n return this.percentage;\n }",
"public void setProgress(int progress) {\n \t\t\tsynchronized (this) {\n \t\t\t\tm_progress = progress;\n \t\t\t\tthis.notify();\n \t\t\t}\n \t\t}",
"public double getPercentage() {\n\t\treturn this.percentage;\n\t}",
"public void setTotalAbsencePercentage(double totalAbsencePercentage) {\n //this.totalAbsencePercentageProperty.set(Math.round(totalAbsencePercentage * 100.0) / 100.0);\n this.totalAbsencePercentageProperty.set(totalAbsencePercentage);\n }",
"public void setProgress(int progress) {\n\n this.percent = progress;\n percentdraw = 0;\n start = true;\n anim();\n invalidate();\n }",
"protected void onProgressUpdate(String... progress) {\n\t\t\t\t\t\t// Set progress percentage\n\t\t\t\t\t\tprgDialog.setProgress(Integer.parseInt(progress[0]));\n\t\t\t\t\t}",
"public void setCompleted() {\n this.completed = true;\n }",
"public void setPercentOutput(double value) {\n motor.set(ControlMode.PercentOutput, value);\n }",
"@Override\n\tpublic void progress(int arg0) {\n\t\tm_progress = arg0 / 10;\n\t\t//Main.log(TAG, \"progress : \" + m_progress + \"%\");\n\t}",
"public void setCompleted(boolean achievementCompleted) {\n\t\t\n\t\tcompleted = achievementCompleted;\n\t\t\n\t}",
"public com.google.protobuf.ByteString\n getPercentageBytes() {\n java.lang.Object ref = percentage_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n percentage_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public void setPercentageColor(int percentageColor) {\n this.percentageColor = percentageColor;\n percentageView.setTextColor(ColorStateList.valueOf(percentageColor));\n invalidate();\n requestLayout();\n }",
"public void set_completed();",
"@Override\n public void onProgress(long downloaded,\n long total) {\n int progress = (int) (downloaded / total * 100);\n bar.setProgress(progress);\n }",
"public final void mPERCENT() throws RecognitionException {\n\t\ttry {\n\t\t\tint _type = PERCENT;\n\t\t\tint _channel = DEFAULT_TOKEN_CHANNEL;\n\t\t\t// /Users/Sarah/Projects/ontop/obdalib-core/src/main/java/it/unibz/krdb/obda/parser/Datalog.g:433:8: ( '%' )\n\t\t\t// /Users/Sarah/Projects/ontop/obdalib-core/src/main/java/it/unibz/krdb/obda/parser/Datalog.g:433:16: '%'\n\t\t\t{\n\t\t\tmatch('%'); \n\t\t\t}\n\n\t\t\tstate.type = _type;\n\t\t\tstate.channel = _channel;\n\t\t}\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t}",
"public void setParallelAnalysisPercentileValue(double percent){\n this.percentile = percent;\n }",
"public com.google.protobuf.ByteString\n getPercentageBytes() {\n java.lang.Object ref = percentage_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n percentage_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"@CrossOrigin\n\t@RequestMapping(value=\"/setPercentComplete\", method= RequestMethod.POST)\n\tpublic JSONObject setPercentComplete(@RequestBody StatusRequestBodyPercentMessage requestBody, @RequestHeader HttpHeaders headers) {\n\t\tHeadersManager.setHeaders(headers);\n\t\ttry {\n\t\t String jobId = requestBody.jobId;\n\t\t \n\t\t SimpleResultSet res = new SimpleResultSet();\n\t\t LoggerRestClient logger = LoggerRestClient.getInstance(log_prop);\n\t\t LocalLogger.logToStdOut(\"Status Service setPercentComplete \" + requestBody.percentComplete + \"% JobId=\" + jobId);\n\t\n\t\t try {\n\t\t \tJobTracker tracker = this.getTracker();\n\t\t \ttracker.setJobPercentComplete(jobId, requestBody.percentComplete, requestBody.message);\n\t\t\t res.setSuccess(true);\n\t\t\t \n\t\t } catch (Exception e) {\n\t\t \tres.setSuccess(false);\n\t\t \tres.addRationaleMessage(SERVICE_NAME, \"setPercentComplete\", e);\n\t\t\t LoggerRestClient.easyLog(logger, \"Status Service\", \"setPercentComplete exception\", \"message\", e.toString());\n\t\t\t LocalLogger.logToStdOut(\"Status Service setPercentComplete exception message=\" + e.toString());\n\t\t } \n\t\t \n\t\t return res.toJson();\n\t\t \n\t\t} finally {\n\t \tHeadersManager.clearHeaders();\n\t }\n\t\t \n\t}",
"@Override\n public void onProgress(long downloaded, long total) {\n int progress = (int) (downloaded / total * 100);\n bar.setProgress(progress);\n }",
"java.lang.String getPercentage();",
"@Test\n public void testGetPercentComplete_1()\n throws Exception {\n ScriptProgressContainer fixture = new ScriptProgressContainer(1, \"\");\n\n int result = fixture.getPercentComplete();\n\n assertEquals(1, result);\n }",
"@Override\n\t\tprotected void onProgressUpdate(Integer... progress) {\n\t\t\tprogressBar.setVisibility(View.VISIBLE);\n\n\t\t\t// updating progress bar value\n\t\t\tprogressBar.setProgress(progress[0]);\n\n\t\t\t// updating percentage value\n\t\t\ttxtPercentage.setText(String.valueOf(progress[0]) + \"%\");\n\t\t}",
"public void setStateComplete() {state = STATUS_COMPLETE;}",
"public float getPercentage() {\r\n\t\tif(!isValid)\r\n\t\t\treturn -1;\r\n\t\treturn percentage;\r\n\t}",
"public java.lang.String getPercentage() {\n java.lang.Object ref = percentage_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n percentage_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public void setUnitsPerPercent(double unitsPerPercent)\n {\n this.unitsPerPercent = unitsPerPercent;\n }",
"protected void sendProgress() {\n setProgress(getProgress() ^ 1);\n }",
"public void setProgress( boolean onOff );",
"public Builder setIsComplete(boolean value) {\n bitField0_ |= 0x00000004;\n isComplete_ = value;\n onChanged();\n return this;\n }",
"public boolean thisFinishPercent(int percent){\r\n\t\tint thisPercent = (int)(100.0 * (double)currentAlpha / targetAlpha);\r\n\t\tif(percent >= thisPercent){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}"
] | [
"0.88209444",
"0.8813877",
"0.85876054",
"0.80303854",
"0.7200308",
"0.712763",
"0.7015373",
"0.6982655",
"0.6957832",
"0.6938379",
"0.68524253",
"0.6827307",
"0.67808396",
"0.6768497",
"0.6702542",
"0.6645332",
"0.66447294",
"0.66404814",
"0.6491394",
"0.6469822",
"0.64614916",
"0.64414334",
"0.640813",
"0.6406331",
"0.6398703",
"0.6372657",
"0.6360571",
"0.6339487",
"0.63255316",
"0.6314491",
"0.6305392",
"0.6289963",
"0.6284157",
"0.6266655",
"0.6266655",
"0.62560403",
"0.62352216",
"0.62305903",
"0.62169147",
"0.62014174",
"0.61990446",
"0.61828655",
"0.6172795",
"0.61647797",
"0.6154047",
"0.61505246",
"0.61407566",
"0.6107105",
"0.6107045",
"0.609318",
"0.6077318",
"0.6067674",
"0.60144573",
"0.5998956",
"0.5993402",
"0.59921944",
"0.5966918",
"0.5961663",
"0.59580564",
"0.595786",
"0.5938865",
"0.59059256",
"0.5897907",
"0.5887237",
"0.58780617",
"0.5853607",
"0.5832724",
"0.58258665",
"0.5820415",
"0.58184576",
"0.5808851",
"0.579363",
"0.57816225",
"0.57735646",
"0.5762804",
"0.57517266",
"0.57453984",
"0.57322866",
"0.57318556",
"0.5729877",
"0.57217485",
"0.5719245",
"0.56969124",
"0.5691681",
"0.56820923",
"0.56560886",
"0.564639",
"0.5622793",
"0.5617912",
"0.5616935",
"0.5610865",
"0.55983984",
"0.5593399",
"0.5567823",
"0.5563826",
"0.555731",
"0.55563515",
"0.5551638",
"0.5548586",
"0.55458516"
] | 0.67567664 | 14 |
Get the startTime property: The start time of the operation. | public OffsetDateTime startTime() {
return this.startTime;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public long getStartTime() {\r\n return startTime;\r\n }",
"public long getStartTime() {\n return startTime;\n }",
"public long getStartTime() {\n return startTime;\n }",
"public long getStartTime() {\n return startTime;\n }",
"public long getStartTime() {\n return startTime;\n }",
"public long getStartTime() {\n\t\treturn startTime;\n\t}",
"public double getStartTime() {\n return startTime;\n }",
"public double getStartTime() {\n return startTime;\n }",
"public String getStartTime() {\n return startTime;\n }",
"public String getStartTime() {\n return startTime;\n }",
"public String getStartTime() {\n return startTime;\n }",
"public String getStartTime() {\n return startTime;\n }",
"public String getStartTime() {\n return startTime;\n }",
"public long getStartTime ()\r\n {\r\n return startTime;\r\n }",
"public Date getStartTime() {\r\n\t\treturn startTime;\r\n\t}",
"public Integer getStartTime() {\n return startTime;\n }",
"public Date getStartTime() {\n\t\treturn startTime;\n\t}",
"public Date getStartTime() {\n\t\treturn startTime;\n\t}",
"public Date getStartTime() {\n\t\treturn startTime;\n\t}",
"public Date getStartTime() {\n\t\treturn startTime;\n\t}",
"public Date getStartTime() {\n return startTime;\n }",
"public Date getStartTime() {\n return startTime;\n }",
"public Date getStartTime() {\n return startTime;\n }",
"public Date getStartTime() {\r\n return this.startTime;\r\n }",
"public int getStartTime()\n\t{\n\t\treturn startTime;\n\t}",
"public Date getStartTime() {\n return this.startTime;\n }",
"public static long getStartTime() {\n return startTime;\n }",
"public String getStartTime()\n {\n return this.startTime;\n }",
"public String startTime(){\r\n\t\treturn startTime;\r\n\t}",
"public java.lang.Long getStartTime() {\n return start_time;\n }",
"public java.lang.Long getStartTime() {\n return start_time;\n }",
"long getStartTime() {\n return startTime;\n }",
"public java.util.Date getStartTime() {\n return startTime;\n }",
"protected double getStartTime() {\n\t\treturn startTime;\n\t}",
"public String getStartTime() {\n return this.StartTime;\n }",
"public long getStartTime();",
"public long getStartTime();",
"public Calendar getStartTime() {\r\n\t\treturn startTime;\r\n\t}",
"public long getTimeStart()\n {\n return this.timeStart;\n }",
"public java.util.Date getStartTime() {\n return this.startTime;\n }",
"public java.util.Date getStartTime() {\n return this.startTime;\n }",
"public java.util.Date getStartTime() {\n return this.startTime;\n }",
"public double getStartTime();",
"public String getStartTime();",
"public String getStartTime();",
"public long getStartTime () {\n if (isPerformance) {\n return System.currentTimeMillis();\n }\n else\n {\n return 0;\n }\n }",
"public long getStart_time() {\n return start_time;\n }",
"public LocalDateTime getStartTime() {\n\t\treturn startTime;\n\t}",
"public java.lang.String getStartTime() {\n java.lang.Object ref = startTime_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n startTime_ = s;\n return s;\n }\n }",
"long getStartTime();",
"public int getTimeStart() {\r\n return timeStart;\r\n }",
"public java.lang.String getStartTime() {\n java.lang.Object ref = startTime_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n startTime_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public Date getStartTime() {\n\t\treturn getOriginatingTime();\n\t}",
"public String getStartTimeString() {\n return startTimeString;\n }",
"@Override\n\tpublic float getStartTime()\n\t{\n\t\treturn _tbeg;\n\t}",
"int getStartTime();",
"int getStartTime();",
"int getStartTime();",
"public long startTime();",
"public com.google.protobuf.ByteString\n getStartTimeBytes() {\n java.lang.Object ref = startTime_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n startTime_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public Rational getStartTime ()\r\n {\r\n return startTime;\r\n }",
"public LocalDateTime getStartTime() {\n return startTime;\n }",
"public Date getStartTimeDate() {\n return startTimeDate;\n }",
"public long getBeginTime() { return beginTime; }",
"public com.google.protobuf.ByteString\n getStartTimeBytes() {\n java.lang.Object ref = startTime_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n startTime_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public float getStartTime()\r\n\t{\r\n\t\tif (starttime != null)\r\n\t\t\treturn starttime.getTimeInMillis();\r\n\t\t\r\n\t\treturn 0;\r\n\t}",
"@JsonProperty(\"startTime\")\n public String getStartTime() {\n return startTime;\n }",
"public String getStarttime() {\n return starttime;\n }",
"public String getTime_start() {\n return time_start;\n }",
"public long getBeginTime() {\n return mBeginTime;\n }",
"public java.lang.String getTime_start() {\r\n return time_start;\r\n }",
"public String getStartTime() {\n\t\treturn (new Parser(value)).getString();\n\t}",
"public Date getStarttime() {\n return starttime;\n }",
"public Date getStarttime() {\n return starttime;\n }",
"public String getBeginTime() {\r\n return beginTime;\r\n }",
"public int getStartTime()\n {\n if (isRepeated()) return start;\n else return time;\n }",
"public double getStartTime()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(STARTTIME$22);\r\n if (target == null)\r\n {\r\n return 0.0;\r\n }\r\n return target.getDoubleValue();\r\n }\r\n }",
"@Override\n\tpublic int getStartTime() {\n\t\treturn 0;\n\t}",
"@gw.internal.gosu.parser.ExtendedProperty\n public java.util.Date getStartTime() {\n return (java.util.Date)__getInternalInterface().getFieldValue(STARTTIME_PROP.get());\n }",
"@gw.internal.gosu.parser.ExtendedProperty\n public java.util.Date getStartTime() {\n return (java.util.Date)__getInternalInterface().getFieldValue(STARTTIME_PROP.get());\n }",
"com.google.protobuf.Timestamp getStartTime();",
"@gw.internal.gosu.parser.ExtendedProperty\n public java.util.Date getStartTime() {\n return (java.util.Date)__getInternalInterface().getFieldValue(STARTTIME_PROP.get());\n }",
"@gw.internal.gosu.parser.ExtendedProperty\n public java.util.Date getStartTime() {\n return (java.util.Date)__getInternalInterface().getFieldValue(STARTTIME_PROP.get());\n }",
"@XmlElement(name = \"starttime\")\n public Long getStartTime() {\n return startTime;\n }",
"public LocalTime getStartTime () {\n\t\treturn DateUtils.toLocalTime(this.start);\n\t}",
"public long getStartSystemTime() {\r\n return startSystemTime;\r\n }",
"java.util.Calendar getStartTime();",
"@Override\n public Date getBeginTime() {\n return beginTime;\n }",
"public long getTimeStarted() {\n\t\treturn _timeStarted;\n\t}",
"public DateTime getStartDateTime() {\r\n\t\treturn start;\r\n\t}",
"public void setStartTime(String startTime) {\n this.startTime = startTime;\n }",
"public void setStartTime(String startTime) {\n this.startTime = startTime;\n }",
"public java.sql.Time getREQ_START_TIME()\n {\n \n return __REQ_START_TIME;\n }",
"public long getStartTimestamp() {\n return startTimestamp;\n }",
"public long getStartCpuTime() {\r\n return startCpuTime;\r\n }",
"public void setStartTime(String startTime) {\n this.startTime = startTime;\n }",
"public void setStartTime(String startTime) {\n this.startTime = startTime;\n }",
"public void setStartTime(String startTime) {\n this.startTime = startTime;\n }",
"public void setStartTime(long startTime) {\n\t\tthis.startTime = startTime;\n\t}"
] | [
"0.8671063",
"0.8670326",
"0.8670326",
"0.8670326",
"0.8670326",
"0.86522156",
"0.8509561",
"0.8509561",
"0.8504342",
"0.8504342",
"0.8504342",
"0.8504342",
"0.84781444",
"0.8469223",
"0.8427468",
"0.84206665",
"0.8419154",
"0.8419154",
"0.8419154",
"0.8419154",
"0.8399679",
"0.8399679",
"0.8399679",
"0.8349671",
"0.83453757",
"0.8339569",
"0.83375597",
"0.8303588",
"0.82796323",
"0.8270415",
"0.8256874",
"0.82027704",
"0.8191822",
"0.8162328",
"0.810256",
"0.8093849",
"0.8093849",
"0.8069895",
"0.8061847",
"0.80606157",
"0.80606157",
"0.80606157",
"0.80203366",
"0.79622144",
"0.79622144",
"0.7961066",
"0.7957584",
"0.7937303",
"0.79154134",
"0.78957444",
"0.788439",
"0.78526837",
"0.7833258",
"0.78291035",
"0.77958405",
"0.77736676",
"0.77736676",
"0.77736676",
"0.7750411",
"0.77415216",
"0.77336025",
"0.7729715",
"0.7723446",
"0.77175605",
"0.7690062",
"0.76838404",
"0.7648118",
"0.76361036",
"0.75990194",
"0.75646144",
"0.75604296",
"0.7550649",
"0.753082",
"0.753082",
"0.75094855",
"0.74975926",
"0.7456944",
"0.7438573",
"0.74200815",
"0.74200815",
"0.7418993",
"0.74049443",
"0.74049443",
"0.73918635",
"0.738294",
"0.7343053",
"0.729534",
"0.7286304",
"0.72736746",
"0.7231247",
"0.7211398",
"0.7211398",
"0.7188233",
"0.718805",
"0.716905",
"0.7157029",
"0.7157029",
"0.7157029",
"0.71422523"
] | 0.8135235 | 35 |
Set the startTime property: The start time of the operation. | public OperationStatusResultInner withStartTime(OffsetDateTime startTime) {
this.startTime = startTime;
return this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setStartTime(long startTime) {\n\t\tthis.startTime = startTime;\n\t}",
"public void setStartTime(Long startTime) {\n this.startTime = startTime;\n }",
"public void setStartTime( Date startTime ) {\n this.startTime = startTime;\n }",
"public void setStartTime(Date startTime) {\r\n this.startTime = startTime;\r\n }",
"public void setStartTime(Date startTime) {\n this.startTime = startTime;\n }",
"public void setStartTime(Date startTime) {\n this.startTime = startTime;\n }",
"public void setStartTime(Date startTime) {\n this.startTime = startTime;\n }",
"public void setStartTime(Date startTime) {\n this.startTime = startTime;\n }",
"public void setStartTime(java.util.Date startTime) {\n this.startTime = startTime;\n }",
"public void setStartTime(java.util.Date startTime) {\n this.startTime = startTime;\n }",
"public void setStartTime(java.util.Date startTime) {\n this.startTime = startTime;\n }",
"public void setStartTime(java.util.Date startTime) {\n this.startTime = startTime;\n }",
"public void setStartTime(Date startTime) {\n\t\tthis.startTime = startTime;\n\t}",
"public void setStartTime(Date startTime) {\n\t\tthis.startTime = startTime;\n\t}",
"public void setStartTime(Date startTime) {\n\t\tthis.startTime = startTime;\n\t}",
"public void setStartTime(Date startTime) {\n\t\tthis.startTime = startTime;\n\t}",
"public void setStartTime(String startTime) {\n this.startTime = startTime;\n }",
"public void setStartTime(String startTime) {\n this.startTime = startTime;\n }",
"public void setStartTime(Integer startTime) {\n this.startTime = startTime;\n }",
"public void setStartTime(String startTime) {\n this.startTime = startTime;\n }",
"public void setStartTime(String startTime) {\n this.startTime = startTime;\n }",
"public void setStartTime(String startTime) {\n this.startTime = startTime;\n }",
"public void setStartTime(Calendar startTime) {\r\n\t\tthis.startTime = startTime;\r\n\t}",
"public void setStartTime() {\r\n startTime = System.currentTimeMillis();\r\n }",
"void setStartTime(java.util.Calendar startTime);",
"public void setStartTime(long value) {\r\n this.startTime = value;\r\n }",
"public void setStartTime(double startTime)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(STARTTIME$22);\r\n if (target == null)\r\n {\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(STARTTIME$22);\r\n }\r\n target.setDoubleValue(startTime);\r\n }\r\n }",
"public void setStartTime(LocalDateTime startTime) {\n this.startTime = startTime;\n }",
"public void setStartTime(String startTime) {\n this.startTime = startTime == null ? null : startTime.trim();\n }",
"public void setStartTime(long milliseconds) {\r\n\t\tthis.startTime = milliseconds;\r\n\t}",
"public void xsetStartTime(org.landxml.schema.landXML11.GPSTime startTime)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.landxml.schema.landXML11.GPSTime target = null;\r\n target = (org.landxml.schema.landXML11.GPSTime)get_store().find_attribute_user(STARTTIME$22);\r\n if (target == null)\r\n {\r\n target = (org.landxml.schema.landXML11.GPSTime)get_store().add_attribute_user(STARTTIME$22);\r\n }\r\n target.set(startTime);\r\n }\r\n }",
"public void setStartTime (long x)\r\n {\r\n startTime = x;\r\n }",
"public void setStartTime(long ts) {\n\t\tthis.startTime = ts;\t\t\n\t}",
"public abstract void setStartTime(Date startTime);",
"public void setStartTime(String StartTime) {\n this.StartTime = StartTime;\n }",
"public void setTimeStart(int timeStart) {\r\n this.timeStart = timeStart;\r\n }",
"public void setStartTime(java.lang.Long value) {\n this.start_time = value;\n }",
"public void setStart_time(long start_time) {\n this.start_time = start_time;\n }",
"public void setStartTimeDate(Date startTimeDate) {\n this.startTimeDate = startTimeDate;\n }",
"public void setStarttime(Date starttime) {\n this.starttime = starttime;\n }",
"public void setStarttime(Date starttime) {\n this.starttime = starttime;\n }",
"public AccountSasSignatureValues setStartTime(OffsetDateTime startTime) {\n this.startTime = startTime;\n return this;\n }",
"@Override\n\tpublic void setStartTime(float t) \n\t{\n\t\t_tbeg = t;\n\t}",
"@Override\n\tpublic void setStartTime(int t) {\n\t\t\n\t}",
"public void setStartTime (Rational startTime)\r\n {\r\n // Already done?\r\n if (this.startTime == null) {\r\n logger.debug(\"setStartTime {} for chord #{}\", startTime, getId());\r\n\r\n this.startTime = startTime;\r\n//\r\n// // Set the same info in containing slot if any\r\n// if (slot != null) {\r\n// slot.setStartTime(startTime);\r\n// }\r\n } else {\r\n if (!this.startTime.equals(startTime)) {\r\n addError(\r\n \"Reassigning startTime from \" + this.startTime + \" to \"\r\n + startTime + \" in \" + this);\r\n }\r\n }\r\n }",
"public JobBuilder startTime(Date startTime) {\r\n job.setStartTime(startTime);\r\n return this;\r\n }",
"public com.twc.bigdata.views.avro.viewing_info.Builder setStartTime(java.lang.Long value) {\n validate(fields()[0], value);\n this.start_time = value;\n fieldSetFlags()[0] = true;\n return this; \n }",
"public void setStartTime(java.util.Date value) {\n __getInternalInterface().setFieldValue(STARTTIME_PROP.get(), value);\n }",
"public void setStartTime(java.util.Date value) {\n __getInternalInterface().setFieldValue(STARTTIME_PROP.get(), value);\n }",
"public void setStartTime(java.util.Date value) {\n __getInternalInterface().setFieldValue(STARTTIME_PROP.get(), value);\n }",
"public void setStartTime(java.util.Date value) {\n __getInternalInterface().setFieldValue(STARTTIME_PROP.get(), value);\n }",
"public void startTime() {\n\t\tthis.clock.start();\n\t}",
"void xsetStartTime(org.apache.xmlbeans.XmlDateTime startTime);",
"public void setStartTimeString(String startTimeString) {\n this.startTimeString = startTimeString;\n }",
"public long getStartTime() {\r\n return startTime;\r\n }",
"public long getStartTime() {\n return startTime;\n }",
"public long getStartTime() {\n return startTime;\n }",
"public long getStartTime() {\n return startTime;\n }",
"public long getStartTime() {\n return startTime;\n }",
"public void setStartSystemTime(long startSystemTime) {\r\n this.startSystemTime = startSystemTime;\r\n }",
"public Date getStartTime() {\n return startTime;\n }",
"public Date getStartTime() {\n return startTime;\n }",
"public Date getStartTime() {\n return startTime;\n }",
"public Date getStartTime() {\r\n\t\treturn startTime;\r\n\t}",
"public long getStartTime() {\n\t\treturn startTime;\n\t}",
"public BundleTask withStartTime(java.util.Date startTime) {\n setStartTime(startTime);\n return this;\n }",
"public void setServiceStartTime() {\r\n\t\t\tthis.serviceStartTime = RNG.MAXINT;\r\n\t\t}",
"public void setBeginTime(String time){beginTime = time;}",
"public void setTime_start(java.lang.String time_start) {\r\n this.time_start = time_start;\r\n }",
"public void setBeginTime(String beginTime) {\n\t\tthis.beginTime = beginTime;\n\t}",
"public Date getStartTime() {\n\t\treturn startTime;\n\t}",
"public Date getStartTime() {\n\t\treturn startTime;\n\t}",
"public Date getStartTime() {\n\t\treturn startTime;\n\t}",
"public Date getStartTime() {\n\t\treturn startTime;\n\t}",
"public Date getStartTime() {\r\n return this.startTime;\r\n }",
"public String getStartTime() {\n return startTime;\n }",
"public void start() {\n startTime = System.currentTimeMillis();\n }",
"public void start() {\n startTime = System.currentTimeMillis();\n }",
"public void setTimeStart(long ts)\n {\n this.timeStart = (ts > 0L)? ts : -1L;\n }",
"public String getStartTime() {\n return startTime;\n }",
"public String getStartTime() {\n return startTime;\n }",
"public String getStartTime() {\n return startTime;\n }",
"public String getStartTime() {\n return startTime;\n }",
"public double getStartTime() {\n return startTime;\n }",
"public double getStartTime() {\n return startTime;\n }",
"public Date getStartTime() {\n return this.startTime;\n }",
"public long getStartTime ()\r\n {\r\n return startTime;\r\n }",
"private void startTiming() {\n m_startTime = Calendar.getInstance().getTimeInMillis();\n }",
"public Builder setStartTime(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n startTime_ = value;\n onChanged();\n return this;\n }",
"public void setTimes(long startCpuTime, long startSystemTime) {\r\n this.startCpuTime = startCpuTime;\r\n this.startSystemTime = startSystemTime;\r\n }",
"public int getStartTime()\n\t{\n\t\treturn startTime;\n\t}",
"public void Start(long startTime){\n // Your code here\n this.startTime = startTime;\n Thread t = new Thread(this);\n t.start();\n //run();\n }",
"public Integer getStartTime() {\n return startTime;\n }",
"void setStart(Instant instant);",
"public OffsetDateTime startTime() {\n return this.startTime;\n }",
"public OffsetDateTime startTime() {\n return this.startTime;\n }",
"public ImportTableDescription withStartTime(java.util.Date startTime) {\n setStartTime(startTime);\n return this;\n }",
"public java.util.Date getStartTime() {\n return startTime;\n }",
"public void startTiming() {\n elapsedTime = 0;\n startTime = System.currentTimeMillis();\n }",
"public void setStarttime(String starttime) {\n this.starttime = starttime == null ? null : starttime.trim();\n }",
"public void setStart(long start) { this.start = start; }"
] | [
"0.86206406",
"0.85373706",
"0.85371876",
"0.8519589",
"0.84975445",
"0.84975445",
"0.84975445",
"0.84975445",
"0.8489776",
"0.8489776",
"0.8489776",
"0.8489776",
"0.8452999",
"0.8452999",
"0.8452999",
"0.8452999",
"0.84177047",
"0.84177047",
"0.84109384",
"0.8391595",
"0.8391595",
"0.8391595",
"0.8349611",
"0.832109",
"0.8286644",
"0.8027432",
"0.8007636",
"0.80056137",
"0.78906244",
"0.7874481",
"0.787258",
"0.7838746",
"0.77924806",
"0.77511054",
"0.77112377",
"0.7702131",
"0.75875324",
"0.7521446",
"0.75150156",
"0.7494882",
"0.7494882",
"0.7427114",
"0.74248785",
"0.733508",
"0.7314899",
"0.72616637",
"0.7249914",
"0.7143388",
"0.7143388",
"0.7127493",
"0.7127493",
"0.71043134",
"0.71015775",
"0.70796037",
"0.706725",
"0.70190537",
"0.70190537",
"0.70190537",
"0.70190537",
"0.70016634",
"0.6989968",
"0.6989968",
"0.6989968",
"0.69895935",
"0.6988602",
"0.6971044",
"0.696704",
"0.696023",
"0.69421923",
"0.69335455",
"0.69210804",
"0.69210804",
"0.69210804",
"0.69210804",
"0.69054663",
"0.6886048",
"0.688408",
"0.6879425",
"0.6854697",
"0.68528986",
"0.68528986",
"0.68528986",
"0.68528986",
"0.6836572",
"0.6836572",
"0.6822767",
"0.68197536",
"0.6817598",
"0.6816207",
"0.67825794",
"0.673106",
"0.6714839",
"0.6708923",
"0.66919273",
"0.66586107",
"0.66586107",
"0.66488844",
"0.66257536",
"0.661487",
"0.66054237",
"0.6601293"
] | 0.0 | -1 |
Get the endTime property: The end time of the operation. | public OffsetDateTime endTime() {
return this.endTime;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public long getEndTime() {\n return endTime;\n }",
"public long getEndTime() {\n return endTime;\n }",
"public long getEndTime() {\n\t\treturn endTime;\n\t}",
"public long getEndTime() {\r\n return endTime;\r\n }",
"public java.lang.Long getEndTime() {\n return end_time;\n }",
"public java.lang.Long getEndTime() {\n return end_time;\n }",
"public Date getEndTime() {\n return endTime;\n }",
"public Date getEndTime() {\n return endTime;\n }",
"public Date getEndTime() {\n return endTime;\n }",
"public Date getEndTime() {\n\t\treturn endTime;\n\t}",
"public Date getEndTime() {\n return this.endTime;\n }",
"public Date getEndTime() {\r\n return this.endTime;\r\n }",
"public Integer getEndTime() {\n return endTime;\n }",
"public double getEndTime() {\n return endTime;\n }",
"public long getEnd_time() {\n return end_time;\n }",
"public String getEndTime() {\r\n return endTime;\r\n }",
"public String getEndTime() {\n return endTime;\n }",
"public String getEndTime() {\n return endTime;\n }",
"public String getEndTime() {\n return endTime;\n }",
"public java.util.Date getEndTime() {\n return endTime;\n }",
"@Override\n public Date getEndTime() {\n return endTime;\n }",
"public String getEndTime() {\n return endTime;\n }",
"public long getTimeEnd()\n {\n return this.timeEnd;\n }",
"long getEndTime() {\n return endTime;\n }",
"public Calendar getEndTime() {\r\n\t\treturn endTime;\r\n\t}",
"public String getEndTime()\n {\n return this.endTime;\n }",
"public LocalDateTime getEndTime() {\n\t\treturn endTime;\n\t}",
"public java.util.Date getEndTime() {\n return this.endTime;\n }",
"public java.util.Date getEndTime() {\n return this.endTime;\n }",
"public int getTimeEnd() {\r\n return timeEnd;\r\n }",
"public Date getEndtime() {\n return endtime;\n }",
"public String getEndtime() {\n return endtime;\n }",
"@ApiModelProperty(value = \"The end of the requested reporting period, in ISO 8601 format. If this value is more than one year greater than begin_time, this endpoint returns an error. Default value: The current time.\")\n public String getEndTime() {\n return endTime;\n }",
"public String getEndTimeString() {\n return endTimeString;\n }",
"@Override\n\tpublic float getEndTime() \n\t{\n\t\treturn _tend;\n\t}",
"public Date getEndTimeDate() {\n return endTimeDate;\n }",
"public String getEndTime() {\n return this.EndTime;\n }",
"public java.lang.String getTime_end() {\r\n return time_end;\r\n }",
"@gw.internal.gosu.parser.ExtendedProperty\n public java.util.Date getEndTime() {\n return (java.util.Date)__getInternalInterface().getFieldValue(ENDTIME_PROP.get());\n }",
"@gw.internal.gosu.parser.ExtendedProperty\n public java.util.Date getEndTime() {\n return (java.util.Date)__getInternalInterface().getFieldValue(ENDTIME_PROP.get());\n }",
"@gw.internal.gosu.parser.ExtendedProperty\n public java.util.Date getEndTime() {\n return (java.util.Date)__getInternalInterface().getFieldValue(ENDTIME_PROP.get());\n }",
"@gw.internal.gosu.parser.ExtendedProperty\n public java.util.Date getEndTime() {\n return (java.util.Date)__getInternalInterface().getFieldValue(ENDTIME_PROP.get());\n }",
"@JsonProperty(\"endTime\")\n public String getEndTime() {\n return endTime;\n }",
"public long getEndTime() {\n if (endTime < 0) {\n try {\n String datestr = PropertyArray.get(props, END);\n\n if (datestr == null) {\n // this may be more expensive because it can cause a\n // reload from disk\n try {\n datestr = getProperty(END);\n } catch (Fault f) {\n }\n }\n\n if (datestr != null) {\n Date date = parseDate(datestr);\n endTime = date.getTime();\n } else {\n // info not available\n }\n } catch (ParseException e) {\n }\n }\n\n return endTime;\n }",
"public LocalTime getEndTime () {\n\t\treturn DateUtils.toLocalTime(this.end);\n\t}",
"void setEndTime(Time endTime) {\n this.endTime = endTime;\n }",
"public LocalTime getEnd() {\n\treturn end;\n }",
"public void setEndTime(long endTime) {\n this.endTime = endTime;\n }",
"int getEndTime();",
"int getEndTime();",
"int getEndTime();",
"public int getEndTime()\n {\n if (isRepeated()) return end;\n else return time;\n }",
"public String getEndTime();",
"public String getEndTime();",
"public void setEndTime(Integer endTime) {\n this.endTime = endTime;\n }",
"public void setEndTime(long endTime) {\n\t\tthis.endTime = endTime;\n\t}",
"java.util.Calendar getEndTime();",
"public long getEndTimestamp() {\n\t\treturn this.endTimestamp;\n\t}",
"public void setEndTime(String endTime) {\n this.endTime = endTime;\n }",
"public void setEndTime(String endTime) {\n this.endTime = endTime;\n }",
"public void setEndTime(String endTime) {\n this.endTime = endTime;\n }",
"public void setEndTime(String endTime) {\n this.endTime = endTime;\n }",
"public void setEndTime(String endTime) {\n this.endTime = endTime;\n }",
"public void setEndTime(Date endTime) {\r\n this.endTime = endTime;\r\n }",
"public void setEndTime( Date endTime ) {\n this.endTime = endTime;\n }",
"public void setEndTime(Date endTime) {\n this.endTime = endTime;\n }",
"public void setEndTime(Date endTime) {\n this.endTime = endTime;\n }",
"public void setEndTime(Date endTime) {\n this.endTime = endTime;\n }",
"public void setEndTime(Date endTime) {\n this.endTime = endTime;\n }",
"public DateTime getEnd() {\r\n return new DateTime(getEndMillis(), getChronology());\r\n }",
"public void setEndTime(String endTime) {\n\t\tthis.endTime = endTime;\n\t}",
"net.opengis.gml.x32.TimeInstantPropertyType getEnd();",
"public java.util.Date getEndDateTime() {\n return this.endDateTime;\n }",
"public Rational getEndTime ()\r\n {\r\n if (isWholeDuration()) {\r\n return null;\r\n }\r\n\r\n Rational chordDur = getDuration();\r\n\r\n if (chordDur == null) {\r\n return null;\r\n } else {\r\n return startTime.plus(chordDur);\r\n }\r\n }",
"public String getEndTime() {\n/* 34 */ return this.endTime;\n/* */ }",
"com.google.protobuf.Timestamp getEndTime();",
"public String getEndTime(){return endTime;}",
"public void setEndTime(Calendar endTime) {\r\n\t\tthis.endTime = endTime;\r\n\t}",
"public String endTime(){\r\n\t\tsaleEnded = Calendar.getInstance().getTime();\r\n\t\tDateFormat dateFormat = new SimpleDateFormat(\"yyyy-mm-dd HH:mm:ss\");\r\n\t\tString endTime = dateFormat.format(time);\r\n\t\treturn endTime;\r\n\t}",
"public Date getEndTimestamp() {\r\n return endTimestamp;\r\n }",
"public long getEndTimestamp();",
"public void setEndTime(java.util.Date endTime) {\n this.endTime = endTime;\n }",
"public void setEndTime(java.util.Date endTime) {\n this.endTime = endTime;\n }",
"public void setEndTime(java.util.Date endTime) {\n this.endTime = endTime;\n }",
"public void setEndTime(long value) {\r\n this.endTime = value;\r\n }",
"Instant getEnd();",
"public Date get_end() {\n\t\treturn this.end;\n\t}",
"public void setEndTime(Date endTime) {\n\t\tthis.endTime = endTime;\n\t}",
"public Date getTenderEndTime() {\n return tenderEndTime;\n }",
"public void setEndTime(String EndTime) {\n this.EndTime = EndTime;\n }",
"public long getEndTs() {\n return this.startTimestamp + this.resolution * this.size;\n }",
"public Date getjEndtime() {\n return jEndtime;\n }",
"public abstract Date getEndTime();",
"public void setEnd_time(long end_time) {\n this.end_time = end_time;\n }",
"com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder();",
"public Long getTimestampEnd();",
"public void setEndTime(java.lang.Long value) {\n this.end_time = value;\n }",
"public java.sql.Time getREQ_END_TIME()\n {\n \n return __REQ_END_TIME;\n }",
"public BidTime getFinishTime() {\r\n\t\treturn finishTime;\r\n\t}",
"public void setEndTime(String time){endTime = time;}"
] | [
"0.8676974",
"0.8676974",
"0.8667256",
"0.86569124",
"0.85663706",
"0.8560742",
"0.85285354",
"0.85285354",
"0.85285354",
"0.85187364",
"0.8480559",
"0.84653026",
"0.84455156",
"0.8438505",
"0.8385252",
"0.8374234",
"0.8361306",
"0.8361306",
"0.8361306",
"0.83130527",
"0.8297398",
"0.8279508",
"0.826969",
"0.8248488",
"0.8240221",
"0.8198418",
"0.81937766",
"0.81890976",
"0.81890976",
"0.8064009",
"0.80603397",
"0.8054571",
"0.8038816",
"0.7980938",
"0.7966721",
"0.7929291",
"0.78486615",
"0.77962995",
"0.7768501",
"0.7768501",
"0.7742467",
"0.7742467",
"0.773508",
"0.77289695",
"0.7717507",
"0.76350236",
"0.75977564",
"0.7575647",
"0.75314623",
"0.75314623",
"0.75314623",
"0.751303",
"0.7475723",
"0.7475723",
"0.74650383",
"0.746394",
"0.7454104",
"0.7406616",
"0.7404186",
"0.7404186",
"0.739362",
"0.739362",
"0.739362",
"0.73896676",
"0.73803294",
"0.73580277",
"0.73580277",
"0.73580277",
"0.73580277",
"0.73369575",
"0.7324486",
"0.73193526",
"0.73056984",
"0.7303634",
"0.72569233",
"0.7256195",
"0.7252598",
"0.72524965",
"0.7250792",
"0.7244939",
"0.7236824",
"0.7221821",
"0.7221821",
"0.7221821",
"0.72184914",
"0.7214883",
"0.72009444",
"0.7168864",
"0.7156886",
"0.71358806",
"0.71303314",
"0.709797",
"0.70881313",
"0.70431006",
"0.7031227",
"0.70008934",
"0.69962144",
"0.69898796",
"0.69854486",
"0.69448775"
] | 0.8404527 | 14 |
Set the endTime property: The end time of the operation. | public OperationStatusResultInner withEndTime(OffsetDateTime endTime) {
this.endTime = endTime;
return this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void setEndTime(Time endTime) {\n this.endTime = endTime;\n }",
"public void setEndTime(long endTime) {\n this.endTime = endTime;\n }",
"public void setEndTime(long endTime) {\n\t\tthis.endTime = endTime;\n\t}",
"public void setEndTime( Date endTime ) {\n this.endTime = endTime;\n }",
"public void setEndTime(Date endTime) {\r\n this.endTime = endTime;\r\n }",
"void setEndTime(java.util.Calendar endTime);",
"public void setEndTime(Date endTime) {\n this.endTime = endTime;\n }",
"public void setEndTime(Date endTime) {\n this.endTime = endTime;\n }",
"public void setEndTime(Date endTime) {\n this.endTime = endTime;\n }",
"public void setEndTime(Date endTime) {\n this.endTime = endTime;\n }",
"public void setEndTime(Integer endTime) {\n this.endTime = endTime;\n }",
"public void setEndTime(java.util.Date endTime) {\n this.endTime = endTime;\n }",
"public void setEndTime(java.util.Date endTime) {\n this.endTime = endTime;\n }",
"public void setEndTime(java.util.Date endTime) {\n this.endTime = endTime;\n }",
"public void setEndTime(Calendar endTime) {\r\n\t\tthis.endTime = endTime;\r\n\t}",
"public void setEndTime(Date endTime) {\n\t\tthis.endTime = endTime;\n\t}",
"public void setEndTime(String endTime) {\n this.endTime = endTime;\n }",
"public void setEndTime(String endTime) {\n this.endTime = endTime;\n }",
"public void setEndTime(String endTime) {\n this.endTime = endTime;\n }",
"public void setEndTime(String endTime) {\n this.endTime = endTime;\n }",
"public void setEndTime(String endTime) {\n this.endTime = endTime;\n }",
"public void setEndTime(String endTime) {\n\t\tthis.endTime = endTime;\n\t}",
"public void setEndTime(String endTime) {\n this.endTime = endTime == null ? null : endTime.trim();\n }",
"public void setEndTime(long value) {\r\n this.endTime = value;\r\n }",
"public void setEnd_time(long end_time) {\n this.end_time = end_time;\n }",
"public void setEndTime(String endTime) {\r\n if (StringUtil.isNotNUll(endTime)) {\r\n this.endTime = DateUtils.getSpecifiedDayAfter(TimeUtils.FORMAT_DATE, endTime);\r\n } else {\r\n this.endTime = null;\r\n }\r\n }",
"public abstract void setEndTime(Date endTime);",
"public void setTimeEnd(int timeEnd) {\r\n this.timeEnd = timeEnd;\r\n }",
"public void setEndTime(String EndTime) {\n this.EndTime = EndTime;\n }",
"public JobBuilder endTime(Date endTime) {\r\n job.setEndTime(endTime);\r\n return this;\r\n }",
"public void setEndTime(String time){endTime = time;}",
"public void setEndTimeDate(Date endTimeDate) {\n this.endTimeDate = endTimeDate;\n }",
"public void setEndtime(Date endtime) {\n this.endtime = endtime;\n }",
"public void setEndTimeString(String endTimeString) {\n this.endTimeString = endTimeString;\n }",
"public void setEndTime(java.lang.Long value) {\n this.end_time = value;\n }",
"void xsetEndTime(org.apache.xmlbeans.XmlDateTime endTime);",
"void setEnd(net.opengis.gml.x32.TimeInstantPropertyType end);",
"void setEndPosition(net.opengis.gml.x32.TimePositionType endPosition);",
"@Override\n\tpublic void setEndTime(float t) \n\t{\n\t\t_tend = t;\n\t}",
"public Date getEndTime() {\n return endTime;\n }",
"public Date getEndTime() {\n return endTime;\n }",
"public Date getEndTime() {\n return endTime;\n }",
"@ApiModelProperty(value = \"The end of the requested reporting period, in ISO 8601 format. If this value is more than one year greater than begin_time, this endpoint returns an error. Default value: The current time.\")\n public String getEndTime() {\n return endTime;\n }",
"public Date getEndTime() {\n\t\treturn endTime;\n\t}",
"public void setEndTime(java.util.Date value) {\n __getInternalInterface().setFieldValue(ENDTIME_PROP.get(), value);\n }",
"public void setEndTime(java.util.Date value) {\n __getInternalInterface().setFieldValue(ENDTIME_PROP.get(), value);\n }",
"public long getEndTime() {\r\n return endTime;\r\n }",
"public long getEndTime() {\n\t\treturn endTime;\n\t}",
"@Override\n public Date getEndTime() {\n return endTime;\n }",
"public void setEndTime(java.util.Date value) {\n __getInternalInterface().setFieldValue(ENDTIME_PROP.get(), value);\n }",
"public void setEndTime(java.util.Date value) {\n __getInternalInterface().setFieldValue(ENDTIME_PROP.get(), value);\n }",
"public long getEndTime() {\n return endTime;\n }",
"public long getEndTime() {\n return endTime;\n }",
"public Date getEndTime() {\r\n return this.endTime;\r\n }",
"public Date getEndTime() {\n return this.endTime;\n }",
"public void setEndtime(String endtime) {\n this.endtime = endtime == null ? null : endtime.trim();\n }",
"public com.twc.bigdata.views.avro.viewing_info.Builder setEndTime(java.lang.Long value) {\n validate(fields()[1], value);\n this.end_time = value;\n fieldSetFlags()[1] = true;\n return this; \n }",
"public String getEndTime() {\r\n return endTime;\r\n }",
"public OffsetDateTime endTime() {\n return this.endTime;\n }",
"public DescribeEventsRequest withEndTime(java.util.Date endTime) {\n this.endTime = endTime;\n return this;\n }",
"public void setEndDateTime(java.util.Date endDateTime) {\n this.endDateTime = endDateTime;\n }",
"public java.util.Date getEndTime() {\n return endTime;\n }",
"public void setTime_end(java.lang.String time_end) {\r\n this.time_end = time_end;\r\n }",
"public void setTimeEnd(long te)\n {\n this.timeEnd = (te > 0L)? te : -1L;\n }",
"void setEnd(Instant instant);",
"public String getEndTime() {\n return endTime;\n }",
"public String getEndTime() {\n return endTime;\n }",
"public String getEndTime() {\n return endTime;\n }",
"public String getEndTime() {\n return endTime;\n }",
"public LocalDateTime getEndTime() {\n\t\treturn endTime;\n\t}",
"public double getEndTime() {\n return endTime;\n }",
"public Calendar getEndTime() {\r\n\t\treturn endTime;\r\n\t}",
"public Integer getEndTime() {\n return endTime;\n }",
"public void setTenderEndTime(Date tenderEndTime) {\n this.tenderEndTime = tenderEndTime;\n }",
"@JsonProperty(\"endTime\")\n public String getEndTime() {\n return endTime;\n }",
"public java.lang.Long getEndTime() {\n return end_time;\n }",
"public final void setActualEndTime(java.util.Date actualendtime)\r\n\t{\r\n\t\tsetActualEndTime(getContext(), actualendtime);\r\n\t}",
"public java.util.Date getEndTime() {\n return this.endTime;\n }",
"public java.util.Date getEndTime() {\n return this.endTime;\n }",
"public java.lang.Long getEndTime() {\n return end_time;\n }",
"public Date getEndTimeDate() {\n return endTimeDate;\n }",
"long getEndTime() {\n return endTime;\n }",
"public String getEndTime()\n {\n return this.endTime;\n }",
"public M csmiUpdateTimeEnd(Object end){this.put(\"csmiUpdateTimeEnd\", end);return this;}",
"@Override\n public void setVideoEndTime(String videoId, long endTime) {\n\t\tJSONObject allVids;\n\t\ttry {\n\t\t\tallVids = super.getJSONObject(VIDEO_LIST);\n\t\t\tJSONObject vidTimes = allVids.getJSONObject(videoId);\n\t\t\tvidTimes.put(END_TIME, endTime);\n\t\t} catch (JSONException e) {\n\t\t\t//All fields are required so this should not happen\n\t\t}\n\t}",
"public M csmiAddTimeEnd(Object end){this.put(\"csmiAddTimeEnd\", end);return this;}",
"@Override\n public void logEndTime(long endTimeMillis) {\n if (getLogger().isDebugEnabled()) {\n getLogger().debug(\"logEndTime {}\", endTimeMillis);\n }\n\n sendSynchronously(restApiClient::logStartEndTime, createLogEndTimeRequest(endTimeMillis));\n }",
"public String getEndTimeString() {\n return endTimeString;\n }",
"public void setjEndtime(Date jEndtime) {\n this.jEndtime = jEndtime;\n }",
"public M csseUpdateTimeEnd(Object end){this.put(\"csseUpdateTimeEnd\", end);return this;}",
"public long getEnd_time() {\n return end_time;\n }",
"public ImportTableDescription withEndTime(java.util.Date endTime) {\n setEndTime(endTime);\n return this;\n }",
"public void setEnd(final String end) {\n\tthis.end = LocalTime.parse(end, DateTimeFormatter.ofPattern(\"hh:mma\", Locale.US));\n }",
"public Date getEndtime() {\n return endtime;\n }",
"public String getEndtime() {\n return endtime;\n }",
"public M csseAddTimeEnd(Object end){this.put(\"csseAddTimeEnd\", end);return this;}",
"public void setEndDate(Date end)\r\n {\r\n this.endDate = end;\r\n }",
"public void setEnd( GeoPoint end ){\n this.end = end;\n\n }",
"@Override\n\tpublic float getEndTime() \n\t{\n\t\treturn _tend;\n\t}",
"public final void setContractEndTime(java.util.Date contractendtime)\r\n\t{\r\n\t\tsetContractEndTime(getContext(), contractendtime);\r\n\t}"
] | [
"0.8684876",
"0.8643965",
"0.85903007",
"0.85531175",
"0.8509842",
"0.85060215",
"0.8491146",
"0.8491146",
"0.8491146",
"0.8491146",
"0.8485404",
"0.8466188",
"0.8466188",
"0.8466188",
"0.84015787",
"0.83611023",
"0.834395",
"0.834395",
"0.834395",
"0.8332493",
"0.8332493",
"0.8295246",
"0.80157053",
"0.7935597",
"0.79106605",
"0.78952765",
"0.7870284",
"0.7820209",
"0.7811771",
"0.7780849",
"0.7730634",
"0.76699865",
"0.7594916",
"0.75494313",
"0.752552",
"0.73822206",
"0.73811215",
"0.7334986",
"0.72994596",
"0.72976667",
"0.72976667",
"0.72976667",
"0.7241756",
"0.722321",
"0.7209379",
"0.7209379",
"0.72068673",
"0.71987766",
"0.7191854",
"0.719101",
"0.719101",
"0.71809727",
"0.71809727",
"0.7167799",
"0.71182597",
"0.7103088",
"0.70568657",
"0.7021943",
"0.70116985",
"0.7010831",
"0.69860244",
"0.6979294",
"0.6976744",
"0.69669205",
"0.6966254",
"0.6960189",
"0.6960189",
"0.6960189",
"0.69310075",
"0.69195616",
"0.69071656",
"0.6905169",
"0.69004065",
"0.6863242",
"0.6856783",
"0.6834116",
"0.6828063",
"0.68197954",
"0.68197954",
"0.680764",
"0.6793755",
"0.6696247",
"0.66910666",
"0.66522986",
"0.66332656",
"0.66321814",
"0.66296077",
"0.66227204",
"0.65949076",
"0.65866226",
"0.6561908",
"0.6534701",
"0.65132433",
"0.6479185",
"0.6446847",
"0.64368284",
"0.6418801",
"0.64013964",
"0.6388914",
"0.6386616"
] | 0.67552555 | 81 |
Get the operations property: The operations list. | public List<OperationStatusResultInner> operations() {
return this.operations;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public ObservableList<Operation> getOperations() {\n\t\treturn operations;\n\t}",
"public Collection getOperations()\n {\n return Collections.unmodifiableCollection(operations);\n }",
"public java.util.List<OperationSummary> getOperations() {\n if (operations == null) {\n operations = new com.amazonaws.internal.SdkInternalList<OperationSummary>();\n }\n return operations;\n }",
"public List<OperationImplementation> getOperations() {\n List<?> operationsUnknown = (List<?>) properties.get(XPATH_OPERATIONS);\n List<OperationImplementation> operations = new ArrayList<OperationImplementation>();\n if (operationsUnknown != null) {\n \t for (Object operationUnknown : operationsUnknown) {\n \t Map<?, ?> operationMap = (Map<?, ?>) operationUnknown;\n \t operations.add(new OperationImplementation(\n \t (String) operationMap.get(OPERATION_NAME),\n \t (String) operationMap.get(OPERATION_PARAMETERS),\n \t (String) operationMap.get(OPERATION_DOCUMENTATION)));\n \t }\n }\n return operations;\n }",
"public static java.util.Collection getOperationDescs() {\r\n return _myOperationsList;\r\n }",
"@ApiModelProperty(value = \"The operations that can be performed on the issue.\")\n public Operations getOperations() {\n return operations;\n }",
"public DataStructure getOperations() {\r\n\t\tif (ports == null) {\r\n\t\t\treturn EmptyStructures.EMPTY_STRUCTURE;\r\n\t\t}\r\n\t\tList l = new ArrayList();\r\n\t\tfor (Iterator it = ports.values().iterator(); it.hasNext();) {\r\n\t\t\tWSDLPort port = (WSDLPort) it.next();\r\n\t\t\tl.addAll(port.getOperations());\r\n\t\t}\r\n\t\treturn l;\r\n\t}",
"OperationsClient getOperations();",
"public List<String> getOperators() {\n return operators;\n }",
"public com.google.protobuf.ProtocolStringList\n getInstrumentedOpsList() {\n return instrumentedOps_.getUnmodifiableView();\n }",
"public com.google.protobuf.ProtocolStringList\n getInstrumentedOpsList() {\n return instrumentedOps_;\n }",
"public Collection<Element> getOperations() {\n Stream<Element> combinedStream = Stream.of(aCollection, cCollection)\n .flatMap(Collection::stream);\n return combinedStream.collect(Collectors.toList());\n }",
"public Operation getOperation() {\n return operation;\n }",
"public String getOperation() {\n\t\t\treturn operation;\n\t\t}",
"public keys getOperation() {\r\n return this.operation;\r\n }",
"public Operation getOperation() {\n return this.operation;\n }",
"List getOperationDescriptors() throws RemoteException;",
"public String getOperation() {\n return operation;\n }",
"public String getOperation() {\n return operation;\n }",
"public String getOperation () {\n return operation;\n }",
"public String getOperation () {\n return operation;\n }",
"public HOp[] ops()\r\n {\r\n if (!cache.initialized()) \r\n throw new IllegalStateException(Cache.NOT_INITIALIZED);\r\n\r\n return OPS;\r\n }",
"public String getOperation() {\r\n\t\treturn operation;\r\n\t}",
"public String getOperation() {\n\t\treturn operation;\n\t}",
"public SegmentaoOperacao getOperation() {\r\n\t\treturn operation;\r\n\t}",
"public List<OperationType> getOperationTypeList() {\r\n List<OperationType> operationType = new ArrayList<OperationType>();\r\n \r\n try{\r\n init();\r\n \r\n // Start UOC\r\n OperationTypeDao operationTypeDao = new OperationTypeDao(conn);\r\n operationType = operationTypeDao.searchAll();\r\n // End UOC\r\n\r\n } catch (Exception e) {\r\n handleException(e);\r\n } finally {\r\n finish();\r\n }\r\n \r\n return operationType;\r\n }",
"@GetMapping(\"/operadoras\")\n\t@ApiOperation(value=\"Retorna uma lista de operadora em json\")\n\tpublic List<Operadoras> ListaOperadoras(){ \n\t\treturn operadorasRepository.findAll();\n\t\t\n\t}",
"public String getOperation() {\n return this.operation;\n }",
"public String getOpis() {\r\n\t\treturn opis;\r\n\t}",
"public Operation getOperation();",
"public EAdOperation getOperation() {\r\n\t\treturn operation;\r\n\t}",
"public OperationType getOperation() {\r\n return operation;\r\n }",
"public OperationType getOperation() {\r\n return operation;\r\n }",
"@Override\n\tpublic UserOperations userOperations() {\n\t\t\n\t\treturn this.userOperations;\n\t}",
"public String getOperation() {return operation;}",
"public ListOperationsResult withOperations(java.util.Collection<OperationSummary> operations) {\n setOperations(operations);\n return this;\n }",
"public String getOperation();",
"public static java.util.List getOperationDescByName(java.lang.String methodName) {\r\n return (java.util.List)_myOperations.get(methodName);\r\n }",
"public static List<Operator> getList(){\n\t\tList<Operator> supportedOperators = new ArrayList<Operator>();\n\t\t\n\t\t// add each operator to list\n\t\tsupportedOperators.add(new AdditionOperator());\n\t\tsupportedOperators.add(new SubtractionOperator());\n\t\tsupportedOperators.add(new MultiplicationOperator());\n\t\tsupportedOperators.add(new DivisionOperator());\n\t\tsupportedOperators.add(new ExponentiationOperator());\n\t\tsupportedOperators.add(new NegationOperator());\n\t\tsupportedOperators.add(new AbsoluteValueOperator());\n\t\tsupportedOperators.add(new SineOperator());\n\t\tsupportedOperators.add(new CoseOperator());\n\t\treturn supportedOperators;\n\t}",
"public com.google.common.util.concurrent.ListenableFuture<yandex.cloud.api.mdb.clickhouse.v1.ClusterServiceOuterClass.ListClusterOperationsResponse> listOperations(\n yandex.cloud.api.mdb.clickhouse.v1.ClusterServiceOuterClass.ListClusterOperationsRequest request) {\n return io.grpc.stub.ClientCalls.futureUnaryCall(\n getChannel().newCall(getListOperationsMethod(), getCallOptions()), request);\n }",
"public yandex.cloud.api.mdb.clickhouse.v1.ClusterServiceOuterClass.ListClusterOperationsResponse listOperations(yandex.cloud.api.mdb.clickhouse.v1.ClusterServiceOuterClass.ListClusterOperationsRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getListOperationsMethod(), getCallOptions(), request);\n }",
"public List<Command> getCommands() {\n return commands;\n }",
"Operation getOperation();",
"public java.util.Set<com.justonetech.biz.domain.OaReceiveOperation> getOaReceiveOperations () {\r\n\t\tif(oaReceiveOperations == null){\r\n\t\t\toaReceiveOperations = new java.util.LinkedHashSet<com.justonetech.biz.domain.OaReceiveOperation>();\r\n\t\t}\r\n\t\treturn oaReceiveOperations;\r\n\t}",
"public String getOper() {\n return oper;\n }",
"public List<Character> getOperator() {\r\n\t\treturn operator;\r\n\t}",
"@JsonProperty(\"operation\")\n public String getOperation() {\n return operation;\n }",
"public java.lang.CharSequence getOperation() {\n return operation;\n }",
"public java.lang.CharSequence getOperation() {\n return Operation;\n }",
"public ArrayList<Command> getCommands(){\n\t\treturn commands;\n\t}",
"public static List<OperationData> getElements() {\n return new ArrayList<>(content);\n }",
"public OperationTypeElements getOperationTypeAccess() {\n\t\treturn eOperationType;\n\t}",
"public java.lang.CharSequence getOperation() {\n return Operation;\n }",
"public java.lang.CharSequence getOperation() {\n return operation;\n }",
"@Override\n @Transactional(readOnly = true)\n public List<OperationDTO> findAll() {\n log.debug(\"Request to get all Operations\");\n return operationRepository.findAll().stream()\n .map(operationMapper::toDto)\n .collect(Collectors.toCollection(LinkedList::new));\n }",
"public List<String> getCommands()\n\t{\n\t\treturn commands;\n\t}",
"public Map<String, Boolean> getLockedOperations() {\n return this.lockedOperations;\n }",
"List<CoreWaveletOperation> toCoreWaveletOperations() {\n List<CoreWaveletOperation> operations = new ArrayList<CoreWaveletOperation>();\n for (SegmentId segment : segmentsToRemove) {\n operations.add(new CoreRemoveSegment(segment));\n }\n for (SegmentId segment : segmentsToAdd) {\n operations.add(new CoreAddSegment(segment));\n }\n for (SegmentId segment : segmentsToEndModifying) {\n operations.add(new CoreEndModifyingSegment(segment));\n }\n for (SegmentId segment : segmentsToStartModifying) {\n operations.add(new CoreStartModifyingSegment(segment));\n }\n for (ParticipantId participant : participantsToRemove) {\n operations.add(new CoreRemoveParticipant(participant));\n }\n for (ParticipantId participant : participantsToAdd) {\n operations.add(new CoreAddParticipant(participant));\n }\n for (DocumentOperations documentOps : docOps) {\n operations.add(new CoreWaveletDocumentOperation(documentOps.id,\n documentOps.operations.composeAll()));\n }\n return operations;\n }",
"@RequestMapping(value=\"/operators\",method=RequestMethod.GET)\n public FieldOperator[] getAllOperators(){\n return FieldOperator.values();\n }",
"String getOperation();",
"String getOperation();",
"public int getNumberOfOperations() {\n return numberOfOperations;\n }",
"@Override\n public int getOperationsApplied() {\n return operationsApplied;\n }",
"List<OperatorDTO> getAllOperators();",
"public com.google.common.util.concurrent.ListenableFuture<yandex.cloud.api.logging.v1.SinkServiceOuterClass.ListSinkOperationsResponse> listOperations(\n yandex.cloud.api.logging.v1.SinkServiceOuterClass.ListSinkOperationsRequest request) {\n return io.grpc.stub.ClientCalls.futureUnaryCall(\n getChannel().newCall(getListOperationsMethod(), getCallOptions()), request);\n }",
"public static String operationDef()\n {\n read_if_needed_();\n \n return _oper_def;\n }",
"Operator.Type getOperation();",
"public List<TCSObjectReference<Point>> getHops() {\n return new LinkedList<>(hops);\n }",
"public ModeloTablaOperaciones getModeloOperaciones() {\n\t\treturn modeloOperaciones;\n\t}",
"@java.lang.Override\n public com.clarifai.grpc.api.OperationOrBuilder getOperationOrBuilder() {\n return getOperation();\n }",
"public OperationResultInfoBase operation() {\n return this.operation;\n }",
"@java.lang.Override\n public com.clarifai.grpc.api.Operation getOperation() {\n return operation_ == null ? com.clarifai.grpc.api.Operation.getDefaultInstance() : operation_;\n }",
"public com.google.protobuf.ProtocolStringList\n getCommandList() {\n return command_.getUnmodifiableView();\n }",
"public Integer getIops() {\n return this.iops;\n }",
"Operations operations();",
"public Operator getOp() {\n return op;\n }",
"@JsonProperty(\"operationStates\")\n public InternalBackupRestoreState getOperationStates() {\n return operationStates;\n }",
"java.util.List<java.lang.String>\n getCommandList();",
"public Collection<IOperator> getAllOperators()\r\n\t{\r\n\t\treturn expressionRegistry.getAllOperators();\r\n\t}",
"Operations createOperations();",
"public IOperationHistory getOperationHistory() {\n\t\treturn OperationHistoryFactory.getOperationHistory();\r\n\t}",
"public yandex.cloud.api.logging.v1.SinkServiceOuterClass.ListSinkOperationsResponse listOperations(yandex.cloud.api.logging.v1.SinkServiceOuterClass.ListSinkOperationsRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getListOperationsMethod(), getCallOptions(), request);\n }",
"public int getOperationType() {\r\n return operationType;\r\n }",
"public ILatticeOperations<TupleLatticeElement<Variable, NullLatticeElement>> getLatticeOperations() {\n\t\treturn ops;\n\t}",
"@GET\n\t@Produces({ MediaType.APPLICATION_JSON })\n\tpublic Response getOperadores() {\n\t\t\n\t\ttry {\n\t\t\tAlohAndesTransactionManager tm = new AlohAndesTransactionManager(getPath());\n\t\t\t\n\t\t\tList<Operador> operadores;\n\t\t\t//Por simplicidad, solamente se obtienen los primeros 50 resultados de la consulta\n\t\t\toperadores = tm.getAllOperadores();\n\t\t\treturn Response.status(200).entity(operadores).build();\n\t\t} \n\t\tcatch (Exception e) {\n\t\t\treturn Response.status(500).entity(doErrorMessage(e)).build();\n\t\t}\n\t}",
"private IOperationHistory getOperationHistory() {\n return PlatformUI.getWorkbench().getOperationSupport().getOperationHistory();\n }",
"public PanelOpciones getOpciones() {\n\t\treturn opciones;\n\t}",
"public com.sybase.persistence.BigString getCvpOperationLobs()\n {\n \n if(__cvpOperationLobs==null)\n {\n \t__cvpOperationLobs = new com.sybase.persistence.internal.BigStringImpl(this, \"cvpOperationLobs\");\n }\n return __cvpOperationLobs;\n }",
"public ArrayList <String> getOpDetails(){\r\n\t\tArrayList <String> ans = new ArrayList <String> ();\r\n\t\tans.add(cline);\r\n\t\treturn ans;\r\n\t}",
"public Set<NounPhrase> getOpSet(){\n\t\tSet<NounPhrase> opSet = this.getEntConsiderPass(\"O\");\n\t\treturn opSet;\n\t}",
"public java.lang.String getOperateCode() {\n return operateCode;\n }",
"public final TestOperation getOperation()\n\t{\n\t\treturn operation_;\n\t}",
"public Map<String, AttributeDescriptor.Operator> getOperators()\n {\n \n Map<String, AttributeDescriptor.Operator> optrMap = \n new LinkedHashMap<String, AttributeDescriptor.Operator>();\n \n List<DemoPageDef.OperatorDef> operatorList = _searchFieldDef.getOperators();\n\n for(DemoPageDef.OperatorDef operator : operatorList)\n {\n AttributeDescriptor.Operator optr = \n ((DemoAttributeDescriptor) _attrDesc).getOperator(operator);\n optrMap.put(optr.getLabel(), optr);\n }\n return optrMap;\n }",
"public com.google.protobuf.ProtocolStringList\n getCommandList() {\n return command_;\n }",
"public String getOperationDesc() {\r\n return operationDesc;\r\n }",
"List<OperatorDTO> getTimingOperators();",
"public XbaseGrammarAccess.OpMultiElements getOpMultiAccess() {\n\t\treturn gaXbase.getOpMultiAccess();\n\t}",
"public XbaseGrammarAccess.OpMultiElements getOpMultiAccess() {\n\t\treturn gaXbase.getOpMultiAccess();\n\t}",
"public String getOperateLogic() {\n return this.OperateLogic;\n }",
"public String getOperationType() {\r\n return operationType;\r\n }"
] | [
"0.8733014",
"0.8461366",
"0.8281232",
"0.8211081",
"0.79998195",
"0.77903074",
"0.77367306",
"0.7413812",
"0.7161955",
"0.7083916",
"0.6979185",
"0.6862788",
"0.6744634",
"0.66988236",
"0.66910523",
"0.66875154",
"0.6681808",
"0.66356695",
"0.66356695",
"0.66320163",
"0.66320163",
"0.6625955",
"0.6618349",
"0.66114587",
"0.6597566",
"0.65920115",
"0.65755606",
"0.6543403",
"0.65404177",
"0.6516651",
"0.6475134",
"0.6436095",
"0.6436095",
"0.6421898",
"0.63786227",
"0.63514745",
"0.634587",
"0.6336561",
"0.6324587",
"0.631836",
"0.6281392",
"0.62744045",
"0.6274388",
"0.62381357",
"0.6233948",
"0.6232631",
"0.62252223",
"0.6224821",
"0.6215512",
"0.6208739",
"0.61931974",
"0.61528623",
"0.6150868",
"0.6145866",
"0.61360157",
"0.61339873",
"0.6123396",
"0.6121049",
"0.61146444",
"0.60983795",
"0.60983795",
"0.6096361",
"0.6085047",
"0.6075884",
"0.60734135",
"0.60619646",
"0.6051779",
"0.60394645",
"0.603336",
"0.60221887",
"0.60164213",
"0.5993582",
"0.5989915",
"0.59883744",
"0.59768456",
"0.5975628",
"0.5970924",
"0.59618944",
"0.59602875",
"0.5959105",
"0.5954642",
"0.59382945",
"0.5930736",
"0.59228617",
"0.5879997",
"0.587965",
"0.5876009",
"0.5869584",
"0.58683026",
"0.5862729",
"0.58621085",
"0.58555573",
"0.58518904",
"0.5820975",
"0.5814387",
"0.5807259",
"0.580724",
"0.580724",
"0.58058083",
"0.5786116"
] | 0.8111174 | 4 |
Set the operations property: The operations list. | public OperationStatusResultInner withOperations(List<OperationStatusResultInner> operations) {
this.operations = operations;
return this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setOperations(List<OperationImplementation> operations) {\n List<Map<String, Serializable>> operationsSerializable = new ArrayList<Map<String, Serializable>>();\n for (OperationImplementation operation : operations) {\n Map<String, Serializable> operationSerializable = new HashMap<String, Serializable>();\n operationSerializable.put(OPERATION_NAME, operation.getName());\n operationSerializable.put(OPERATION_DOCUMENTATION, operation.getDocumentation());\n operationSerializable.put(OPERATION_PARAMETERS, operation.getParameters());\n operationsSerializable.add(operationSerializable);\n }\n properties.put(XPATH_OPERATIONS, (Serializable) operationsSerializable);\n }",
"public void setOperations(java.util.Collection<OperationSummary> operations) {\n if (operations == null) {\n this.operations = null;\n return;\n }\n\n this.operations = new com.amazonaws.internal.SdkInternalList<OperationSummary>(operations);\n }",
"public Collection getOperations()\n {\n return Collections.unmodifiableCollection(operations);\n }",
"protected void setOperations(java.util.Collection<OperationDescriptor> operations) {\n List<OperationDescriptor> ops = new ArrayList<OperationDescriptor>();\n ops.addAll(operations);\n Constructor<?>[] cons = getTypeClass().getConstructors();\n for (int c = 0; c < cons.length; c++) {\n Constructor<?> constructor = cons[c];\n if (Modifier.isPublic(constructor.getModifiers()) \n && (null == typeAnalyzer || typeAnalyzer.isVisible(constructor))) {\n ops.add(new RtReflectionConstructorDescriptor(this, constructor));\n canBeInstantiated = true;\n }\n }\n try {\n Method equals = getTypeClass().getMethod(\"equals\", Object.class);\n ops.add(new RtComparisonOperationDescriptor(this, equals, \n net.ssehub.easy.instantiation.core.model.vilTypes.Constants.EQUALITY, false));\n ops.add(new RtComparisonOperationDescriptor(this, equals, \n net.ssehub.easy.instantiation.core.model.vilTypes.Constants.UNEQUALITY, true));\n ops.add(new RtComparisonOperationDescriptor(this, equals, \n net.ssehub.easy.instantiation.core.model.vilTypes.Constants.UNEQUALITY_ALIAS, true));\n } catch (NoSuchMethodException e) {\n // shall not occur\n }\n super.setOperations(ops);\n }",
"public ObservableList<Operation> getOperations() {\n\t\treturn operations;\n\t}",
"public void setOperators(List<Operator> operators){\n _operators = operators;\n }",
"@ApiModelProperty(value = \"The operations that can be performed on the issue.\")\n public Operations getOperations() {\n return operations;\n }",
"public List<OperationImplementation> getOperations() {\n List<?> operationsUnknown = (List<?>) properties.get(XPATH_OPERATIONS);\n List<OperationImplementation> operations = new ArrayList<OperationImplementation>();\n if (operationsUnknown != null) {\n \t for (Object operationUnknown : operationsUnknown) {\n \t Map<?, ?> operationMap = (Map<?, ?>) operationUnknown;\n \t operations.add(new OperationImplementation(\n \t (String) operationMap.get(OPERATION_NAME),\n \t (String) operationMap.get(OPERATION_PARAMETERS),\n \t (String) operationMap.get(OPERATION_DOCUMENTATION)));\n \t }\n }\n return operations;\n }",
"public void setOperation (String Operation);",
"public List<OperationStatusResultInner> operations() {\n return this.operations;\n }",
"public ListOperationsResult withOperations(java.util.Collection<OperationSummary> operations) {\n setOperations(operations);\n return this;\n }",
"public void setOperation(String op) {this.operation = op;}",
"public void setOperation(Operation operation) {\n this.operation = operation;\n }",
"public void setOperation (String operation) {\n this.operation = operation;\n }",
"public void setOperation (String operation) {\n this.operation = operation;\n }",
"public java.util.List<OperationSummary> getOperations() {\n if (operations == null) {\n operations = new com.amazonaws.internal.SdkInternalList<OperationSummary>();\n }\n return operations;\n }",
"public void setOperation(String operation) {\n this.operation = operation;\n }",
"public void setOperation(String operation) {\n this.operation = operation;\n }",
"OperationsClient getOperations();",
"public void setOperation(String operation) {\n\t\t\tthis.operation = operation;\n\t\t}",
"public void setOperation(String operation) {\r\n\t\tthis.operation = operation;\r\n\t}",
"public void setOperation(OperationType operation) {\r\n this.operation = operation;\r\n }",
"public void setOperation(OperationType operation) {\r\n this.operation = operation;\r\n }",
"public void setOperation(String aOperation) {\n operation = aOperation;\n }",
"public void setOperation(String aOperation) {\n operation = aOperation;\n }",
"public void operationSet() {\r\n\r\n\t\t// Pane aktivieren\r\n\t\tdisableContentPanes();\r\n\t\tpaneOperation.setVisible(true);\r\n\r\n\t\t// Neue Operation anlegen\r\n\t\tif (listOperation.getSelectionModel().getSelectedItem()\r\n\t\t\t\t.equals(\"hinzufügen...\")) {\r\n\t\t\tstatusFeldText.setText(\"Neue Operationen hinzufügen...\");\r\n\t\t}\r\n\r\n\t\t// Operation bearbeiten\r\n\t\telse {\r\n\t\t\tstatusFeldText.setText(listOperation.getSelectionModel()\r\n\t\t\t\t\t.getSelectedItems() + \" bearbeiten...\");\r\n\t\t}\r\n\r\n\t}",
"@Override\n\tprotected void setOriginalOperators(Set<Operator> ops)\n\t{\n\t\tMap<String, Operator> original = new HashMap<String, Operator>(\n\t\t\t\t(int) (operators.size() * 0.75) + 1);\n\t\tint index = 0; // Each operator should get a unique name. Append a index\n\t\t\t\t\t\t// if it has a duplicate name.\n\t\tfor (Operator op : operators)\n\t\t{\n\t\t\tif (original.containsKey(op.getName()))\n\t\t\t{\n\t\t\t\toriginal.put(op.getName() + index, op.copy());\n\t\t\t\top.setName(op.getName() + index);\n\t\t\t\t++index;\n\t\t\t} else\n\t\t\t{\n\t\t\t\toriginal.put(op.getName(), op.copy());\n\t\t\t}\n\t\t}\n\t\toriginalOperators = Collections.unmodifiableMap(original);\n\t}",
"public void setBeforeOperations(List<Operation> before){\n if (before == null){\n this.before = null;\n }\n else{\n if (this.before != null){\n this.before.clear();\n }\n for (Operation op : before){\n addBeforeOperation(op);\n }\n }\n }",
"public static java.util.Collection getOperationDescs() {\r\n return _myOperationsList;\r\n }",
"Operations createOperations();",
"public DataStructure getOperations() {\r\n\t\tif (ports == null) {\r\n\t\t\treturn EmptyStructures.EMPTY_STRUCTURE;\r\n\t\t}\r\n\t\tList l = new ArrayList();\r\n\t\tfor (Iterator it = ports.values().iterator(); it.hasNext();) {\r\n\t\t\tWSDLPort port = (WSDLPort) it.next();\r\n\t\t\tl.addAll(port.getOperations());\r\n\t\t}\r\n\t\treturn l;\r\n\t}",
"public void setMergeOperations( PointMergeOperations mergeOps )\n \t{\n \t\tthis.mergeOps = mergeOps;\n \t}",
"public void setAfterOperations(List<Operation> after){\n\n if (after == null){\n this.after = null;\n }\n else{\n if (this.after != null){\n this.after.clear();\n }\n for (Operation op : after){\n addAfterOperation(op);\n }\n }\n }",
"public List<String> getOperators() {\n return operators;\n }",
"public void setOper(String oper) {\n this.oper = oper;\n }",
"public com.autodesk.ws.avro.Call.Builder setOperation(java.lang.CharSequence value) {\n validate(fields()[3], value);\n this.operation = value;\n fieldSetFlags()[3] = true;\n return this; \n }",
"void assignOperators(Object rgID, List<Object> operIDs);",
"public void setIops(Integer iops) {\n this.iops = iops;\n }",
"public void setOperation(java.lang.CharSequence value) {\n this.Operation = value;\n }",
"@Override\n\tpublic void multiPut(List<KeyValueVersion> ops) throws RemoteException,\n\t\t\tInterruptedException {\n\t\t\n\t}",
"@objid (\"f604cc17-9920-4a0a-a7d0-2659ddf966f4\")\n void setOBase(Operation value);",
"public void setOperation(java.lang.CharSequence value) {\n this.operation = value;\n }",
"public void setAfterLastOperations(List<Operation> afterLast){\n\n if (afterLast == null){\n this.afterLast = null;\n }\n else{\n if (this.afterLast != null){\n this.afterLast.clear();\n }\n for (Operation op : afterLast){\n addAfterOperation(op);\n }\n }\n }",
"Operations operations();",
"public Operations() {\n initComponents();\n populateO();\n }",
"public void setOp(int op) {\n\t\tthis.op = op;\n\t}",
"public final CQLParser.setOperation_return setOperation() throws RecognitionException {\n CQLParser.setOperation_return retval = new CQLParser.setOperation_return();\n retval.start = input.LT(1);\n\n Object root_0 = null;\n\n Token UNION69=null;\n Token INTERSECTION71=null;\n Token DIFFERENCE73=null;\n CQLParser.setOperationParameters_return setOperationParameters70 = null;\n\n CQLParser.setOperationParameters_return setOperationParameters72 = null;\n\n CQLParser.setOperationParameters_return setOperationParameters74 = null;\n\n\n Object UNION69_tree=null;\n Object INTERSECTION71_tree=null;\n Object DIFFERENCE73_tree=null;\n\n errorMessageStack.push(\"RESULT set operation\"); \n try {\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:320:2: ( UNION setOperationParameters | INTERSECTION setOperationParameters | DIFFERENCE setOperationParameters )\n int alt17=3;\n switch ( input.LA(1) ) {\n case UNION:\n {\n alt17=1;\n }\n break;\n case INTERSECTION:\n {\n alt17=2;\n }\n break;\n case DIFFERENCE:\n {\n alt17=3;\n }\n break;\n default:\n NoViableAltException nvae =\n new NoViableAltException(\"\", 17, 0, input);\n\n throw nvae;\n }\n\n switch (alt17) {\n case 1 :\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:320:4: UNION setOperationParameters\n {\n root_0 = (Object)adaptor.nil();\n\n UNION69=(Token)match(input,UNION,FOLLOW_UNION_in_setOperation1442); \n UNION69_tree = (Object)adaptor.create(UNION69);\n root_0 = (Object)adaptor.becomeRoot(UNION69_tree, root_0);\n\n pushFollow(FOLLOW_setOperationParameters_in_setOperation1445);\n setOperationParameters70=setOperationParameters();\n\n state._fsp--;\n\n adaptor.addChild(root_0, setOperationParameters70.getTree());\n\n }\n break;\n case 2 :\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:321:4: INTERSECTION setOperationParameters\n {\n root_0 = (Object)adaptor.nil();\n\n INTERSECTION71=(Token)match(input,INTERSECTION,FOLLOW_INTERSECTION_in_setOperation1450); \n INTERSECTION71_tree = (Object)adaptor.create(INTERSECTION71);\n root_0 = (Object)adaptor.becomeRoot(INTERSECTION71_tree, root_0);\n\n pushFollow(FOLLOW_setOperationParameters_in_setOperation1453);\n setOperationParameters72=setOperationParameters();\n\n state._fsp--;\n\n adaptor.addChild(root_0, setOperationParameters72.getTree());\n\n }\n break;\n case 3 :\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:322:4: DIFFERENCE setOperationParameters\n {\n root_0 = (Object)adaptor.nil();\n\n DIFFERENCE73=(Token)match(input,DIFFERENCE,FOLLOW_DIFFERENCE_in_setOperation1458); \n DIFFERENCE73_tree = (Object)adaptor.create(DIFFERENCE73);\n root_0 = (Object)adaptor.becomeRoot(DIFFERENCE73_tree, root_0);\n\n pushFollow(FOLLOW_setOperationParameters_in_setOperation1461);\n setOperationParameters74=setOperationParameters();\n\n state._fsp--;\n\n adaptor.addChild(root_0, setOperationParameters74.getTree());\n\n }\n break;\n\n }\n retval.stop = input.LT(-1);\n\n retval.tree = (Object)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n\n errorMessageStack.pop(); \n }\n \t\n \tcatch(RecognitionException re)\n \t{\t\n \t\treportError(re);\n \t\tthrow re;\n \t}\n finally {\n }\n return retval;\n }",
"public void setOp(Operator op) {\n this.op = op;\n }",
"public final EObject ruleEOperations() throws RecognitionException {\n EObject current = null;\n\n EObject lv_operations_1_0 = null;\n\n\n\n \tenterRule();\n\n try {\n // InternalRMParser.g:5483:2: ( ( () ( (lv_operations_1_0= ruleEOperationDefinition ) )* ) )\n // InternalRMParser.g:5484:2: ( () ( (lv_operations_1_0= ruleEOperationDefinition ) )* )\n {\n // InternalRMParser.g:5484:2: ( () ( (lv_operations_1_0= ruleEOperationDefinition ) )* )\n // InternalRMParser.g:5485:3: () ( (lv_operations_1_0= ruleEOperationDefinition ) )*\n {\n // InternalRMParser.g:5485:3: ()\n // InternalRMParser.g:5486:4: \n {\n\n \t\t\t\tcurrent = forceCreateModelElement(\n \t\t\t\t\tgrammarAccess.getEOperationsAccess().getEOperationsAction_0(),\n \t\t\t\t\tcurrent);\n \t\t\t\n\n }\n\n // InternalRMParser.g:5492:3: ( (lv_operations_1_0= ruleEOperationDefinition ) )*\n loop39:\n do {\n int alt39=2;\n int LA39_0 = input.LA(1);\n\n if ( (LA39_0==RULE_ID) ) {\n alt39=1;\n }\n\n\n switch (alt39) {\n \tcase 1 :\n \t // InternalRMParser.g:5493:4: (lv_operations_1_0= ruleEOperationDefinition )\n \t {\n \t // InternalRMParser.g:5493:4: (lv_operations_1_0= ruleEOperationDefinition )\n \t // InternalRMParser.g:5494:5: lv_operations_1_0= ruleEOperationDefinition\n \t {\n\n \t \t\t\t\t\tnewCompositeNode(grammarAccess.getEOperationsAccess().getOperationsEOperationDefinitionParserRuleCall_1_0());\n \t \t\t\t\t\n \t pushFollow(FOLLOW_43);\n \t lv_operations_1_0=ruleEOperationDefinition();\n\n \t state._fsp--;\n\n\n \t \t\t\t\t\tif (current==null) {\n \t \t\t\t\t\t\tcurrent = createModelElementForParent(grammarAccess.getEOperationsRule());\n \t \t\t\t\t\t}\n \t \t\t\t\t\tadd(\n \t \t\t\t\t\t\tcurrent,\n \t \t\t\t\t\t\t\"operations\",\n \t \t\t\t\t\t\tlv_operations_1_0,\n \t \t\t\t\t\t\t\"org.sodalite.dsl.RM.EOperationDefinition\");\n \t \t\t\t\t\tafterParserOrEnumRuleCall();\n \t \t\t\t\t\n\n \t }\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop39;\n }\n } while (true);\n\n\n }\n\n\n }\n\n\n \tleaveRule();\n\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }",
"public com.google.common.util.concurrent.ListenableFuture<yandex.cloud.api.mdb.clickhouse.v1.ClusterServiceOuterClass.ListClusterOperationsResponse> listOperations(\n yandex.cloud.api.mdb.clickhouse.v1.ClusterServiceOuterClass.ListClusterOperationsRequest request) {\n return io.grpc.stub.ClientCalls.futureUnaryCall(\n getChannel().newCall(getListOperationsMethod(), getCallOptions()), request);\n }",
"void list()\n\t{\n\t\toperation.list();\n\t\t\n\t}",
"public void listOperations(yandex.cloud.api.mdb.clickhouse.v1.ClusterServiceOuterClass.ListClusterOperationsRequest request,\n io.grpc.stub.StreamObserver<yandex.cloud.api.mdb.clickhouse.v1.ClusterServiceOuterClass.ListClusterOperationsResponse> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListOperationsMethod(), responseObserver);\n }",
"public sparqles.avro.discovery.DGETInfo.Builder setOperation(java.lang.CharSequence value) {\n validate(fields()[1], value);\n this.Operation = value;\n fieldSetFlags()[1] = true;\n return this; \n }",
"public Map<String, OperationSet> getSupportedOperationSets()\n {\n return new Hashtable<>(supportedOperationSets);\n }",
"public void listOperations(yandex.cloud.api.mdb.clickhouse.v1.ClusterServiceOuterClass.ListClusterOperationsRequest request,\n io.grpc.stub.StreamObserver<yandex.cloud.api.mdb.clickhouse.v1.ClusterServiceOuterClass.ListClusterOperationsResponse> responseObserver) {\n io.grpc.stub.ClientCalls.asyncUnaryCall(\n getChannel().newCall(getListOperationsMethod(), getCallOptions()), request, responseObserver);\n }",
"public yandex.cloud.api.mdb.clickhouse.v1.ClusterServiceOuterClass.ListClusterOperationsResponse listOperations(yandex.cloud.api.mdb.clickhouse.v1.ClusterServiceOuterClass.ListClusterOperationsRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getListOperationsMethod(), getCallOptions(), request);\n }",
"public StdVideoEncodeH264RefMemMgmtCtrlOperations set(\n StdVideoEncodeH264RefMgmtFlags flags,\n byte refList0ModOpCount,\n StdVideoEncodeH264RefListModEntry pRefList0ModOperations,\n byte refList1ModOpCount,\n StdVideoEncodeH264RefListModEntry pRefList1ModOperations,\n byte refPicMarkingOpCount,\n StdVideoEncodeH264RefPicMarkingEntry pRefPicMarkingOperations\n ) {\n flags(flags);\n refList0ModOpCount(refList0ModOpCount);\n pRefList0ModOperations(pRefList0ModOperations);\n refList1ModOpCount(refList1ModOpCount);\n pRefList1ModOperations(pRefList1ModOperations);\n refPicMarkingOpCount(refPicMarkingOpCount);\n pRefPicMarkingOperations(pRefPicMarkingOperations);\n\n return this;\n }",
"public String getOperation() {\n\t\t\treturn operation;\n\t\t}",
"@Override\n\tpublic void operation() {\n\t\tfor(Object object:list) {\n\t\t\t((Component)object).operation();\n\t\t}\n\t}",
"public void setNumberOfOperations(int numberOfOperations) {\n this.numberOfOperations = numberOfOperations;\n }",
"public Operations() {\n history = new LinkedList<>();\n future = new LinkedList<>();\n }",
"public String getOperation() {\r\n\t\treturn operation;\r\n\t}",
"protected void clearSupportedOperationSet()\n {\n supportedOperationSets.clear();\n }",
"public void setOperation(EAdOperation operation) {\r\n\t\tthis.operation = operation;\r\n\t}",
"public void setOp(String op) {\n this.op = op;\n }",
"public ThriftSuperStructuredDataSupport(SuperColumnFamilyOperations<K,String,String,Object> operations) {\n this.operations = operations;\n }",
"public void setOperationType(int value) {\r\n this.operationType = value;\r\n }",
"public String getOperation() {\n\t\treturn operation;\n\t}",
"public void setControls() {\r\n System.out.println(\"wire data is \" + this.controllerWire.getData());\r\n String operation = this.controlMemory.get(this.controllerWire.getData());\r\n System.out.println(\"Setting the controls for \" + operation);\r\n if (operation.equalsIgnoreCase(\"add\")) {\r\n //alu.setControl(1);\r\n this.ALUControl.setData(1);\r\n this.ALU_MUXControl.setData(0);\r\n this.REG_MUXControl.setData(0);\r\n aluMUX.setSelect(this.ALU_MUXControl);\r\n regMUX.setSelect(this.REG_MUXControl);\r\n //aluMUX.setSelect(0);\r\n //regMUX.setSelect(0);\r\n this.PC_MUXControl.setData(0);\r\n this.pcMUX.setSelect(this.PC_MUXControl);\r\n this.registerWrite.setData(1);\r\n registers.setRegWriteControl(this.registerWrite);\r\n } else if (operation.equalsIgnoreCase(\"addi\")) {\r\n //alu.setControl(1);\r\n this.ALUControl.setData(1);\r\n this.ALU_MUXControl.setData(1);\r\n this.REG_MUXControl.setData(0);\r\n aluMUX.setSelect(this.ALU_MUXControl);\r\n regMUX.setSelect(this.REG_MUXControl);\r\n this.PC_MUXControl.setData(0);\r\n this.pcMUX.setSelect(this.PC_MUXControl);\r\n this.registerWrite.setData(1);\r\n registers.setRegWriteControl(this.registerWrite);\r\n } else if (operation.equalsIgnoreCase(\"sub\")) {\r\n //alu.setControl(2);\r\n this.ALUControl.setData(2);\r\n this.ALU_MUXControl.setData(0);\r\n this.REG_MUXControl.setData(0);\r\n aluMUX.setSelect(this.ALU_MUXControl);\r\n regMUX.setSelect(this.REG_MUXControl);\r\n this.PC_MUXControl.setData(0);\r\n this.pcMUX.setSelect(this.PC_MUXControl);\r\n this.registerWrite.setData(1);\r\n registers.setRegWriteControl(this.registerWrite);\r\n } else if (operation.equalsIgnoreCase(\"lw\")) {\r\n// alu.setControl(8); // TODO \r\n this.ALUControl.setData(8);\r\n this.REG_MUXControl.setData(1);\r\n regMUX.setSelect(this.REG_MUXControl);\r\n this.readWire.setData(1);\r\n memory.setReadWire(this.readWire);\r\n this.PC_MUXControl.setData(0);\r\n this.pcMUX.setSelect(this.PC_MUXControl);\r\n this.registerWrite.setData(1);\r\n registers.setRegWriteControl(this.registerWrite);\r\n } else if (operation.equalsIgnoreCase(\"sw\")) {\r\n //alu.setControl(9); // TODO\r\n this.ALUControl.setData(9);\r\n //regMUX.setSelect(1);\r\n this.writeWire.setData(1);\r\n memory.setWriteWire(writeWire);\r\n this.PC_MUXControl.setData(0);\r\n this.pcMUX.setSelect(this.PC_MUXControl);\r\n this.registerWrite.setData(0);\r\n registers.setRegWriteControl(this.registerWrite);\r\n } else if (operation.equalsIgnoreCase(\"sll\")) {\r\n //alu.setControl(6);\r\n this.ALUControl.setData(6);\r\n this.ALU_MUXControl.setData(1);\r\n this.REG_MUXControl.setData(0);\r\n aluMUX.setSelect(this.ALU_MUXControl);\r\n regMUX.setSelect(this.REG_MUXControl);\r\n this.PC_MUXControl.setData(0);\r\n this.pcMUX.setSelect(this.PC_MUXControl);\r\n this.registerWrite.setData(1);\r\n registers.setRegWriteControl(this.registerWrite);\r\n } else if (operation.equalsIgnoreCase(\"srl\")) {\r\n //alu.setControl(5);\r\n this.ALUControl.setData(5);\r\n this.ALU_MUXControl.setData(1);\r\n this.REG_MUXControl.setData(0);\r\n aluMUX.setSelect(this.ALU_MUXControl);\r\n regMUX.setSelect(this.REG_MUXControl);\r\n this.PC_MUXControl.setData(0);\r\n this.pcMUX.setSelect(this.PC_MUXControl);\r\n this.PC_MUXControl.setData(0);\r\n this.pcMUX.setSelect(this.PC_MUXControl);\r\n this.registerWrite.setData(1);\r\n registers.setRegWriteControl(this.registerWrite);\r\n } else if (operation.equalsIgnoreCase(\"and\")) {\r\n //alu.setControl(4);\r\n this.ALUControl.setData(4);\r\n this.ALU_MUXControl.setData(0);\r\n this.REG_MUXControl.setData(0);\r\n aluMUX.setSelect(this.ALU_MUXControl);\r\n regMUX.setSelect(this.REG_MUXControl);\r\n this.PC_MUXControl.setData(0);\r\n this.pcMUX.setSelect(this.PC_MUXControl);\r\n this.registerWrite.setData(1);\r\n registers.setRegWriteControl(this.registerWrite);\r\n } else if (operation.equalsIgnoreCase(\"andi\")) {\r\n //alu.setControl(4);\r\n this.ALUControl.setData(4);\r\n this.ALU_MUXControl.setData(1);\r\n this.REG_MUXControl.setData(0);\r\n aluMUX.setSelect(this.ALU_MUXControl);\r\n regMUX.setSelect(this.REG_MUXControl);\r\n this.PC_MUXControl.setData(0);\r\n this.pcMUX.setSelect(this.PC_MUXControl);\r\n this.registerWrite.setData(1);\r\n registers.setRegWriteControl(this.registerWrite);\r\n } else if (operation.equalsIgnoreCase(\"or\")) {\r\n //alu.setControl(3);\r\n this.ALUControl.setData(3);\r\n this.ALU_MUXControl.setData(0);\r\n this.REG_MUXControl.setData(0);\r\n aluMUX.setSelect(this.ALU_MUXControl);\r\n regMUX.setSelect(this.REG_MUXControl);\r\n this.PC_MUXControl.setData(0);\r\n this.pcMUX.setSelect(this.PC_MUXControl);\r\n this.registerWrite.setData(1);\r\n registers.setRegWriteControl(this.registerWrite);\r\n } else if (operation.equalsIgnoreCase(\"ori\")) {\r\n //alu.setControl(3);\r\n this.ALUControl.setData(3);\r\n this.ALU_MUXControl.setData(1);\r\n this.REG_MUXControl.setData(0);\r\n aluMUX.setSelect(this.ALU_MUXControl);\r\n regMUX.setSelect(this.REG_MUXControl);\r\n this.PC_MUXControl.setData(0);\r\n this.pcMUX.setSelect(this.PC_MUXControl);\r\n this.registerWrite.setData(1);\r\n registers.setRegWriteControl(this.registerWrite);\r\n } else if (operation.equalsIgnoreCase(\"nor\")) {\r\n //alu.setControl(7);\r\n this.ALUControl.setData(7);\r\n this.ALU_MUXControl.setData(0);\r\n this.REG_MUXControl.setData(0);\r\n aluMUX.setSelect(this.ALU_MUXControl);\r\n regMUX.setSelect(this.REG_MUXControl);\r\n this.PC_MUXControl.setData(0);\r\n this.pcMUX.setSelect(this.PC_MUXControl);\r\n this.registerWrite.setData(1);\r\n registers.setRegWriteControl(this.registerWrite);\r\n } else if (operation.equalsIgnoreCase(\"beq\")) {\r\n this.PC_MUXControl.setData(0);\r\n this.ALUControl.setData(10);\r\n this.pcMUX.setSelect(this.PC_MUXControl);\r\n this.ALU_MUXControl.setData(0);\r\n this.registerWrite.setData(0);\r\n registers.setRegWriteControl(this.registerWrite);\r\n aluMUX.setSelect(this.ALU_MUXControl);\r\n } else if (operation.equalsIgnoreCase(\"bne\")) {\r\n this.PC_MUXControl.setData(0);\r\n this.ALUControl.setData(11);\r\n this.pcMUX.setSelect(this.PC_MUXControl);\r\n this.ALU_MUXControl.setData(0);\r\n aluMUX.setSelect(this.ALU_MUXControl);\r\n this.registerWrite.setData(0);\r\n registers.setRegWriteControl(this.registerWrite);\r\n\r\n } else if (operation.equalsIgnoreCase(\"jr\")) {\r\n this.PC_MUXControl.setData(1);\r\n this.ALUControl.setData(12);\r\n this.pcMUX.setSelect(this.PC_MUXControl);\r\n this.ALU_MUXControl.setData(0);\r\n aluMUX.setSelect(this.ALU_MUXControl);\r\n this.registerWrite.setData(0);\r\n registers.setRegWriteControl(this.registerWrite);\r\n } else if (operation.equalsIgnoreCase(\"j\")) {\r\n this.PC_MUXControl.setData(1);\r\n this.ALUControl.setData(12);\r\n this.pcMUX.setSelect(this.PC_MUXControl);\r\n this.ALU_MUXControl.setData(0);\r\n aluMUX.setSelect(this.ALU_MUXControl);\r\n this.registerWrite.setData(0);\r\n registers.setRegWriteControl(this.registerWrite);\r\n\r\n } else if (operation.equalsIgnoreCase(\"jal\")) {\r\n this.PC_MUXControl.setData(1);\r\n this.ALUControl.setData(16);\r\n this.PC_MUXControl.setData(1);\r\n this.pcMUX.setSelect(this.PC_MUXControl);\r\n this.ALU_MUXControl.setData(0);\r\n aluMUX.setSelect(this.ALU_MUXControl);\r\n this.REG_MUXControl.setData(0);\r\n regMUX.setSelect(this.REG_MUXControl);\r\n this.registerWrite.setData(1);\r\n registers.setRegWriteControl(this.registerWrite);\r\n\r\n } else if (operation.equalsIgnoreCase(\"slt\")) {\r\n this.ALUControl.setData(13);\r\n this.ALU_MUXControl.setData(0);\r\n this.REG_MUXControl.setData(0);\r\n aluMUX.setSelect(this.ALU_MUXControl);\r\n regMUX.setSelect(this.REG_MUXControl);\r\n this.PC_MUXControl.setData(0);\r\n this.pcMUX.setSelect(this.PC_MUXControl);\r\n this.registerWrite.setData(1);\r\n registers.setRegWriteControl(this.registerWrite);\r\n } else if (operation.equalsIgnoreCase(\"slti\")) {\r\n this.ALUControl.setData(13);\r\n this.ALU_MUXControl.setData(1);\r\n this.REG_MUXControl.setData(0);\r\n this.PC_MUXControl.setData(0);\r\n this.registerWrite.setData(1);\r\n registers.setRegWriteControl(this.registerWrite);\r\n this.pcMUX.setSelect(this.PC_MUXControl);\r\n aluMUX.setSelect(this.ALU_MUXControl);\r\n regMUX.setSelect(this.REG_MUXControl);\r\n } else if (operation.equalsIgnoreCase(\"sltu\")) {\r\n this.ALUControl.setData(14);\r\n this.ALU_MUXControl.setData(0);\r\n this.REG_MUXControl.setData(0);\r\n aluMUX.setSelect(this.ALU_MUXControl);\r\n regMUX.setSelect(this.REG_MUXControl);\r\n this.PC_MUXControl.setData(0);\r\n this.registerWrite.setData(1);\r\n registers.setRegWriteControl(this.registerWrite);\r\n this.pcMUX.setSelect(this.PC_MUXControl);\r\n } else if (operation.equalsIgnoreCase(\"sltui\")) {\r\n this.ALUControl.setData(14);\r\n this.ALU_MUXControl.setData(1);\r\n this.registerWrite.setData(1);\r\n registers.setRegWriteControl(this.registerWrite);\r\n this.REG_MUXControl.setData(0);\r\n aluMUX.setSelect(this.ALU_MUXControl);\r\n regMUX.setSelect(this.REG_MUXControl);\r\n this.PC_MUXControl.setData(0);\r\n this.pcMUX.setSelect(this.PC_MUXControl);\r\n } else if (operation.equalsIgnoreCase(\"beq\")) {\r\n this.ALUControl.setData(14);\r\n this.ALU_MUXControl.setData(1);\r\n aluMUX.setSelect(this.ALU_MUXControl);\r\n this.registerWrite.setData(0);\r\n registers.setRegWriteControl(this.registerWrite);\r\n }\r\n instructionMemory.wiresLog.get(instructionMemory.COMMANDS_COUNTER).get(1).add(\"ALU CONTROL: \" + this.ALUControl.toString());\r\n instructionMemory.wiresLog.get(instructionMemory.COMMANDS_COUNTER).get(1).add(\"ALU MUX CONTROL: \" + this.ALU_MUXControl.toString());\r\n instructionMemory.wiresLog.get(instructionMemory.COMMANDS_COUNTER).get(1).add(\"PC MUX CONTROL: \" + this.PC_MUXControl.toString());\r\n instructionMemory.wiresLog.get(instructionMemory.COMMANDS_COUNTER).get(1).add(\"REG MUX CONTROL: \" + this.REG_MUXControl.toString());\r\n instructionMemory.wiresLog.get(instructionMemory.COMMANDS_COUNTER).get(1).add(\"MEMORY READ: \" + this.readWire.toString());\r\n instructionMemory.wiresLog.get(instructionMemory.COMMANDS_COUNTER).get(1).add(\"MEMORY WRITE: \" + this.writeWire.toString());\r\n instructionMemory.wiresLog.get(instructionMemory.COMMANDS_COUNTER).get(1).add(\"REGISTER WRITE: \" + this.registerWrite.toString());\r\n this.setRegisterWriteControl();\r\n }",
"public void setOperation(ArangoDbOperation operation) {\n this.operation = operation;\n }",
"public void setOp(boolean value) {}",
"List getOperationDescriptors() throws RemoteException;",
"@JsonProperty(\"operation\")\n public String getOperation() {\n return operation;\n }",
"private void configureOperations(ConfigExtractor cfg) {\n operations = new TreeMap<OperationType, OperationInfo>();\n Map<OperationType, OperationData> opinfo = cfg.getOperations();\n int totalAm = cfg.getOpCount();\n int opsLeft = totalAm;\n NumberFormat formatter = Formatter.getPercentFormatter();\n for (final OperationType type : opinfo.keySet()) {\n OperationData opData = opinfo.get(type);\n OperationInfo info = new OperationInfo();\n info.distribution = opData.getDistribution();\n int amLeft = determineHowMany(totalAm, opData, type);\n opsLeft -= amLeft;\n LOG\n .info(type.name() + \" has \" + amLeft + \" initial operations out of \"\n + totalAm + \" for its ratio \"\n + formatter.format(opData.getPercent()));\n info.amountLeft = amLeft;\n Operation op = factory.getOperation(type);\n // wrap operation in finalizer so that amount left gets decrements when\n // its done\n if (op != null) {\n Observer fn = new Observer() {\n public void notifyFinished(Operation op) {\n OperationInfo opInfo = operations.get(type);\n if (opInfo != null) {\n --opInfo.amountLeft;\n }\n }\n\n public void notifyStarting(Operation op) {\n }\n };\n info.operation = new ObserveableOp(op, fn);\n operations.put(type, info);\n }\n }\n if (opsLeft > 0) {\n LOG\n .info(opsLeft\n + \" left over operations found (due to inability to support partial operations)\");\n }\n }",
"public String getOperation() {\n return operation;\n }",
"public String getOperation() {\n return operation;\n }",
"public void setIops(Long iops) {\n this.iops = iops;\n }",
"public final CQLParser.setOperationParameters_return setOperationParameters() throws RecognitionException {\n CQLParser.setOperationParameters_return retval = new CQLParser.setOperationParameters_return();\n retval.start = input.LT(1);\n\n Object root_0 = null;\n\n Token char_literal75=null;\n Token char_literal76=null;\n Token char_literal77=null;\n CQLParser.setOperationAttribute_return a = null;\n\n CQLParser.setOperationAttribute_return b = null;\n\n\n Object char_literal75_tree=null;\n Object char_literal76_tree=null;\n Object char_literal77_tree=null;\n RewriteRuleTokenStream stream_116=new RewriteRuleTokenStream(adaptor,\"token 116\");\n RewriteRuleTokenStream stream_114=new RewriteRuleTokenStream(adaptor,\"token 114\");\n RewriteRuleTokenStream stream_115=new RewriteRuleTokenStream(adaptor,\"token 115\");\n RewriteRuleSubtreeStream stream_setOperationAttribute=new RewriteRuleSubtreeStream(adaptor,\"rule setOperationAttribute\");\n try {\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:326:2: ( '(' a= setOperationAttribute ',' b= setOperationAttribute ')' -> $a $b)\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:326:4: '(' a= setOperationAttribute ',' b= setOperationAttribute ')'\n {\n char_literal75=(Token)match(input,114,FOLLOW_114_in_setOperationParameters1475); \n stream_114.add(char_literal75);\n\n pushFollow(FOLLOW_setOperationAttribute_in_setOperationParameters1479);\n a=setOperationAttribute();\n\n state._fsp--;\n\n stream_setOperationAttribute.add(a.getTree());\n char_literal76=(Token)match(input,115,FOLLOW_115_in_setOperationParameters1481); \n stream_115.add(char_literal76);\n\n pushFollow(FOLLOW_setOperationAttribute_in_setOperationParameters1485);\n b=setOperationAttribute();\n\n state._fsp--;\n\n stream_setOperationAttribute.add(b.getTree());\n char_literal77=(Token)match(input,116,FOLLOW_116_in_setOperationParameters1487); \n stream_116.add(char_literal77);\n\n\n\n // AST REWRITE\n // elements: a, b\n // token labels: \n // rule labels: retval, b, a\n // token list labels: \n // rule list labels: \n // wildcard labels: \n retval.tree = root_0;\n RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.tree:null);\n RewriteRuleSubtreeStream stream_b=new RewriteRuleSubtreeStream(adaptor,\"rule b\",b!=null?b.tree:null);\n RewriteRuleSubtreeStream stream_a=new RewriteRuleSubtreeStream(adaptor,\"rule a\",a!=null?a.tree:null);\n\n root_0 = (Object)adaptor.nil();\n // 327:3: -> $a $b\n {\n adaptor.addChild(root_0, stream_a.nextTree());\n adaptor.addChild(root_0, stream_b.nextTree());\n\n }\n\n retval.tree = root_0;\n }\n\n retval.stop = input.LT(-1);\n\n retval.tree = (Object)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n\n }\n \t\n \tcatch(RecognitionException re)\n \t{\t\n \t\treportError(re);\n \t\tthrow re;\n \t}\n finally {\n }\n return retval;\n }",
"public com.google.protobuf.ProtocolStringList\n getInstrumentedOpsList() {\n return instrumentedOps_;\n }",
"public void setOperation(Set<String> sel) {\n RenderContext myrc = (RenderContext) rc; if (myrc == null) return;\n Set<String> new_sel = new HashSet<String>(), old_sel;\n if (last_shft_down && last_ctrl_down) { old_sel = myrc.filterEntities(getRTParent().getSelectedEntities());\n old_sel.retainAll(sel);\n\t\t\t\t\t\t new_sel = old_sel;\n } else if (last_shft_down) { old_sel = myrc.filterEntities(getRTParent().getSelectedEntities());\n old_sel.removeAll(sel);\n\t\t\t\t\t\t new_sel = old_sel;\n } else if ( last_ctrl_down) { old_sel = myrc.filterEntities(getRTParent().getSelectedEntities());\n old_sel.addAll(sel);\n\t\t\t\t\t\t new_sel = old_sel;\n } else new_sel = sel;\n getRTParent().setSelectedEntities(new_sel);\n }",
"public com.google.protobuf.ProtocolStringList\n getInstrumentedOpsList() {\n return instrumentedOps_.getUnmodifiableView();\n }",
"public void setOperation(final OperationMetadata newValue) {\n checkWritePermission();\n this.operation = newValue;\n }",
"public void setOperationStates(InternalBackupRestoreState operationStates) {\n this.operationStates = operationStates;\n }",
"public void setBeforeFirstOperations(List<Operation> beforeFirst){\n if (beforeFirst == null){\n this.beforeFirst = null;\n }\n else{\n if (this.beforeFirst != null){\n this.beforeFirst.clear();\n }\n for (Operation op : beforeFirst){\n addBeforeFirstOperation(op);\n }\n }\n }",
"public native final EditorBaseEvent commands(JsArray<? extends JavaScriptObject> val) /*-{\n\t\tthis.commands = val;\n\t\treturn this;\n\t}-*/;",
"public static void set_OperationDef(String v) throws RuntimeException\n {\n UmlCom.send_cmd(CmdFamily.javaSettingsCmd, JavaSettingsCmd._setJavaOperationDefCmd, v);\n UmlCom.check();\n \n _oper_def = v;\n \n }",
"public void setOperation(org.xmlsoap.schemas.wsdl.http.OperationType operation)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.xmlsoap.schemas.wsdl.http.OperationType target = null;\n target = (org.xmlsoap.schemas.wsdl.http.OperationType)get_store().find_element_user(OPERATION$0, 0);\n if (target == null)\n {\n target = (org.xmlsoap.schemas.wsdl.http.OperationType)get_store().add_element_user(OPERATION$0);\n }\n target.set(operation);\n }\n }",
"List<CoreWaveletOperation> toCoreWaveletOperations() {\n List<CoreWaveletOperation> operations = new ArrayList<CoreWaveletOperation>();\n for (SegmentId segment : segmentsToRemove) {\n operations.add(new CoreRemoveSegment(segment));\n }\n for (SegmentId segment : segmentsToAdd) {\n operations.add(new CoreAddSegment(segment));\n }\n for (SegmentId segment : segmentsToEndModifying) {\n operations.add(new CoreEndModifyingSegment(segment));\n }\n for (SegmentId segment : segmentsToStartModifying) {\n operations.add(new CoreStartModifyingSegment(segment));\n }\n for (ParticipantId participant : participantsToRemove) {\n operations.add(new CoreRemoveParticipant(participant));\n }\n for (ParticipantId participant : participantsToAdd) {\n operations.add(new CoreAddParticipant(participant));\n }\n for (DocumentOperations documentOps : docOps) {\n operations.add(new CoreWaveletDocumentOperation(documentOps.id,\n documentOps.operations.composeAll()));\n }\n return operations;\n }",
"public String getOperation() {\n return this.operation;\n }",
"public String getOperation() {return operation;}",
"public keys getOperation() {\r\n return this.operation;\r\n }",
"public String getOperation () {\n return operation;\n }",
"public String getOperation () {\n return operation;\n }",
"@Override\n public int getOperationsApplied() {\n return operationsApplied;\n }",
"public String getOper() {\n return oper;\n }",
"public String getOpis() {\r\n\t\treturn opis;\r\n\t}",
"public void setAPIOperation(APIOperation apiOperation)\n {\n this.apiOperation = apiOperation;\n }",
"public interface OperationsClient {\n /**\n * Lists all the operations supported by Microsoft.ProviderHub.\n *\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return the paginated response with {@link PagedIterable}.\n */\n @ServiceMethod(returns = ReturnType.COLLECTION)\n PagedIterable<OperationsDefinitionInner> list();\n\n /**\n * Lists all the operations supported by Microsoft.ProviderHub.\n *\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return the paginated response with {@link PagedIterable}.\n */\n @ServiceMethod(returns = ReturnType.COLLECTION)\n PagedIterable<OperationsDefinitionInner> list(Context context);\n\n /**\n * Gets the operations supported by the given provider.\n *\n * @param providerNamespace The name of the resource provider hosted within ProviderHub.\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return the operations supported by the given provider along with {@link Response}.\n */\n @ServiceMethod(returns = ReturnType.SINGLE)\n Response<List<OperationsDefinitionInner>> listByProviderRegistrationWithResponse(\n String providerNamespace, Context context);\n\n /**\n * Gets the operations supported by the given provider.\n *\n * @param providerNamespace The name of the resource provider hosted within ProviderHub.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return the operations supported by the given provider.\n */\n @ServiceMethod(returns = ReturnType.SINGLE)\n List<OperationsDefinitionInner> listByProviderRegistration(String providerNamespace);\n\n /**\n * Creates or updates the operation supported by the given provider.\n *\n * @param providerNamespace The name of the resource provider hosted within ProviderHub.\n * @param operationsPutContent The operations content properties supplied to the CreateOrUpdate operation.\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return the response body along with {@link Response}.\n */\n @ServiceMethod(returns = ReturnType.SINGLE)\n Response<OperationsContentInner> createOrUpdateWithResponse(\n String providerNamespace, OperationsPutContent operationsPutContent, Context context);\n\n /**\n * Creates or updates the operation supported by the given provider.\n *\n * @param providerNamespace The name of the resource provider hosted within ProviderHub.\n * @param operationsPutContent The operations content properties supplied to the CreateOrUpdate operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return the response.\n */\n @ServiceMethod(returns = ReturnType.SINGLE)\n OperationsContentInner createOrUpdate(String providerNamespace, OperationsPutContent operationsPutContent);\n\n /**\n * Deletes an operation.\n *\n * @param providerNamespace The name of the resource provider hosted within ProviderHub.\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return the {@link Response}.\n */\n @ServiceMethod(returns = ReturnType.SINGLE)\n Response<Void> deleteWithResponse(String providerNamespace, Context context);\n\n /**\n * Deletes an operation.\n *\n * @param providerNamespace The name of the resource provider hosted within ProviderHub.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n */\n @ServiceMethod(returns = ReturnType.SINGLE)\n void delete(String providerNamespace);\n}",
"public void setFieldValues(String op, List values)\n {\n if (op == null || op.trim().length() == 0)\n throw new IllegalArgumentException(\n \"operator must not be null or empty\");\n\n if (!isValidOperator(op))\n throw new IllegalArgumentException(\n \"Invalid operator specified for search field\");\n\n if (setValues(op, null, values))\n setDirty();\n }",
"public nl.tudelft.ewi.st.atlantis.tudelft.v1.services.SetBSToOPSResponse setBSToOPS\n (\n nl.tudelft.ewi.st.atlantis.tudelft.v1.services.SetBSToOPSRequest setBSToOPSRequest\n )\n ;"
] | [
"0.75683296",
"0.726633",
"0.69018215",
"0.68973804",
"0.6783545",
"0.6610196",
"0.64779645",
"0.6425315",
"0.6321028",
"0.63009506",
"0.62901807",
"0.612218",
"0.6110352",
"0.6077023",
"0.6077023",
"0.6050967",
"0.6033277",
"0.6033277",
"0.5986545",
"0.59389836",
"0.5937947",
"0.5873484",
"0.5873484",
"0.584652",
"0.584652",
"0.58226186",
"0.57652086",
"0.5721186",
"0.56609666",
"0.56452364",
"0.5634317",
"0.56053215",
"0.5597873",
"0.5583919",
"0.5582076",
"0.5540611",
"0.55165577",
"0.54918957",
"0.54885465",
"0.5480227",
"0.5468607",
"0.5460529",
"0.54449075",
"0.5426755",
"0.5404817",
"0.53685856",
"0.53677726",
"0.5357018",
"0.5350678",
"0.53483397",
"0.5318873",
"0.5309012",
"0.52539015",
"0.524527",
"0.5244139",
"0.52415556",
"0.52242374",
"0.5220547",
"0.52198493",
"0.51992357",
"0.5196159",
"0.5192233",
"0.5191017",
"0.5190576",
"0.5168067",
"0.516685",
"0.51544136",
"0.5143733",
"0.5138848",
"0.5137071",
"0.5127596",
"0.5125521",
"0.5125231",
"0.51245755",
"0.5112992",
"0.5112992",
"0.5112072",
"0.51050055",
"0.50926363",
"0.50889874",
"0.5087172",
"0.50825983",
"0.50783455",
"0.50772375",
"0.50715953",
"0.5064148",
"0.50526685",
"0.5041212",
"0.50302774",
"0.50240105",
"0.50209606",
"0.49973413",
"0.49973413",
"0.49938744",
"0.4993693",
"0.4989146",
"0.4984501",
"0.4977544",
"0.4971009",
"0.49685356"
] | 0.5456548 | 42 |
Get the error property: If present, details of the operation error. | public ManagementError error() {
return this.error;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Error getError() {\r\n\t\treturn error;\r\n\t}",
"public Object getError() {\n\t\treturn error;\n\t}",
"public String getError() {\r\n\t\treturn error;\r\n\t}",
"public String getError() {\n\t\treturn error;\n\t}",
"public String getError() {\n\t\treturn error;\n\t}",
"public Object getError() {\n return error;\n }",
"public String getError() {\n return error;\n }",
"public String getError() {\n return error;\n }",
"public String getError() {\n return error;\n }",
"public String getError() {\n return error;\n }",
"@Override\n @Nullable\n public Exception getError() {\n return error;\n }",
"public String getError() {\n return error != null ? error : \"An unknown error occurred.\";\n }",
"public java.lang.String getError() {\n return error;\n }",
"public String getError() {\n return writeResult.getError();\n }",
"public String getError() {\r\n\t\tString error = _error;\r\n\t\t_error = null;\r\n\t\treturn error;\r\n\t}",
"public int getError() {\n return error;\n }",
"public String getError() {\n return errMsg;\n }",
"public protodef.b_error.info getError() {\n return error_ == null ? protodef.b_error.info.getDefaultInstance() : error_;\n }",
"public protodef.b_error.info getError() {\n return error_ == null ? protodef.b_error.info.getDefaultInstance() : error_;\n }",
"public CoreASMError getError() {\n\t\treturn error;\n\t}",
"public Map getError() {\n return this.error;\n }",
"public final String getError(){\n return lastKnownError;\n }",
"java.lang.String getError();",
"java.lang.String getError();",
"java.lang.String getError();",
"public String getErrorMsg() {\n return this.state == null ? null : this.state.msg;\n }",
"public java.lang.String getError() {\n java.lang.Object ref = error_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n error_ = s;\n return s;\n }\n }",
"@XmlElement\n @Nullable\n public ExceptionBean getError() {\n return error;\n }",
"public String getErrorMsg() {\n return this.emsg;\n }",
"public PipelineJobError error() {\n return this.innerProperties() == null ? null : this.innerProperties().error();\n }",
"@Nullable public Throwable error() {\n return err;\n }",
"public java.lang.String getError() {\n java.lang.Object ref = error_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n error_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public String errorDetails() {\n return this.errorDetails;\n }",
"public protodef.b_error.info getError() {\n if (errorBuilder_ == null) {\n return error_ == null ? protodef.b_error.info.getDefaultInstance() : error_;\n } else {\n return errorBuilder_.getMessage();\n }\n }",
"public protodef.b_error.info getError() {\n if (errorBuilder_ == null) {\n return error_ == null ? protodef.b_error.info.getDefaultInstance() : error_;\n } else {\n return errorBuilder_.getMessage();\n }\n }",
"public String getErrorMsg() {\r\n\t\treturn errorMsg;\r\n\t}",
"public java.lang.String getError() {\n java.lang.Object ref = error_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n error_ = s;\n }\n return s;\n }\n }",
"public String getErrorMsg() {\n return errorMsg;\n }",
"public java.lang.String getError() {\n java.lang.Object ref = error_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n error_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public XyzError getError() {\n return this.error;\n }",
"public com.google.protobuf.ByteString\n getErrorBytes() {\n java.lang.Object ref = error_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b =\n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n error_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public com.google.protobuf.ByteString\n getErrorBytes() {\n java.lang.Object ref = error_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b =\n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n error_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public int error() {\n return this.error;\n }",
"public ErrorResponse getError()\n {\n return data().containsKey(_ERROR) ? new ErrorResponse(data().getDataMap(_ERROR)) : null;\n }",
"public java.lang.String getError() {\n return localError;\n }",
"public java.lang.String getError() {\n return localError;\n }",
"public java.lang.String getError() {\n return localError;\n }",
"public String errorMessage() {\n return this.errorMessage;\n }",
"public String getErrorDescription() {\n return errorDescription;\n }",
"public String getErrorStatus() {\r\n return errorStatus;\r\n }",
"public com.google.protobuf.ByteString\n getErrorBytes() {\n java.lang.Object ref = error_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n error_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public String getErrorMessage() {\n\t\treturn this.message;\n\t}",
"public com.google.protobuf.ByteString\n getErrorBytes() {\n java.lang.Object ref = error_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n error_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public String getErrorMessage() {\n\t\treturn this.errMsg;\n\t}",
"public protodef.b_error.infoOrBuilder getErrorOrBuilder() {\n return error_ == null ? protodef.b_error.info.getDefaultInstance() : error_;\n }",
"public protodef.b_error.infoOrBuilder getErrorOrBuilder() {\n return error_ == null ? protodef.b_error.info.getDefaultInstance() : error_;\n }",
"public java.lang.String getErrorId() {\n return errorId;\n }",
"public String getErrorMessage() {\r\n return this.errorMessage;\r\n }",
"public String getErrorMessage() {\n return ERROR_MESSAGE;\n }",
"public java.lang.String getErrorId() {\n return errorId;\n }",
"public String getErrorDetails() {\n return super.getString(Constants.Properties.ERROR_DETAILS);\n }",
"public String getErrorMessage() {\n return this.errorMessage;\n }",
"public String getErrorText() {\n\t\treturn errorText;\n\t}",
"public String getErrorText() {\n return m_ErrorText;\n }",
"public String getMsgError() {\r\n\t\treturn msgError;\r\n\t}",
"ExternalCompiler.ErrorExpression getErrorExpression () {\n return errorExpression;\n }",
"public String getError() throws DeviceException {\n \t\ttry {\n \t\t\tString errorCode = controller.caget(errChannel);\n \t\t\treturn \"Error Code \" + errorCode + \" : \" + lookupErrorCode(errorCode);\n \t\t} catch (Throwable e) {\n \t\t\tthrow new DeviceException(\"failed to get error code from robot\", e);\n \t\t}\n \t}",
"public boolean getError() {\r\n \treturn error;\r\n }",
"@Nullable\n public String getErrorResponse() {\n return errorResponse;\n }",
"public VolleyError getError() {\n return error;\n }",
"public String getErrorType() {\n return errorType;\n }",
"public protodef.b_error.infoOrBuilder getErrorOrBuilder() {\n if (errorBuilder_ != null) {\n return errorBuilder_.getMessageOrBuilder();\n } else {\n return error_ == null ?\n protodef.b_error.info.getDefaultInstance() : error_;\n }\n }",
"public protodef.b_error.infoOrBuilder getErrorOrBuilder() {\n if (errorBuilder_ != null) {\n return errorBuilder_.getMessageOrBuilder();\n } else {\n return error_ == null ?\n protodef.b_error.info.getDefaultInstance() : error_;\n }\n }",
"public java.lang.String getErrorMsg() {\r\n return localErrorMsg;\r\n }",
"public String errorMessage() {\n return errorMessage;\n }",
"public String getErrorString()\n\t{\n\t\treturn errorString;\n\t}",
"public String getErrorMessage() {\n return errorMessage;\n }",
"public String getErrorMessage() {\n return errorMessage;\n }",
"public String getErrorMessage() {\n return errorMessage;\n }",
"public String getError() {\n\treturn mistake;\n }",
"public String getErrorMessage() {\n\t\treturn errorMessage;\n\t}",
"@ErrorType\n public int getErrorType() {\n return mErrorType;\n }",
"public String errorDescription()\n {\n return edma_errorDesc;\n }",
"public ErrorCode error() {\n return new ErrorCode(alert.getError());\n }",
"public TCodeRep getErr() {\n return err;\n }",
"@Property\n public native MintMessageException getExceptionError ();",
"public java.lang.String getErrorMessage() {\n return errorMessage;\n }",
"public static String operationFailed() {\n return holder.format(\"operationFailed\");\n }",
"public String errorCode() {\n return this.errorCode;\n }",
"public java.lang.String getErrorMessage() {\r\n return errorMessage;\r\n }",
"public int getErrorNumber() {\n return errorNumber;\n }",
"public String getErrorMessage()\n {\n return errorMessage;\n }",
"public int getErrorType() {\r\n\t\treturn errorType;\r\n\t}",
"public String getError() {\r\n if (scriptError == null) return \"\";\r\n return scriptError;\r\n }",
"public java.lang.String getErrorInfo() {\n java.lang.Object ref = errorInfo_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n errorInfo_ = s;\n return s;\n }\n }",
"public java.lang.String getErrorInfo() {\n java.lang.Object ref = errorInfo_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n errorInfo_ = s;\n return s;\n }\n }",
"public java.lang.String getErrorInfo() {\n java.lang.Object ref = errorInfo_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n errorInfo_ = s;\n return s;\n }\n }",
"public java.lang.String getErrorInfo() {\n java.lang.Object ref = errorInfo_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n errorInfo_ = s;\n return s;\n }\n }",
"public java.lang.String getErrorInfo() {\n java.lang.Object ref = errorInfo_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n errorInfo_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getErrorInfo() {\n java.lang.Object ref = errorInfo_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n errorInfo_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }"
] | [
"0.80171067",
"0.8000718",
"0.7953742",
"0.7952213",
"0.7952213",
"0.7934604",
"0.7902942",
"0.7902942",
"0.7902942",
"0.7902942",
"0.7807725",
"0.7790863",
"0.7767812",
"0.7591985",
"0.7519408",
"0.74437606",
"0.7396811",
"0.7335738",
"0.7335738",
"0.7317862",
"0.73027104",
"0.7288869",
"0.725449",
"0.725449",
"0.725449",
"0.72338635",
"0.72226423",
"0.72198534",
"0.71561795",
"0.71560234",
"0.71434665",
"0.71400803",
"0.7136027",
"0.7129061",
"0.7129061",
"0.7116553",
"0.71130127",
"0.71035796",
"0.7075056",
"0.70560515",
"0.7016583",
"0.6999113",
"0.6993232",
"0.69744927",
"0.69606835",
"0.69606835",
"0.69606835",
"0.6960487",
"0.6879751",
"0.6872077",
"0.6863303",
"0.6851767",
"0.6849184",
"0.6831707",
"0.6824376",
"0.6824376",
"0.6812924",
"0.68081534",
"0.67978454",
"0.6783825",
"0.6780109",
"0.67679614",
"0.6753536",
"0.6743455",
"0.67366",
"0.6736417",
"0.672721",
"0.6723005",
"0.6704488",
"0.6675124",
"0.66663086",
"0.6658167",
"0.6658167",
"0.6654808",
"0.66527945",
"0.6651353",
"0.6617562",
"0.6617562",
"0.6617562",
"0.6602272",
"0.65955806",
"0.6592193",
"0.6561481",
"0.654975",
"0.6542532",
"0.65364707",
"0.652922",
"0.65274245",
"0.65165144",
"0.6514318",
"0.6514142",
"0.6510342",
"0.6503813",
"0.65008974",
"0.64929354",
"0.64929354",
"0.64929354",
"0.64929354",
"0.6486854",
"0.6486854"
] | 0.746809 | 15 |
Set the error property: If present, details of the operation error. | public OperationStatusResultInner withError(ManagementError error) {
this.error = error;
return this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void setError(@Nullable Exception error) {\n this.error = error;\n }",
"public void setError(ErrorResponse error)\n {\n data().put(_ERROR, error.data());\n }",
"public void setError(String error) {\n this.error = error;\n }",
"public void setError(String error) {\n this.error = error;\n }",
"public void setError(String error) {\n this.error = error;\n }",
"public void setError(String error) {\n\t\tthis.error = error;\n\t}",
"public void setError(@Nullable ExceptionBean error) {\n this.error = error;\n }",
"public void setError(final XyzError error) {\n this.error = error;\n }",
"public void setError(java.lang.String error) {\n this.error = error;\n }",
"public void setError(int value) {\n this.error = value;\n }",
"public void setError(double error) {\r\n this.error = error;\r\n }",
"void setError();",
"public void setError(Map error) {\n this.error = error;\n }",
"public void setError(File error) {\r\n this.error = error;\r\n incompatibleWithSpawn = true;\r\n }",
"public void setError() {\n _hasError = true;\n _highlight = HighlightMode.ERROR;\n _error = NodeError.ERROR;\n }",
"public void setErrorProperty(String errorProperty) {\r\n redirector.setErrorProperty(errorProperty);\r\n incompatibleWithSpawn = true;\r\n }",
"public void setError(final String pError) {\n\t\tthis.mError = pError;\n\t\ttry {\n\t\t\tthis.mErrorData = this.mError.getBytes(\"utf-8\");\n\t\t} catch (UnsupportedEncodingException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tthis.mErrorSize = this.mErrorData.length;\n\t}",
"public abstract void setError(String message);",
"public final void error(String error){\n lastKnownError = error;\n }",
"public Error getError() {\r\n\t\treturn error;\r\n\t}",
"public Object getError() {\n return error;\n }",
"public Object getError() {\n\t\treturn error;\n\t}",
"public String getError() {\n return error;\n }",
"public String getError() {\n return error;\n }",
"public String getError() {\n return error;\n }",
"public String getError() {\n return error;\n }",
"public String getError() {\r\n\t\treturn error;\r\n\t}",
"public String getError() {\n\t\treturn error;\n\t}",
"public String getError() {\n\t\treturn error;\n\t}",
"@Override\n @Nullable\n public Exception getError() {\n return error;\n }",
"public Builder setError(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000008;\n error_ = value;\n onChanged();\n return this;\n }",
"public ImageHelper setErrorResource(int errorResource) {\n this.errorResource = errorResource;\n\n return this;\n }",
"public ManagementError error() {\n return this.error;\n }",
"public void error(Throwable error) {\n\n }",
"public void error(Throwable error) {\n\n }",
"public int getError() {\n return error;\n }",
"@Override\n public void setError(@Nullable CharSequence error) {\n setErrorEnabled(error != null);\n super.setError(error);\n }",
"public void setErrorText(String errorText) {\n this.m_ErrorText = errorText;\n }",
"public void setErrorResponse(final ServiceResponse errorResponse) {\n this.errorResponse = errorResponse;\n }",
"public void Error(String error) throws RemoteException;",
"public Builder setError(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n\n error_ = value;\n onChanged();\n return this;\n }",
"public java.lang.String getError() {\n return error;\n }",
"public Map getError() {\n return this.error;\n }",
"public String getError() {\n return error != null ? error : \"An unknown error occurred.\";\n }",
"public void setErrorResponse(final ErrorResponse errorResponse) {\r\n this.errorResponse = errorResponse;\r\n }",
"public String getError() {\n return errMsg;\n }",
"public XyzError getError() {\n return this.error;\n }",
"public void putError(String message) {\n errorData.postValue(message);\n }",
"public OfError(@NotNull ErrorResult errorResult) {\n super(null);\n Intrinsics.checkNotNullParameter(errorResult, \"error\");\n this.error = errorResult;\n }",
"public void setErrorMode(int mode) {}",
"public CoreASMError getError() {\n\t\treturn error;\n\t}",
"public boolean getError() {\r\n \treturn error;\r\n }",
"public void setError() {\r\n this.textErrorIndex = textIndex;\r\n }",
"public String getError() {\r\n\t\tString error = _error;\r\n\t\t_error = null;\r\n\t\treturn error;\r\n\t}",
"public int error() {\n return this.error;\n }",
"@Override\n\tpublic void setWrongError() {\n\t\t\n\t}",
"@XmlElement\n @Nullable\n public ExceptionBean getError() {\n return error;\n }",
"public void error(String error)\n\t\t\t{\n\t\t\t\tsend(\"<error>\", false);\n\t\t\t\tsend(error, true);\n\t\t\t\tsend(\"</error>\", false);\n\t\t\t}",
"public Builder setError(protodef.b_error.info value) {\n if (errorBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n error_ = value;\n onChanged();\n } else {\n errorBuilder_.setMessage(value);\n }\n bitField0_ |= 0x00000001;\n return this;\n }",
"public Builder setError(protodef.b_error.info value) {\n if (errorBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n error_ = value;\n onChanged();\n } else {\n errorBuilder_.setMessage(value);\n }\n bitField0_ |= 0x00000001;\n return this;\n }",
"public String getError() {\n return writeResult.getError();\n }",
"public final String getError(){\n return lastKnownError;\n }",
"public String getErrorText() {\n\t\treturn errorText;\n\t}",
"public UnifiedFormat setUnifiedError(UnifiedErrorMessage error) {\n this.errors = error;\n return this;\n }",
"public void setErrorMsg(String errorMsg) {\n this.errorMsg = errorMsg;\n }",
"protected void setError(String message) {\n\t\tif (message == null)\n\t\t\tthrow new IllegalArgumentException(\"null error message\");\n\t\tif (hasError()) \n\t\t\tthrow new IllegalStateException(\"An error was already detected.\");\n\t\texpression = null;\n\t\terror = message;\n\t}",
"public protodef.b_error.info getError() {\n return error_ == null ? protodef.b_error.info.getDefaultInstance() : error_;\n }",
"public protodef.b_error.info getError() {\n return error_ == null ? protodef.b_error.info.getDefaultInstance() : error_;\n }",
"public void setErrorStatus(String errorStatus) {\r\n this.errorStatus = errorStatus;\r\n }",
"public PipelineJobError error() {\n return this.innerProperties() == null ? null : this.innerProperties().error();\n }",
"public String getErrorText() {\n return m_ErrorText;\n }",
"public void setErrors(int err) {\n errors = err;\n }",
"public String getErrorDescription() {\n return errorDescription;\n }",
"public void setError(RaftError error, String fmt, Object... args) {\n this.state = new State(error.getNumber(), String.format(String.valueOf(fmt), args));\n }",
"public void setErrorMsg(String errorMsg) {\r\n\t\tthis.errorMsg = errorMsg;\r\n\t}",
"public String getErrorStatus() {\r\n return errorStatus;\r\n }",
"@Nullable public Throwable error() {\n return err;\n }",
"public com.google.protobuf.ByteString\n getErrorBytes() {\n java.lang.Object ref = error_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b =\n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n error_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"void error() {\n status = ERROR;\n System.out.println(\"error\");\n stateChanged();\n }",
"public String getErrorMsg() {\r\n\t\treturn errorMsg;\r\n\t}",
"public boolean isError() { return error; }",
"public void setErrorMsg(String text) {\n this.errorMsg = text;\n }",
"public String getErrorMsg() {\n return errorMsg;\n }",
"public com.google.protobuf.ByteString\n getErrorBytes() {\n java.lang.Object ref = error_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b =\n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n error_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"protected abstract void setErrorCode();",
"@Override\n\t\t\t\t\t\t\tpublic void error(Exception e) {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}",
"public void error(Exception e);",
"@Override\n\tpublic void setFailedError() {\n\t\tnew Customdialog_Base(this, \"정보가 올바르지 않습니다.\").show();\n\t}",
"public java.lang.String getErrorId() {\n return errorId;\n }",
"public java.lang.String getErrorId() {\n return errorId;\n }",
"public int getErrorNumber() {\n return errorNumber;\n }",
"public com.google.protobuf.ByteString\n getErrorBytes() {\n java.lang.Object ref = error_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n error_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public VolleyError getError() {\n return error;\n }",
"public void setError(Long messageUid, String notificationLocalId, String errorMessage, String status);",
"@Override\n\tpublic String getErrorPath() {\n\t\treturn \"/error\";\n\t}",
"public protodef.b_error.info getError() {\n if (errorBuilder_ == null) {\n return error_ == null ? protodef.b_error.info.getDefaultInstance() : error_;\n } else {\n return errorBuilder_.getMessage();\n }\n }",
"public protodef.b_error.info getError() {\n if (errorBuilder_ == null) {\n return error_ == null ? protodef.b_error.info.getDefaultInstance() : error_;\n } else {\n return errorBuilder_.getMessage();\n }\n }",
"public void setErrorWriter(final Writer errorWriter) {\n this.octaveExec.setErrorWriter(errorWriter);\n }",
"public com.opentext.bn.converters.avro.entity.ContentErrorEvent.Builder setErrorId(java.lang.String value) {\n validate(fields()[3], value);\n this.errorId = value;\n fieldSetFlags()[3] = true;\n return this;\n }",
"java.lang.String getError();"
] | [
"0.7758217",
"0.7688369",
"0.7647546",
"0.7647546",
"0.7647546",
"0.7538357",
"0.7450524",
"0.73918",
"0.7304159",
"0.7297205",
"0.72559416",
"0.71679485",
"0.71511394",
"0.70067954",
"0.6955673",
"0.694517",
"0.6926122",
"0.6905466",
"0.6899331",
"0.68453354",
"0.6784534",
"0.67627925",
"0.67543447",
"0.67543447",
"0.67543447",
"0.67543447",
"0.67339957",
"0.67121756",
"0.67121756",
"0.6707026",
"0.6685173",
"0.6613428",
"0.66108483",
"0.6608887",
"0.6608887",
"0.6515736",
"0.6513603",
"0.6466528",
"0.64016986",
"0.6393813",
"0.63852555",
"0.6378447",
"0.6316176",
"0.6308908",
"0.6303749",
"0.6298077",
"0.62940496",
"0.6293308",
"0.62855655",
"0.6283433",
"0.62719244",
"0.6256738",
"0.6253896",
"0.6247314",
"0.6245466",
"0.62388617",
"0.6204711",
"0.6199711",
"0.6196148",
"0.6196148",
"0.61945415",
"0.6186484",
"0.6181968",
"0.61793154",
"0.6153599",
"0.6150683",
"0.61352766",
"0.61352766",
"0.61318046",
"0.61278033",
"0.6111458",
"0.6102244",
"0.60986316",
"0.60984796",
"0.60928977",
"0.60844004",
"0.6081597",
"0.6078731",
"0.6063126",
"0.6044557",
"0.60424453",
"0.6028906",
"0.6014938",
"0.60138613",
"0.6007627",
"0.6002493",
"0.59989166",
"0.59947354",
"0.599378",
"0.59923303",
"0.5981016",
"0.59802264",
"0.59689873",
"0.5947371",
"0.59382904",
"0.5926526",
"0.5926526",
"0.5920206",
"0.59148145",
"0.5912378"
] | 0.6087964 | 75 |
CSSE2002/7023 Pacman Arguments: [FILENAME] | public static void main(final String... args) {
Application.launch();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void main(String[] args) throws Exception {\n Scanner scan = new Scanner(new File(\"prob01.txt\"));\n String a = scan.nextLine();\n System.out.println(\"Greetings, O Honorable \" + a + \" the Magnificent! May I kiss your signet ring?\");\n }",
"public static void main(String argv[]) {\n if (argv.length == 0) {\n System.out.println(\"Usage : java AnalizadorLexicoPaginas [ --encoding <name> ] <inputfile(s)>\");\n }\n else {\n int firstFilePos = 0;\n String encodingName = \"UTF-8\";\n if (argv[0].equals(\"--encoding\")) {\n firstFilePos = 2;\n encodingName = argv[1];\n try {\n java.nio.charset.Charset.forName(encodingName); // Side-effect: is encodingName valid? \n } catch (Exception e) {\n System.out.println(\"Invalid encoding '\" + encodingName + \"'\");\n return;\n }\n }\n for (int i = firstFilePos; i < argv.length; i++) {\n AnalizadorLexicoPaginas scanner = null;\n try {\n java.io.FileInputStream stream = new java.io.FileInputStream(argv[i]);\n java.io.Reader reader = new java.io.InputStreamReader(stream, encodingName);\n scanner = new AnalizadorLexicoPaginas(reader);\n while ( !scanner.zzAtEOF ) scanner.debug_next_token();\n }\n catch (java.io.FileNotFoundException e) {\n System.out.println(\"File not found : \\\"\"+argv[i]+\"\\\"\");\n }\n catch (java.io.IOException e) {\n System.out.println(\"IO error scanning file \\\"\"+argv[i]+\"\\\"\");\n System.out.println(e);\n }\n catch (Exception e) {\n System.out.println(\"Unexpected exception:\");\n e.printStackTrace();\n }\n }\n }\n }",
"static public void main(String argv[]) {\n for (String s : argv) {\n if (s.equals(\"-a\")) {\n SHOW_TREE = true;\n }\n else if (s.equals(\"-s\")) {\n SHOW_SYM_TABLES = true;\n }\n else if (s.equals(\"-c\")) {\n GENERATE_CODE = true;\n }\n //Check if the string ends with '.cm'\n else if (s.length() > 3 && s.substring(s.length()-3).equals(\".cm\")) { \n // If it does, make that the input file\n INPUT_FILE = s;\n }\n }\n\n if (INPUT_FILE == null) {\n System.out.println(\"No input file provided or incorrect file extension (must be .cm). Exiting...\");\n System.exit(-1);\n }\n\n // Retrieve the actual file name from between the path and the extension\n // E.g. tests/sort.cm gives a result of 'sort'\n int nameStartIndex = INPUT_FILE.lastIndexOf('/');\n int nameEndIndex = INPUT_FILE.lastIndexOf('.');\n FILE_NAME = INPUT_FILE.substring(nameStartIndex + 1, nameEndIndex);\n \n /* Start the parser */\n try {\n // Save original stdout to switch back to it as needed\n PrintStream console = System.out;\n\n if (!SHOW_SYM_TABLES && !SHOW_TREE && !GENERATE_CODE) {\n System.out.println(\"Showing errors only.\");\n System.out.println(\"Use [-a] flag to print the abstract syntax tree\" + \"\\n\" \n + \"Use [-s] flag to print the symbol table\" + \"\\n\"\n + \"Use [-c] to generate assembly code (.tm)\"); \n } \n\n parser p = new parser(new Lexer(new FileReader(INPUT_FILE)));\n // implement \"-a\", \"-s\", \"-c\" options\n Absyn result = (Absyn)(p.parse().value); \n \n if (result != null) {\n \n // If the '-a' flag is set, print the abstract syntax tree to a .abs file\n if (SHOW_TREE) {\n System.out.println(\"Abstract syntax tree written to '\" + FILE_NAME + \".abs'\");\n\n //Redirect stdout\n File absFile = new File(FILE_NAME + \".abs\");\n FileOutputStream absFos = new FileOutputStream(absFile);\n PrintStream absPS = new PrintStream(absFos);\n System.setOut(absPS);\n\n // Print abstract syntax tree to FILE_NAME.abs in current directory\n ShowTreeVisitor visitor = new ShowTreeVisitor();\n result.accept(visitor, 0, false); \n\n //Reset stdout\n System.setOut(console);\n }\n if (SHOW_SYM_TABLES) {\n //Redirect stdout to a .sym file \n File symFile = new File(FILE_NAME + \".sym\");\n FileOutputStream symFos = new FileOutputStream(symFile);\n PrintStream symPS = new PrintStream(symFos);\n System.setOut(symPS);\n } \n else {\n //Toss stdout output into the void while doing semantic analysis\n System.setOut(new PrintStream(OutputStream.nullOutputStream()));\n } \n\n // Perform semantic analysis\n SemanticAnalyzer analyzerVisitor = new SemanticAnalyzer();\n result.accept(analyzerVisitor, 0, false);\n\n //Restore stdout\n System.setOut(console);\n\n if (SHOW_SYM_TABLES) {\n //Print after having reported any errors\n System.out.println(\"Symbol table written to '\" + FILE_NAME + \".sym'\");\n }\n\n //Only generate code if the flag is set\n if (GENERATE_CODE) {\n\n //First, confirm that there are no syntax or semantic errors\n //HAS_ERRORS is true if there are any syntax errors or semantic errors, and false if both are error free\n HAS_ERRORS = (p.errorFound || analyzerVisitor.errorFound);\n\n if (HAS_ERRORS) {\n System.out.println(\"Cannot generate code while there are errors. Exiting...\");\n }\n else {\n //No syntax or semantic errors, proceed with code generation\n System.out.println(\"Assembly code written to '\" + FILE_NAME + \".tm'\");\n\n //Redirect stdout to .tm file\n File tmFile = new File(FILE_NAME + \".tm\");\n FileOutputStream tmFos = new FileOutputStream(tmFile);\n PrintStream tmPS = new PrintStream(tmFos);\n System.setOut(tmPS);\n\n //Perform code generation\n CodeGenerator generatorVisitor = new CodeGenerator();\n //result.accept(generatorVisitor, 0, false);\n generatorVisitor.visit(result, FILE_NAME + \".tm\");\n \n } \n }\n }\n\n } catch (FileNotFoundException e) {\n System.out.println(\"Could not find file '\" + INPUT_FILE + \"'. Check your spelling, and ensure it exists. Exiting...\");\n System.exit(-1); \n } catch (Exception e) {\n /* do cleanup here -- possibly rethrow e */\n e.printStackTrace();\n }\n }",
"public Decoder(String filename) throws FileNotFoundException { \n this.i = 0;\n this.position = 0;\n this.px = 0;\n this.py = 0;\n this.alkuposition = 0;\n this.j = 0;\n this.filename = filename;\n }",
"public static void main(String[] args) {\n\t\tConcordance c = new Concordance(\"shakespear.txt\");\n\t\tc.printToDestination(\"destination.txt\");\n\t}",
"public static void main(String[] args)\n\t{\n\t\tif(args.length < 2)\n\t\t{\n\t\t\tSystem.err.println(\"USAGE: java ConvertPRG <infile> <outfile>\");\n\t\t\tSystem.exit(1);\n\t\t}\n\t\t\n\t\t// Use these to be sure it's okay to overwrite\n\t\t// an existing file.\n\t\tScanner userIn = new Scanner(System.in);\n\t\tchar overwriteChar = 'n';\n\n\t\t// Use these to see whether the files exist\n\t\tFile inFile;\n\t\tFile outFile;\n\n\t\t// Use these to read and write the files\n\t\tDataInputStream in;\n\t\tDataOutputStream out;\n\n\t\t// Store the ROM data in here, minus INES header\n\t\tbyte[] rom = new byte[0x4000];\n\t\t\n\t\ttry\n\t\t{\n\t\t\tinFile = new File(args[0]);\n\t\t\toutFile = new File(args[1]);\n\t\t\t\n\t\t\t// Make sure the input file exists. Chastise foolish user if it doesn't.\n\t\t\tif(!inFile.isFile())\n\t\t\t{\n\t\t\t\tSystem.err.println(\"File \" + inFile.getName() + \" not found.\");\n\t\t\t\tSystem.exit(1);\n\t\t\t}\n\t\t\t\n\t\t\t// It's okay if the output file already exists, but make sure\n\t\t\t// we really want to overwrite it if it does.\n\t\t\tif(outFile.isFile())\n\t\t\t{\n\t\t\t\t// If this loop repeats, the user input gibberish.\n\t\t\t\twhile(overwriteChar != 'y')\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"Really overwrite \" + outFile.getName() + \"? (y/n)\");\n\t\t\t\t\toverwriteChar = Character.toLowerCase(userIn.next().charAt(0));\n\t\t\t\t\t\n\t\t\t\t\tif(overwriteChar == 'n')\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.exit(1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tin = new DataInputStream(new FileInputStream(inFile));\n\t\t\tout = new DataOutputStream(new FileOutputStream(outFile));\n\t\t\t\n\t\t\tin.skipBytes(16); // skip the INES header\n\t\t\tin.read(rom); // read in the prg rom data\n\n\t\t\tout.write(rom, 0, rom.length); // write the rom without INES header\n\t\t\tout.write(rom, 0, rom.length); // write the same data to bank 2\n\t\t\t\n\t\t\t// Let's just be sure the sizes are correct.\n\t\t\tSystem.out.println(\"Size of input file: 0x\" + Long.toHexString(inFile.length()));\n\t\t\tSystem.out.println(\"(Expected: 0x4010)\");\n\t\t\tSystem.out.println(\"Size of output file: 0x\" + Long.toHexString(outFile.length()));\n\t\t\tSystem.out.println(\"(Expected: 0x8000)\");\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(1);\n\t\t}\n\t}",
"public static void main(String[] args) throws IOException {\n\t\t\n\t\tString folder = \"/Users/haopeng/Dropbox/research/2nd/Usecase/Yanlei/\";\n\t\tString fileName = \"P0_2324.txt\";\n\t\t\n\t\tFileReader reader = new FileReader(folder + fileName, 20000000);\n\t\treader.parseFile();\n\t\t\n\t\t//reader.printValues(reader.getServerName(), \"ServerName\");\n\t\t//reader.printValues(reader.getCommand(), \"Command\");\n\t\t//reader.printValues(reader.getTimestamp(), \"Timestamp\"); \n\t\t//reader.printValues(reader.getPath(), \"Path\");\n\t\treader.printValues(reader.getMethod(), \"Method\");\n\t}",
"public static void main(String[] args) {\n if (args.length != 1) {\n System.out.println(\"Proper usage is 'java Program02 [file].txt'\");\n return;\n }\n // initialize\n new Program02(args[0]);\n }",
"public static void main(String argv[]) {\n if (argv.length == 0) {\n System.out.println(\"Usage : java AnalizadorLexico2 [ --encoding <name> ] <inputfile(s)>\");\n }\n else {\n int firstFilePos = 0;\n String encodingName = \"UTF-8\";\n if (argv[0].equals(\"--encoding\")) {\n firstFilePos = 2;\n encodingName = argv[1];\n try {\n java.nio.charset.Charset.forName(encodingName); // Side-effect: is encodingName valid? \n } catch (Exception e) {\n System.out.println(\"Invalid encoding '\" + encodingName + \"'\");\n return;\n }\n }\n for (int i = firstFilePos; i < argv.length; i++) {\n AnalizadorLexico2 scanner = null;\n try {\n java.io.FileInputStream stream = new java.io.FileInputStream(argv[i]);\n java.io.Reader reader = new java.io.InputStreamReader(stream, encodingName);\n scanner = new AnalizadorLexico2(reader);\n while ( !scanner.zzAtEOF ) scanner.debug_next_token();\n }\n catch (java.io.FileNotFoundException e) {\n System.out.println(\"File not found : \\\"\"+argv[i]+\"\\\"\");\n }\n catch (java.io.IOException e) {\n System.out.println(\"IO error scanning file \\\"\"+argv[i]+\"\\\"\");\n System.out.println(e);\n }\n catch (Exception e) {\n System.out.println(\"Unexpected exception:\");\n e.printStackTrace();\n }\n }\n }\n }",
"public static void main(String[] args) throws FileNotFoundException {\n Scanner scanner = new Scanner(new FileInputStream(\"/Users/guoziren/IdeaProjects/剑指offer for Java/src/main/java/com/ustc/leetcode/algorithmidea/dynamicprogramming/input.txt\"));\n }",
"public static void main(String[] args) {\r\n\r\n\t\tif (args.length == 0) {\r\n\t\t\tlog.error(\"Specification and assembly filenames not given.\");\r\n\t\t\tSystem.exit(1);\r\n\t\t}\r\n\r\n\t\telse if (args.length == 1) {\r\n\t\t\tlog.error(\"Assembly file not given.\");\r\n\t\t\tlog.error(\"Specification file: \" + args[0]);\r\n\t\t\tSystem.exit(1);\r\n\t\t}\r\n\r\n\t\telse if (args.length > 2) {\r\n\t\t\tlog.error(\"Too many arguments provided.\");\r\n\t\t\tSystem.exit(1);\r\n\t\t}\r\n\r\n\t\tif (!args[0].endsWith(\".yaml\") || !args[1].endsWith(\".asm\")) {\r\n\t\t\tlog.error(\"Input is limited to two files.\");\r\n\t\t\tSystem.exit(1);\r\n\t\t}\r\n\r\n\t\ttry {\r\n\t\t\tvar file = new FileParser(args[0], args[1]);\r\n\t\t\tvar data = file.getData();\r\n\t\t\tvar asm = new Assembler(data);\r\n\r\n\t\t\tAssembler.writeLinesToFile(\"object_code.txt\", asm.getObjectCode());\r\n\t\t} catch (FileParserException e) {\r\n\t\t\tAssembler.writeLinesToFile(\"object_code.txt\", Lists.newArrayList(e.getMessage()));\r\n\t\t\tAssembler.writeLinesToFile(\"spec_error_report.txt\", e.getErrorReport());\r\n\t\t\tSystem.exit(1);\r\n\t\t} catch (AssemblerException | IOException e) {\r\n\t\t\tSystem.exit(1);\r\n\t\t}\r\n\t}",
"public void mo210a(File file) {\n }",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tSystem.out.println(\"Enter file name\");\n\t\tString file = sc.nextLine();\n\t\tfileRead(file);\n\t\tSystem.out.println(\"Enter required number of clusters\");\n\t\treqNoOfClusters =Integer.parseInt(sc.nextLine());\n\t\tmakeInitialDistanceMatrix();\n\t\twhile(totalCluster != reqNoOfClusters) {\n\t\t\tmergeNext();\n\t\t}\n\t\tprintClusters();\n\t\tdouble jac = getJaccard();\n\t\tSystem.out.println(\"Jaccard coefficient = \"+jac);\n//\t\tdouble rand = getRand();\n//\t\tSystem.out.println(\"rand = \"+rand);\n\t}",
"public static void main(String[] args) throws FileNotFoundException {\n\t\tListaNombre nombres = new ListaNombre();\n//\t\tnombres.add(new Nombre(\"guido\"));\n//\t\tnombres.add(new Nombre(\"guido\"));\n//\t\tnombres.add(new Nombre(\"guido\"));\n//\t\tnombres.add(new Nombre(\"juan\"));\n//\t\tnombres.add(new Nombre(\"juan\"));\n//\t\tnombres.add(new Nombre(\"daria\"));\n//\t\tnombres.add(new Nombre(\"daria\"));\n//\t\tnombres.add(new Nombre(\"pedro\"));\n//\t\tnombres.add(new Nombre(\"pedro\"));\n//\t\tnombres.add(new Nombre(\"pedro\"));\n//\t\tnombres.setCantRepetidos(3);\n//\t\tfor (Nombre nom : nombres.getNombres()) {\n//\t\t\tSystem.out.println(nom.getNombre() + \" \" + nom.getCant());\n//\t\t}\n\t\tnombres = ( Archivo.leer(\"C:\\\\Users\\\\guido\\\\eclipse-workspace\\\\DescubriendoNombresRepetidos\\\\premioA.in\"));\n\t\tArchivo.escribir(\"C:\\\\Users\\\\guido\\\\eclipse-workspace\\\\DescubriendoNombresRepetidos\\\\salida.out\",nombres);\n\t}",
"public static void main(String argv[]) {\n if (argv.length == 0) {\n System.out.println(\"Usage : java AnalizadorLexicoArchivo [ --encoding <name> ] <inputfile(s)>\");\n }\n else {\n int firstFilePos = 0;\n String encodingName = \"UTF-8\";\n if (argv[0].equals(\"--encoding\")) {\n firstFilePos = 2;\n encodingName = argv[1];\n try {\n java.nio.charset.Charset.forName(encodingName); // Side-effect: is encodingName valid? \n } catch (Exception e) {\n System.out.println(\"Invalid encoding '\" + encodingName + \"'\");\n return;\n }\n }\n for (int i = firstFilePos; i < argv.length; i++) {\n AnalizadorLexicoArchivo scanner = null;\n try {\n java.io.FileInputStream stream = new java.io.FileInputStream(argv[i]);\n java.io.Reader reader = new java.io.InputStreamReader(stream, encodingName);\n scanner = new AnalizadorLexicoArchivo(reader);\n while ( !scanner.zzAtEOF ) scanner.debug_next_token();\n }\n catch (java.io.FileNotFoundException e) {\n System.out.println(\"File not found : \\\"\"+argv[i]+\"\\\"\");\n }\n catch (java.io.IOException e) {\n System.out.println(\"IO error scanning file \\\"\"+argv[i]+\"\\\"\");\n System.out.println(e);\n }\n catch (Exception e) {\n System.out.println(\"Unexpected exception:\");\n e.printStackTrace();\n }\n }\n }\n }",
"public static void main(String[] args) {\n\t\tfileName = args[0];\n\t\t//set up file name for the data:\n\t\ttry {\n\t\t\treader = new Scanner(new File(args[1]));\n\t\t\t\n\t\t\t//create a new program, then parse, print, and execute:\n\t\t\tProgram p = new Program();\n\t\t\tp.parse();\n\t\t\tp.print();\n\t\t\tSystem.out.println(\"---PROGRAM OUTPUT---\");\n\t\t\tp.execute();\n\t\t\t\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.out.println(\"ERROR reading data file \" + args[1]);\n\t\t\te.printStackTrace();\n\t\t} finally{\n\t\t\treader.close();\n\t\t}\n\t}",
"public static void main(String[] args) throws FileNotFoundException, IOException {\n\t\t// TODO Auto-generated method stub\n\t\tif (args.length != 2) {\n\t\t\tSystem.out.println(\"Usage: java PE1910_SplitFiles souceFile numberOfPieces\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t\t// Get number of pieces\n\t\tint numberOfPiecesArg = Integer.parseInt(args[1]);\n\n\t\t// Get Source file and create input stream for it\n\t\tBufferedInputStream inputArg = new BufferedInputStream(new FileInputStream(\n\t\t\t\tnew File(\"C:/Java/examples/\" + args[0])));\n\n\t\t// Get fileName and extension of the source file\n\t\tFile sourceFileArg = new File(\"C:/Java/examples/\" + args[0]);\n\t\tString fileNameArg = sourceFileArg.getName().substring(0, sourceFileArg.getName().length() - 4);\n\n\t\t// Get fileSize and size of the split file\n\t\tlong fileSizeArg = inputArg.available();\n\t\tint partArg = (int)\n\t\t\t\tMath.ceil(1.0 * fileSizeArg / numberOfPiecesArg);\n\t\tSystem.out.println(partArg);\n\t\t// Copy the content of the sourceFile into split files\n\t\tfor (int i = 0; i < numberOfPiecesArg; i++) {\n\t\t\tBufferedOutputStream outputArg = new BufferedOutputStream(\n\t\t\t\t\tnew FileOutputStream(new File(\"C:/Java/examples/\" + fileNameArg + \".part\" + i)));\n\t\t\tint value;\n\t\t\tint numberOfBytesArg = 0;\n\t\t\twhile (numberOfBytesArg++ < partArg && (value = inputArg.read()) != -1) {\n\t\t\t\toutputArg.write(value);\n\t\t\t}\n\t\t\toutputArg.close();\n\t\t}\n\t\t\n\t\tinputArg.close();\n\t\tSystem.out.println(\"[\" + sourceFileArg.length() + \"]\");\n\n\t}",
"public static void main(String[] args) {\n String file = args[0];\n int mod = Integer.parseInt(args[1]);\n Medians md = new Medians(file);\n System.out.println(md.mediansMod(mod));\n }",
"public static void main(String[] args) throws FileNotFoundException {\n\t\t\t\n\t\tScanner scan = new Scanner(new File(\"input.txt\"));\n\t\t\n\t\tParser parse;\n\t\tCode code = new Code();\n\t\tSymbolTable st = new SymbolTable();\n\t\t\n\t\twhile(scan.hasNextLine()) {\n\t\t\tString inCode = scan.nextLine();\t\n\t\t\tparse = new Parser(inCode);\n\t\t}\n\t\t\n\t}",
"public static void main(String[] args) {\n if (args.length != 1) {\n System.out.println(\"Usage: java pktanalyzer datafile.\\nPlease use correctly.\");\n System.exit(0);\n }\n String fileName = args[0];\n\n try (InputStream inputStream = new FileInputStream(fileName)) {\n byte[] fullPacket = new byte[(int) new File(fileName).length()];\n inputStream.read(fullPacket);\n unwrapEthernet(fullPacket);\n } catch (Exception e) {\n System.out.println(e);\n }\n }",
"public static void main(String[] args) {\n\t\tString CorpusFilePath = \"C:\\\\Users\\\\singh\\\\Desktop\\\\mallet-2.0.8\\\\palm\\\\palm.txt\";\n\t\tString CorpusDirPath = \"C:\\\\Users\\\\singh\\\\Desktop\\\\mallet-2.0.8\\\\palm\\\\output\";\n\n\t\tBufferedWriter out = null;\n\t\tBufferedReader br = null;\n\t\ttry {\n\t\t\tSystem.out.print(\"START\");\n\t\t\tFileInputStream fis = new FileInputStream(new File(CorpusFilePath));\n\t\t\tString CorpusContent = IOUtils.toString(fis);\n\t\t\tString[] tokens = CorpusContent.split(\"ravikrsingh20\");\n\t\t\tfor (int i = 0; i < tokens.length; i++) {\n\t\t\t\ttry {\n\t\t\t\t\tFile file = new File(CorpusDirPath + File.separator + i + \".txt\");\n\t\t\t\t\tfile.createNewFile();\n\t\t\t\t\tFileWriter fstream = new FileWriter(file);\n\t\t\t\t\tout = new BufferedWriter(fstream);\n\t\t\t\t\tout.write(tokens[i]);\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} finally {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tout.flush();\n\t\t\t\t\t\tout.close();\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t\tSystem.out.print(\"DONE\");\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}",
"private static void parseArguments(String[] args, MiParaPipeLine p) throws IOException{\n options.addOption(\"i\", \"input-file\", true, \"FASTA input file for query sequences\");\n options.addOption(\"o\", \"output-folder\", true, \"output folder for prediction results\");\n options.addOption(\"t\", \"test\", true, \"run test example \");\n options.addOption(\"c\", \"config\", true, \"configuration file for miRPara\");\n options.addOption(\"a\", \"action\", true, \"action to perform\");\n options.addOption(\"h\", \"help \", false, \"print help\");\n\n logger.trace(\"parsing args\");\n CommandLineParser parser = new BasicParser();\n CommandLine cmd = null;\n\n \n try {\n cmd = parser.parse(options, args);\n if (cmd.hasOption(\"h\")){\n print_help();\n System.out.print(p.reportAvailableActions());\n }\n\n if (cmd.hasOption(\"t\")){ \n logger.info(\"test set to \" + cmd.getOptionValue(\"l\"));\n test = cmd.getOptionValue(\"t\").toLowerCase();\n }\n \n if (cmd.hasOption(\"i\")) {\n logger.info(\"input file set to \" + cmd.getOptionValue(\"i\"));\n p.setInputFilename(cmd.getOptionValue(\"i\"));\t\n } \n\n if (cmd.hasOption(\"o\")){\n logger.info(\"output folder is\" + cmd.getOptionValue(\"o\"));\n p.setOutputFolder(cmd.getOptionValue(\"o\"));\n }\n \n if (cmd.hasOption(\"a\")){\n logger.info(\"requested action is \" + cmd.getOptionValue(\"a\"));\n p.setAction(cmd.getOptionValue(\"a\"));\n }\n \n if (cmd.hasOption(\"c\")){\n configFile = cmd.getOptionValue(\"c\");\n logger.info(\"Configuration file is \" + configFile);\n p.setConfigFilename(configFile);\n }\n\n\n \n if(p.getConfigFilename()==null){\n throw new ParseException(\"no configuration file was specified\") ; \n }\n \n if(new File(p.getConfigFilename()).exists() == false){\n throw new IOException(\"configuration file <\" + p.getConfigFilename() + \"> does not exist\");\n } \n \n if(new File(p.getInputFilename()).exists()== false)\n {\n throw new IOException(\"input file <\" + p.getInputFilename() + \"> does not exist\");\n }\n \n if(new File(p.getOutputFolder()).exists() == false)\n {\n if (new File(p.getOutputFolder()).getParentFile().exists() == false)\n throw new IOException(\"parent file <\" + new File(p.getOutputFolder()).getParentFile() + \"> does not exist\");\n \n new File(p.getOutputFolder()).mkdir();\n logger.info(\"create results folder <\" + p.getOutputFolder() + \">\");\n }\n\n } catch (ParseException e) {\n\n logger.fatal(\"Failed to parse command line properties\", e);\n print_help();\n\n }\n\n \n }",
"public static void main(String[] args) throws FileNotFoundException {\n\t\tString newline = System.lineSeparator();\n\t\tFileReader fr = new FileReader(\"dictonary_english_special.txt\");\n\t\tBufferedReader br = new BufferedReader(fr);\n\t\tString holder = \"\";\n\t\tString temp;\n\t\twhile(true){\n\t\t\ttry {\n\t\t\t\ttemp = br.readLine();\n\t\t\t\tif(temp == null)\n\t\t\t\t\tbreak;\n\t\t\t\tif(temp.length() < 4)\n\t\t\t\t\tcontinue;\n\t\t\t\t//System.out.println(temp);\n\t\t\t\tholder += temp + newline;\n\t\t\t} catch (IOException e) {break;}\n\t\t}\n\t\t\tFileWriter fw;\n\t\t\ttry {\n\t\t\t\tfw = new FileWriter(\"dictonary_english_hangman.txt\");\n\t\t\t\tBufferedWriter bw = new BufferedWriter(fw);\n\t\t\t\tbw.write(holder);\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(\"Done!\");\n\t}",
"PlagiarismAlgos(String[] parsefile1, String[] parsefile2){\n this.parsefile1=parsefile1;\n this.parsefile2=parsefile2;\n }",
"public static void main(String args[]) throws IOException {\n Scanner sc= new Scanner(System.in);\r\n String s= sc.next();\r\n char ch= s.charAt(0);\r\n switch (ch)\r\n {\r\n case 'P':\r\n case 'p': \r\n System.out.println(\"PrepBytes\");\r\n break;\r\n case 'Z':\r\n case 'z':\r\n System.out.println(\"Zenith\");\r\n break;\r\n case 'E':\r\n case 'e':\r\n System.out.println(\"Expert Coder\");\r\n break;\r\n case 'D':\r\n case 'd':\r\n System.out.println(\"Data Structure\");\r\n break;\r\n }\r\n }",
"public static void main(String[] args) throws FileNotFoundException {\n File f = new File(\"dict2.txt\");\n Scanner readFile = new Scanner(f);\n ArrayList<String> dictionary = new ArrayList<String>();\n \n while (readFile.hasNext()) {\n dictionary.add(readFile.next());\n }\n \n HangmanLogic logic = new HangmanLogic(dictionary);\n HangmanUserInterface game = new HangmanUserInterface(logic);\n game.start();\n }",
"public static void main(String[] args) {\n\t\tPeptide peptide = new Peptide(\"P41220\", \"MQSAMFLAVQHDCRPMDKSAGSGHKSEEKREKMKRTLLKDWKTRLSYFLQNSSTPGKPKTGKKSKQQAFIKPSPEEAQLWSEAFDELLASKYGLAAFRAFLKSEFCEENIEFWLACEDFKKTKSPQKLSSKARKIYTDFIEKEAPKEINIDFQTKTLIAQNIQEATSGCFTTAQKRVYSLMENNSYPRFLESEFYQDLCKKPQITTEPHAT\");\n\t\tpeptide.addPositive(106 - 1, 'C');\n\t\tpeptide.addPositive(116 - 1, 'C');\t\t\n\t\tpeptide.addPositive(199 - 1, 'C');\n\t\tpeptide.generateNegativePositions('C');\n\t\tSystem.out.println(peptide.generateSites(20, 20));\n\t}",
"public static void main(String[] args) {\n String dictionaryPath = \"/Users/johtani/tmp/dictionary/unidic-mecab-2.1.2_src\";\n // UniDic 2.3.0\n //String dictionaryPath = \"/Users/johtani/tmp/dictionary/unidic-cwj-2.3.0\";\n CsvParserSettings settings = new CsvParserSettings();\n CsvFormat format = new CsvFormat();\n format.setComment('\\0');\n settings.setFormat(format);\n CsvParser parser = new CsvParser(settings);\n\n try (DirectoryStream<Path> ds = Files.newDirectoryStream(Paths.get(dictionaryPath), \"*.csv\")){\n for (Path file : ds) {\n checkFile(parser, file);\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n System.out.println(\"Finished!\");\n }",
"public static void main(String[] args) throws IOException {\n\t\t\r\n\t\tLeerPersona.descubrirNombresRepetidos(\"400milNombres.in\");\r\n\t}",
"public static void main(String[] args) throws IOException {\r\n ObjectInputStream in = null; // reads in the compressed file\r\n FileWriter out = null; // writes out the decompressed file\r\n\r\n // Check for the file names on the command line.\r\n if (args.length != 2) {\r\n System.out.println(\"Usage: java Puff <in fname> <out fname>\");\r\n System.exit(1);\r\n }\r\n\r\n // Open the input file.\r\n try {\r\n in = new ObjectInputStream(new FileInputStream(args[0]));\r\n } catch (FileNotFoundException e) {\r\n System.out.println(\"Can't open file \" + args[0]);\r\n System.exit(1);\r\n }\r\n\r\n // Open the output file.\r\n try {\r\n out = new FileWriter(args[1]);\r\n } catch (FileNotFoundException e) {\r\n System.out.println(\"Can't open file \" + args[1]);\r\n System.exit(1);\r\n }\r\n \r\n Puff pf = new Puff();\r\n pf.getFrequencies(in);\r\n // Create a BitReader that is able to read the compressed file.\r\n BitReader reader = new BitReader(in);\r\n\r\n\r\n /****** Add your code here. ******/\r\n pf.createTree();\r\n pf.unCompress(reader,out);\r\n \r\n /* Leave these lines at the end of the method. */\r\n in.close();\r\n out.close();\r\n }",
"public static void main (String[] args) throws FileNotFoundException\n {\n System.out.println (\"So, you have an idea for a project.\");\n\n DecisionTree expert = new DecisionTree(\"projectplan-input.txt\");\n expert.evaluate();\n }",
"private mkcpbat(String[] args)\n\t{\n\t\t// add the resources\n\t\tStrings.addResources(this, \"mkcpbat\");\n\t\t_parser = new CommandParser(\"mkcpbat\",\n\t\t\t\tStrings.get(\"sFileArgs\"));\n\t\t_parser.setExitOnMissingArg(true, -1);\n\t\t_parser.addCommandListener(new OptionHandler());\n\t\t_parser.setExtraHelpText(\n\t\t\tStrings.get(\"smkcpbatExtraHelpTextPreamble\"),\n\t\t\tStrings.get(\"smkcpbatExtraHelpTextPostamble\"));\n\n\t\t_parser.parse(args);\n\n\t\tif(_ofname.getMatched())\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tFile ofname = new File(_ofname.getArg());\n\t\t\t\tif(ofname.exists() && _overwrite.getMatched())\n\t\t\t\t{\n\t\t\t\t\tif(_verbose.getMatched())\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.err.println(Strings.format(\"fDeleteExistingFile\", new Object[] { ofname.getName() }));\n\t\t\t\t\t}\n\n\t\t\t\t\tofname.delete();\n\t\t\t\t}\n\n\t\t\t\t_writer = new PrintStream(new FileOutputStream(_ofname.getArg()));\n\t\t\t}\n\t\t\tcatch(IOException e)\n\t\t\t{\n\t\t\t\tSystem.err.println(Strings.format(\"fGeneralError\", new Object[] { e.getMessage() }));\n\n\t\t\t\tif(_verbose.getMatched())\n\t\t\t\t{\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\tSystem.exit(-1);\n\t\t\t}\n\t\t}\n\n\t\tString[] largs = _parser.getUnhandledArguments();\n\t\tif(largs.length == 0)\n\t\t{\n\t\t\tSystem.err.println(Strings.get(\"sErrorNoArgsExit\"));\n\t\t\t_parser.usage();\n\t\t\tSystem.exit(-1);\n\t\t}\n\n\t\tprocessArgs(largs);\n\t}",
"public static void main(String[] args) throws IOException {\n\t\t\r\n\t\t\r\n\t\tString dir = \"C:\\\\Eclipse\\\\OxygenWorkspace\\\\DigestedProteinDB\\\\misc\\\\sample_data\";\r\n\t\t//dir = \"F:\\\\Downloads\\\\uniprot\\\\uniprot_sprot.dat_delta-db1_100000\";\r\n\t\treadPeptideRow1(dir, 600.1f, 600.3f);\r\n\t\t\r\n\r\n\t}",
"static public void main(String[] args) throws IOException{\n\t\tString sample = \"h19x24\";\n\t\tString parentFolder = \"/media/kyowon/Data1/Dropbox/fCLIP/new24/\";\t\t\n\t\tString bedFileName = \"/media/kyowon/Data1/fCLIP/samples/sample3/bed/\" + sample + \".sorted.bed\";\n\t\tString dbFasta = \"/media/kyowon/Data1/RPF_Project/genomes/hg19.fa\";\n\t\tString parameterFileName = \"/media/kyowon/Data1/fCLIP/samples/sample3/bed/\" + sample + \".sorted.param\";\n\t\t\n\t\tString trainOutFileName = parentFolder + sample + \".train.csv\";\n\t\tString arffTrainOutFileName = parentFolder + sample + \".train.arff\";\n\t\t\n\t\tString cisOutFileName = parentFolder + sample + \".csv\";\n\t\tString transOutFileNameM = parentFolder + sample + \".pair.M.csv\";\n\t\tString transOutFileNameU = parentFolder + sample + \".pair.U.csv\";\n\t\tString transControlOutFileNameM = parentFolder + sample + \".pair.M.AntiSense.csv\";\n\t\tString transControlOutFileNameU = parentFolder + sample + \".pair.U.AntiSense.csv\";\n\t\tString rmskBed = \"/media/kyowon/Data1/fCLIP/Data/cat.rmsk.bed\";\n\t\tString siControlBed = \"/media/kyowon/Data1/fCLIP/RNAseq/siControl_R1_Aligned_Sorted.bed\";\n\t\tString siKDDroshaBed = \"/media/kyowon/Data1/fCLIP/RNAseq/siDrosha_R1_Aligned_Sorted.bed\";\n\t\tString siKDDicerBed = \"/media/kyowon/Data1/fCLIP/RNAseq/siDicer_R1_Aligned_Sorted.bed\";\n\t\t\n\t\tString cisBed5pFileName = cisOutFileName + \".5p.bed\";\n\t\tString cisBed3pFileName = cisOutFileName + \".3p.bed\";\n\t\t\n\t\tdouble unpairedScoreThreshold = 0.25; \n\t\tdouble pairedScoreThreshold = unpairedScoreThreshold/5;\n\t//\tdouble motifScoreThreshold = 0.15;\n\t\t\n\t\tint num3pPaired = 10;\n\t\tint num5pPaired = 20;\n\t\t\n\t\tString filteredTransOutFileName = transOutFileNameM + \".filtered.csv\";\n\t\t\n\t\tint blatHitThreshold = 100000000;\n\t\tint transPairSeqLength = FCLIP_Scorer.getFlankingNTNumber() *2 + 80;\n\t\t\n\t\tZeroBasedFastaParser fastaParser = new ZeroBasedFastaParser(dbFasta);\n\t\tMirGff3FileParser mirParser = new MirGff3FileParser(\"/media/kyowon/Data1/fCLIP/genomes/hsa_hg19.gff3\");\n\t\tAnnotationFileParser annotationParser = new AnnotationFileParser(\"/media/kyowon/Data1/fCLIP/genomes/hg19.refFlat.txt\");\n\t\tFCLIP_ScorerTrainer.train(parameterFileName, bedFileName, mirParser, annotationParser);\n\t\t\n\t\ttrain(trainOutFileName, arffTrainOutFileName, bedFileName, fastaParser, annotationParser, mirParser, parameterFileName, unpairedScoreThreshold, pairedScoreThreshold);\n\t\trunCis(cisOutFileName, arffTrainOutFileName, bedFileName, fastaParser, annotationParser, mirParser, parameterFileName, unpairedScoreThreshold, pairedScoreThreshold);\n\n\t\tScoredPositionOutputParser.generateBedFromCsv(cisOutFileName, cisBed5pFileName, cisBed3pFileName, false); // for fold change..\n\t//\tScoredPositionOutputParser.generateFastaForMotif(cisOutFileName, cisOutFileName + \".5p.motif.fa\", cisOutFileName + \".3p.motif.fa\",cisOutFileName + \".motif.m\", \"M\");\n\t\t\n\t\trunTrans(transOutFileNameM, transOutFileNameU, cisOutFileName, arffTrainOutFileName, blatHitThreshold, transPairSeqLength, false);\n\t\tCheckRepeat.generate(cisOutFileName, transOutFileNameM, cisBed5pFileName, cisBed3pFileName, rmskBed);\n\t\tCheckRepeat.generate(cisOutFileName, transOutFileNameU, cisBed5pFileName, cisBed3pFileName, rmskBed);\n\t\tScoredPairOutputParser.generateFastaForMotif(transOutFileNameM, transOutFileNameM + \".5p.motif.fa\", transOutFileNameM + \".3p.motif.fa\");\n\t\t//GenerateCircosLinkFiles.run(transOutFileNameM + \".rmsk.csv\", transOutFileNameM + \".link.txt\");\n\t//\tCheckCoverage.generate(cisOutFileName, transOutFileNameM, cisBed5pFileName, cisBed3pFileName, siKDDroshaBed, siControlBed);\n\t///\tCheckCoverage.generate(cisOutFileName, transOutFileNameM, cisBed5pFileName, cisBed3pFileName, siKDDicerBed, siControlBed);\n\t\t\n\t\trunTrans(transControlOutFileNameM, transControlOutFileNameU, cisOutFileName, arffTrainOutFileName, blatHitThreshold, transPairSeqLength, true);\t\t\n\t\tCheckRepeat.generate(cisOutFileName, transControlOutFileNameM, cisBed5pFileName, cisBed3pFileName, rmskBed);\n\t\tCheckRepeat.generate(cisOutFileName, transControlOutFileNameU, cisBed5pFileName, cisBed3pFileName, rmskBed);\n\t\tScoredPairOutputParser.generateFastaForMotif(transControlOutFileNameM, transControlOutFileNameM + \".5p.motif.fa\", transControlOutFileNameM + \".3p.motif.fa\");\n\t//\tGenerateCircosLinkFiles.run(transControlOutFileNameM + \".rmsk.csv\", transControlOutFileNameM + \".link.txt\");\n\t\t//CheckCoverage.generate(cisOutFileName, transControlOutFileNameM, cisBed5pFileName, cisBed3pFileName, siKDDroshaBed, siControlBed);\n\t//\tCheckCoverage.generate(cisOutFileName, transControlOutFileNameM, cisBed5pFileName, cisBed3pFileName, siKDDicerBed, siControlBed);\n\t\t\n\t\tfilterTransPairs(transOutFileNameM, filteredTransOutFileName, num3pPaired, num5pPaired);\n\t\tCheckRepeat.generate(cisOutFileName, filteredTransOutFileName, cisBed5pFileName, cisBed3pFileName, rmskBed);\n\t\tScoredPairOutputParser.generateFastaForMotif(filteredTransOutFileName, filteredTransOutFileName + \".5p.motif.fa\", filteredTransOutFileName + \".3p.motif.fa\");\n\t\t//GenerateCircosLinkFiles.run(filteredTransOutFileName + \".rmsk.csv\", filteredTransOutFileName + \".link.txt\");\n\t///\tCheckCoverage.generate(cisOutFileName, filteredTransOutFileName, cisBed5pFileName, cisBed3pFileName, siKDDroshaBed, siControlBed);\n\t//\tCheckCoverage.generate(cisOutFileName, filteredTransOutFileName, cisBed5pFileName, cisBed3pFileName, siKDDicerBed, siControlBed);\n\t\t\n\t\t\n\t\t// generate background for drosha and dicer..\n\t\t\n\t\t\n\t\t// motif different conditioin?? \n\t\t\n\t\t\t\t\n\t\t//GenerateDepthsForEncodeDataSets.generate(outFileName, outFileName + \".encode.csv\", annotationParser);\n\t\t\n\t\t\n\t}",
"public static void main(String[] args) {\r\n\t\t// Load Dictionary\r\n\t\tString FileName;\r\n\t\tif (args.length == 0) {\r\n\t\t\t// Default dictionary\r\n\t\t\tFileName = \"G:\\\\455\\\\Homework4\\\\PA4\\\\bin\\\\testFiles\\\\sowpods.txt\";\r\n\t\t} else {\r\n\t\t\t// Given dictionary\r\n\t\t\tFileName = args[0];\r\n\t\t}\r\n\r\n\t\t// Construct AnagramDictionary and error detection\r\n\t\tAnagramDictionary ADictionary;\r\n\t\ttry {\r\n\t\t\tADictionary = new AnagramDictionary(FileName);\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\tSystem.out.println(\"File is not found! \" + FileName);\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// Starting to print the prompt\r\n\t\tSystem.out.println(\"Type . to quit.\");\r\n\t\tSystem.out.print(\"Rack? \");\r\n\t\tsc = new Scanner(System.in);\r\n\t\tString Rack = sc.next();\r\n\t\t// Exit until typing in \".\" at the prompt\r\n\t\twhile (!Rack.equals(\".\")) {\r\n\t\t\t// Print the Scrabble word according to the current rack and AnagramDictionary\r\n\t\t\tPrint(Rack, ADictionary);\r\n\t\t\tSystem.out.print(\"Rack? \");\r\n\t\t\tRack = sc.next();\r\n\t\t}\r\n\t}",
"public static void writePacman(String name, List<MsPacmanCase> pacmanCases) {\n\t\tString fullName = \"\";\n\t\tString[] aux = name.split(\"\\\\.\");\n\t\tString className = aux[aux.length-1];\n\n\t\tfor(int i = 0; i<aux.length-1; i++)\n\t\t\tfullName += aux[i] + \".\";\n\n\t\tfullName += \"data.\" + className;\n\t\t\n\t\t\n\t\tFile file = new File(\"bin\"+ java.io.File.separator + fullName.replace(\".\", java.io.File.separator) + \".json\");\n if (file.exists()) {\n file.delete(); //you might want to check if delete was successfull\n }\n\t\t\n\t\tPrintWriter pw = null;\n\n\t\ttry {\n\t\t\tpw = new PrintWriter(\"bin\"+ java.io.File.separator + fullName.replace(\".\", java.io.File.separator) + \".json\");\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} \n\n\t\tfor(int i = 0; i<pacmanCases.size(); i++) {\n\n\t\t\tMsPacmanCase c = pacmanCases.get(i);\n\n\t\t\tJSONObject jo = new JSONObject();\t\t\t\n\n\t\t\t// putting data to JSONObject \n\t\t\tjo.put(\"nearestPPillToPacman\", c.nearestPPillToPacman);\t \n\n\t\t\tint move = c.movement.ordinal();\n\t\t\tjo.put(\"move\", move);\n\n\t\t\tJSONArray edibleGhosts = new JSONArray();\n\t\t\tfor(int j = 0; j<4; j++) \n\t\t\t\tedibleGhosts.add(c.edibleGhosts[j]);\n\t\t\tjo.put(\"edibleGhosts\", edibleGhosts);\n\n\t\t\tJSONArray characterIndex = new JSONArray();\n\t\t\tfor(int j = 0; j<5; j++) \n\t\t\t\tcharacterIndex.add(c.characterIndex[j]);\n\t\t\tjo.put(\"characterIndex\", characterIndex);\n\n\t\t\tJSONArray characterLastMove = new JSONArray();\n\t\t\tfor(int j = 0; j<5; j++) \n\t\t\t\tcharacterLastMove.add(c.characterLastMove[j]);\n\t\t\tjo.put(\"characterLastMove\", characterLastMove);\n\n\t\t\tJSONArray activePPills = new JSONArray();\n\t\t\tfor(int j = 0; j<4; j++) \n\t\t\t\tactivePPills.add(c.activePPills[j]);\n\t\t\tjo.put(\"activePPills\", activePPills);\n\n\n\t\t\tpw.write(jo.toJSONString());\n\n\t\t\tpw.write('\\n');\n\t\t} \n\n\t\tpw.flush(); \n\t\tpw.close(); \n\n\t}",
"public static void main(String[] args) {\n\t\tString filename = \"C:/Users/Myky/Documents/EDAN55/Independent Set/g30.txt\";\n\t\tint[][] adjMatrix = readFile(filename);\n\t\tCounter counter = new Counter(0);\n\t\tint MIS = run(adjMatrix);\n\t\tprint(MIS);\n\n\t}",
"public static void main(String[] args) {\n\t\tSystem.out.println(\r\n\t\t\t\t\"Please provide a path to password protected PDF file in an appriopriate format i.e. C:\\\\Users\\\\User\\\\Documents\\\\File.pdf\");\r\n\t\tSystem.out.println(\"or press 'q' to quit to main menu\");\r\n\t\tString filePath = input.next();\r\n\t\t// if statement allowing to go back to main menu instead of typing in\r\n\t\t// file directory\r\n\t\tif (filePath.equals(\"q\") || (filePath.equals(\"Q\"))) {\r\n\t\t} else {\r\n\t\t\tstartAttack(filePath);\r\n\t\t}\r\n\t}",
"public static void main(String[] args) {\n PAT1005 pat = new PAT1005();\r\n\r\n }",
"public static void main(String[] args) {\r\n\t\t\r\n\t\tScanner input;\r\n\t\ttry {\r\n\t\t\tinput = new Scanner(new File(\"mirror.in\"));\r\n\t\t\tPrintWriter output = new PrintWriter(\"mirror.out\");\r\n\t\t\t//Read the input\r\n\t\t\tn = input.nextInt();\r\n\t\t\tm = input.nextInt();\r\n\t\t\tmirrors = new char[n][m];\r\n\t\t\t//Read Mirror Positions nxm matrix\r\n\t\t\tfor (int i = 0; i < n; i++) {\r\n\t\t\t\tString temp = input.next();\r\n\t\t\t\tfor (int j = 0; j < m; j++) {\r\n\t\t\t\t\tmirrors[i][j] = temp.charAt(j);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t//Get Target Directions\r\n\t\t\t//Left & Right boundaries\r\n\t\t\tfor (int i = 0; i < n; i++) {\r\n\t\t\t\tgetReflection(i,0,RIGHT);\r\n\t\t\t\tgetReflection(i,m-1,LEFT);\r\n\t\t\t}\r\n\t\t\t//Top & bottom boundaries\r\n\t\t\tfor (int i = 0; i < m; i++) {\r\n\t\t\t\tgetReflection(0,i,DOWN);\r\n\t\t\t\tgetReflection(n-1,i,UP);\r\n\t\t\t}\r\n\t\t\t//Write output to file\r\n\t\t\toutput.println(maxReflections);\r\n\t\t\toutput.close();\r\n\t\t\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t}",
"public static void main(String[] args) {\n\t\tSystem.out.println(\"Prueba de la clase Master02\");\n\t\t// cambio por lo que quiero\n\t\t// vuelvo a pisar\n\t\t// cambiado 10:44\n\t\t// admito los cambios\n\t\t// cambio 10:40\n\n\t}",
"public static void main(String[] args) throws IOException {\r\n\t\t\r\n\t\tSystem.out.println(parseInputFile());\r\n\t\t\r\n\t}",
"public static void main(String[] args)\r\n\t{\n\t\tacceptConfig();\r\n\t\treadDictionary();\r\n\t\t//Then, it reads the input file and it prints the word (if contained on the file) or the suggestions\r\n\t\t//(if not contained) in the output file. These files are given by command line arguments\r\n\t\tprocessFile(args[0], args[1]);\r\n\t\t\r\n\t}",
"public static void main(String[] args) {\n\t\ttry {\n\t\t\tFile f11 = new File(\"Usama's 1st file.txt\");\n\t\t\tScanner myReader = new Scanner(f11);\n\t\t\t\n\t\t\twhile(myReader.hasNextLine())\n\t\t\t{\n\t\t\t\tString data = myReader.nextLine();\n\t\t\t\tSystem.out.println(data);\n\t\t\t}\n\t\t\tmyReader.close();\n\t\t} catch(FileNotFoundException e) {\n\t\t\tSystem.out.println(\"An unexpected error has been occured! :(\");\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\n\t}",
"public Pacman() {\n int life = 50;\n int repro = 20;\n int maxCal = 500;\n int burn = 5;\n int strength = 50;\n myInfo = BasicMatrixModel.createCritterInfoInstance(this,life,repro,maxCal,burn,strength);\n }",
"public static void main(String argv[])\r\n {\r\n try\r\n {\r\n if (argv.length == 2)\r\n {\r\n // The first parameter must be the file name.\r\n String file = argv[0].toLowerCase() + \".gpw\";\r\n String password = argv[1];\r\n DataOutputStream pwdStream = new DataOutputStream (new FileOutputStream(file));\r\n Record pwdRecord = new Record(pwdStream);\r\n\r\n pwdRecord.write(Record.PASSWORD, password);\r\n pwdStream.close();\r\n }\r\n else\r\n {\r\n System.out.println(paramMsg);\r\n }\r\n }\r\n catch (IOException e)\r\n {\r\n System.out.println(\"IOException: \" + e.getMessage());\r\n e.printStackTrace();\r\n }\r\n }",
"static TreeSet<Preposition> parsePrepositions(Scanner data){\n\t\tArrayList<String[]> raw = parseDataToArray(data);\n\t\tTreeSet<Preposition> output = new TreeSet<Preposition>();\n\n\t\tfor(String[] current : raw){ //iterate over each line from the original file.\n\n\t\t\tif(current.length != Values.PREPOSITION_DATA_ARRAY_LENGTH_CORRECT){\n\t\t\t\tSystem.err.println(\"Error parsing a line.\");\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t//System.out.println(\"Raw: \" + Arrays.toString(current));\n\n\t\t\t//current[] contains a split based on tabs. Generally {chapter, nom/gen/gender, definition}.\n\n\t\t\tint chapter = 0;\n\t\t\tString Preposition;\n\t\t\tint caseTaken = 0;\n\t\t\tArrayList<String> definitions = new ArrayList<String>();\n\n\t\t\t//Values.betterStringArrayPrint(current);\n\n\t\t\ttry{ //try to read a noun, assuming that the chapter IS specified\n\t\t\t\tchapter = Integer.parseInt(current[0]);\n\t\t\t\tPreposition = current[1].split(\" \\\\+ \")[0];\n\t\t\t\tcaseTaken = Values.getCaseFromString(current[1].split(\" \\\\+ \")[1]);\n\t\t\t\tList<String> tempDefinitions = Arrays.asList(current[2].split(\",|;\")); //definitions\n\t\t\t\tdefinitions.addAll(tempDefinitions);\n\t\t\t} catch(NumberFormatException e){ //can happen if a chapter isn't specified. Read the noun from a null chapter.\n\t\t\t\tchapter = Values.CHAPTER_VOID;\n\t\t\t\tPreposition = current[1].split(\" \\\\+ \")[0];\n\t\t\t\tcaseTaken = Values.getCaseFromString(current[1].split(\" \\\\+ \")[1]);\n\t\t\t\tList<String> tempDefinitions = Arrays.asList(current[2].split(\",|;\")); //definitions\n\t\t\t\tdefinitions.addAll(tempDefinitions);\n\t\t\t} catch(Exception e){\n\t\t\t\te.printStackTrace();\n\t\t\t\tSystem.err.println(\"Could not read a line!\");\n\t\t\t\tcontinue; //We can't make a noun out of the botrked line.\n\t\t\t}\n\t\t\ttrimAll(definitions);\n\t\t\tPreposition currentPreposition = new Preposition(Preposition, caseTaken, chapter, definitions);\n\t\t\tSystem.out.println(\"Added: \" + currentPreposition);\n\t\t\toutput.add(currentPreposition);\n\t\t}\n\n\t\treturn output;\n\t}",
"public static void main(String args[])\r\n\t\tthrows Exception\r\n\t{\n\t\twrkDir = FileUtils.getTempUserDirectory(\"jhi-flapjack\");\r\n\t\twrkDir = new File(wrkDir, \"GobiiMabcConverter\");\r\n\t\twrkDir.mkdirs();\r\n\r\n\t\tGobiiMabcConverter converter = new GobiiMabcConverter();\r\n\r\n\t\t// Read/create the markers\r\n\t\tconverter.createMap(new File(args[0]));\r\n\t\t// Read/create the genotypes\r\n\t\tconverter.createGenotypes(new File(args[1]));\r\n\t\t// Read/create the qtls\r\n\t\tconverter.createQTL(new File(args[2]));\r\n\r\n\t\tCreateProjectSettings projectSettings = new CreateProjectSettings(\r\n\t\t\tnew File(wrkDir, \"map\"),\r\n\t\t\tnew File(wrkDir, \"geno\"),\r\n\t\t\tnull,\r\n\t\t\tnew File(wrkDir, \"qtl\"),\r\n\t\t\tnew FlapjackFile(args[3]),\r\n\t\t\tnull);\r\n\r\n\t\tDataImportSettings importSettings = new DataImportSettings();\r\n\t\timportSettings.setDecimalEnglish(true);\r\n\r\n\t\t// Make a Flapjack project\r\n\t\tCreateProject cp = new CreateProject(projectSettings, importSettings);\r\n\r\n\t\tcp.doProjectCreation();\r\n\t}",
"public static void main(String args[]) {\n if (args.length < 1) {\n System.out.println(\"usage: pgen <project name> <args>\");\n } else {\n Arguments arguments = parseArgs(args);\n File projectDir = new File(System.getProperty(\"user.dir\"), arguments.getFileName());\n GenRun run = null;\n switch (arguments.getMode()) {\n case KATTIS:\n run = new KattisRun(arguments.getFileTemplate(), projectDir, arguments.getFileName());\n break;\n default:\n run = new LocalRun(arguments.getFileTemplate(), projectDir, arguments.getFileName(), arguments.getExampleSize());\n }\n run.run();\n }\n }",
"public static void main(String[] args) throws IOException {\n\t\tString EPGAscaffoldPath = args[0];\n\t\tString MisAssemblyContigPath = args[1];\n\t\tString ContigWritePath = args[2];\n\t\t//Load1.\n\t\tint LinesEPGAscaffold = CommonClass.getFileLines(EPGAscaffoldPath) / 2;\n\t\tString EPGAscaffoldArray[] = new String[LinesEPGAscaffold];\n\t\tint Realsize_EPGAscaff = CommonClass.FastaToArray(EPGAscaffoldPath, EPGAscaffoldArray);\n\t\t//Load2.\n\t\tint LinesMisassembly = CommonClass.getFileLines(MisAssemblyContigPath) / 2;\n\t\tint MisassemblyArray[] = new int[LinesEPGAscaffold+LinesMisassembly];\n\t\tint Realsize_Misassembly = CommonClass.GetFastaHead(MisAssemblyContigPath, MisassemblyArray);\n\t\t//Mark.\n\t\tfor (int g = 0; g < Realsize_EPGAscaff; g++) {\n\t\t\tfor (int f = 0; f < Realsize_Misassembly; f++) {\n\t\t\t\tif (g == MisassemblyArray[f]) {\n\t\t\t\t\tEPGAscaffoldArray[g] = \"#\" + EPGAscaffoldArray[g];\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//Write.\n\t\tfor (int w = 0; w < Realsize_EPGAscaff; w++) {\n\t\t\tif (EPGAscaffoldArray[w].charAt(0) == '#') {\n\t\t\t\tFileWriter writer = new FileWriter(ContigWritePath + \"/Misassembly_EPGAcontigs.fa\", true);\n\t\t\t\twriter.write(\">\" + (w) + \"\\n\"\n\t\t\t\t\t\t+ EPGAscaffoldArray[w].substring(1, EPGAscaffoldArray[w].length()) + \"\\n\");\n\t\t\t\twriter.close();\n\t\t\t} else {\n\t\t\t\tFileWriter writer = new FileWriter(ContigWritePath + \"/ErrorFree_EPGAcontigs.fa\", true);\n\t\t\t\twriter.write(\">\" + (w) + \"\\n\" + EPGAscaffoldArray[w] + \"\\n\");\n\t\t\t\twriter.close();\n\t\t\t}\n\t\t}\n\t\t//Free.\n\t\tEPGAscaffoldArray=null;\n\t\tMisassemblyArray=null;\n\t}",
"public static void main(String[] args) {\r\n \r\n\t\tchar runType = '\\u0000';\r\n\t\ttry {\r\n\t\t\tif( args.length <= 2){\r\n\t\t\t\trunType = 'R'; //default recursive calculation by Laplacian method\r\n\t\t\t}else{\r\n\t\t\t\trunType = args[2].charAt(0); //choice of the caller: Laplacian or iterative Gaussian\r\n\t\t\t}\r\n\t\t\tfileReader(args[0], args[1], runType);\r\n\t\t\tSystem.out.println(\"Processing Completed. Please Check the output file \" + args[1]);\r\n\t\t} catch (IOException e) {\r\n\t\t\tSystem.out.println(e.toString());\r\n\t\t\tSystem.out.println(\"Please specify valid file names as arguments\");\r\n\t\t} catch (ArrayIndexOutOfBoundsException e) {\r\n\t\t\tSystem.out.println(\"Please enter the input file and the output file as \" + \"the two arguments\");\r\n\t\t\tSystem.exit(1);\r\n\t\t}\r\n\r\n\t}",
"public static void main(String... av) throws Exception {\n\n\t\tif (av.length == 0) {\n\t\t\tthrow new IllegalArgumentException(\"Usage: pca FILES...\");\n\t\t}\n\n\t\tfor (String filename : av) {\n\t\t\ttry (DataReader dr = new DataReader(new FileReader(filename + \".data\"))) {\n\t\t\t\tdouble[] data = dr.getData();\n\t\t\t\tSystem.out.println(filename + \": vector length = \" + data.length);\n\n\t\t\t\tPCACoreHandler handler = new PCACoreHandler();\n\t\t\t\tPCACore pca = handler.fromSimpleTimeSeries(data);\n\n\t\t\t\tlog(filename + \"_pcomps.data\", filename + \": principle components\", pca.getPrincipalComponents());\n\t\t\t\tlog(filename + \"_lambda.data\", filename + \": lambda\", pca.getLambda());\n\t\t\t\tlog(filename + \"_pfacs.data\", filename + \": principle factors\", pca.getPrinicipalFactors());\n\n\t\t\t\tMatrix cc = handler.correlationCircle(pca);\n\t\t\t\tlog(filename + \"_cc.data\", filename + \": correlation circle\", cc);\n\n\t\t\t\tMatrix cumcon = handler.cumulativeContribution(pca);\n\t\t\t\tlog(filename + \"_cumcon.data\", filename + \": cumulative contributions\", cumcon);\n\t\t\t}\n\t\t}\n\t}",
"public static void main(String[] args) {\n\t\tPreprocessing p = new Preprocessing();\r\n\t\tp.ZAData();\r\n\t\t//String ZA_dir = \"C:\\\\Users\\\\manja\\\\Google Drive\\\\SJSU\\\\Year 4\\\\CS 185C\\\\Midterm 2\\\\Malware files\\\\zeroaccess\";\r\n\t\t//String[] ZA_samples = p.get_samples(ZA_dir);\r\n\t\t// HashMap<String, Integer> ZA_opcode_dict = opcode_occurrences(ZA_dir,\r\n\t\t// ZA_samples);\r\n\t\t// System.out.println(ZA_opcode_dict);\r\n\t\t//String replace_ZA_dir = \"C:\\\\Users\\\\manja\\\\Google Drive\\\\SJSU\\\\Year 4\\\\CS 185C\\\\Midterm 2\\\\Malware files\\\\replace_za\";\r\n\t\t/* HashMap<String, String> ZA_OPCODE = new HashMap<String, String>() {\r\n\t\t\t{\r\n\t\t\t\tput(\"mov\", \"A\");\r\n\t\t\t\tput(\"push\", \"B\");\r\n\t\t\t\tput(\"call\", \"C\");\r\n\t\t\t\tput(\"cmp\", \"D\");\r\n\t\t\t\tput(\"pop\", \"E\");\r\n\t\t\t\tput(\"jz\", \"F\");\r\n\t\t\t\tput(\"jnz\", \"G\");\r\n\t\t\t\tput(\"add\", \"H\");\r\n\t\t\t\tput(\"test\", \"I\");\r\n\t\t\t\tput(\"lea\", \"J\");\r\n\t\t\t\tput(\"jmp\", \"K\");\r\n\t\t\t\tput(\"retn\", \"L\");\r\n\t\t\t\tput(\"xor\", \"M\");\r\n\t\t\t\tput(\"and\", \"N\");\r\n\t\t\t\tput(\"inc\", \"O\");\r\n\t\t\t\tput(\"sub\", \"P\");\r\n\t\t\t};\r\n\t\t};\r\n\t\tp.copy_replace(ZA_dir, replace_ZA_dir, ZA_samples, ZA_OPCODE);\r\n\t\tString[] ZA_modelData = p.splittingData(replace_ZA_dir);\r\n\t\tfor (String s : ZA_modelData)\r\n\t\t\tSystem.out.println(s);\r\n\t*/\r\n\t}",
"public static void main(String args[]) {\n\tif (args.length == 0) new GUI();\n\telse { \n\t PredPrey pp = new PredPrey();\n\t double[] params = pp.getSettings();\n\t String inputFile = args[0];\n\t pp.run(params, inputFile);\n\t}\n }",
"public Cmdline(String file) {\n \n try {\n File selectedFile = new File(file);\n Model m = loadModel( selectedFile );\n if( m != null )\n models.add( m );\n } catch (FileNotFoundException fnfe) {\n System.out.println(\"File not found\");\n } catch( ParseException pe ) {\n System.out.println(\"Parse Error: \" + pe.getMessage());\n } catch( LemException le ) {\n System.out.println(\"Parse Error: \" + le.getMessage());\n } catch( IOException ioe ) {\n System.out.println(\"I/OO Error: \" + ioe.getMessage());\n }\n \n/* metamodel.Procedure p = m.getDomain( \"Publications\" ).getClass( \"Manuscript\" ).getStateMachine().getState(\"Adding\").getProcedure();\n runtime.ModelInstance i = new runtime.ModelInstance();\n \n p.execute(i); */\n }",
"public static void main(String[] args) throws IOException {\n\t\tWordList list = new WordList(new File(args[0]));\n\t\t// Create Hangman object using WordList object\n\t\tHangman game = new Hangman(list);\n\n\t\trun(game);\n\t}",
"public HpccFile(String fileName, Connection espconninfo, String targetColumnList, String filter, RemapInfo remap_info, int maxParts, String targetfilecluster) throws HpccFileException\n {\n this.fileName = fileName;\n this.recordDefinition = new RecordDef(); // missing, the default\n projectList = new ColumnPruner(targetColumnList);\n this.espConnInfo = espconninfo;\n this.filter = new FileFilter(filter);\n clusterRemapInfo = remap_info;\n }",
"public static void main(String[] args) throws IOException {\n\t\tString fileName=args[0];\n\t\tString strEncoding=\"UTF-8\";\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(new\n\t\t\t\tFileInputStream(fileName), strEncoding));\n\t\tString temp;\n\t\tString all=\"\";\n\t\twhile((temp=br.readLine())!=null){\n\t\t\tall+=temp;\n\t\t}\n\t\tString[] wordList=all.split(\"'s\");\n\t\tArrayList<String> words=new ArrayList<>();\n\t\tfor(String i:wordList) { words.add(i); }\n\t\t\n\t\twords.stream()\n\t\t.filter(w -> w.length()>=2)\n\t\t.map(i -> i.charAt(0)+\"...\"+i.charAt(i.length()-1))\n\t\t.forEach(System.out::println);\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\tString inputFileName = \"sent.ko\";\r\n\t\tkrSeg kiss = new krSeg(inputFileName);\r\n\t\tkiss.krMorphAnalysis(); \r\n\t}",
"public static void main(String[] args) {\n ReadMappings rs = new ReadMappings();\n try {\n Hashtable result = rs.getMappingsFromFile();\n Enumeration en = result.elements();\n while(en.hasMoreElements()) {\n System.out.println(en.nextElement());\n }\n\n System.out.println(\"Pons:\"+result.get(\"Pons\"));\n System.out.println(\"Hypothalamus:\"+result.get(\"Hypothalamus\"));\n System.out.println(\"Medulla:\"+result.get(\"Medulla\"));\n } catch(Exception e) {\n e.printStackTrace();\n }\n }",
"public static void main(String[] args) throws Exception {\n\t\ttry (InputStream is = new FileInputStream(\"prime6.txt\")) {\n\t\t\tis.skip(1);\n\t\t\tis.read();\n\t\t\tis.skip(1);\n\t\t\tis.read();\n\t\t\tis.mark(4);\n\t\t\tis.skip(1);\n\t\t\tis.reset();\n\t\t\tSystem.out.print(is.read());\n\t\t}\n\t}",
"public static void main(String[] args) {\n\t\t// Parse command-line arguments\n\t\tif (args.length < 1 || args.length > 2 || Arrays.asList(args).contains(\"-h\")) {\n\t\t\tprintUsage();\n\t\t\treturn;\n\t\t}\n\n\t\t// Parse file\n\t\tString filename = args[args.length - 1];\n\t\tHashSet<String> sequences = FastaFileReader.parseFastaFile(filename);\n\t\tif (sequences == null) {\n\t\t\tSystem.err.println(\"ERROR: Unable to parse FASTA file \\\"\" + filename + \"\\\"\");\n\t\t\treturn;\n\t\t}\n\n\t\t// Attempt to reconstruct the chromosome\n\t\tString result = UniqueChromosomeReconstructor.reconstructChromosome(sequences);\n\t\tif (result == null) {\n\t\t\tSystem.err.println(\"ERROR: Unable to reconstruct a unique chromosome\");\n\t\t\treturn;\n\t\t}\n\n\t\t// Report result\n\t\tSystem.out.println(\"The reconstructed chromosome is:\");\n\t\tSystem.out.println(result);\n\t\tSystem.out.println(\"Length: \" + result.length());\n\t}",
"Points(String filepath){\n readPointsFile(filepath); //dengan file points.txt\n }",
"public static void main(String[] args) {\n PAT1028 pat = new PAT1028();\r\n pat.run();\r\n \r\n }",
"public static void main(String[] args) {\n\t\tPrintStream gravador;\n\t\ttry {\n\t\t\tgravador = new PrintStream(\"saida.txt\");\n\t\t\tgravador.println(\"Texto\");\n\t\t\tgravador.println(\"oi\");\n\t\t\tgravador.println(\"Te\");\n\t\t\tgravador.println(\"liguei\");\n\t\t\tgravador.println(\"deve\");\n\t\t\tgravador.println(\"Ta ocupadinho\");\n\t\t\tgravador.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}",
"public static void main(String argv[]) {\n if (argv.length == 0) {\n System.out.println(\"Usage : java PasitoScanner <inputfile>\");\n }\n else {\n for (int i = 0; i < argv.length; i++) {\n PasitoScanner scanner = null;\n try {\n scanner = new PasitoScanner( new java.io.FileReader(argv[i]) );\n do {\n System.out.println(scanner.next_token());\n } while (!scanner.yy_atEOF);\n\n }\n catch (java.io.FileNotFoundException e) {\n System.out.println(\"File not found : \\\"\"+argv[i]+\"\\\"\");\n }\n catch (java.io.IOException e) {\n System.out.println(\"IO error scanning file \\\"\"+argv[i]+\"\\\"\");\n System.out.println(e);\n }\n catch (Exception e) {\n System.out.println(\"Unexpected exception:\");\n e.printStackTrace();\n }\n }\n }\n }",
"public static void main(String[] args) {\n\n // create initial board from file\n In in = new In(args[0]);\n int N = in.readInt();\n int[][] blocks = new int[N][N];\n for (int i = 0; i < N; i++)\n for (int j = 0; j < N; j++)\n blocks[i][j] = in.readInt();\n Board initial = new Board(blocks);\n\n // solve the puzzle\n Solver solver = new Solver(initial);\n\n // print solution to standard output\n if (!solver.isSolvable())\n StdOut.println(\"No solution possible\");\n else {\n StdOut.println(\"Minimum number of moves = \" + solver.moves());\n for (Board board : solver.solution())\n StdOut.println(board);\n }\n }",
"public static void main(String[] args) throws IOException {\n\t\tString MUMmerFile = args[0];\n\t\tString ErrorEPGAcontigFile = args[1];\n\t\tString ErrorFreeEPGAcontigFile = args[2];\n\t\tString SPAdescontigFile = args[3];\n\t\tString DataName = args[4];\n\t\tString FinalEPGAcontigPath = args[5];\n\t\t//Alignment.\n\t\tint SizeOfMUMmerFile = CommonClass.getFileLines(MUMmerFile);\n\t\tString MUMerArray[] = new String[SizeOfMUMmerFile];\n\t\tint RealSizeMUMmer = CommonClass.FileToArray(MUMmerFile, MUMerArray);\n\t\tSystem.out.println(\"The real size of MUMmer is:\" + RealSizeMUMmer);\n\t\t//Load EPGA.\n\t\tint SizeOfErrorEPGAFile = CommonClass.getFileLines(ErrorEPGAcontigFile);\n\t\tString ErrorEPGAcontigArray[] = new String[SizeOfErrorEPGAFile];\n\t\tint RealSizeErrorEPGAcontig = CommonClass.FastaToArray(ErrorEPGAcontigFile, ErrorEPGAcontigArray);\n\t\tSystem.out.println(\"The real size of Error EPGA assembly is:\" + RealSizeErrorEPGAcontig);\n\t\t//Load EPGA.\n\t\tint SizeOfErrorFreeEPGAFile = CommonClass.getFileLines(ErrorFreeEPGAcontigFile);\n\t\tString ErrorFreeEPGAcontigArray[] = new String[SizeOfErrorFreeEPGAFile];\n\t\tint RealSizeErrorFreeEPGAcontig = CommonClass.FastaToArray(ErrorFreeEPGAcontigFile, ErrorFreeEPGAcontigArray);\n\t\tSystem.out.println(\"The real size of Error Free EPGA assembly is:\" + RealSizeErrorFreeEPGAcontig);\n\t\t//Load SPAdes.\n\t\tint SizeOfSPAdesFile = CommonClass.getFileLines(SPAdescontigFile);\n\t\tString SPAdescontigArray[] = new String[SizeOfSPAdesFile];\n\t\tint RealSizeSPAdescontig = CommonClass.FastaToArray(SPAdescontigFile, SPAdescontigArray);\n\t\tSystem.out.println(\"The real size of SPAdes assembly is:\" + RealSizeSPAdescontig);\n\t\t//Process.\n\t\tSet<Integer> hashSet = new HashSet<Integer>();\n\t\tfor (int w = 4; w < RealSizeMUMmer; w++) {\n\t\t\tif (MUMerArray[w].charAt(0) != '#') {\n\t\t\t\tint CountSave = 0;\n\t\t\t\tString SaveTempArray[] = new String[RealSizeMUMmer];\n\t\t\t\tString[] SplitLine1 = MUMerArray[w].split(\"\\t|\\\\s+\");\n\t\t\t\tSaveTempArray[CountSave++] = MUMerArray[w];\n\t\t\t\tMUMerArray[w] = \"#\" + MUMerArray[w];\n\t\t\t\tfor (int e = w + 1; e < RealSizeMUMmer; e++) {\n\t\t\t\t\tif (MUMerArray[e].charAt(0) != '#') {\n\t\t\t\t\t\tString[] SplitLine2 = MUMerArray[e].split(\"\\t|\\\\s+\");\n\t\t\t\t\t\tif (SplitLine1[11].equals(SplitLine2[11])) {\n\t\t\t\t\t\t\tSaveTempArray[CountSave++] = MUMerArray[e];\n\t\t\t\t\t\t\tMUMerArray[e] = \"#\" + MUMerArray[e];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// Mark read.\n\t\t\t\tfor (int r = 0; r < CountSave; r++) {\n\t\t\t\t\tString[] SplitLine31 = SaveTempArray[r].split(\"\\t|\\\\s+\");\n\t\t\t\t\tString[] SplitLine41 = SplitLine31[12].split(\"_\");\n\t\t\t\t\tint SPAdes_id = Integer.parseInt(SplitLine41[1]);\n\t\t\t\t\thashSet.add(SPAdes_id);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//Write.\n\t\tint CountCorrEPGA=0;\n\t\tString CorrEPGAContigArray[]=new String[2*(RealSizeErrorFreeEPGAcontig+RealSizeSPAdescontig)];\n\t\tint EPId = 0;\n\t\tfor (int w = 0; w < RealSizeErrorFreeEPGAcontig; w++) {\n CorrEPGAContigArray[CountCorrEPGA++]=ErrorFreeEPGAcontigArray[w];\n\t\t}\n\t\tIterator<Integer> it = hashSet.iterator();\n\t\twhile (it.hasNext()) {\n\t\t\tint EPGAIndex = it.next();\n CorrEPGAContigArray[CountCorrEPGA++]=SPAdescontigArray[EPGAIndex];\n\t\t}\n\t\t//Sort process.\n\t\tString exch=\"\";\n\t\tfor(int w=0;w<CountCorrEPGA;w++)\n\t\t{\n\t\t\tfor(int h=w+1;h<CountCorrEPGA;h++)\n\t\t\t{\n\t\t\t\tif(CorrEPGAContigArray[w].length()<CorrEPGAContigArray[h].length())\n\t\t\t\t{\n\t\t\t\t\texch=CorrEPGAContigArray[w];\n\t\t\t\t\tCorrEPGAContigArray[w]=CorrEPGAContigArray[h];\n\t\t\t\t\tCorrEPGAContigArray[h]=exch;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//Delete duplicate records.\n\t\tfor(int w=0;w<CountCorrEPGA;w++)\n\t\t{\n\t\t\tfor(int h=w+1;h<CountCorrEPGA;h++)\n\t\t\t{\n\t\t \tif(CorrEPGAContigArray[w].equals(CorrEPGAContigArray[h])||CorrEPGAContigArray[w].equals(CommonClass.reverse(CorrEPGAContigArray[h])))\n\t\t\t\t{\n\t\t\t\t\tCorrEPGAContigArray[h]=\"%\"+CorrEPGAContigArray[h];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor(int j=0;j<CountCorrEPGA;j++)\n\t\t{\n\t\t\tif(CorrEPGAContigArray[j].charAt(0)!='%')\n\t\t\t{\n\t\t\t\t FileWriter writer = new FileWriter(FinalEPGAcontigPath + \"/CorrEPGAcontig.\" + DataName + \".fa\", true);\n\t\t\t writer.write(\">\" + (EPId++) + \"\\n\" + CorrEPGAContigArray[j] + \"\\n\");\n\t\t\t writer.close();\n\t\t\t}\n\t\t}\n\t\t//Free.\n\t\tMUMerArray=null;\n\t\tErrorEPGAcontigArray=null;\n\t\tErrorFreeEPGAcontigArray=null;\n\t\tSPAdescontigArray=null;\n\t\tCorrEPGAContigArray=null;\n\t}",
"public static void main(String args[]) {\n\t\tString sdl =\"PTCRA - GWANGMYEONG 0991TEST06009705WINF00000000034700NPLCF00000000000000SEX F00000000025600NQU F00000000030600NTLAF00000000000100N05316\";\n\t\ttry {\n\t\t\tPT pt = new PT(sdl);\n\t\t\tpt.doProcess();\n\t\t} catch (Exception e) {\n\t\t\tLog.error(\"ERROR\", \"\", e);\n\t\t}\n\t}",
"public void readPairs(String fileName) {\n BufferedReader r = null;\n try {\n r = new BufferedReader(new InputStreamReader(new FileInputStream(fileName)));\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n while (true) {\n String line = null;\n try {\n line = r.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n if (line == null) {\n break;\n }\n assert line.length() == 11; // indatakoll, om man kör med assertions på\n String start = line.substring(0, 5);\n String goal = line.substring(6, 11);\n\n int s = words.indexOf(start);\n int v = words.indexOf(goal);\n\n shortestPathPairs(s, v);\n }\n\n }",
"static public void main(String argv[]) {\n String archivo_a_parsear = \"/home/maldad/repos/automatas/semantico/EjemploA/src/ejemploa/test.txt\";\n try {\n parser p = new parser(new Lexer(new FileReader(archivo_a_parsear)));\n Object result = p.parse().value; \n } catch (Exception e) {\n /* do cleanup here -- possibly rethrow e */\n e.printStackTrace();\n }\n }",
"public static void main(String[] args) throws Exception {\n\t\tAttributedReader reader = new AttributedReader();\n\t\tVariabilityModel afm = reader.parseFile(\"input/models/random/100-5-0-0.afm\");\n\t\tChocoReasoner reasoner = new ChocoReasoner();\n\t\tafm.transformTo(reasoner);\n\t\tChocoValidQuestion att= new ChocoValidQuestion();\n\t\treasoner.ask(att);\n\t\tSystem.out.println(att.isValid());\n\t}",
"public static void main(String[] args) {\n\n\t\tString path_file=\"\";\n\t\t\n\t\tif (args.length ==0) {\n\t\t\t \n\t\t\t System.out.println(\"VEUILLEZ METTRE LE CHEMIN ABSOLU DU FICHIER\");\n\t\t\t \n\t\t\t System.exit(1);\n\t\t\n\t\t}\n\t\t\n\t\t\n\t\tpath_file=args[0];\n\t\t\n\n\t\t\n\t\t\n\tGraphe g=LectureFichier(path_file);\n\t\tg.PrimeMST(g);\n\t\tg.printMST(g.getMSTholder());\n\t\tSystem.out.println(\"\\n Son cout est de :\"+g.MSTCost(g.getMSTholder()));\n\t}",
"public static void main(String[] args) throws Exception {\n\t\t Crew_pairing cp = new Crew_pairing(\"data-info-.txt\");\r\n//\t\t cp.test();\r\n\t\t cp.runCrew_pairing();\r\n\t }",
"public static void main(String[] args) throws Exception {\n CharStream input = CharStreams.fromFileName(\"T2-Ejercicios/T2-Ej2/Multiplo.txt\");\n FileOutputStream f = new FileOutputStream(\"T2-Ejercicios/T2-Ej2/MultiploOut.txt\");\n System.setOut(new PrintStream(f));\n // create a lexer that feeds off of input CharStream\n MultiploLexer lexer = new MultiploLexer(input);\n // create a buffer of tokens pulled from the lexer\n CommonTokenStream tokens = new CommonTokenStream(lexer);\n // create a parser that feeds off the tokens buffer\n MultiploParser parser = new MultiploParser(tokens);\n parser.r();\n System.out.println(); // print a \\n after translation\n }",
"private void scan(String filename){\n\t\tverifyAutomatons();\n\t\tsymbolTable = new SymbolTable();\n\t\tprogramInternalForm = new ProgramInternalForm();\n\n\t\tString[] tokensVal = getProgramFromFile(filename);\n\n\t\tint i = 0;\n\t\twhile (i < tokensVal.length) {\n\t\t\tverifySingleTokens(tokensVal[i]);\n\t\t\ti++;\n\t\t}\n\t}",
"public static void main(String[] args) throws FileNotFoundException\r\n {\r\n introduction();\r\n\r\n String fileName = getInput(); // input the name of the file\r\n\r\n File file = new File(fileName); // create file object for input\r\n\r\n checkExist(file); // check if the file exist\r\n\r\n String[] words = loadword(file); // string array for storing words in the file\r\n\r\n sort(words); // storing the words in order\r\n\r\n File outputFile = new File(\"output.txt\"); // create file for result\r\n\r\n writeFile(outputFile, words); // write result into the output file\r\n\r\n System.out.println(\"Finish!\");\r\n }",
"public AnalysePSRFile(File file) throws IOException {\n ReadFileToString str = new ReadFileToString();\n str.read(file);\n StringTokenizer tok = new StringTokenizer(str.outputString,\"\\n\");\n boolean notfound = true;\n int count = 4;\n while(notfound && tok.hasMoreTokens()) {\n String line = tok.nextToken();\n if(line.indexOf(startKeyword) >= 0) \n count--;\n if(count == 0)\n notfound = false;\n }\n if(!notfound) {\n Temperature = getTemperature(tok);\n getMoleFractionHeader(tok);\n getMoleFractions(tok);\n int n = namesV.size();\n namesS = new String[n];\n molefractionsD = new Double[n];\n for(int i=0;i<n;i++) {\n namesS[i] = (String) namesV.elementAt(i);\n molefractionsD[i] = (Double) molefractionsV.elementAt(i);\n }\n } else {\n throw new IOException(\"PSR file incomplete: Begin not found in \\n \" + file.toString() );\n }\n \n }",
"public static void main(String[] args) {\n\t\tjflex.Main.generate(new File(\"especificacoes/miniC.lex\"));\n\t}",
"private void cli (String[] args)\n {\n if (args.length != 2) {\n System.out.println(\"Usage: <analyzer> input-file output-file\");\n return;\n }\n dataFilename = args[1];\n super.cli(args[0], this);\n }",
"public CommandParser(String filename) {\r\n try {\r\n sc = new Scanner(new File(filename));\r\n }\r\n catch (FileNotFoundException e) {\r\n e.printStackTrace();\r\n System.out.println(\"File not found.\");\r\n }\r\n }",
"public static void main(String[] args) {\r\n // create initial board from file\r\n In in = new In(args[0]);\r\n int N = in.readInt();\r\n int[][] blocks = new int[N][N];\r\n for (int i = 0; i < N; i++)\r\n for (int j = 0; j < N; j++)\r\n blocks[i][j] = in.readInt();\r\n Board initial = new Board(blocks);\r\n\r\n // solve the puzzle\r\n Solver solver = new Solver(initial);\r\n\r\n // print solution to standard output\r\n if (!solver.isSolvable())\r\n StdOut.println(\"No solution possible\");\r\n else {\r\n StdOut.println(\"Minimum number of moves = \" + solver.moves());\r\n for (Board board : solver.solution())\r\n StdOut.println(board);\r\n }\r\n }",
"public static void main(String[] args)\n throws FileNotFoundException, IOException\n {\n if (args.length == 0)\n {\n System.out.println(getUsageString());\n System.exit(0);\n }\n\n AssignEigenvectorsCmd cmd = new AssignEigenvectorsCmd();\n // Parse input. If incorrect, say what's wrong and print usage String\n if (!cmd.parseArguments(args))\n {\n System.out.println(getUsageString());\n System.exit(0);\n }\n\n // read lag times\n IDoubleArray lagFile = doublesNew.fromFile(cmd.inDir + \"/hmm-its.dat\");\n int[] lagtimes = intArrays.from(lagFile.getColumn(0));\n\n // reference\n IDoubleArray pibig0 = doublesNew.fromFile(cmd.inDir + \"/hmm-pibig-lag\" + cmd.reflag + \".dat\");\n IDoubleArray Rbig0 = doublesNew.fromFile(cmd.inDir + \"/hmm-Rbig-lag\" + cmd.reflag + \".dat\");\n cmd.setReference(pibig0, Rbig0);\n\n // read matrices and Chi\n for (int tau : lagtimes)\n {\n IDoubleArray TC = doublesNew.fromFile(cmd.inDir + \"/hmm-TC-lag\" + tau + \".dat\");\n IDoubleArray timescales = msm.timescales(TC, tau);\n IDoubleArray pibig = doublesNew.fromFile(cmd.inDir + \"/hmm-pibig-lag\" + tau + \".dat\");\n IDoubleArray Rbig = doublesNew.fromFile(cmd.inDir + \"/hmm-Rbig-lag\" + tau + \".dat\");\n\n System.out.print(tau + \"\\t\");\n for (int i = 1; i < Rbig.columns(); i++)\n {\n IDoubleArray ri = Rbig.viewColumn(i);\n\n double max = 0;\n int argmax = i;\n for (int j = 1; j < Rbig.columns(); j++)\n {\n double o = cmd.overlap(ri, j, pibig);\n if (o > max)\n {\n max = o;\n argmax = j;\n }\n }\n \n if (max > cmd.minOverlap)\n {\n System.out.print(timescales.get(argmax-1)+\"\\t\");\n }\n else\n {\n System.out.print(0+\"\\t\");\n }\n //System.out.print(max + \"(\"+argmax+\")\" + \"\\t\");\n }\n System.out.println();\n }\n\n }",
"public static void main(String[] args) throws IOException {\n\t\tString MUMmerFile = args[0];\n\t\tString ErrorFreeEPGAcontigFile = args[1];\n\t\tString SPAdescontigFile = args[2];\n\t\tString DataName = args[3];\n\t\tString FinalEPGAcontigPath = args[4];\n\t\t//Alignment.\n\t\tint SizeOfMUMmerFile = CommonClass.getFileLines(MUMmerFile);\n\t\tString MUMerArray[] = new String[SizeOfMUMmerFile];\n\t\tint RealSizeMUMmer = CommonClass.FileToArray(MUMmerFile, MUMerArray);\n\t\tSystem.out.println(\"The real size of MUMmer is:\" + RealSizeMUMmer);\n\t\t//Load Error Free EPGA.\n\t\tint SizeOfErrorFreeEPGAFile = CommonClass.getFileLines(ErrorFreeEPGAcontigFile);\n\t\tString ErrorFreeEPGAcontigArray[] = new String[SizeOfErrorFreeEPGAFile];\n\t\tint RealSizeErrorFreeEPGAcontig = CommonClass.FastaToArray(ErrorFreeEPGAcontigFile, ErrorFreeEPGAcontigArray);\n\t\tSystem.out.println(\"The real size of Error Free EPGA assembly is:\" + RealSizeErrorFreeEPGAcontig);\n\t\t//Load SPAdes.\n\t\tint SizeOfSPAdesFile = CommonClass.getFileLines(SPAdescontigFile);\n\t\tString SPAdescontigArray[] = new String[SizeOfSPAdesFile];\n\t\tint RealSizeSPAdescontig = CommonClass.FastaToArray(SPAdescontigFile, SPAdescontigArray);\n\t\tSystem.out.println(\"The real size of SPAdes assembly is:\" + RealSizeSPAdescontig);\n\t\t//Process.\n\t\tSet<Integer> hashSet = new HashSet<Integer>();\n\t\tfor (int w = 4; w < RealSizeMUMmer; w++) \n\t\t{\n\t\t\tString[] SplitLine1 = MUMerArray[w].split(\"\\t|\\\\s+\");\n\t\t\tif(SplitLine1.length==14 && (SplitLine1[13].equals(\"[CONTAINS]\") || SplitLine1[13].equals(\"[BEGIN]\") || SplitLine1[13].equals(\"[END]\")))\n\t\t\t{\n\t\t\t\tString[] SplitLine2 = SplitLine1[11].split(\"_\");\n\t\t\t\tint SPAdes_id = Integer.parseInt(SplitLine2[1]);\n\t\t\t\thashSet.add(SPAdes_id);\n\t\t\t\tint EPGA_id = Integer.parseInt(SplitLine1[12]);\n\t\t\t\tSystem.out.println(\"SplitLine1[13]:\"+SplitLine1[13]+\"\\t\"+\"Spades:\"+SPAdes_id+\"\\t\"+\"epga:\"+EPGA_id);\n\t\t\t\tErrorFreeEPGAcontigArray[EPGA_id]=\"#\"+ErrorFreeEPGAcontigArray[EPGA_id];\t\n\t\t\t}\n\t\t}\n\t\t//Write.\n\t\tfor (int w = 0; w < RealSizeErrorFreeEPGAcontig; w++) \n\t\t{\n\t\t\tif(ErrorFreeEPGAcontigArray[w].charAt(0)!='#')\n\t\t\t{\n\t\t\t\tFileWriter writer = new FileWriter(FinalEPGAcontigPath + \"/ReplaceEPGAcontig.\" + DataName + \".fa\", true);\n\t\t\t\twriter.write(\">\" + (w) + \"\\n\" + ErrorFreeEPGAcontigArray[w] + \"\\n\");\n\t\t\t\twriter.close();\n\t\t\t}\n\t\t}\n\t\tIterator<Integer> it = hashSet.iterator();\n\t\twhile (it.hasNext()) {\n\t\t\tint SPAdesIndex = it.next();\n\t\t\tFileWriter writer = new FileWriter(FinalEPGAcontigPath + \"/ReplaceEPGAcontig.\" + DataName + \".fa\", true);\n\t\t\twriter.write(\">Add:\" + (SPAdesIndex) + \"\\n\" + SPAdescontigArray[SPAdesIndex] + \"\\n\");\n\t\t\twriter.close();\n\t\t}\n\t\t//Free.\n\t\tMUMerArray=null;\n\t\tErrorFreeEPGAcontigArray=null;\n\t\tSPAdescontigArray=null;\n\t}",
"public static void main(String[] args)\n/* */ throws IOException\n/* */ {\n/* 130 */ if (args.length < 1) {\n/* 131 */ System.err.println(\"usage: java edu.stanford.nlp.process.ArabicTokenizer [-cr] filename\");\n/* 132 */ return;\n/* */ }\n/* 134 */ ArabicTokenizer tokenizer = new ArabicTokenizer(new InputStreamReader(new FileInputStream(args[(args.length - 1)]), \"UTF-8\"), args[0].equals(\"-cr\"));\n/* 135 */ PrintWriter pw = new PrintWriter(new OutputStreamWriter(System.out, \"UTF-8\"), true);\n/* 136 */ while (tokenizer.hasNext()) {\n/* 137 */ Word w = (Word)tokenizer.next();\n/* 138 */ if (w == ArabicLexer.crValue) {\n/* 139 */ pw.println(\"***CR***\");\n/* */ } else {\n/* 141 */ pw.println(w);\n/* */ }\n/* */ }\n/* */ }",
"public static void main(String[] args) {\n // Check args.\n if(args == null || args.length == 0) {\n printUsage();\n }\n CommandLineParser clp = new CommandLineParser(args, new String[] {\"enzyme\", \"mc\"});\n String[] dbs = clp.getParameters();\n if(dbs.length != 2) {\n printUsage();\n }\n String original = dbs[0];\n String randomized = dbs[1];\n\n boolean print = false;\n boolean verbose = false;\n String[] flags = clp.getFlags();\n if(flags.length > 2) {\n printUsage();\n } else if(flags.length == 0) {\n System.err.println(\"\\n\\nIt would be best to specify either the 'p' or the 'v' flag, or both, since this program is otherwise completely silent and useless!!.\\n\");\n System.exit(1);\n }\n if(clp.hasFlag(\"p\")) {\n print = true;\n }\n if(clp.hasFlag(\"v\")) {\n verbose = true;\n }\n\n String enzyme = clp.getOptionParameter(\"enzyme\");\n int mc = 0;\n if(enzyme != null) {\n String tempMC = clp.getOptionParameter(\"mc\");\n if(tempMC == null) {\n mc = 1;\n } else {\n try {\n mc = Integer.parseInt(tempMC);\n if(mc < 0) {\n throw new NumberFormatException(\"\");\n }\n } catch(NumberFormatException nfe) {\n System.err.println(\"\\n\\nThe number of miscleavages must be a positive, whole number.\\nYou incorrectly specified '\" + tempMC + \"'!\\n\");\n System.exit(1);\n }\n }\n }\n // Check original DB file.\n if(!new File(original).exists()) {\n System.err.println(\"\\n\\nOriginal database file '\" + args[0] + \"' was not found!\\n\");\n System.exit(1);\n }\n // Check randomized DB file.\n if(!new File(randomized).exists()) {\n System.err.println(\"\\n\\nRandomized database file '\" + args[1] + \"' was not found!\\n\");\n System.exit(1);\n }\n // Okay, we should be able to run.\n try {\n AnalyzeRandomizedDB ard = null;\n if(enzyme != null) {\n ard = new AnalyzeRandomizedDB(original, randomized, enzyme, mc);\n } else {\n ard = new AnalyzeRandomizedDB(original, randomized);\n }\n ard.doAnalysis(print, verbose);\n } catch(IOException ioe) {\n System.err.println(\"\\n\\nError:\\n\\t\" + ioe.getMessage() + \"\\n\");\n ioe.printStackTrace();\n }\n }",
"public static void main(String[] args) throws Exception {\n\n PdfBookPolisher polisher = new PdfBookPolisher();\n\n CmdLineParser parser = new CmdLineParser(polisher);\n\n\n try {\n parser.parseArgument(args);\n polisher.run();\n } catch (CmdLineException e) {\n // handling of wrong arguments\n System.err.println(e.getMessage());\n parser.printUsage(System.err);\n }\n\n }",
"public NFA(String fn){readMachineDescription(new File(fn));}",
"public static void main(String[] args) {\n\n // create initial board from file\n In in = new In(args[0]);\n int n = in.readInt();\n int[][] tiles = new int[n][n];\n for (int i = 0; i < n; i++)\n for (int j = 0; j < n; j++)\n tiles[i][j] = in.readInt();\n Board initial = new Board(tiles);\n // solve the puzzle\n\n Solver solver = new Solver(initial);\n\n\n // print solution to standard output\n\n if (!solver.isSolvable())\n StdOut.println(\"No solution possible\");\n else {\n StdOut.println(\"Minimum number of moves = \" + solver.moves());\n for (Board board : solver.solution())\n StdOut.println(board);\n }\n }",
"public static void main(String[] args) {\n\r\n\t\ttry{\r\n\t\t\tString tac2008Path = \"C:/Users/jipeng/Desktop/Qiang/updateSum/TAC2008_Update_Summarization_Documents/UpdateSumm08_test_docs_files\";\r\n\t\t\tExtractPrag ep = new ExtractPrag();\r\n\t\t\t\r\n\t\t\t//String wordPath = \"\";\r\n\t\t\t//ep.extractWords(wordPath)\r\n\t\t\tep.allDataset(tac2008Path);\r\n\t\t\t\r\n\t\t}catch(Exception e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"public static void main(String[] args) throws IOException {\n readCandidateName(\"/Users/macos/stv/Ballet/src/candidates.txt\");\n printCandidates();\n arrangeVoteStructure();\n outputVotes();\n System.out.println(\"Please enter the vote preference as a sequence: > \");\n }",
"String prepareFile();",
"public static void main(String[] args) {\n\t\treadGL_Top(Jaccard.outputPath+\"Jaccard_GL_MinDegree2.txt\", movieTitleTXT, 100, Jaccard.outputPath+\"Jaccard_GL_MinDegree2Top100.txt\");\r\n\t\t\r\n\t\t\r\n\r\n\t}",
"public static void main(String[] args) throws IOException {\n\t\tString FinalContigWritePath = args[0];\n\t\tString ContigAfterPath = args[1];\n\t\tString DataName = args[2];\n\t\tString RealString = CommonClass.readContigFile(ContigAfterPath);\n\t\t//Write.\n\t\tFileWriter writer1 = new FileWriter(FinalContigWritePath + \"contig.\" + DataName + \".changgeLines.fa\", true);\n\t\twriter1.write(RealString);\n\t\twriter1.close();\n\t\tSystem.out.println(\"File write process end!\");\n\t}",
"public static void main(String[] args) {\n\t\tString configFileName = args[0];\r\n\t\tScanner input = new Scanner(System.in);\r\n\t\t// Read File\r\n\t\tRIP_v2 reader = new RIP_v2();\r\n\t\treader.readFile(configFileName);\r\n\t}",
"public static void main(String[] args) throws Exception {\n File file = new File(\"src/main/resources/2017/oversizedpancakeflipper/A-large.in\");\n try (BufferedReader br = new BufferedReader(new FileReader(file))) {\n Scanner scanner = new Scanner(br);\n int testCases = scanner.nextInt();\n for (int t = 1; t <= testCases; t++) {\n char[] pancakes = scanner.next().toCharArray();\n int k = scanner.nextInt();\n System.out.println(String.format(\"Case #%d: %s\", t, pancakeFlipper(pancakes, k)));\n }\n }\n }",
"public static void main(String[] args) {\n String fileName = null;\n if (args.length >= 2) {\n // ignore [0] = \"-f\"\n fileName = args[1];\n }\n ArrayList<BigInteger> seq = (new BFileReader()).read(fileName);\n int index = 0;\n while (index < seq.size()) {\n System.out.println(index + \" \" + seq.get(index).toString());\n index ++;\n } // while index\n }",
"public static void main(String[] args) {\n try {\n readHouseTxt();\n } catch (ParseException e) {\n e.printStackTrace();\n }\n\n\n\n\n }",
"public Cartridge(String fileName) {\n\t\ttry {\n\t\t\tInputStream i = new FileInputStream(fileName);\n\t\t\tbyte[] header = new byte[16];\n\t\t\ti.read(header);\n\t\t\tif((header[6]&0x04)!=0) i.skip(512);\n\t\t\tnMapperID = (byte) ((((header[7]&0xFF)>>4)<<4)|((header[6]&0xFF)>>4));\n\t\t\tmirror = (header[6]&0x01)!=0;\n\t\t\tint nFileType = 1;\n\t\t\tif(nFileType==0) {\n\t\t\t\t\n\t\t\t}\n\t\t\tif(nFileType==1) {\n\t\t\t\tnPRGBanks = header[4];\n\t\t\t\tvPRGMemory = new byte[nPRGBanks*16384];\n\t\t\t\ti.read(vPRGMemory);\n\t\t\t\tnCHRBanks = header[5];\n\t\t\t\tvCHRMemory = new byte[nCHRBanks>0?nCHRBanks*8192:8192];\n\t\t\t\ti.read(vCHRMemory);\n\t\t\t}\n\t\t\tif(nFileType==2) {\n\t\t\t\t\n\t\t\t}\n\t\t\tswitch(nMapperID&0xFF) {\n\t\t\tcase 0: mapper = new Mapper000(nPRGBanks,nCHRBanks);break;\n\t\t\t}\n\t\t\ti.close();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\timageValid = true;\n\t}",
"public static void main(final String[] args) {\n\n // create initial board from file\n In in = new In(args[0]);\n int n = in.readInt();\n int[][] blocks = new int[n][n];\n for (int i = 0; i < n; i++) {\n for (int j = 0; j < n; j++) {\n blocks[i][j] = in.readInt();\n }\n }\n Board initial = new Board(blocks);\n\n // solve the puzzle\n Solver solver = new Solver(initial);\n\n // print solution to standard output\n if (!solver.isSolvable()) {\n StdOut.println(\"No solution possible\");\n } else {\n for (Board board : solver.solution()) {\n StdOut.println(board);\n }\n StdOut.println(\"Minimum number of moves = \" + solver.moves());\n }\n }",
"public static void main(String[] args){\r\n try {\r\n AnalizadorSintactico asin = new AnalizadorSintactico(\r\n new AnalizadorLexico( new FileReader(args[0])));\r\n Object result = asin.parse().value;\r\n System.out.println(\"\\n*** Resultados finales ***\");\r\n } catch (Exception ex) {\r\n ex.printStackTrace();\r\n }\r\n }"
] | [
"0.5397731",
"0.5278813",
"0.52267253",
"0.5217128",
"0.5204804",
"0.52012235",
"0.5194784",
"0.5178662",
"0.5171739",
"0.5162081",
"0.5160774",
"0.5160123",
"0.51598513",
"0.5142416",
"0.5118286",
"0.51010627",
"0.50934285",
"0.5087436",
"0.5080824",
"0.50777173",
"0.50639933",
"0.50556505",
"0.5054613",
"0.5046744",
"0.50457287",
"0.5043624",
"0.50364506",
"0.50232035",
"0.502234",
"0.50221664",
"0.50180644",
"0.5017363",
"0.50007874",
"0.49997467",
"0.49954253",
"0.49879974",
"0.49860144",
"0.49818745",
"0.4978187",
"0.497564",
"0.49694574",
"0.4956864",
"0.49494752",
"0.49460363",
"0.49356872",
"0.4932956",
"0.4919186",
"0.49168772",
"0.49099928",
"0.4896267",
"0.4896235",
"0.4895147",
"0.48838753",
"0.4882845",
"0.48782915",
"0.48697287",
"0.48615813",
"0.48589465",
"0.48545322",
"0.48539415",
"0.48531777",
"0.4850159",
"0.48461923",
"0.4844298",
"0.4841221",
"0.48365813",
"0.48317856",
"0.48281023",
"0.48227942",
"0.48219422",
"0.48194334",
"0.481775",
"0.48121765",
"0.4811978",
"0.48108828",
"0.48043284",
"0.48002192",
"0.4799087",
"0.47967237",
"0.47837198",
"0.47781974",
"0.47718385",
"0.4770592",
"0.47681922",
"0.476766",
"0.47664812",
"0.47644275",
"0.47607446",
"0.4751203",
"0.4749031",
"0.4748567",
"0.47443205",
"0.47369412",
"0.47325656",
"0.47311315",
"0.47303805",
"0.4726972",
"0.4723889",
"0.47200936",
"0.47190228",
"0.47183982"
] | 0.0 | -1 |
Runs the main gui with the parameters passed via the commandline | @Override
public void start(Stage theStage) throws IOException {
IntCodeGame game = new IntCodeGame(theStage);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void main(String[] args) {\n\t// Execute The GUI\n new GUI();\n GUI.panel();\n }",
"public static void main(String[] args) {\n\t\tshowGUI();\n\t}",
"public static void main(String[] args) {\r\n\t\tgui g=new gui();\r\n\t\tg.buildGui();\r\n\r\n\t}",
"public static void main(String[] args) { \n \t//creates a new StudyGui and runs it\n \tnew StudyGui().run();\n }",
"public static void main(String[] args) {\n\t\tjavax.swing.SwingUtilities.invokeLater(new Runnable() {\r\n\t\t\tpublic void run() {\r\n\t\t\t\tdisplayGUI();\r\n\t\t\t}\r\n\t\t});\r\n\t}",
"public static void main(String[] args) {\n initiateGui();\n if (args.length == 1) {\n field.setText(args[0]);\n readFromFileToTextArea();\n }\n // TODO Keyboard shortcuts\n // TODO Open recent\n // TODO Menu structure\n // TODO Write tests\n // TODO Set up CI/CD\n }",
"public static void main(String[] args) {\n\t\tGUI.initGUI();\n\t}",
"public static void main(String[] args) {\n GUIBase mainFrame = new GUIBase();\n mainFrame.DisplayGUI();\n GUIModel mainPanel = new GUIModel();\n mainPanel.addEventHandlers(mainFrame.getFrame());\n GUIHelper.SetDisplay(mainFrame.getFrame(), mainPanel.getContentPanel(), \"Cash For Metals Calculator\");\n }",
"public static void main(String[] args) {\n Frame testFrame = new MyGUIProgram();\n testFrame.setVisible(true);\n \n }",
"public static void main(String[] args)\r\n {\r\n // run program\r\n GUI gui = new GUI();\r\n gui.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n gui.setSize(300, 300);\r\n gui.setVisible(true);\r\n }",
"public static void main(String[] args) {\n\t\tjavax.swing.SwingUtilities.invokeLater(new Runnable() {\n\t\t\tpublic void run() {\n\t\t\t\tcreateAndShowGUI();\n\t\t\t}\n\t\t});\n\t}",
"public static void main(String[] args) {\n\t\tjavax.swing.SwingUtilities.invokeLater(new Runnable() {\n\t\t\tpublic void run() {\n\t\t\t\tcreateAndShowGUI();\n\t\t\t}\n\t\t});\n\t}",
"public static void main(String[] args) {\n\t\tjavax.swing.SwingUtilities.invokeLater(new Runnable() {\n\t\t\tpublic void run() {\n\t\t\t\tcreateAndShowGUI();\n\t\t\t}\n\t\t});\n\t}",
"public static void main(String[] args) {\n\t\tjavax.swing.SwingUtilities.invokeLater(new Runnable() {\n\t\t\tpublic void run() {\n\t\t\t\tcreateAndShowGUI();\n\t\t\t}\n\t\t});\n\t}",
"public static void main(String[] args) {\n\t\tGUI gui = new GUI();\n\t gui.setVisible(true);\n\t}",
"public static void main(String[] args) {\n\t\tjavax.swing.SwingUtilities.invokeLater(new Runnable() {\r\n\t\t\tpublic void run() {\r\n\t\t\t\tcreateAndShowGUI();\r\n\t\t\t}\r\n\t\t});\r\n\t}",
"public static void main(String[] args) {\n SwingUtilities.invokeLater(new Runnable() {\n public void run() {\n createAndShowGUI();\n }\n });\n\n }",
"public static void main(String argv[]) {\n String infile = DATA_FILE;\n String label = \"name\";\n\n if ( argv.length > 1 ) {\n infile = argv[0];\n label = argv[1];\n }\n\n UILib.setAlloyLookAndFeel();\n\n JFrame frame = new JFrame(\"NCMS - Routing Topology\");\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n frame.setContentPane(demo(infile, label));\n\n frame.pack();\n frame.setVisible(true);\n }",
"public static void main(String[] args)\n\t{\n\t\tgo = new GUI();\n\t\tgo.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tgo.setExtendedState(JFrame.MAXIMIZED_BOTH); // Method to make auto-full screen\n\n\t\tgo.setVisible(true); // Basic frame stuff\n\t\tgo.init();\n\t\tr = new Runner();\n\t}",
"public static void main(String[] args) {\n\t\tinicialitzarGUI();\r\n\t\tviewtable();\r\n\t}",
"public static void main(String[] args) {\n SwingUtilities.invokeLater(new Runnable() {\n public void run() {\n createAndShowGUI();\n }\n });\n }",
"public static void main(String[] args) {\n\t\tjavax.swing.SwingUtilities.invokeLater(\n\t\t\tnew Runnable() {\n\t\t\t\tpublic void run() {\n\t\t\t\t\tcreateAndShowGUI();\n\t\t\t\t}\n\t\t\t});\n\t}",
"public static void main(String[] args)\r\n {\r\n GUI_Interface gui = new GUI_Interface();\r\n gui.setVisible(true);\r\n\r\n }",
"public static void main(String[] args) {\n SwingUtilities.invokeLater(new Runnable() {\n\n @Override\n public void run() {\n createAndShowGui();\n }\n\n });\n \n }",
"public static void main(String[] args) {\n javax.swing.SwingUtilities.invokeLater(new Runnable() {\n public void run() {\n createAndShowGUI(); \n }\n });\n }",
"public static void main(String[] args){\n ConfigurationAppGUI gui = new ConfigurationAppGUI();\n }",
"public static void main(String[] args) {\n\t\t// Run GUI codes in the Event-Dispatching thread for thread safety\n\t\tSwingUtilities.invokeLater(new Runnable() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n//\t\t\t\tScanner sc = new Scanner(System.in);\n//\t\t\t\tSystem.out.println(\"Enter options in a single String. Options are as follows:\\n\"\n//\t\t\t\t\t\t+ \"======================================================================================\\n\"\n//\t\t\t\t\t\t+ \"S : Single Player Mode (default mode is 2-player mode)\\n\"\n//\t\t\t\t\t\t+ \"T : Enables a special Tutorial Mode (and disables all the other settings)\\n\"\n//\t\t\t\t\t\t+ \"00 : Player(s) always start at room (0,0) (default starting room is chosen at random)\\n\"\n//\t\t\t\t\t\t+ \"A1: Aggressive Mode is ON for Player 1 (default is OFF)\\n\"\n//\t\t\t\t\t\t+ \"A2: Aggressive Mode is ON for Player 2 (default is OFF)\\n\"\n//\t\t\t\t\t\t+ \"(0% - 100%) : the % of time that the AI robot will act randomly for one time-step\\n\"\n//\t\t\t\t\t\t+ \"H, R, or B: Human manual control only, Robot AI only, or Both\\n\"\n//\t\t\t\t\t\t+ \"======================================================================================\\n\"\n//\t\t\t\t\t\t+ \"For example, if you want a single-player mission, random starting room, and aggressive mode,\\n\"\n//\t\t\t\t\t\t+ \"where the robot acts randomly 10% of the time, and AI mode only is enabled,\\n\"\n//\t\t\t\t\t\t+ \"then type the following: S A1 10% R\");\n//\t\t\t\tString options = sc.nextLine();\n//\t\t\t\tsc.close();\n//\t\t\t\tSystem.out.println(\"Now loading mission. Please wait...\");\n//\t\t\t\tnew SAR(options, \"Robot 1\", \"Robot 2\");\n\n\t\t\t\t//Tutorial / Experiment mode.\n\t\t\t\tnew SAR(\"T00 0%B\", \"Robot\", \"N/A\");\n\t\t\t}\n\t\t});\n\t}",
"public static void main(String[] args)\n { \n // Begin program loop\n SwingUtilities.invokeLater(new Runnable() {\n @Override\n public void run() {\n GUIbrain gui = new GUIbrain();\n }\n });\n }",
"public static void main(String args[]) {\n\t\tSwingUtilities.invokeLater(new Runnable() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tcreateAndShowGUI(new SimplePatternDemonstrator());\n\t\t\t}\n\t\t});\n\t}",
"public static void main(final String[] theArgs) {\r\n setLookAndFeel();\r\n EventQueue.invokeLater(new Runnable() {\r\n @Override\r\n public void run() {\r\n new GUI().start(); \r\n }\r\n });\r\n }",
"public static void main(String[] args){\n // Creates an instance of our program\n Main gui = new Main();\n // Lets the computer know to start it in the event thread\n SwingUtilities.invokeLater(gui);\n }",
"public static void main(String[] args) {\r\n\t\tnew WumpusGUI().setVisible(true);\r\n\t}",
"public static void main(String[] args) {\n javax.swing.SwingUtilities.invokeLater(new Runnable() {\n public void run() {\n createAndShowGUI();\n }\n });\n }",
"public static void main(String[] args) {\n javax.swing.SwingUtilities.invokeLater(new Runnable() {\n public void run() {\n createAndShowGUI();\n }\n });\n }",
"public static void main(String[] args) {\n javax.swing.SwingUtilities.invokeLater(new Runnable() {\n public void run() {\n createAndShowGUI();\n }\n });\n }",
"public static void main(String[] args) {\n javax.swing.SwingUtilities.invokeLater(new Runnable() {\n public void run() {\n createAndShowGUI();\n }\n });\n }",
"public static void main(String[] args) {\n javax.swing.SwingUtilities.invokeLater(new Runnable() {\r\n public void run() {\r\n createAndShowGUI();\r\n }\r\n });\r\n }",
"public static void main(String[] args) {\n MUI mg = MUI.getInstance();\n mg.setVisible(true);\n }",
"public static void main(String[] args) {\n javax.swing.SwingUtilities.invokeLater(new Runnable() {\r\n public void run() {\r\n createAndShowGUI();\r\n }\r\n });\r\n }",
"public static void main(String[] args) {\n javax.swing.SwingUtilities.invokeLater(new Runnable() {\r\n public void run() {\r\n createAndShowGUI();\r\n }\r\n });\r\n }",
"public static void main(String[] args){\n \tCryptographyGUI gui = new CryptographyGUI();\n \tgui.go();\n \n }",
"public static void main(String[] args) {\n\t javax.swing.SwingUtilities.invokeLater(new Runnable() {\n\t public void run() {\n\t createAndShowGUI();\n\t }\n\t });\n\t }",
"public static void main(String[] args) {\n javax.swing.SwingUtilities.invokeLater(new Runnable() {\n public void run() {\n createAndShowGUI();\n }\n });\n }",
"public static void main(String[] args) {\n new GuiTest();\n }",
"public static void main(String[] args) {\n\t\tEventQueue.invokeLater(new Runnable() {\n\t\t\tpublic void run() {\n\t\t\t\ttry {\n\t\t\t\t\tServerwizard window = new Serverwizard();\n\t\t\t\t\twindow.frmManualTesting.setVisible(true);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}",
"public static void main(String[] args) {\n\n UIController.getInstance().setMain(new SelectionMenuUI());\n UIController.getInstance().startUI();\n\n }",
"public static void main(String[] args) {\n\t\tEventQueue.invokeLater(new Runnable() {\n\t\t\tpublic void run() {\n\t\t\t\ttry {\n\t\t\t\t\tCrapsGUI window = new CrapsGUI();\n\t\t\t\t\twindow.frame.setVisible(true);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}",
"public static void main(String[] args) {\n\t\tEventQueue.invokeLater(new Runnable() {\n\t\t\tpublic void run() {\n\t\t\t\ttry {\n\t\t\t\t\tLibraryGUI window = new LibraryGUI();\n\t\t\t\t\twindow.frmLibraryManagementSystem.setLocationRelativeTo(null);\n\t\t\t\t\twindow.frmLibraryManagementSystem.setVisible(true);\n\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}",
"public static void main(String[] args) {\n\t\tEventQueue.invokeLater(new Runnable() {\n\t\t\tpublic void run() {\n\t\t\t\ttry {\n\t\t\t\t\tLottoGUI frame = new LottoGUI();\n\t\t\t\t\tframe.setVisible(true);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}",
"public static void main(String[] args) {\n GUI gui = new GUI();\n while(gui.isVisible()) {\n Time.sleep(100);\n }\n }",
"public static void main(String[] args) \n {\n javax.swing.SwingUtilities.invokeLater(new Runnable() {\n public void run() {\n createAndShowGUI();\n }\n });\n }",
"public static void main(String[] args)\n\t{\n\t\tjavax.swing.SwingUtilities.invokeLater(new Runnable() {\n\t\t\tpublic void run() {\n\t\t\t\tcreateAndShowGUI();\n\t\t\t}\n\t\t});\n\n\t}",
"public static void main(String[] args) {\r\n\t\tProgProjGUI display = new ProgProjGUI();\r\n\t\tdisplay.setVisible(true);\r\n\t\t\r\n\t\t\r\n\t}",
"public static void main(String[] args) {\n EventQueue.invokeLater(new Runnable() {\n public void run() {\n try {\n GUI window = new GUI();\n window.frame.setVisible(true);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n });\n }",
"public static void main(String[] args) {\n javax.swing.SwingUtilities.invokeLater(new Runnable() {\n public void run() {\n createAndShowGUI();\n }\n });\n }",
"public static void main(String args[]) throws IOException {\n GUI app = new GUI();\n }",
"public static void main(String[] args) {\n\t\tGiaiPhuongTrinhbac1 myUI = new GiaiPhuongTrinhbac1(\"mbhvhvv\");\n\t\tmyUI.showWindow();\n\n\t}",
"public static void main(String[] args) {\n\t\tsetupUI.createMainFrame();\n\t\tmainUI MUI = new mainUI();\n\t\tMUI.initialize();\n\t}",
"public static void main(String[] args) {\n Praktikum_3 gui = new Praktikum_3();\n gui.objek();\n }",
"public static void main(String[] args) {\n\n java.awt.EventQueue.invokeLater(new Runnable() {\n public void run() {\n CommonsHR.setEye(new Point3d(1.35, 1.35, 2.0));\n new CommonsHR.MyGUI(createScene(), \"HR's Lab3\");\n }\n });\n }",
"public static void main(String[] args) {\n\n console(\"main...\");\n autoGrader = new AutoGrader2();\n\n console(\"launching...\");\n //---------- start the GUI ----------\n launch(args);\n\n //---------- Commit the AG options to the JSON file ----------\n autoGrader.saveConfiguration();\n\n console(\"Exiting main()...\");\n }",
"public static void main(String[] args) {\n\tArrayList<Dhb> dhb = new ArrayList<Dhb>();\n\tUtilities.load(dhb);\n\t\n\tProjectFrame gui = new ProjectFrame (dhb);\n\tgui.setVisible(true);\n\n\t}",
"public static void main(String[] args) {\n\t\tjavax.swing.SwingUtilities.invokeLater(new Runnable() {\r\n\t\t\tpublic void run() {\r\n\r\n\t\t\t\ttry {\r\n\t\t\t\t\tiniValues = new Properties();\r\n\t\t\t\t\t// FileInputStream fis = new\r\n\t\t\t\t\t// FileInputStream(\"Capture977R.params.xml\");\r\n\t\t\t\t\t// iniValues.loadFromXML(fis);\r\n\r\n\t\t\t\t\tSystem.out.println(PARAMS_XML);\r\n\t\t\t\t\tInputStream XMLstream = getClass().getResourceAsStream(\r\n\t\t\t\t\t\t\tPARAMS_XML);\r\n\t\t\t\t\tif (XMLstream == null) {\r\n\t\t\t\t\t\tthrow new FileNotFoundException(\r\n\t\t\t\t\t\t\t\t\"No se ha encontrado el fichero en el JAR \"\r\n\t\t\t\t\t\t\t\t\t\t+ \":\" + PARAMS_XML);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tiniValues.loadFromXML(XMLstream);\r\n\r\n\t\t\t\t\tcreateAndShowGUI();\r\n\t\t\t\t} catch (FileNotFoundException e) {\r\n\t\t\t\t\tSystem.err.println(e.getMessage());\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t} catch (InvalidPropertiesFormatException e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t}",
"public static void main(String[] args) {\n\t\tEventQueue.invokeLater(new Runnable() {\n\t\t\tpublic void run() {\n\t\t\t\ttry {\n\t\t\t\t\tGuiStart2 start = new GuiStart2();\n\t\t\t\t\tstart.setVisible(true);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}",
"public static void main(String[] args) {\n GuiDTC.start();\r\n GuiInput.start();\r\n }",
"public static void main(String[] args) {\n javax.swing.SwingUtilities.invokeLater(new Runnable() {\r\n public void run() {\r\n createAndShowGUI();\r\n }\r\n });\r\n }",
"public static void main(String[] args) {\n javax.swing.SwingUtilities.invokeLater(new Runnable() {\r\n public void run() {\r\n createAndShowGUI();\r\n }\r\n });\r\n }",
"public static void main(String[] args) {\n showWindow();\r\n\t}",
"public static void main(String[] args) {\n\t\tEventQueue.invokeLater(new Runnable() {\n\t\t\tpublic void run() {\n\t\t\t\ttry {\n\t\t\t\t\tGameGomokuGUI frame = new GameGomokuGUI();\n\t\t\t\t\tframe.setVisible(true);\n\t\t\t\t\t//frame.repaint();\t//Tell me if this stops you from needing to drag GUI down to see jpanel\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}",
"public static void main(String[] args)\n\t{\n\t\t//start the driver\n\t\tGUIDriver guiDriver = new GUIDriver();\n\t}",
"public static void main(String[] args){\n // Creates an instance of our program\n Main gui = new Main();\n // Lets the computer know to start it in the event thread\n SwingUtilities.invokeLater(gui);\n }",
"public static void main(String[] args) {\n\t\tEventQueue.invokeLater(new Runnable() {\n\t\t\tpublic void run() {\n\t\t\t\ttry {\n\t\t\t\t\tif(args.length>0)\n\t\t\t\t\t{\n\t\t\t\t\tcurrentUEmail[0]=args[0];\n\t\t\t\t\tcurrentUEmail[1]=args[1];\n\t\t\t\t\tusertype=args[1];\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(\"DG Email : \"+currentUEmail[0]);\n\t\t\t\t\tSystem.out.println(\"DG Type : \"+currentUEmail[1]);\n\t\t\t\t\tDietGUI window = new DietGUI();\n\t\t\t\t\twindow.frame.setVisible(true);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}",
"public static void main(String[] args) {\n\t\tMainGUI mainGUI = new MainGUI();\n\t\tmainGUI.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tmainGUI.setSize(800, 600);\n\t\tmainGUI.setVisible(true);\n\t}",
"public static void main(String[] args) {\r\n\r\n SwingUtilities.invokeLater(new Runnable() {\r\n\r\n public void run() {\r\n new KolkoIKrzyzykGUI();\r\n }\r\n });\r\n }",
"public SysRunGUI() {\n initComponents();\n this.run();\n }",
"public static void main(String[] args) {\r\n\t\tjavax.swing.SwingUtilities.invokeLater(new Runnable() {\r\n\r\n\t\t\tpublic void run() {\r\n\t\t\t\tcom.luxsoft.siipap.swing.utils.SWExtUIManager.setup();\r\n\t\t\t\tshowObject(showForm());\r\n\t\t\t\tSystem.exit(0);\r\n\t\t\t}\r\n\r\n\t\t});\r\n\t}",
"public static void main(String[] args) {\n\t\tfinal ChampionSelectGUI t = new ChampionSelectGUI();\n\t\tt.setSize(1280, 780);\n\t\tt.setTitle(\"Champion Select GUI v 1.0\");\n\t\tt.setLocationRelativeTo(null);\n\t\tgetDataWithDialogs(t);\n\t\tString summonerName = t.summNameArr[0];\n\t\tsummonerName = stripName(summonerName);\n\t\tString region = t.regionArr[0];\n\t\tString role = t.roleArr[0];\n\t\tboolean blueSide = t.teamArr[0];\n\t\tHashMap<String, Double> userData = Helpers.loadUserData(summonerName, region);\t\t\n\t\tHashMap<String, Double> globalData = Helpers.loadGlobalData(region);\n\t\tif (userData == null) {\n\t \tint ret = JOptionPane.showConfirmDialog(t, \"Unable to load data for user. Would you like to download now?\", \"Choose an option\", JOptionPane.YES_NO_OPTION);\n\t\t\tif (ret == 0) {\n\t\t\t\tuserData = ChampStatisticReader.collectUserStatistics(summonerName, region, MINIMUM_USER_GAMES);\n\t\t\t} else {\n\t\t\t\tJOptionPane.showMessageDialog(t, \"Cannot continue without data. Exiting\", \"Error\", JOptionPane.ERROR_MESSAGE);\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t}\n\t\tif (globalData == null) {\n\t\t\tint ret = JOptionPane.showConfirmDialog(t, \"Unable to load data for region. Would you like to download now?\", \"Choose an option\", JOptionPane.YES_NO_OPTION);\n\t\t\tif (ret == 0) {\n\t\t\t\tglobalData = ChampStatisticReader.collectGlobalStatistics(region);\n\t\t\t} else {\n\t\t\t\tJOptionPane.showMessageDialog(t, \"Cannot continue without data. Exiting\", \"Error\", JOptionPane.ERROR_MESSAGE);\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t}\n\t\tt.setVisible(true);\n\t t.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\n\t t.getChampionBans();\n\t t.getChampionPicks(blueSide);\n\t double maxScore = .5;\n\t String maxChamp = \"\";\n\t PriorityQueue<ScoredChampion> pq = new PriorityQueue<ScoredChampion>(X_RECOMMENDAITONS, new ScoredChampionComparator());\n\t ArrayList<String> roleChamps = new ArrayList<String>();\n\t try {\n\t\t Scanner input = new Scanner(ChampionSelectGUI.class.getResourceAsStream(\".coredata/roles/\" + role + \"champions.txt\"));\n\t\t while (input.hasNextLine()) {\n\t\t \troleChamps.add(input.nextLine().split(\"\\n\")[0]);\n\t\t }\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t ArrayList<String> allyList = null;\n\t ArrayList<String> enemyList = null;\n\t if (blueSide) {\n\t \tallyList = t.bluePicks;\n\t \tenemyList = t.purplePicks;\n\t } else {\n\t \tallyList = t.purplePicks;\n\t \tenemyList = t.bluePicks;\n\t }\n\t HashMap<String, History> allyHistMap = Helpers.loadHistMap(true);\n\t HashMap<String, History> enemyHistMap = Helpers.loadHistMap(false);\n\t if (allyHistMap == null || enemyHistMap == null) {\n\t \tJOptionPane.showMessageDialog(t, \"Unable to load data. Exiting\", \"Error\", JOptionPane.ERROR_MESSAGE);\n\t }\n\t for (String champion : roleChamps) {\n\t \tif (t.bannedChamps.contains(champion) || t.bluePicks.contains(champion) || t.purplePicks.contains(champion)) {\n\t \t\tcontinue;\n\t \t}\n \t\t ArrayList<History> allyHists = new ArrayList<History>();\n\t\t\t ArrayList<History> enemyHists = new ArrayList<History>();\n\t \tfor (String ally : allyList) {\n\t \t\tString allyKey = Helpers.combineAlphabetical(champion, combineName(ally));\n\t \t\tHistory allyHist = allyHistMap.get(allyKey);\n\t \t\tif (allyHist != null && ((allyHist.wins + allyHist.losses) > MINIMUM_GLOBAL_GAMES)) allyHists.add(allyHist);\n\t \t}\n\t \tfor (String enemy : enemyList) {\n\t \t\tString enemyKey = champion + \",\" + combineName(enemy);\n\t \t\tHistory enemyHist = enemyHistMap.get(enemyKey);\n\t \t\tif (enemyHist != null && ((enemyHist.wins + enemyHist.losses) > MINIMUM_GLOBAL_GAMES)) {\n\t\t \t\tenemyHists.add(enemyHist);\n\t\t\t\t}\n\t \t}\n\t \tdouble score = Calculations.calculateWinMultiplier(allyHists, enemyHists, globalData.get(champion));\n\t \tif (userData.get(champion) != null) {\n\t \t\tscore = score * userData.get(champion)/globalData.get(champion);\n\t \t}\n\t \tScoredChampion currSC = new ScoredChampion(champion,score);\n\t \tif (pq.size() < X_RECOMMENDAITONS) {\n\t \t\tpq.add(currSC);\n\t \t} else {\n\t \t\tif (pq.peek().compareTo(currSC) < 0) {\n\t \t\t\tpq.poll();\n\t \t\t\tpq.add(currSC);\n\t \t\t}\n\t \t}\n\t \tif (score > maxScore) {\n\t \t\tmaxScore = score;\n\t \t\tmaxChamp = champion;\n\t \t}\n\t }\n\t if (maxChamp.equals(\"\")) {\n\t \tJOptionPane.showMessageDialog(t, \"Unable to recommend chamion based on data. Exiting\", \"Error\", JOptionPane.ERROR_MESSAGE);\n\t \tSystem.exit(0);\n\t }\n\t JOptionPane.showMessageDialog(t, pq, \"Recommendations\", JOptionPane.INFORMATION_MESSAGE);\n\t System.exit(0);\n\t}",
"public static void main(String[] args) {\r\n\t\tSwingUtilities.invokeLater(() -> {\r\n\t\t\tnew JVDraw().setVisible(true);\r\n\t\t});\r\n\t}",
"public static void main(String[] args) {\n\n CLInterface cli = new CLInterface();\n cli.start();\n\n GUInterface gui = new GUInterface();\n new Thread(gui).start();\n }",
"public static void main(String[] args) {\n \r\n Runnable doCreateAndShowGUI = new Runnable() {\r\n public void run() {\r\n createAndShowGUI();\r\n }\r\n };\r\n SwingUtilities.invokeLater(doCreateAndShowGUI);\r\n }",
"public static void main(String[] args) {\n\t\tnew GUI2();\r\n\t}",
"public static void main(String[] args) {\n\t\tnew PageUnitGUI();\n\t}",
"public static void main(String[] args) {\n\t\tnew VolvoGUI();\n\t\t//new CarGui();\n\t\t\n\t\t//Customer info = new Customer();\n\t\t\n\t\t//account = info.getAccount();\n\t}",
"public static void main(String[] args) {\n GUICliente inst = new GUICliente();\n inst.setVisible(true);\n }",
"public static void main(String[] args) {\n EventQueue.invokeLater(() -> {\n gui myGui = new gui();\n myGui.setVisible(true);\n });\n\n }",
"public static void main(String args[]) {\n try {\n for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {\n if (\"Nimbus\".equals(info.getName())) {\n javax.swing.UIManager.setLookAndFeel(info.getClassName());\n break;\n }\n }\n } catch (ClassNotFoundException ex) {\n java.util.logging.Logger.getLogger(MainView.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (InstantiationException ex) {\n java.util.logging.Logger.getLogger(MainView.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (IllegalAccessException ex) {\n java.util.logging.Logger.getLogger(MainView.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (javax.swing.UnsupportedLookAndFeelException ex) {\n java.util.logging.Logger.getLogger(MainView.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n }\n //</editor-fold>\n\n /* Create and display the form */\n java.awt.EventQueue.invokeLater(new Runnable() {\n public void run() {\n new MainView().setVisible(true); \n }\n });\n }",
"public static void main(String[] args) {\r\n new FirstGUI();\r\n }",
"public static void main(String args[])\n {\n java.awt.EventQueue.invokeLater(new Runnable()\n {\n @Override\n public void run()\n {\n new GUI().setVisible(true);\n }\n });\n }",
"public static void main(String[] args) {\n SwingUtilities.invokeLater(new Runnable() {\n public void run() {\n //Turn off metal's use of bold fonts\n UIManager.put(\"swing.boldMetal\", Boolean.FALSE);\n\n createAndShowGUI();\n }\n });\n }",
"public static void main(String[] args) {\n ConfigUSettable configU = new ConfigUSettable();\r\n configU.ToStringSetUsingClassLinks(true);\r\n\r\n RunLayouterDemoSwingForm runner = new RunLayouterDemoSwingForm(configU);\r\n\r\n //start inside the swing runner framework\r\n runner.run();\r\n\r\n }",
"public static void main(String[] args) {\n\t\tSwingUtilities.invokeLater(new Runnable() {\r\n\t\t\tpublic void run() {\r\n\t\t\t\t// Turn off metal's use of bold fonts\r\n\t\t\t\tUIManager.put(\"swing.boldMetal\", Boolean.FALSE);\r\n\t\t\t\tcreateAndShowGUI();\r\n\t\t\t}\r\n\t\t});\r\n\t}",
"public static void main( String args[] ) {\r\n // This is the thread-safe way to initialize the GUI\r\n Runnable doRun = new Runnable() {\r\n public void run() { createAndShowGUI(); }\r\n };\r\n javax.swing.SwingUtilities.invokeLater( doRun );\r\n }",
"public static void main(String args[]){\n\t\t\n\t\tSwingUtilities.invokeLater(new Runnable(){\n\t\t\tpublic void run(){\n\t\t\t\tnew MainFrame();\n\t\t\t}\n\t\t});\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\tSwingUtilities.invokeLater(() -> {\n\t\t\tTreci jvdraw = new Treci();\n\t\t\tDimension d = jvdraw.getSize();\n\t\t\td.setSize(600, 400);\n\t\t\tjvdraw.setSize(d);\n\t\t\tjvdraw.setVisible(true);\n\t\t\t\n\t\t});\n\t}",
"public static void main(String[] args) {\n\t\tinput(new JFrame());\n\t\t\n\t}",
"public static void main(String[] args) {\r\n\t\tTextUI app = new TextUI();\r\n\t\t\r\n\t\tif (args.length > 0) {\r\n\t\t\tapp.processCommandSet(args);\r\n\t\t} else {\r\n\t\t\tapp.interactive();\r\n\t\t}\r\n\t}",
"public static void main(String[] args) {\n startServer();\n Application.launch(GUI.class, args);\n }",
"public static void main(String[] args) {\n EnergyData energyData = new EnergyData();\n GUIVerbrauchsdiagramm guiVerbrauchsdiagramm = new GUIVerbrauchsdiagramm(\n \"Stromzähler\", energyData);\n\n //guiVerbrauchsdiagramm.pack();\n UIUtils.centerFrameOnScreen(guiVerbrauchsdiagramm);\n guiVerbrauchsdiagramm.setVisible(true);\n\n }",
"public static void main(String[] args){\n\n EventQueue.invokeLater(() -> {\n GUI gui = new GUI();\n gui.setVisible(true);\n });\n }",
"public static void main(String[] args)\n {\n if(args.length < 2){\n System.out.println(\"Missing Arguments. Please Try Again\");\n System.exit(0);\n }\n else if(args.length > 2){\n System.out.println(\"Too many Arguments. Please Try Again\");\n System.exit(0);\n }\n\n serverIp = args[0];\n try {\n serverPort = Integer.parseInt(args[1]);\n }\n catch(NumberFormatException e){\n System.out.println(\"The port number must be an integer.\");\n System.exit(0);\n }\n\n try{\n Socket socket = new Socket(serverIp, serverPort);\n // Open GUI\n window = new MainWindow(socket);\n window.run();\n } catch (UnknownHostException e) {\n System.out.println(\"Unknown Host.\");\n System.exit(0);\n } catch (IOException e) {\n System.out.println(\"Connection Refused.\");\n System.exit(0);\n }\n }",
"public static void main(String[] args) {\n\t\tsIRC irc = new sIRC();\n\t\t\n\t\tirc.setVisible(true);\n\t\tirc.setDefaultCloseOperation(EXIT_ON_CLOSE);\n\t\toptions.createAndShowGUI();\n\t}"
] | [
"0.77637875",
"0.7561477",
"0.75258",
"0.74190336",
"0.73732805",
"0.736295",
"0.734784",
"0.7338592",
"0.7311638",
"0.7270145",
"0.72634625",
"0.72634625",
"0.72634625",
"0.72634625",
"0.72597474",
"0.72569907",
"0.7256798",
"0.7248787",
"0.72485185",
"0.72317743",
"0.7229547",
"0.72251683",
"0.72177786",
"0.7212216",
"0.72063595",
"0.7205825",
"0.71969974",
"0.7182816",
"0.71759266",
"0.7174345",
"0.7162284",
"0.7161638",
"0.71576875",
"0.71576875",
"0.71576875",
"0.71576875",
"0.71538115",
"0.71523225",
"0.7150578",
"0.7150578",
"0.71441495",
"0.71392125",
"0.7137077",
"0.7131381",
"0.7130802",
"0.7114709",
"0.7106733",
"0.7101472",
"0.7100203",
"0.7099539",
"0.70969105",
"0.7095052",
"0.7093343",
"0.7089268",
"0.708751",
"0.7078029",
"0.7072641",
"0.70725805",
"0.7063858",
"0.7061894",
"0.7046388",
"0.70385873",
"0.7035696",
"0.70320815",
"0.70317",
"0.7028264",
"0.7028264",
"0.70222664",
"0.70141596",
"0.7012946",
"0.7007538",
"0.70016646",
"0.70013076",
"0.69977075",
"0.69967645",
"0.69935733",
"0.698911",
"0.6982989",
"0.69736385",
"0.69678956",
"0.6966129",
"0.6960855",
"0.6956844",
"0.6945113",
"0.6941455",
"0.69334906",
"0.69305235",
"0.6926892",
"0.6926813",
"0.69229907",
"0.6921584",
"0.6917274",
"0.69164556",
"0.69127667",
"0.6909125",
"0.690578",
"0.6898005",
"0.68978566",
"0.68961674",
"0.6892017",
"0.6888225"
] | 0.0 | -1 |
Inflate the menu; this adds items to the action bar if it is present. | @Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.menu_main, menu);
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.actions, menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tgetMenuInflater().inflate(R.menu.actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.actions_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main_actions, menu);\n\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n\t\tinflater.inflate(R.menu.action_bar_menu, menu);\r\n\t\tmMenu = menu;\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.act_bar_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.main_actions, menu);\r\n\t\treturn true;\r\n //return super.onCreateOptionsMenu(menu);\r\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\r\n\t inflater.inflate(R.menu.action_bar_all, menu);\r\n\t return super.onCreateOptionsMenu(menu);\r\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\t super.onCreateOptionsMenu(menu);\n\t\tMenuInflater muu= getMenuInflater();\n\t\tmuu.inflate(R.menu.cool_menu, menu);\n\t\treturn true;\n\t\t\n\t\t\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.adventure_archive, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.archive_menu, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n \tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n \t\tinflater.inflate(R.menu.main, menu);\n \t\tsuper.onCreateOptionsMenu(menu, inflater);\n \t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.action_menu, menu);\n\t return super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater bow=getMenuInflater();\n\t\tbow.inflate(R.menu.menu, menu);\n\t\treturn true;\n\t\t}",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.action_menu, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\t\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\t\t\n\t\t/* Inflate the menu; this adds items to the action bar if it is present */\n\t\tgetMenuInflater().inflate(R.menu.act_main, menu);\t\t\n\t\treturn true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflate = getMenuInflater();\n inflate.inflate(R.menu.menu, ApplicationData.amvMenu.getMenu());\n return true;\n }",
"@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.menu, menu);\n\t\t\treturn true; \n\t\t\t\t\t\n\t\t}",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.main, menu);\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) \n {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_bar, menu);\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_item, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.menu, menu);\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.menu, menu);\n\t return super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.menu, menu);\n\t \n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\t//menu.clear();\n\t\tinflater.inflate(R.menu.soon_to_be, menu);\n\t\t//getActivity().getActionBar().show();\n\t\t//getActivity().getActionBar().setBackgroundDrawable(\n\t\t\t\t//new ColorDrawable(Color.rgb(223, 160, 23)));\n\t\t//return true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n this.getMenuInflater().inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.main, menu);\n }",
"@Override\n\tpublic void onCreateOptionsMenu( Menu menu, MenuInflater inflater )\n\t{\n\t\tsuper.onCreateOptionsMenu( menu, inflater );\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}",
"@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\r\n \t// We must call through to the base implementation.\r\n \tsuper.onCreateOptionsMenu(menu);\r\n \t\r\n MenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.main_menu, menu);\r\n\r\n return true;\r\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.inter_main, menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.action, menu);\n\t\treturn true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu (Menu menu){\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.custom_action_bar, menu);\n\t\treturn true;\n\t}",
"public void initMenubar() {\n\t\tremoveAll();\n\n\t\t// \"File\"\n\t\tfileMenu = new FileMenuD(app);\n\t\tadd(fileMenu);\n\n\t\t// \"Edit\"\n\t\teditMenu = new EditMenuD(app);\n\t\tadd(editMenu);\n\n\t\t// \"View\"\n\t\t// #3711 viewMenu = app.isApplet()? new ViewMenu(app, layout) : new\n\t\t// ViewMenuApplicationD(app, layout);\n\t\tviewMenu = new ViewMenuApplicationD(app, layout);\n\t\tadd(viewMenu);\n\n\t\t// \"Perspectives\"\n\t\t// if(!app.isApplet()) {\n\t\t// perspectivesMenu = new PerspectivesMenu(app, layout);\n\t\t// add(perspectivesMenu);\n\t\t// }\n\n\t\t// \"Options\"\n\t\toptionsMenu = new OptionsMenuD(app);\n\t\tadd(optionsMenu);\n\n\t\t// \"Tools\"\n\t\ttoolsMenu = new ToolsMenuD(app);\n\t\tadd(toolsMenu);\n\n\t\t// \"Window\"\n\t\twindowMenu = new WindowMenuD(app);\n\n\t\tadd(windowMenu);\n\n\t\t// \"Help\"\n\t\thelpMenu = new HelpMenuD(app);\n\t\tadd(helpMenu);\n\n\t\t// support for right-to-left languages\n\t\tapp.setComponentOrientation(this);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.listing, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp=getMenuInflater();\n\t\tblowUp.inflate(R.menu.welcome_menu, menu);\n\t\treturn true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.item, menu);\n return true;\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.resource, menu);\n\t\treturn true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu,menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.home_action_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.template, menu);\n\t\treturn true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n Log.d(\"onCreateOptionsMenu\", \"create menu\");\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.socket_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_menu, menu);//Menu Resource, Menu\n\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.actionbar, menu);\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(toolbar_res, menu);\n updateMenuItemsVisibility(menu);\n return true;\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t// \n\t\tMenuInflater mi = getMenuInflater();\n\t\tmi.inflate(R.menu.thumb_actv_menu, menu);\n\t\t\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n }",
"@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}",
"@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}",
"@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.swag_list_activity_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\n\t\treturn true;\n\t}",
"@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.jarvi, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"public void onCreateOptionsMenu(Menu menu, MenuInflater inflater){\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater menuInflater) {\n menuInflater.inflate(R.menu.main, menu);\n\n }",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.add__listing, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.actmain, menu);\r\n return true;\r\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.buat_menu, menu);\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.layout.menu, menu);\n\t\treturn true;\n\t}",
"@Override\npublic boolean onCreateOptionsMenu(Menu menu) {\n\n\t\n\t\n\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\n\treturn super.onCreateOptionsMenu(menu);\n}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.ichat, menu);\n\t\treturn true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater)\n\t{\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\tinflater.inflate(R.menu.expenses_menu, menu);\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.action_bar, menu);\n return true;\n }",
"@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}",
"@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}",
"@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp = getMenuInflater();\n\t\tblowUp.inflate(R.menu.status, menu);\n\t\treturn true;\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.menu, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn true;\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.ui_main, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_activity_actions, menu);\n return true;\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.menu_main, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.menu_main, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }"
] | [
"0.72461367",
"0.7201596",
"0.7195268",
"0.7177002",
"0.71069986",
"0.7039653",
"0.70384306",
"0.70115715",
"0.7010647",
"0.69803435",
"0.6945406",
"0.69389313",
"0.6933442",
"0.69172275",
"0.69172275",
"0.6890826",
"0.6883689",
"0.687515",
"0.6874831",
"0.68615955",
"0.68615955",
"0.68615955",
"0.68615955",
"0.68522274",
"0.6846375",
"0.68189865",
"0.68165565",
"0.68124795",
"0.6812267",
"0.6812267",
"0.68056566",
"0.6800461",
"0.6797465",
"0.6790805",
"0.6789039",
"0.6787885",
"0.6782993",
"0.67597246",
"0.67570525",
"0.6747535",
"0.6743268",
"0.6743268",
"0.6740546",
"0.67395175",
"0.67256093",
"0.6723954",
"0.6722248",
"0.6722248",
"0.6720444",
"0.67118156",
"0.6706721",
"0.6704184",
"0.66993994",
"0.66988564",
"0.669681",
"0.66943884",
"0.66860807",
"0.668306",
"0.668306",
"0.6682587",
"0.668012",
"0.6678661",
"0.6676379",
"0.6668044",
"0.66669863",
"0.66628903",
"0.6657356",
"0.6657356",
"0.6657356",
"0.66565585",
"0.665397",
"0.665397",
"0.665397",
"0.66525495",
"0.66518986",
"0.66496557",
"0.6648199",
"0.6646489",
"0.66462386",
"0.6646177",
"0.6645531",
"0.66453475",
"0.66446036",
"0.66438025",
"0.6642411",
"0.6641632",
"0.6638948",
"0.6634394",
"0.66336566",
"0.6632082",
"0.66315377",
"0.66315377",
"0.66315377",
"0.6628936",
"0.6627818",
"0.6627061",
"0.66256744",
"0.6623986",
"0.661993",
"0.6618369",
"0.6618369"
] | 0.0 | -1 |
Handle action bar item clicks here. The action bar will automatically handle clicks on the Home/Up button, so long as you specify a parent activity in AndroidManifest.xml. | @Override
public boolean onOptionsItemSelected(MenuItem item) {
int id = item.getItemId();
//noinspection SimplifiableIfStatement
if (id == R.id.advanced) {
return true;
}
return super.onOptionsItemSelected(item);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public boolean onOptionsItemSelected(MenuItem item) { Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n\n //\n // HANDLE BACK BUTTON\n //\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // Back button clicked\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // app icon in action bar clicked; goto parent activity.\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n switch (id) {\r\n case android.R.id.home:\r\n // app icon in action bar clicked; go home\r\n this.finish();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // app icon in action bar clicked; go home\n finish();\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n Log.e(\"clik\", \"action bar clicked\");\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n\t public boolean onOptionsItemSelected(MenuItem item) {\n\t int id = item.getItemId();\n\t \n\t\t\tif (id == android.R.id.home) {\n\t\t\t\t// Respond to the action bar's Up/Home button\n\t\t\t\t// NavUtils.navigateUpFromSameTask(this);\n\t\t\t\tonBackPressed();\n\t\t\t\treturn true;\n\t\t\t}\n\t \n\t \n\t return super.onOptionsItemSelected(item);\n\t }",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n switch (item.getItemId()) {\r\n // Respond to the action bar's Up/Home button\r\n case android.R.id.home:\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n\n switch (item.getItemId()) {\n case android.R.id.home:\n\n // app icon in action bar clicked; goto parent activity.\n this.finish();\n return true;\n default:\n\n return super.onOptionsItemSelected(item);\n\n }\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n\n switch (item.getItemId()) {\n case android.R.id.home:\n\n // app icon in action bar clicked; goto parent activity.\n this.finish();\n return true;\n default:\n\n return super.onOptionsItemSelected(item);\n\n }\n }",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tonBackPressed();\n\t\t\treturn true;\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Handle presses on the action bar items\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n case R.id.action_clear:\n return true;\n case R.id.action_done:\n\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n onActionHomePressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n switch (item.getItemId())\n {\n case android.R.id.home :\n super.onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId ()) {\n case android.R.id.home:\n onBackPressed ();\n return true;\n\n default:\n break;\n }\n return super.onOptionsItemSelected ( item );\n }",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t switch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\t// app icon in action bar clicked; go home \n\t\t\tIntent intent = new Intent(this, Kelutral.class); \n\t\t\tintent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); \n\t\t\tstartActivity(intent); \n\t\t\treturn true;\t\t\n\t case R.id.Search:\n\t \treturn onSearchRequested();\n\t\tcase R.id.AppInfo:\n\t\t\t// Place holder menu item\n\t\t\tIntent newIntent = new Intent(Intent.ACTION_VIEW,\n\t\t\t\t\tUri.parse(\"http://forum.learnnavi.org/mobile-apps/\"));\n\t\t\tstartActivity(newIntent);\n\t\t\treturn true;\n\t\tcase R.id.Preferences:\n\t\t\tnewIntent = new Intent(getBaseContext(), Preferences.class);\n\t\t\tstartActivity(newIntent);\n\t\t\treturn true;\t\n\t }\n\t return false;\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n\n case android.R.id.home:\n onBackPressed();\n return true;\n\n }\n return super.onOptionsItemSelected(item);\n\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // Intent homeIntent = new Intent(this, MainActivity.class);\n // homeIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n // startActivity(homeIntent);\n finish();\n return true;\n default:\n return (super.onOptionsItemSelected(item));\n }\n\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // setResult and close the activity when Action Bar Up Button clicked.\n if (item.getItemId() == android.R.id.home) {\n setResult(RESULT_CANCELED);\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // This ID represents the Home or Up button. In the case of this\n // activity, the Up button is shown. Use NavUtils to allow users\n // to navigate up one level in the application structure. For\n // more details, see the Navigation pattern on Android Design:\n //\n // http://developer.android.com/design/patterns/navigation.html#up-vs-back\n //\n \tgetActionBar().setDisplayHomeAsUpEnabled(false);\n \tgetFragmentManager().popBackStack();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n switch (item.getItemId()) {\n case android.R.id.home:\n super.onBackPressed();\n return true;\n\n default:\n // If we got here, the user's action was not recognized.\n // Invoke the superclass to handle it.\n return super.onOptionsItemSelected(item);\n\n }\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if(id == android.R.id.home){\n onBackPressed();\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n\n }\n\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@RequiresApi(api = Build.VERSION_CODES.M)\n @Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tif(item.getItemId()==android.R.id.home)\r\n\t\t{\r\n\t\t\tgetActivity().onBackPressed();\r\n\t\t}\r\n\t\treturn super.onOptionsItemSelected(item);\r\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if(item.getItemId()==android.R.id.home){\n super.onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n return false;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n //Back arrow\n case android.R.id.home:\n onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // android.R.id.home是Android内置home按钮的id\n finish();\n break;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n super.onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n this.onBackPressed();\n return false;\n }\n return false;\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n int id = item.getItemId();\n\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n switch (item.getItemId()) {\r\n\r\n case android.R.id.home:\r\n /*Intent i= new Intent(getApplication(), MainActivity.class);\r\n i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);\r\n startActivity(i);*/\r\n onBackPressed();\r\n finish();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id){\n case android.R.id.home:\n this.finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Pass the event to ActionBarDrawerToggle, if it returns\n // true, then it has handled the app icon touch event\n if (mDrawerToggle.onOptionsItemSelected(item)) {\n return true;\n }\n\n // Handle your other action bar items...\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n NavUtils.navigateUpFromSameTask(getActivity());\n return true;\n case R.id.action_settings:\n Intent i = new Intent(getActivity(), SettingsActivity.class);\n startActivity(i);\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n //Fixes the Up Button\n if(id == android.R.id.home) {\n BuildRoute.this.finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()){\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return true;\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n if (id == android.R.id.home) {\n NavUtils.navigateUpFromSameTask(this);\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\r\n case android.R.id.home:\r\n onBackPressed();\r\n break;\r\n }\r\n return true;\r\n }",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tif (item.getItemId() == android.R.id.home) {\n\t\t\tfinish();\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n onBackPressed();\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n if ( id == android.R.id.home ) {\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.home) {\r\n NavUtils.navigateUpFromSameTask(this);\r\n return true;\r\n }\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.action_about) {\r\n AboutDialog();\r\n return true;\r\n }\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.action_exit) {\r\n finish();\r\n return true;\r\n }\r\n\r\n\r\n return super.onOptionsItemSelected(item);\r\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n//noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n// finish the activity\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item)\n {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if( id == android.R.id.home ) // Back button of the actionbar\n {\n finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\r\n\t\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\t\tswitch (item.getItemId()) {\r\n\t\t\tcase android.R.id.home:\r\n\t\t\t\tfinish();\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\treturn super.onOptionsItemSelected(item);\r\n\t\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if (item.getItemId() == android.R.id.home) {\n onBackPressed();\n return true;\n }\n return false;\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n\n this.finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n if(id == android.R.id.home){\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\r\n\t\tcase android.R.id.home:\r\n\t\t\tsetResult(RESULT_OK, getIntent());\r\n\t\t\tfinish();\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\treturn true;\r\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n if (item.getItemId() == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n finish();\n return true;\n default:\n // If we got here, the user's action was not recognized.\n // Invoke the superclass to handle it.\n return super.onOptionsItemSelected(item);\n\n }\n }",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\tbreak;\n\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n\n case android.R.id.home:\n this.finish();\n return true;\n }\n return true;\n }",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tint id = item.getItemId();\n\t\tif (id == android.R.id.home) {\n\t\t\tfinish();\n\t\t\treturn true;\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n if (id == android.R.id.home) {\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n //NavUtils.navigateUpFromSameTask(this);\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // todo: goto back activity from here\n finish();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n // Handle item selection\r\n switch (item.getItemId()) {\r\n case android.R.id.home:\r\n onBackPressed();\r\n return true;\r\n\r\n case me.cchiang.lookforthings.R.id.action_sample:\r\n// Snackbar.make(parent_view, item.getTitle() + \" Clicked \", Snackbar.LENGTH_SHORT).show();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n\n\n }",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tonBackPressed();\n\t\t\treturn true;\n\t\tcase R.id.scan_menu:\n\t\t\tonScan();\n\t\t\tbreak;\n\t\tcase R.id.opt_about:\n\t\t\t//onAbout();\n\t\t\tbreak;\n\t\tcase R.id.opt_exit:\n\t\t\tfinish();\n\t\t\tbreak;\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t\treturn true;\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n super.onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n this.finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\n public boolean onOptionsItemSelected(@NonNull MenuItem item) {\n if (item.getItemId() == android.R.id.home) {\n onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n\n case android.R.id.home:\n finish();\n return true;\n\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if(id==android.R.id.home){\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\r\n\t switch (item.getItemId()) {\r\n\t \t// back to previous page\r\n\t case android.R.id.home:\r\n\t finish();\r\n\t return true;\r\n\t }\r\n\t return super.onOptionsItemSelected(item);\r\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == android.R.id.home) {\r\n // finish the activity\r\n onBackPressed();\r\n return true;\r\n }\r\n\r\n return super.onOptionsItemSelected(item);\r\n }",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == android.R.id.home) {\r\n // finish the activity\r\n onBackPressed();\r\n return true;\r\n }\r\n\r\n return super.onOptionsItemSelected(item);\r\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId())\n {\n case android.R.id.home:\n this.finish();\n return (true);\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id){\n case R.id.home:{\n NavUtils.navigateUpFromSameTask(this);\n return true;\n }\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n switch(item.getItemId())\n {\n case android.R.id.home:\n super.onBackPressed();\n break;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\treturn true;\n\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t}",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n\r\n int id = item.getItemId();\r\n if(id==android.R.id.home){\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }"
] | [
"0.7904035",
"0.78057915",
"0.77662706",
"0.7727266",
"0.76317817",
"0.76219225",
"0.7584542",
"0.7530336",
"0.7487623",
"0.7457442",
"0.7457442",
"0.7438915",
"0.7421425",
"0.7403424",
"0.73923",
"0.7387485",
"0.7379756",
"0.7370862",
"0.73622537",
"0.73564696",
"0.7345994",
"0.73419464",
"0.73299843",
"0.7327844",
"0.7326043",
"0.73197556",
"0.7317143",
"0.73140186",
"0.7304616",
"0.7304616",
"0.7302084",
"0.7298582",
"0.72940314",
"0.7287458",
"0.72837925",
"0.7281312",
"0.7279086",
"0.7260266",
"0.7260266",
"0.7260266",
"0.7259928",
"0.7259814",
"0.7250412",
"0.72233367",
"0.72201204",
"0.7218085",
"0.72047156",
"0.71999466",
"0.7198876",
"0.719304",
"0.71861094",
"0.7177511",
"0.71693677",
"0.7167732",
"0.7154041",
"0.71537524",
"0.71356887",
"0.7135142",
"0.7135142",
"0.71303266",
"0.71286845",
"0.7124354",
"0.71238357",
"0.71235263",
"0.71224594",
"0.71174574",
"0.71174574",
"0.71174574",
"0.71174574",
"0.71173346",
"0.7117265",
"0.7116576",
"0.71150905",
"0.7112618",
"0.71099126",
"0.7109077",
"0.71057403",
"0.71000075",
"0.70982087",
"0.70952326",
"0.7093795",
"0.7093795",
"0.708655",
"0.7082642",
"0.708111",
"0.7080437",
"0.707404",
"0.70684844",
"0.70619047",
"0.70604676",
"0.7060448",
"0.7051464",
"0.70378536",
"0.70378536",
"0.7036111",
"0.70355594",
"0.70355594",
"0.7032436",
"0.7031054",
"0.70297045",
"0.701964"
] | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public List<PriceListDTO> getCreatorsPricelists(Long id) {
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] | 0.0 | -1 |
Data Access Object (DAO) for Post | public interface IPostDao {
/**
* Identifies a post by id (primary key)
*
* @param id
* @return
*/
Post findById(int id);
/**
* Receives and saves the post to database
*
* @param post
*/
void savePost(Post post);
/**
* Find all Posts in the database
*
* @return
*/
List<Post> findAllPosts();
/**
* Find all Posts from a particular user name in the database
* @param userName
* @return
*/
List<Post> findPostsByUserName(String userName);
/**
* Deletes Post by looking up the id from database
* @param id
*/
void deletePostById(int id);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface ForumPostDao {\n\n List<ForumPostPO> getPostModels(int topic_id,int page, int page_size);\n\n ForumPostPO getPostModel(int id);\n\n int addPostModel(ForumPostPO post);\n\n int deletePostModels(int topic_id);\n\n int deletePostModel(int id);\n\n int updatePostModel(int id, ForumPostPO post);\n\n int getNumOfPosts(int topic_id);\n\n}",
"public void doPost( )\n {\n \n }",
"public interface RequestPramDao {\n void insert(RequestPram requestPram);\n}",
"public interface SafeDao {\n /**\n * 写入数据库\n */\n int insertData(@Param(\"state\") String state, @Param(\"temperature\") String temperature, @Param(\"heartrate\") String heartrate, @Param(\"longitude\") String longitude, @Param(\"latitude\") String latitude, @Param(\"updateDate\") Date updateDate);\n List<SafeEntity> getList();\n List<SafeEntity> getOne();\n\n}",
"public PostDao() {\n\t}",
"Post save(Post post) throws Exception;",
"@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n try {\r\n processRequest(request, response);\r\n } catch (DAOException ex) {\r\n Logger.getLogger(AutorPublicacionController.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }",
"public interface PostService {\n public ResultInfo addPost(PostVo postVo);\n\n public ResultInfo getPostById(Long id);\n\n public ResultInfo updatePost(PostVo postVo);\n\n public ResultInfo deletePostById(Long id);\n\n public Map share(Long id);\n\n}",
"Boolean save(PostSaveDTO postSaveDTO);",
"public void postData() {\n\n\t}",
"void savePost(Post post);",
"public interface RestaurantDao {\n\n /**\n * Get restaurant details for a restaurant\n * @param userName\n * @param password\n * @return\n */\n public RestaurantDetails getRestaurantDetails(String userName, String password);\n\n /**\n * Sign Up for a new restaurant\n * @param details\n * @return\n */\n public int signUp(RestaurantDetails details);\n\n /**\n * Update Restaurant Details\n * @param details\n * @return\n */\n public int updateDetails(RestaurantDetails details);\n}",
"public interface DAO<T> {\n T get(int ID);\n List<T> getAll();\n List<T> findByLastName(String string);\n boolean add(T t);\n boolean update(T t);\n boolean delete(T t);\n\n\n\n \n}",
"@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tMap<String, String[]> parameterMap =\n\t\t\t\treq.getParameterMap();\n\n\t\tUser u = new User();\n\t\ttry {\n\t\t\t//可以直接把map中的内容设置到对象上\n\t\t\tBeanUtils.populate(u,parameterMap);\n\n\t\t} catch (IllegalAccessException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (InvocationTargetException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n int insertUser = userDao.insertUser(u);\n if (insertUser==1){\n resp.getWriter().write(\"SUCCESS\");\n resp.setStatus(302);\n resp.sendRedirect(\"http://localhost:8080/TextRegister.html\");\n }else{\n RequestDispatcher dispatcher = req.getRequestDispatcher(\"/insert\");\n dispatcher.include(req,resp);\n }\n\n\n\t}",
"public interface DAO {\n\n\t/**\n\t * Dohvaća entry sa zadanim <code>id</code>-em. Ako takav entry ne postoji,\n\t * vraća <code>null</code>.\n\t * \n\t * @param id ključ zapisa\n\t * @return entry ili <code>null</code> ako entry ne postoji\n\t * @throws DAOException ako dođe do pogreške pri dohvatu podataka\n\t */\n\tpublic BlogEntry getBlogEntry(Long id) throws DAOException;\n\n\t/**\n\t * Returns true if nick exists.\n\t * \n\t * @param nick to check\n\t * @return true if nick exists\n\t * @throws DAOException\n\t */\n\tpublic boolean nickExists(String nick) throws DAOException;\n\n\t/**\n\t * Returns BlogUser with given nick. Null if such user doesn't exist\n\t * \n\t * @param nick Nick\n\t * @return BlogUser with given nick or Null if such user doesn't exist\n\t * @throws DAOException\n\t */\n\tpublic BlogUser getUserByNick(String nick) throws DAOException;\n\t\n//\tpublic List<BlogUser> getUsers();\n\t\n\t/**\n\t * Registers user with information given in form\n\t * \n\t * @param form Informations about user\n\t * @throws DAOException\n\t */\n\tpublic void registerUser(RegisterForm form) throws DAOException;\n\t\n\t/**\n\t * Registers user\n\t * \n\t * @param user to register\n\t * @throws DAOException\n\t */\n\tpublic void registerUser(BlogUser user) throws DAOException;\n\n\t/**\n\t * Returns list of all users\n\t * \n\t * @return list of all users\n\t * @throws DAOException\n\t */\n\tpublic List<BlogUser> getAllUsers() throws DAOException;\n\t\n\t/**\n\t * Adds blog\n\t * \n\t * @param blog to add\n \t * @throws DAOException\n\t */\n\tpublic void addBlog(BlogEntry blog) throws DAOException;\n\t\n\t\n\t/**\n\t * Returns email of user with nick, null if no such user exists\n\t * \n\t * @param nick of user\n\t * @return email of user with nick, null if no such user exists\n\t * @throws DAOException\n\t */\n\tpublic String getUserEmail(String nick) throws DAOException;\n\n\t/**\n\t * Adds comment with informations from CommentForm to BlogEntry blog\n\t * \n\t * @param blog in which comment is added\n\t * @param comment to add\n\t */\n\tpublic void addComment(BlogEntry blog, CommentForm comment);\n\n\t/**\n\t * Updates blog values from values in form\n\t * @param blog to change\n\t * @param form with new values\n\t */\n\tpublic void changeBlog(BlogEntry blog, BlogForm form);\n}",
"@Override\n\tprotected void doPost(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) throws ServletException, IOException\n\t{\n\t\tdoDebug(httpServletRequest);\n doSystemMethod(httpServletRequest, httpServletResponse, \"insert\");\n\t}",
"public interface CommentsDao {\n\n public List<Comment> getComments(Post post);\n\n}",
"protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\t\r\n\t\tString name=request.getParameter(\"name\");\r\n\t\tICustomerDAO dao=new CustomerDAO();\t\r\n\t\t\r\n\t\tCustomer customer=new Customer();\r\n\t\tcustomer.setName(name);\r\n\t\t\r\n\t\tdao.create(customer);\r\n\r\n\t\t\r\n\t\tRequestDispatcher vista=request.getRequestDispatcher(LIST_CUSTOMER);\r\n\t\trequest.setAttribute(\"customers\", dao.reader());\r\n\t\tvista.forward(request, response);\r\n\t}",
"@Override\n\tpublic Post createPost(Post post) {\n\t\treturn postDao.createPost(post);\n\t}",
"public interface PagoDAO \n{\n\tpublic List<Pago> findAll();\n\n public Pago findById(int id);\n\n public void save(Pago pago);\n}",
"@Override\n\tpublic void doPost(Request request, Response response) {\n\n\t}",
"void post(T modelDTO);",
"public interface Post {\n\n\tpublic Long getId();\n\n\tpublic void setId(Long id);\n\n\tpublic Date getDate();\n\n\tpublic void setDate(Date date);\n\n\tpublic String getMessage();\n\n\tpublic void setMessage(String message);\n\n}",
"public interface BlogDao {\n\n public Blog getBlogById(int id);\n\n public List<Blog> getAllBlog();\n\n public void createBlog(Blog blog);\n\n}",
"public interface modeloDAO {\n void insert(Object obj);\n void update(Object obj);\n void delete(Object obj);\n ArrayList<Object> get();\n}",
"public interface DeptDao {\n //动态查询\n @SelectProvider(type=DeptDynaSqlProvider.class,method = \"selectWithParam\")\n List<Dept> selectByPage(Map<String,Object> params);\n @SelectProvider(type=DeptDynaSqlProvider.class,method = \"count\")\n Integer count(Map<String,Object> params);\n @Select(\"select * from \"+DEPTTABLE+\" \")\n List<Dept> selectAllDept();\n @Select(\"select * from \"+DEPTTABLE+\" where id = #{id}\")\n Dept selectById(int id);\n @Delete(\"delete from \"+DEPTTABLE+\" where id = #{id}\")\n void deleteById(int id);\n //动态插入部门\n @InsertProvider(type=DeptDynaSqlProvider.class,method = \"insertDept\")\n void save(Dept dept);\n //动态修改部门\n @UpdateProvider(type=DeptDynaSqlProvider.class,method = \"updateDept\")\n void update(Dept dept);\n}",
"public interface ProductDAO {\n\n /**\n * Creates new product in DB\n *\n * @param product - DTO object representing new product\n * @return DTO representing persisted product or null if operation failed\n */\n Product postProduct(Product product);\n\n /**\n * Edits persisted product information\n *\n * @param product - DTO object representing persisted product\n * @return DTO representing persisted product or null if operation failed\n */\n Product editProduct(Product product);\n\n /**\n * Retrieves product by its ID\n * @param id - product`s id to retrieve\n * @return DTO representing persisted product\n */\n Product getProductByID(Long id);\n\n /**\n * Retrieve list of all products in DB\n *\n * @return list with products\n */\n List<Product> getProductsList();\n}",
"public interface DeptDao {\n\n public Dept selectDept(int id);\n\n public List<Dept> queryAll(@Param(\"tableName\") String tableName);\n\n public void login(@Param(\"name\") String name,@Param(\"password\") String password);\n}",
"public interface DAO<T> {\n boolean save(T t);\n T get(Serializable id);\n boolean update(T t);\n boolean delete(Serializable id);\n}",
"public interface MealDAO {\n\n int insertByVO(MealRecordModel model);\n\n}",
"public interface UserDao {\n User getUser(String userId);\n\n boolean insertUser(User obj);\n}",
"public interface BlogDao {\n public Blog getByBlogId(long blogId);\n\n public List<Blog> getBlogs(Blog param, int page, int pageSize);\n\n public long countByParam(Blog param);\n\n public Long insert(Blog blog);\n}",
"public interface SurgeryDao {\n\n public boolean updateSurgery(@Param(\"surgery\")Surgery surgery);\n\n public boolean startSurgery(@Param(\"surgery\")Surgery surgery);\n\n public boolean endSurgery(@Param(\"surgery\")Surgery surgery);\n\n public List<String> selectDistinctDoctor();\n\n public List<String> selectDistinctPatient();\n\n public List<Surgery> selectSurgeryByState(@Param(\"state\")int state);\n\n public List<Surgery> selectSurgeryDynamic(@Param(\"startTime\")long startTime,@Param(\"endTime\")long endTime,@Param(\"doctor\")String doctor,@Param(\"patient\")String patient);\n\n public Surgery selectSurgeryBySurgeryNo(@Param(\"surgeryNo\")String surgeryNo);\n\n public List<Surgery> selectExecutingSurgeryBySurgeryNoList(@Param(\"surgeryNoList\")List<String> surgeryNoList);\n\n\n}",
"public interface DepartmentDAO {\n\n /**\n * This method is used to retrieve a list of all departments.\n *\n * @return List of generic type {@link Department}\n */\n public List<Department> getAllDepartments();\n\n /**\n * This method is used when adding a department.\n *\n * @param department of type {@link Department}\n */\n public void addDepartment(Department department);\n\n /**\n * This method is used to update the department table.\n *\n * @param department of type {@link Department}\n * @param newDeptName of type String *\n */\n public void updateDepartment(Department department, String newDeptName);\n\n /**\n * This method is used to delete departments by department number.\n *\n * @param dept_no of type integer\n */\n public void deleteDepartmentByDeptNo(int dept_no);\n\n /**\n * This method is use to delete departments by name.\n *\n * @param dept_name of type String\n */\n public void deleteDepartmentByDeptName(String dept_name);\n\n /**\n * This method is responsible for returning a department by dept_no.\n *\n * @param dept_no of type integer\n * @return ResultSet\n */\n public ResultSet getDepartmentByID(int dept_no);\n\n /**\n * This method is responsible for returning a department by dept_name\n *\n * @param dept_name of type String\n * @return ResultSet\n */\n public ResultSet getDepartmentByName(String dept_name);\n}",
"public interface CRUDProduto {\r\n \r\n public boolean save(Produto produto);\r\n\r\n public boolean update(Produto produto);\r\n\r\n public boolean delete(Produto produto);\r\n\r\n public Produto get(long id);\r\n\r\n public List<Produto> getAll();\r\n}",
"@Override\r\n\tpublic void post(Employee employee) {\n\t\t empdao.save(employee);\r\n\t}",
"public interface ArticleDao {\n void save(Article article);\n}",
"public String post();",
"public interface DemoDao {\r\n /**\r\n * 保存用户\r\n * @param user\r\n * @throws Exception\r\n */\r\n void insert(DemoUser user)throws Exception;\r\n\r\n /**\r\n * 根据用户Id查询用户信息\r\n * @param userId\r\n * @return\r\n * @throws Exception\r\n */\r\n DemoUser selectById(Integer userId)throws Exception;\r\n\r\n /**\r\n * 更新用户信息\r\n * @param demoUser\r\n * @throws Exception\r\n */\r\n void updateById(DemoUser demoUser)throws Exception;\r\n\r\n\r\n /**\r\n * 根据Id删除用户信息\r\n * @param userId\r\n * @throws Exception\r\n */\r\n void deleteById(Integer userId)throws Exception;\r\n\r\n /**\r\n * 根据用户信息查询用户列表\r\n * 可以传一个对象,或是多个参数\r\n * @param userName\r\n * @param age\r\n * @return\r\n * @throws Exception\r\n */\r\n List<DemoUser> selectList(@Param(\"userName\")String userName, @Param(\"age\")Integer age)throws Exception;\r\n}",
"public interface LostItemDAO\n{\n void create(LostItem item, int lostItemID,int userid);\n List<LostItem> getItemList(String query);\n int getUserID(LostItem item);\n String getEmailID(int ID);\n}",
"@Dao\npublic interface PostDao {\n @Insert(onConflict = OnConflictStrategy.REPLACE)\n void insertPost(iPost iPosts);\n\n @Update\n void updatePost(iPost iPost);\n\n @Delete\n void deletePost(iPost iPost);\n\n @Query(\"SELECT * FROM iPost\")\n List<iPost> getAllPosts();\n\n @Query(\"SELECT * FROM iPost WHERE idThread=:threadId\")\n List<iPost> findPostsByThread(final int threadId);\n\n @Transaction\n @Query(\"SELECT * FROM iPost WHERE idThread=:threadId\")\n Single<List<PostsHelper>> getPostsFromThread(String threadId);\n}",
"public interface DAOStudent { \n \n public Form getFormByUserName(String userName);\n public Form getFormByFormId(int idForm);\n public void addForm(Form form);\n public void updateForm(Form form);\n public int getFormsByInterviewId(int idInterview);\n public String getEmailByUserName(String userName);\n public List<Form> getFormsToReservInterview();\n void romoveForm(Form form);\n}",
"public interface DBDao {\n /**\n * 添加本地缓存\n * @param url 插入的数据的url\n * @param content 插入的数据的json串\n */\n public void insertData(String url,String content,String time);\n\n /**\n * 删除指定的本地存储数据\n * @param url 指定url\n */\n public void deleteData(String url);\n\n /**\n * 更新本地缓存数据\n * @param url 指定url\n * @param content 需要更新的内容\n * @param time 更新的时间\n */\n public void updateData(String url,String content,String time);\n\n /**\n * 查询指定url的缓存数据\n * @param url 指定的url\n * @return 返回缓存数据content\n */\n public String queryData(String url);\n /**\n * 查询指定url的缓存数据\n * @param url 指定的url\n * @return 返回缓存数据的存储时间\n */\n public String queryDataTime(String url);\n}",
"@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n //processRequest(request, response);\n int cid=Integer.parseInt(request.getParameter(\"cid\"));\n String stime=request.getParameter(\"stime\"); \n String etime=request.getParameter(\"etime\");\n int tid=Integer.parseInt(request.getParameter(\"tid\"));\n String date=request.getParameter(\"date\");\n if(request.getParameter(\"action\").equalsIgnoreCase(\"save\")){\n GroupModel gm=new GroupModel();\n gm.setCid(cid);\n gm.setStime(stime);\n gm.setEtime(etime);\n gm.setTid(tid);\n gm.setDate(date);\n System.out.println(\"cid\"+cid);\n System.out.println(\"stime\"+stime);\n System.out.println(\"tis\"+tid);\n GroupDao.insert(gm);\n\n \n }\n \n }",
"public interface TransactionDAO {\n \n String addTransaction(Long userId, String transaction) throws Exception;\n \n String showTransaction(Long userId, String transactionId) throws Exception;\n \n String listTransactions(Long userId) throws Exception;\n \n String sumTransactions(Long userId) throws Exception;\n \n}",
"public interface EmailDAO {\n public Long create(EmailDetails object);\n public int update(EmailDetails object);\n public int delete(EmailDetails object);\n public int deleteTable();\n public EmailDetails findById(Integer id);\n public HashMap getList();\n\n}",
"public interface DotaMaxDAO {\n\n\n /**\n * 将hero实例存储到数据库。\n */\n void insertHeroes(List<Heroes> heroList);\n\n /**\n * 将Item实例存储到数据库。\n */\n void insertItems(List<Items> itemsList);\n\n\n /**\n * 加载英雄列表\n * @return\n */\n Heroes getHeroes(int id);\n\n\n\n\n\n\n void insertMatch(MatchDetails match);\n\n /**\n * 加载数据库里已有的数据\n * @param id\n * @return\n */\n MatchDetails getMatch(long id);\n\n /**\n * 加载用户的数据\n * @param account_id\n * @return\n */\n List<MatchDetails> getMatchByAccountId(long account_id);\n\n\n String getItemsNameById(String item_id);\n\n\n\n /**\n * 添加到User表\n */\n boolean insertUser(User user);\n\n /**\n * 从User表读取所有的用户\n */\n List<Long> getUser();\n\n\n\n}",
"public interface InmunizacionesDAO {\n\n public void insertInmunizacion(Context context, InmunizacionesBean inmunizacionesBean) ;\n public ArrayList<InmunizacionesBean> getAllInmunizacion(Context context);\n}",
"public interface SaleRecordDao {\r\n\r\n List<SaleRecord> getList();\r\n\r\n /**\r\n * 新建\r\n * @param saleRecord\r\n * @return\r\n */\r\n int create(@Param(\"saleRecord\")SaleRecord saleRecord);\r\n}",
"public interface ISysPostService extends IBaseService<SysPost> {\n /**\n * Description: 根据部门ID查询该部门下所有的岗位信息\n * Name:finaPostByDiv\n * Author:dyenigma\n * Time:2016/4/27 8:36\n * param:[id]\n * return:java.util.List<com.dyenigma.entity.Post>\n */\n List<SysPost> finaPostByDiv(String id);\n\n /**\n * Description: 新增或修改岗位信息\n * Name:persistencePost\n * Author:dyenigma\n * Time:2016/4/27 9:17\n * param:[post]\n * return:java.lang.Boolean\n */\n Boolean persistencePost(SysPost post);\n\n /**\n * Description: 获取所有可添加岗位的公司和部门\n * Name:getCoDivList\n * Author:dyenigma\n * Time:2016/4/27 10:02\n * param:[]\n * return:java.util.List<com.dyenigma.model.TreeModel>\n */\n List<TreeModel> getCoDivList();\n\n boolean delPostById(String postId);\n\n\n /**\n * Description: 设置某个记录无效\n * Name:invalidByPrimaryKey\n * Author:dyenigma\n * Time:2016/4/27 9:02\n * param:[id]\n * return:int\n */\n int invalidByPrimaryKey(String id);\n}",
"@Override\r\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tStudenteDAO studDAO=DatabaseManager.getInstance().getDaoFactory().getStudenteDAO();\r\n\t\tStudente stud=studDAO.findByPrimaryKey(req.getParameter(\"matricola\"));\r\n\t\tTassaDAO tassaDAO=DatabaseManager.getInstance().getDaoFactory().getTassaDAO();\r\n\t\tTassa tax=tassaDAO.findByPrimaryKey(Long.parseLong(req.getParameter(\"id\")));\r\n\t\tboolean stato;\r\n\t\tif(req.getParameter(\"stato\").equals(\"pagata\"))\r\n\t\t\tstato=true;\r\n\t\telse\r\n\t\t\tstato=false;\r\n\t\t\r\n\t\ttassaDAO.setStatoTassa(tax, stud, stato);\r\n\t}",
"@Override // Contain business methods\r\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tString driver = getServletContext().getInitParameter(\"Driver\");\r\n\t\tString url = getServletContext().getInitParameter(\"URL\");\r\n\t\tString user = getServletContext().getInitParameter(\"username\");\r\n\t\tString pass = getServletContext().getInitParameter(\"password\");\r\n\r\n\t\t// Call insert customer from DBDriver class\r\n\t\tDBDriver dao = new DBDriver(driver, url, user, pass);\r\n\t\t\r\n\t\t\r\n\t\t// fetch variables/values from the REQUEST object!\r\n\t\t\t\tString username = req.getParameter(\"user\");\r\n\t\t\t\tString password = req.getParameter(\"pass\");\r\n\t\t\t\tString fname = req.getParameter(\"fname\");\r\n\t\t\t\tString lname = req.getParameter(\"lname\");\r\n\t\t\t\tString email = req.getParameter(\"email\");\r\n\t\t\t\t\r\n\t\t// Register the customer to the database \r\n\t\tboolean flag = dao.insertCustomer(fname, lname, email, username, password);\r\n\t\tSystem.out.println(flag);\r\n\r\n\r\n\t\t// forward to login page after registration\r\n\t\tRequestDispatcher rd = req.getRequestDispatcher(\"/login.html\");\r\n\t\t\r\n\t\t// close db connection\r\n\t\t\t//\tdao.closeConnection();\r\n\t}",
"@Override\n protected void doPost(HttpServletRequest req, HttpServletResponse resp)\n throws ServletException, IOException {\n log( \"POST\" );\n BloodDonationLogic bloodDonationLogic = LogicFactory.getFor(\"BloodDonation\");\n \n try {\n BloodDonation bloodDonation = bloodDonationLogic.createEntity(req.getParameterMap());\n if (req.getParameter(BloodDonationLogic.BANK_ID).isEmpty()) {\n bloodDonationLogic.add(bloodDonation);\n } else {\n BloodBankLogic bloodBankLogic = LogicFactory.getFor(\"BloodBank\");\n //because user can only select the bank that already exist from drop down menu\n //so we do not need to test whether bank is existing or not\n int userInputBankID = Integer.parseInt(req.getParameter(BloodDonationLogic.BANK_ID));\n BloodBank bloodBank = bloodBankLogic.getWithId(userInputBankID);\n bloodDonation.setBloodBank(bloodBank);\n bloodDonationLogic.add(bloodDonation);\n }\n } catch (Exception ex) {\n errorMessage = ex.getMessage();\n }\n\n if (req.getParameter(\"add\") != null) {\n //if add button is pressed return the same page\n createInputBloodDonationForm(req, resp);\n } else if (req.getParameter(\"view\") != null) {\n //if view button is pressed redirect to the appropriate table\n resp.sendRedirect(\"BloodDonationTableJSP\");\n }\n\n }",
"public interface TravelGroupDAO {\r\n\r\n /**\r\n * 从数据库取得指定id的Travel Group\r\n * \r\n * @param id\r\n * Travel Group的id\r\n * @return 返回指定的Travel Group\r\n */\r\n public TravelGroup getTravelGroup(Integer id);\r\n\r\n /**\r\n * get Travel Group List Count according to conditions\r\n * \r\n * @param conditions\r\n * search condition\r\n * @return list count\r\n */\r\n public int getTravelGroupListCount(Map conditions);\r\n\r\n /**\r\n * get Travel Group List according to conditions\r\n * \r\n * @param conditions\r\n * search condition\r\n * @param pageNo\r\n * start page no(0 based), ignored if -1\r\n * @param pageSize\r\n * page size, ignored if -1\r\n * @param order\r\n * search order\r\n * @param descend\r\n * asc or desc\r\n * @return Travel Group list\r\n */\r\n public List getTravelGroupList(Map conditions, int pageNo, int pageSize, TravelGroupQueryOrder order, boolean descend);\r\n\r\n /**\r\n * insert Travel Group to database\r\n * \r\n * @param travel\r\n * Group the Travel Group inserted\r\n * @return the Travel Group inserted\r\n */\r\n public TravelGroup insertTravelGroup(TravelGroup travelGroup);\r\n\r\n /**\r\n * update Travel Group to datebase\r\n * \r\n * @param travelGroup\r\n * the Travel Group updated\r\n * @return the Travel Group updated\r\n */\r\n public TravelGroup updateTravelGroup(TravelGroup travelGroup);\r\n\r\n}",
"public interface PostItemDao {\n \n List<PostItem> selectPostItem(int id,boolean isTrue);\n}",
"public interface PersonDao {\n boolean insertPerson(PersonDo personDo); //添加\n PersonDo queryPersonByName(String name); //添加\n// public boolean deleteById(int id); //删除\n// public boolean updatePerson(PersonDo personDo); //修改\n// public PersonDo queryById(int id); //根据ID查询\n List<PersonDo> queryPersonList(PersonDo personDo); //查询全部\n}",
"@Override\r\npublic int create(Detalle_pedido d) {\n\treturn detalle_pedidoDao.create(d);\r\n}",
"public interface DrugRecordDao {\r\n\r\n List<DrugRecord> getList(@Param(\"drugId\") String drugId);\r\n\r\n /**\r\n * 创建\r\n * @param drugRecord\r\n * @return\r\n */\r\n int create(@Param(\"drugRecord\") DrugRecord drugRecord);\r\n}",
"public interface PostService {\n List<PostDto> getPostsByUser(String email) throws ServiceException;\n\n List<PostDto> getAllPosts()throws ServiceException;\n\n Post insertPost(PostDto dto) throws ServiceException;\n\n void addLikeToPost(LikeDto dto)throws ServiceException;\n\n void addCommentToPost(CommentDto dto)throws ServiceException;\n\n PostDto getPostById(Long id)throws ServiceException;\n\n}",
"public interface RecruitmentDao {\n List<Recruitment> selects(PageRequest pageRequest);\n\n Integer selectCount(PageRequest pageRequest);\n\n Recruitment select(Long id);\n\n void delete(Long id);\n\n void insert(Recruitment recruitment);\n\n void update(Recruitment recruitment);\n}",
"public interface BookingDao extends Dao<Booking, Integer> {\n\n @Override\n int create(Booking booking) throws SQLException;\n}",
"int insert(PmPost record);",
"public interface ErpDao {\r\n //登录验证\r\n\tUsers logonValidateById(String username, String userpassword);\r\n\t //基础维护 里面的 部门维护\r\n\tPageBean<Department> departmentalManagement(Integer indexpage);\r\n\t //基础维护 里面的员工维护\r\n\tPageBean<Employee> employee(Integer indexpage);\r\n\t//基础维护里面 的角色维护\r\n\tPageBean<Role> roleSelectById(Integer indexpage);\r\n\t//基础维护 里面的 部门维护 里面的新建部门\r\n\tvoid addDept(Department deparment);\r\n\t //基础维护 里面的 部门维护 里面的修改 根据id查出\r\n Department diteDepa(int id);\r\n //基础维护 里面的 部门维护 里面的修改\r\n void ModifyById(Department deparment);\r\n //基础维护 里面的 部门维护 里面的删除\r\n void delect(Integer id);\r\n \r\n // //基础维护里面的员工维护里面的新增员工\r\n void newlyAdded(Employee emp);\r\n}",
"public interface BeeDataDao {\n\n /*获取兼职数据*/\n BeeJobTime getBeeJobTime();\n\n /*分页获取兼职数据*/\n BeeJobTime getBeeJobTimes(@Param(\"startIndex\") int startIndex, @Param(\"endAmount\") int endAmount);\n\n /*获取暑期工数据*/\n BeeSummerJob getBeeSummerJob();\n\n /*分页获取暑期工数据*/\n BeeSummerJob getBeeSummerJobs(@Param(\"startIndex\") int startIndex, @Param(\"endAmount\") int endAmount);\n\n /*根据JID获取兼职详细信息*/\n BeeJobTimeDetailed getBeeJobTimeDetailed(int jid);\n\n /*根据SID获取兼职详细信息*/\n BeeSummerJobDetailed getSummerJobDetailed(int sid);\n\n /*分页获取兼职报名信息*/\n UserMessageList getSignUpJobFairs(@Param(\"startIndex\") int startIndex, @Param(\"endAmount\") int endAmount);\n\n /*获取兼职报名List*/\n UserMessageList getSignUpJobFair();\n\n /*根据phone查询兼职报名人员*/\n UserMessageList selectJobFairUser(String phone);\n\n /*兼职报名*/\n void putSignUpJobFair(@Param(\"userMessage\") UserMessage userMessage);\n\n /*根据UserId查询报名人员*/\n String selectSignUpJobFairByUserId(int UserId);\n\n /*插入amount*/\n void insertAmount(@Param(\"amount\") String amount,@Param(\"jobNames\") String jobNames,@Param(\"userId\") int userId);\n\n /*暑期工报名*/\n void putSignUpSummerJob(@Param(\"userMessage\") UserMessage userMessage);\n\n /*暑期工发布*/\n void publishSummerJob(@Param(\"beeSummerJobDetailed\") BeeSummerJobDetailed beeSummerJobDetailed,@Param(\"tag\") String tag);\n\n /*兼职发布*/\n void publishJobFair(@Param(\"beeSummerJobDetailed\") BeeSummerJobDetailed beeSummerJobDetailed,@Param(\"tag\") String tag);\n\n /*分页获取暑期工报名信息*/\n UserMessageList getSignUpSummerJobs(@Param(\"startIndex\") int startIndex, @Param(\"endAmount\") int endAmount);\n\n /*获取暑期工报名List*/\n UserMessageList getSignUpSummerJob();\n\n BeeSummerJobDetailedList AuditingJobFairs(@Param(\"startIndex\") int startIndex, @Param(\"endAmount\") int endAmount);\n\n BeeSummerJobDetailedList AuditingJobFair();\n\n BeeSummerJobDetailedList AuditingSummerJob();\n\n BeeSummerJobDetailedList AuditingSummerJobs(@Param(\"startIndex\") int startIndex, @Param(\"endAmount\") int endAmount);\n\n String selectSignUpJobFairByJIDS(int userId);\n\n UserMessageList selectSummerJobUser(String phone);\n\n String selectSignUpSummerJobByJIDS(int userId);\n\n String selectSignUpSummerJobByUserId(int userId);\n\n void insertAmount1(String jids, String jobNameS, int userId);\n\n int getSid(int id);\n\n int getJid(int id);\n\n void putOpenId(@Param(\"openId\") Object openId,@Param(\"targetId\") int targetId);\n\n BeeJobTime getAuditingBeeJobTimeByOpenId(String openId);\n\n BeeJobTime getAuditingBeeJobTimesByOpenId(@Param(\"openId\") String openId, @Param(\"startIndex\") int startIndex, @Param(\"endAmount\") int endAmount);\n\n BeeJobTime getBeeJobTimesByOpenId(@Param(\"openId\") String openId, @Param(\"startIndex\") int startIndex, @Param(\"endAmount\") int endAmount);\n\n BeeJobTime getBeeJobTimeByOpenId(String openId);\n\n int selectIsGet(int i);\n\n UserMessageList getSignUpJobFairsByJid();\n\n UserMessageList getSignUpJobFairByJid(@Param(\"jid\") String jid,@Param(\"startIndex\") int startIndex, @Param(\"endAmount\") int endAmount);\n\n int selectargetId(String openId);\n\n BeeJobTimeDetailed getAuditingBeeJobTimeDetailed(int jid);\n\n int selectOpenId(Object openId);\n\n Object selectOpenIds(Object openId);\n\n List<Integer> getJidByOpenId(String openId);\n\n void getJobTimeUserByJid(List<Integer> jid);\n\n String getJidsByOpenId(String openId);\n\n BeeJobTime getJobTimeByOpenId(@Param(\"jidS\") List<String> jidS);\n\n BeeJobTime getBeeJobTimesByOpenIds(int startIndex, int endAmount);\n\n String getJidsByJid(int i);\n\n String[] getJids();\n}",
"protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException \r\n\t{\n ((HttpServletResponse) response).addHeader(\"Access-Control-Allow-Origin\", \"*\");\r\n \r\n try\r\n {\r\n \tString usuario_id = request.getParameter(\"usuarioid\");\r\n \tint usuarioid = 0;\r\n \ttry \r\n \t{\r\n \t\tusuarioid = Integer.parseInt(usuario_id);\r\n \t\tString observacoes = request.getParameter(\"observacoes\");\r\n \t\r\n \tSystem.out.println(usuarioid + observacoes + \"\");\r\n \t\r\n \tBudget b = BudgetDAO.Build(usuarioid, observacoes);\r\n \tBudgetDAO.Create(b);\r\n \t}\r\n \tcatch (Exception e) \r\n \t{\r\n\t\t\t\tSystem.out.println(\"Erro convertendo usuario_id\");\r\n\t\t\t}\r\n\t\t}\r\n catch (Exception e) \r\n {\r\n \tSystem.out.println(\"Erro: \" + e.getMessage());\r\n\t\t}\r\n\t}",
"public interface DarenMerchantInfosDao {\n public void insert(DarenMerchantInfos darenMerchantInfos);\n}",
"UserInfoDao getUserInfoDao();",
"public interface EmpDao {\n void add(Emp emp);\n}",
"public interface UserDao {\n public User getByNickname(Map map);\n public int insertUser(Map map);\n public User getById(Map map);\n\n\n\n}",
"@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n String action = request.getParameter(\"action\");\n \n String name = request.getParameter(\"name\");\n String email = request.getParameter(\"email\");\n String password = request.getParameter(\"password\");\n String address = request.getParameter(\"address\");\n String phone = request.getParameter(\"phone\");\n int status = 1;\n long url = System.currentTimeMillis();\n String passMD5 = helper.MD5Generator.generate(password);\n User user = new User(name, email, passMD5, address, phone,status,url); \n if (action.equals(\"Create\")) {\n if (!userDao.find(user)) {\n Controller.controller.addUser(user);\n response.sendRedirect(\"doUser\");\n } else {\n response.sendRedirect(\"create-user.jsp\");\n } \n } else if (action.equals(\"Edit\")) {\n if (userDao.find(email) != null) {\n Controller.controller.editUser(user);\n response.sendRedirect(\"doUser\");\n } else {\n response.sendRedirect(\"edit-user.jsp\");\n }\n }\n \n \n }",
"public interface DeptDao {\n void insertDept(Dept dept);\n void deleteDept(String name);\n void updateDept(Dept dept);\n List<Dept> queryAllDepts();\n}",
"public interface StudentDao {\n void insert(Student student);\n}",
"public interface EmployeeDetailDAO {\r\n\t/**\r\n\t * Saves a employee detail.\r\n\t * \r\n\t * @param detail\r\n\t * The employee detail.\r\n\t * @return The identifier saved.\r\n\t * @throws DBException\r\n\t * If a problem occurs.\r\n\t */\r\n\tEmployeeDetail save(EmployeeDetail detail) throws DBException;\r\n\r\n\t/**\r\n\t * Updates a employee detail.\r\n\t * \r\n\t * @param detail\r\n\t * The employee detail.\r\n\t * @throws DBException\r\n\t * If a problem occurs.\r\n\t */\r\n\tvoid update(EmployeeDetail detail) throws DBException;\r\n\r\n\t/**\r\n\t * Deletes a module.\r\n\t * \r\n\t * @param detail\r\n\t * The employee detail.\r\n\t * @throws DBException\r\n\t * If a problem occurs.\r\n\t */\r\n\tvoid delete(EmployeeDetail detail) throws DBException;\r\n\r\n\t/**\r\n\t * Gets detail by identifier.\r\n\t * \r\n\t * @return The employee detail.\r\n\t * @throws DBException\r\n\t * If a problem occurs.\r\n\t */\r\n\tEmployeeDetail getById(long identifier) throws DBException;\r\n}",
"Product postProduct(Product product);",
"@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n response.setContentType(\"text/html;charset=UTF-8\");\r\n Order o = new Order();\r\n o.setName(request.getParameter(\"name\"));\r\n String a = request.getParameter(\"idStaff\");\r\n o.setIdStaff(Integer.parseInt(a));\r\n String b = request.getParameter(\"idbook\");\r\n o.setIdbook(Integer.parseInt(b));\r\n o.setDay(Integer.parseInt(request.getParameter(\"daynumber\")));\r\n if (request.getParameter(\"note\") != null) {\r\n o.setNote(request.getParameter(\"note\"));\r\n }\r\n Date date = new Date();\r\n \r\n o.setBorrowDate(new java.sql.Date(date.getTime()));\r\n \r\n System.out.println(\"\");\r\n o.setStatus(true);\r\n\r\n if (OrderManager.AddNew(o)) {\r\n request.setAttribute(\"stt\", \"ok\");\r\n } else {\r\n request.setAttribute(\"stt\", \"bad\");\r\n }\r\n\r\n RequestDispatcher rd = request.getRequestDispatcher(\"index.jsp\");\r\n rd.forward(request, response);\r\n\r\n }",
"@Override\n public String performPost(HttpServletRequest request) {\n HttpSession session = request.getSession();\n if (session.getAttribute(\"user\") == null) {\n return \"login.do\";\n }\n List<String> errors = new ArrayList<>();\n session.setAttribute(\"errors\", errors);\n CreateBlogForm createBlogForm = new CreateBlogForm(request);\n session.setAttribute(\"form\", createBlogForm);\n errors.addAll(createBlogForm.getValidationErrors());\n if (errors.size() > 0) {\n return \"myblogs.do\";\n }\n // create a new blog\n User user = (User) session.getAttribute(\"user\");\n Blog blog = new Blog();\n blog.setAuthor(user.getFirstname() + \" \" + user.getLastname());\n blog.setContent(createBlogForm.getContent());\n blog.setDate(new Date());\n blog.setEmail(user.getEmail());\n try {\n blogDAO.create(blog);\n return \"myblogs.do\";\n } catch (RollbackException e) {\n e.printStackTrace();\n return \"errors.jsp\";\n }\n }",
"public interface PostlinksDao {\n List<PostLink> queryAll(@Param(\"offset\")int offset, @Param(\"limit\")int limit);\n int insertPostLink(PostLink postlink);\n}",
"@RequestMapping(method = RequestMethod.POST)\n public Bin create() {\n throw new NotImplementedException(\"To be implemented\");\n }",
"public interface UserDao {\r\n public User login(String name);\r\n public int register(String name,String password);\r\n public boolean deleteUser(int userId);\r\n public User getUserByPrimeryKey(int userId);\r\n public List<User> queryAllUser();\r\n public boolean updateUser(User user);\r\n}",
"protected void doPost(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\n\t\tPostDao postDao = DatabaseManager.getInstance().getDaoFactory().getPostDao();\n\n\t\t// prendo i dati dalla js\n\t\tString title = request.getParameter(\"title\");\n\t\tString message = request.getParameter(\"content\");\n\t\tString userid = (String) request.getSession(false).getAttribute(\"email\");\n\t\tString pathimg = request.getParameter(\"img\");\n\n\t\tSystem.out.println(\"this is the author of the post \" + userid);\n\n\t\t// creo la data del giorno corrente\n\t\tlong time = System.currentTimeMillis();\n\t\tjava.sql.Date date = new java.sql.Date(time);\n\t\t\n\t\tPost postToSave = new Post(1, title, message, userid, pathimg, date);\n\t\tpostDao.save(postToSave);\n\n\t\tJsonObject post = new JsonObject();\n\t\tpost.addProperty(\"msg\",postToSave.getMessaggio());\n\t\tpost.addProperty(\"title\", postToSave.getTitle());\n\t\tpost.addProperty(\"utente\", postToSave.getUtente());\n\t\tpost.addProperty(\"img\", postToSave.getImgname());\n\t\tpost.addProperty(\"id_post\", postToSave.getIdPost());\n\n\t\tDateFormat df = new SimpleDateFormat(\"yyyy-MM-dd\");\n\t\tString reportDate = df.format(postToSave.getData());\n\n\t\tpost.addProperty(\"data\", reportDate);\n\t\tresponse.getWriter().write(post.toString());\n\n\t}",
"public interface CalApptDAO {\n\n public List<CalApptBO> getAllCalAppts();\n public CalApptBO getCalApptById(int id);\n public int updateCalAppt(CalApptBO calApptBO);\n public int insertCalAppt(CalApptBO calApptBO);\n public int deleteCalAppt(int apptId);\n\n}",
"public interface BusinessDao {\n\n public List<Business> getAllBusiness() throws Exception;\n public Business getBusinessbyId(Long businessId) throws Exception;\n public void addBusiness (Business business) throws Exception;\n public void updateBusiness(Business business) throws Exception;\n public void deleteBusiness(Business business) throws Exception;\n}",
"public interface BaseDao<T> {\n\n T get(Long id);\n\n int save(T t);\n\n int update(T t);\n\n int delete(T t);\n\n int delete(Long id);\n\n T getObj(String sql, Object... args);\n\n Long count(String sql, Object... args);\n\n List<T> getList(String sql);\n\n List<T> getList(String frameSql, Object... args);\n\n Page<T> getPage(Page page, String frameSql, Object[] args);\n\n}",
"public OnibusDAO() {}",
"PostSaveDTO queryDetailById(String postId);",
"public interface PreparedDishHistoryDAO {\n int addPreparedDish(PreparedDish dish);\n List<PreparedDish> getAll();\n}",
"public interface AppHealthDataDao {\n public AppHealthData findByType(String type, String idNo) throws Exception;\n\n public AppHealthData findByPatientId(String patientId, String ghh000,String type) throws Exception;\n\n public void addHealthDataImplements(JSONObject jsonall,String idNo,String card,String type,String requestUserId,String requestUserName,String userType) throws Exception;\n}",
"public abstract ToDoDao toDoDao();",
"D getDao();",
"public interface ForumFeedDao {\n\n List<ForumFeedPO> getFeedModels(int post_id, int page, int page_size);\n\n int addFeedModel(ForumFeedPO feed);\n\n int updateFeedModel(int feed_id, ForumFeedPO feed);\n\n int deleteFeedModel(int feed_id);\n\n int deleteFeedModels(int post_id);\n\n int getNumOfFeeds(int post_id);\n}",
"public static void main(String[]args) {PostagemDAO pDAO = new PostagemDAO();\n////\t\tPostagem postagem = new Postagem();\n////\t\tString s = \"1999-3-9\";\n////\t\tDate data = Date.valueOf(s);\n////\t\tpostagem.setDescPostagem(\"john johnes\");\n////\t\tpostagem.setDataPostagem(data);\n////\t\tpDAO.inserirPostagem(postagem);\n//\t\t\n////\t\tImagensDAO iDAO = new ImagensDAO();\n////\t\tImagens imagens = new Imagens();\n////\t\t\n////\t\timagens.setTipoImagem((short)2);\n////\t\timagens.setArquivoImagem(\"busato\");\n////\t\tiDAO.inserirImagem(imagens);\n//\t\t\n//\t\tUsuarioDAO uDAO = new UsuarioDAO();\n//\t\tUsuario usuario = new Usuario();\n//\t\t\n////\t\tusuario.setEmail(\"sadasda\");\n////\t\tusuario.setNickname(\"sdasdasae\");\n////\t\tusuario.setSenha(\"12345\");\n////\t\tusuario.setSteamid(31231231);\n////\t\tusuario.setFotoPerfil(\"FOTO\");\n////\t\tuDAO.cadastrar(usuario);\n//\t\t\n//\t\t\n//\t\tComentariosDAO cDAO = new ComentariosDAO();\n//\t\tComentarios comentarios = new Comentarios();\n//\t\t\n//\t\tcomentarios.setCorpoComentario(\"comentario comentado\");\n//\t\tcomentarios.setDataComentario(Date.valueOf(\"2018-03-09\"));\n//\t\tcDAO.inserirComentarios(comentarios);\n//\t\t\n//\t\tSystem.out.println(\"sera que comitou\");\n//\t\t\n\t\t\n\t\tPostagem postagem = new Postagem();\n\t\tpostagem.setDescPostagem(\"Uma formiguinha subindo pela parede\");\n\t\tpostagem.setTituloPostagem(\"Formiguinha\");\n\t\t\n\t\tPostagemDAO poDAO = new PostagemDAO();\n\t\tpostagem = poDAO.inserirPostagem(postagem);\n\t\t\n\t\tSystem.out.println(postagem.getIdPostagem());\n\t\t\n\t}",
"public interface OrderPushDAO {\n Long addOrderPush(OrderPushDO orderPushDO);\n List<OrderPushDO> queryOrderPush(OrderPushQTO orderPushQTO);\n OrderPushDO getOrderPushById(Long id);\n Integer updateOrderPush(OrderPushDO orderPushDO);\n Integer deleteOrderPush(OrderPushDO orderPushDO);\n Long queryOrderPushTotalCount(OrderPushQTO orderPushQTO);\n\n}",
"public interface BodyChangeDao {\n BodyChange insert(BodyChange item);\n\n List<BodyChange> query(BodyChange item);\n\n void update(BodyChange item);\n\n void delete(BodyChange item);\n\n}",
"@Override\n public String getMethod() {\n return \"POST\";\n }",
"public interface IEmployeeDAO {\n\t\n\tpublic boolean insertEmployee(Employee emp);\n\tpublic List<Employee> getAllEmployees(); \n\tpublic Employee getEmployee(int empId);\n\tpublic boolean updateEmp(int empId, double newSal); \n\tpublic boolean deleteEmp(int empId); \n\n}",
"public interface DUserDao {\n /**\n * 根据手机和密码,查询返回病患信息\n * 若不存在返回空,若密码不对返回id=0的医生\n * @param phone 医生手机\n * @return\n */\n DUser queryByPhone(@Param(\"phone\") String phone);\n\n /**\n * 新建一个医生用户\n * @param dUser\n * @return\n */\n boolean save(DUser dUser);\n\n /**\n * 查询所有的医生用户\n * @return\n */\n ArrayList<DUser> queryAll();\n\n /**\n * 更新医生\n * @param dUser\n * @return\n */\n boolean updateDUser(DUser dUser);\n}",
"public interface OperaLogDao {\r\n public void add(OperaLog o);\r\n}",
"public abstract DbDAO AccessToDAO();",
"public interface JobtitleDao {\n\n int addJobtitle(Jobtitle jobtitle);\n int addJobtitleIfNotExists(Jobtitle jobtitle);\n boolean isJobtitleExists(String jobtitleName);\n int[] addListOfJobtitle(List<Jobtitle> jobtitleList);\n Jobtitle findJobtitleByName(String jobtitleName);\n Jobtitle findJobtitleById(long id);\n List<Jobtitle> findAllJobtitles();\n int deleteJobtitleByJobtitleName(String jobtitleName);\n long findJobtitleIdByJobtitleName(String jobtitleName);\n void deleteAllJobtitles();\n\n}",
"public interface BasicDataMapper {\n\n public List<BasicData> getBasicDatas();\n public BasicData getBasicDataById(@Param(\"id\")Integer id);\n public void createBasicData(BasicData basicData);\n public void updateBasicData(BasicData basicData);\n public void deleteBasicData(@Param(\"id\")Integer id);\n\n}"
] | [
"0.6468237",
"0.64090145",
"0.6408829",
"0.6266605",
"0.6226441",
"0.6223469",
"0.6222199",
"0.6198224",
"0.61936265",
"0.6179971",
"0.617692",
"0.6167811",
"0.6146349",
"0.6138059",
"0.6116873",
"0.608519",
"0.6081655",
"0.6071973",
"0.6071942",
"0.6062583",
"0.60619605",
"0.6058216",
"0.6046488",
"0.6042312",
"0.60421014",
"0.6040293",
"0.60337806",
"0.60322654",
"0.6019691",
"0.60103786",
"0.60079044",
"0.60068065",
"0.5993585",
"0.5982767",
"0.5981214",
"0.59792477",
"0.5970196",
"0.5965386",
"0.59614265",
"0.5960832",
"0.5957786",
"0.59564763",
"0.59510267",
"0.59502465",
"0.5936554",
"0.593542",
"0.59328794",
"0.59137326",
"0.59098667",
"0.5908331",
"0.5906747",
"0.59013593",
"0.5900704",
"0.5886485",
"0.5885415",
"0.5883714",
"0.58834857",
"0.5880511",
"0.5871426",
"0.58652854",
"0.5854019",
"0.5853651",
"0.5846678",
"0.58282655",
"0.5827187",
"0.5824487",
"0.58224326",
"0.58156437",
"0.5814969",
"0.5804405",
"0.57988757",
"0.5796906",
"0.5795542",
"0.57950693",
"0.57918876",
"0.5787507",
"0.57868785",
"0.57821774",
"0.5781556",
"0.5781249",
"0.5776137",
"0.5775598",
"0.5773997",
"0.57673806",
"0.5764531",
"0.5764403",
"0.57621956",
"0.57607794",
"0.5760538",
"0.5758035",
"0.57562864",
"0.57555187",
"0.57534724",
"0.57531196",
"0.57509476",
"0.5749524",
"0.57494944",
"0.5746742",
"0.5745231",
"0.5745169"
] | 0.68720615 | 0 |
Identifies a post by id (primary key) | Post findById(int id); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Post getPostByID(long postId);",
"int getPostId();",
"@Override\r\n\tpublic Post getPostById(int id) {\n\t\treturn getHibernateTemplate().get(Post.class, id);\r\n\t}",
"public long getPostId();",
"Forumpost selectByPrimaryKey(Integer postid);",
"public BlogPost getPostById(Long id);",
"PmPost selectByPrimaryKey(String postId);",
"public Post findOne(long id) {\n return postsDao.findById(id);\n }",
"void displayPostWithId(String id);",
"public void setPostId(long postId);",
"public Integer getPostId() {\n return postId;\n }",
"public void setPostId(Integer postId) {\n this.postId = postId;\n }",
"public int getPostId() {\r\n\t\treturn postId;\r\n\t}",
"void setPostId(int postId);",
"public Post getByID(int id) throws SQLException {\r\n\tString sql = \"SELECT * FROM posts WHERE id = ?\";\r\n\tPreparedStatement st = db.prepareStatement(sql);\r\n\tst.setQueryTimeout(TIMEOUT);\r\n\tst.setInt(1, id);\r\n\t\r\n\tResultSet results = st.executeQuery();\r\n\tList<Post> parsed = parseResults(results);\r\n\t\r\n\treturn (parsed.size() == 1) ?\r\n\t\tparsed.get(0) :\r\n\t\t null;\r\n }",
"public long getPostId() {\n return postId;\n }",
"public synchronized Post getPostById(String id) {\n try {\n this.connect();\n Post myPost = linkedin.restOperations().getForObject(\n \"http://api.linkedin.com/v1/posts/{post-id}\" +\n \":(creation-timestamp,title,summary,id,\" +\n \"creator:(first-name,last-name))\", Post.class, id);\n log.info(myPost.getCreationTimestamp());\n log.info(myPost.getId());\n log.info(myPost.getTitle());\n return myPost;\n } catch (Exception e) {\n log.debug(\"An exception occured when reading a post with id \" + id + \" from group: \" + groupId);\n }\n return null;\n }",
"public BlogEntry findBlogEntry(Long id);",
"void deletePostById(int id);",
"public Post findById(Integer i) {\n\t\tSession session;\n\t\ttry {\n\t\t\tsession = sessfact.getCurrentSession();\n\t\t} catch (HibernateException e) {\n\t\t\tsession = sessfact.openSession();\n\t\t}\n\t\tTransaction trans = session.beginTransaction();\n\t\tPost p = session.get(Post.class, i);\n\t\ttrans.commit();\n\t\treturn p;\n\t}",
"PostSaveDTO queryDetailById(String postId);",
"public void setPostId(int postId) {\r\n\t\tthis.postId = postId;\r\n\t}",
"@Override\n public Post getPostById(Long postId) {\n Post savedPost = postRepository.findById(postId).orElse(null);\n\n Comment[] comments = sender.findCommentsByPostId(savedPost.getPostId());\n\n savedPost.setComments(Arrays.asList(comments));\n return savedPost;\n }",
"public void updatePost(Long id, BlogPost post);",
"public Post getPost(int postID)\n {\n Post post = null;\n try\n {\n database = dbH.getReadableDatabase();\n dbH.openDataBase();\n String query = \"SELECT * FROM Post WHERE postID=\"+\"'\"+postID+\"'\";\n Cursor c = database.rawQuery(query, null);\n if (c.moveToFirst()) {\n post = new Post();\n post.setPostID(c.getColumnIndex(\"postID\"));\n post.setPostBody(c.getString(c.getColumnIndex(\"postBody\")));\n post.setPostedBy(c.getString(c.getColumnIndex(\"postedBy\")));\n post.setBitmap(c.getString(c.getColumnIndex(\"image\")));\n\n }\n else\n {\n Log.i(TAG, \"This postID doesn't exist in the DB.\");\n }\n dbH.close();\n }\n catch (SQLException e)\n {\n e.printStackTrace();\n Log.i(TAG, \"Error in getting post from DB.\");\n\n }\n return post;\n }",
"public void setPostId(int postId) {\n\t\tthis.postId = postId;\n\t}",
"public ArrayList<PostInfo> searchPost(int id) throws SQLException {\n //pl is postList\n ArrayList<PostInfo> pl = new ArrayList<>();\n String sql = \"SELECT * FROM `post` WHERE `post_id` = ?\";\n preparedStatement = connection.prepareStatement(sql);\n preparedStatement.setInt(1, id);\n resultSet = preparedStatement.executeQuery();\n while (resultSet.next()) {\n pl.add(new PostInfo(resultSet.getInt(\"post_id\"), resultSet.getInt(\"place_id\"), resultSet.getString(\"post_text\"),\n resultSet.getDate(\"post_time\"), resultSet.getInt(\"status\"), resultSet.getInt(\"user_id\"), resultSet.getInt(\"editor_id\")));\n }\n\n return pl;\n }",
"public VBeatPostModel getPost(String postId){\n List<VBeatPostModel> postList = AppLocalDB.getInstance().db.postDao().getPost(postId);\n\n if(postList.size() == 0) {\n return null;\n } else {\n return postList.get(0);\n }\n\n }",
"Optional<Post> getPost(String postId) throws Exception;",
"@GetMapping(\"/{id}\")\n public ResponseEntity<Post> getPostById(@PathVariable Long id){\n Post post = postService.getPostById(id);\n return ResponseEntity.ok(post);\n }",
"@GetMapping(\"/{post_id}\")\n private ResponseEntity<Post> getPost(@PathVariable Long post_id) {\n User user = getCurrentUser();\n Post post = postService.findById(post_id).orElse(null);\n\n if (post == null) {\n return ResponseEntity.notFound().build();\n } else {\n return ResponseEntity.ok(post);\n }\n }",
"Article selectByPrimaryKey(String id);",
"int deleteByPrimaryKey(String postId);",
"T00RolePost selectByPrimaryKey(T00RolePostKey key);",
"private boolean estaId(int id){\n boolean estaId;\n Cursor c = getContentResolver().query(PostContract.getContentUri(),\n null,\n PostContract.Columnas._ID + \"=?\",\n new String[]{String.valueOf(id)},\n null);\n if(c.moveToFirst()){\n //String a = c.getString(c.getColumnIndex(PostContract.Columnas._ID));\n return estaId = true;\n }else {//Se puede insertar, ya que no hay un id que aparezca en la base de datos.\n estaId = false;\n }\n c.close();\n return estaId;\n }",
"public Post getPost(int id) throws ParseException {\n\t\tSQLiteDatabase db = this.getReadableDatabase();\n\t\t\n\t\tCursor cursor = db.query(TABLE_POSTS, new String[] {KEY_USER_ID, \n\t\t\t\tKEY_MEETING_LOCATION, KEY_DESTINATION, KEY_DATE_TIME,\n\t\t\t\tKEY_AVAILABLE_SEATS, KEY_POST_ID }, KEY_POST_ID + \"=?\",\n\t\t\t\tnew String[] { String.valueOf(id) }, null, null, null, null);\n\t\tif (cursor != null)\n\t\t\tcursor.moveToFirst();\n\t\tPost post = new Post(\n\t\t\t\tcursor.getInt(0), \t\t// user id\n\t\t\t\tcursor.getString(1),\t// meet loc\n\t\t\t\tcursor.getString(2), \t// destination\n\t\t\t\tthis.convertStringToDate(cursor.getString(3)), \t// date\n\t\t\t\tcursor.getInt(4),\t\t// seats\n\t\t\t\tcursor.getInt(5) );\t\t// post id\n\t\t// return post\n\t\treturn post;\n\t\t}",
"QuestionOne selectByPrimaryKey(Integer id);",
"WpPostsWithBLOBs selectByPrimaryKey(Long id);",
"@ApiModelProperty(value = \"The event WordPress post ID\")\n public Integer getId() {\n return id;\n }",
"void removePost(int id) throws RemoteException, SQLException;",
"int deleteByPrimaryKey(Integer postid);",
"@GetMapping(\"posts/{id}\")\n public Post getById(@PathVariable Long id){\n return postService.getById(id)\n .orElseThrow(()->new ResponseStatusException(HttpStatus.NOT_FOUND));\n }",
"void displayCommentsForPostWithId(String id);",
"@Override\n\tpublic void getPostByMemberId() {\n\t\tArrayList<Post> list = new ArrayList<Post>();\n\t\tlist = dao.selectPostByMemberId(cur.getId());\n\t\t\n\t\tfor (Post p : list) {\n\t\t\tSystem.out.println(p.getPostId() + \" \" + p.getPostName());\n\t\t}\n\t}",
"public static Result editPost(Long id) {\t\t\n\t\tUser currentUser = UserController.loggedInUser();\n\t\tif (currentUser == null) {\n\t\t\t// User not logged in. So redirect to login first\n\t\t\t//String uri = request().uri();\n\t\t\tflash(\"loginMessage\", \"You are not logged in\");\n\t\t\treturn redirect(routes.Application.login());\n\t\t}\n\t\tPost post = Post.get(id);\n\t\tif (post != null) {\n\t\t\tif (!post.createdBy.equals(currentUser.userName)) {\n\t\t\t\treturn TODO; // You cannot edit post which you did not post.\n\t\t\t}\n\t\t\tForm<Post> postForm = form(Post.class).fill(post);\n\t\t\treturn ok(editPost.render(postForm, currentUser));\n\t\t} else {\n\t\t\treturn TODO; //Post does not exist\n\t\t}\n\t}",
"CommentLike selectByPrimaryKey(Integer id);",
"Blog read(int id);",
"CmsVoteTitle selectByPrimaryKey(String id);",
"public List<Post> getMyPostById(int id) {\n\t\treturn pm.getMyPostById(id);\r\n\t}",
"void editMyPost(Post post);",
"PrhFree selectByPrimaryKey(Integer id);",
"public int getIdPosto() {\n return idPosto;\n }",
"Question selectByPrimaryKey(String id);",
"T findById(long pk);",
"Question selectByPrimaryKey(Integer id);",
"Question selectByPrimaryKey(Integer id);",
"Prueba selectByPrimaryKey(Integer id);",
"TempletLink selectByPrimaryKey(String id);",
"@Override\n\tpublic T getEntryById(Serializable id) {\n\t\treturn (T) this.hibernateTemplate.get(this.classt, id);\n\t}",
"public PostBean getFirstPost_inThread(int threadID)\r\n throws ObjectNotFoundException, DatabaseException;",
"Comments selectByPrimaryKey(Integer id);",
"public void setPostId(Post postId) {\n put(KEY_POST_ID, postId);\n }",
"public int deletePost(Integer post_id) {\n\t\treturn postDao.deletePost(post_id);\r\n\t}",
"public HttpStatus deleteById(Long postId);",
"@Override\n public JurUrl selectByPrimaryKey(Integer id) {\n return jurUrlMapper.selectByPrimaryKey(id);\n }",
"E findById(K id);",
"Notice selectByPrimaryKey(Integer id);",
"@Override\n\tpublic void set(int id, Post entity) {\n\t\t\n\t}",
"@Override\r\n public boolean equals(Object object) {\n if (!(object instanceof Posts)) {\r\n return false;\r\n }\r\n Posts other = (Posts) object;\r\n if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {\r\n return false;\r\n }\r\n return true;\r\n }",
"@GetMapping(\"/getPost/{id}\")\n public ResponseEntity<Optional<Post>> getPostDetails(@PathVariable @RequestBody Long id){\n return new ResponseEntity<Optional<Post>>(postService.getPost(id),HttpStatus.OK);\n }",
"Dormitory selectByPrimaryKey(Integer id);",
"@Override\r\n\tpublic TopicContent findById(Serializable id) {\n\t\treturn topicContentDao.findById(id);\r\n\t}",
"public BrowseHistoryContentValues putPostId(@Nullable Long value) {\n mContentValues.put(BrowseHistoryColumns.POST_ID, value);\n return this;\n }",
"public void readPost(String postID) {\n readPostIds.add(postID);\n }",
"@Override\n public boolean equals(Object object) {\n if (!(object instanceof Post)) {\n return false;\n }\n Post other = (Post) object;\n if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {\n return false;\n }\n return true;\n }",
"public Data findById(Object id);",
"@Override\r\n public boolean equals(Object object) {\n if (!(object instanceof Post)) {\r\n return false;\r\n }\r\n Post other = (Post) object;\r\n if ((this.idPost == null && other.idPost != null) || (this.idPost != null && !this.idPost.equals(other.idPost))) {\r\n return false;\r\n }\r\n return true;\r\n }",
"SwipersDO selectByPrimaryKey(Integer id);",
"T getById(PK id);",
"@Override\n public boolean equals(Object object) {\n if (!(object instanceof Posts)) {\n return false;\n }\n Posts other = (Posts) object;\n if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {\n return false;\n }\n return true;\n }",
"public abstract T byId(ID id);",
"PageFunc selectByPrimaryKey(Integer id);",
"Dish selectByPrimaryKey(String id);",
"Note getOneEntity(Long id);",
"public Blog FindById(String id) {\n\t\treturn null;\r\n\t}",
"Author findOne(String id);",
"public Post save(Post post) {\n return postsDao.save(post);\n }",
"@Override\r\n\tpublic Post searchInfById(Post post2) {\n\t\tpostDao=new PostDaoImpl(TransactionManager.connection);\r\n\t\tResultSet resultSet=postDao.selectById(post2);\r\n\t\tPost post=new Post();\r\n\t\ttry {\r\n\t\t\tif(resultSet.next()) {\r\n\t\t\t\tpost.setPostId(resultSet.getInt(1));\r\n\t\t\t\tpost.setPostName(resultSet.getString(3));\r\n\t\t\t\tpost.setUserId(resultSet.getInt(2));\r\n\t\t\t\tpost.setPostProperty(resultSet.getInt(4));\r\n\t\t\t\tpost.setPostEnterNum(resultSet.getInt(5));\r\n\t\t\t\tpost.setPostTime(resultSet.getDate(6));\r\n\t\t\t\tpost.setPostScore(resultSet.getDouble(7));\r\n\t\t\t\tpost.setScoreCount(resultSet.getInt(8));\r\n\t\t\t\tpost.setLastComTime(resultSet.getDate(9));\r\n\t\t\t\tpost.setResId(resultSet.getInt(10));\r\n\t\t\t\tpost.setResPath(resultSet.getString(12));\r\n\t\t\t\tpost.setUserName(resultSet.getString(14));\r\n\t\t\t\tpost.setUserLevel(resultSet.getInt(16));\r\n\t\t\t\tpost.setUserStatus(resultSet.getInt(17));\r\n\t\t\t\tpost.setPropertyName(resultSet.getString(19));\r\n\t\t\t\tpost.setLocation(resultSet.getString(22));\r\n\t\t\t\tpost.setPhone(resultSet.getString(23));\r\n\t\t\t\tpost.setPostCode(resultSet.getInt(24));\r\n\t\t\t\tpost.setEmail(resultSet.getString(25));\r\n\t\t\t\tpost.setGender(resultSet.getString(26));\r\n\t\t\t\tpost.setHobby(resultSet.getString(27));\r\n\t\t\t\tpost.setMajor(resultSet.getString(28));\r\n\t\t\t\tpost.setScore(resultSet.getInt(29));\r\n\t\t\t\tpost.setNickName(resultSet.getString(30));\r\n\t\t\t\tpost.setUserRegion(resultSet.getString(31));\r\n\t\t\t\tpost.setUserPhoto(resultSet.getString(32));\r\n\t\t\t\tpost.setComCount(resultSet.getInt(39));\r\n\t\t\t\t\r\n\t\t\t\treturn post;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t\treturn null;\r\n\t\t\t\r\n\t\t} catch (SQLException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}",
"int updateByPrimaryKey(WpPosts record);",
"D getById(K id);",
"public BlogArticle gainOne(Integer id) {\n\t\treturn blogArticleDao.gainOne(id);\n\t}",
"HuoDong selectByPrimaryKey(Integer id);",
"Ad selectByPrimaryKey(Integer id);",
"@Override\r\n\tpublic Plate findById(long id) {\n\t\treturn null;\r\n\t}",
"RecordLike selectByPrimaryKey(String id);",
"public abstract T findOne(int id);",
"Pet selectByPrimaryKey(Integer petid);",
"@Override\r\n\tpublic void find(Integer id) {\n\r\n\t}",
"@Override\n\tpublic long getPrimaryKey() {\n\t\treturn _news_Blogs.getPrimaryKey();\n\t}",
"public E findById(Serializable pk) ;"
] | [
"0.80858207",
"0.7653386",
"0.75747055",
"0.7526984",
"0.7415521",
"0.7356798",
"0.7353516",
"0.7272014",
"0.7140943",
"0.7045092",
"0.6953916",
"0.68378174",
"0.6796758",
"0.67883545",
"0.67423487",
"0.67328435",
"0.6641447",
"0.6591671",
"0.6558799",
"0.64686054",
"0.6395415",
"0.63354456",
"0.6297464",
"0.62755495",
"0.62722284",
"0.62535787",
"0.62530416",
"0.6244694",
"0.6239797",
"0.6181375",
"0.6152519",
"0.61305386",
"0.6126597",
"0.61065173",
"0.60797805",
"0.6077423",
"0.6063397",
"0.60541314",
"0.60479623",
"0.6036143",
"0.59939235",
"0.598372",
"0.59753597",
"0.5975166",
"0.5914902",
"0.58887464",
"0.5886954",
"0.5870517",
"0.58286333",
"0.57998186",
"0.57995754",
"0.5795638",
"0.57888013",
"0.5777261",
"0.5773247",
"0.5773247",
"0.5757373",
"0.5746289",
"0.57273",
"0.57157415",
"0.5710178",
"0.57031584",
"0.5699902",
"0.5696462",
"0.5677327",
"0.5669156",
"0.56607157",
"0.56542766",
"0.56502265",
"0.5644634",
"0.56355464",
"0.56157506",
"0.561318",
"0.5604526",
"0.5594334",
"0.5591341",
"0.5584291",
"0.5583187",
"0.55744684",
"0.55691403",
"0.5561744",
"0.5558065",
"0.55558115",
"0.55396706",
"0.55348724",
"0.55294806",
"0.552776",
"0.55255425",
"0.5523511",
"0.55152535",
"0.5512225",
"0.551152",
"0.5502273",
"0.54959804",
"0.5493835",
"0.54811645",
"0.5473223",
"0.5470484",
"0.546805",
"0.5464862"
] | 0.7620745 | 2 |
Receives and saves the post to database | void savePost(Post post); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Post save(Post post) throws Exception;",
"private void sendPost() {\n Map<String,Object> values = new HashMap<>();\n values.put(Constants.MANAGEMENT,management);\n values.put(Constants.GENERAL_INFORMATION,generalnformation);\n values.put(Constants.SYMPTOMS,symptoms);\n\n FireBaseUtils.mDatabaseDiseases.child(caseStudyUrl).child(url).updateChildren(values);\n Toast.makeText(DiseaseEditActivity.this, \"Item Posted\",LENGTH_LONG).show();\n finish();\n }",
"public void savePost(VBeatPostModel post) {\n AppLocalDB.getInstance().db.postDao().insertAll(post);\n }",
"public void postData() {\n\n\t}",
"private void createPost() {\n PostModel model = new PostModel(23, \"New Title\", \"New Text\");\n Call<PostModel> call = jsonPlaceHolderAPI.createPost(model);\n call.enqueue(new Callback<PostModel>() {\n @Override\n @EverythingIsNonNull\n public void onResponse(Call<PostModel> call, Response<PostModel> response) {\n if (!response.isSuccessful()) {\n textResult.setText(response.code());\n return;\n }\n PostModel postResponse = response.body();\n String content = \"\";\n assert postResponse != null;\n content += \"Code: \" + response.code() + \"\\n\";\n content += \"ID: \" + postResponse.getId() + \"\\n\";\n content += \"User ID: \" + postResponse.getUserId() + \"\\n\";\n content += \"Title: \" + postResponse.getUserId() + \"\\n\";\n content += \"Body: \" + postResponse.getText();\n textResult.append(content);\n }\n\n @Override\n @EverythingIsNonNull\n public void onFailure(Call<PostModel> call, Throwable t) {\n textResult.setText(t.getMessage());\n }\n });\n }",
"public Post save(Post post) {\n return postsDao.save(post);\n }",
"protected void doPost(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\n\t\tPostDao postDao = DatabaseManager.getInstance().getDaoFactory().getPostDao();\n\n\t\t// prendo i dati dalla js\n\t\tString title = request.getParameter(\"title\");\n\t\tString message = request.getParameter(\"content\");\n\t\tString userid = (String) request.getSession(false).getAttribute(\"email\");\n\t\tString pathimg = request.getParameter(\"img\");\n\n\t\tSystem.out.println(\"this is the author of the post \" + userid);\n\n\t\t// creo la data del giorno corrente\n\t\tlong time = System.currentTimeMillis();\n\t\tjava.sql.Date date = new java.sql.Date(time);\n\t\t\n\t\tPost postToSave = new Post(1, title, message, userid, pathimg, date);\n\t\tpostDao.save(postToSave);\n\n\t\tJsonObject post = new JsonObject();\n\t\tpost.addProperty(\"msg\",postToSave.getMessaggio());\n\t\tpost.addProperty(\"title\", postToSave.getTitle());\n\t\tpost.addProperty(\"utente\", postToSave.getUtente());\n\t\tpost.addProperty(\"img\", postToSave.getImgname());\n\t\tpost.addProperty(\"id_post\", postToSave.getIdPost());\n\n\t\tDateFormat df = new SimpleDateFormat(\"yyyy-MM-dd\");\n\t\tString reportDate = df.format(postToSave.getData());\n\n\t\tpost.addProperty(\"data\", reportDate);\n\t\tresponse.getWriter().write(post.toString());\n\n\t}",
"private void postNewPost() {\n if (mIsReplyOnBulletin) {\n OperationManager operationManager = OperationManager.getInstance(NewPostActivity.this);\n operationManager.postNewReply(etNewPostMsg.getText().toString(),\n getIntent().getExtras().getLong(EXTRA_POST_ID), NewPostActivity.this);\n } else {\n OperationManager operationManager = OperationManager.getInstance(NewPostActivity.this);\n operationManager.postNewBulletin(etNewPostSubject.getText().toString()\n , etNewPostMsg.getText().toString(), mFilesAdapter.getData(), NewPostActivity.this);\n\n }\n finish();\n }",
"public void submit(View view){\n EditText ti = (EditText) findViewById(R.id.editText3);\n EditText pos = (EditText) findViewById(R.id.editText4);\n EditText tim = (EditText) findViewById(R.id.editText7);\n\n String titolo = ti.getText().toString();\n String post = pos.getText().toString();\n String time = tim.getText().toString();\n\n\n if (titolo.matches(\"\")) {\n Toast.makeText(this, \"Inserisci titolo\", Toast.LENGTH_SHORT).show();\n return;\n }\n\n if (post.matches(\"\")) {\n Toast.makeText(this, \"Inserisci messaggio\", Toast.LENGTH_SHORT).show();\n return;\n }\n\n if (time.matches(\"\")) {\n Toast.makeText(this, \"Inserisci minuti\", Toast.LENGTH_SHORT).show();\n return;\n }\n\n if (Integer.valueOf(time)>60 ) {\n Toast.makeText(this, \"Durata massima 60 minuti!\", Toast.LENGTH_SHORT).show();\n return;\n }\n\n if (Integer.valueOf(time)<1 ) {\n Toast.makeText(this, \"Durata minima 1 minuto!\", Toast.LENGTH_SHORT).show();\n return;\n }\n\n //Inserimento post online\n DatabaseReference ref = FirebaseDatabase.getInstance().getReference(\"path/to/geofire\");\n GeoFire geoFire = new GeoFire(ref);\n\n\n DatabaseReference mDatabase = FirebaseDatabase.getInstance().getReference().child(\"posts\").push();\n String utente = FirebaseAuth.getInstance().getCurrentUser().getDisplayName();\n String utenteId = FirebaseAuth.getInstance().getCurrentUser().getUid();\n NewPost newPost = new NewPost(titolo,post,utente,utenteId ,mDatabase.getKey());\n LatLng latLng = ((MyApplication) this.getApplication()).getLatLng();\n\n if (latLng == null) {\n Toast.makeText(this, \"POSIZIONE NON TROVATA\", Toast.LENGTH_SHORT).show();\n return;\n }\n newPost.lat = latLng.latitude;\n newPost.longi = latLng.longitude;\n key = newPost.key;\n newPost.durata=Long.parseLong(time, 10);\n newPost.data = new Date().getTime();\n newPost.attivo = true;\n\n\n if(fotoPresente) {\n ByteArrayOutputStream bYtE = new ByteArrayOutputStream();\n ImageView imageView = (ImageView) findViewById(R.id.photo);\n if (imageView != null) {\n Bitmap imageBitmap = ((BitmapDrawable)imageView.getDrawable()).getBitmap();\n imageBitmap.compress(Bitmap.CompressFormat.JPEG,100,bYtE);\n byte[] byteArray = bYtE.toByteArray();\n String encodedImage = Base64.encodeToString(byteArray, Base64.DEFAULT);\n newPost.image = encodedImage;\n }\n }\n\n\n /*ByteArrayOutputStream bYtE = new ByteArrayOutputStream();\n ImageView profile = new ImageView(getBaseContext());\n Glide.with(this.getParent()).load(FirebaseAuth.getInstance().getCurrentUser().getPhotoUrl()).into(profile);\n Bitmap imageBitmap = ((BitmapDrawable)profile.getDrawable()).getBitmap();\n imageBitmap.compress(Bitmap.CompressFormat.JPEG,100,bYtE);\n byte[] byteArray = bYtE.toByteArray();\n String encodedImage = Base64.encodeToString(byteArray, Base64.DEFAULT);*/\n newPost.imageUser = FirebaseAuth.getInstance().getCurrentUser().getPhotoUrl().toString();\n\n\n\n mDatabase.setValue(newPost);\n\n String id = FirebaseAuth.getInstance().getCurrentUser().getUid();\n if(id!=null) {\n mDatabase = FirebaseDatabase.getInstance().getReference().child(\"postattivi\").child(id).push();\n mDatabase.setValue(newPost);\n }\n\n geoFire.setLocation(newPost.key , new GeoLocation(newPost.lat,newPost.longi) );\n\n mDatabase = FirebaseDatabase.getInstance().getReference().child(\"posts\").child(key).child(\"token\").push();\n String token = FirebaseAuth.getInstance().getCurrentUser().getUid();\n mDatabase.setValue(token.toString());\n\n\n this.finish();\n }",
"@Override\r\n\tpublic void addPost(Post post) {\n\t\tgetHibernateTemplate().save(post);\r\n\t}",
"Boolean save(PostSaveDTO postSaveDTO);",
"public void post(ActionEvent actionEvent) throws IOException, ClassNotFoundException {\n Post post;\n if (postPic != null) {\n post = new Post(thisUser.getUser().getUsername(), title.getText()\n , description.getText(), new Date(), thisUser.getUser().getProfileImage(), postPic);\n post.setPostPicAddress(file.toString());\n } else {\n post = new Post(thisUser.getUser().getUsername(), title.getText()\n , description.getText(), new Date(), thisUser.getUser().getProfileImage());\n post.setPostPicAddress(\"No postPic\");\n }\n\n post.setOwner(thisUser.getUser().getUsername());\n\n CommandSender commandSender = new CommandSender(CommandType.NEWPOST\n , post);\n\n Client.getObjectOutputStream().writeObject(commandSender);\n\n thisUser.setSearchedUser(thisUser.getUser());\n Main.loadAPage(actionEvent\n , \"../FXMLs/MyProfile.fxml\"\n , \"SBUgram - Your Profile\"\n );\n\n }",
"@Override\n\tvoid post() {\n\t\t\n\t}",
"public String post();",
"@Override\n protected void validateSave(Fornecedor post) {\n\n }",
"public void doPost( )\n {\n \n }",
"int insert(PmPost record);",
"@Override\n\tpublic Post updatePost(Post post) {\n\t\treturn null;\n\t}",
"public void upload(){\n put(\"Title\",title);\n put(\"Location\",location);\n put(\"DateMonth\", dateMonth);\n put(\"DateDay\", dateDay);\n put(\"DateYear\",dateYear);\n put(\"StartHour\",startHour);\n put(\"StartMinute\", startMinute);\n put(\"EndHour\", endHour);\n put(\"EndMinute\", endMinute);\n put(\"NumGoing\",numGoing);\n put(\"Description\",description);\n put(\"Category\",category);\n put(\"Author\", author);\n put(\"Contact\", contact);\n put(\"Attending\", attending);\n saveInBackground();\n }",
"int insert(WpPostsWithBLOBs record);",
"@Override\n public void onClick(View v) {\n InputMethodManager inputManager = (InputMethodManager)getActivity().getSystemService(Context.INPUT_METHOD_SERVICE);\n\n inputManager.hideSoftInputFromWindow((null == getActivity().getCurrentFocus()) ? null : getActivity().getCurrentFocus().getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS);\n String post = editText_post.getText().toString().trim();\n\n\n\n\n //To remove the text writtrn in the edit text box\n\n if (!TextUtils.isEmpty(post)) {\n\n progressBar.setVisibility(View.VISIBLE);\n //This is used to get the user id\n final String id=databaseReference1.push().getKey();\n\n Date today = new Date();\n SimpleDateFormat format = new SimpleDateFormat(\"dd-MM-yyyy hh:mm a\");\n String dateToStr = format.format(today);\n final Post post1= new Post(post,name,id,dateToStr);\n\n\n\n if(imageUri!=null){\n storageReference.child(name+id+\".jpg\").putFile(imageUri)\n .addOnSuccessListener(new OnSuccessListener<UploadTask.TaskSnapshot>() {\n @Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n\n databaseReference1.child(id).setValue(post1);\n Toast.makeText(context,\"Post added\",Toast.LENGTH_SHORT).show();\n editText_post.setText(\"\");\n progressBar.setVisibility(View.INVISIBLE);\n postImage.setImageResource(0);\n\n NotificationManagerCompat notificationManager = NotificationManagerCompat.from(context);\n\n // notificationId is a unique int for each notification that you must define\n notificationManager.notify(notificationId, mBuilder.build());\n }\n });\n\n\n }\n\n if(imageUri==null){\n\n databaseReference1.child(id).setValue(post1);\n Toast.makeText(context,\"Post added\",Toast.LENGTH_SHORT).show();\n editText_post.setText(\"\");\n progressBar.setVisibility(View.INVISIBLE);\n postImage.setImageResource(0);\n\n NotificationManagerCompat notificationManager = NotificationManagerCompat.from(context);\n\n // notificationId is a unique int for each notification that you must define\n notificationManager.notify(notificationId, mBuilder.build());\n\n }\n\n //Set value method is used to write the data inside the database\n //Using custom Java class(Post) will automatically ensures that data is written inside the\n //database in nested tree form\n //setvalue() method overwrites the data written at the specified location\n //taking an object at once\n\n\n } else {\n Toast.makeText(context, \"Add both post and image\", Toast.LENGTH_SHORT).show();\n editText_post.setText(\"\");\n postImage.setImageResource(0);\n }\n }",
"public static Result postAddPaper() {\n Form<PaperFormData> formData = Form.form(PaperFormData.class).bindFromRequest();\n Paper info1 = new Paper(formData.get().title, formData.get().authors, formData.get().pages,\n formData.get().channel);\n info1.save();\n return redirect(routes.PaperController.listProject());\n }",
"void sendPost(String title, String body);",
"private void verifyPost() {\n if(TextUtils.isEmpty(newArticleTitle)){\n articleTitle.setError(\"Your post requires a title!\");\n articleTitle.requestFocus();\n return;\n }\n\n if(TextUtils.isEmpty(newArticleContent)){\n articleContent.setError(\"Your post requires a some content!\");\n articleContent.requestFocus();\n return;\n }\n\n // Pass in the calling activity such that official and team news are separated\n databaseReference = FirebaseDatabase.getInstance().getReference(callingActivity);\n\n String postId = databaseReference.push().getKey();\n\n NewsPost newsPost = new NewsPost(newArticleTitle, newArticleContent,\n newArticlePosterUsername, newArticlePosterProfileImage, dayDate, dayTime);\n\n databaseReference.child(postId).setValue(newsPost);\n\n // Close the activity\n finish();\n }",
"CompletableFuture<PostResponse> createNewPost(Post post);",
"public void postData()\n\t{\n\t\tnew NetworkingTask().execute(message);\n\t}",
"@Override\n public final void doPost() {\n try {\n checkPermissions(getRequest());\n final IItem jSonStreamAsItem = getJSonStreamAsItem();\n final IItem outputItem = api.runAdd(jSonStreamAsItem);\n\n output(JSonItemWriter.itemToJSON(outputItem));\n } catch (final APIException e) {\n e.setApi(apiName);\n e.setResource(resourceName);\n throw e;\n\n }\n }",
"@PostMapping(\"/posts/create\")\n public String createPost(\n Model model,\n @RequestParam(name = \"title\") String title,\n @RequestParam(name = \"body\") String body,\n @RequestParam(name = \"team\") String teamIDString,\n @RequestParam(name = \"sport\") String sportIDString) {\n\n long teamID = Long.parseLong(teamIDString);\n long sportID = Long.parseLong(sportIDString);\n\n Team thisTeam = teamRepository.findOne(teamID);\n Sport thisSport = sportRepository.findOne(sportID);\n\n\n// Which user is being assigned to this post?\n\n User foundUser = (User) SecurityContextHolder.getContext().getAuthentication().getPrincipal();\n User dbUser = userRepository.findOne(foundUser.getId());\n\n\n\n\n// Now it's time to actually make the post.\n\n Post post = new Post();\n post.setTitle(title);\n post.setBody(body);\n post.setSport(thisSport);\n post.setTeam(thisTeam);\n post.setAuthor(dbUser);\n\n postRepository.save(post);\n\n// After post is created, give user options to do something next\n\n Post createdPost = postRepository.findOne(post.getId());\n model.addAttribute(\"createdPost\", createdPost);\n\n\n// Send email commented out for now so I don't send an email every time\n\n// emailService.prepareAndSend(post, \"Congratulations James! You have been hired for this position\", \"You have been hired for this position: 1007A McDonalds Region Manager\");\n\n return \"posts/create-success\";\n }",
"@Override\n\tpublic Post createPost(Post post) {\n\t\treturn postDao.createPost(post);\n\t}",
"@Override\n\tpublic void savePost(String categoryId, String forumId, String topicId,\n\t\t\tPost post, boolean isNew, MessageBuilder messageBuilder)\n\t\t\tthrows Exception {\n\n\t}",
"@PostMapping(\"/addPost\")\n public ResponseEntity addNewPost(@RequestBody Post post){\n postService.postNewInfo(post);\n return new ResponseEntity(HttpStatus.OK);\n }",
"public List<PostEntry> savePost(String username, int postid, String title, String body){\n Connection c = null;\n PreparedStatement ps = null; \n ResultSet rs = null;\n\n boolean ret = true;\n\n //check if postid exists.\n if(postid>0 && findPost(username, postid)==null){\n return null;\n }\n try {\n //Get connection\n c = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/CS144\", \"cs144\", \"\");\n int changed;\n if(postid>0){\n //UPDATE\n System.out.println(\"update post!\");\n ps = c.prepareStatement(\"UPDATE Posts SET title=?, body=?, modified=? WHERE username=? AND postid=?\");\n ps.setString(1, title);\n ps.setString(2, body);\n ps.setTimestamp(3, new Timestamp(System.currentTimeMillis())); //set modified to current time\n ps.setString(4, username);\n ps.setInt(5, postid);\n\n changed = ps.executeUpdate();\n }\n else {\n //get largest postid and add 1 to get newID\n\n System.out.println(\"new post!\");\n ps = c.prepareStatement(\"SELECT MAX(postid) FROM Posts WHERE username=?\");\n ps.setString(1, username);\n\n rs = ps.executeQuery();\n int newID = 1;\n if(rs.next()){\n newID = rs.getInt(1) + 1;\n }\n ps.close();\n\n ps = c.prepareStatement(\"INSERT INTO Posts (username, postid, title, body, modified, created) VALUES(?,?,?,?,?,?)\");\n ps.setString(1, username);\n ps.setInt(2, newID);\n ps.setString(3, title);\n ps.setString(4, body);\n ps.setTimestamp(5, new Timestamp(System.currentTimeMillis())); //set modified to current time\n ps.setTimestamp(6, new Timestamp(System.currentTimeMillis())); //set created to current time\n \n changed = ps.executeUpdate();\n }\n\n if(changed==0){\n ret = false;\n }\n\n } catch(SQLException e){\n //error handling\n System.out.println(\"SQLException caught.\");\n e.printStackTrace();\n } finally {\n //just need to close all\n try { rs.close(); } catch (Exception e) { /* ignored */ }\n try { ps.close(); } catch (Exception e) { /* ignored */ }\n try { c.close(); } catch (Exception e) { /* ignored */ }\n }\n\n //return list data\n if(ret)\n return findList(username);\n else\n return null;\n }",
"@Override\n\tpublic void doPost(Request request, Response response) {\n\n\t}",
"public Post save(Post t) {\n\t\tSession session;\n\t\ttry {\n\t\t\tsession = sessfact.getCurrentSession();\n\t\t} catch (HibernateException e) {\n\t\t\tsession = sessfact.openSession();\n\t\t}\n\t\tTransaction trans = session.beginTransaction();\n\t\tsession.save(t);\n\t\ttrans.commit();\n\t\treturn t;\n\t}",
"public void storeBlog() {\r\n // notify user\r\n activityScreen.setString(Locale.get(\"blogManager.alert.storing\"));\r\n controller.show(activityScreen);\r\n // schedule process\r\n this.storageTerminationNotifier.schedule(new BlogStoreTerminator(), STORAGE_TIMEOUT);\r\n // start process\r\n this.prepareBlog();\r\n this.serializeBlog();\r\n }",
"@PostMapping(\"/post\")\n public String write(BoardDto boardDto) {\n boardService.savePost(boardDto);\n\n return \"redirect:/\";\n }",
"public void createPost( BlogPost post );",
"private void updatePostPut() {\n PostModel model = new PostModel(12, null, \"This is the newest one.\");\n Call<PostModel> call = jsonPlaceHolderAPI.putPosts(5, model);\n call.enqueue(new Callback<PostModel>() {\n @Override\n @EverythingIsNonNull\n public void onResponse(Call<PostModel> call, Response<PostModel> response) {\n if (!response.isSuccessful()) {\n textResult.setText(response.code());\n return;\n }\n PostModel postResponse = response.body();\n String content = \"\";\n assert postResponse != null;\n content += \"Code: \" + response.code() + \"\\n\";\n content += \"ID: \" + postResponse.getId() + \"\\n\";\n content += \"User ID: \" + postResponse.getUserId() + \"\\n\";\n content += \"Title: \" + postResponse.getTitle() + \"\\n\";\n content += \"Body: \" + postResponse.getText();\n textResult.append(content);\n }\n\n @Override\n @EverythingIsNonNull\n public void onFailure(Call<PostModel> call, Throwable t) {\n textResult.setText(t.getMessage());\n }\n });\n }",
"private void doUpdatePost(PostInfo post, TopicInfo topic, WebScriptRequest req, \r\n JSONObject json)\r\n {\n if (json.containsKey(\"title\"))\r\n {\r\n String title = (String)json.get(\"title\");\r\n post.setTitle(title);\r\n if (title.length() > 0)\r\n {\r\n topic.setTitle(title);\r\n }\r\n }\r\n \r\n // Contents is on the post\r\n if (json.containsKey(\"content\"))\r\n {\r\n post.setContents((String)json.get(\"content\"));\r\n }\r\n \r\n // Tags are on the topic\r\n if (json.containsKey(\"tags\"))\r\n {\r\n topic.getTags().clear();\r\n \r\n List<String> tags = getTags(json);\r\n if (tags != null)\r\n {\r\n topic.getTags().addAll(tags);\r\n }\r\n }\r\n \r\n // Save the topic and the post\r\n discussionService.updateTopic(topic);\r\n discussionService.updatePost(post);\r\n }",
"private void sendDataToServer() {\n\t\tcommentView = (EditText) findViewById(R.id.editComment);\n\t\tString commentToBePosted = commentView.getText().toString();\n\n\t\tboolean valid;\n\t\tvalid = checkValidityOfComment(commentToBePosted);\n\n\t\tif (valid) {\n\t\t\t// Intent intent = getIntent();\n\t\t\tPostCommentTask postComment = new PostCommentTask();\n\t\t\tpostComment.execute(commentToBePosted);\n\t\t}\n\t}",
"public void saveWalk() {\n try {\n long id = this.currentRoute.getId();\n DatabaseHandler db = new DatabaseHandler(this.getApplicationContext());\n currentRoute.setWaypoints(db.getAllWaypoints(id));\n\n HTTPPostSender postSender = new HTTPPostSender();\n postSender.buildString(currentRoute, this.getContentResolver());\n postSender.cm = (ConnectivityManager) getSystemService(this.getApplicationContext().CONNECTIVITY_SERVICE);\n\n\n\n\n if(isOnline()) {\n postSender.execute(this.currentRoute);\n Toast.makeText(this.getApplicationContext(),\"Walk successfully sent to server\",Toast.LENGTH_LONG).show();\n\n } else {\n //oh god why..\n Toast.makeText(this.getApplicationContext(),\"Something bad happened\",Toast.LENGTH_LONG).show();\n }\n } catch(Exception e) {\n Toast.makeText(this.getApplicationContext(),e.getMessage(),Toast.LENGTH_LONG).show();\n }\n }",
"public void saveToDB() {\n \twipeDB();\n\t\tSQLiteDatabase db = nodeData.getReadableDatabase();\n\t\tContentValues values = new ContentValues();\n\t\tfor (int i = 0; i < wallpapers.size(); i++) {\n\t\t\tvalues.put(EventDataSQLHelper.NODE, nodeToString(wallpapers.get(i)));\n\t\t\ttry {\t\t\t\t\n\t\t\t\tdb.insertOrThrow(EventDataSQLHelper.TABLE, null, values);\n\t\t\t\tLog.d(\"AddToDB\", nodeToString(wallpapers.get(i)));\n\t\t\t} catch (SQLException e) {\n\t\t\t\tLog.d(\"AddToDB\", \"\" + e.getMessage());\n\t\t\t}\n\t\t}\n\t\tdb.close();\n }",
"@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n //processRequest(request, response);\n int cid=Integer.parseInt(request.getParameter(\"cid\"));\n String stime=request.getParameter(\"stime\"); \n String etime=request.getParameter(\"etime\");\n int tid=Integer.parseInt(request.getParameter(\"tid\"));\n String date=request.getParameter(\"date\");\n if(request.getParameter(\"action\").equalsIgnoreCase(\"save\")){\n GroupModel gm=new GroupModel();\n gm.setCid(cid);\n gm.setStime(stime);\n gm.setEtime(etime);\n gm.setTid(tid);\n gm.setDate(date);\n System.out.println(\"cid\"+cid);\n System.out.println(\"stime\"+stime);\n System.out.println(\"tis\"+tid);\n GroupDao.insert(gm);\n\n \n }\n \n }",
"@Override\r\n\tpublic void post(Employee employee) {\n\t\t empdao.save(employee);\r\n\t}",
"@Override\n\tpublic void save(String username, String profilelocation, long tweetId, String post) {\n\t\t Document document = new Document();\n \tdocument.put(\"TweetId\", tweetId);\n\t\t\tdocument.put(\"Username\", username);\n\t\t\tdocument.put(\"ProfileLocation\", profilelocation);\n\t\t\tdocument.put(\"Content\", post);\n\t\tcollection.insertOne(document);\n\t\t\n\t}",
"private void postRequest() {\n\t\tSystem.out.println(\"post request, iam playing money\");\n\t}",
"@Override\n public void run() {\n HttpsURLConnection connPut = null;\n try {\n URL webServerUrl = new URL(DB_URL);\n\n connPut = (HttpsURLConnection) webServerUrl.openConnection();\n\n connPut.setReadTimeout(10000 /* milliseconds */);\n connPut.setConnectTimeout(15000 /* milliseconds */);\n connPut.setDoOutput(true);\n\n connPut.setRequestMethod(\"POST\");\n connPut.setRequestProperty(\"Content-type\", \"application/json\");\n AuthenticationValidator authenticationValidator = new AuthenticationValidator(context);\n String token = authenticationValidator.getAuthenticationToken();\n connPut.addRequestProperty(\"Authorization\", \"Bearer \" + token);\n connPut.connect();\n OutputStreamWriter out = new OutputStreamWriter(connPut.getOutputStream());\n\n\n\n\n for(RestRecord rr : toBePushed)\n {\n out.write(rr.getJSON().toString());\n out.flush();\n }\n out.close();\n\n if(connPut.getResponseCode() == 200)\n System.out.println(\"Successfully posted new route(s).\");\n else\n System.out.println(connPut.getResponseMessage());\n\n connPut.disconnect();\n\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n if(connPut!=null)\n connPut.disconnect();\n }\n }",
"@PostMapping(\"/posts\")\n ResponseEntity<?> createPost(@RequestBody Post post) {\n post.setOwner(SecurityContextHolder.getContext().getAuthentication().getName());\n post.setDateCreated(LocalDateTime.now());\n\n EntityModel<Post> newPost = modelAssembler.toModel(postRepository.save(post));\n return ResponseEntity.created(newPost.getRequiredLink(IanaLinkRelations.SELF).toUri()).body(newPost);\n }",
"private void postDataToSQLite() {\n if (!inputValidation.isInputEditTextFilled(nomeLogin, regNome, getString(R.string.error_message_name))) {\n return;\n }\n if (!inputValidation.isInputEditTextFilled(emailLogin, regEmail, getString(R.string.error_message_email))) {\n return;\n }\n if (!inputValidation.isInputEditTextEmail(emailLogin, regEmail, getString(R.string.error_message_email))) {\n return;\n }\n if (!inputValidation.isInputEditTextFilled(senhaLogin, regSenha, getString(R.string.error_message_password))) {\n return;\n }\n if (!inputValidation.senhaForca(senhaLogin, regSenha, getString(R.string.error_força_senha))){\n return;\n }\n if (!inputValidation.isInputEditTextFilled(senhaLoginConfirmar, regSenhaConfirmar, getString(R.string.error_message_password))) {\n return;\n }\n if (!inputValidation.isInputEditTextMatches(senhaLogin, senhaLoginConfirmar, regSenhaConfirmar, getString(R.string.error_password_match))) {\n return;\n }\n if (!databaseHelper.checkUser(emailLogin.getText().toString().trim())) {\n user.setNome(nomeLogin.getText().toString().trim());\n user.setEmail(emailLogin.getText().toString().trim());\n user.setSenha(senhaLogin.getText().toString().trim());\n databaseHelper.addUser(user);\n // Snack Bar to show success message that record saved successfully\n Snackbar.make(nestedScrollView, getString(R.string.success_message), Snackbar.LENGTH_SHORT).show();\n emptyInputEditText();\n } else {\n // Snack Bar to show error message that record already exists\n Snackbar.make(nestedScrollView, getString(R.string.error_email_exists), Snackbar.LENGTH_LONG).show();\n }\n }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == CREATE_NEW_POST) {\n if (resultCode == RESULT_OK) {\n String user = data.getStringExtra(PostingActivity.USER);\n String subject = data.getStringExtra(PostingActivity.SUBJECT);\n String question = data.getStringExtra(PostingActivity.QUESTION);\n\n Post post = new Post(user, subject, question);\n postQuestion(post);\n }\n }\n }",
"private void user_post(String uid) {\n Calendar calForDate = Calendar.getInstance();\n SimpleDateFormat currentDate = new SimpleDateFormat(\"dd-MMM-yyy\");\n String saveCurrentDate = currentDate.format(calForDate.getTime());\n\n // pic up current time\n Calendar calForTime = Calendar.getInstance();\n SimpleDateFormat currentTime = new SimpleDateFormat(\"HH:mm\");\n String saveCurrentTime = currentTime.format(calForTime.getTime());\n\n String random_key = uid + saveCurrentDate + saveCurrentTime;\n\n String post_text = et_post_text.getText().toString().trim();\n\n if (TextUtils.isEmpty(post_text)){\n Toast.makeText(getActivity(), \"Write your post first\", Toast.LENGTH_SHORT).show();\n return;\n }else {\n UploadPostModel uploadPostModel = new UploadPostModel(post_text,uid,saveCurrentTime,saveCurrentDate);\n databaseReference.child(random_key).setValue(uploadPostModel);\n et_post_text.setText(\"\");\n }\n }",
"@Override\n public void doPost(HttpServletRequest request, HttpServletResponse response) throws IOException {\n\n Entity user = LoginServlet.getUser(request);\n\n long authorId = user.getKey().getId();\n\n Filter productFilter = new FilterPredicate(\"productID\", FilterOperator.EQUAL, ideaComments.productID);\n Filter authorFilter = new FilterPredicate(\"authorId\", FilterOperator.EQUAL, authorId);\n\n CompositeFilter filter = CompositeFilterOperator.and(productFilter, authorFilter);\n Query query = new Query(\"Vote\").setFilter(filter);\n List<Entity> results = datastore.prepare(query).asList(FetchOptions.Builder.withDefaults());\n Entity taskEntity = new Entity(\"Vote\");\n if(results.size()>0){\n taskEntity = results.get(0);\n }\n Integer voteValue = Integer.parseInt(request.getParameter(\"voteValue\"));\n double sentimentAnalysisScore = 9.5;\n\n taskEntity.setProperty(\"productID\",ideaComments.productID);\n taskEntity.setProperty(\"authorId\",authorId);\n taskEntity.setProperty(\"voteValue\",voteValue);\n\n datastore.put(taskEntity);\n\n response.sendRedirect(\"/IdeaPage.html\");\n }",
"private void writeNewPost(String userId, String username, String title, String body) {\n String key = mDatabase.child(\"posts\").push().getKey();\n Post post = new Post(userId, username, title, body);\n Map<String, Object> postValues = post.toMap();\n\n Map<String, Object> childUpdates = new HashMap<>();\n childUpdates.put(\"/posts/\" + key, postValues);\n childUpdates.put(\"/user-posts/\" + userId + \"/\" + key, postValues);\n\n mDatabase.updateChildren(childUpdates);\n }",
"public void postularse() {\n\t\t\n\t\ttry {\t\t\t\n\n\t\t\tPostulante postulante= new Postulante();\n\t\t\tpostulante.setLegajo(Integer.valueOf(this.txtLegajo.getText()));\n\t\t\tpostulante.setFamiliaresACargo(Integer.valueOf(this.txtFamiliaresACargo.getText()));\n\t\t\tpostulante.setNombre(txtNombre.getText());\n\t\t\tpostulante.setApellido(txtApellido.getText());\n\t\t\t//postulante.setFechaDeNacimiento(this.txtFechaDeNaciminto.getText());\n\t\t\tpostulante.setCarrera(this.cmbCarrera.getSelectedItem().toString());\n\t\t\tpostulante.setNacionalidad(this.txtNacionalidad.getText());\n\t\t\tpostulante.setLocalidad(this.txtLocalidad.getText());\n\t\t\tpostulante.setProvincia(this.txtProvincia.getText());\n\t\t\t//postulante.setSituacionSocial(this.txtSituacionSocial.getText());\n\t\t\tpostulante.setDomicilio(this.txtDomicilio.getText());\n\t\t\tpostulante.setCodigoPostal(this.txtCodigoPostal.getText());\n\t\t\tpostulante.setEmail(this.txtEmail.getText());\n\t\t\tpostulante.setTelefono(Long.valueOf(this.txtTelefono.getText()));\n\t\t\t\n\t\t\t\n\t\t\tint ingresos=0, miembrosEconomicamenteActivos = 0;\n\t\t\tfor(Familiar familiar: familiares) {\n\t\t\t\tingresos+=familiar.getIngresos();\n\t\t\t\tif(ingresos > 0) {\n\t\t\t\t\tmiembrosEconomicamenteActivos++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tpostulante.setCantidadDeFamiliares(familiares.size());\n\t\t\tdouble promedio = Math.random() * (61) + 30 ; \n\t\t\tpostulante.setPromedio((int) promedio);\n\t\t\t\n\t\t\t\n\t\t\tint pIngresos, pActLaboral = 0, pVivienda = 0, pSalud = 0, pDependencia, pPromedio, pRendimiento, pDesarrollo;\n\t\t\t\n\t\t\t//Puntaje Ingresos\n\t\t\tint canastaBasicaPostulante = familiares.size() * canastaBasicaPromedio; \n\t\t\tif(ingresos <= canastaBasicaPostulante) {\n\t\t\t\tpIngresos = 30;\n\t\t\t}\n\t\t\telse if(ingresos >= (2*canastaBasicaPostulante)) {\n\t\t\t\tpIngresos = 0;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tpIngresos = (int) (30 - 0.15 * (familiares.size() - ingresos));\n\t\t\t}\n\t\t\t\n\t\t\t//Puntaje Condicion Actividad Laboral\n\t\t\t\n\t\t\t\n\t\t\tint puntajeMiembros = 0;\n\t\t\t\n\t\t\tfor (Familiar familiar: familiares) {\n\t\t\t\t\tif(familiar.getIngresos() == 0) {\n\t\t\t\t\t\tpuntajeMiembros = puntajeMiembros + 5;\n\t\t\t\t\t}\n\t\t\t\t\telse if(familiar.getIngresos() < salarioMinimo) {\n\t\t\t\t\t\tpuntajeMiembros = puntajeMiembros + 3;\n\t\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif(miembrosEconomicamenteActivos>0) {\n\t\t\tpActLaboral = puntajeMiembros/miembrosEconomicamenteActivos;\n\t\t\t}\n\t\t\t\n\t\t\t//Puntaje Vivienda - Extrae de cmbVivienda: 0 sin deudas - 1 con deudas - 2 sin propiedad\n\t\t\tint condicionVivienda = this.cmbVivienda.getSelectedIndex();\n\t\t\tswitch (condicionVivienda) {\n\t\t\tcase 0:\n\t\t\t\tpVivienda = 0;\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\tpVivienda = 3;\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tpVivienda = 5;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\t//Puntaje Salud - Extrae de cmbSalud: 0 tiene obra - 1 cobertura parcial - 2 no tiene\n\t\t\tint condicionSalud = this.cmbSalud.getSelectedIndex();\n\t\t\tswitch (condicionSalud) {\n\t\t\tcase 0:\n\t\t\t\tpSalud = 0;\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\tpSalud = 3;\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tpSalud = 5;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\t//Puntaje Dependencia\n\t\t\tif (familiares.size() - miembrosEconomicamenteActivos == 0) {\n\t\t\t\tpDependencia = 0;\n\t\t\t}\n\t\t\telse if(familiares.size() - miembrosEconomicamenteActivos > 2) {\n\t\t\t\tpDependencia = 5;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tpDependencia = 3;\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t//Puntaje Rendimiento académico\n\t\t\tint materiasAprobadas = (int) (Math.random() * (11));\n\t\t\tif(materiasAprobadas == 0) {\n\t\t\t\tpRendimiento = 4;\n\t\t\t\tpPromedio = 14;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tint materiasRegularizadas = (int) (Math.random() * (41 - materiasAprobadas));\n\t\t\t\tpRendimiento = materiasAprobadas/materiasRegularizadas * 10;\n\t\t\t//Puntaje Promedio: Se recuperaria del sysacad\n\t\t\t\tpPromedio = (int) (promedio/10 * 3.5);\n\t\t\t}\n\t\t\t\n\t\t\t//Puntaje Plan Desarrollo: Evaluado por comisión local\n\t\t\tpDesarrollo = (int) (Math.random() * 5 + 1);\n\n\n\t\t\tpuntaje = pIngresos + pActLaboral + pVivienda + pSalud + pDependencia + pPromedio + pRendimiento + pDesarrollo;\n\t\t\tpostulante.setMatAprobadas(materiasAprobadas);\n\t\t\t\n\t\t\ttry{ \n\t\t\t\tcontroller.postular(postulante,puntaje); \n\t\t\t\tJOptionPane.showMessageDialog(null, \"Se postuló al alumno \"+postulante.getNombre()+\" \"+postulante.getApellido()+\".\", \"Postulación exitosa.\", JOptionPane.OK_OPTION);\n\t\t\t\tlimpiarCampos();\n\t\t\t} \n\t\t\tcatch(Exception ex) {\n\t\t\t\tex.printStackTrace();\n\t\t\t\tJOptionPane.showMessageDialog(null, \"No se pudo postular el alumno\", \"Error\", JOptionPane.OK_OPTION);\n\t\t\t}\n\n\t\t\t\n\t\t}\n\t\tcatch(Exception ex) {\n\t\t\tex.printStackTrace();\n\t\t\tJOptionPane.showMessageDialog(null, \"Datos incorrectos\", \"Error\", JOptionPane.OK_OPTION);\n\t\t}\n\t\t\n\t}",
"@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n //sendet die Bewertungsdaten an den SubmitRatingDataBaseHelper\n String hotelID = String.valueOf(request.getParameter(\"hotelID\"));\n String heading = String.valueOf(request.getParameter(\"heading\"));\n String comment = String.valueOf(request.getParameter(\"comment\"));\n String rating = String.valueOf(request.getParameter(\"rating\"));\n SubmitRatingDataBaseHelper dbHelper = new SubmitRatingDataBaseHelper();\n dbHelper.writeRatingToDB(hotelID, heading, comment, rating);\n processRequest(request, response);\n }",
"Post save(Post post, Long authorId, String category);",
"@Override\n public void onClick(View view) {\n CreatePost createPost = new CreatePost(context, selectedPic);\n createPost.execute(title.getText().toString(), description.getText().toString());\n }",
"public long ashirPostCreating(AshirBlogPostingHelper post) {\n long result;\n\n SQLiteDatabase db = this.getWritableDatabase();\n ContentValues values = new ContentValues();\n values.put(Col_2, post.getPost());\n values.put(Col_3, post.getImage());\n //inserting valuse into table columns\n result = db.insert(NAME_OF_TABLE, null, values);\n db.close();\n return result;\n\n }",
"@Override\n\tpublic void post(javax.websocket.Session userSession) throws IOException {\n\t\tConfiguration conf = new Configuration().configure();\n\t\tServiceRegistry sr = new StandardServiceRegistryBuilder()\n\t\t\t\t.applySettings(conf.getProperties()).build();\n\t\tSessionFactory sf = conf.buildSessionFactory(sr);\n\t\tSession session = sf.openSession();\n\t\tTransaction tx = session.beginTransaction();\n\n\t\tStringReader reader = new StringReader(mo.getNote());\n\t\tJsonReader jsonReader = Json.createReader(reader);\n\t\tJsonObject jsonObject = jsonReader.readObject();\n\n\t\tjsonReader.close();\n\n\t\t// Get whiteboard on name parameter here from hibernate class Whiteboard\n\t\tQuery query = session\n\t\t\t\t.createQuery(\"SELECT w FROM Whiteboard w WHERE w.whiteboard=\"\n\t\t\t\t\t\t+ \"'\" + mo.getOperate() + \"'\");\n\t\tList<?> whiteboards = query.list();\n\t\tWhiteboard wb = null;\n\n\t\tfor (int i = 0; i < whiteboards.size(); i++) {\n\t\t\twb = (Whiteboard) session.get(Whiteboard.class,\n\t\t\t\t\t((Whiteboard) whiteboards.get(i)).getId());\n\t\t}\n\n\t\tString title = jsonObject.getString(\"title\");\n\t\tString information = jsonObject.getString(\"information\");\n\n\t\tboolean yellow = jsonObject.getJsonObject(\"color\").getBoolean(\"yellow\");\n\t\tboolean green = jsonObject.getJsonObject(\"color\").getBoolean(\"green\");\n\t\tboolean blue = jsonObject.getJsonObject(\"color\").getBoolean(\"blue\");\n\t\tboolean red = jsonObject.getJsonObject(\"color\").getBoolean(\"red\");\n\n\t\tPostIt p = new PostIt(title, information, wb);\n\n\t\tsession.save(p);\n\t\tsession.persist(p);\n\n\t\tColor c = new Color(yellow, green, blue, red, p.getId());\n\n\t\tsession.save(c);\n\n\t\ttx.commit();\n\t\tsf.close();\n\n\t\tfor (javax.websocket.Session s : userSession.getOpenSessions()) {\n\t\t\ts.getBasicRemote().sendText(\"refresh\");\n\t\t}\n\t}",
"@PostMapping(\"/\")\n private ResponseEntity<Post> createPost(@RequestBody Post post) {\n User user = getCurrentUser();\n post.setCreated(new Date());\n post.setUserId(user.getId());\n post = postService.add(post);\n\n return new ResponseEntity<>(post, HttpStatus.OK);\n }",
"void storeEditorData(int userid,String name,Object bodyContent){\n dbConnection();\n try{\n PGobject editorData = new PGobject();\n editorData.setType(\"json\");\n editorData.setValue(bodyContent.toString());\n\n stmt = con.prepareStatement(\"INSERT INTO editorData(name,bodyContent,userid)VALUES(?,?,?)\");\n stmt.setString(1,name);\n stmt.setObject(2,editorData);\n stmt.setInt(3,userid);\n\n stmt.executeUpdate();\n }\n catch(Exception e){\n e.printStackTrace();\n }\n finally{\n closeConnection();\n }\n \n }",
"@Override\n protected void doPost(HttpServletRequest req, HttpServletResponse resp) {\n }",
"public void save();",
"public void save();",
"public void save();",
"public void save();",
"@Override\n public void onClick(View view) {\n if(!lastIntent.getBooleanExtra(\"isNew\", true)) {\n if (isValidPost(editTitle.getText().toString(), editDescription.getText().toString(), editBody.getText().toString(), editDeadline.getText().toString(), editPayment.getText().toString())) {\n String key = lastIntent.getBundleExtra(\"post\").getString(\"id\");\n Post post = new Post(editTitle.getText().toString(), editDeadline.getText().toString(), editPayment.getText().toString(), editDescription.getText().toString(), editBody.getText().toString(), mUser.getUid(), key);\n Map<String, Object> postValues = post.toMap();\n Map<String, Object> childUpdates = new HashMap<>();\n Map<String, Object> userUpdates = new HashMap<>();\n\n childUpdates.put(\"/posts/\" + key, postValues);\n userUpdates.put(\"/users/\" + FirebaseAuth.getInstance().getCurrentUser().getUid() + \"/posts/\" + key, postValues);\n\n mDatabase.updateChildren(childUpdates);\n mDatabase.updateChildren(userUpdates);\n\n startActivity(new Intent(getApplicationContext(), HomeWithDrawer.class));\n }\n }\n\n //Otherwise we will create a a new post. Find a way to simplify these two blocks!!\n else {\n if (isValidPost(editTitle.getText().toString(), editDescription.getText().toString(), editBody.getText().toString(), editDeadline.getText().toString(), editPayment.getText().toString())) {\n\n String key = mDatabase.child(\"posts\").push().getKey();\n //System.out.println(\"Make Post Description: \" + editDescription.getText().toString());\n Post post = new Post(editTitle.getText().toString(), editDeadline.getText().toString(), editPayment.getText().toString(), editDescription.getText().toString(), editBody.getText().toString(), mUser.getUid(), key);\n Map<String, Object> postValues = post.toMap();\n Map<String, Object> childUpdates = new HashMap<>();\n Map<String, Object> userUpdates = new HashMap<>();\n childUpdates.put(\"/posts/\" + key, postValues);\n userUpdates.put(\"/users/\" + FirebaseAuth.getInstance().getCurrentUser().getUid() + \"/posts/\" + key, postValues);\n\n mDatabase.updateChildren(childUpdates);\n mDatabase.updateChildren(userUpdates);\n\n Intent listenerIntent = new Intent(getApplicationContext(), NotificationListener.class);\n\n postBundle = new Bundle();\n postBundle.putString(\"postId\", key);\n postBundle.putString(\"postTitle\", editTitle.getText().toString());\n listenerIntent.putExtra(\"requestInfo\", postBundle);\n\n //Starts the NotificationListener for the post described by the postBundle.\n startService(listenerIntent);\n startActivity(new Intent(getApplicationContext(), HomeWithDrawer.class));\n }\n }\n }",
"Product postProduct(Product product);",
"@Override\r\n\tpublic void post(Article article) {\n\t\tarticleDao.post(article);\r\n\t\t\r\n\t}",
"public boolean save(BlogComment blogComment);",
"protected abstract void sendNewPost(Discussion discussion, Post post);",
"@Override\n\tpublic Post toPost(PostDto postDto ) {\n\t\treturn new Post(employeeDao.readEmployeeById(postDto.getEmployeeId()), postDto.getBody(), LocalDateTime.now(), ticketDao.readTicket(postDto.getTicketId()));\n\t}",
"void post(Post post) {\n if (post instanceof Video) {\n vd.compressVideo((Video) post);\n } else if (post instanceof Image) {\n id.decorateImage((Image) post);\n } else if (post instanceof Text) {\n tg.checkGrammar((Text) post);\n }\n }",
"public void saveData(){\n SerializableManager.saveSerializable(this,user,\"userInfo.data\");\n SerializableManager.saveSerializable(this,todayCollectedID,\"todayCollectedCoinID.data\");\n SerializableManager.saveSerializable(this,CollectedCoins,\"collectedCoin.data\");\n uploadUserData uploadUserData = new uploadUserData(this);\n uploadUserData.execute(this.Uid);\n System.out.println(Uid);\n\n }",
"@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tMongoDBPersonDAO personDao=new MongoDBPersonDAO();\n\t\tPart part=req.getPart(\"file\");\n\t\ttry (BufferedReader buffer=new BufferedReader(new InputStreamReader(part.getInputStream()))){\n\t\t\tString line=null;\n\t\t\tList<String> stList=new ArrayList<String>();\n\t\t\twhile(null != (line = buffer.readLine())) {\n\t\t\t\tstList.add(line);\n\t\t\t\tSystem.out.println(line);\n\t\t\t}\n\t\t\tpersonDao.saveAll(stList);\n\t\t\treq.setAttribute(\"success\", \"Person Added Successfully\");\n\t\t\tList<Student> persons = personDao.readAllPerson();\n\t\t\treq.setAttribute(\"persons\", persons);\n\t\t\t\n\t\t}catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tRequestDispatcher rd = getServletContext().getRequestDispatcher(\"/view/persons.jsp\");\n\t\trd.forward(req, resp);\n\t}",
"public void setPost(WPPost post) {this.post = post;}",
"@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n\n String savePath = request.getServletContext().getRealPath(\"/\") + \"images\";\n File fileSaveDir=new File(savePath);\n if(!fileSaveDir.exists()){\n fileSaveDir.mkdir();\n }\n\n \n Part imagePart = request.getPart(\"photo\");\n String fileName = extractFileName(imagePart);\n String fileLocalPath = File.separator + fileName;\n imagePart.write(savePath + fileLocalPath);\n String description = request.getParameter(\"description\");\n \n Conexion c=new Conexion();\n Connection con=c.getConexion();\n CallableStatement cs = null;\n \n try{\n String query = \"call sp_pv_insertPost(?,?,1)\";\n cs = con.prepareCall(query);\n cs.setString(1, fileLocalPath);\n cs.setString(2, description);\n cs.execute(); \n }catch(SQLException e){\n e.printStackTrace();\n }finally{\n BDUtil.cerrarStatement(cs);\n c.cerrarConexion();\n }\n \n response.setContentType(\"text/plain\"); \n response.setCharacterEncoding(\"UTF-8\");\n response.getWriter().write(\"success\"); \n \n }",
"private void saveToDb() {\r\n ContentValues values = new ContentValues();\r\n values.put(DbAdapter.KEY_DATE, mTime);\r\n if (mPayeeText != null && mPayeeText.getText() != null)\r\n \tvalues.put(DbAdapter.KEY_PAYEE, mPayeeText.getText().toString());\r\n if (mAmountText != null && mAmountText.getText() != null)\r\n \tvalues.put(DbAdapter.KEY_AMOUNT, mAmountText.getText().toString());\r\n if (mCategoryText != null && mCategoryText.getText() != null)\r\n \tvalues.put(DbAdapter.KEY_CATEGORY, mCategoryText.getText().toString());\r\n if (mMemoText != null && mMemoText.getText() != null)\r\n \tvalues.put(DbAdapter.KEY_MEMO, mMemoText.getText().toString());\r\n if (mTagText != null && mTagText.getText() != null)\r\n \tvalues.put(DbAdapter.KEY_TAG, mTagText.getText().toString());\r\n\r\n \tif (Utils.validate(values)) {\r\n \t\tmDbHelper.open();\r\n \t\tif (mRowId == null) {\r\n \t\t\tlong id = mDbHelper.create(values);\r\n \t\t\tif (id > 0) {\r\n \t\t\t\tmRowId = id;\r\n \t\t\t}\r\n \t\t} else {\r\n \t\t\tmDbHelper.update(mRowId, values);\r\n \t\t}\r\n \t\tmDbHelper.close();\r\n \t}\r\n\t}",
"public void create(Post post) {\r\n jdbcOp.update(SQL_INSERT_TICKET,\r\n post.getCustomerName(),\r\n post.getSubject(), \r\n post.getBody(),\r\n post.getCategories());\r\n// for (String role : user.getRoles()) {\r\n// jdbcOp.update(SQL_INSERT_ROLE,\r\n// user.getUsername(),\r\n// role); \r\n }",
"public boolean addPost(Post post) throws SQLException\n {\n boolean isAdded=false;\n try\n {\n database = dbH.getReadableDatabase();\n dbH.openDataBase();\n ContentValues values = new ContentValues();\n values.put(\"postBody\", post.getPostBody());\n values.put(\"postedBy\", post.getPostedBy());\n values.put(\"postedAt\", post.getPostedAt());\n values.put(\"postID\", post.getPostID());\n values.put(\"image\" , post.getBitmap());\n\n isAdded=database.insert(\"Post\", null, values)>0;\n\n }\n catch(SQLException e)\n {\n e.printStackTrace();\n }\n finally{\n if(database!=null && database.isOpen())\n dbH.close();\n }\n return isAdded;}",
"@Override\n public Post createPost(Post post, String token) throws TokenException {\n User user = sender.getUserFromUserAPI(token);\n if (user == null) {\n logger.info(\"Invalid token: \"+ token +\" User could not be retrieved\");\n throw new TokenException(\"Invalid Token.\");};\n post.setUserId(user.getUserId());\n post.setUser(user);\n Post savedPost = postRepository.save(post);\n return savedPost;\n }",
"public String getPost() {\r\n return post;\r\n }",
"public WPPost getPost() {return post;}",
"@RequestMapping(value = \"/newPost\", method = RequestMethod.POST)\n\tpublic String setNewPost(@ModelAttribute(\"post\") @Valid Post post, BindingResult result, ModelMap model) {\n\n\t\tif (result.hasErrors()) {\n\t\t\tSystem.out.println(\"There are errors newPost\");\n\t\t\tmodel.addAttribute(\"allpostTypes\", postService.AllPostType());\n\t\t\treturn \"/admin/post/newPost\";\n\t\t}\n\n\t\tpost = createPost(post);\n\n\t\tLike like = new Like();\n\t\tlike.setPost(post);\n\t\tlikeService.saveLike(like);\n\n\t\tUser user = userService.findUserByUsername(getPrincipal());\n\t\tpost.setUser(user);\n\t\tpostService.updatePost(post);\n\n\t\tmodel.addAttribute(\"operationmessage\",\n\t\t\t\tmessageSource.getMessage(\"message.newpost.success\", null, LocaleContextHolder.getLocale()));\n\t\treturn \"redirect:/profile/\" + getPrincipal();\n\t}",
"private void postEvent(){\n final Map<String, Object> eventDocData = new HashMap<>();\n eventDocData.put(\"address\", newEvent.getAddress());\n eventDocData.put(\"author\", newEvent.getAuthor());\n eventDocData.put(\"categories\", newEvent.getCategories());\n eventDocData.put(\"date\", newEvent.getDate());\n eventDocData.put(\"description\", newEvent.getDescription());\n eventDocData.put(\"distanceFromUser\", 0);\n eventDocData.put(\"event18\", false);\n eventDocData.put(\"event21\", false);\n eventDocData.put(\"eventKey\", newEvent.getEventKey());\n eventDocData.put(\"lat\", newEvent.getLat());\n eventDocData.put(\"lon\", newEvent.getLon());\n eventDocData.put(\"notificationOnly\", null);\n eventDocData.put(\"paid\", true);\n eventDocData.put(\"radius\", null);\n eventDocData.put(\"time\", null);\n\n //Compress and Upload\n purchaseProgressBar.setVisibility(View.VISIBLE);\n\n //Compress Image\n File profileImgFile = new File(mainImgURI.getPath());\n try {\n compressedImageFile = new Compressor(PurchaseEventActivity.this).setQuality(85).compressToBitmap(profileImgFile);\n } catch (IOException e) {\n e.printStackTrace();\n }\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n compressedImageFile.compress(Bitmap.CompressFormat.JPEG, 100, baos);\n byte[] imgData = baos.toByteArray();\n\n //Upload Img & Name\n UploadTask setupUpload = storageReference.child(\"events\").child(newEvent.getEventKey() + \".jpg\").putBytes(imgData);\n\n setupUpload.addOnSuccessListener(new OnSuccessListener<UploadTask.TaskSnapshot>() {\n @Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n Uri download_uri = taskSnapshot.getDownloadUrl();\n eventDocData.put(\"pathToImage\", download_uri);\n\n //Send to Firebase\n firebaseFirestore.collection(\"events\").document(newEvent.getEventKey())\n .set(eventDocData)\n .addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void aVoid) {\n Toast.makeText(PurchaseEventActivity.this, \"Event Posted!\", Toast.LENGTH_SHORT).show();\n Intent mainIntent = new Intent(PurchaseEventActivity.this, MainActivity.class);\n startActivity(mainIntent);\n finish();\n }\n })\n .addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n purchaseProgressBar.setVisibility(View.INVISIBLE);\n Toast.makeText(PurchaseEventActivity.this, \"There Was an Issue Posting Your Event. Please Contact Support.\", Toast.LENGTH_LONG).show();\n }\n });\n }\n }).addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n String error = e.getMessage();\n Toast.makeText(PurchaseEventActivity.this, \"Posting Error. Please Contact Support.\", Toast.LENGTH_LONG).show();\n\n purchaseProgressBar.setVisibility(View.INVISIBLE);\n }\n });\n }",
"public void submitInfoButton(View v) {\n //each entry needs a unique ID\n Business newBusiness = new Business();\n String newKey = appState.firebaseReference.push().getKey();\n newBusiness.setName(nameField.getText().toString());\n newBusiness.setPrimaryBusiness(primaryBusinessField.getText().toString());\n newBusiness.setBusinessNumber(numberField.getText().toString());\n newBusiness.setAddress(addressField.getText().toString());\n newBusiness.setProvince(provinceField.getSelectedItem().toString());\n\n appState.firebaseReference.child(newKey).setValue(newBusiness,\n new DatabaseReference.CompletionListener(){\n @Override\n public void onComplete(DatabaseError databaseError, DatabaseReference databaseReference){\n if(databaseError != null){\n Toast toast = Toast.makeText(appState, \"Error: Creation failed!\",\n Toast.LENGTH_LONG);\n toast.show();\n } else {\n finish();\n Toast toast = Toast.makeText(appState, \"Business entry created\",\n Toast.LENGTH_LONG);\n toast.show();\n }\n }\n });\n }",
"public String onPostPers() {\n \r\n JobOffer c=categoryMetier.findJobOfferById(idCategorySelected);\r\n filDiscussion.setCategory(c);\r\n filDiscussion.setDateDiscussion(new java.util.Date());\r\n\r\n this.filDiscussionMetier.update(this.filDiscussion);\r\n return\"Forum\";\r\n }",
"@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n PrintWriter out = response.getWriter();\n DBManager dbmanager = (DBManager) getServletContext().getAttribute(\"dbmanager\");\n User user = (User) request.getSession().getAttribute(\"user\");\n String groupIdParam = request.getParameter(\"id\");\n int groupId = groupIdParam != null ? Integer.parseInt(groupIdParam) : 0;\n Group group = dbmanager.getGroup(groupId);\n if (group == null) {\n HTML.print404(out);\n } else {\n MultipartRequest multipart = new MultipartRequest(request, group.getFilesRealPath(request), 10 * 1024 * 1024, \"UTF-8\", new DefaultFileRenamePolicy());\n String text = multipart.getParameter(\"text\");\n\n dbmanager.addPost(groupId, user.getId(), text);\n LinkedList<db.Post> posts = dbmanager.getGroupPosts(group);\n db.Post ultimo = posts.getLast();\n dbmanager.addGroupFiles(ultimo, multipart);\n response.sendRedirect(\"/forum/group?id=\" + groupId);\n }\n }",
"public String getPost() {\n return post;\n }",
"public String getPost() {\n return post;\n }",
"@Override\n\tpublic void post(BookCopies object) throws SQLException {\n\t\t\n\t}",
"@Override\n\n\tpublic void handlePOST(CoapExchange exchange) {\n\t\tFIleStream read = new FIleStream();\n\t\tread.tempWrite(Temp_Path, exchange.getRequestText());\n\t\texchange.respond(ResponseCode.CREATED, \"POST successfully!\");\n\t\t_Logger.info(\"Receive post request:\" + exchange.getRequestText());\n\t}",
"private void dataSubmission() {\n getPreferences(); // reload all the data\n\n String jsonObjectString = createJsonObject();\n StringBuilder url = new StringBuilder();\n url.append(serverUrl);\n\n if (vslaName == null || numberOfCycles == null || representativeName == null || representativePost == null\n || repPhoneNumber == null || grpBankAccount == null || physAddress == null\n || grpPhoneNumber == null || grpSupportType == null) {\n flashMessage(\"Please Fill all Fields\");\n\n } else if (IsEditing.equalsIgnoreCase(\"1\")) {\n url.append(\"editVsla\");\n new HttpAsyncTaskClass().execute(url.toString(), jsonObjectString);\n saveVslaInformation();\n\n } else { // Creating a new VSLA\n url.append(\"addNewVsla\");\n new HttpAsyncTaskClass().execute(url.toString(), jsonObjectString);\n saveVslaInformation();\n }\n }",
"public void parsePost()\n {\n Hashtable table = new Hashtable();\n try\n {\n\n String[] pairs = Utilities.splitString(content, \"&\");\n for (int i = 0; i < pairs.length; i++)\n {\n String[] pair = Utilities.splitString(pairs[i], \"=\");\n table.put(pair[0], pair[1]);\n }\n Variables.updateTableWithTable(table);\n Variables.save();\n }\n catch (Exception e)\n {\n Utilities.debugLine(\"WebServer.parsePost(): ERROR\" + content, DEBUG);\n }\n Utilities.debugLine(\"WebServer.parsePost(): Variables were \" + content, DEBUG);\n Utilities.debugLine(\"WebServer.parsePost(): HASHTABLE = \" + table.toString(), DEBUG);\n\n }",
"@Override\n @Transactional\n public void onSubmit() {\n ValueMap values = getModelObject();\n\n // check if the honey pot is filled\n if (StringUtils.isNotBlank((String)values.get(\"comment\")))\n {\n error(\"Caught a spammer!!!\");\n return;\n }\n // Construct a copy of the edited comment\n Snip snip = new Snip();\n SnipMeta meta= new SnipMeta();\n\n logger.info(this.getDefaultModel().toString());\n\n logger.info(((List<String>) values.get(\"select_all\")).toString());\n\n meta.setTags((ArrayList<String>)values.get(\"select_all\"));\n meta.setDescription((String) values.get(\"meta\"));\n\n\n // Set date of comment to add\n snip.setDate(new Date());\n snip.setCode((String)values.get(\"code\"));\n snipList.add(0, snip); //TODO: eliminare lo show di tutti gli snipp da snipList magari con una FIFO\n meta.setSnip(snip);\n\n\n //--------- get session ad manager ------\n MyAuthenticatedWebSession app_session = MyAuthenticatedWebSession.getYourAppSession();\n logger.info(\"web session is: \"+app_session.toString());\n EntityManager em = app_session.getEntityManager();\n //---------------------------------------------------\n\n Users tmp_id = em.find(Users.class ,app_session.getAttribute(\"user\"));\n //snip.setUser(app_session.getCurrentUser()); --less network more backend\n snip.setUser(tmp_id);\n em.getTransaction().begin();\n em.setFlushMode(COMMIT);\n em.persist(snip);\n em.persist(meta);\n em.flush();\n em.getTransaction().commit();\n\n\n // Clear out the text component\n values.put(\"code\", \"\");\n }",
"@Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n Uri downloadUrl = taskSnapshot.getDownloadUrl();\n //Log.d(\"asd\", downloadUrl.toString());\n Post p = new Post(String.valueOf(downloadUrl),\n titleText.getText().toString(),\n descText.getText().toString(),\n Double.parseDouble(priceText.getText().toString()),\n conditionSpinner.getSelectedItem().toString(),\n nameText.getText().toString());\n\n\n Map<String, Object> postValues = p.toMap();\n Map<String,Object> childUpdates = new HashMap<>();\n childUpdates.put(key, postValues);\n mPostsRef.updateChildren(childUpdates);\n }",
"boolean postReimbursementToDataBase(int amount, String description, int author, int statusId, int typeId);",
"void editMyPost(Post post);",
"@RequestMapping(value = \"/blog/newpost\", method = RequestMethod.POST)\n\tpublic String newPost(HttpServletRequest request, Model model) {\n\t\tString title=request.getParameter(\"title\");\n\t\tString body=request.getParameter(\"body\");\n\t\t\n\t\t//Validate parameters if not valid send back to form w/ error message\n\t\tif (title==\"\" || body==\"\"){\n\t\t\tif (title!=\"\"){\n\t\t\t\tmodel.addAttribute(\"title\",title);\n\t\t\t}\n\t\t\tif(body!=\"\"){\n\t\t\t\tmodel.addAttribute(\"body\",body);\n\t\t\t}\n\t\t\tmodel.addAttribute(\"error\",\"Post must have a Title and Body!\");\n\t\t\treturn \"newpost\";\n\t\t}\n\t\t\n\t\t//if they validate, create a new post\n\t\tInteger userId = (Integer) request.getSession().getAttribute(AbstractController.userSessionKey);\n\t\tUser author= userDao.findByUid(userId);\n\t\tPost post = new Post(title,body,author);\n\t\tpostDao.save(post);\n\t\tmodel.addAttribute(\"post\", post);\n\t\treturn \"redirect:\"+ post.getAuthor().getUsername()+\"/\"+ post.getUid(); \t\t\n\t}",
"public Post(String user, String postContent, String webAddress) {\n this.orderPosted = nextOrderPosted;\n nextOrderPosted++;\n this.user = user;\n this.postContent = postContent;\n this.webAddress = webAddress;\n// this.myAuthor=myAuthor;\n\n }"
] | [
"0.77281755",
"0.70232725",
"0.70061004",
"0.67999697",
"0.65096664",
"0.64882183",
"0.64673805",
"0.64040804",
"0.6352017",
"0.6322772",
"0.6297334",
"0.61991507",
"0.6152415",
"0.61311626",
"0.6115919",
"0.61158425",
"0.6114486",
"0.60995024",
"0.6095763",
"0.60937256",
"0.60881937",
"0.6075928",
"0.60476077",
"0.60391504",
"0.6030038",
"0.60262036",
"0.60082024",
"0.60007733",
"0.5983717",
"0.5978987",
"0.5977302",
"0.5974329",
"0.5940581",
"0.5938512",
"0.5934376",
"0.59149975",
"0.5914865",
"0.59010327",
"0.5897866",
"0.58833236",
"0.58747566",
"0.5873345",
"0.5867176",
"0.5863519",
"0.5862776",
"0.5861595",
"0.5861282",
"0.58483857",
"0.5844672",
"0.5840204",
"0.5824984",
"0.5823637",
"0.5806278",
"0.58031803",
"0.58026695",
"0.5793773",
"0.57912236",
"0.5788536",
"0.57834744",
"0.5780948",
"0.57494754",
"0.57369",
"0.5709106",
"0.5709106",
"0.5709106",
"0.5709106",
"0.57005924",
"0.5699746",
"0.5697165",
"0.56935716",
"0.568524",
"0.5682312",
"0.56798327",
"0.56797254",
"0.567903",
"0.56758016",
"0.56757253",
"0.566943",
"0.5664465",
"0.56577855",
"0.56547064",
"0.56325316",
"0.5629754",
"0.5599723",
"0.55985427",
"0.5586598",
"0.5584759",
"0.55792403",
"0.55738276",
"0.55738276",
"0.5572823",
"0.557062",
"0.5570169",
"0.5565341",
"0.55605054",
"0.5555829",
"0.5551989",
"0.5550103",
"0.5548602",
"0.5548575"
] | 0.8038899 | 0 |
Find all Posts in the database | List<Post> findAllPosts(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Iterable<Post> findAll(){\n return postDao.findAll();\n }",
"List<Post> findAll();",
"public List<Post> retriveAllPosts()\n\t {\n\t\t List<Post> Posts =(List<Post>) Postrepository.findAll();\n\t\t \n\t\t for(Post Post :Posts)\n\t\t {\n\t\t\t //l.info(\"Post +++ :\" +Post);\n\t\t }\n\t\t return Posts;\n\t\t\t \n\t }",
"public List<Post> findAll() {\n\t\tSession session;\n\t\ttry {\n\t\t\tsession = sessfact.getCurrentSession();\n\t\t} catch (HibernateException e) {\n\t\t\tsession = sessfact.openSession();\n\t\t}\n\t\tTransaction trans = session.beginTransaction();\n\t\tList<Post> list = session.createQuery(\"from Post\", Post.class).list();\n\t\ttrans.commit();\n\n\t\treturn list;\n\t}",
"@Override\r\n\tpublic List<Post> getAllPost() {\n\t\tString hql = \"from Post\";\r\n\t\treturn (List<Post>) getHibernateTemplate().find(hql);\r\n\t}",
"protected void queryPosts() {\n ParseQuery<Post> query = ParseQuery.getQuery(Post.class);\n //get all the post objects from the database\n query.include(Post.KEY_USER);\n //set the limit to 20 posts being retrieved\n query.setLimit(POSTS_QUERY_LIMIT);\n\n query.addDescendingOrder(Post.KEY_CREATED_KEY);\n\n query.findInBackground(new FindCallback<Post>() {\n @Override\n public void done(List<Post> posts, ParseException e) {\n // e == null if success\n if (e != null) {\n Log.e(TAG, \"Issue with getting posts\", e);\n return;\n }\n\n for (Post post : posts) {\n Log.i(TAG, \"Post: \" + post.getDescription() + \", username: \" + post.getUser().getUsername());\n }\n adapter.clear();\n allPosts.addAll(posts);\n adapter.notifyDataSetChanged();\n }\n });\n }",
"@Override\r\n\tpublic List<Post> findAll() {\n\t\treturn codeblogRepository.findAll();\r\n\t}",
"public static ResultSet getPosts(){\n ResultSet result = null;\n try {\n conn = ConnectionProvider.getCon();\n pst = conn.prepareStatement(\"select * from normalposts\");\n result = pst.executeQuery();\n\n System.out.println(\"PostDAO: getting posts\");\n } catch(Exception e) {\n System.out.println(\"PostDAO: unsuccessful query\");\n System.out.println(e);\n }\n return result;\n }",
"List<Post> getAllPost() throws Exception;",
"public Iterable<Post> listAllPosts();",
"@Override\n\tpublic void getAll() {\n\t\tArrayList<Post> list = new ArrayList<Post>();\n\t\tlist = dao.selectAll();\n\t\t\n\t\tfor (Post p : list) {\n\t\t\tSystem.out.println(p.getPostId() + \".\" + p.getPostName() + \" 작성자:\" + p.getMemberId());\n\t\t}\n\t}",
"@Override\r\n public List<Post> findAll() {\r\n List<Post> posts = new ArrayList<>();\r\n List<Map<String, Object>> rows = jdbcOp.queryForList(SQL_SELECT_ALL_TICKET);\r\n\r\n for (Map<String, Object> row : rows) {\r\n Post post = new Post();\r\n \r\n int id = (int)row.get(\"id\");\r\n post.setId(id); \r\n \r\n String customername = (String)row.get(\"customername\");\r\n post.setCustomerName(customername); \r\n \r\n String subject = (String)row.get(\"subject\");\r\n post.setSubject(subject);\r\n \r\n String body = (String)row.get(\"body\");\r\n post.setBody(body);\r\n \r\n String categories = (String)row.get(\"categories\");\r\n post.setCategories(categories);\r\n \r\n posts.add(post);\r\n }\r\n return posts;\r\n }",
"protected void queryPosts()\n {\n ParseQuery<Post> query = ParseQuery.getQuery(Post.class);\n query.include(Post.KEY_USER);\n query.whereEqualTo(Post.KEY_USER, ParseUser.getCurrentUser());\n query.setLimit(20);\n query.addDescendingOrder(Post.KEY_CREATED_AT);\n query.findInBackground(new FindCallback<Post>() {\n @Override\n public void done(List<Post> posts, ParseException e)\n {\n if(e != null)\n {\n Log.e(TAG, \"Issue with getting posts\", e);\n }\n for(Post post : posts)\n {\n Log.i(TAG, \"Post: \" + post.getDescription() + \", username\" + post.getUser().getUsername());\n }\n adapter.clear();\n allPosts.addAll(posts);\n swipeContainer.setRefreshing(false);\n adapter.notifyDataSetChanged();\n\n }\n });\n }",
"public Collection getPosts() throws DatabaseException;",
"public List getAllBlogPosts(){\n return blogPostFacade.findAll();\n }",
"public List<Posts> listPosts() {\n\t\treturn this.findAll();\n\t}",
"private void queryPosts() {\n ParseQuery<OutfitPost> query = ParseQuery.getQuery(OutfitPost.class);\n // only include data referred by user key\n query.include(OutfitPost.KEY_USER);\n query.whereEqualTo(OutfitPost.KEY_USER, ParseUser.getCurrentUser());\n // limit query to latest 20 items\n query.setLimit(20);\n // order posts by creation date (newest first)\n query.addDescendingOrder(OutfitPost.KEY_CREATED_KEY);\n // start an asynchronous call for posts\n query.findInBackground(new FindCallback<OutfitPost>() {\n @Override\n public void done(List<OutfitPost> posts, ParseException e) {\n // check for errors\n if (e != null) {\n Log.e(TAG, \"Issue with getting posts\", e);\n return;\n }\n // Save oldest post in query for loading more posts\n if (posts.size() > 0) {\n oldestPost = posts.get(posts.size() - 1).getCreatedAt();\n }\n // update adapter with posts list\n adapter.clear();\n adapter.addAll(posts);\n }\n });\n }",
"@Override\n protected void queryPosts() {\n ParseQuery<Post> query = ParseQuery.getQuery(Post.class);\n query.include(Post.KEY_USER);\n query.whereEqualTo(Post.KEY_USER, ParseUser.getCurrentUser());\n Log.d(TAG, \"ParseUser\" + ParseUser.getCurrentUser().toString());\n query.setLimit(20);\n query.addDescendingOrder(Post.KEY_CREATED_AT);\n query.findInBackground(new FindCallback<Post>() {\n @Override\n public void done(List<Post> posts, ParseException e) {\n if (e != null){\n Log.e(TAG, \"Issue with getting posts\", e);\n return;\n }\n for (Post post: posts){\n Log.i(TAG, \"Post: \" + post.getDescription() + \", username: \" + post.getUser().getUsername());\n }\n allPosts.addAll(posts);\n adapter.notifyDataSetChanged();\n }\n });\n }",
"Collection<T> findAll();",
"private List<String> searchForPosts(){\n String userId = searchForUser();\n List <String> postIds;\n String response = given().\n get(\"/posts\").then().extract().asString();\n postIds = from(response).getList(String.format(\"findAll { it.userId.equals(%s) }.id\", userId));\n return postIds;\n }",
"public List<BlogPost> getPosts();",
"public List<Blog> findAll() {\n\t\treturn (List <Blog> ) mongoTemplate.findAll(Blog.class);\n\t}",
"public List<Pagos> findAll(){\n return pagoMongoRepository.findAll();\n }",
"@GetMapping(\"\")\n public ResponseEntity <List<Post>>listAllPosts() {\n return ResponseEntity.ok(postService.listAllPosts());\n }",
"@GetMapping(value=\"/allstorys\")\n\tpublic @ResponseBody List<Story> selectAllPosts() {\n\t\tloggy.info(\"List of all Stories pulled from the database\");\n\t\treturn storyServ.selectAllStories();\n\t}",
"void displayAllPosts();",
"public static List<FoundObject> findAll() {\n\t\treturn getPersistence().findAll();\n\t}",
"public List<Post> all() throws DataAccessException{\n String sql = \"select posts.id, posts.user_id, users.name, posts.title, posts.content, posts.create_date from posts join users on posts.user_id=users.id\";\n List<Post> posts = this.jdbcTemplate.query(sql, mapper);\n return posts;\n }",
"public List<Post> findPostsForUser(Integer i) {\n\t\tSession session;\n\t\ttry {\n\t\t\tsession = sessfact.getCurrentSession();\n\t\t} catch (HibernateException e) {\n\t\t\tsession = sessfact.openSession();\n\t\t}\n\t\tTransaction trans = session.beginTransaction();\n\t\tList<Post> list = session.createQuery(\"from Post where user_id =\" + i, Post.class).list();\n\t\ttrans.commit();\n\t\treturn list;\n\n\t}",
"public List<BlogEntity> findAll() {\r\n LOGGER.log(Level.INFO, \"Consultando todas los Blog\");\r\n // Se crea un query para buscar todas las grupoDeIntereses en la base de datos.\r\n TypedQuery query = em.createQuery(\"select u from Blog u\", BlogEntity.class);\r\n // Se hace uso del método getResultList() que obtiene una lista de grupoDeIntereses.\r\n return query.getResultList();\r\n }",
"@Override\n public List<Page> findAll() {\n Query q = new Query(\"pages\");\n // Use PreparedQuery interface to retrieve results\n PreparedQuery pq = datastore.prepare(q);\n List<Entity> list = pq.asList(FetchOptions.Builder.withDefaults());\n List<Page> result = new ArrayList<>();\n for (Entity entity : list) {\n Page page = new Page();\n page.setId(entity.getKey().getId());\n page.setTitle(entity.getProperty(\"title\").toString());\n page.setDescription(entity.getProperty(\"description\").toString());\n page.setUrl(entity.getProperty(\"url\").toString());\n page.setCrawled((boolean) entity.getProperty(\"crawled\"));\n result.add(page);\n }\n return result;\n }",
"public Collection<T> getAll() throws DaoException;",
"@Override\r\n\tpublic List<Post> hotPosts() {\n\t\tpostDao=new PostDaoImpl(TransactionManager.connection);\r\n\t\tList<Post> list=new ArrayList<Post>();\r\n\t\treturn postDao.hotPosts();\r\n\t\t\r\n\t}",
"protected void populateFeed() {\n ParseQuery<Post> query = ParseQuery.getQuery(Post.class);\n query.include(Post.KEY_USER);\n query.addDescendingOrder(Post.CREATED_AT);\n query.setLimit(20);\n query.findInBackground(new FindCallback<Post>() {\n // Result of the call to Parse\n @Override\n public void done(List<Post> queryPosts, ParseException e) {\n // There is an error\n if(e != null) {\n Log.e(TAG, \"Error in getting posts\");\n return;\n }\n for(Post post : queryPosts) {\n // post.getUser() gets the Id... post.getUser().getUsername() gets the Username associated to the id of getUser in User's table\n Log.i(TAG, \"Post \" + post.getDescription() + \" username: \" + post.getUser().getUsername());\n }\n posts.addAll(queryPosts);\n adapter.notifyDataSetChanged();\n }\n });\n }",
"List<T> findAll();",
"List<T> findAll();",
"List<T> findAll();",
"public List<Post> getAllPublic() throws SQLException {\r\n\tString sql = \"SELECT * FROM posts WHERE isPublic = 1 ORDER BY date DESC LIMIT ?\";\r\n\tPreparedStatement st = db.prepareStatement(sql);\r\n\tst.setQueryTimeout(TIMEOUT);\r\n\tst.setInt(1, LIMIT);\r\n\t\r\n\tResultSet results = st.executeQuery();\r\n\tList<Post> parsed = parseResults(results);\r\n\treturn parsed;\r\n }",
"List<T> findAll() ;",
"public List<T> findAll() throws NoSQLException;",
"List<Post> findAllBycategory(Category category);",
"public List<Article> findAll();",
"@GetMapping(\"/allUsersPosts\")\n public ResponseEntity<List<PostResource>> retrieveAllPostsForAllUsers() {\n //first we will retrieve all users to get their ids\n List<Long> userIds = externalService.retrieveAllUserIds();\n\n //then we will search for every post based on userId\n List<PostResource> postResources = new ArrayList<>();\n for (Long userId : userIds) {\n postResources.addAll(externalService.retrievePostsForUser(userId));\n }\n\n return new ResponseEntity<>(postResources, HttpStatus.ACCEPTED);\n }",
"public ArrayList<Post> viewAllPosts()\n\n {\n postList = new ArrayList<Post>();\n\n try\n {\n database = dbH.getReadableDatabase();\n dbH.openDataBase();\n String query = \"SELECT * FROM Post WHERE 1\";\n Cursor c = database.rawQuery(query, null);\n if (c.moveToFirst())\n {\n do\n {\n Post post = new Post();\n post.setPostBody(c.getString(c.getColumnIndex(\"postBody\")));\n post.setPostedBy(c.getString(c.getColumnIndex(\"postedBy\")));\n post.setPostedAt(c.getString(c.getColumnIndex(\"postedAt\")));\n post.setPostID(Integer.valueOf(c.getString(c.getColumnIndex(\"postID\"))));\n post.setBitmap(c.getString(c.getColumnIndex(\"image\")));\n\n postList.add(post);\n } while (c.moveToNext());\n }\n\n else\n {\n Log.i(TAG, \"There are no posts in the DB.\");\n }\n c.close();\n dbH.close();\n }\n catch (SQLException e)\n {\n e.printStackTrace();\n }\n return postList;\n }",
"public List<Page> searchAll() {\n return mysqlDao.searchAll();\n }",
"public List findAll() {\n\t\treturn dao.findAll();\r\n\t}",
"public void initAllPosts(){\n\t\tdbAdapter = new DBAdapter(getActivity());\n\t\tdbAdapter.open();\n\t\tCursor c = dbAdapter.getAllPosts();\n\t\tSimpleCursorAdapter cursorAdapter = new SimpleCursorAdapter(\n\t\t\t\tgetActivity(), R.layout.postitem, c, new String[] {\n\t\t\t\t\t\t\"titel\", \"dato\", \"beloeb\" }, new int[] { R.id.titel,\n\t\t\t\t\t\tR.id.dato, R.id.beloeb});\n\t\tsetListAdapter(cursorAdapter);\n\t\t\n\t}",
"public java.util.List<DataEntry> findAll();",
"public Collection findAll() {\n\t\treturn null;\r\n\t}",
"@Test(expected = IndexOutOfBoundsException.class)\r\n public void fetchAllPosts(){\r\n \r\n List<Post> listOfPosts = entityManager.createNamedQuery(\"Post.fetchAllRecords\").getResultList();\r\n \r\n assertTrue(\"Size is always greater than 0.\", listOfPosts.size() > 0);\r\n assertNotNull(\"List object is not null\", listOfPosts);\r\n assertEquals(\"Size should be 3\", listOfPosts.size(),3);\r\n \r\n assertEquals(\"PEOPLE ARE BAD AT TAKING OVER FROM AUTONOMOUS CARS.\", listOfPosts.get(5));\r\n \r\n }",
"List<Post> findPostsByUserName(String userName);",
"@Override\n\tpublic List<Post> list() {\n\t\treturn null;\n\t}",
"@GetMapping(\"posts\")\n\tpublic List<Post> index() {\n\t\treturn postSvc.index();\n\t}",
"List<E> findAll();",
"List<E> findAll();",
"List<E> findAll();",
"@Override\n\tpublic List<T> getAll() {\n\t\treturn getDao().findAll();\n\t}",
"@Override\r\n\tpublic List<Post> getPostByName(String name) {\n\t\tString hql = \"from Post p where p.post_name =?\";\r\n\t\treturn (List<Post>) getHibernateTemplate().find(hql, name);\r\n\t}",
"public List<Post> search(PostCriteria criteria, int page, int size);",
"private void queryPost() {\n tv_search.setText(\"Recently Added Posts:\");\n ParseQuery<Post> query = ParseQuery.getQuery(Post.class);\n query.include(Post.KEY_USER);\n query.setLimit(15);\n query.addDescendingOrder(Post.KEY_CREATED);\n query.findInBackground(new FindCallback<Post>() {\n @Override\n public void done(List<Post> posts, ParseException e) {\n if(e!= null){\n Log.e(tag, \"Issue with getting post\", e);\n return;\n }\n adaptor.clear();\n adaptor.addAll(posts);\n //allPost.addAll(posts);\n //adaptor.notifyDataSetChanged();\n //swipeRefreshLayout.setRefreshing(false);\n\n //user just created a post\n if (isJustCreatedNewPost == true)\n {\n //reset bool\n isJustCreatedNewPost = false;\n// //subscribe user to their new post channel\n// String postChannel = \"POST_\"+posts.get(0).getObjectId();\n// ParsePush.subscribeInBackground(postChannel);\n\n }\n }\n });\n }",
"@GetMapping(\"/feed\")\n private ResponseEntity<List<Post>> getPosts() {\n User user = getCurrentUser();\n logger.info(\"Not null \" + (user == null));\n List<Post> posts = postService.findAllByUser(user);\n return new ResponseEntity<>(posts, HttpStatus.OK);\n }",
"public List<E> findAll();",
"List<BlogDetails> selectAll();",
"@GetMapping(\"/\")\n public String allThePosts(Model viewModel) {\n\n viewModel.addAttribute(\"posts\", postService.findAll());\n return \"/blog_template/index\";\n }",
"Iterable<T> findAll();",
"public static Result posts() {\n\t\tPost post = new Post();\n\t\tUser user = UserController.loggedInUser();\n\t\tif (user != null) {\n\t\t\tpost.city= user.city;\n\t\t\tpost.state = user.state;\n\t\t\tpost.country = user.country;\n\t\t\tpost.zipcode = user.zipcode;\n\t\t\tpost.createdBy = user.userName;\t\t\t\n\t\t}\n\t\t//TODO:Use bind() instead of the above to avoid 0.0 in price field\n\t\treturn ok(index.render(Post.listPosts(), form(Post.class).fill(post), user));\n\t}",
"@Override\r\n\tpublic List<String> queryAll() {\n\t\tList<String> list = homePageDao.queryAll();\r\n\t\treturn list;\r\n\t}",
"public java.util.List<Todo> findAll();",
"@GET(\"/auth/api/v1/user/{id}/post/list?\")\n Call<JsonObject> fetchAllPost(@Path(\"id\") String id,@Query(\"api_token\") String token);",
"public NominaPuesto[] findAll() throws NominaPuestoDaoException;",
"List<T> findAll() throws Exception;",
"@GetMapping //Sempre que houver uma requisição externa com o método GET através da url \"/postagens\" o metodo GetAll será executado\n\tpublic ResponseEntity<List<Postagem>> GetAll(){\n\treturn ResponseEntity.ok(repository.findAll()); //retornar ok, com a requisição de todas as postagens\n\t}",
"public Page<Post> getNewPosts(){\n Pageable page = new PageRequest(0, 3, Sort.Direction.DESC, \"createdAt\");\n System.out.println(\"getNewPosts\");\n // Page<Post> posts = postRepository.findTop10OrderByCreatedAtOrderByCreatedAtDesc(page);\n // List<Post> p = postRepository.getNewestPosts();\n\n Page<Post> pp = postRepository.findAll(page);\n\n for (Post p :pp){\n logger.info(\"getNewPosts -> \" + p);\n }\n return pp;\n/* for (Post p :posts){\n System.out.println(\"p->\" + p);\n }\n if (posts != null)\n return posts;\n return null;*/\n }",
"public Ruta[] findAll() throws RutaDaoException;",
"public ArrayList<AshirBlogPostingHelper> getAllPots() {\n String query = \"SELECT * FROM \" + NAME_OF_TABLE;\n ArrayList<AshirBlogPostingHelper> ashirPostsList = new ArrayList<AshirBlogPostingHelper>();\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor c = db.rawQuery(query, null);\n if (c != null) {\n while (c.moveToNext()) {\n String post = c.getString(c.getColumnIndex(Col_2));\n try {\n byte[] getImageFromDb = c.getBlob(c.getColumnIndex(Col_3));\n AshirBlogPostingHelper postHelper = new AshirBlogPostingHelper();\n\n postHelper.setDataPost(post);\n postHelper.setImage(getImageFromDb);\n\n ashirPostsList.add(postHelper);\n }catch (Exception e){\n e.printStackTrace();\n }\n }\n }\n\n db.close();\n return ashirPostsList;\n\n }",
"public List findall() {\r\n log.debug(\"TwitterAccountHibernateDAO.findall\");\r\n List<T> t = find().list();\r\n \r\n return t;\r\n }",
"@Override\r\n\tpublic List<Post> relatedPosts(int bankuaihao) {\n\t\tpostDao=new PostDaoImpl(TransactionManager.connection);\r\n\t\tList<Post> list=new ArrayList<Post>();\r\n\t\treturn postDao.relatedPosts(bankuaihao);\r\n\t\r\n\t}",
"public Iterable<Content> findAllContent(){\n\n return contentRepository.findAll();\n }",
"@RequestMapping(value = {\"/fpost/list\"}, method = RequestMethod.GET)\r\n\tpublic ResponseEntity<List<Fpost>> fetchAllFposts() {\r\n\t\tSystem.out.println(\"fetching list of all fposts\");\r\n\t\tList<Fpost> fpost = fpostDAO.list();\r\n\t\treturn new ResponseEntity<List<Fpost>>(fpost, HttpStatus.OK);\r\n\t}",
"public List<E> findAll() {\n return getDao().findAll();\n }",
"@Override\n public List<R> getAll() {\n return onFindForList(getSession().createCriteria(entityClass).list());\n }",
"@Override\n public List<T> getAll() throws SQLException {\n\n return this.dao.queryForAll();\n\n }",
"@Override\n public List<Clip> findAll() {\n return fillList(logsCollection.find());\n }",
"public List<Post> getAllPostAndItsBlockPage() {\n\t\treturn pm.getAllPostAndItsBlockPage();\r\n\t}",
"public List<E> findAll() ;",
"public List<T> findAll() {\n\t\treturn null;\n\t}",
"List<T> getAll() throws PersistException;",
"public List findAll() {\n\t\treturn null;\r\n\t}",
"@Override\n public List<BookmarkEntity> findAll() {\n logger.info(\"Entering findAll() in BookmarkDAO\");\n return bookmarkRepository.findAll();\n\n }",
"List<Product> findAll();",
"List<Product> findAll();",
"@Async\n public void indexAllBlogEntries() {\n try {\n Pageable pageable = PageRequest.of(0, 100);\n\n Page<Entry> entries = entryRepository.findAll(pageable);\n for (int i = 0; i < entries.getTotalPages(); i++) {\n final ArrayList<BlogEntry> items = new ArrayList<>();\n\n for (final Entry entry : entries) {\n items.add(convert(entry));\n }\n\n blogEntryRepository.saveAll(items);\n\n pageable = PageRequest.of(i + 1, 100);\n entries = entryRepository.findAll(pageable);\n }\n } catch (final Exception e) {\n log.error(e.getMessage());\n }\n }",
"private void refreshFeed() {\n ParseQuery<Post> query = ParseQuery.getQuery(Post.class);\n query.include(Post.KEY_USER);\n query.addDescendingOrder(\"createdAt\");\n query.setLimit(20);\n query.findInBackground(new FindCallback<Post>() {\n // Result of the call to Parse\n @Override\n public void done(List<Post> queryPosts, ParseException e) {\n // There is an error\n if(e != null) {\n Log.e(TAG, \"Error in getting posts\");\n return;\n }\n for(Post post : queryPosts) {\n // post.getUser() gets the Id... post.getUser().getUsername() gets the Username associated to the id of getUser in User's table\n Log.i(TAG, \"Post \" + post.getDescription() + \" username: \" + post.getUser().getUsername());\n }\n\n adapter.clear();\n adapter.addAll(queryPosts);\n }\n });\n }",
"private void readPosts() {\n FirebaseDatabase.getInstance().getReference().child(\"Posts\").addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot snapshot) {\n postList.clear();\n for(DataSnapshot dataSnapshot:snapshot.getChildren())\n {\n Post post = dataSnapshot.getValue(Post.class);\n for(String id : followingList)\n {\n if(post.getPublisher().equals(id))\n {\n postList.add(post);\n }\n }\n }\n postAdapter.notifyDataSetChanged();\n\n\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError error) {\n\n }\n });\n }",
"List<PostInfo> getPostList();",
"List<ContentSum> findAll();",
"@SuppressWarnings(\"unchecked\")\n\tpublic List<AdmUserPruebas> findAll() {\n\t\tEntityManagerHelper.log(\"finding all AdmUserPruebas instances\",\n\t\t\t\tLevel.INFO, null);\n\t\ttry {\n\t\t\tfinal String queryString = \"select model from AdmUserPruebas model\";\n\t\t\tQuery query = getEntityManager().createQuery(queryString);\n\t\t\treturn query.getResultList();\n\t\t} catch (RuntimeException re) {\n\t\t\tEntityManagerHelper.log(\"find all failed\", Level.SEVERE, re);\n\t\t\tthrow re;\n\t\t}\n\t}",
"public ArrayList<String> loadPosts() {\n\t\tSAVE_FILE = PUSH_POSTS;\n\t\tArrayList<String> posts = loadIds();\n\t\treturn posts;\n\t}",
"public Faq[] findAll() throws FaqDaoException;",
"List<Book> findAll();"
] | [
"0.8191295",
"0.81120694",
"0.7926617",
"0.7838878",
"0.7816918",
"0.7637692",
"0.74618036",
"0.7414177",
"0.7400522",
"0.7356052",
"0.7320136",
"0.72817874",
"0.720329",
"0.72011423",
"0.7015251",
"0.7010998",
"0.6868455",
"0.68548113",
"0.6807285",
"0.6606418",
"0.6528216",
"0.6523847",
"0.6521589",
"0.64771336",
"0.64580566",
"0.6453242",
"0.6446864",
"0.6417625",
"0.6406192",
"0.63998836",
"0.63916653",
"0.6369927",
"0.6345109",
"0.63098043",
"0.62917227",
"0.62917227",
"0.62917227",
"0.62796944",
"0.6272811",
"0.62718993",
"0.62695444",
"0.62519664",
"0.6248034",
"0.62212545",
"0.61954266",
"0.61813533",
"0.6163219",
"0.61614335",
"0.61502033",
"0.6135474",
"0.6110029",
"0.6105481",
"0.6104576",
"0.6101602",
"0.6101602",
"0.6101602",
"0.6061806",
"0.6045512",
"0.6039703",
"0.6031754",
"0.6015355",
"0.6011924",
"0.600226",
"0.5999786",
"0.59994555",
"0.59927905",
"0.59805083",
"0.597882",
"0.59765697",
"0.5956415",
"0.59495366",
"0.59316003",
"0.5913046",
"0.5908381",
"0.5898583",
"0.5898023",
"0.5893277",
"0.58809435",
"0.5877839",
"0.5865584",
"0.5863286",
"0.58575505",
"0.58510315",
"0.58488363",
"0.5843017",
"0.5833569",
"0.58293736",
"0.58284116",
"0.58227444",
"0.58139044",
"0.58139044",
"0.58118445",
"0.58089745",
"0.5806451",
"0.57970357",
"0.57908756",
"0.57877314",
"0.5769575",
"0.57674646",
"0.5759635"
] | 0.8170101 | 1 |
Find all Posts from a particular user name in the database | List<Post> findPostsByUserName(String userName); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public List<Post> findPostsForUser(Integer i) {\n\t\tSession session;\n\t\ttry {\n\t\t\tsession = sessfact.getCurrentSession();\n\t\t} catch (HibernateException e) {\n\t\t\tsession = sessfact.openSession();\n\t\t}\n\t\tTransaction trans = session.beginTransaction();\n\t\tList<Post> list = session.createQuery(\"from Post where user_id =\" + i, Post.class).list();\n\t\ttrans.commit();\n\t\treturn list;\n\n\t}",
"private List<String> searchForPosts(){\n String userId = searchForUser();\n List <String> postIds;\n String response = given().\n get(\"/posts\").then().extract().asString();\n postIds = from(response).getList(String.format(\"findAll { it.userId.equals(%s) }.id\", userId));\n return postIds;\n }",
"@Override\n protected void queryPosts() {\n ParseQuery<Post> query = ParseQuery.getQuery(Post.class);\n query.include(Post.KEY_USER);\n query.whereEqualTo(Post.KEY_USER, ParseUser.getCurrentUser());\n Log.d(TAG, \"ParseUser\" + ParseUser.getCurrentUser().toString());\n query.setLimit(20);\n query.addDescendingOrder(Post.KEY_CREATED_AT);\n query.findInBackground(new FindCallback<Post>() {\n @Override\n public void done(List<Post> posts, ParseException e) {\n if (e != null){\n Log.e(TAG, \"Issue with getting posts\", e);\n return;\n }\n for (Post post: posts){\n Log.i(TAG, \"Post: \" + post.getDescription() + \", username: \" + post.getUser().getUsername());\n }\n allPosts.addAll(posts);\n adapter.notifyDataSetChanged();\n }\n });\n }",
"protected void queryPosts() {\n ParseQuery<Post> query = ParseQuery.getQuery(Post.class);\n //get all the post objects from the database\n query.include(Post.KEY_USER);\n //set the limit to 20 posts being retrieved\n query.setLimit(POSTS_QUERY_LIMIT);\n\n query.addDescendingOrder(Post.KEY_CREATED_KEY);\n\n query.findInBackground(new FindCallback<Post>() {\n @Override\n public void done(List<Post> posts, ParseException e) {\n // e == null if success\n if (e != null) {\n Log.e(TAG, \"Issue with getting posts\", e);\n return;\n }\n\n for (Post post : posts) {\n Log.i(TAG, \"Post: \" + post.getDescription() + \", username: \" + post.getUser().getUsername());\n }\n adapter.clear();\n allPosts.addAll(posts);\n adapter.notifyDataSetChanged();\n }\n });\n }",
"protected void queryPosts()\n {\n ParseQuery<Post> query = ParseQuery.getQuery(Post.class);\n query.include(Post.KEY_USER);\n query.whereEqualTo(Post.KEY_USER, ParseUser.getCurrentUser());\n query.setLimit(20);\n query.addDescendingOrder(Post.KEY_CREATED_AT);\n query.findInBackground(new FindCallback<Post>() {\n @Override\n public void done(List<Post> posts, ParseException e)\n {\n if(e != null)\n {\n Log.e(TAG, \"Issue with getting posts\", e);\n }\n for(Post post : posts)\n {\n Log.i(TAG, \"Post: \" + post.getDescription() + \", username\" + post.getUser().getUsername());\n }\n adapter.clear();\n allPosts.addAll(posts);\n swipeContainer.setRefreshing(false);\n adapter.notifyDataSetChanged();\n\n }\n });\n }",
"@Override\r\n\tpublic List<Post> searchInfByUserId(User user) {\n\t\tpostDao=new PostDaoImpl(TransactionManager.connection);\r\n\t\tList<Post> list=new ArrayList<Post>();\r\n\t\treturn postDao.infSearchByUserId(user);\r\n\t\t\r\n\t}",
"@Override\r\n\tpublic List<Post> getPostByName(String name) {\n\t\tString hql = \"from Post p where p.post_name =?\";\r\n\t\treturn (List<Post>) getHibernateTemplate().find(hql, name);\r\n\t}",
"@Override\n public List<Post> getPostsByUser(Long userId) {\n return userDao.gePostsByUser(userId);\n }",
"@RequestMapping(value = \"/posts/user/{posterName}\", method = RequestMethod.GET)\n @ResponseStatus(value = HttpStatus.OK)\n public List<Post> findPostListByPosterName(@PathVariable String posterName);",
"@GetMapping(\"/allUsersPosts\")\n public ResponseEntity<List<PostResource>> retrieveAllPostsForAllUsers() {\n //first we will retrieve all users to get their ids\n List<Long> userIds = externalService.retrieveAllUserIds();\n\n //then we will search for every post based on userId\n List<PostResource> postResources = new ArrayList<>();\n for (Long userId : userIds) {\n postResources.addAll(externalService.retrievePostsForUser(userId));\n }\n\n return new ResponseEntity<>(postResources, HttpStatus.ACCEPTED);\n }",
"@Override\n public List<Post> getPostsByUser(String token) throws TokenException {\n User user = sender.getUserFromUserAPI(token);\n if(user==null) throw new TokenException(\"Invalid Credentials.\");\n List<Post> postList = postRepository.getPostsByUserId(user.getUserId());\n return postList;\n\n }",
"public static ResultSet getUserPost(String userid) {\n ResultSet result = null;\n try {\n conn = ConnectionProvider.getCon();\n pst = conn.prepareStatement(\"select * from normalposts where authorid = ?\");\n pst.setString(1, userid);\n result = pst.executeQuery();\n System.out.println(\"PostDAO: getting posts written by \" + userid);\n } catch (Exception e) {\n System.out.println(\"PostDAO: getUserPost unsuccessful\");\n System.out.println(e);\n }\n return result;\n }",
"@GetMapping(\"/posts/user/{userName}\")\n List<PostDTO> getPostsByUsername(@PathVariable String userName);",
"List<Post> findAllPosts();",
"private void queryPosts() {\n ParseQuery<OutfitPost> query = ParseQuery.getQuery(OutfitPost.class);\n // only include data referred by user key\n query.include(OutfitPost.KEY_USER);\n query.whereEqualTo(OutfitPost.KEY_USER, ParseUser.getCurrentUser());\n // limit query to latest 20 items\n query.setLimit(20);\n // order posts by creation date (newest first)\n query.addDescendingOrder(OutfitPost.KEY_CREATED_KEY);\n // start an asynchronous call for posts\n query.findInBackground(new FindCallback<OutfitPost>() {\n @Override\n public void done(List<OutfitPost> posts, ParseException e) {\n // check for errors\n if (e != null) {\n Log.e(TAG, \"Issue with getting posts\", e);\n return;\n }\n // Save oldest post in query for loading more posts\n if (posts.size() > 0) {\n oldestPost = posts.get(posts.size() - 1).getCreatedAt();\n }\n // update adapter with posts list\n adapter.clear();\n adapter.addAll(posts);\n }\n });\n }",
"public void getOneUserPost(String un, UserPosts up) {\n\n // see if that user have made their posts private or not\n boolean isPrivate = false;\n\n // accessing registeredUser table (collection)\n MongoCollection<Document> collRU = db.getCollection(\"registeredUser\");\n\n FindIterable<Document> docOne = collRU.find(Filters.eq(\"username\", un)); // find document by filters\n MongoCursor<Document> cursor1 = docOne.iterator(); // set up cursor to iterate rows of documents\n try {\n while (cursor1.hasNext()) {\n isPrivate = cursor1.next().getBoolean(\"hideposts\");\n }\n } finally {\n cursor1.close();\n }\n\n if (!isPrivate) {\n // accessing posts table\n MongoCollection<Document> postColl = db.getCollection(\"postsRecord\");\n\n //ArrayList<Document> userPost = new ArrayList<>(); // all posts from this user will be in here\n if (!up.postDocs.isEmpty())\n up.postDocs.clear(); // clearing out the arrayList first\n\n FindIterable<Document> postDocs = postColl\n .find(Filters.eq(\"username\", un)) // get all documents from this user\n .sort(Sorts.descending(\"date\")); // sorts by newest post first\n\n MongoCursor<Document> cursor = postDocs.iterator(); // set up cursor to iterate rows of documents\n try {\n while (cursor.hasNext()) {\n //System.out.println(cursor.next().toJson()); // print username's document in String\n up.postDocs.add(cursor.next()); // add every post Documents into allPosts\n }\n } finally {\n cursor.close();\n }\n\n // print\n for (Document post : up.postDocs) {\n System.out.println(post.toJson());\n System.out.println(\"^^^ post date: \" + new Date(post.getLong(\"date\")).toString() + \"\\n\");\n }\n }\n else {\n System.out.println(un + \" has made their posts private\");\n }\n }",
"private void queryStoriesFromUser() {\n ParseQuery<Story> query = ParseQuery.getQuery(Story.class);\n // include objects related to a story\n query.include(Story.KEY_AUTHOR);\n query.include(Story.KEY_ITEM);\n query.include(Story.KEY_LIST);\n query.include(Story.KEY_CATEGORY);\n // where author is current user and order by time created\n query.whereEqualTo(Story.KEY_AUTHOR, user);\n query.orderByDescending(Story.KEY_CREATED_AT);\n query.findInBackground((stories, e) -> {\n mUserStories.clear();\n for (int i = 0; i < stories.size(); i++) {\n Story story = stories.get(i);\n Item item = (Item) story.getItem();\n mUserStories.add(story);\n queryPhotosInStory(story, item);\n }\n\n if (stories.size() == 0) {\n emptyLayout.setVisibility(View.VISIBLE);\n } else {\n emptyLayout.setVisibility(View.GONE);\n }\n });\n }",
"List<Post> getPostForUser(String email) throws Exception;",
"public List<Document> findByAuthor(String userName, int limit) {\n\n // XXX HW 3.2, Work Here\n // Return a list of DBObjects, each one a post from the posts collection\n\n // Want to get ALL the documents, so don't really need a filter. Add a sort to get the posts in order\n List<Document> posts = new LinkedList<Document>();;\n Document theSort=new Document(\"date\",-1);\n Document theFltr=new Document(\"author\",userName);\n\n // Empty filter and sort to get the first relevant post (and we can then step through the list using iterator)\n MongoCursor<Document> cursor=postsCollection.find(theFltr).sort(theSort).limit(limit).iterator();\n\n // Step through and to our list (makes little odds if it's array or linked list)\n while(cursor.hasNext()) {\n posts.add(cursor.next());\n }\n\n // pass list back\n return posts;\n }",
"protected void populateFeed() {\n ParseQuery<Post> query = ParseQuery.getQuery(Post.class);\n query.include(Post.KEY_USER);\n query.addDescendingOrder(Post.CREATED_AT);\n query.setLimit(20);\n query.findInBackground(new FindCallback<Post>() {\n // Result of the call to Parse\n @Override\n public void done(List<Post> queryPosts, ParseException e) {\n // There is an error\n if(e != null) {\n Log.e(TAG, \"Error in getting posts\");\n return;\n }\n for(Post post : queryPosts) {\n // post.getUser() gets the Id... post.getUser().getUsername() gets the Username associated to the id of getUser in User's table\n Log.i(TAG, \"Post \" + post.getDescription() + \" username: \" + post.getUser().getUsername());\n }\n posts.addAll(queryPosts);\n adapter.notifyDataSetChanged();\n }\n });\n }",
"User findByUserName(String userName);",
"User findByUserName(String userName);",
"List<Post> findAll();",
"@RequestMapping(value = \"/blog/{username}\", method = RequestMethod.GET)\n\tpublic String userPosts(@PathVariable String username, Model model) {\n\t\tUser author = userDao.findByUsername(username);\n\t\tList <Post> posts = postDao.findByAuthor_uid(author.getUid());\n\t\t\n\t\t//pass all of the posts into the template model.addattribute(\"name\", obj)\n\t\tmodel.addAttribute(\"posts\", posts);\n\t\treturn \"blog\";\n\t}",
"public List<Post> getByAuthor(String user) throws SQLException {\r\n\tString sql = \"SELECT * FROM posts WHERE author = ? ORDER BY date DESC LIMIT ?\";\r\n\tPreparedStatement st = db.prepareStatement(sql);\r\n\tst.setQueryTimeout(TIMEOUT);\r\n\t\r\n\tst.setString(1, user);\r\n\tst.setInt(2, LIMIT);\r\n\t\r\n\tResultSet results = st.executeQuery();\r\n\tList<Post> parsed = parseResults(results);\r\n\treturn parsed;\r\n }",
"@GetMapping(\"/postsByUser\")\n public String postByUser(Model viewModel) {\n User user = (User) SecurityContextHolder.getContext().getAuthentication().getPrincipal();\n viewModel.addAttribute(\"posts\", postRepository.findByUser(user));\n return \"/users/posts_by_user\";\n }",
"public void getEveryonePosts(String myUN, UserPosts up, UserFriends uf) {\n\n // get who I'm following\n //ArrayList<String> following = getFollowList(myUN);\n //following.add(myUN); // \"add\" myself into follow list so I can see my own post in homepage\n //System.out.println(\"Follow = \" + following);\n\n // hold all posts from everyone I follow here\n //ArrayList<Document> allPosts = new ArrayList<>();\n //if (!up.postDocs.isEmpty())\n up.postDocs.clear();\n\n getFollowList(myUN, uf);\n\n // accessing posts table\n MongoCollection<Document> postColl = db.getCollection(\"postsRecord\");\n\n // get all posts in newest first order\n FindIterable<Document> everyPost = postColl.find().sort(Sorts.descending(\"date\"));\n\n MongoCursor<Document> cursor = everyPost.iterator(); // set up cursor to iterate rows of documents\n try {\n while (cursor.hasNext()) {\n Document currCursor = cursor.next(); // get current document from cursor\n String cursorUN = currCursor.getString(\"username\"); // see username of that document\n //System.out.println(\"cursorUN = \" + cursorUN);\n\n // if post by me or I follow user of current document\n if (cursorUN.equals(myUN) || uf.friendsList.contains(cursorUN))\n up.postDocs.add(currCursor); // add that post into postDocs\n }\n } finally {\n cursor.close();\n }\n\n // print\n for (Document post: up.postDocs) {\n System.out.println(post.toJson());\n }\n }",
"public List<PostEntry> findList(String username){\n Connection c = null;\n PreparedStatement ps = null;\n ResultSet rs = null; \n\n List<PostEntry> data = new ArrayList<PostEntry>();\n try {\n //Get connection\n c = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/CS144\", \"cs144\", \"\");\n\n //Prepare statement\n ps = c.prepareStatement(\"SELECT * FROM Posts WHERE username=?\");\n ps.setString(1, username);\n\n rs = ps.executeQuery();\n\n //set in data if exists: ASSUMES there is only one response\n while(rs.next()){\n String title = rs.getString(\"title\");\n Timestamp created = rs.getTimestamp(\"created\");\n Timestamp modified = rs.getTimestamp(\"modified\");\n int postid = rs.getInt(\"postid\"); //conversion to string, need to convert back\n \n PostEntry pe = new PostEntry(title, created, modified, postid);\n\n data.add(pe);\n }\n\n } catch(SQLException e){\n //error handling\n System.out.println(\"SQLException caught.\");\n e.printStackTrace();\n } finally {\n //just need to close all\n try { rs.close(); } catch (Exception e) { /* ignored */ }\n try { ps.close(); } catch (Exception e) { /* ignored */ }\n try { c.close(); } catch (Exception e) { /* ignored */ }\n }\n\n return data;\n }",
"public Collection<UserDoc> findByUserName(String username);",
"List<Todo> findByUser(String user);",
"@Override\n public void done(List<Post> queryPosts, ParseException e) {\n // There is an error\n if(e != null) {\n Log.e(TAG, \"Error in getting posts\");\n return;\n }\n for(Post post : queryPosts) {\n // post.getUser() gets the Id... post.getUser().getUsername() gets the Username associated to the id of getUser in User's table\n Log.i(TAG, \"Post \" + post.getDescription() + \" username: \" + post.getUser().getUsername());\n }\n posts.addAll(queryPosts);\n adapter.notifyDataSetChanged();\n }",
"public List<Post> getAllUsersPosts(int userId) throws ParseException{\n\t\tList<Post> allUsersPosts = new ArrayList<Post>();\n\t\tList<Post> allPosts = this.getAllPosts();\n\t\tfor(Post p: allPosts)\n\t\t\tif(p.getUserID()==userId)\n\t\t\t\tallUsersPosts.add(p);\n\t\treturn allUsersPosts;\n\t}",
"public List<Post> retriveAllPosts()\n\t {\n\t\t List<Post> Posts =(List<Post>) Postrepository.findAll();\n\t\t \n\t\t for(Post Post :Posts)\n\t\t {\n\t\t\t //l.info(\"Post +++ :\" +Post);\n\t\t }\n\t\t return Posts;\n\t\t\t \n\t }",
"@Query(nativeQuery = true,\n\tvalue = \"SELECT * FROM posts WHERE post_type=\\\"\"+PostOfPage.DISCRIMINATOR_VALUE+\"\\\" AND page_id=:pageId AND user_id=:userId\")\n\tpublic List<PostOfPage> getUserPostsOfPage(long userId, long pageId);",
"public boolean findUserBYName(String name);",
"private void queryPost() {\n tv_search.setText(\"Recently Added Posts:\");\n ParseQuery<Post> query = ParseQuery.getQuery(Post.class);\n query.include(Post.KEY_USER);\n query.setLimit(15);\n query.addDescendingOrder(Post.KEY_CREATED);\n query.findInBackground(new FindCallback<Post>() {\n @Override\n public void done(List<Post> posts, ParseException e) {\n if(e!= null){\n Log.e(tag, \"Issue with getting post\", e);\n return;\n }\n adaptor.clear();\n adaptor.addAll(posts);\n //allPost.addAll(posts);\n //adaptor.notifyDataSetChanged();\n //swipeRefreshLayout.setRefreshing(false);\n\n //user just created a post\n if (isJustCreatedNewPost == true)\n {\n //reset bool\n isJustCreatedNewPost = false;\n// //subscribe user to their new post channel\n// String postChannel = \"POST_\"+posts.get(0).getObjectId();\n// ParsePush.subscribeInBackground(postChannel);\n\n }\n }\n });\n }",
"@Override\n\tpublic List<User> searchByUser(String userName) {\n\t\tlog.info(\"Search by username!\");\n\t\treturn userRepository.findByFirstNameRegex(userName+\".*\");\n\t}",
"public static ResultSet getPosts(){\n ResultSet result = null;\n try {\n conn = ConnectionProvider.getCon();\n pst = conn.prepareStatement(\"select * from normalposts\");\n result = pst.executeQuery();\n\n System.out.println(\"PostDAO: getting posts\");\n } catch(Exception e) {\n System.out.println(\"PostDAO: unsuccessful query\");\n System.out.println(e);\n }\n return result;\n }",
"private void loadPosts(final List<AnipalAbstractPost> posts){\n Query q1 = FirebaseDatabase.getInstance().getReference(\"UserPosts\")\n .child(MainActivity.currentUser.getUserUUID()).orderByChild(\"timestamp\")\n .limitToLast(5);\n q1.addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n AnipalAbstractPost post ;\n for(DataSnapshot snap : dataSnapshot.getChildren()){\n if(snap.hasChild(\"photoURL\")){\n // Photo post\n post = snap.getValue(AnipalPhotoPost.class);\n post.findUser(post.getUserUUID());\n }else{\n // Donation post\n post = snap.getValue(AnipalDonationPost.class);\n post.findUser(post.getUserUUID());\n }\n posts.add(post);\n }\n\n Collections.reverse(posts);\n postAdapter.notifyDataSetChanged();\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n });\n\n }",
"@GetMapping(\"/feed\")\n private ResponseEntity<List<Post>> getPosts() {\n User user = getCurrentUser();\n logger.info(\"Not null \" + (user == null));\n List<Post> posts = postService.findAllByUser(user);\n return new ResponseEntity<>(posts, HttpStatus.OK);\n }",
"User findByUsername(String userName);",
"PaginatedSearchResponseModel findAllPostsForUser(Party partyBean, Pageable page);",
"private void refreshFeed() {\n ParseQuery<Post> query = ParseQuery.getQuery(Post.class);\n query.include(Post.KEY_USER);\n query.addDescendingOrder(\"createdAt\");\n query.setLimit(20);\n query.findInBackground(new FindCallback<Post>() {\n // Result of the call to Parse\n @Override\n public void done(List<Post> queryPosts, ParseException e) {\n // There is an error\n if(e != null) {\n Log.e(TAG, \"Error in getting posts\");\n return;\n }\n for(Post post : queryPosts) {\n // post.getUser() gets the Id... post.getUser().getUsername() gets the Username associated to the id of getUser in User's table\n Log.i(TAG, \"Post \" + post.getDescription() + \" username: \" + post.getUser().getUsername());\n }\n\n adapter.clear();\n adapter.addAll(queryPosts);\n }\n });\n }",
"public User findByUserName(String username) throws Exception;",
"@Override\r\n\tpublic List<User> search(String name) {\n\t\treturn null;\r\n\t}",
"@GET(\"posts\")\n public Call<List<Post>> getPost(@Query(\"userId\") String userId);",
"public List<Post> all() throws DataAccessException{\n String sql = \"select posts.id, posts.user_id, users.name, posts.title, posts.content, posts.create_date from posts join users on posts.user_id=users.id\";\n List<Post> posts = this.jdbcTemplate.query(sql, mapper);\n return posts;\n }",
"public List<Trip> findByUserName( String userName ) {\n\t \n\t List<User> users = ds.find(User.class).filter(\"userName =\", userName).order(\"userName\").asList();\n\t List<Trip> returnTripList = new ArrayList<Trip>();\n\t \n\t for(User aUser: users)\n\t {\n\t \t returnTripList.addAll( aUser.getTrips());\t\n\t \t \n\t }\n\t logger.debug(\"Found {} users with userName {}\", users.size(),userName);\n\t logger.debug(\"Total of {} trips\", returnTripList.size());\n\t return returnTripList;\n\t \n\t \n\t //Using Regular Expressions\n\t //Pattern regExp = Pattern.compile(userName + \".*\", Pattern.CASE_INSENSITIVE);\n\t //return ds.find(User.class).filter(\"userName\", regExp).order(\"userName\").asList();\n\t}",
"public List<User> getUsersByNumberOfPosts(int N);",
"@Query(\"{ 'postBy': {$ref:'users',$id:?0}} }\")\r\n\tpublic Page<Answer> findByPostById(ObjectId userId, Pageable pageable);",
"@Override\n public void done(List<Post> queryPosts, ParseException e) {\n // There is an error\n if(e != null) {\n Log.e(TAG, \"Error in getting posts\");\n return;\n }\n for(Post post : queryPosts) {\n // post.getUser() gets the Id... post.getUser().getUsername() gets the Username associated to the id of getUser in User's table\n Log.i(TAG, \"Post \" + post.getDescription() + \" username: \" + post.getUser().getUsername());\n }\n\n adapter.clear();\n adapter.addAll(queryPosts);\n }",
"@RequestMapping(value = \"posts\", method = RequestMethod.GET)\n \tpublic String showPostsForUser(@RequestParam(\"id\") String userId, Model model) {\n \n \t\tFeedOperations feedOps = facebook.feedOperations();\n \n \t\tList<Post> posts = feedOps.getPosts();\n \t\tlogger.debug(\"Retrieved \" + posts.size() + \" from the Facebook authenticated user\");\n \n \t\tmodel.addAttribute(\"posts\", posts);\n \t\treturn \"home\";\n \t}",
"public List<PostDto> displayPostList(UserDto user);",
"@Override\r\n\tpublic List<Post> getAllPost() {\n\t\tString hql = \"from Post\";\r\n\t\treturn (List<Post>) getHibernateTemplate().find(hql);\r\n\t}",
"public Iterable<Post> findAll(){\n return postDao.findAll();\n }",
"public List<Post<BibTex>> getAllPublications(String userName) {\n\t\treturn logic.getPosts(BibTex.class, GroupingEntity.ALL, userName, null, null, null, null, null, null, null,\n\t\t\t\tnull, 0, 100);\n\t}",
"public List<Post> findAll() {\n\t\tSession session;\n\t\ttry {\n\t\t\tsession = sessfact.getCurrentSession();\n\t\t} catch (HibernateException e) {\n\t\t\tsession = sessfact.openSession();\n\t\t}\n\t\tTransaction trans = session.beginTransaction();\n\t\tList<Post> list = session.createQuery(\"from Post\", Post.class).list();\n\t\ttrans.commit();\n\n\t\treturn list;\n\t}",
"@Override\r\n\tpublic Userinfo findbyname(String name) {\n\t\treturn userDAO.searchUserByName(name);\r\n\t}",
"public UserQueryEntity getByName(String userName);",
"public List<Post> getPostByName(String search) {\n\t\treturn pm.getPostByName(search);\r\n\t}",
"@Override\n\tpublic List<Post> getRecentPostsForUser(String arg0, int arg1)\n\t\t\tthrows Exception {\n\t\treturn null;\n\t}",
"@Override\r\n\tpublic List<Post> searchInfResult(String word) {\n\t\tpostDao=new PostDaoImpl(TransactionManager.connection);\r\n\t\treturn postDao.selectPosts(word);\r\n\t}",
"List<User> getUserByName(String name);",
"public List<BlogUser> getAllUsers() throws DAOException;",
"@Override\n public List<Post> postList() {\n List<Post> savedPosts = (List<Post>) postRepository.findAll();\n Set<Long> userIdList = savedPosts.stream().map(Post::getUserId).collect(Collectors.toSet());\n\n User[] rateResponse = sender.getUsersByUserId(userIdList);\n\n HashMap<Long, User> userHashMap = new LinkedHashMap<>();\n for (User user : rateResponse) {\n userHashMap.put(user.getUserId(), user);\n }\n for (Post savedPost : savedPosts) {\n savedPost.setUser(userHashMap.get(savedPost.getUserId()));\n }\n return savedPosts;\n }",
"public List<String> getByName(String name) {\r\n List<String> listOfUser = new ArrayList<>();\r\n for(User user : userRepository.findByName(name)){\r\n listOfUser.add(user.toString());\r\n }\r\n return listOfUser;\r\n }",
"List<User> searchUsersByUsername(String username);",
"@Override\n public List<User> findByName(String username){\n try {\n return runner.query(con.getThreadConnection(),\"select * from user where username like ?\",new BeanListHandler<User>(User.class),username);\n } catch (SQLException e) {\n System.out.println(\"执行失败\");\n throw new RuntimeException(e);\n }\n }",
"public String[] findPost(String username, int postid){\n Connection c = null;\n PreparedStatement ps = null;\n ResultSet rs = null; \n\n String[] data = null;\n try {\n //Get connection\n c = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/CS144\", \"cs144\", \"\");\n\n //Prepare statement\n ps = c.prepareStatement(\"SELECT * FROM Posts WHERE username=? AND postid=?\");\n ps.setString(1, username);\n ps.setInt(2, postid);\n\n rs = ps.executeQuery();\n\n //set in data if exists: ASSUMES there is only one response\n if(rs.next()){\n data = new String[2];\n data[0] = rs.getString(\"title\");\n data[1] = rs.getString(\"body\");\n }\n\n } catch(SQLException e){\n //error handling\n System.out.println(\"SQLException caught.\");\n e.printStackTrace();\n } finally {\n //just need to close all\n try { rs.close(); } catch (Exception e) { /* ignored */ }\n try { ps.close(); } catch (Exception e) { /* ignored */ }\n try { c.close(); } catch (Exception e) { /* ignored */ }\n }\n\n return data;\n }",
"public User queryUserByUsername(String username);",
"@RequestMapping(method = RequestMethod.GET, params = {\"name\"})\n\t public ResponseEntity<Collection<Customer>> findUserWithName(@RequestParam(value=\"name\") String name) {\n\t return service.findCustomerWithName(name);\n\t }",
"@Override\n\tpublic List<MemberEntity> findByUname(String name) {\n\t\tQuery query = entityManager.createQuery(\"from MemberEntity where uname =\" + name);\n\t\tList<MemberEntity> list = query.getResultList();\n\t\treturn list;\n\t}",
"List<Share> findByPost(Post post);",
"@GetMapping(value=\"{email}/userstorys\")\n\tpublic @ResponseBody List<Story> selectUserPosts(@PathVariable(\"email\") String email) {\n\t\tloggy.info(\"List of a User's Stories pulled from the database\");\n\t\treturn storyServ.selectStoriesByEmail(email);\n\t}",
"List<BlogUser> getUsers() throws DAOException;",
"@SuppressWarnings(\"unchecked\")\n\tpublic List<Post> getPostsOf(int postId , int userId){\n\t\t\n\t\tList<Post> postList = null;\n\t\tCriteria query = null;\n\t\ttry {\n\t\t\t\n\t\t\t query = getCurrentSession().createCriteria(Post.class);\n\t\t\t \n\t\t\t query.createAlias(\"this.orgperson\", \"author\") \n\t\t\t .createAlias(\"author.personid\",\"authorPerson\")\n\t\t\t \t .createAlias(\"this.postcategories\", \"postcategories\")\n\t\t\t \t .createAlias(\"postcategories.category\", \"category\")\n\t\t\t \t .createAlias(\"this.postskills\", \"postskills\")\n\t\t\t \t .createAlias(\"postskills.skill\", \"skill\")\n\t\t\t \t .createAlias(\"this.posttags\", \"posttags\")\n\t\t\t \t .createAlias(\"posttags.tag\", \"tag\");\n\t\t\t \n\t\t\t query.add(Restrictions.eq(\"this.status\", \"A\"))\n\t\t\t \t .add(Restrictions.eq(\"author.orgpersonstatus\", 'A'))\n\t\t\t \t .add(Restrictions.eq(\"authorPerson.personstatus\", 'A'))\n\t\t\t \t .add(Restrictions.eq(\"postcategories.status\", \"A\"))\n\t\t\t \t .add(Restrictions.eq(\"category.status\", \"A\"))\n\t\t\t \t .add(Restrictions.eq(\"postskills.status\", \"A\"))\n\t\t\t \t .add(Restrictions.eq(\"skill.status\", \"A\"))\n\t\t\t \t .add(Restrictions.eq(\"posttags.status\", \"A\"))\n\t\t\t \t .add(Restrictions.eq(\"tag.status\", \"A\")) \n\t\t\t \t .add(Restrictions.eq(\"this.id\", postId))\n\t\t\t \t .add(Restrictions.eq(\"author.orgpersonid\", userId));\n\t\t\t \n\t\t\t query.setProjection(Projections.projectionList()\n\t\t\t\t\t \n\t\t\t\t\t //post\n\t\t\t\t\t .add(Projections.property(\"this.id\").as(\"post_id\"))\n\t\t\t\t\t .add(Projections.property(\"this.title\").as(\"post_title\"))\n\t\t\t\t\t .add(Projections.property(\"this.content\").as(\"post_content\")) \n\t\t\t\t\t .add(Projections.property(\"this.bannerpath\").as(\"post_bannerpath\"))\n\t\t\t\t\t .add(Projections.property(\"this.commentable\").as(\"post_commentable\"))\n\t\t\t\t\t .add(Projections.property(\"this.date\").as(\"post_date\"))\n\t\t\t\t\t .add(Projections.property(\"this.media\").as(\"post_media\")) \n\t\t\t\t\t .add(Projections.property(\"this.status\").as(\"post_status\")) \n\t\t\t\t\t //authorperson\n\t\t\t\t\t .add(Projections.property(\"authorPerson.personid\").as(\"authorPersonPersonId\"))\n\t\t\t\t\t .add(Projections.property(\"authorPerson.firstName\").as(\"authorPersonFirstName\"))\n\t\t\t\t\t .add(Projections.property(\"authorPerson.lastName\").as(\"authorPersonLastName\"))\n\t\t\t\t\t .add(Projections.property(\"authorPerson.middleName\").as(\"authorPersonmiddleName\")) \n\t\t\t\t\t //category \n\t\t\t\t\t .add(Projections.property(\"postcategories.id\").as(\"postCategoryId\"))\n\t\t\t\t\t .add(Projections.property(\"postcategories.status\").as(\"postCategoryStatus\"))\n\t\t\t\t\t .add(Projections.property(\"category.id\").as(\"categoryId\")) \n\t\t\t\t\t .add(Projections.property(\"category.name\").as(\"categoryName\")) \n\t\t\t\t\t //skill\n\t\t\t\t\t .add(Projections.property(\"postskills.id\").as(\"postSkillsId\"))\n\t\t\t\t\t .add(Projections.property(\"postskills.status\").as(\"postSkillsStatus\"))\n\t\t\t\t\t .add(Projections.property(\"skill.id\").as(\"skillId\")) \n\t\t\t\t\t .add(Projections.property(\"skill.name\").as(\"skillName\")) \n\t\t\t\t\t//tag\n\t\t\t\t\t .add(Projections.property(\"posttags.id\").as(\"postTagsId\"))\n\t\t\t\t\t .add(Projections.property(\"posttags.status\").as(\"postTagsStatus\"))\n\t\t\t\t\t .add(Projections.property(\"tag.id\").as(\"tagId\")) \n\t\t\t\t\t .add(Projections.property(\"tag.name\").as(\"tagName\")) \n\t\t\t\t\t \n\t\t\t\t\t ); \n\t\t\t \n\t\t\t postList = query.setResultTransformer(Criteria.ALIAS_TO_ENTITY_MAP).list();\n\t\t\t \n\t\t\t \t \t \n\t\t} catch (Exception e) {\n\t\t\tpostServiceLogger.error(\"error in PostService for getPostsOf()\",e);\n\t\t}\n\t\treturn postList;\n\t}",
"@Override\n\tpublic void getAll() {\n\t\tArrayList<Post> list = new ArrayList<Post>();\n\t\tlist = dao.selectAll();\n\t\t\n\t\tfor (Post p : list) {\n\t\t\tSystem.out.println(p.getPostId() + \".\" + p.getPostName() + \" 작성자:\" + p.getMemberId());\n\t\t}\n\t}",
"public Collection getPosts() throws DatabaseException;",
"@Override\n public ArrayList<PostVo> get_post_by_page(int page) {\n ArrayList<PostVo> posts = (ArrayList<PostVo>) baseDAO.findBySQLForVO(\"\" +\n \"select p.p_id as pId , p.p_floor as pFloor , p.p_main as pMain , p.p_title as pTitle\" +\n \" , u.u_name as uName from Post as p join user as u on p.u_id = u.u_id \"\n ,PostVo.class,null,10*(page-1),10);\n return posts;\n }",
"private void seachHispost(final String searchQuery){\n //linearlayout for recycleview\n LinearLayoutManager layoutManager=new LinearLayoutManager(this);\n layoutManager.setStackFromEnd(true);\n layoutManager.setReverseLayout(true);\n //set this layout to rycleview\n postRecycleview.setLayoutManager(layoutManager);\n //init post list\n DatabaseReference reference=FirebaseDatabase.getInstance().getReference(\"Posts\");\n //query to load photo\n Query query=reference.orderByChild(\"uid\").equalTo(uid);\n //get all data from this referece\n query.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n postList.clear();\n for(DataSnapshot ds:dataSnapshot.getChildren()){\n ModelPost modelPost=ds.getValue(ModelPost.class);\n //search\n if(modelPost.getPtitle().toLowerCase().contains(searchQuery.toLowerCase())\n ||modelPost.getPdescr().toLowerCase().contains(searchQuery.toLowerCase())){\n // add to list\n postList.add(modelPost);\n }\n\n //adapter\n adapterPosts=new AdapterPosts(ThereProfileActivity.this,postList);\n //set this to recycleview\n postRecycleview.setAdapter(adapterPosts);\n }\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n Toast.makeText(ThereProfileActivity.this, \"\"+databaseError.getMessage(), Toast.LENGTH_SHORT).show();\n }\n });\n }",
"List<Post> getAllPost() throws Exception;",
"public interface BlogRepository extends JpaRepository<Blog, Integer> {\n\n List<Blog> findByUser(User user);\n}",
"User findByUsername(String username);",
"User findByUsername(String username);",
"User findByUsername(String username);",
"User findByUsername(String username);",
"User findByUsername(String username);",
"User findByUsername(String username);",
"public User findByUsername(String username);",
"public User findByUsername(String username);",
"public User findByUsername(String username);",
"public User findByUsername(String username);",
"private void readPosts() {\n FirebaseDatabase.getInstance().getReference().child(\"Posts\").addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot snapshot) {\n postList.clear();\n for(DataSnapshot dataSnapshot:snapshot.getChildren())\n {\n Post post = dataSnapshot.getValue(Post.class);\n for(String id : followingList)\n {\n if(post.getPublisher().equals(id))\n {\n postList.add(post);\n }\n }\n }\n postAdapter.notifyDataSetChanged();\n\n\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError error) {\n\n }\n });\n }",
"public SystemUser findByUserName(String userName);",
"@Override\n public PostListDTO getPostsForUser( Long userId, Long categoryId, int pageNum, int pageSize ) {\n validateUserId( userId );\n if (categoryId != null && categoryId > -1)\n validateCategoryId( categoryId );\n //create a PageRequest\n PageRequest pageRequest = pageRequestBuilder.buildPageRequest( pageNum, pageSize, Sort.Direction.DESC,\"created\" );\n Page<Post> page;\n if ( categoryId > -1 )\n page = postRepository.findAllByUser_IdAndCategory_IdAndParentNull( userId, categoryId, pageRequest );\n else\n page = postRepository.findAllByUser_IdAndParentNull( userId, pageRequest );\n List<PostDTO> postDTOS = new ArrayList<>();\n page.forEach( post -> {\n PostDTO dto = buildReturnDto( post );\n postDTOS.add( dto );\n } );\n return new PostListDTO( postDTOS, PageRequestBuilder.buildPageInfoResponse(page) );\n }",
"@SuppressWarnings(\"unchecked\")\n\t@Override\n\tpublic Collection<Tags> readAll(String username) {\n\t\tString query = \"from Tags where username='\"+username+\"' OR username='default'\";\n\t\tCollection<Tags> tags = (Collection<Tags>)entityMgr.createQuery(query).getResultList();\n\t\treturn tags;\n\t}",
"@Query(value = \"SELECT * FROM Users where user_name = :user_name\", nativeQuery = true) // jpql\n\tUser findUserByUserName(@Param(\"user_name\") String user_name);",
"@SuppressWarnings(\"unchecked\")\r\n public Collection<Person> findPersonsByName(String name) throws DataAccessException {\r\n return template.find(\"from Person p where p.lastName = ?\", name);\r\n }",
"@GetMapping(\"/allUsersPostsAsync\")\n public ResponseEntity<List<PostResource>> retrieveAllPostsForAllUsersAsync() {\n //first we will retrieve all users to get their ids\n List<Long> userIds = externalService.retrieveAllUserIds();\n\n //then we will search for every post based on userId\n List<CompletableFuture<List<PostResource>>> postResourcesAsync = new ArrayList<>();\n for (Long userId : userIds) {\n CompletableFuture<List<PostResource>> postResourceCompleteFuture = CompletableFuture.supplyAsync(() -> externalService.retrievePostsForUser(userId));\n postResourcesAsync.add(postResourceCompleteFuture);\n }\n\n List<PostResource> postResources = postResourcesAsync.stream()\n .map(CompletableFuture::join)//returns List<List<PostResource>>\n .flatMap(List::stream) //flatten list List<PostResource>\n .collect(Collectors.toList());\n\n return new ResponseEntity<>(postResources, HttpStatus.ACCEPTED);\n }",
"public static Result posts() {\n\t\tPost post = new Post();\n\t\tUser user = UserController.loggedInUser();\n\t\tif (user != null) {\n\t\t\tpost.city= user.city;\n\t\t\tpost.state = user.state;\n\t\t\tpost.country = user.country;\n\t\t\tpost.zipcode = user.zipcode;\n\t\t\tpost.createdBy = user.userName;\t\t\t\n\t\t}\n\t\t//TODO:Use bind() instead of the above to avoid 0.0 in price field\n\t\treturn ok(index.render(Post.listPosts(), form(Post.class).fill(post), user));\n\t}"
] | [
"0.71597475",
"0.71463764",
"0.7144495",
"0.69898903",
"0.69870394",
"0.68972945",
"0.6857096",
"0.6757378",
"0.67429626",
"0.6649854",
"0.6635564",
"0.648726",
"0.64747626",
"0.6368269",
"0.6308519",
"0.6245567",
"0.62355334",
"0.614458",
"0.61078084",
"0.6075839",
"0.6050599",
"0.6050599",
"0.60483086",
"0.60302836",
"0.60161376",
"0.5985446",
"0.5969925",
"0.59512573",
"0.5950978",
"0.594639",
"0.59021384",
"0.5899858",
"0.5899085",
"0.5887286",
"0.588394",
"0.5876835",
"0.5861211",
"0.58506465",
"0.58465606",
"0.5844773",
"0.58381057",
"0.58237505",
"0.5810889",
"0.58068377",
"0.580459",
"0.5799629",
"0.5796891",
"0.5793042",
"0.57853395",
"0.57820505",
"0.57796603",
"0.5757561",
"0.57362163",
"0.57128906",
"0.57077235",
"0.5705128",
"0.56859136",
"0.5681099",
"0.5680075",
"0.5673301",
"0.5651711",
"0.5643919",
"0.56329894",
"0.5581095",
"0.557399",
"0.5570453",
"0.5570102",
"0.5562114",
"0.5558711",
"0.5547421",
"0.5534251",
"0.55291575",
"0.5521045",
"0.55169016",
"0.5511007",
"0.5503848",
"0.54971564",
"0.5477994",
"0.54768085",
"0.547046",
"0.54623026",
"0.54458594",
"0.5441064",
"0.5441064",
"0.5441064",
"0.5441064",
"0.5441064",
"0.5441064",
"0.54349875",
"0.54349875",
"0.54349875",
"0.54349875",
"0.5432232",
"0.54282486",
"0.54121125",
"0.5411803",
"0.540928",
"0.5398662",
"0.5394787",
"0.53850234"
] | 0.8345646 | 0 |
Deletes Post by looking up the id from database | void deletePostById(int id); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"int deleteByPrimaryKey(String postId);",
"public HttpStatus deleteById(Long postId);",
"public void destroyPost(Long id);",
"int deleteByPrimaryKey(Integer postid);",
"void removePost(int id) throws RemoteException, SQLException;",
"@Override\r\n\tpublic void deletePost(Post post) {\n\t\tgetHibernateTemplate().delete(post);\r\n\t}",
"public int deletePost(Integer post_id) {\n\t\treturn postDao.deletePost(post_id);\r\n\t}",
"@DeleteMapping(\"/{post_id}\")\n private ResponseEntity<Post> deletePost(@PathVariable Long post_id) {\n postService.deleteById(post_id);\n return ResponseEntity.ok().build();\n }",
"public void Delete(){\n String whereClause2 = PostDatabase.ID + \" = ?\";\n // Specify arguments in placeholder order.\n String[] whereArgs2 = { \"6\" };\n // Issue SQL statement.\n sqlDB.delete(PostDatabase.TABLE_POSTS, whereClause2, whereArgs2);\n\n }",
"@DeleteMapping(\"/deletePost/{id}\")\n public ResponseEntity deletePost(@PathVariable @RequestBody Long id){\n postService.deletePost(id);\n return new ResponseEntity<>(HttpStatus.OK);\n }",
"@Override\n\tpublic void deletePost(Post post) {\n\n\t}",
"@NonNull\n int deleteByPostId(@NonNull @Param(\"postId\") Integer postId);",
"void deleteBlogPost(BlogPost blogPost);",
"public void delete(PostDTO p) {\n refreshState();\n ctrl.deletePost(p.getId());\n refreshState();\n }",
"@DeleteMapping(\"/{id}\")\n @ResponseStatus(HttpStatus.NO_CONTENT)\n public void deletePost(@PathVariable Long id){\n postService.deletePost(id);\n }",
"public static Result deletePost(Long id) {\n\t\tPost.delete(id);\n\t\tflash(\"headerMessage\",\"Your post was successfully deleted\");\n\t\treturn redirect(routes.PostController.posts());\n\t}",
"@DeleteMapping(\"/posts/{id}\")\n ResponseEntity<?> deletePost(@PathVariable Long id) {\n if (!isAuthorizedToDelete(id)) {\n return new ResponseEntity<>(\"Unauthorized action\", HttpStatus.UNAUTHORIZED);\n }\n postRepository.deleteById(id);\n return ResponseEntity.noContent().build();\n }",
"public List<PostEntry> deletePost(String username, int postid){\n Connection c = null;\n PreparedStatement ps = null; \n\n boolean ret = true;\n try {\n //Get connection\n c = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/CS144\", \"cs144\", \"\");\n\n //Prepare statement\n ps = c.prepareStatement(\"DELETE FROM Posts WHERE username=? AND postid=?\");\n ps.setString(1, username);\n ps.setInt(2, postid);\n\n int changed = ps.executeUpdate();\n\n } catch(SQLException e){\n //error handling\n System.out.println(\"SQLException caught.\");\n e.printStackTrace();\n } finally {\n //just need to close all\n try { ps.close(); } catch (Exception e) { /* ignored */ }\n try { c.close(); } catch (Exception e) { /* ignored */ }\n }\n return findList(username);\n }",
"void deleteById(Integer id);",
"void deleteById(Integer id);",
"public BlogEntry deleteBlogEntry(Long id);",
"@Override\n public Long deletePost(Long postId, String token) throws TokenException, UnauthorizeActionException, PostNotExistException {\n User user = sender.getUserFromUserAPI(token);\n if (user == null) {\n logger.info(\"Invalid token: \" + token + \" User could not be found\");\n throw new TokenException(\"Invalid Token.\");};\n Post savedPost = postRepository.findById(postId).orElse(null);\n if(savedPost==null)\n {\n logger.info(\"Post not found for this postId: \" + postId + \" Delete operation could not be performed\");\n throw new PostNotExistException(\"Post Doesn't Exist.\");};\n if (savedPost.getUserId().longValue() != user.getUserId().longValue()) throw new UnauthorizeActionException(\"Unauthorized Action.\");\n sender.deleteCommentsOfPost(savedPost.getPostId());\n postRepository.delete(savedPost);\n return savedPost.getPostId();\n }",
"int deleteByExample(WpPostsExample example);",
"@DELETE(\"posts/{id}/\")\n Call<Void> delete(@Path(\"id\") int id);",
"public void deletePost(PostInfo postInfo) throws SQLException {\n String sql = \"UPDATE `post` SET `status`=0 WHERE `post_id` = ?\";\n preparedStatement = connection.prepareStatement(sql, Statement.RETURN_GENERATED_KEYS);\n preparedStatement.setInt(1, postInfo.getPost_id());\n\n preparedStatement.executeUpdate();\n }",
"public void delete(Integer id);",
"public void delete(Integer id);",
"public void delete(Integer id);",
"void deleteBypostno(int postno);",
"void deleteById(int id);",
"void deleteById(Long id);",
"void deleteById(Long id);",
"void deleteById(Long id);",
"void deleteById(Long id);",
"public void deleteById(int theId);",
"public void deleteById(Long id);",
"@Override\n public void removePost(int id) throws RemoteException, SQLException {\n Logger.getGlobal().log(Level.INFO,\"Suppression d'un message dans le composant post de nom : \" + this.getName());\n String q = \"DELETE FROM posts_krowemarf WHERE id = ?\";\n PreparedStatement pstmt = this.dbConnection.prepareStatement(q, Statement.RETURN_GENERATED_KEYS);\n pstmt.setInt(1, id);\n pstmt.executeUpdate();\n }",
"void delete(Integer id);",
"void delete(Integer id);",
"int deleteByExample(PmPostExample example);",
"public void delete(int id);",
"void deleteEntityById(Long id);",
"@Query(value = \"{ 'id': ?0}\", delete = true)\n\tLong deleteById(Integer id);",
"int deleteById(Long id);",
"void deleteById(long id);",
"public void delete(RutaPk pk) throws RutaDaoException;",
"public void deleteById(String id);",
"void delete( Integer id );",
"int deleteByPrimaryKey(Long articleTagId);",
"void deleteById(Long Id);",
"void deleteById(String id);",
"void deleteById(String id);",
"void deleteById(String id);",
"void deleteById(String id);",
"void deleteById(String id);",
"void deleteById(String id);",
"void deleteById(String id);",
"void deleteById(String id);",
"void deleteById(String id);",
"void deleteById(String id);",
"public void delete(Long id);",
"public void delete(Long id);",
"public void delete(Long id);",
"public void delete(Long id);",
"public void delete(Long id);",
"@Test(expected = NoResultException.class)\r\n public void deletePost(){\r\n\r\n Post post = entityManager.createNamedQuery(\"Post.fetchAllRecordsByUserId\", Post.class)\r\n .setParameter(\"value1\", 3000l)\r\n .getSingleResult(); \r\n\r\n \r\n assertNotNull(post);\r\n \r\n entityTransaction.begin();\r\n assertTrue(post.getLikes() > 2);\r\n entityManager.remove(post);\r\n entityTransaction.commit();\r\n \r\n post = entityManager.createNamedQuery(\"Post.fetchAllRecordsByUserId\", Post.class)\r\n .setParameter(\"value1\", post.getUserId())\r\n .getSingleResult(); \r\n assertNull(post);\r\n \r\n }",
"public int delete(int id) throws SQLException {\r\n\tString sql = \"DELETE FROM posts WHERE id = ?\";\r\n\tPreparedStatement st = db.prepareStatement(sql);\r\n\tst.setQueryTimeout(TIMEOUT);\r\n\r\n\tst.setInt(1, id);\r\n\r\n\tst.execute();\r\n\tint result = st.getUpdateCount();\r\n\treturn result;\r\n }",
"@ApiOperation(\"Delete a post\")\n @RequestMapping(value = \"/{uuid}\", method = RequestMethod.DELETE, produces = MediaType.APPLICATION_JSON_VALUE)\n public ResponseEntity<Post> deletePost(@PathVariable String uuid) {\n if (postRepository.exists(uuid)) {\n postRepository.delete(uuid);\n return ResponseEntity\n .ok()\n .build();\n } else {\n return ResponseEntity\n .notFound()\n .build();\n }\n }",
"@Override\n public int deleteByPrimaryKey(Integer id) {\n return jurUrlMapper.deleteByPrimaryKey(id);\n }",
"int deleteByPrimaryKey(Long tagid);",
"int deleteByPrimaryKey(Integer petid);",
"public void deletePost(View v){\n FirebaseDatabase database = FirebaseDatabase.getInstance();\n //remove the job from the list of all jobs with a listener\n DatabaseReference myJobRef = database.getReference(\"Jobs\");\n myJobRef.addListenerForSingleValueEvent(new ToggleAddIDVEListener(ViewSingleJobActivity.this,jobPost.getPostid()));\n //remove the job from the users job list with a listener*\n DatabaseReference myUserJobsRef = database.getReference(\"Users\").child(jobPost.getUserid()).child(\"jobs\");\n myUserJobsRef.addListenerForSingleValueEvent(new ToggleAddIDVEListener(ViewSingleJobActivity.this, jobPost.getPostid()));\n finish();\n }",
"int deleteByPrimaryKey(String objId);",
"int deleteByPrimaryKey(String objId);",
"void delete(Long id);",
"void delete(Long id);",
"void delete(Long id);",
"void delete(Long id);",
"void delete(Long id);",
"void delete(Long id);",
"void delete(Long id);",
"void delete(Long id);",
"void delete(Long id);",
"void delete(Long id);",
"void delete(Long id);",
"void delete(Long id);",
"void delete(Long id);",
"void delete(Long id);",
"void delete(Long id);",
"void delete(Long id);",
"void delete(Long id);",
"void delete(Long id);",
"void delete(Long id);",
"void delete(Long id);",
"void delete(Long id);",
"void delete(Long id);",
"void delete(Long id);",
"void delete(Long id);",
"void delete(Long id);",
"void delete(Long id);"
] | [
"0.8276546",
"0.8130851",
"0.8026499",
"0.8001267",
"0.79583764",
"0.7801201",
"0.7656009",
"0.7643201",
"0.76111054",
"0.76095176",
"0.755577",
"0.7538583",
"0.74289405",
"0.730614",
"0.7303919",
"0.70945793",
"0.70627",
"0.6901897",
"0.68809175",
"0.68809175",
"0.6860068",
"0.68540674",
"0.68403083",
"0.6839532",
"0.6833813",
"0.68241465",
"0.68241465",
"0.68241465",
"0.68221956",
"0.6798349",
"0.6743659",
"0.6743659",
"0.6743659",
"0.6743659",
"0.6739649",
"0.67250186",
"0.67171323",
"0.67166877",
"0.67166877",
"0.67136866",
"0.6713302",
"0.6709302",
"0.6707477",
"0.6681811",
"0.66796875",
"0.667951",
"0.6676904",
"0.66619337",
"0.6654687",
"0.6637402",
"0.6634489",
"0.6634489",
"0.6634489",
"0.6634489",
"0.6634489",
"0.6634489",
"0.6634489",
"0.6634489",
"0.6634489",
"0.6634489",
"0.6628399",
"0.6628399",
"0.6628399",
"0.6628399",
"0.6628399",
"0.6626982",
"0.66246116",
"0.6615357",
"0.6601663",
"0.6596823",
"0.6589026",
"0.6577375",
"0.65648216",
"0.65648216",
"0.6564075",
"0.6564075",
"0.6564075",
"0.6564075",
"0.6564075",
"0.6564075",
"0.6564075",
"0.6564075",
"0.6564075",
"0.6564075",
"0.6564075",
"0.6564075",
"0.6564075",
"0.6564075",
"0.6564075",
"0.6564075",
"0.6564075",
"0.6564075",
"0.6564075",
"0.6564075",
"0.6564075",
"0.6564075",
"0.6564075",
"0.6564075",
"0.6564075",
"0.6564075"
] | 0.8674717 | 0 |
Use this factory method to create a new instance of this fragment using the provided parameters. | public static DisplayGoodGroupFragment newInstance(Goods[] goods) {
DisplayGoodGroupFragment fragment = new DisplayGoodGroupFragment();
Bundle args = new Bundle();
args.putSerializable(Goods.class.getName(), goods);
fragment.setArguments(args);
return fragment;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static FragmentTousWanted newInstance() {\n FragmentTousWanted fragment = new FragmentTousWanted();\n Bundle args = new Bundle();\n fragment.setArguments(args);\n return fragment;\n }",
"protected abstract Fragment createFragment();",
"public void createFragment() {\n\n }",
"@Override\n protected Fragment createFragment() {\n Intent intent = getIntent();\n\n long id = intent.getLongExtra(MovieDetailFragment.EXTRA_ID, -1);\n return MovieDetailFragment.newInstance(id);\n }",
"public CuartoFragment() {\n }",
"public StintFragment() {\n }",
"public ExploreFragment() {\n\n }",
"public RickAndMortyFragment() {\n }",
"public LogFragment() {\n }",
"public FragmentMy() {\n }",
"public FeedFragment() {\n }",
"public HistoryFragment() {\n }",
"public HistoryFragment() {\n }",
"public static MyFeedFragment newInstance() {\n return new MyFeedFragment();\n }",
"public WkfFragment() {\n }",
"public static ScheduleFragment newInstance() {\n ScheduleFragment fragment = new ScheduleFragment();\n Bundle args = new Bundle();\n //args.putString(ARG_PARAM1, param1);\n //args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }",
"public ProfileFragment(){}",
"public WelcomeFragment() {}",
"public static ForumFragment newInstance() {\n ForumFragment fragment = new ForumFragment();\n Bundle args = new Bundle();\n fragment.setArguments(args);\n\n return fragment;\n }",
"public static NotificationFragment newInstance() {\n NotificationFragment fragment = new NotificationFragment();\n Bundle args = new Bundle();\n// args.putString(ARG_PARAM1, param1);\n// args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }",
"public progFragment() {\n }",
"public static RouteFragment newInstance() {\n RouteFragment fragment = new RouteFragment();\n Bundle args = new Bundle();\n //fragment.setArguments(args);\n return fragment;\n }",
"public HeaderFragment() {}",
"public EmployeeFragment() {\n }",
"public Fragment_Tutorial() {}",
"public NewShopFragment() {\n }",
"public FavoriteFragment() {\n }",
"public static MyCourseFragment newInstance() {\n MyCourseFragment fragment = new MyCourseFragment();\r\n// fragment.setArguments(args);\r\n return fragment;\r\n }",
"public static MessageFragment newInstance() {\n MessageFragment fragment = new MessageFragment();\n Bundle args = new Bundle();\n\n fragment.setArguments(args);\n return fragment;\n }",
"public static ReservationFragment newInstance() {\n\n ReservationFragment _fragment = new ReservationFragment();\n// Bundle args = new Bundle();\n// args.putString(ARG_PARAM1, param1);\n// args.putString(ARG_PARAM2, param2);\n// fragment.setArguments(args);\n return _fragment;\n }",
"public CreateEventFragment() {\n // Required empty public constructor\n }",
"public static RecipeListFragment newInstance() {\n RecipeListFragment fragment = new RecipeListFragment();\n// Bundle args = new Bundle();\n// args.putString(ARG_PARAM1, param1);\n// args.putString(ARG_PARAM2, param2);\n// fragment.setArguments(args);\n return fragment;\n }",
"public static Fragment newInstance() {\n\t\treturn new ScreenSlidePageFragment();\n\t}",
"public NoteActivityFragment() {\n }",
"public static WeekViewFragment newInstance(int param1, int param2) {\n WeekViewFragment fragment = new WeekViewFragment();\n //WeekViewFragment 객체 생성\n Bundle args = new Bundle();\n //Bundle 객체 생성\n args.putInt(ARG_PARAM1, param1);\n //ARG_PARAM1에 param1의 정수값 넣어서 args에 저장\n args.putInt(ARG_PARAM2, param2);\n //ARG_PARAM2에 param2의 정수값 넣어서 args에 저장\n fragment.setArguments(args);\n //args를 매개변수로 한 setArguments() 메소드 수행하여 fragment에 저장\n return fragment; //fragment 반환\n }",
"public static Fragment0 newInstance(String param1, String param2) {\n Fragment0 fragment = new Fragment0();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }",
"public static QueenBEmbassyF newInstance() {\n QueenBEmbassyF fragment = new QueenBEmbassyF();\n //the way to pass arguments between fragments\n Bundle args = new Bundle();\n\n fragment.setArguments(args);\n return fragment;\n }",
"public EventHistoryFragment() {\n\t}",
"public static Fragment newInstance() {\n StatisticsFragment fragment = new StatisticsFragment();\n Bundle args = new Bundle();\n fragment.setArguments(args);\n return fragment;\n }",
"public HomeFragment() {}",
"public PeopleFragment() {\n // Required empty public constructor\n }",
"public static FeedFragment newInstance() {\n FeedFragment fragment = new FeedFragment();\n return fragment;\n }",
"public static MainFragment newInstance(String param1, String param2) {\n MainFragment fragment = new MainFragment();\n Bundle args = new Bundle();\n fragment.setArguments(args);\n return fragment;\n }",
"public VantaggiFragment() {\n // Required empty public constructor\n }",
"public AddressDetailFragment() {\n }",
"public ArticleDetailFragment() { }",
"public static DropboxMainFrag newInstance() {\n DropboxMainFrag fragment = new DropboxMainFrag();\n // set arguments in Bundle\n return fragment;\n }",
"public RegisterFragment() {\n }",
"public EmailFragment() {\n }",
"public static CommentFragment newInstance() {\n CommentFragment fragment = new CommentFragment();\n\n return fragment;\n }",
"public static FragmentComida newInstance(String param1) {\n FragmentComida fragment = new FragmentComida();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n fragment.setArguments(args);\n return fragment;\n\n\n }",
"public static ParqueosFragment newInstance() {\n ParqueosFragment fragment = new ParqueosFragment();\n return fragment;\n }",
"public ForecastFragment() {\n }",
"public FExDetailFragment() {\n \t}",
"public static AddressFragment newInstance(String param1) {\n AddressFragment fragment = new AddressFragment();\n\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n fragment.setArguments(args);\n\n return fragment;\n }",
"public TripNoteFragment() {\n }",
"public ItemFragment() {\n }",
"public NoteListFragment() {\n }",
"public CreatePatientFragment() {\n\n }",
"public DisplayFragment() {\n\n }",
"public static frag4_viewcompliment newInstance(String param1, String param2) {\r\n frag4_viewcompliment fragment = new frag4_viewcompliment();\r\n Bundle args = new Bundle();\r\n args.putString(ARG_PARAM1, param1);\r\n args.putString(ARG_PARAM2, param2);\r\n fragment.setArguments(args);\r\n return fragment;\r\n }",
"public static fragment_profile newInstance(String param1, String param2) {\n fragment_profile fragment = new fragment_profile();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }",
"@Override\n\tprotected Fragment createFragment() {\n\t\treturn new FormFragment();\n\t}",
"public static MainFragment newInstance() {\n MainFragment fragment = new MainFragment();\n Bundle args = new Bundle();\n fragment.setArguments(args);\n return fragment;\n }",
"public ProfileFragment() {\n\n }",
"public BackEndFragment() {\n }",
"public CustomerFragment() {\n }",
"public static FriendsFragment newInstance(int sectionNumber) {\n \tFriendsFragment fragment = new FriendsFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }",
"public ArticleDetailFragment() {\n }",
"public ArticleDetailFragment() {\n }",
"public ArticleDetailFragment() {\n }",
"public static Fragment newInstance() {\n return new SettingsFragment();\n }",
"public PeersFragment() {\n }",
"public SummaryFragment newInstance()\n {\n return new SummaryFragment();\n }",
"public TagsFragment() {\n }",
"public static ProfileFragment newInstance() {\n ProfileFragment fragment = new ProfileFragment();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, \"\");\n args.putString(ARG_PARAM2, \"\");\n fragment.setArguments(args);\n return fragment;\n }",
"public static FriendsFragment newInstance() {\n FriendsFragment fragment = new FriendsFragment();\n\n return fragment;\n }",
"public HomeSectionFragment() {\n\t}",
"public static FirstFragment newInstance(String text) {\n\n FirstFragment f = new FirstFragment();\n Bundle b = new Bundle();\n b.putString(\"msg\", text);\n\n f.setArguments(b);\n\n return f;\n }",
"public static LogFragment newInstance(Bundle params) {\n LogFragment fragment = new LogFragment();\n fragment.setArguments(params);\n return fragment;\n }",
"public PersonDetailFragment() {\r\n }",
"public RegisterFragment() {\n // Required empty public constructor\n }",
"public VehicleFragment() {\r\n }",
"public static Fine newInstance(String param1, String param2) {\n Fine fragment = new Fine();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }",
"public static FriendsFragment newInstance(String param1, String param2) {\n FriendsFragment fragment = new FriendsFragment();\n Bundle args = new Bundle();\n fragment.setArguments(args);\n return fragment;\n }",
"public static ChangesViewFragment newInstance() {\n\t\tChangesViewFragment fragment = new ChangesViewFragment();\n\t\tBundle args = new Bundle();\n\t\targs.putInt(HomeViewActivity.ARG_SECTION_NUMBER, 2);\n\t\tfragment.setArguments(args);\n\t\treturn fragment;\n\t}",
"public static NoteFragment newInstance(String param1, String param2) {\n NoteFragment fragment = new NoteFragment();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }",
"public static MainFragment newInstance(Context context) {\n MainFragment fragment = new MainFragment();\n if(context != null)\n fragment.setVariables(context);\n return fragment;\n }",
"@Override\n\tprotected Fragment createFragment() {\n\t\treturn new CrimeListFragment();\n\t}",
"public static MoneyLogFragment newInstance() {\n MoneyLogFragment fragment = new MoneyLogFragment();\n return fragment;\n }",
"public static ForecastFragment newInstance() {\n\n //Create new fragment\n ForecastFragment frag = new ForecastFragment();\n return(frag);\n }",
"public static MainFragment newInstance(String param1, String param2) {\n MainFragment fragment = new MainFragment();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }",
"public static MainFragment newInstance(String param1, String param2) {\n MainFragment fragment = new MainFragment();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }",
"public static MainFragment newInstance(String param1, String param2) {\n MainFragment fragment = new MainFragment();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }",
"public static MyTaskFragment newInstance(String param1) {\n MyTaskFragment fragment = new MyTaskFragment();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n fragment.setArguments(args);\n return fragment;\n }",
"public static MyProfileFragment newInstance(String param1, String param2) {\n MyProfileFragment fragment = new MyProfileFragment();\n return fragment;\n }",
"public static MainFragment newInstance(int param1, String param2) {\n MainFragment fragment = new MainFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_PARAM1, param1);\n\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }",
"public PlaylistFragment() {\n }",
"public static HistoryFragment newInstance() {\n HistoryFragment fragment = new HistoryFragment();\n return fragment;\n }",
"public static SurvivorIncidentFormFragment newInstance(String param1, String param2) {\n// SurvivorIncidentFormFragment fragment = new SurvivorIncidentFormFragment();\n// Bundle args = new Bundle();\n// args.putString(ARG_PARAM1, param1);\n// args.putString(ARG_PARAM2, param2);\n// fragment.setArguments(args);\n// return fragment;\n\n SurvivorIncidentFormFragment fragment = new SurvivorIncidentFormFragment();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n\n\n }",
"public static PersonalFragment newInstance(String param1, String param2) {\n PersonalFragment fragment = new PersonalFragment();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }"
] | [
"0.72587806",
"0.72315",
"0.71128035",
"0.6989915",
"0.69888663",
"0.68323874",
"0.68284166",
"0.6811231",
"0.6799868",
"0.6799074",
"0.6764381",
"0.6738079",
"0.6738079",
"0.67268246",
"0.6715347",
"0.67061615",
"0.6690773",
"0.6689529",
"0.6687659",
"0.6661806",
"0.6644326",
"0.66413724",
"0.6639174",
"0.66334546",
"0.66162664",
"0.6612923",
"0.66066813",
"0.6604181",
"0.65985304",
"0.65916866",
"0.6590765",
"0.6590542",
"0.6580825",
"0.65777844",
"0.6563632",
"0.656029",
"0.6557861",
"0.65497226",
"0.6549494",
"0.65420955",
"0.6539689",
"0.653395",
"0.65324813",
"0.6528364",
"0.6523803",
"0.65223694",
"0.6521728",
"0.65150344",
"0.65042657",
"0.6497416",
"0.649707",
"0.6494283",
"0.6493901",
"0.6485082",
"0.64849406",
"0.64794314",
"0.64767885",
"0.64747125",
"0.6469636",
"0.64654803",
"0.64569527",
"0.64559346",
"0.64538103",
"0.6451536",
"0.645034",
"0.64483374",
"0.6447979",
"0.64471924",
"0.6442164",
"0.6442164",
"0.6442164",
"0.6441202",
"0.64404285",
"0.6439219",
"0.64367384",
"0.6434118",
"0.64292616",
"0.6427671",
"0.6423538",
"0.6419575",
"0.6418982",
"0.6413233",
"0.6412808",
"0.6402954",
"0.64015436",
"0.6396632",
"0.6396196",
"0.63905257",
"0.6388367",
"0.63835037",
"0.6379759",
"0.6375117",
"0.6375117",
"0.6375117",
"0.6373985",
"0.6364944",
"0.63644207",
"0.63595194",
"0.6353178",
"0.635139",
"0.6351071"
] | 0.0 | -1 |
Inflate the layout for this fragment | @Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
return super.onCreateView(inflater, (ViewGroup) inflater.inflate(R.layout.fragment_display_good_detial, container, false), savedInstanceState);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_main_allinfo, container, false);\n }",
"@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\treturn inflater.inflate(R.layout.wallpager_layout, null);\r\n\t}",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_invit_friends, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_zhuye, container, false);\n initView(inflate);\n initData();\n return inflate;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.fragment_posts, parent, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n return inflater.inflate(R.layout.ilustration_fragment, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_sow_drug_cost_per_week, container, false);\n\n db = new DataBaseAdapter(getActivity());\n hc = new HelperClass();\n pop = new FeedSowsFragment();\n\n infltr = (LayoutInflater) getActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n parent = (LinearLayout) v.findViewById(R.id.layout_for_add);\n tvTotalCost = (TextView) v.findViewById(R.id.totalCost);\n\n getData();\n setData();\n\n return v;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_stream_list, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_event, container, false);\n\n\n\n\n\n\n\n\n return v;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_feed, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.screen_select_list_student, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_overall, container, false);\n mNamesLayout = (LinearLayout) rootView.findViewById(R.id.fragment_overall_names_layout);\n mOverallView = (OverallView) rootView.findViewById(R.id.fragment_overall_view);\n return rootView;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState)\n {\n\n\n view = inflater.inflate(R.layout.fragment_earning_fragmant, container, false);\n ini(view);\n return view;\n }",
"@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n super.onCreateView(inflater, container, savedInstanceState);\n final View rootview = inflater.inflate(R.layout.activity_email_frag, container, false);\n ConfigInnerElements(rootview);\n return rootview;\n }",
"@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\trootView = inflater.inflate(R.layout.fragment_attack_armor, container, false);\r\n\r\n\t\tfindInterfaceElements();\r\n\t\taddRangeSelector();\r\n\t\tupdateHeadings();\r\n\t\tsetListeners();\r\n\r\n\t\tsetFromData();\r\n\r\n\t\treturn rootView;\r\n\t}",
"@SuppressLint(\"InflateParams\")\r\n\t@Override\r\n\tpublic View initLayout(LayoutInflater inflater) {\n\t\tView view = inflater.inflate(R.layout.frag_customer_all, null);\r\n\t\treturn view;\r\n\t}",
"@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_fore_cast, container, false);\r\n initView();\r\n mainLayout.setVisibility(View.GONE);\r\n apiInterface = RestClinet.getClient().create(ApiInterface.class);\r\n loadData();\r\n return view;\r\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_friend, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.fragment_detail, container, false);\n image = rootView.findViewById(R.id.fr_image);\n name = rootView.findViewById(R.id.fr_name);\n phoneNumber = rootView.findViewById(R.id.fr_phone_number);\n email = rootView.findViewById(R.id.fr_email);\n street = rootView.findViewById(R.id.fr_street);\n city = rootView.findViewById(R.id.fr_city);\n state = rootView.findViewById(R.id.fr_state);\n zipcode = rootView.findViewById(R.id.fr_zipcode);\n dBrith = rootView.findViewById(R.id.date_brith);\n return rootView;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_pm25, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_kkbox_playlist, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_feed_pager, container, false);\n\n// loadData();\n\n findViews(rootView);\n\n setViews();\n\n return rootView;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n layout = (FrameLayout) inflater.inflate(R.layout.fragment_actualites, container, false);\n\n relLayout = (RelativeLayout) layout.findViewById(R.id.relLayoutActus);\n\n initListView();\n getXMLData();\n\n return layout;\n }",
"@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.frag_post_prayer_video, container, false);\n setCustomDesign();\n setCustomClickListeners();\n return rootView;\n }",
"@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\treturn inflater.inflate(R.layout.lf_em4305_fragment, container, false);\n\t}",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_recordings, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view=inflater.inflate(R.layout.fragment_category, container, false);\n initView(view);\n bindRefreshListener();\n loadParams();\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_cm_box_details, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view=inflater.inflate(R.layout.fragment_layout12, container, false);\n\n iniv();\n\n init();\n\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_details, container, false);\n //return inflater.inflate(R.layout.fragment_details, container, false);\n getIntentValues();\n initViews();\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_mem_body_blood, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_qiugouxiaoxi, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_coll_blank, container, false);\n initView(inflate);\n initData();\n return inflate;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_attendance_divide, container, false);\n\n initView(view);\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.show_program_fragment, parent, false);\n }",
"@Override\n public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container,\n @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.visualization_fragment, container, false);\n\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.fragment_category_details_page, container, false);\n initializeAll();\n\n return rootView;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n final View v = inflater.inflate(R.layout.fragemnt_reserve, container, false);\n\n\n\n\n return v;\n }",
"protected int getLayoutResId() {\n return R.layout.activity_fragment;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_all_quizs, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n role = getArguments().getInt(\"role\");\n rootview = inflater.inflate(R.layout.fragment_application, container, false);\n layout = rootview.findViewById(R.id.patentDetails);\n progressBar = rootview.findViewById(R.id.progressBar);\n try {\n run();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return rootview;\n }",
"@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\tview = inflater.inflate(R.layout.fragment_zhu, null);\n\t\tinitView();\n\t\tinitData();\n\t\treturn view;\n\t}",
"@Override\n\t\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)\n\t\t{\n\t\t\tView rootView = inflater.inflate(R.layout.maimfragment, container, false);\n\t\t\treturn rootView;\n\t\t}",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n // Inflate the layout for this fragment\n return inflater.inflate(R.layout.fragment__record__week, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_porishongkhan, container, false);\n\n\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_dashboard, container, false);\n resultsRv = view.findViewById(R.id.db_results_rv);\n resultText = view.findViewById(R.id.db_search_empty);\n progressBar = view.findViewById(R.id.db_progressbar);\n lastVisitText = view.findViewById(R.id.db_last_visit);\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(getLayoutId(), container, false);\n init(view);\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_feedback, container, false);\n self = getActivity();\n initUI(view);\n initControlUI();\n initData();\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_service_summery, container, false);\n tvVoiceMS = v.findViewById(R.id.tvVoiceValue);\n tvDataMS = v.findViewById(R.id.tvdataValue);\n tvSMSMS = v.findViewById(R.id.tvSMSValue);\n tvVoiceFL = v.findViewById(R.id.tvVoiceFLValue);\n tvDataBS = v.findViewById(R.id.tvDataBRValue);\n tvTotal = v.findViewById(R.id.tvTotalAccountvalue);\n return v;\n }",
"@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_clan_rank_details, container, false);\r\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_star_wars_list, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_lei, container, false);\n\n initView(inflate);\n initData();\n return inflate;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_quotation, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_wode_ragment, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n\n\n\n\n\n return inflater.inflate(R.layout.fragment_appoint_list, parent, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n if (rootView == null) {\n rootView = inflater.inflate(R.layout.fragment_ip_info, container, false);\n initView();\n }\n return rootView;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_offer, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_rooms, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\n View view = inflater.inflate(R.layout.fragment_img_eva, container, false);\n\n getSendData();\n\n initView(view);\n\n initData();\n\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_project_collection, container, false);\n ButterKnife.bind(this, view);\n fragment = this;\n initView();\n getCollectionType();\n // getCategoryList();\n initBroadcastReceiver();\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_yzm, container, false);\n initView(view);\n return view;\n }",
"@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\t\tmainLayout = inflater.inflate(R.layout.fragment_play, container, false);\r\n\t\treturn mainLayout;\r\n\t}",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_invite_request, container, false);\n initialiseVariables();\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n getLocationPermission();\n return inflater.inflate(R.layout.centrum_fragment, container, false);\n\n\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_habit_type_details, container, false);\n\n habitTitle = rootView.findViewById(R.id.textViewTitle);\n habitReason = rootView.findViewById(R.id.textViewReason);\n habitStartDate = rootView.findViewById(R.id.textViewStartDate);\n habitWeeklyPlan = rootView.findViewById(R.id.textViewWeeklyPlan);\n\n return rootView;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_information_friends4, container, false);\n\n if (getArguments() != null) {\n FriendsID = getArguments().getString(\"keyFriends\");\n }\n\n return v;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_post_details, container, false);\n\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_hotel, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view=inflater.inflate(R.layout.fragment_bus_inquiry, container, false);\n initView();\n initData();\n initDialog();\n getDataFromNet();\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_weather, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_srgl, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_ground_detail_frgment, container, false);\n init();\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_book_appointment, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_wheretogo, container, false);\n ids();\n setup();\n click();\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n binding = DataBindingUtil\n .inflate(inflater, R.layout.fragment_learning_leaders, container, false);\n init();\n\n return rootView;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_end_game_tab, container, false);\n\n setupWidgets();\n setupTextFields(view);\n setupSpinners(view);\n\n // Inflate the layout for this fragment\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.memoir_fragment, container, false);\n\n getUserIdFromSharedPref();\n configureUI(view);\n configureSortSpinner();\n configureFilterSpinner();\n\n networkConnection = new NetworkConnection();\n new GetAllMemoirTask().execute();\n\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_jadwal, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_delivery_detail, container, false);\n initialise();\n\n\n\n return view;\n }",
"@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_4, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_all_product, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_group_details, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment06_7, container, false);\n initView(view);\n setLegend();\n setXAxis();\n setYAxis();\n setData();\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_downloadables, container, false);\n }",
"@Override\n public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.movie_list_fragment, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_like, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_hall, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_unit_main, container, false);\n TextView mTxvBusinessAassistant = (TextView) view.findViewById(R.id.txv_business_assistant);\n TextView mTxvCardINformation = (TextView) view.findViewById(R.id.txv_card_information);\n RelativeLayout mRelOfficialWebsite = (RelativeLayout) view.findViewById(R.id.rel_official_website);\n RelativeLayout mRelPictureAblum = (RelativeLayout) view.findViewById(R.id.rel_picture_album);\n TextView mTxvQrCodeCard = (TextView) view.findViewById(R.id.txv_qr_code_card);\n TextView mTxvShareCard = (TextView) view.findViewById(R.id.txv_share_card);\n mTxvBusinessAassistant.setOnClickListener(this.mOnClickListener);\n mTxvCardINformation.setOnClickListener(this.mOnClickListener);\n mRelOfficialWebsite.setOnClickListener(this.mOnClickListener);\n mRelPictureAblum.setOnClickListener(this.mOnClickListener);\n mTxvQrCodeCard.setOnClickListener(this.mOnClickListener);\n mTxvShareCard.setOnClickListener(this.mOnClickListener);\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_moviespage, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_s, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_overview, container, false);\n\n initOverviewComponents(view);\n registerListeners();\n initTagListener();\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_bahan_ajar, container, false);\n initView(view);\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n root = (ViewGroup) inflater.inflate(R.layout.money_main, container, false);\n context = getActivity();\n initHeaderView(root);\n initView(root);\n\n getDate();\n initEvetn();\n return root;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.fragment_historical_event, parent, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_event_details, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_video, container, false);\n unbinder = ButterKnife.bind(this, view);\n initView();\n initData();\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n v= inflater.inflate(R.layout.fragment_post_contacts, container, false);\n this.mapping(v);\n return v;\n }",
"@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_measures, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_feed, container, false);\n findViews(view);\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_surah_list, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_data_binded, container, false);\n }"
] | [
"0.6739604",
"0.67235583",
"0.6721706",
"0.6698254",
"0.6691869",
"0.6687986",
"0.66869223",
"0.6684548",
"0.66766286",
"0.6674615",
"0.66654444",
"0.66654384",
"0.6664403",
"0.66596216",
"0.6653321",
"0.6647136",
"0.66423255",
"0.66388357",
"0.6637491",
"0.6634193",
"0.6625158",
"0.66195583",
"0.66164845",
"0.6608733",
"0.6596594",
"0.65928894",
"0.6585293",
"0.65842897",
"0.65730995",
"0.6571248",
"0.6569152",
"0.65689117",
"0.656853",
"0.6566686",
"0.65652984",
"0.6553419",
"0.65525705",
"0.65432084",
"0.6542382",
"0.65411425",
"0.6538022",
"0.65366334",
"0.65355957",
"0.6535043",
"0.65329415",
"0.65311074",
"0.65310687",
"0.6528645",
"0.65277404",
"0.6525902",
"0.6524516",
"0.6524048",
"0.65232015",
"0.65224624",
"0.65185034",
"0.65130377",
"0.6512968",
"0.65122765",
"0.65116245",
"0.65106046",
"0.65103024",
"0.6509013",
"0.65088093",
"0.6508651",
"0.6508225",
"0.6504662",
"0.650149",
"0.65011525",
"0.6500686",
"0.64974767",
"0.64935696",
"0.6492234",
"0.6490034",
"0.6487609",
"0.6487216",
"0.64872116",
"0.6486594",
"0.64861935",
"0.6486018",
"0.6484269",
"0.648366",
"0.6481476",
"0.6481086",
"0.6480985",
"0.6480396",
"0.64797544",
"0.647696",
"0.64758915",
"0.6475649",
"0.6474114",
"0.6474004",
"0.6470706",
"0.6470275",
"0.64702207",
"0.6470039",
"0.6467449",
"0.646602",
"0.6462256",
"0.64617974",
"0.6461681",
"0.6461214"
] | 0.0 | -1 |
TODO: Rename method, update argument and hook method into UI event | public void onButtonPressed(Uri uri) {
if (mListener != null) {
mListener.onFragmentInteraction(uri);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\t\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t\t}",
"@Override\n\t\t\t\tpublic void handle(ActionEvent event) {\n\n\t\t\t\t}",
"@Override\n\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t}",
"public abstract void update(UIReader event);",
"@Override\r\n\t\t\tpublic void handle(ActionEvent arg0) {\n\t\t\t}",
"@Override\n\tpublic void handle(ActionEvent event) {\n\t\t\n\t}",
"@Override\n\tpublic void handle(ActionEvent event) {\n\n\t}",
"@Override\n\tpublic void handleUpdateUI(String text, int code) {\n\t\t\n\t}",
"@Override\n\tpublic void update(Event e) {\n\t}",
"public abstract void onInvoked(CommandSender sender, String[] args);",
"@Override\r\n public void updateUI() {\r\n }",
"@Override\r\n\tpublic void handle(ActionEvent arg0) {\n\t\t\r\n\t}",
"@Override\n\tprotected void UpdateUI() {\n\t\t\n\t}",
"@Override\n\tprotected void UpdateUI() {\n\t\t\n\t}",
"@Override\n\tpublic void processEvent(Event e) {\n\n\t}",
"@Override\n\t\t\tpublic void handleEvent(Event event) {\n\t\t\t\t \n\t\t\t}",
"@Override\n\t\t\tpublic void handleEvent(Event event) {\n\t\t\t\t \n\t\t\t}",
"@Override\n\tpublic void processCommand(JMVCommandEvent arg0) {\n\t}",
"@Override\n\tpublic void inputChanged( Viewer arg0, Object arg1, Object arg2 ) {\n\t}",
"@Override\n\tpublic void handleEvent(Event arg0) {\n\t\t\n\t}",
"@Override\r\n\tpublic void onCustomUpdate() {\n\t\t\r\n\t}",
"public void updateUI(){}",
"private synchronized void updateScreen(String arg){\n Platform.runLater(new Runnable() {\n @Override\n public void run() {\n setChanged();\n notifyObservers(arg);\n }\n });\n }",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\n\t\t\t}",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\n\t\t\t}",
"@Override\r\n public void actionPerformed( ActionEvent e )\r\n {\n }",
"@Override\n\t\t\tpublic void handleEvent(Event event) {\n\n\t\t\t}",
"@Override\n\t\t\tpublic void handleEvent(Event event) {\n\n\t\t\t}",
"@Override\n\t\t\tpublic void handleEvent(Event event) {\n\n\t\t\t}",
"@Override\n\t\t\tpublic void handleEvent(Event event) {\n\n\t\t\t}",
"@Override\n\t\t\tpublic void handleEvent(Event event) {\n\n\t\t\t}",
"@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\r\n\t\t\t}",
"@Override\r\n\tpublic void updateObjectListener(ActionEvent e) {\n\t\t\r\n\t}",
"Event () {\n // Nothing to do here.\n }",
"void onArgumentsChanged();",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void handleEvent(Event event) {\n\t\t\t}",
"@Override\n\t\t\tpublic void handleEvent(Event event) {\n\t\t\t}",
"@Override\n\t\t\tpublic void handleEvent(Event event) {\n\t\t\t}",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t}",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t}",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t}",
"void eventChanged();",
"@Override\r\n\t\t\tpublic void execute(LiftEvent e) {\n\t\t\t\t\r\n\t\t\t}",
"@Override\r\n\t\t\tpublic void execute(LiftEvent e) {\n\t\t\t\t\r\n\t\t\t}",
"@Override public void handle(ActionEvent e)\n\t {\n\t }",
"@Override\r\n\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\r\n\t\t}",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\n\t\t\t}",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\n\t\t\t}",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\n\t\t\t}",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\n\t\t\t}",
"@Override //se repita\r\n public void actionPerformed(ActionEvent ae) {\r\n \r\n }",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\n\t\t\t}",
"public abstract CommandResponse onCommand(CommandSender sender, String label, String[] args);",
"@Override\n public void actionPerformed(ActionEvent actionEvent) {\n }",
"@Override\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t}",
"@Override\r\n public void actionPerformed(ActionEvent e) {\n \r\n }",
"public abstract void onCommand(MessageEvent context) throws Exception;",
"@Override\r\n\tpublic void onEvent(Event arg0) {\n\r\n\t}",
"private void addParameterEventHandler(){\n\t\t\n\t\tgetParameterNameListBox().addDoubleClickHandler(new DoubleClickHandler() {\n\t\t\t@Override\n\t\t\tpublic void onDoubleClick(DoubleClickEvent event) {\n\t\t\t\tparameterAceEditor.clearAnnotations();\n\t\t\t\tparameterAceEditor.removeAllMarkers();\n\t\t\t\tparameterAceEditor.redisplay();\n\t\t\t\tSystem.out.println(\"In addParameterEventHandler on DoubleClick isPageDirty = \" + getIsPageDirty() + \" selectedIndex = \" + getParameterNameListBox().getSelectedIndex());\n\t\t\t\tsetIsDoubleClick(true);\n\t\t\t\tsetIsNavBarClick(false);\n\t\t\t\tif (getIsPageDirty()) {\n\t\t\t\t\tshowUnsavedChangesWarning();\n\t\t\t\t} else {\n\t\t\t\t\tint selectedIndex = getParameterNameListBox().getSelectedIndex();\n\t\t\t\t\tif (selectedIndex != -1) {\n\t\t\t\t\t\tfinal String selectedParamID = getParameterNameListBox().getValue(selectedIndex);\n\t\t\t\t\t\tcurrentSelectedParamerterObjId = selectedParamID;\n\t\t\t\t\t\tif(getParameterMap().get(selectedParamID) != null){\n\t\t\t\t\t\t\tgetParameterNameTxtArea().setText(getParameterMap().get(selectedParamID).getParameterName());\n\t\t\t\t\t\t\tgetParameterAceEditor().setText(getParameterMap().get(selectedParamID).getParameterLogic());\n\t\t\t\t\t\t\tSystem.out.println(\"In Parameter DoubleClickHandler, doing setText()\");\n\t\t\t\t\t\t\t//disable parameterName and Logic fields for Default Parameter\n\t\t\t\t\t\t\tboolean isReadOnly = getParameterMap().get(selectedParamID).isReadOnly();\n\t\t\t\t\t\t\tgetParameterButtonBar().getDeleteButton().setTitle(\"Delete\");\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(MatContext.get().getMeasureLockService()\n\t\t\t\t\t\t\t\t\t.checkForEditPermission()){\n\t\t\t\t\t\t\t\tsetParameterWidgetReadOnly(!isReadOnly);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// load most recent used cql artifacts\n\t\t\t\t\t\t\tMatContext.get().getMeasureService().getUsedCQLArtifacts(MatContext.get().getCurrentMeasureId(), new AsyncCallback<GetUsedCQLArtifactsResult>() {\n\n\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\tpublic void onFailure(Throwable caught) {\n\t\t\t\t\t\t\t\t\tWindow.alert(MatContext.get().getMessageDelegate().getGenericErrorMessage());\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\tpublic void onSuccess(GetUsedCQLArtifactsResult result) {\n\t\t\t\t\t\t\t\t\tif(result.getUsedCQLParameters().contains(getParameterMap().get(selectedParamID).getParameterName())) {\n\t\t\t\t\t\t\t\t\t\tgetParameterButtonBar().getDeleteButton().setEnabled(false);\n\t\t\t\t\t\t\t\t\t} \n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t} \n\t\t\t\t\t\n\t\t\t\t\tsuccessMessageAlert.clearAlert();\n\t\t\t\t\terrorMessageAlert.clearAlert();\n\t\t\t\t\twarningMessageAlert.clearAlert();\n\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t}",
"@Override\n public void handle(Event event) {\n }",
"@Override\n\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\n\t\t}",
"@Override\n\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\n\t\t}",
"@Override\n public void actionPerformed(AnActionEvent e) {\n }",
"@Override\n public void actionPerformed(ActionEvent e) {\n \n }",
"@Override\n public void actionPerformed(ActionEvent e) {\n \n }",
"@Override\n public void actionPerformed(ActionEvent e) {\n \n }",
"@Override\n public void actionPerformed(ActionEvent e) {\n \n }",
"@Override\r\n\tpublic void handleEvent(Event event) {\n\r\n\t}",
"public void ImageView(ActionEvent event) {\n\t}",
"@Override\n public void updateUi() {\n\n }",
"@Override\n public void updateUi() {\n\n }",
"@Override\n public void updateUi() {\n\n }",
"@Override\n\t\t\t\t\t\tpublic void mouseDown(MouseEvent arg0) {\n\n\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\tpublic void mouseDown(MouseEvent arg0) {\n\n\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\tpublic void mouseDown(MouseEvent arg0) {\n\n\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\tpublic void mouseDown(MouseEvent arg0) {\n\n\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\tpublic void mouseDown(MouseEvent arg0) {\n\n\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\tpublic void mouseDown(MouseEvent arg0) {\n\n\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\tpublic void mouseDown(MouseEvent arg0) {\n\n\t\t\t\t\t\t}",
"public void runInUi(ElexisEvent ev){}",
"@Override\n public void delta() {\n \n }",
"@Override\n\tpublic void onClick(ClickEvent arg0) {\n\t\t\n\t}",
"@Override\n public void actionPerformed(ActionEvent e) {\n }",
"@Override\n public void actionPerformed(ActionEvent e) {\n }",
"@Override\n\tprotected void OnClick() {\n\t\t\n\t}",
"@Override\n public void actionPerformed(ActionEvent ev) {\n }",
"@Override\n public void actionPerformed(ActionEvent e)\n {\n \n }",
"@Override\r\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\r\n\t}",
"@Override\n public void update(Observable o, Object arg)\n {\n \n }",
"@Override\n public void actionPerformed(ActionEvent e) {\n\n }",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tupdate();\n\t\t\t}",
"@Override\r\n public void processEvent(IAEvent e) {\n\r\n }"
] | [
"0.6619185",
"0.65246344",
"0.6473144",
"0.6473144",
"0.64351684",
"0.6325494",
"0.62368196",
"0.6189416",
"0.6158721",
"0.61455715",
"0.6123594",
"0.6107332",
"0.6101038",
"0.6092755",
"0.6049496",
"0.6049496",
"0.60442764",
"0.604003",
"0.604003",
"0.6007846",
"0.59999037",
"0.59848183",
"0.59776366",
"0.59587413",
"0.5940049",
"0.5925668",
"0.5925668",
"0.59208333",
"0.5915737",
"0.5915737",
"0.5915737",
"0.5915737",
"0.5915737",
"0.5915554",
"0.5909643",
"0.5895144",
"0.58947057",
"0.589277",
"0.58885247",
"0.58885247",
"0.58885247",
"0.58671176",
"0.58671176",
"0.58671176",
"0.58636886",
"0.5862447",
"0.5862447",
"0.58613557",
"0.5855828",
"0.5846504",
"0.5846504",
"0.5846504",
"0.5846504",
"0.5837475",
"0.58366984",
"0.5820788",
"0.58068436",
"0.58022934",
"0.5772422",
"0.57714665",
"0.5770862",
"0.5765655",
"0.5763872",
"0.57544947",
"0.57542855",
"0.57542855",
"0.57450074",
"0.57441026",
"0.57441026",
"0.57441026",
"0.5741053",
"0.574037",
"0.5739314",
"0.57367086",
"0.57367086",
"0.57367086",
"0.57322264",
"0.57322264",
"0.57322264",
"0.57322264",
"0.57322264",
"0.57322264",
"0.57322264",
"0.57235956",
"0.57232994",
"0.5721006",
"0.571978",
"0.571978",
"0.57187414",
"0.57177836",
"0.57133436",
"0.57110935",
"0.57110935",
"0.57110935",
"0.57110935",
"0.57110935",
"0.57110935",
"0.5707859",
"0.5707546",
"0.5704973",
"0.57016516"
] | 0.0 | -1 |
This interface must be implemented by activities that contain this fragment to allow an interaction in this fragment to be communicated to the activity and potentially other fragments contained in that activity. See the Android Training lesson Communicating with Other Fragments for more information. | public interface OnFragmentInteractionListener {
// TODO: Update argument type and name
void onFragmentInteraction(Uri uri);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface OnFragmentInteractionListener {\n void onFragmentMessage(String TAG, Object data);\n}",
"public interface FragmentInteraction {\n void switchToBoardView();\n void switchToPinsView();\n void switchToPins(PDKBoard pdkBoard);\n void switchToDescription(PDKPin pin);\n}",
"public interface IFragmentView {\n public Activity getActivity();\n public void onItemClick(int position);\n}",
"public interface OnFragmentInteractionListener {\n void onMainFragmentInteraction(String string);\n }",
"@Override\n public void onAttach(Context context) {\n super.onAttach(context);\n if (context instanceof RequestFragmentInterface) {\n mInterface = (RequestFragmentInterface) context;\n } else {\n throw new RuntimeException(context.toString()\n + \" must implement OnFragmentInteractionListener\");\n }\n }",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n public void onCallBellPressed(MessageReason reason);\n }",
"void onFragmentInteraction();",
"void onFragmentInteraction();",
"void onFragmentInteraction();",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n\n\n void onFragmentInteraction(String mId, String mProductName, String mItemRate, int minteger, int update);\n }",
"public interface OnFragmentInteractionListener {\n public void onFragmentInteraction(String id);\n }",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction();\n }",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n public void onComidaSelected(int comidaId);\n }",
"public interface OnFragmentInteractionListener {\n public void onFragmentInteraction(Qualification q);\n }",
"public interface OnFragmentInteractionListener {\n void onReceiverAcceptRequest(int nextState, String requestId);\n }",
"public interface FragMainLife\n{\n\tpublic void onResumeFragMainLife();\n}",
"public interface OnFragmentListener {\n\n void onAction(Intent intent);\n}",
"public interface IBaseFragmentActivity {\n void onFragmentExit(BaseFragment fragment);\n\n void onFragmentStartLoading(BaseFragment fragment);\n\n void onFragmentFinishLoad(BaseFragment fragment);\n}",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(String string);\n }",
"void onFragmentInteraction(Object ref);",
"public interface OnParametersFragmentInteractionListener {\n public void startTask();\n }",
"public interface OnFragmentInteractionListener {\n // Update argument type and name\n public void onFragmentInteraction(String id);\n }",
"public interface OnFragmentInteractionListener {\n void onFragmentInteraction(Parcelable selectedItem);\n }",
"public interface FragmentInterface {\r\n void fragmentBecameVisible();\r\n}",
"public interface OnFragmentInteractionListener {\n public void onFragmentInteraction(String key);\n }",
"public interface OnFragmentInteractionListener {\n void newList();\n\n void searchList();\n }",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void pasarALista();\n }",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n\n /**\n * This interface's single method. The hosting Activity must implement this interface and\n * provide an implementation of this method so that this Fragment can communicate with the\n * Activity.\n *\n * @param spotId\n */\n// void onFragmentInteraction(Uri uri);\n void onFragmentInteraction(int spotId);\n// void onFragmentInteraction(LatLng spotPosition);\n\n }",
"public interface MainGameActivityCallBacks {\n public void onMsgFromFragmentToMainGame(String sender, String strValue);\n}",
"public interface IFragment {\n void onFragmentRefresh();\n\n void onMenuClick();\n}",
"public interface FragmentInterface {\n\n void onCreate();\n\n void initLayout();\n\n void updateLayout();\n\n void sendInitialRequest();\n}",
"public interface OnFragmentInteractionListener {\n void onFragmentInteraction(String accessToken, String network);\n }",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(View v);\n }",
"public interface OnFragmentInteractionListener {\n void swapFragments(SetupActivity.SetupActivityFragmentType type);\n\n void addServer(String name, String ipAddress, String port);\n }",
"public interface OnFragmentInteractionListener {\n\t\tvoid restUp(IGameState gameState);\n\t\tvoid restartGame();\n\t}",
"public interface OnFragmentInteractionListener\n {\n // TODO: Update argument type and name\n public void onFragmentInteraction(String id);\n }",
"public interface PersonalFragmentView extends BaseMvpView {\n\n}",
"public interface OnFragmentInteractionListener {\n void onFinishCreatingRequest();\n }",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n public void onFragmentInteraction(String id);\n }",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n public void onFragmentInteraction(String id);\n }",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n public void onFragmentInteraction(String id);\n }",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n public void onFragmentInteraction(String id);\n }",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n public void onFragmentInteraction(String id);\n }",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n public void onFragmentInteraction(String id);\n }",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n public void onFragmentInteraction(String id);\n }",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n public void onFragmentInteraction(String id);\n }",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n public void onFragmentInteraction(String id);\n }",
"void onFragmentInteraction(View v);",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(ArrayList<Recepie> recepieList);\n }",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(String id);\n }",
"void onFragmentInteractionMain();",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n public void showRestaurantDetail(Map<String, Object> objectMap);\n\n public void showAddRestaurantFragment(String location);\n }",
"public interface FragmentNavigator {\n\n void SwitchFragment(Fragment fragment);\n}",
"public interface FragmentModellnt {\n void FragmentM(OnFinishListener onFinishListener,String dataId);\n}",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n //void onFragmentInteraction(Uri uri);\n }",
"void onFragmentInteraction(String id);",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(ArrayList naleznosci, String KLUCZ);\n }",
"public interface OnFragmentInteractionListener {\r\n // TODO: Update argument type and name\r\n void onEditFragmentInteraction(Student student);\r\n }",
"public interface OnFragmentInteractionListener {\n void onStartFragmentStarted();\n\n void onStartFragmentStartTracking();\n\n void onStartFragmentStopTracking();\n }",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n Long onFragmentInteraction();\n }",
"public interface OnFragmentInteractionListener {\n void onFragmentInteraction(Uri uri);\n void onFragmentInteraction(String id);\n}",
"public interface IBaseFragment extends IBaseView {\n /**\n * 出栈到目标fragment\n * @param targetFragmentClass 目标fragment\n * @param includeTargetFragment 是否包涵目标fragment\n * true 目标fragment也出栈\n * false 出栈到目标fragment,目标fragment不出栈\n */\n void popToFragment(Class<?> targetFragmentClass, boolean includeTargetFragment);\n\n /**\n * 跳转到新的fragment\n * @param supportFragment 新的fragment继承SupportFragment\n */\n void startNewFragment(@NonNull SupportFragment supportFragment);\n\n /**\n * 跳转到新的fragment并出栈当前fragment\n * @param supportFragment\n */\n void startNewFragmentWithPop(@NonNull SupportFragment supportFragment);\n\n /**\n * 跳转到新的fragment并返回结果\n * @param supportFragment\n * @param requestCode\n */\n void startNewFragmentForResult(@NonNull SupportFragment supportFragment,int requestCode);\n\n /**\n * 设置fragment返回的result\n * @param requestCode\n * @param bundle\n */\n void setOnFragmentResult(int requestCode, Bundle bundle);\n\n /**\n * 跳转到新的Activity\n * @param clz\n */\n void startNewActivity(@NonNull Class<?> clz);\n\n /**\n * 携带数据跳转到新的Activity\n * @param clz\n * @param bundle\n */\n void startNewActivity(@NonNull Class<?> clz,Bundle bundle);\n\n /**\n * 携带数据跳转到新的Activity并返回结果\n * @param clz\n * @param bundle\n * @param requestCode\n */\n void startNewActivityForResult(@NonNull Class<?> clz,Bundle bundle,int requestCode);\n\n /**\n * 当前Fragment是否可见\n * @return true 可见,false 不可见\n */\n boolean isVisiable();\n\n /**\n * 获取当前fragment绑定的activity\n * @return\n */\n Activity getBindActivity();\n\n}",
"public void onFragmentInteraction(String id);",
"public void onFragmentInteraction(String id);",
"public void onFragmentInteraction(String id);",
"public void onFragmentInteraction(String id);",
"public void onFragmentInteraction(String id);",
"public void onFragmentInteraction(String id);",
"public void onFragmentInteraction(String id);",
"public void onFragmentInteraction(String id);",
"public void onFragmentInteraction(String id);",
"public void onFragmentInteraction(String id);",
"public void onFragmentInteraction(String id);",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onSocialLoginInteraction();\n }",
"public interface OnFragmentInteractionListener {\n /**\n * On fragment interaction.\n *\n * @param uri the uri\n */\n// TODO: Update argument type and name\n public void onFragmentInteraction(Uri uri);\n }",
"public interface OnFragmentListener {\n void onClick(Fragment fragment);\n}",
"public interface LoginFragmentListener {\n public void OnRegisterClicked();\n public void OnLoginClicked(String User, String Pass);\n}",
"public interface OnFragmentInteractionListener {\n void playGame(Uri location);\n }",
"public interface MoveFragment {\n\n\n public void moveFragment(Fragment selectedFragment);\n\n}",
"public interface FragmentInterface {\n public void fragmentResult(Fragment fragment, String title);\n}",
"public interface ChangeFragmentListener {\n void changeFragment();\n}",
"public interface OnProductItemFragmentInteraction{\r\n public void itemSelected(Producto product);\r\n }",
"@Override\n public void onAttach(Context context) {\n super.onAttach(context);\n //this registers this fragment to recieve any EventBus\n EventBus.getDefault().register(this);\n }",
"public interface AddFarmFragmentView extends BaseView {\n\n\n}",
"void onFragmentInteraction(int position);",
"void OpenFragmentInteraction();",
"public interface OnFragmentInteractionListener {\n\t\t// TODO: Update argument type and name\n\t\tpublic void onFragmentInteraction(Uri uri);\n\t}",
"public interface FragmentDataObserver {\n void getDataFromActivity(String data);\n\n}",
"public interface OnFragInteractionListener {\n\n // replace top fragment with this fragment\n interface OnMainFragInteractionListener {\n void onWifiFragReplace();\n void onHistoryFragReplace();\n void onHistoryWithOsmMapFragReplace();\n void onMainFragReplace();\n }\n\n // interface for WifiPresenterFragment\n interface OnWifiScanFragInteractionListener {\n void onGetDataAfterScanWifi(ArrayList<WifiLocationModel> list);\n void onAllowToSaveWifiHotspotToDb(String ssid, String pass, String encryption, String bssid);\n }\n\n // interface for HistoryPresenterFragment\n interface OnHistoryFragInteractionListener {\n // get wifi info\n void onGetWifiHistoryCursor(Cursor cursor);\n // get mobile network generation\n void onGetMobileHistoryCursor(Cursor cursor);\n // get wifi state and date\n void onGetWifiStateAndDateCursor(Cursor cursor);\n }\n\n interface OnMapFragInteractionListerer {\n void onGetWifiLocationCursor(Cursor cursor);\n }\n}",
"public interface PesonageFragmentView extends MvpView {\n\n}",
"public interface OnUsersFragmentInteractionListener {\n void onListFragmentInteraction(User item);\n }",
"public interface MainScreeInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteractionMain();\n }",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onClickNextTurn();\n }",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction();\n\n void changeBottomNavSelection(int menuItem);\n }",
"public interface OnFragmentInteractionListener {\n void onFragmentInteraction(Uri uri);\n}",
"public interface OnFragmentInteractionListener {\n public void onFragmentInteraction(Uri uri);\n }",
"public interface OnFragmentInteractionListener {\n public void onFragmentInteraction(Uri uri);\n }",
"public interface OnFragmentInteractionListener {\n public void onFragmentInteraction(Uri uri);\n }",
"public interface OnFragmentInteractionListener {\n void onSignoutClicked();\n\n void onExtraScopeRequested();\n }",
"public interface OnListFragmentInteractionListener {\n void onListFragmentInteraction(Note note);\n}",
"interface OnMainFragInteractionListener {\n void onWifiFragReplace();\n void onHistoryFragReplace();\n void onHistoryWithOsmMapFragReplace();\n void onMainFragReplace();\n }"
] | [
"0.73250246",
"0.7208194",
"0.7135128",
"0.7124374",
"0.7122289",
"0.7015256",
"0.6976415",
"0.6976415",
"0.6976415",
"0.697415",
"0.69679785",
"0.69658804",
"0.6961106",
"0.6953952",
"0.6943612",
"0.69336414",
"0.6929252",
"0.69277585",
"0.692306",
"0.6909864",
"0.69028807",
"0.6897262",
"0.68948984",
"0.6882655",
"0.68815297",
"0.6875588",
"0.6864281",
"0.68607974",
"0.68597907",
"0.68587786",
"0.6856009",
"0.6844289",
"0.6839765",
"0.6830054",
"0.68176347",
"0.68169826",
"0.6810604",
"0.67864025",
"0.67696476",
"0.67696476",
"0.67696476",
"0.67696476",
"0.67696476",
"0.67696476",
"0.67696476",
"0.67696476",
"0.67696476",
"0.67690516",
"0.6766415",
"0.6761695",
"0.67551124",
"0.67533374",
"0.6698162",
"0.6681282",
"0.66737175",
"0.6670758",
"0.6669734",
"0.6661607",
"0.66612685",
"0.6655428",
"0.66521543",
"0.6644687",
"0.664394",
"0.664394",
"0.664394",
"0.664394",
"0.664394",
"0.664394",
"0.664394",
"0.664394",
"0.664394",
"0.664394",
"0.664394",
"0.6638479",
"0.663606",
"0.6631513",
"0.66253483",
"0.66251284",
"0.6618284",
"0.66096157",
"0.66095537",
"0.6609517",
"0.66047883",
"0.65973",
"0.6597272",
"0.658741",
"0.6572349",
"0.656913",
"0.6560113",
"0.6560098",
"0.65549636",
"0.65490955",
"0.65482724",
"0.65431726",
"0.65389806",
"0.6534305",
"0.6534305",
"0.6534305",
"0.6519628",
"0.6516709",
"0.6516625"
] | 0.0 | -1 |
TODO: Update argument type and name | void onFragmentInteraction(Uri uri); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n public String getFirstArg() {\n return name;\r\n }",
"@Override\n public int getNumberArguments() {\n return 1;\n }",
"java.lang.String getArg();",
"@Override\n public int getArgLength() {\n return 4;\n }",
"Argument createArgument();",
"@Override\r\n\tpublic String getFirstArg() {\n\t\treturn null;\r\n\t}",
"@Override\n protected PacketArgs.ArgumentType[] getArgumentTypes() {\n return new PacketArgs.ArgumentType[] { PacketArgs.ArgumentType.String };\n }",
"@Override\n\tpublic void traverseArg(UniArg node) {\n\t}",
"@Override\n\t\t\t\t\tpublic Parameter handleParameter(Method parent,\n\t\t\t\t\t\t\tEParamType direction, FArgument src) {\n\t\t\t\t\t\treturn super.handleParameter(parent, direction, src);\n\t\t\t\t\t}",
"Object[] getArguments();",
"Object[] getArguments();",
"String getArguments();",
"@Override\n\tpublic void handleArgument(ArrayList<String> argument) {\n\t\t\n\t}",
"@Override\n public final int parseArguments(Parameters params) {\n return 1;\n }",
"ArgList createArgList();",
"public Object[] getArguments() { return args;}",
"@Override\n public String getInputArg(String argName) {\n Log.w(TAG, \"Test input args is not supported.\");\n return null;\n }",
"@Override\n protected String getName() {return _parms.name;}",
"private static AbstractType<?>[] argumentsType(@Nullable StringType algorithmArgumentType)\n {\n return algorithmArgumentType == null\n ? DEFAULT_ARGUMENTS\n : new AbstractType<?>[]{ algorithmArgumentType };\n }",
"uicargs createuicargs();",
"java.util.List<com.mwr.jdiesel.api.Protobuf.Message.Argument> \n getArgumentList();",
"java.util.List<com.mwr.jdiesel.api.Protobuf.Message.Argument> \n getArgumentList();",
"public static void main(String[] args) {\n\t\t\tmeth(args);\r\n\t\t\targument_test:meth(args);\r\n\t}",
"@Override\r\n\tpublic int getSecondArg() {\n\t\treturn 0;\r\n\t}",
"public getType_args(getType_args other) {\n }",
"Object[] args();",
"protected void validateArguments( Object[] args ) throws ActionExecutionException {\n\n Annotation[][] annotations = method.getParameterAnnotations();\n for (int i = 0; i < annotations.length; i++) {\n\n Annotation[] paramAnnotations = annotations[i];\n\n for (Annotation paramAnnotation : paramAnnotations) {\n if (paramAnnotation instanceof Parameter) {\n Parameter paramDescriptionAnnotation = (Parameter) paramAnnotation;\n ValidationType validationType = paramDescriptionAnnotation.validation();\n\n String[] validationArgs;\n\n // if we are checking for valid constants, then the\n // args array should contain\n // the name of the array holding the valid constants\n if (validationType == ValidationType.STRING_CONSTANT\n || validationType == ValidationType.NUMBER_CONSTANT) {\n try {\n String arrayName = paramDescriptionAnnotation.args()[0];\n\n // get the field and set access level if\n // necessary\n Field arrayField = method.getDeclaringClass().getDeclaredField(arrayName);\n if (!arrayField.isAccessible()) {\n arrayField.setAccessible(true);\n }\n Object arrayValidConstants = arrayField.get(null);\n\n // convert the object array to string array\n String[] arrayValidConstatnsStr = new String[Array.getLength(arrayValidConstants)];\n for (int j = 0; j < Array.getLength(arrayValidConstants); j++) {\n arrayValidConstatnsStr[j] = Array.get(arrayValidConstants, j).toString();\n }\n\n validationArgs = arrayValidConstatnsStr;\n\n } catch (IndexOutOfBoundsException iobe) {\n // this is a fatal error\n throw new ActionExecutionException(\"You need to specify the name of the array with valid constants in the 'args' field of the Parameter annotation\");\n } catch (Exception e) {\n // this is a fatal error\n throw new ActionExecutionException(\"Could not get array with valid constants - action annotations are incorrect\");\n }\n } else {\n validationArgs = paramDescriptionAnnotation.args();\n }\n\n List<BaseType> typeValidators = createBaseTypes(paramDescriptionAnnotation.validation(),\n paramDescriptionAnnotation.name(),\n args[i], validationArgs);\n //perform validation\n for (BaseType baseType : typeValidators) {\n if (baseType != null) {\n try {\n baseType.validate();\n } catch (TypeException e) {\n throw new InvalidInputArgumentsException(\"Validation failed while validating argument \"\n + paramDescriptionAnnotation.name()\n + e.getMessage());\n }\n } else {\n log.warn(\"Could not perform validation on argument \"\n + paramDescriptionAnnotation.name());\n }\n }\n }\n }\n }\n }",
"@Test\n void getArgString() {\n }",
"@Override\n\t\t\t\t\tpublic Parameter handleParameter(Method parent,\n\t\t\t\t\t\t\tEParamType direction, FEnumerator src) {\n\t\t\t\t\t\treturn super.handleParameter(parent, direction, src);\n\t\t\t\t\t}",
"@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }",
"@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }",
"@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }",
"@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }",
"@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }",
"@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }",
"@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }",
"@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }",
"@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }",
"@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }",
"@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }",
"@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }",
"@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }",
"@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }",
"@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }",
"@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }",
"@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }",
"int getArgIndex();",
"@Override\n\tpublic void addArg(FormulaElement arg){\n\t}",
"public Type[] getArgumentTypes() {\n/* 236 */ return Type.getArgumentTypes(this.desc);\n/* */ }",
"@Override\n public Object[] getArguments() {\n return null;\n }",
"public login_1_argument() {\n }",
"Optional<String[]> arguments();",
"private Main(String... arguments) {\n this.operations = new ArrayDeque<>(List.of(arguments));\n }",
"@Override\n\tprotected GATKArgumentCollection getArgumentCollection() {\n\t\treturn argCollection;\n\t}",
"protected void sequence_Argument(ISerializationContext context, Argument semanticObject) {\n\t\tif (errorAcceptor != null) {\n\t\t\tif (transientValues.isValueTransient(semanticObject, TdlPackage.Literals.ARGUMENT__NAME) == ValueTransient.YES)\n\t\t\t\terrorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, TdlPackage.Literals.ARGUMENT__NAME));\n\t\t}\n\t\tSequenceFeeder feeder = createSequencerFeeder(context, semanticObject);\n\t\tfeeder.accept(grammarAccess.getArgumentAccess().getNameSTRINGTerminalRuleCall_0_0(), semanticObject.getName());\n\t\tfeeder.finish();\n\t}",
"void setArguments(String arguments);",
"@Override\n\tpublic List<String> getArgumentDesc() {\n\t\treturn desc;\n\t}",
"OpFunctionArgAgregate createOpFunctionArgAgregate();",
"protected abstract Feature<T,?> convertArgument(Class<?> parameterType, Feature<T,?> originalArgument);",
"void visitArgument(Argument argument);",
"public Thaw_args(Thaw_args other) {\r\n }",
"@Override\r\n\tpublic List<String> getArguments()\r\n\t{\n\t\treturn null;\r\n\t}",
"private static String getArgumentString(Object arg) {\n if (arg instanceof String) {\n return \"\\\\\\\"\"+arg+\"\\\\\\\"\";\n }\n else return arg.toString();\n }",
"public interface Param {\n\n int[] args();\n String exec(ExecutePack pack);\n String label();\n}",
"@Override\n public void verifyArgs(ArrayList<String> args) throws ArgumentFormatException {\n super.checkNumArgs(args);\n _args = true;\n }",
"public abstract ValidationResults validArguments(String[] arguments);",
"public ArgumentException() {\n super(\"Wrong arguments passed to function\");\n }",
"public String getArgumentString() {\n\t\treturn null;\n\t}",
"@Override\n public String kind() {\n return \"@param\";\n }",
"@Override\n\t\t\t\t\tpublic Parameter handleParameter(Method parent,\n\t\t\t\t\t\t\tEParamType direction, FEnumerationType src) {\n\t\t\t\t\t\treturn super.handleParameter(parent, direction, src);\n\t\t\t\t\t}",
"public void addArgumentTypeSerialization(String functionName, String argumentName, TensorType type) {\n wrappedSerializationContext.addArgumentTypeSerialization(functionName, argumentName, type);\n }",
"void setArgument(int idx,int v) \t\t{ setArgument(idx,Integer.valueOf(v)); }",
"@Override\n\tprotected byte[] getArgByte() {\n\t\treturn paramsJson.getBytes();\n\t}",
"void onArgumentsChanged();",
"com.google.protobuf.ByteString\n\t\tgetArgBytes();",
"@Override public int getNumArguments()\t\t\t{ return arg_list.size(); }",
"MyArg(int value){\n this.value = value;\n }",
"public ArgList(Object arg1) {\n super(1);\n addElement(arg1);\n }",
"public Clear_args(Clear_args other) {\r\n }",
"private ParameterInformation processArgumentReference(Argument argument,\n List<NameDescriptionType> argTypeSet,\n SequenceEntryType seqEntry,\n int seqIndex)\n {\n ParameterInformation argumentInfo = null;\n\n // Initialize the argument's attributes\n String argName = argument.getName();\n String dataType = null;\n String arraySize = null;\n String bitLength = null;\n BigInteger argBitSize = null;\n String enumeration = null;\n String description = null;\n UnitSet unitSet = null;\n String units = null;\n String minimum = null;\n String maximum = null;\n\n // Step through each command argument type\n for (NameDescriptionType argType : argTypeSet)\n {\n // Check if this is the same command argument referenced in the argument list (by\n // matching the command and argument names between the two)\n if (argument.getArgumentTypeRef().equals(argType.getName()))\n {\n boolean isInteger = false;\n boolean isUnsigned = false;\n boolean isFloat = false;\n boolean isString = false;\n\n // Check if this is an array parameter\n if (seqEntry instanceof ArrayParameterRefEntryType)\n {\n arraySize = \"\";\n\n // Store the reference to the array parameter type\n ArrayDataTypeType arrayType = (ArrayDataTypeType) argType;\n argType = null;\n\n // Step through each dimension for the array variable\n for (Dimension dim : ((ArrayParameterRefEntryType) seqEntry).getDimensionList().getDimension())\n {\n // Check if the fixed value exists\n if (dim.getEndingIndex().getFixedValue() != null)\n {\n // Build the array size string\n arraySize += String.valueOf(Integer.valueOf(dim.getEndingIndex().getFixedValue()) + 1)\n + \",\";\n }\n }\n\n arraySize = CcddUtilities.removeTrailer(arraySize, \",\");\n\n // The array parameter type references a non-array parameter type that\n // describes the individual array members. Step through each data type in the\n // parameter type set in order to locate this data type entry\n for (NameDescriptionType type : argTypeSet)\n {\n // Check if the array parameter's array type reference matches the data\n // type name\n if (arrayType.getArrayTypeRef().equals(type.getName()))\n {\n // Store the reference to the array parameter's data type and stop\n // searching\n argType = type;\n break;\n }\n }\n }\n\n // Check if a data type entry for the parameter exists in the parameter type set\n // (note that if the parameter is an array the steps above locate the data type\n // entry for the individual array members)\n if (argType != null)\n {\n long dataTypeBitSize = 0;\n\n // Check if the argument is an integer data type\n if (argType instanceof IntegerArgumentType)\n {\n IntegerArgumentType icmd = (IntegerArgumentType) argType;\n\n // Get the number of bits occupied by the argument\n argBitSize = icmd.getSizeInBits();\n\n // Get the argument units reference\n unitSet = icmd.getUnitSet();\n\n // Check if integer encoding is set to 'unsigned'\n if (icmd.getIntegerDataEncoding().getEncoding().equalsIgnoreCase(\"unsigned\"))\n {\n isUnsigned = true;\n }\n\n // Determine the smallest integer size that contains the number of bits\n // occupied by the argument\n dataTypeBitSize = 8;\n\n while (argBitSize.longValue() > dataTypeBitSize)\n {\n dataTypeBitSize *= 2;\n }\n\n // Get the argument alarm\n IntegerArgumentType.ValidRangeSet alarmType = icmd.getValidRangeSet();\n\n // Check if the argument has an alarm\n if (alarmType != null)\n {\n // Get the alarm range\n List<IntegerRangeType> alarmRange = alarmType.getValidRange();\n\n // Check if the alarm range exists\n if (alarmRange != null)\n {\n // Store the minimum alarm value\n minimum = alarmRange.get(0).getMinInclusive();\n\n // Store the maximum alarm value\n maximum = alarmRange.get(0).getMaxInclusive();\n }\n }\n\n isInteger = true;\n }\n // Check if the argument is a floating point data type\n else if (argType instanceof FloatArgumentType)\n {\n // Get the float argument attributes\n FloatArgumentType fcmd = (FloatArgumentType) argType;\n dataTypeBitSize = fcmd.getSizeInBits().longValue();\n unitSet = fcmd.getUnitSet();\n\n // Get the argument alarm\n FloatArgumentType.ValidRangeSet alarmType = fcmd.getValidRangeSet();\n\n // Check if the argument has an alarm\n if (alarmType != null)\n {\n // Get the alarm range\n List<FloatRangeType> alarmRange = alarmType.getValidRange();\n\n // Check if the alarm range exists\n if (alarmRange != null)\n {\n // Get the minimum value\n Double min = alarmRange.get(0).getMinInclusive();\n\n // Check if a minimum value exists\n if (min != null)\n {\n // Get the minimum alarm value\n minimum = String.valueOf(min);\n }\n\n // Get the maximum value\n Double max = alarmRange.get(0).getMaxInclusive();\n\n // Check if a maximum value exists\n if (max != null)\n {\n // Get the maximum alarm value\n maximum = String.valueOf(max);\n }\n }\n }\n\n isFloat = true;\n }\n // Check if the argument is a string data type\n else if (argType instanceof StringDataType)\n {\n // Get the string argument attributes\n StringDataType scmd = (StringDataType) argType;\n dataTypeBitSize = Integer.valueOf(scmd.getStringDataEncoding()\n .getSizeInBits()\n .getFixed()\n .getFixedValue());\n unitSet = scmd.getUnitSet();\n isString = true;\n }\n // Check if the argument is an enumerated data type\n else if (argType instanceof EnumeratedDataType)\n {\n EnumeratedDataType ecmd = (EnumeratedDataType) argType;\n EnumerationList enumList = ecmd.getEnumerationList();\n\n // Check if any enumeration parameters are defined\n if (enumList != null)\n {\n // Step through each enumeration parameter\n for (ValueEnumerationType enumType : enumList.getEnumeration())\n {\n // Check if this is the first parameter\n if (enumeration == null)\n {\n // Initialize the enumeration string\n enumeration = \"\";\n }\n // Not the first parameter\n else\n {\n // Add the separator for the enumerations\n enumeration += \", \";\n }\n\n // Begin building this enumeration\n enumeration += enumType.getValue() + \" | \" + enumType.getLabel();\n }\n\n argBitSize = ecmd.getIntegerDataEncoding().getSizeInBits();\n unitSet = ecmd.getUnitSet();\n\n // Check if integer encoding is set to 'unsigned'\n if (ecmd.getIntegerDataEncoding().getEncoding().equalsIgnoreCase(\"unsigned\"))\n {\n isUnsigned = true;\n }\n\n // Determine the smallest integer size that contains the number of bits\n // occupied by the argument\n dataTypeBitSize = 8;\n\n while (argBitSize.longValue() > dataTypeBitSize)\n {\n dataTypeBitSize *= 2;\n }\n\n isInteger = true;\n }\n }\n\n // Get the name of the data type from the data type table that matches the base\n // type and size of the parameter\n dataType = getMatchingDataType(dataTypeBitSize / 8,\n isInteger,\n isUnsigned,\n isFloat,\n isString,\n dataTypeHandler);\n\n // Check if the description exists\n if (argType.getLongDescription() != null)\n {\n // Store the description\n description = argType.getLongDescription();\n }\n\n // Check if the argument bit size exists\n if (argBitSize != null && argBitSize.longValue() != dataTypeBitSize)\n {\n // Store the bit length\n bitLength = argBitSize.toString();\n }\n\n // Check if the units exists\n if (unitSet != null)\n {\n List<UnitType> unitType = unitSet.getUnit();\n\n // Check if the units is set\n if (!unitType.isEmpty())\n {\n // Store the units\n units = unitType.get(0).getContent();\n }\n }\n\n argumentInfo = new ParameterInformation(argName,\n dataType,\n arraySize,\n bitLength,\n enumeration,\n units,\n minimum,\n maximum,\n description,\n 0,\n seqIndex);\n }\n\n break;\n }\n }\n\n return argumentInfo;\n }",
"public abstract interface QueryArgs {\n\n /** Return the catalog associated with this object */\n public Catalog getCatalog();\n\n /** Set the value for the ith parameter */\n public void setParamValue(int i, Object value);\n\n /** Set the value for the parameter with the given label */\n public void setParamValue(String label, Object value);\n\n /** Set the min and max values for the parameter with the given label */\n public void setParamValueRange(String label, Object minValue, Object maxValue);\n\n /** Set the int value for the parameter with the given label */\n public void setParamValue(String label, int value);\n\n /** Set the double value for the parameter with the given label */\n public void setParamValue(String label, double value);\n\n /** Set the double value for the parameter with the given label */\n public void setParamValueRange(String label, double minValue, double maxValue);\n\n /** Set the array of parameter values directly. */\n public void setParamValues(Object[] values);\n\n /** Get the value of the ith parameter */\n public Object getParamValue(int i);\n\n /** Get the value of the named parameter\n *\n * @param label the parameter name or id\n * @return the value of the parameter, or null if not specified\n */\n public Object getParamValue(String label);\n\n /**\n * Get the value of the named parameter as an integer.\n *\n * @param label the parameter label\n * @param defaultValue the default value, if the parameter was not specified\n * @return the value of the parameter\n */\n public int getParamValueAsInt(String label, int defaultValue);\n\n /**\n * Get the value of the named parameter as a double.\n *\n * @param label the parameter label\n * @param defaultValue the default value, if the parameter was not specified\n * @return the value of the parameter\n */\n public double getParamValueAsDouble(String label, double defaultValue);\n\n /**\n * Get the value of the named parameter as a String.\n *\n * @param label the parameter label\n * @param defaultValue the default value, if the parameter was not specified\n * @return the value of the parameter\n */\n public String getParamValueAsString(String label, String defaultValue);\n\n\n /**\n * Return the object id being searched for, or null if none was defined.\n */\n public String getId();\n\n /**\n * Set the object id to search for.\n */\n public void setId(String id);\n\n\n /**\n * Return an object describing the query region (center position and\n * radius range), or null if none was defined.\n */\n public CoordinateRadius getRegion();\n\n /**\n * Set the query region (center position and radius range) for\n * the search.\n */\n public void setRegion(CoordinateRadius region);\n\n\n /**\n * Return an array of SearchCondition objects indicating the\n * values or range of values to search for.\n */\n public SearchCondition[] getConditions();\n\n /** Returns the max number of rows to be returned from a table query */\n public int getMaxRows();\n\n /** Set the max number of rows to be returned from a table query */\n public void setMaxRows(int maxRows);\n\n\n /** Returns the query type (an optional string, which may be interpreted by some catalogs) */\n public String getQueryType();\n\n /** Set the query type (an optional string, which may be interpreted by some catalogs) */\n public void setQueryType(String queryType);\n\n /**\n * Returns a copy of this object\n */\n public QueryArgs copy();\n\n /**\n * Optional: If not null, use this object for displaying the progress of the background query\n */\n public StatusLogger getStatusLogger();\n}",
"@Override\n public void doExeception(Map<String, Object> args)\n {\n \n }",
"@Override\n public void doExeception(Map<String, Object> args)\n {\n \n }",
"@Override\n\tprotected Collection<ArgumentTypeDescriptor> getArgumentTypeDescriptors() {\n\t\treturn Arrays.asList(new VCFWriterArgumentTypeDescriptor(engine, System.out, bisulfiteArgumentSources), new SAMReaderArgumentTypeDescriptor(engine),\n\t\t\t\tnew SAMFileWriterArgumentTypeDescriptor(engine, System.out), new OutputStreamArgumentTypeDescriptor(engine, System.out));\n\t}",
"@Override\n public int getArgent() {\n return _argent;\n }",
"private static @NonNull String resolveInputName(@NonNull Argument<?> argument) {\n String inputName = argument.getAnnotationMetadata().stringValue(Bindable.NAME).orElse(null);\n if (StringUtils.isEmpty(inputName)) {\n inputName = argument.getName();\n }\n return inputName;\n }",
"private Object[] getArguments (String className, Object field)\n\t{\n\t\treturn ((field == null) ? new Object[]{className} : \n\t\t\tnew Object[]{className, field});\n\t}",
"PermissionSerializer (GetArg arg) throws IOException, ClassNotFoundException {\n\tthis( \n\t create(\n\t\targ.get(\"targetType\", null, Class.class),\n\t\targ.get(\"type\", null, String.class),\n\t\targ.get(\"targetName\", null, String.class),\n\t\targ.get(\"targetActions\", null, String.class) \n\t )\n\t);\n }",
"public Type getArgumentDirection() {\n return direction;\n }",
"public String argTypes() {\n return \"I\";//NOI18N\n }",
"public static void main(String arg[]) {\n\n }",
"godot.wire.Wire.Value getArgs(int index);",
"@Override\n protected String[] getArguments() {\n String[] args = new String[1];\n args[0] = _game_file_name;\n return args;\n }",
"public void setArgs(java.lang.String value) {\n this.args = value;\n }",
"private Argument(Builder builder) {\n super(builder);\n }",
"@Override\n public void execute(String[] args) {\n\n }",
"@Override\n\tprotected final void setFromArgument(CommandContext<ServerCommandSource> context, String name) {\n\t}",
"UUID createArgument(ArgumentCreateRequest request);",
"@Override\n public void initialise(String[] arguments) {\n\n }",
"public static ParameterExpression parameter(Class type, String name) { throw Extensions.todo(); }",
"protected abstract void parseArgs() throws IOException;"
] | [
"0.7164074",
"0.6946075",
"0.6714363",
"0.65115863",
"0.63969076",
"0.6375468",
"0.63481104",
"0.63162106",
"0.6260299",
"0.6208487",
"0.6208487",
"0.62070644",
"0.6197276",
"0.61806154",
"0.6177103",
"0.61530507",
"0.61472267",
"0.61243707",
"0.60771817",
"0.6054482",
"0.59906125",
"0.59906125",
"0.5984017",
"0.59791875",
"0.5977681",
"0.59532714",
"0.5946838",
"0.59457266",
"0.59452903",
"0.59352577",
"0.59352577",
"0.59352577",
"0.59352577",
"0.59352577",
"0.59352577",
"0.59352577",
"0.59352577",
"0.59352577",
"0.59352577",
"0.59352577",
"0.59352577",
"0.59352577",
"0.59352577",
"0.59352577",
"0.59352577",
"0.59352577",
"0.5909717",
"0.5889277",
"0.588111",
"0.5871162",
"0.5866624",
"0.58613646",
"0.58519953",
"0.58381283",
"0.58083445",
"0.58059824",
"0.5795826",
"0.57816726",
"0.57670826",
"0.57556796",
"0.57471323",
"0.57418406",
"0.5729463",
"0.57291526",
"0.5716928",
"0.5713024",
"0.56974274",
"0.56782854",
"0.56723106",
"0.5664594",
"0.5664104",
"0.5660337",
"0.5652865",
"0.5647883",
"0.5642134",
"0.5635645",
"0.5634968",
"0.562251",
"0.56210977",
"0.56167537",
"0.56138444",
"0.56044126",
"0.56044126",
"0.5602371",
"0.56012225",
"0.55986875",
"0.55893147",
"0.5588273",
"0.5583255",
"0.5582767",
"0.55681497",
"0.55626017",
"0.55577534",
"0.55524325",
"0.5549442",
"0.55378276",
"0.5536797",
"0.5527675",
"0.5511817",
"0.55099154",
"0.550257"
] | 0.0 | -1 |
This function is run when the robot is first started up and should be used for any initialization code. | public void robotInit() {
oi = new OI();
chooser = new SendableChooser();
chooser.addDefault("Default Auto", new ExampleCommand());
// chooser.addObject("My Auto", new MyfAutoCommand());
SmartDashboard.putData("Auto mode", chooser);
//Drive
//this.DriveTrain = new DriveTrain();
//RobotMap.robotDrive1.arcadeDrive(oi.stickLeft);
//Buttons
// oi.button1.whenPressed(new SetMaxMotorOutput());
//Ultrasonic
sonic1 = new Ultrasonic(0,1);
sonic1.setAutomaticMode(true);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void robotInit() {\n }",
"@Override\n public void robotInit() {\n }",
"@Override\n public void robotInit() {\n }",
"public void robotInit() {\n\n }",
"public void robotInit() {\n\n }",
"protected void initialize() {\n\t\tRobot.firstAutonomousCommandDone = true;\n\t}",
"public void robotInit() {\r\n CommandBase.init();\r\n OI.init();\r\n System.out.println(\"ROBOT READY!\");\r\n }",
"@Override\n public void init() {\n robot.init(hardwareMap);\n\n // Send telemetry message to signify robot waiting;\n telemetry.addData(\"Status\", \"Initialized\"); //\n }",
"@Override\n public void init() {\n\n robot.init(hardwareMap);\n\n // Tell the driver that initialization is complete.\n\n telemetry.addData(\"Robot Mode:\", \"Initialized\");\n telemetry.update();\n }",
"@Override\n public void robotInit() {\n\toi = new OI();\n\tgameData = new GameData();\n\tcubeVision.start();\n\n\tinitializeDashboard();\n }",
"public void robotInit() {\n\t\t\n\t\tupdateDashboard();\n\t\t\n \tautoChooser = new SendableChooser();\n \tautoChooser.addDefault(\"Default Autonomous does nothing!\", new Default());\n \t// Default Autonomous does nothing\n \tautoChooser.addObject(\"Cross the Low Bar Don't Run This it doesn't work\", new LowBar());\n \tautoChooser.addObject(\"Cross Rough Patch/Stone Wall\", new Main());\n \tautoChooser.addObject(\"Cross the Low Bar, Experimental!\", new LowBarEx());\n \t//autoChooser.addObject(\"If Jonathan lied to us and we can cross twice\", new RoughPatch());\n \tCameraServer server = CameraServer.getInstance();\n\n \tserver.setQuality(50);\n \t\n \tSmartDashboard.putData(\"Autonomous\", autoChooser);\n\n \tserver.startAutomaticCapture(\"cam0\");\n \tLowBar.gyro.reset();\n \t\n \tDriverStation.reportWarning(\"The Robot is locked and loaded. Time to kick some ass guys!\", !(server.isAutoCaptureStarted()));\n\n\t}",
"public void robotInit() {\n\t\tmyRobot = new RobotDrive(0,1);\n\t\tteleop = new Teleop(myRobot);\n\t\tauto = new AutonomousDrive(myRobot);\n\t}",
"@Override\n public void init() {\n robot.init(hardwareMap);\n telemetry.addData(\"Status\", \"Initialized\");\n }",
"public void robotInit()\n\t{\n\t\toi = new OI();\n\t\t// instantiate the command used for the autonomous period\n\t\t// autonomousCommand = new Driver();\n\t}",
"public void robotInit() {\n RobotMap.init();\n driveWithJoystick = new DriveTrain();\n \n oi = new OI();\n }",
"@Override\n public void init() {\n runtime.reset();\n robot.init(hardwareMap);\n\n telemetry.addData(\"Status\", \"Initialized\");\n }",
"public void robotInit() {\n RobotMap.init();\n driveTrain = new DriveTrain();\n oi = new OI();\n flippy = new Flipper();\n flappy = new Flapper();\n autonomousCommand = new AutoFlip();\n \n OI.init();\n CommandBase.init();\n autoChooser = new SendableChooser();\n autoChooser.addDefault(\"Flap Left\", new AutoFlip());\n SmartDashboard.putData(\"Autonomous_Mode\", autoChooser); \n }",
"public void robotInit() {\n\t\toi = new OI();\n\t\t\n\t\tteleopCommand = new TeleopCommand();\n }",
"public void robotInit() {\n // North.registerCommand(\"setSetpoint\", (params) -> ??, [\"Setpoint\"]);\n // North.registerCondition(\"atSetpoint\", elevator::atSetpoint);\n\n //NOTE: init(name, size, logic provider, drive & nav)\n North.init(/*NorthUtils.readText(\"name.txt\")*/ \"lawn chair\", 24/12, 24/12, drive);\n North.default_drive_controller = HoldController.I;\n\n UsbCamera camera = CameraServer.getInstance().startAutomaticCapture();\n camera.setResolution(640, 480);\n }",
"public void robotInit() {\n System.out.println(\"Default robotInit() method... Override me!\");\n }",
"@Override\n public void robotInit() {\n\t\t// set up logging\n\t\tlogger = EventLogging.getLogger(Robot.class, Level.INFO);\n\n // set up hardware\n RobotMap.init();\n\n // set up subsystems\n //initalized drive subsystem, which control motors to move robot\n driveSubsystem = new DriveSubsystem();\n\t\tbuttonSubstyem = new ButtonSubsystem();\n servoSubsystem = new ServoSubsystem();\n wingSubsystem = new WingSubsystem();\n flagSpinnerSubsystem = new FlagSpinnerSubsystem();\n // OI must be constructed after subsystems. If the OI creates Commands\n //(which it very likely will), subsystems are not guaranteed to be\n // constructed yet. Thus, their requires() statements may grab null\n // pointers. Bad news. Don't move it.\n oi = new OI();\n\n // Add commands to Autonomous Sendable Chooser\n chooser.addDefault(\"Autonomous Command\", new AutonomousCommand());\n SmartDashboard.putData(\"Auto mode\", chooser);\n }",
"public void robotInit() {\n RobotMap.init();\r\n CommandBase.init();\r\n //Add autonomous prefs\r\n Preferences p = Preferences.getInstance();\r\n if (!p.containsKey(\"AutonInitialDelay\")) {\r\n p.putDouble(\"AutonInitialDelay\", kDefaultInitialDelay);\r\n }\r\n if (!p.containsKey(\"AutonTimeout\")) {\r\n p.putDouble(\"AutonTimeout\", kDefaultTimeout);\r\n }\r\n if (!p.containsKey(\"HangerLastSecondOn\")) {\r\n p.putBoolean(\"HangerLastSecondOn\", kDefaultLastSecondOn);\r\n }\r\n if (!p.containsKey(\"HangerLastSecondTimeout\")) {\r\n p.putDouble(\"HangerLastSecondTimeout\", kDefaultLastSecondTimeout);\r\n }\r\n }",
"@Override\n\tpublic void onInit(RobotAPI arg0) {\n\n\t}",
"@Override\r\n public void init() {\r\n /* Initialize the hardware variables.\r\n * The init() method of the hardware class does all the work here\r\n */\r\n robot.init(hardwareMap);\r\n\r\n // Send telemetry message to signify robot waiting;\r\n telemetry.addData(\"Status\", \"Initialized\");\r\n }",
"@Override\n public void robotInit() \n {\n CommandBase.init();\n PIDCommandBase.init();\n\n CameraServer.getInstance().startAutomaticCapture();\n\n start.addDefault(\"Left\", Autonomous.StartPosition.LEFT);\n start.addObject(\"Center\", Autonomous.StartPosition.CENTER);\n start.addObject(\"Right\", Autonomous.StartPosition.RIGHT);\n SmartDashboard.putData(\"Start\", start);\n \n chooser.addObject(\"Scale\", Autonomous.AutoMode.SCALE);\n chooser.addObject(\"Switch\", Autonomous.AutoMode.SWITCH);\n chooser.addDefault(\"Drive\", Autonomous.AutoMode.DRIVE);\n SmartDashboard.putData(\"Auto Mode\", chooser);\n\n compressor = new Compressor();\n compressor.start();\n }",
"public void robotInit() {\n\t\toi = OI.getInstance();\r\n\t\t\r\n\t\t// instantiate the command used for the autonomous and teleop period\r\n\t\treadings = new D_SensorReadings();\r\n\t\t// Start pushing values to the SD.\r\n\t\treadings.start();\r\n\t\t//Gets the single instances of driver and operator, from OI. \r\n\t\tdriver = oi.getDriver();\r\n\t\toperator = oi.getOperator();\r\n\r\n\t\t//Sets our default auto to NoAuto, if the remainder of our code doesn't seem to work. \r\n\t\tauto = new G_NoAuto();\r\n\t\t\r\n\t\t//Sets our teleop commandGroup to T_TeleopGroup, which contains Kaj,ELevator, Intake, and Crossbow Commands. \r\n\t\tteleop = new T_TeleopGroup();\r\n\t\t\r\n\t}",
"public void robotInit() {\n\t\toi = new OI();\n // instantiate the command used for the autonomous period\n }",
"public void robotInit(){\n\t\tSmartDashboard.putNumber(\"Climber Arm Speed: \", 0.5);\n\t\tSmartDashboard.putNumber(\"Climber Winch Speed: \", 0.25);\n\t}",
"public void robotInit() {\n RobotMap.init();\n initDashboardInput();\n // BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTRUCTORS\n driveTrain = new DriveTrain();\n power = new Power();\n arm = new Arm();\n sensors = new Sensors();\n ballGrabberSubsystem = new BallGrabberSubsystem();\n winch = new Winch();\n\n // END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTRUCTORS\n // OI must be constructed after subsystems. If the OI creates Commands\n //(which it very likely will), subsystems are not guaranteed to be\n // constructed yet. Thus, their requires() statements may grab null\n // pointers. Bad news. Don't move it.\n oi = new OI();\n\n // instantiate the command used for the autonomous period\n // BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=AUTONOMOUS\n\n // END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=AUTONOMOUS\n\n arcadeDrive = new ArcadeDrive();\n\n readPreferences();\n }",
"protected void initialize() {\n\t\tRobot.conveyor.Forward();\n\n\t}",
"public void robotInit() {\n \tboardSubsystem = new BoardSubsystem();\n }",
"@Override\n protected void initialize() {\n Robot.collector.open();\n }",
"@Override public void init() {\n drive = MecanumDrive.standard(hardwareMap); // Comment this line if you, for some reason, don't need to use the drive motors\n\n // Uncomment the next three lines if you need to use the gyroscope\n // gyro = IMUGyro.standard(hardwareMap);\n // gyro.initialize();\n // gyro.calibrate();\n\n // Uncomment the next two lines if you need to use the vision system\n // vision = new Vision(hardwareMap);\n // vision.init();\n\n // Uncomment the next line if you have a servo\n // myServo = hardwareMap.get(Servo.class, \"myServo\");\n\n /** Place any code that should run when INIT is pressed here. **/\n }",
"@Override\n public void init() {\n /* Initialize the hardware variables.\n * The init() method of the hardware class does all the work here\n */\n robot.init(hardwareMap);\n // robot.leftBumper.setPosition(.5);\n // robot.leftStageTwo.setPosition(1);\n // robot.rightStageTwo.setPosition(0.1);\n robot.colorDrop.setPosition(0.45);\n robot.align.setPosition(0.95);\n\n // robot.rightBumper.setPosition(.7);\n\n // Send telemetry message to signify robot waiting;\n telemetry.addData(\"Say\", \"Hello Driver\"); //\n }",
"public void robotInit()\r\n {\r\n // Initialize all subsystems\r\n CommandBase.init();\r\n // instantiate the command used for the autonomous period\r\n //Initializes triggers\r\n mecanumDriveTrigger = new MechanumDriveTrigger();\r\n tankDriveTrigger = new TankDriveTrigger();\r\n resetGyro = new ResetGyro();\r\n }",
"protected void initialize() {\n Robot.limelight.setPipeline(0.0);\n }",
"protected void initialize() {\n\t\tRobot.resetSensors();\n\t}",
"@Override\n public void robotInit() {\n robot = RobotSoftware.getInstance();\n CameraServer.getInstance().startAutomaticCapture(0);\n CameraServer.getInstance().startAutomaticCapture(1);\n watcher = new Watcher(robot.leftDistanceStream.getWatchable(\"left dist\"),\n robot.rightDistanceStream.getWatchable(\"right dist\"));\n watcher.outputToDashboard();\n robot.runCompressor.set(false);\n teleop = new TeleopMain(robot);\n toggleCompressor = true;\n teleop.init();\n }",
"protected void initialize() {\n \tSystem.out.println(\"initialize ReturnToStart\");\n \tRobot.claw.goRetract();\n \tRobot.claw.goUp();\n \tRobot.claw.goOpen();\n \tRobot.claw.spinStop();\n }",
"protected void initialize() {\n \tRobot.gearIntake.setIsDown(true);\n }",
"protected void initialize() {\r\n\r\n Robot.pneumatics.pneuOpen();\r\n }",
"@Override\n\tpublic void robotInit() //starts once when the code is started\n\t{\n\t\tm_oi = new OI(); //further definition of OI\n\t\t\n\t\t// chooser.addObject(\"My Auto\", new MyAutoCommand());\n\t\t//SmartDashboard.putData(\"Auto mode\", m_chooser);\n\t\t\n\t\tnew Thread(() -> {\n\t\t\tUsbCamera camera1 = CameraServer.getInstance().startAutomaticCapture();\n\t\t\tcamera1.setResolution(640, 480);\n\t\t\tcamera1.setFPS(30);\n\t\t\tcamera1.setExposureAuto();\n\t\t\t\n\t\t\tCvSink cvSink = CameraServer.getInstance().getVideo();\n\t\t\tCvSource outputStream = CameraServer.getInstance().putVideo(\"Camera1\", 640, 480); \n\t\t\t//set up a new camera with this name in SmartDashboard (Veiw->Add->CameraServer Stream Viewer)\n\t\t\t\n\t\t\tMat source = new Mat();\n\t\t\tMat output = new Mat();\n\t\t\t\n\t\t\twhile(!Thread.interrupted())\n\t\t\t{\n\t\t\t\tcvSink.grabFrame(source);\n\t\t\t\tImgproc.cvtColor(source, output, Imgproc.COLOR_BGR2RGB);//this will show the video in black and white \n\t\t\t\toutputStream.putFrame(output);\n\t\t\t}\t\t\t\t\t\n\t\t}).start();//definition of camera, runs even when disabled\n\t\t\n\t\tdriveStick = new Joystick(0); //further definition of joystick\n\t\tgyroRotate.gyroInit(); //initializing the gyro - in Rotate_Subsystem\n\t\tultrasonic = new Ultrasonic_Sensor(); //further definition of ultrasonic\n\t\tRobotMap.encoderLeft.reset();\n\t\tRobotMap.encoderRight.reset();\n\t\tdriveToDistance.controllerInit();\n\t}",
"public void robotInit() {\n // Initialize all subsystems\n CommandBase.init();\n \n SmartDashboard.putNumber(RobotMap.Autonomous.MODE_KEY, 0);\n \n //temperary method to test door closing speeds\n SmartDashboard.putNumber(RobotMap.Force.DOOR_FORCE_KEY, 50);\n }",
"protected void initialize()\n {\n // Set the pid up for driving straight\n Robot.drivetrain.getAngleGyroController().setPID(Constants.DrivetrainAngleGyroControllerP, Constants.DrivetrainAngleGyroControllerI, Constants.DrivetrainAngleGyroControllerD);\n //Robot.drivetrain.resetGyro();\n if (setpointSpecified == true)\n {\n Robot.drivetrain.getAngleGyroController().setSetpoint(Robot.initialGyroAngle); \n }\n else\n {\n Robot.drivetrain.getAngleGyroController().setSetpoint(Robot.drivetrain.getGyroValue());\n }\n Robot.drivetrain.setDirection(driveDirection);\n Robot.drivetrain.setMagnitude(drivePower);\n Robot.drivetrain.getAngleGyroController().enable();\n timer.reset();\n timer.start();\n }",
"@Override\n public void init() {\n /* Initialize the hardware variables.\n * The init() method of the hardware class does all the work here\n */\n robot.init(hardwareMap);\n\n //ColorSensor colorSensor;\n //colorSensor = hardwareMap.get(ColorSensor.class, \"Sensor_Color\");\n\n // Send telemetry message to signify robot waiting;\n telemetry.addData(\"Say\", \"Hello Driver\"); //\n }",
"@Override\n public void robotInit() {\n m_chooser.setDefaultOption(\"Default Auto\", kDefaultAuto);\n m_chooser.addOption(\"My Auto\", kCustomAuto);\n SmartDashboard.putData(\"Auto choices\", m_chooser);\n //starts the dual cameras\n CameraServer.getInstance().startAutomaticCapture(0);\n CameraServer.getInstance().startAutomaticCapture(1);\n //auto start (disabled atm)\n //pressBoy.setClosedLoopControl(true);\n pressBoy.setClosedLoopControl(false);\n \n \n }",
"@Override\n public void robotInit() {\n m_chooser.setDefaultOption(\"Default Auto\", kDefaultAuto);\n m_chooser.addOption(\"My Auto\", kCustomAuto);\n SmartDashboard.putData(\"Auto choices\", m_chooser);\n \n //Initialize Drive Train Motors/\n LeftFront = new WPI_TalonSRX(11);\n RightFront = new WPI_TalonSRX(13);\n LeftBack = new WPI_TalonSRX(10);\n RightBack = new WPI_TalonSRX(12);\n RobotDT = new MecanumDrive(LeftFront, LeftBack, RightFront, RightBack);\n \n //Initialize Xbox Controller or Joystick/\n xcontroller1 = new XboxController(0);\n xcontroller2 = new XboxController(1);\n \n //Initialize Cameras/\n RoboCam = CameraServer.getInstance();\n FrontCamera = RoboCam.startAutomaticCapture(0);\n BackCamera = RoboCam.startAutomaticCapture(1);\n\n //GPM Init/\n mGPM = new GPM();\n \n }",
"@Override\n public void initialize() {\n //m_camera.setDriverMode(true);\n //m_camera.setLED(LEDMode.kOn);\n RobotContainer.m_Drive.auto = true;\n RobotContainer.m_Drive.setLightMode(3);\n }",
"public void robotInit() {\n\t\trightFront = new CANTalon(1);\n\t\tleftFront = new CANTalon(3);\n\t\trightBack = new CANTalon(2);\n\t\tleftBack = new CANTalon(4);\n\t\t\n\t\trightBack.changeControlMode(CANTalon.TalonControlMode.Follower);\n\t\tleftBack.changeControlMode(CANTalon.TalonControlMode.Follower);\n\t\t\n\t\tleftBack.set(leftFront.getDeviceID());\n\t\trightBack.set(rightFront.getDeviceID());\n\t\t\n\t\tturn = new Joystick(0);\n\t\tthrottle = new Joystick(1);\n\t}",
"@Override\r\n public void robotInit() {\r\n // Instantiate our RobotContainer. This will perform all our button bindings\r\n robotContainer = new RobotContainer();\r\n }",
"@Override\n\tpublic void robotInit() {\n\t\tdrive = new Drive();\n\t\tintake = new Intake();\n\t\tshooter = new Shooter();\n\t\taimShooter = new AimShooter();\n\t\tvision = new Vision();\n\t\tintakeRoller = new IntakeRoller();\n\t\taManipulators = new AManipulators();\n\t\tshooterLock = new ShooterLock();\n\n\t\t// autochooser\n\t\t// autoChooser = new SendableChooser();\n\n\t\toi = new OI();\n\t\t// instantiate the command used for the autonomous period\n\t\tlowGearCommand = new LowGear();\n\n\t\t// auto chooser commands\n\t\t// autoChooser.addDefault(\"FarLeftAuto\", new FarLeftAuto());\n\t\t// autoChooser.addObject(\"MidLeftAuto\", new MidLeftAuto());\n\t\t// autoChooser.addObject(\"MidAuto\", new MidAuto());\n\t\t// autoChooser.addObject(\"MidRightAuto\", new MidRightAuto());\n\t\t// autoChooser.addObject(\"FarRightAuto\", new FarRightAuto());\n\t\t// autoChooser.addObject(\"Uber Auto\", new UberAuto());\n\t\t// autoChooser.addObject(\"Paper Weight\", new PaperWeightAuto());\n\t\t//\n\t\t// SmartDashboard.putData(\"Autonomous\", autoChooser);\n\n\t\t// autonomousCommand = (Command) autoChooser.getSelected();\n\t\tautonomousCommand = new FarLeftAuto();\n\t\t// autonomousCommand = new MidAuto();\n\t\t// CameraServer.getInstance().startAutomaticCapture(\"cam3\");\n\t\t// autonomousCommand = new FarLeftAuto\n\n\t\tpovUpTrigger.whenActive(new MoveActuatorsUp());\n\t\tpovDownTrigger.whenActive(new MoveActuatorsDown());\n\t}",
"protected void initialize() {\n timeStarted = timeSinceInitialized();\n RobotMap.shootState=true;\n this.setTimeout(2.0);\n }",
"@Override\n public void robotInit() {\n // Hardware.getInstance().init();\n hardware.init();\n\n controllerMap = ControllerMap.getInstance();\n controllerMap.controllerMapInit();\n\n controllerMap.intake.IntakeInit();\n\n m_chooser.setDefaultOption(\"Default Auto\", kDefaultAuto);\n m_chooser.addOption(\"My Auto\", kCustomAuto);\n SmartDashboard.putData(\"Auto choices\", m_chooser);\n\n intakeCam = CameraServer.getInstance().startAutomaticCapture(\"Driver Camera :)\", 0);\n intakeCam.setPixelFormat(PixelFormat.kMJPEG);\n intakeCam.setResolution(160, 120);\n intakeCam.setFPS(15);\n // climberCam = CameraServer.getInstance().startAutomaticCapture(1);\n\n }",
"protected void initialize() {\n \tRobot.driveTrain.driveMotionMagic(distanceToTravel);\n }",
"protected void initialize() {\n \tRobot.driveBase.stopDead();\n \tRobot.driveBase.resetDriveSensors();\n }",
"protected void initialize() {\n \ttime.start();\n \tRobot.camera.setExposureManual(20);\n \tzach();\n\t\tSystem.out.println(\"josh\");\n\t\t\n }",
"public void robotInit() {\n\t\t//Get preferences from robot flash memory\n\t\tprefs = Preferences.getInstance();\n\t\tarmCalMinPosition = prefs.getDouble(\"armCalMinPosition\", 0);\n\t\tarmCal90DegPosition = prefs.getDouble(\"armCal90DegPosition\", 0);\n\t\tif (armCalMinPosition==0 || armCal90DegPosition==0) {\n\t\t\tDriverStation.reportError(\"Error: Preferences missing from RoboRio for Shooter Arm position calibration. Shooter arm disabled.\", true);\n\t\t\tshooterArmEnabled = false;\n\t\t} else {\n\t\t\tshooterArmEnabled = true;\n\t\t}\n\t\t\n\t\ttry {\n\t\t\tdebugStream = new FileWriter(\"/home/lvuser/debug.log\", true);\n\t\t\tdebugStream.write(\"Robot program started\\n\");\n\t\t\tdebugStream.flush();\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Could not open debug file: \" + e);\n\t\t}\n\n\t\t//Instantiates the subsystems\n\t\tdriveTrain = new DriveTrain();\n\t\tshifter = new Shifter();\n\t\tshooterArm = new ShooterArm();\n\t\tshooter = new Shooter();\n\t\tintake = new Intake();\n\t\tvision = new Vision();\n\t\tpanel = new PowerDistributionPanel();\n\t\tarmPiston = new ArmPiston();\n\n\t\t// OI must be constructed after subsystems. If the OI creates Commands\n\t\t// (which it very likely will), subsystems are not guaranteed to be\n\t\t// constructed yet. Thus, their requires() statements may grab null\n\t\t// pointers. Bad news. Don't move it.\n\t\toi = new OI();\n\n intake.motorCurrentTrigger.whenActive(new IntakeMotorStop());\n\n timerLEDs.start();\n timerTilt.start();\n timerRumble.start();\n \n // instantiate the command used for the autonomous period\n\t\t//autonomousCommand = new AutonomousCommandGroup();\n\t\traiseArm90 = new ShooterArmMoveToSetLocation(90);\n\t\t\n\t\t// Display active commands and subsystem status on SmartDashboard\n\t\tSmartDashboard.putData(Scheduler.getInstance());\n\t\tSmartDashboard.putData(driveTrain);\n\t\tSmartDashboard.putData(shifter);\n\t\tSmartDashboard.putData(shooterArm);\n\t\tSmartDashboard.putData(shooter);\n\t\tSmartDashboard.putData(intake);\n\t\tSmartDashboard.putData(vision);\n\t\tSmartDashboard.putData(armPiston);\n\t}",
"protected void initialize() {\n \tRobot.telemetry.setAutonomousStatus(\"Starting \" + commandName + \": \" + distance);\n \tRobot.drivetrain.resetEncoder();\n \t\n \tRobot.driveDistancePID.setSetpoint(distance);\n \tRobot.driveDistancePID.setRawTolerance(RobotPreferences.drivetrainTolerance());\n \tRobot.driveDistancePID.enable();\n \t\n \texpireTime = timeSinceInitialized() + (RobotPreferences.timeOut());\n }",
"protected void initialize() {\n \tSystem.out.println(\"HoldGear STARTING!!\");\n }",
"@Override\n public void init() {\n robot.init(hardwareMap, telemetry, false);\n //robot.resetServo();\n telemetry.addData(\"Status\", \"Initialized\");\n telemetry.addData(\"Status\", \"Initialized\");\n // robot.FL.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n // robot.FR.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n // robot.BL.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n // robot.BR.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n\n }",
"protected void initialize() {\n\t\tthis.oi = Robot.getInstance().getOI();\n\n }",
"public void robotInit() {\r\n\t\t// Create and start the compressor. It will control pressure automagically\r\n\t\tCompressor comp = new Compressor(RobotMap.pneumaticPreasureSwitch, RobotMap.compresserRelay);\r\n\t\tcomp.start();\r\n\r\n\t\t// instantiate the command used for the autonomous period\r\n\t\tautonomousCommand = new Autonomous();\r\n\r\n\t\t// Initialize all subsystems\r\n\t\tCommandBase.init();\r\n\t}",
"@Override\n\tpublic void robotInit() {\n\t\tleftDriveBack = new VictorSP(0); // PWM Port, madke sure this is set correctly.\n\t\tleftDriveFront = new VictorSP(1);\n\t\t\n\t\trightDriveFront = new VictorSP(2);\n\t\trightDriveBack = new VictorSP(3);\n\t\t\n\t\tleftIntake = new Spark(5);\n\t\trightIntake = new Spark(6);\n\t\t\n\t\tarmMotor = new TalonSRX(10);\n\t\tarmMotor.setNeutralMode(NeutralMode.Brake);\n\t\tarmMotor.configSelectedFeedbackSensor(FeedbackDevice.CTRE_MagEncoder_Absolute, 0, 0);\n\t\tarmMotor.configPeakCurrentLimit(30, 0);\n\t\tarmMotor.configPeakCurrentDuration(250, 0);\n\t\tarmMotor.configContinuousCurrentLimit(20, 0);\n\t\tarmMotor.configClosedloopRamp(0.25, 0);\n\t\tarmMotor.configOpenloopRamp(0.375, 0);\n\t\tarmMotor.enableCurrentLimit(true);\n\t\t\n\t\tarmMotor.configPeakOutputForward(1.0, 0);\n\t\tarmMotor.configPeakOutputReverse(-1.0, 0);\n\t\t\n\t\tarmMotor.config_kP(0, 0.0, 0);\n\t\t\n\t\tarmSetpoint = armMotor.getSelectedSensorPosition(0);\n\t\t\n\t\tstick = new Joystick(0);\n\t\tstickReversed = false;\n\t\txbox = new XboxController(1); // USB port, set in driverstation.\n\t\t\n\t\tdriveCamera = CameraServer.getInstance().startAutomaticCapture(0);\n\t}",
"@Override\n public void robotInit() {\n m_robotContainer = new RobotContainer();\n // Initiate the limelight network table\n NetworkTable table = NetworkTableInstance.getDefault().getTable(\"limelight\");\n tx = table.getEntry(\"tx\");\n ty = table.getEntry(\"ty\");\n ta = table.getEntry(\"ta\");\n RobotContainer.turretSub.tsrxTurret.setSelectedSensorPosition(0);\n }",
"@Override\n\tpublic void robotInit() {\n\t\tprefs = Preferences.getInstance();\n\t\tDEBUG = prefs.getBoolean(\"DEBUG\", false);\n\t\t\n\t\tinitCamera(\"Primary Camera\", 0);\n\t\tinitCamera(\"Secondary Camera\", 1);\n\t\t\n\t\tRobotMap.robotDriveMain = new DifferentialDrive(RobotMap.leftDrive, RobotMap.rightDrive);\n\t\t\n\t\tautoChooser.setDefaultOption(\"Left\", \"left\");\n\t\tautoChooser.addOption(\"Middle\", \"middle\");\n\t\tautoChooser.addOption(\"Right\", \"right\");\n\t\t\n\t\tSmartDashboard.putData(\"Auto Mode:\", autoChooser);\n\t}",
"public void robotInit() {\r\n\r\n shootstate = down;\r\n try {\r\n Components.shootermotorleft.setX(0);\r\n Components.shootermotorleft2.setX(0);\r\n } catch (CANTimeoutException ex) {\r\n ex.printStackTrace();\r\n }\r\n try {\r\n Components.shootermotorright.setX(0);\r\n Components.shootermotorright2.setX(0);\r\n } catch (CANTimeoutException ex) {\r\n ex.printStackTrace();\r\n }\r\n initialpot = Components.ShooterPot.getAverageVoltage();\r\n //shootpotdown +=initialpot;\r\n //shootpotlow+= initialpot;\r\n //shootpotmiddle+= initialpot;\r\n //shootpothigh+=initialpot;\r\n\r\n }",
"protected void initialize() {\n\t\tRobot.motor.getPIDController().setPID(SmartDashboard.getDouble(\"MotorP\"), SmartDashboard.getDouble(\"MotorI\"), SmartDashboard.getDouble(\"MotorD\"));\n\t\tRobot.motor.setOutputRange(0, 1);\n\t\tRobot.motor.setSetpoint(SmartDashboard.getDouble(\"MotorSpeed\"));\n \tRobot.motor.enable();\n }",
"@Override\n public void robotInit() {\n SmartDashboard.putBoolean(\"CLIMB\", false);\n SmartDashboard.putNumber(\"servo\", 0);\n // Instantiate our RobotContainer. This will perform all our button bindings, and put our\n // autonomous chooser on the dashboard.\n m_robotContainer = new RobotContainer();\n //coast.\n if (RobotMap.DRIVE_TRAIN_DRAGON_FLY_IS_AVAILABLE)\n getRobotContainer().getDriveTrain().setCANSparkMaxMotorsState(false, RobotMap.DRIVE_TRAIN_MIDDLE_WHEEL_PORT);\n\n getRobotContainer().configureButtonBindings();\n getRobotContainer().getTecbotSensors().initializeAllSensors();\n getRobotContainer().getTecbotSensors().getTecbotGyro().reset();\n\n Robot.getRobotContainer().getDriveTrain().setCANSparkMaxMotorsState(true, RobotMap.DRIVE_TRAIN_MIDDLE_WHEEL_PORT);\n Robot.getRobotContainer().getDriveTrain().setCANSparkMaxMotorsState(true, RobotMap.DRIVE_TRAIN_LEFT_CHASSIS_PORTS);\n Robot.getRobotContainer().getDriveTrain().setCANSparkMaxMotorsState(true, RobotMap.DRIVE_TRAIN_RIGHT_CHASSIS_PORTS);\n\n UsbCamera camera = CameraServer.getInstance().startAutomaticCapture();\n camera.setResolution(640, 480);\n\n m_chooser.addOption(\"Move 3 m\", new SpeedReductionStraight(3, .75, 0));\n m_chooser.addOption(\"Rotate 90 degrees\", new SpeedReductionTurn(90, .5));\n m_chooser.setDefaultOption(\"El chido\", new DR01D3K4());\n m_chooser.addOption(\"Collect, go back and shoot\", new CollectPowerCellsGoBackShoot());\n m_chooser.addOption(\"Transport\", new SequentialCommandGroup(new FrontIntakeSetRaw(.75),\n new TransportationSystemSetRaw(.5)));\n m_chooser.addOption(\"Shoot 3PCs n' Move\", new SHOOT_3_PCs_N_MOVE());\n SmartDashboard.putData(\"Auto Mode\", m_chooser);\n\n //camera.setExposureManual(79);\n\n\n }",
"@Override\n\tpublic void robotInit() {\n\t\tm_chooser.setDefaultOption(\"Default Auto\", kDefaultAuto);\n\t\tm_chooser.addOption(\"My Auto\", kCustomAuto);\n\t\tSmartDashboard.putData(\"Auto choices\", m_chooser);\n\n\t\tJoy = new Joystick(0);\n\t\ts1 = new DoubleSolenoid(1, 0);\n\t\ts2 = new DoubleSolenoid(2, 3);\n\t\tairCompressor = new Compressor();\n\t\ttriggerValue = false;\n\t\ts1Value = false;\n\t}",
"@Override\n public void init() {\n /* Initialize the hardware variables.\n * The init() method of the hardware class does all the work here\n */\n robot.init(hardwareMap);\n\n robot.leftDriveMotor.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n robot.rightDriveMotor.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n // Possibly add a delay\n robot.leftDriveMotor.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n robot.rightDriveMotor.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n\n\n // Send telemetry message to signify robot waiting;\n telemetry.addData(\"Say\", \"Hello Driver\"); //\n }",
"protected void initialize() {\n \tRobot.chassisSubsystem.setShootingMotors(0);\n }",
"@Override\n protected void initialize() {\n if (Robot.useDrive) {\n joy = Robot.oi.getJoystick();\n }\n Robot.drive.setBrakeMode();\n\n }",
"@Override\n public void init() {\n swerveDebug(500, \"SwerveAutoTEST::init\", \"STARTing init for TETS\");\n\n // Run initialization of other parts of the class\n // Note that the class will connect to all of our motors and servos\n super.init();\n\n crater = Boolean.TRUE;\n\n\n // Robot and autonomous settings are read in from files in the core class init()\n // Report the autonomous settings\n showAutonomousGoals();\n\n swerveLog( \"X S6\", ourSwerve.getOrientLog());\n\n swerveDebug(500, \"SwerveAutoTEST::init\", \"DONE\");\n }",
"protected void initialize ()\n\t{\n\t\tSubsystems.goalVision.processNewImage();\n\t\t\n \t//Send positive values to go forwards.\n \tSubsystems.transmission.setLeftJoystickReversed(true);\n \tSubsystems.transmission.setRightJoystickReversed(true);\n\t}",
"public void robotInit() {\n chooser = new SendableChooser();\n chooser.addDefault(\"Default Auto\", defaultAuto);\n chooser.addObject(\"My Auto\", customAuto);\n SmartDashboard.putData(\"Auto choices\", chooser);\n\n initialize();\n }",
"public void autonomousInit() {\n \n }",
"@Override\n public void init() {\n telemetry.addData(\"Status\", \"Initialized Interative TeleOp Mode\");\n telemetry.update();\n\n // Initialize the hardware variables. Note that the strings used here as parameters\n // to 'get' must correspond to the names assigned during the robot configuration\n // step (using the FTC Robot Controller app on the phone).\n leftDrive = hardwareMap.dcMotor.get(\"leftDrive\");\n rightDrive = hardwareMap.dcMotor.get(\"rightDrive\");\n armMotor = hardwareMap.dcMotor.get(\"armMotor\");\n\n leftGrab = hardwareMap.servo.get(\"leftGrab\");\n rightGrab = hardwareMap.servo.get(\"rightGrab\");\n colorArm = hardwareMap.servo.get(\"colorArm\");\n leftTop = hardwareMap.servo.get(\"leftTop\");\n rightTop = hardwareMap.servo.get(\"rightTop\");\n\n /*\n left and right drive = motion of robot\n armMotor = motion of arm (lifting the grippers)\n extendingArm = motion of slider (used for dropping the fake person)\n left and right grab = grippers to get the blocks\n */\n\n }",
"@Override\n\tpublic void robotInit() {\n\t\tm_chooser.setDefaultOption(\"Default Auto\", kDefaultAuto);\n\t\tm_chooser.addOption(\"My Auto\", kCustomAuto);\n\t\tSmartDashboard.putData(\"Auto choices\", m_chooser);\n\n\t\tm_frontRight = new PWMVictorSPX(0);\n\t\tm_frontLeft = new PWMVictorSPX(2);\n\t\tm_backRight = new PWMVictorSPX(1);\n\t\tm_backLeft = new PWMVictorSPX(3);\n\n\t\tx_aligning = false;\n\n\t\tJoy = new Joystick(0);\n\t\tmyTimer = new Timer();\n\n\t\tfinal SpeedControllerGroup m_left = new SpeedControllerGroup(m_frontLeft, m_backLeft);\n\t\tfinal SpeedControllerGroup m_right = new SpeedControllerGroup(m_frontRight, m_backRight);\n\n\t\tm_drive = new DifferentialDrive(m_left, m_right);\n\n\t\tdistanceToTarget = 0;\n\n\t\tcounter = new Counter(9);\n\t\tcounter.setMaxPeriod(10.0);\n\t\tcounter.setSemiPeriodMode(true);\n\t\tcounter.reset();\n\t}",
"public void initialize() {\n\n Robot.driveSubsystem.resetGyro();\n\n }",
"protected void initialize() {\n \tclaw = Robot.getClaw();\n\n \tclaw.open();\n }",
"protected void initialize() {\n finished = false;\n Robot.shooter.Spin();//Spin up wheels\n Timer.delay(3);\n Robot.shooter.TriggerExtend();//Reset Trigger\n Timer.delay(.2);\n Robot.shooter.FeederExtend();//Drop Frisbee\n Timer.delay(1.5);\n Robot.shooter.TriggerRetract();//Fire frisbee\n Timer.delay(.2);\n Robot.shooter.FeederRetract();//Reset Feeder\n Timer.delay(.4);\n \n Robot.shooter.TriggerExtend();//Reset Trigger\n Timer.delay(.2);\n Robot.shooter.FeederExtend();//Drop Frisbee\n Timer.delay(1.5);\n Robot.shooter.TriggerRetract();//Fire frisbee\n Timer.delay(.2);\n Robot.shooter.FeederRetract();//Reset Feeder\n Timer.delay(.4);\n \n Robot.shooter.TriggerExtend();//Reset Trigger\n Timer.delay(.2);\n Robot.shooter.FeederExtend();//Drop Frisbee\n Timer.delay(1.5);\n Robot.shooter.TriggerRetract();//Fire frisbee\n Timer.delay(.2);\n Robot.shooter.FeederRetract();//Reset Feeder\n Timer.delay(.4);\n //Robot.shooter.Stop();\n Robot.shooter.TriggerExtend();//Reset Trigger\n \n Robot.driveTrain.DriveBack();//Drives backwards from pyramid\n Timer.delay(1.5);\n Robot.driveTrain.TurnAround();//Turns Bob around\n Timer.delay(1);\n Robot.driveTrain.Stop();//Stops Bob\n \n Robot.pneumatics.CompressorOn();//Turns compressor on\n }",
"@Override\n public void robotInit() {\n m_chooser.setDefaultOption(\"Default Auto\", kDefaultAuto);\n m_chooser.addOption(\"My Auto\", kCustomAuto);\n SmartDashboard.putData(\"Auto choices\", m_chooser);\n leftFrontMotor = new CANSparkMax(10, MotorType.kBrushless);\n leftBackMotor = new CANSparkMax(11, MotorType.kBrushless);\n rightFrontMotor = new CANSparkMax(12, MotorType.kBrushless);\n rightBackMotor = new CANSparkMax(13, MotorType.kBrushless);\n leftFrontMotor.setIdleMode(IdleMode.kCoast);\n leftBackMotor.setIdleMode(IdleMode.kCoast);\n rightFrontMotor.setIdleMode(IdleMode.kCoast);\n rightBackMotor.setIdleMode(IdleMode.kCoast);\n gyro = new ADXRS450_Gyro();\n gyro.calibrate();\n stick = new Joystick(1);\n controller = new XboxController(0);\n origGyro = 0;\n }",
"protected void initialize() {\n \tRobot.driveTrain.arcade(MOVE_SPEED_PERCENT, Robot.driveTrain.gyroPReturn(direction));\n }",
"@Override\n protected void initialize() {\n //Robot.limelight.setLiveStream(0);\n Robot.limelight.setLEDMode(3);\n }",
"protected void initialize() {\r\n Robot.driveTrain.resetRangefinder();\r\n }",
"protected void initialize() {\n \tRobot.intake.runIntake(this.m_speed, this.m_speed);\n }",
"@Override\n protected void initialize() {\n headingPID.enable();\n headingPID.resetPID();\n Robot.driveBase.enableDriveBase();\n ahrs.reset();\n }",
"@Override\n public void init() {\n \n \n rightFront = hardwareMap.dcMotor.get(\"frontR\");\n rightBack = hardwareMap.dcMotor.get(\"backR\");\n \n \n \n rightFront.setDirection(DcMotor.Direction.FORWARD); \n rightBack.setDirection(DcMotor.Direction.FORWARD);\n \n \n \n\n // Send telemetry message to signify robot waiting;\n telemetry.addData(\"Say\", \"Hello Driver\"); //\n }",
"protected void initialize() {\n \tRobot.io.bottomGyro.reset();\n \tRobot.io.topGyro.reset();\n \tpid.reset();\n \tpid.setSetpoint(rotAngle);\n \tpid.enable();\n }",
"@Override\n\tpublic void robotInit() {\n\t\tSmartDashboard.putData(new TestLIDARCommand());\n\n\t\tdriveSubsystem = new DriveSubsystem();\n\t\tshooterSubsystem = new ShooterSubsystem();\n\t\tfeederSubsystem = new FeederSubsystem();\n\t\tintakeSubsystem = new IntakeSubsystem();\n\t\tgearSubsystem = new GearSubsystem();\n\t\tclimberSubsystem = new ClimberSubsystem();\n\t\tcameraSubsystem = new CameraSubsystem();\n\n\t\tnavigator = new Navigator();\n\t\toi = new OI();\n\n\t\tm_chooser = new SendableChooser<>();\n\t\tm_chooser.addDefault(\"Do Nothing\", new PistonReleaseCommand());\n\t\t//m_chooser.addObject(\"Boiler Auto (side hopper)\", new SelectBoilerAutoCommand());\n\t\tm_chooser.addObject(\"Boiler Auto (front hopper)\", new SelectBoilerAutoFrontCommand());\n\t\tm_chooser.addObject(\"Test drive straight\", new MeasureDistanceCommand(1500, 100000));\n\t\tm_chooser.addObject(\"Test max speed\", new TimedDriveCommand(5.0, 1.00));\n\t\tm_chooser.addObject(\"Gear Auto (boiler)\", new SelectGearBoilerCommand());\n\t\tm_chooser.addObject(\"Gear Auto (feeder)\", new SelectGearFeederCommand());\n\t\tm_chooser.addObject(\"Gear Auto (middle)\", new SelectGearMiddleAutoCommand());\n\t\tSmartDashboard.putData(\"Auto mode\", m_chooser);\n\n\t\tRobot.navigator.startMeasuringDistance();\n\t}",
"protected void initialize() {\n \tRobot.conveyor.stop();\n }",
"public void autonomousInit() {\n }",
"public void autonomousInit() {\n }",
"protected void initialize() {\n \tRobot.driveBase.resetEnc(2);\n \tRobot.gyro.reset();\n \t//stop extraneous moving parts\n }",
"public void autonomousInit() {\n\t\t\n\t}",
"protected void initialize() {\n \t\n \n \t\n \tRobotMap.motorLeftTwo.setSelectedSensorPosition(0,0,0);\n\t\tRobotMap.motorRightTwo.setSelectedSensorPosition(0,0,0);\n \t\n \torientation.setSetPoint(desiredAngle);\n \tstartTime = Timer.getFPGATimestamp();\n }",
"@Override\r\n protected void initialize() {\r\n // initialize for computing deltaT\r\n mPreviousTime = System.currentTimeMillis(); \r\n // the controllers don't use position data\r\n // but they do need Yaw Data, which can come from\r\n // either the IMU or the Position Tracker. We\r\n // initialize both so we can change our minds\r\n // in the drivetrain code later on, depending\r\n // upon the relative performance of the two approaches.\r\n Robot.drivetrain.resetGyro();\r\n \tRobot.drivetrain.resetEncodersAndStats(); \r\n \tRobot.drivetrain.resetPosition(true);\r\n \tRobot.drivetrain.setInitialOrientationDegCCW(mStartOrientationDegCCW); \r\n double dist = Robot.visionSubSys.getDistFt() ;\r\n double bearing = Robot.visionSubSys.getBearingDegCW() ;\r\n double orient = Robot.drivetrain.getOrientDegCCW() ; \t\r\n mDistController.start(dist,bearing);\r\n mBearingController.start(dist,bearing,orient);\r\n \r\n Robot.logger.appendLog(\"CmdDualPidFollowVision Init\");\r\n \tRobot.drivetrain.setLoggingOn();\r\n }",
"protected void initialize() {\n\t\tRobot._driveTrain.setAuton(true);\n\t\tRobot._driveTrain.clearEncoder();\n\t\tRobot._driveTrain.clearGyro();\n\t\tdistanceToCenter = SmartDashboard.getNumber(\"toteOffset\", 0);\n\t\tif (Robot._pneumatics.getArms() != DoubleSolenoid.Value.kReverse) {\n\t\t\tRobot._pneumatics.setArms(DoubleSolenoid.Value.kReverse);\n\t\t}\n\t}",
"private void initializeStartup()\n {\n /* Turn off Limelight LED when first started up so it doesn't blind drive team. */\n m_limelight.turnOffLED();\n\n /* Start ultrasonics. */\n m_chamber.startUltrasonics();\n }",
"@Override\n\tpublic void robotInit() {\n\t\tfr = new Spark(HardwareMap.PWM.DRIVE_FR);\n\t\tfl = new Spark(HardwareMap.PWM.DRIVE_FL);\n\t\tbr = new Spark(HardwareMap.PWM.DRIVE_BR);\n\t\tbl = new Spark(HardwareMap.PWM.DRIVE_BL);\n\t\t\n\t\t// Create the side modules\n\t\tleftGroup = new SpeedControllerGroup(bl, fl);\n\t\trightGroup = new SpeedControllerGroup(br, fr);\n\n\t\t// Init the the drive train\n\t\tdrive = new DifferentialDrive(leftGroup, rightGroup);\n\t\t\n\t\t//Init the gyro\n\t\tgyro.calibrate();\n\t\tSmartDashboard.putData(\"Gyro\", gyro);\n\t\t\n\t\tdrive.setSafetyEnabled(false);\n\t\tthis.setName(Subsystems.DRIVE);\n\t}"
] | [
"0.83935285",
"0.83935285",
"0.83935285",
"0.8355623",
"0.8355623",
"0.82535493",
"0.82375956",
"0.8115416",
"0.8103695",
"0.8070376",
"0.8047399",
"0.8047239",
"0.801589",
"0.7976253",
"0.7974845",
"0.7970737",
"0.7919292",
"0.7892883",
"0.78797793",
"0.7869564",
"0.78509885",
"0.7848933",
"0.78349674",
"0.7809944",
"0.77988404",
"0.77500314",
"0.7740066",
"0.7734596",
"0.7732929",
"0.77300113",
"0.77289474",
"0.7724316",
"0.77106524",
"0.76924366",
"0.76919025",
"0.7686963",
"0.7677975",
"0.766292",
"0.76533794",
"0.7625543",
"0.76217926",
"0.7605851",
"0.7603129",
"0.7591624",
"0.7589306",
"0.7585202",
"0.758457",
"0.7582649",
"0.7576712",
"0.7573416",
"0.7572945",
"0.75630724",
"0.7552798",
"0.75507224",
"0.75431496",
"0.7541555",
"0.753399",
"0.75310975",
"0.7527378",
"0.75143826",
"0.75117016",
"0.75042546",
"0.74969554",
"0.74961066",
"0.7482914",
"0.74712384",
"0.7448654",
"0.7447943",
"0.7440739",
"0.743251",
"0.7430193",
"0.7427644",
"0.7420036",
"0.74199796",
"0.7414104",
"0.73935956",
"0.7393429",
"0.7384404",
"0.735712",
"0.73561054",
"0.7344651",
"0.73439676",
"0.7343695",
"0.7341858",
"0.73353225",
"0.7331881",
"0.7320041",
"0.731615",
"0.73131216",
"0.7307407",
"0.7305526",
"0.729968",
"0.729968",
"0.7296853",
"0.7296576",
"0.7294139",
"0.7292646",
"0.7273009",
"0.72388524",
"0.7238195"
] | 0.75288975 | 58 |
This function is called once each time the robot enters Disabled mode. You can use it to reset any subsystem information you want to clear when the robot is disabled. | public void disabledInit(){
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void disabledInit() {\n\t\tprocessRobotModeChange(RobotMode.DISABLED);\n }",
"@Override\n\tpublic void disabledInit() {\n\t\tRobot.driveSubsystem.setCoastMode();\n\t}",
"void disableMod();",
"private void disableSensor() {\n if (DEBUG) Log.w(TAG, \"<<< Sensor \" + getEmulatorFriendlyName() + \" is disabled.\");\n mEnabledByEmulator = false;\n mValue = \"Disabled by emulator\";\n\n Message msg = Message.obtain();\n msg.what = SENSOR_STATE_CHANGED;\n msg.obj = MonitoredSensor.this;\n notifyUiHandlers(msg);\n }",
"public void disabledInit() {\n oi.getXBoxJoystick().setRumble(RumbleType.kLeftRumble, 0);\n oi.getXBoxJoystick().setRumble(RumbleType.kRightRumble, 0);\n oi.getXBoxJoystick2().setRumble(RumbleType.kLeftRumble, 0);\n oi.getXBoxJoystick2().setRumble(RumbleType.kRightRumble, 0);\n }",
"public void disabledInit()\n {\n //cam.stopCapture();\n m_USBVCommand.start();\n }",
"@Override\n public void disabledInit()\n {\n driver.setRumble(RumbleType.kLeftRumble, 0);\n driver.setRumble(RumbleType.kRightRumble, 0);\n driveTrain.zeroSensors();\n pigeonInitializing = false;\n }",
"@Override\n public void disabledInit() {\n //Diagnostics.writeString(\"State\", \"DISABLED\");\n }",
"@Override\n public void disabledInit() {\n\t// new SetElevator(0).start();\n\tif (autonomousCommand != null)\n\t autonomousCommand.cancel();\n\tScheduler.getInstance().removeAll();\n }",
"public void disable() {\r\n m_enabled = false;\r\n useOutput(0, 0);\r\n }",
"public void reset() {\n // stop motors\n Motor.A.stop();\t\n Motor.A.setPower(0);\t\n Motor.B.stop();\n Motor.B.setPower(0);\t\n Motor.C.stop();\n Motor.C.setPower(0);\t\n // passivate sensors\n Sensor.S1.passivate();\n Sensor.S2.passivate();\n Sensor.S3.passivate();\n for(int i=0;i<fSensorState.length;i++)\n fSensorState[i] = false;\n }",
"public void turnOff(){\n vendingMachine = null;\n Logger.getGlobal().log(Level.INFO,\" Turning Off...\");\n }",
"public void disable ( ) {\r\n\t\tenabled = false;\r\n\t}",
"public void disable()\r\n\t{\r\n\t\tenabled = false;\r\n\t}",
"public void disable() {\n operating = false;\n }",
"protected void onDisabled() {\n // Do nothing.\n }",
"public void setEngineOff();",
"void disable() {\n }",
"protected void initialize() {\n \tRobot.driveBase.stopDead();\n \tRobot.driveBase.resetDriveSensors();\n }",
"public void onDisable() {\r\n }",
"public void disable() {\n disabled = true;\n circuit.disable();\n updateSign(true);\n notifyChipDisabled();\n }",
"public void disable() {\n\t\tm_enabled = false;\n\t\tuseOutput(0);\n\t}",
"@Override\n public void onDisabled() {\n }",
"protected void initialize() {\n \tRobot.chassisSubsystem.setShootingMotors(0);\n }",
"@Override\n public void onDisable() {\n super.onDisable();\n running = false;\n }",
"private void resetSense() {\r\n\t\tArrays.fill(this.senseBytes, (byte)0x00);\r\n\t\tthis.updateUnitStatus();\r\n\t}",
"public void onDisable() {\n }",
"public void onDisable() {\n }",
"@Override\n public void onDisable() {\n }",
"@Override\n\tpublic void powerOff() {\n\t\tSystem.out.println(\"samsongTV powerOff\");\n\n\t}",
"public void disable(){\n if(criticalStop) return;\n getModel().setStatus(false);\n }",
"public void setSensorOff() {\n\n }",
"public void disable(){\r\n\t\tthis.activ = false;\r\n\t}",
"public void restoreValues() {\n drive_control.stopDriving();\n if (ACTUAL_DIFICULTY == EASY)\n drive_control.setSpeedScale(EASY_BASE_SPEED);\n if (ACTUAL_DIFICULTY == MEDIUM)\n drive_control.setSpeedScale(MEDIUM);\n if (ACTUAL_DIFICULTY == HARD)\n drive_control.setSpeedScale(HARD);\n drive_control.startDriving(getContext(), DriveControl.JOY_STICK);\n isUserControlAct = true;\n }",
"void disablePWM();",
"void disable();",
"void disable();",
"public void onDisable()\n {\n }",
"@Override\n public void turnOff() {\n System.out.println(\"this wont happen\");\n }",
"public void onDisable() {\n }",
"@Override\r\n\tpublic void disable() {\n\t\tcurrentState.disable();\r\n\t}",
"@Override\r\n\tpublic void onDisable() {\n\t}",
"private void softReset() {\n // variables\n lapMap.clear();\n // ui\n sessionTView.setText(\"\");\n positionTView.setText(\"-\");\n currentLapTView.setText(\"--:--:---\");\n lastLapTView.setText(\"--:--:---\");\n bestLapTView.setText(\"--:--:---\");\n currentLapNumberTView.setText(\"-\");\n gapTView.setText(\" -.---\");\n fastestDriver = Float.MAX_VALUE;\n fastestDriverName = null;\n fastestDriverTView.setText(\"--:--:---\");\n fastestDriverNameTView.setText(\"Fastest lap\");\n Log.d(TAG, \"SOFT Reset: between game states\");\n }",
"@Override\n\tpublic void onDisable() {\n\t\t\n\t}",
"public void disable() {\n TalonHelper.configNeutralMode(Arrays.asList(armMotor, armMotorSlave), NeutralMode.Coast);\n }",
"public void disable();",
"public void stopRobot(){\n LAM.setPower(0);\n RAM.setPower(0);\n ILM.setPower(0);\n IRM.setPower(0);\n BLM.setPower(0);\n BRM.setPower(0);\n FLM.setPower(0);\n FRM.setPower(0);\n }",
"@Override\r\n\tpublic void powerOff() {\n\r\n\t\tSystem.out.println(\"ig tv power off\");\r\n\r\n\t}",
"public void disable()\n {\n // Verify service is connected\n assertService();\n \n try {\n \tmLedService.disable(mBinder);\n } catch (RemoteException e) {\n Log.e(TAG, \"disable failed\");\n }\n }",
"@Override\n\tpublic void onDisable() {\n\n\t}",
"@Override\n\tpublic void onEnable() {\n\t\tSystem.out.println(\"Modus: Forcedown\");\n\t\tArduinoInstruction.getInst().enable();\n\t\tArduinoInstruction.getInst().setControl((byte)0x40);\n\t}",
"public void resetAllOperations() {\n\t\t/*\n\t\t * Check to see if we are in any countdown modes\n\t\t */\n\t\tif(inCountdown1Mode) {\n\t\t\twarmUpWindow1.dismiss();\n\t\t}\t\t\n\t\tif(inBaselineMode) {\n\t\t\tbaselineWindow.dismiss();\n\t\t}\n\t\t\n\t\t/**\n\t\t * Turn off any red leds\n\t\t */\n\t\tledOn1.setVisibility(View.INVISIBLE);\n\t\tledOn2.setVisibility(View.INVISIBLE);\n\t\tledOn3.setVisibility(View.INVISIBLE);\n\t\tledOn4.setVisibility(View.INVISIBLE);\n\t\tledOn5.setVisibility(View.INVISIBLE);\n\t\tledOn6.setVisibility(View.INVISIBLE);\n\t\tledOn7.setVisibility(View.INVISIBLE);\n\t\tledOn8.setVisibility(View.INVISIBLE);\n\t\tledOn9.setVisibility(View.INVISIBLE);\n\t\t\n\t\t/*\n\t\t * Reset any program flow variables\n\t\t */\n\t\tinCountdown1Mode = false;\n\t\tinBaselineMode = false;\n\t\ton = false;\n\t\tmodeChange = false;\n\t\twarmedUp = false;\n\t\t\n\t\t/*\n\t\t * Reset counts\n\t\t */\n\t\tcountdown1 = WARMUP_COUNT;\n\t\tcountdown2 = BASELINE_COUNT;\n\t\ttvUpdate(tvSensorValue, \"--\");\n\t\t\n\t\tcountdown1Handler.removeCallbacksAndMessages(null);\n\t\tcountdown2Handler.removeCallbacksAndMessages(null);\n\t\tmodeHandler.removeCallbacksAndMessages(null);\n\t\ttickHandler.removeCallbacksAndMessages(null);\n\t\tsetLEDsHandler.removeCallbacksAndMessages(null);\n\t\t\n\t\t// Stop taking measurements\n\t\tstreamer.disable();\n\t\t// Disable the sensor\n\t\tdroneApp.myDrone.quickDisable(qsSensor);\n\t}",
"@Override\n public void disabledInit()\n {\n \n }",
"protected abstract void disable();",
"public abstract void onDisable();",
"public void initialize() {\n\n Robot.driveSubsystem.resetGyro();\n\n }",
"@Override\n protected void initialize() {\n headingPID.enable();\n headingPID.resetPID();\n Robot.driveBase.enableDriveBase();\n ahrs.reset();\n }",
"public void disabledInit()\n\t{\n\t\t\n\t}",
"@Override\n\tpublic void disabled(AbstractHardware<? extends AbstractHardwareListener> hardware) {\n\t}",
"@Override\n public void disabledInit(){\n\n }",
"protected void onHardReset() {\n\t\tonReset();\n\t}",
"public void resetMode() {\n\t\televatorManager.resetMode();\n\t}",
"@Override\n public void disabledInit()\n {\n }",
"@Override\n public void disabledInit() {\n }",
"@Override\n protected void end() {\n drive.setEnabled(false);\n drive.setLeftPower(0);\n drive.setRightPower(0);\n }",
"void driveStop() {\n flMotor.setPower(0);\n frMotor.setPower(0);\n blMotor.setPower(0);\n brMotor.setPower(0);\n }",
"public void disabledInit() {\n\t\tvision.disableCameraSaving();\n\t}",
"@Override\n\tpublic void onDisable() {\n\t\tgetLogger().info(\"SimplyWrapper successfully disabled !\");\n\t}",
"protected void initialize() {\n\t\tRobot.resetSensors();\n\t}",
"@Override\n public void disabledInit() {\n }",
"@Override\n public void disabledInit() {\n }",
"@Override\n public void disabledInit() {\n }",
"@Override\n\tpublic void disabledInit() \n\t{\n\n\t}",
"@Override\n\tpublic void disabledInit() {\n\t\t\n\t}",
"@Override\n\tpublic void disabledInit() {\n\t\t\n\t}",
"@Override\n\tpublic void disabledInit() {\n\t}",
"protected void initialize() {\n \tRobot.driveBase.resetEnc(2);\n \tRobot.gyro.reset();\n \t//stop extraneous moving parts\n }",
"public void reset() {\n cycles = 0;\n nextHaltCycle = GB_CYCLES_PER_FRAME;\n nextUpdateCycle = 0;\n running = false;\n timer.reset();\n \n cpu.reset();\n ram.reset();\n soundHandler.reset();\n }",
"@Override\n\tpublic void off() {\n\t\tSystem.out.println(\"turn off the \"+name+\" Light\");\n\t}",
"public abstract void Disabled();",
"public void disable() {\n \t\t\tsetEnabled(false);\n \t\t}",
"@Override\n\tprotected void takeOff(){\n\t\tgvh.log.i(TAG, \"Drone taking off\");\n\t\tsetControlInput(0, 0, 0, 1);\n\t}",
"public void reset(){\n this.context.msr.setReadyForInput(false);\n emptyAllInputBuffers();\n emptyAllOutputBuffers();\n emptyEngineersConsoleBuffer();\n }",
"protected void initialize() {\n \tRobot.autonomous_command_group.cancel();\n }",
"private void hardReset() {\n softReset();\n // variables\n recordLap = 0; // force first query on database after race restart\n trackName = null;\n // ui\n recordLapTView.setText(\"--:--:---\");\n trackTView.setText(\"Track location\");\n carTView.setText(\"Car\");\n Log.d(TAG, \"HARD Reset: main menu\");\n }",
"public void setDisabled() {\n\t\tdisabled = true;\n\t}",
"@Override\n public void disabledInit() {}",
"@Override\n public void onDisable() {\n getLogger().info(\"Successfully disabled.\");\n }",
"@Override\n\tpublic void turnOff() {\n\n\t}",
"default void onDisable() {}",
"@Override\n protected void initialize() {\n Robot.powerCellManipulator.stopIntake();\n }",
"@Override\n\tpublic void disabledInit() {\n\n\t}",
"@Override\n\tpublic void disabledInit() {\n\n\t}",
"@Override\n protected void end() {\n Robot.m_drive.SetPower(0);\n }",
"public void disable()\n {\n openGate = null;\n }",
"@Override\n\tpublic void disabledInit() {\n\t\t\n\n\t}"
] | [
"0.7318294",
"0.6725731",
"0.670471",
"0.66788805",
"0.6663414",
"0.66177344",
"0.6570334",
"0.6563162",
"0.6511041",
"0.6403709",
"0.6403476",
"0.64009964",
"0.6394384",
"0.63876104",
"0.63768834",
"0.636539",
"0.63534826",
"0.63392323",
"0.6334516",
"0.6333427",
"0.6333402",
"0.63225985",
"0.6295896",
"0.6294338",
"0.6270716",
"0.6246419",
"0.62370145",
"0.62370145",
"0.62337667",
"0.6232516",
"0.62233293",
"0.6215568",
"0.62136877",
"0.6210278",
"0.6205588",
"0.6203143",
"0.6203143",
"0.62026113",
"0.6197039",
"0.61880654",
"0.6183163",
"0.6176685",
"0.61737883",
"0.6162745",
"0.61520374",
"0.61295015",
"0.611222",
"0.6104383",
"0.610299",
"0.6098497",
"0.6097106",
"0.60928154",
"0.6092154",
"0.609051",
"0.609006",
"0.6083487",
"0.607948",
"0.6069195",
"0.6062774",
"0.6055284",
"0.60514104",
"0.6040034",
"0.6039103",
"0.60370946",
"0.6030392",
"0.60207814",
"0.6017499",
"0.60100603",
"0.6009819",
"0.6004432",
"0.6004432",
"0.6004432",
"0.6004354",
"0.6002026",
"0.6002026",
"0.5999512",
"0.5994429",
"0.59940934",
"0.5993527",
"0.5981547",
"0.5976966",
"0.5970389",
"0.5968175",
"0.59635645",
"0.5958755",
"0.59532315",
"0.5951357",
"0.5951077",
"0.5942864",
"0.5942828",
"0.5942625",
"0.59423375",
"0.59423375",
"0.5930368",
"0.5925297",
"0.5924503"
] | 0.5985154 | 81 |
This autonomous (along with the chooser code above) shows how to select between different autonomous modes using the dashboard. The sendable chooser code works with the Java SmartDashboard. If you prefer the LabVIEW Dashboard, remove all of the chooser code and uncomment the getString code to get the auto name from the text box below the Gyro You can add additional auto modes by adding additional commands to the chooser code above (like the commented example) or additional comparisons to the switch structure below with additional strings & commands. | public void autonomousInit() {
//autonomousCommand = (Command) chooser.getSelected();
autoLoopCounter = 0; //This resets the loop counter to 0
//if (autonomousCommand != null) autonomousCommand.start();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void robotInit() {\n m_chooser.setDefaultOption(\"Default Auto\", kDefaultAuto);\n m_chooser.addOption(\"My Auto\", kCustomAuto);\n SmartDashboard.putData(\"Auto choices\", m_chooser);\n SmartDashboard.putData(leftMotor1);\n SmartDashboard.putData(leftMotor2);\n SmartDashboard.putData(rightMotor1);\n SmartDashboard.putData(rightMotor2);\n SmartDashboard.putData(firstMotor);\n SmartDashboard.putData(secondMotor);\n \n\n\n\n }",
"public void autonomousInit() {\n\t\ttimer.start();\n\t\tautonomousCommand = autoChooser.getSelected();\n\t\t//This outputs what we've chosen in the SmartDashboard as a string.\n\t\tSystem.out.println(autonomousCommand);\n\t\tif (DriverStation.getInstance().isFMSAttached()) {\n\t\t\tgameData = DriverStation.getInstance().getGameSpecificMessage();\n\t\t}\n\t\telse {\n\t\t\tgameData=\"RLR\";\n\t\t}\n\t\t//armSwing.setAngle(90); //hopefully this will swing the arms down. not sure what angle it wants though\n\t}",
"@Override\n\tpublic void autonomousInit() {\n\t\t\n\t\t// runs the autonomous smartdashboard display for auton\n\t\tActuators.getLeftDriveMotor().setEncPosition(0);\n\t\tActuators.getRightDriveMotor().setEncPosition(0);\n\t\tautonomousCommand = (Command) autoChooser.getSelected();\n\t\t\n//\t\tbackupCommand = (Command) backupChooser.getSelected();\n//\t\tActuators.getLeftDriveMotor().changeControlMode(TalonControlMode.MotionProfile);\n//\t\tActuators.getRightDriveMotor().changeControlMode(TalonControlMode.MotionProfile);\n//\t\tif (NetworkTables.getControlsTable().getBoolean(\"camera0\", false)) {//Auto for working camera\n\t\t\n\t\tif(autonomousCommand != null){\t\n\t\t\tSystem.out.println(autonomousCommand);\n\t\t\tautonomousCommand.start();\n\t\t}\n\t\t\n//\t\t\tSystem.out.println(\"I got here auto Command start\");\n//\t\t\t}\n//\t\telse{\n//\t\t\tbackupCommand.start();\t\t\t\n//\t\t}\n//\t\t\tDrive.driveWithPID(distance, distance);\n\n\t\tstate = \"auton\";\n\t\t// autoSelected = chooser.getSelected();\n\t\t// // autoSelected = SmartDashboard.getString(\"Auto Selector\",\n\t\t// // defaultAuto);\n\t\t// System.out.println(\"Auto selected: \" + autoSelected);\n\t\tNetworkTables.getControlsTable().putBoolean(\"auton\", true);\n\n\t}",
"private void initializeAutoChooser()\n {\n /* Add options (which autonomous commands can be selected) to chooser. */\n m_autoChooser.setDefaultOption(\"DEFAULT COMMAND NAME HERE\", \"default\");\n m_autoChooser.addOption(\"TEST\", \"test\");\n m_autoChooser.addOption(\"THREE BALL FORWARD\", \"three_ball_forward\");\n m_autoChooser.addOption(\"THREE BALL BACKWARD\", \"three_ball_backward\");\n m_autoChooser.addOption(\"SIX BALL\", \"six_ball\");\n\n /*\n * Display chooser on SmartDashboard for operators to select which autonomous\n * command to run during the auto period.\n */\n SmartDashboard.putData(\"Autonomous Command\", m_autoChooser);\n }",
"public void autonomousInit() {\n \tautoSelected = (String) chooser.getSelected();\n//\t\tautoSelected = SmartDashboard.getString(\"Auto Selector\", defaultAuto);\n\t\tSystem.out.println(\"Auto selected: \" + autoSelected);\n }",
"public static void initalize(){\n //Add all of the commands here by name and id\n autonomousChooser.addDefault(\"Base Line\", 0);\n // addOption(String name, int object)\n\n SmartDashboard.putData(\"Auto mode\", autonomousChooser);\n }",
"@Override\n\tpublic void autonomousInit() {\n//\t\tm_autonomousCommand = m_chooser.getSelected();\n\t\t\n\t\tif(m_startPosition.getSelected().equals(\"Center\")) {\n\t\t\tif(getGameSpecificData(\"alliance\") == R) {\n\t\t\t\tm_autonomousCommand = new AUTO_centerRight();\n\t\t\t}else if(getGameSpecificData(\"alliance\") == L) {\n\t\t\t\tm_autonomousCommand = new AUTO_centerLeft();\n\t\t\t}else {\n\t\t\t\tm_autonomousCommand = null;\n\t\t\t}\n\t\t\t\n\t\t}else if(m_startPosition.getSelected().equals(\"Right\")) {\n\t\t\tif(m_gameElement.getSelected().equals(\"switch\")) {\n\t\t\t\tif(getGameSpecificData(\"alliance\") == R) {\n\t\t\t\t\tm_autonomousCommand = new AUTO_rightSwitchRight();\n\t\t\t\t}else if(getGameSpecificData(\"alliance\") == L) {\n\t\t\t\t\tm_autonomousCommand = new AUTO_rightSwitchLeft();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}else if(m_gameElement.getSelected().equals(\"scale\")) {\n\t\t\t\tif(getGameSpecificData(\"scale\") == R) {\n\t\t\t\t\tm_autonomousCommand = new AUTO_rightScaleRight();\n\t\t\t\t}else if(getGameSpecificData(\"scale\") == L) {\n\t\t\t\t\tm_autonomousCommand = new HowToTestAutoPath();\n\t\t\t\t}\n\t\t\t}else {\n\t\t\t\tm_autonomousCommand = null;\n\t\t\t}\n\t\t\t\n\t\t}else if(m_startPosition.getSelected().equals(\"Left\")) {\n\t\t\tif(m_gameElement.getSelected().equals(\"switch\")) {\n\t\t\t\tif(getGameSpecificData(\"alliance\") == R) {\n\t\t\t\t\tm_autonomousCommand = new HowToTestAutoPath();//AUTO_leftSwitchRight();\n\t\t\t\t}else if(getGameSpecificData(\"alliance\") == L) {\n\t\t\t\t\tm_autonomousCommand = new AUTO_leftSwitchLeft();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}else if(m_gameElement.getSelected().equals(\"scale\")) {\n\t\t\t\tif(getGameSpecificData(\"scale\") == R) {\n\t\t\t\t\tm_autonomousCommand = new AUTO_leftScaleRight();\n\t\t\t\t}else if(getGameSpecificData(\"scale\") == L) {\n\t\t\t\t\tm_autonomousCommand = new AUTO_leftScaleLeft();\n\t\t\t\t}\n\t\t\t}else {\n\t\t\t\tm_autonomousCommand = null;\n\t\t\t}\n\t\t}\n\t\t\n\t\t/*\n\t\t * String autoSelected = SmartDashboard.getString(\"Auto Selector\",\n\t\t * \"Default\"); switch(autoSelected) { case \"My Auto\": autonomousCommand\n\t\t * = new MyAutoCommand(); break; case \"Default Auto\": default:\n\t\t * autonomousCommand = new ExampleCommand(); break; }\n\t\t */\n\n\t\tSmartDashboard.putData(\"auto command\",m_autonomousCommand);\n\t\t\n\t\t// schedule the autonomous command (example)\n\t\tif (m_autonomousCommand != null) {\n\t\t\tm_autonomousCommand.start();\n\t\t}\n\t\t\n\t\tgetSwitchColor();\n//\t\tSmartDashboard.putBoolean(\"Alliance_R\", alliance_R_SwitchState);\n//\t\tSmartDashboard.putBoolean(\"Alliance_L\", alliance_L_SwitchState);\n//\t\tSmartDashboard.putBoolean(\"Scale_R\", R_scaleState);\n//\t\tSmartDashboard.putBoolean(\"Scale_L\", L_scaleState);\n//\t\tSmartDashboard.putBoolean(\"oppisite_R\", opposite_R_SwitchState);\n//\t\tSmartDashboard.putBoolean(\"opposite_L\", opposite_L_SwitchState);\n\t\t\n\t}",
"@Override\n\tpublic void robotInit() {\n\t\toi = new OI();\n\t\t\n\t\t// chooser.addObject(\"My Auto\", new MyAutoCommand());\n\t\tSmartDashboard.putData(\"Auto mode\", chooser);\n\t\tSystem.out.println(\"I am here\");\n\t\ttopRight = new CANTalon(1);\n\t\tmiddleRight = new CANTalon(3);\n\t\tbottomRight = new CANTalon(2);\n\t\ttopLeft = new CANTalon(5);\n\t\tmiddleLeft = new CANTalon(6);\n\t\tbottomLeft = new CANTalon(7);\n\t\tclimber = new CANTalon(4);\n\t\tshifter = new DoubleSolenoid(2,3);\n\t\tshifter.set(Value.kForward);\n\t\tbucket= new DoubleSolenoid(0, 1);\n\t\tclimber.reverseOutput(true);\n\t\t//Setting Followers\n\t\t//topRight is Right Side Master (TalonSRX #1)0.062, 0.00062, 0.62)\n\t\t//middleRight.reset();\n//\t\tmiddleRight.setProfile(0);\n//\t\tmiddleRight.setPID( 0.0, 0.0, 0.0);//TODO: make multiple profiles\n\t\t\n//\t\tmiddleRight.setFeedbackDevice(FeedbackDevice.CtreMagEncoder_Absolute);\n//\t\tmiddleRight.setEncPosition(0);\n//\t\tmiddleRight.setAllowableClosedLoopErr(10);\n\t\tmiddleRight.reverseSensor(true);\n//\t\tmiddleRight.configNominalOutputVoltage(+0f, -0f);\n//\t\tmiddleRight.configPeakOutputVoltage(+12f, -12f);\n\t\ttopRight.changeControlMode(TalonControlMode.Follower);\n\t\ttopRight.set(middleRight.getDeviceID());\n\t\ttopRight.reverseOutput(true);\n\t\tbottomRight.changeControlMode(TalonControlMode.Follower); //TalonSRX #3\n\t\tbottomRight.set(middleRight.getDeviceID());\n//\t\tmiddleRight.setProfile(1);\n//\t\tmiddleRight.setPID( 0.0, 0.0, 0.0);\n\t\t//climber is the climber Motor (TalonSRX #4)\n\t\t//TopLeft is Right Side Master (TalonSRX #5)\n\t\t//middleLeft.reset();\n\t\t//middleLeft.setProfile(0);\n//\t\tmiddleLeft.setPID(0.0, 0.00, 0.0);\n//\t\tmiddleLeft.setEncPosition(0);\n//\t\tmiddleLeft.setFeedbackDevice(FeedbackDevice.CtreMagEncoder_Absolute);\n//\t\tmiddleLeft.configNominalOutputVoltage(+0f, -0f);\n//\t\tmiddleLeft.configPeakOutputVoltage(+12f, -12f);\n\t\tmiddleLeft.reverseSensor(false);\n//\t\tmiddleLeft.setAllowableClosedLoopErr(10);\n\t\ttopLeft.changeControlMode(TalonControlMode.Follower); //TalonSRX #6\n\t\ttopLeft.set(middleLeft.getDeviceID());\n\t\ttopLeft.reverseOutput(true);\n\t\tbottomLeft.changeControlMode(TalonControlMode.Follower); //TalonSRX #7\n\t\tbottomLeft.set(middleLeft.getDeviceID());\n//\t\tmiddleLeft.setProfile(1);\n//\t\tmiddleLeft.setPID(0, 0, 0);\n\t\t//Sensors\n\t\timu = new ADIS16448IMU();\n\t\tclimberSubsystem = new ClimberSubsystem();\n\t\tbucketSubsystem = new BucketSubsystem();\n\t\tdriveSubsystem = new DriveSubsystem();\n\t}",
"@Override\n\tpublic void autonomousInit() {\n\t\t//SmartDashboard.getData(\"Driver File\");\n\t\t//SmartDashboard.getData(\"Operator File\");\n\t\tautonomousCommand = chooser.getSelected();\n\t\tisAutonomous = true;\n\t\tisTeleoperated = false;\n\t\tisEnabled = true;\n\t\tRobot.numToSend = 3;\n\t\tdrivebase.resetGyro();\n\n\t\t/*\n\t\t * String autoSelected = SmartDashboard.getString(\"Auto Selector\",\n\t\t * \"Default\"); switch(autoSelected) { case \"My Auto\": autonomousCommand\n\t\t * = new MyAutoCommand(); break; case \"Default Auto\": default:\n\t\t * autonomousCommand = new ExampleCommand(); break; }\n\t\t */\n\n\t\t// schedule the autonomous command (example)\n\t\tRobot.gearManipulator.gearManipulatorPivot.setPosition(0);\n\t\tRobot.gearManipulator.gearManipulatorPivot.setSetpoint(0);\n\t\tif (autonomousCommand != null)\n\t\t\tautonomousCommand.start();\n\t}",
"@Override\n public void robotInit() {\n m_chooser.setDefaultOption(\"Default Auto\", kDefaultAuto);\n m_chooser.addOption(\"My Auto\", kCustomAuto);\n SmartDashboard.putData(\"Auto choices\", m_chooser);\n leftFrontMotor = new CANSparkMax(10, MotorType.kBrushless);\n leftBackMotor = new CANSparkMax(11, MotorType.kBrushless);\n rightFrontMotor = new CANSparkMax(12, MotorType.kBrushless);\n rightBackMotor = new CANSparkMax(13, MotorType.kBrushless);\n leftFrontMotor.setIdleMode(IdleMode.kCoast);\n leftBackMotor.setIdleMode(IdleMode.kCoast);\n rightFrontMotor.setIdleMode(IdleMode.kCoast);\n rightBackMotor.setIdleMode(IdleMode.kCoast);\n gyro = new ADXRS450_Gyro();\n gyro.calibrate();\n stick = new Joystick(1);\n controller = new XboxController(0);\n origGyro = 0;\n }",
"@Override\r\n\tpublic void autonomous() {\n\r\n\t\tint autoMode = -1;\r\n\t\t\r\n\t\tif (!switch1.get() && !switch2.get() && !switch3.get()) {\r\n\t\t\t//if all the switches are off\r\n\t\t\tautoMode = 0;\r\n\t\t} else if (switch1.get() && !switch2.get() && !switch3.get()) {\r\n\t\t\tautoMode = 1;\r\n\t\t} else if (!switch1.get() && switch2.get() && !switch3.get()) {\r\n\t\t\tautoMode = 2;\r\n\t\t} else if (switch1.get() && switch2.get() && !switch3.get()) {\r\n\t\t\tautoMode = 3;\r\n\t\t}\r\n\r\n\t\tautotime.start();\r\n\r\n\t\t// double[] wheelSpeeds = new double[2];\r\n\t\t// double[] startCoords = {0, 0, Math.PI / 2};\r\n\t\t// double[] endCoords = {0, 1, Math.PI / 2};\r\n\t\t// AutoPath pathAuto = new AutoPath(startCoords, endCoords,\r\n\t\t// ahrs.getAngle());\r\n\t\t//\r\n\t\t// int i = 0;\r\n\t\t// boolean successfullyGrabbedRectangles = false;\r\n\t\t\r\n\t\tboolean shotGear = false;\r\n\t\t//boolean hasBackedUp = false;\r\n\t\twhile (isAutonomous() && isEnabled()) {\r\n\t\t\t// auto.drive(autoMode);\r\n\r\n\t\t\t// while(autotime.get() < 3) {\r\n\t\t\t// drive.drive(-0.9, -0.9);\r\n\t\t\t// }\r\n\r\n\t\t\t// grab the current switch status\r\n\r\n\t\t\tswitch (autoMode) {\r\n\t\t\tcase 0:\r\n\t\t\t\t//Mark: Drive forward\r\n\r\n\t\t\t\tif (autotime.get() < 3) {\r\n\t\t\t\t\tdrive.drive(-0.9, -0.9);\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase 1:\r\n\t\t\t\t// Mark: Drive Forward, NO turning, and shoot gear onto peg\r\n\r\n\t\t\t\tif (autotime.get() < 3) {\r\n\t\t\t\t\tdrive.drive(-0.75, -0.75);\r\n\t\t\t\t} else if(!shotGear) {\r\n\t\t\t\t\t// shoot the gear onto the peg\r\n\t\t\t\t\tgearOutput.autoOutput();\r\n\t\t\t\t\tshotGear = true;\r\n\t\t\t\t}else if(autotime.get() < 3.67) {\r\n\t\t\t\t\tdrive.drive(0.50, 0.50);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tdrive.drive(0,0);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tbreak;\r\n\t\t\tcase 2:\r\n\t\t\t\t//Mark: start LEFT of center, drive forward, turn -60 degrees, drive forward, shoot gear on peg\r\n\t\t\t\tif (autotime.get() < 2) {\r\n\t\t\t\t\tdrive.drive(-0.75, -0.75);\r\n\t\t\t\t} else if (autotime.get() < 2.5) {\r\n\t\t\t\t\tdrive.drive(1, 0);\r\n\t\t\t\t}else if(autotime.get() < 3.5) { \r\n\t\t\t\t\tdrive.drive(-.75,-.75);\r\n\t\t\t\t} else if (!shotGear) {\r\n\t\t\t\t\tgearOutput.autoOutput();\r\n\t\t\t\t\tshotGear = true;\r\n\t\t\t\t}else if(autotime.get() < 4.5) {\r\n\t\t\t\t\tdrive.drive(0.75, 0.75);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tdrive.drive(0,0);\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase 3:\r\n\t\t\t\t//Mark: start RIGHT of center, drive forward, turn 60 degrees, drive forward, shoot gear on peg\r\n\t\t\t\tif (autotime.get() < 2) {\r\n\t\t\t\t\tdrive.drive(-0.75, -0.75);\r\n\t\t\t\t} else if (autotime.get() < 2.25) {\r\n\t\t\t\t\tdrive.drive(0, 1);\r\n\t\t\t\t}else if(autotime.get() < 4) { \r\n\t\t\t\t\tdrive.drive(-.75,-.75);\r\n\t\t\t\t} else if (!shotGear) {\r\n\t\t\t\t\tgearOutput.autoOutput();\r\n\t\t\t\t\tshotGear = true;\r\n\t\t\t\t}else if(autotime.get() < 4.5) {\r\n\t\t\t\t\tdrive.drive(0.75, 0.75);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tdrive.drive(0,0);\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\t// if(!successfullyGrabbedRectangles) {\r\n\t\t\t// Rectangle[] targets = grabRectangles();\r\n\t\t\t//\r\n\t\t\t//// System.out.println(\"-----\");\r\n\t\t\t//// for(Rectangle r : testing) {\r\n\t\t\t//// System.out.println(r.getArea());\r\n\t\t\t//// }\r\n\t\t\t//// System.out.println(\"-----\");\r\n\t\t\t//\r\n\t\t\t// if(targets[0].getArea() == 0) {\r\n\t\t\t// //since grabRectangles returns 1 rectangle with area of 0, so if\r\n\t\t\t// one of the area's\r\n\t\t\t// //equals 0, then it was a failed response\r\n\t\t\t// successfullyGrabbedRectangles = false;\r\n\t\t\t// }else{\r\n\t\t\t//\r\n\t\t\t// successfullyGrabbedRectangles = true;\r\n\t\t\t//\r\n\t\t\t// //call auto path to get the wheel speeds from the rectangle\r\n\t\t\t// pathAuto.makeNewPath(targets[0].getWidth(),\r\n\t\t\t// targets[1].getWidth(), targets[0].getXPos() - 240,\r\n\t\t\t// targets[1].getXPos() - 240, ahrs.getAngle());\r\n\t\t\t// //drive.drive(wheelSpeeds[0], wheelSpeeds[1]);\r\n\t\t\t//\r\n\t\t\t// }\r\n\t\t\t// }else{\r\n\t\t\t// //drive.drive(0,0);\r\n\t\t\t//\r\n\t\t\t// double[] wheelSpeedsFromPath = pathAuto.getWheelSpeeds(.4); //the\r\n\t\t\t// .4 doesn't mean anything at all; Beitel is just weird :^)\r\n\t\t\t// drive.drive(wheelSpeedsFromPath[0], wheelSpeedsFromPath[1]);\r\n\t\t\t// //System.out.println(\"Left:\" + wheelSpeedsFromPath[0]);\r\n\t\t\t// //System.out.println(\"Right: \" + wheelSpeedsFromPath[1]);\r\n\t\t\t// }\r\n\r\n\t\t}\r\n\t\t\r\n\t}",
"@Override\n public void autonomousInit()\n {\n autonomousCommand = chooser.getSelected();\n \n /*\n * String autoSelected = SmartDashboard.getString(\"Auto Selector\",\n * \"Default\"); switch(autoSelected) { case \"My Auto\": autonomousCommand\n * = new MyAutoCommand(); break; case \"Default Auto\": default:\n * autonomousCommand = new ExampleCommand(); break; }\n */\n \n // schedule the autonomous command (example)\n if (autonomousCommand != null) \n {\n autonomousCommand.start();\n }\n }",
"@Override\n public void autonomousInit() {\n //ds.set(Value.kForward);\n /*m_autonomousCommand = m_chooser.getSelected();\n\n /*\n * String autoSelected = SmartDashboard.getString(\"Auto Selector\",\n * \"Default\"); switch(autoSelected) { case \"My Auto\": autonomousCommand\n * = new MyAutoCommand(); break; case \"Default Auto\": default:\n * autonomousCommand = new ExampleCommand(); break; }\n * \n */\n\n // schedule the autonomous command (example)\n /*if (m_autonomousCommand != null) {\n m_autonomousCommand.start();\n }*/\n //new VisionProcess().start();\n //SmartDashboard.putNumber(\"heerer\", value)\n new TeleOpCommands().start();\n }",
"@Override\n public void autonomousInit() {\n m_autoSelected = m_chooser.getSelected();\n // m_autoSelected = SmartDashboard.getString(\"Auto Selector\", kDefaultAuto);\n System.out.println(\"Auto selected: \" + m_autoSelected);\n }",
"@Override\n public void autonomousInit() {\n m_autoSelected = m_chooser.getSelected();\n // m_autoSelected = SmartDashboard.getString(\"Auto Selector\", kDefaultAuto);\n System.out.println(\"Auto selected: \" + m_autoSelected);\n }",
"@Override\n public void autonomousInit() {\n m_autoSelected = m_chooser.getSelected();\n // m_autoSelected = SmartDashboard.getString(\"Auto Selector\", kDefaultAuto);\n System.out.println(\"Auto selected: \" + m_autoSelected);\n }",
"@Override\n public void autonomousInit() {\n m_autoSelected = m_chooser.getSelected();\n // m_autoSelected = SmartDashboard.getString(\"Auto Selector\", kDefaultAuto);\n System.out.println(\"Auto selected: \" + m_autoSelected);\n }",
"@Override\n public void robotInit()\n {\n wireUpOperatorInterface();\n chooser.setDefaultOption(\"Default Auto\", driveCommand);\n // chooser.addOption(\"My Auto\", new MyAutoCommand());\n SmartDashboard.putData(\"Auto mode\", chooser);\n }",
"@Override\n public void autonomousInit() {\n\tgameData.readGameData();\n\tautonomousCommand = (Command) chooserMode.getSelected();\n\tdriveSubsystem.resetEncoders();\n\televatorSubsystem.resetEncoder();\n\t// schedule the autonomous command\n\tif (autonomousCommand != null) {\n\t // SmartDashboard.putString(\"i\", \"nit\");\n\t autonomousCommand.start();\n\t}\n }",
"public static void driveMode(){\n\n\t\tSmartDashboard.putBoolean(\"Is Climbing:\", TalonDio.climbEncodDio(Actuators.getClimbMotor()));\n\t\tSmartDashboard.putBoolean(\"Is Driving:\", TalonDio.driveEncodDio(Actuators.getLeftDriveMotor(), Actuators.getRightDriveMotor()));\n\t\tSmartDashboard.putBoolean(\"Is Intake Disabled:\", Intake.intakeDisabled);\n\t\tSmartDashboard.putNumber(\"motorSpeed\", Intake.intakeMotorSpeed);\n\t\tSmartDashboard.putNumber(\"conveyorMotorSpeed\", Score.conveyorMotorSpeed);\n\t\tSmartDashboard.putBoolean(\"Intake Motor Inverted?:\", Actuators.getFuelIntakeMotor().getInverted());\n\t\tSmartDashboard.putBoolean(\"Is Climbing Motor Stalling:\", TalonDio.CIMStall(Actuators.getClimbMotor()));\n\n\t\t\n\n\t\tSmartDashboard.putBoolean(\"Is Climbing:\", TalonDio.climbEncodDio(Actuators.getClimbMotor()));\n\t\tSmartDashboard.putBoolean(\"Is Driving:\", TalonDio.driveEncodDio(Actuators.getLeftDriveMotor(), Actuators.getRightDriveMotor()));\n\t\tSmartDashboard.putBoolean(\"Is Climbing Motor Stalling:\", TalonDio.CIMStall(Actuators.getClimbMotor()));\n\t\tSmartDashboard.putNumber(\"Total Current Draw:\", SensorsDio.PDPCurrent(Sensors.getPowerDistro()));\n\n\t\n\t//TODO: Add Gear Vibrations for both controllers\n\t//Vibration Feedback\n\t\t//Sets the Secondary to vibrate if climbing motor is going to stall\n\t\tVibrations.climbStallVibrate(Constants.MAX_RUMBLE);\t\n\t\t//If within the second of TIME_RUMBLE then both controllers are set to HALF_RUMBLE\n\t\tVibrations.timeLeftVibrate(Constants.HALF_RUMBLE, Constants.TIME_RUMBLE);\t\n\t\t\n\t}",
"@Override\n\tpublic void autonomousInit() {\n\t\tm_autoSelected = m_chooser.getSelected();\n//\t\t m_autoSelected = SmartDashboard.getString(\"Auto Selector\",\n//\t\t \t\tkDefaultAuto);\n\t\tSystem.out.println(\"Auto selected: \" + m_autoSelected);\n\t}",
"@Override\n\tpublic void robotInit() {\n\t\tm_chooser.addDefault(\"Default Auto\", kDefaultAuto);\n\t\tm_chooser.addObject(\"My Auto\", kCustomAuto);\n\t\tSmartDashboard.putData(\"Auto choices\", m_chooser);\n\t\t\n\t\ttalonMotor10.setNeutralMode(NeutralMode.Brake);\n\t\ttalonMotor11.setNeutralMode(NeutralMode.Brake);\n\t\ttalonMotor12.setNeutralMode(NeutralMode.Brake);\n\t\ttalonMotor13.setNeutralMode(NeutralMode.Brake);\n\t\ttalonMotor14.setNeutralMode(NeutralMode.Brake);\n\t\ttalonMotor15.setNeutralMode(NeutralMode.Brake);\n\t}",
"@Override\n public void autonomousInit() {\n //Diagnostics.writeString(\"State\", \"AUTO\");\n //m_autonomousCommand = m_chooser.getSelected();\n\n /*\n * String autoSelected = SmartDashboard.getString(\"Auto Selector\", \"Default\");\n * switch(autoSelected) { case \"My Auto\": autonomousCommand = new\n * MyAutoCommand(); break; case \"Default Auto\": default: autonomousCommand = new\n * ExampleCommand(); break; }\n */\n\n // schedule the autonomous command (example)\n /*if (m_autonomousCommand != null) {\n m_autonomousCommand.start();\n }*/\n\n teleopInit();\n }",
"private void initializeDashboard() {\n\t// Autonomous control\n\tchooserMode.addDefault(ROCK, new MartianRock());\n\tchooserMode.addObject(SWITCH, new SwitchAuto());\n\tchooserMode.addObject(SCALE, new ScaleAuto());\n\tchooserMode.addObject(AUTO_LINE, new AutoLine());\n\t// chooserMode.setName(\"Choose Mode\");\n\n\tchooserPosition.addDefault(\"Center\", CENTER);\n\tchooserPosition.addObject(\"Left\", LEFT);\n\tchooserPosition.addObject(\"Right\", RIGHT);\n\n\tchooserCrossSide.addDefault(\"Allow crossing\", YES);\n\tchooserCrossSide.addObject(\"Don't allow crossing\", NO);\n\n\toldVersion.addDefault(\"2 cube scale\", NO);\n\toldVersion.addObject(\"Orlando scale\", YES);\n\t// SmartDashboard.putBoolean(\"Cross to other Side\", chooseCross);\n\n\t// SmartDashboard.putData(AUTO_MODE_LABEL, chooser);\n\tSmartDashboard.putData(\"Auto Mode\", chooserMode);\n\tSmartDashboard.putData(\"Start Position\", chooserPosition);\n\tSmartDashboard.putData(\"Allow Cross Side?\", chooserCrossSide);\n\tSmartDashboard.putData(\"Orlando scale\", oldVersion);\n\tSmartDashboard.putBoolean(\"Enable processing\", true);\n\t// SmartDashboard.putData(\"Run switch\", new SwitchAuto());\n\t// SmartDashboard.putData(\"Run scale\", new ScaleAuto());\n\t/*\n\t * // Configuration fields // SmartDashboard.putNumber(ELEVATOR_SPEED_LABEL,\n\t * .9); // SmartDashboard.putNumber(\"ELevator speed down\", .75); //\n\t * SmartDashboard.putNumber(\"Elevator nuetral speed\", .15);\n\t * \n\t * // Diagnostic data // updateDiagnostics();\n\t * \n\t * // Command buttons for one-time execution\n\t */\n\t// SmartDashboard.putData(DRIVE_FORWARD_FIVE_FEET_LABEL, new DriveForward(60));\n\t/*\n\t * 0.6)); SmartDashboard.putData(TURN_LEFT_LABEL, new TurnLeft(90));\n\t * SmartDashboard.putData(TURN_RIGHT_LABEL, new TurnRight(90));\n\t */\n\t// SmartDashboard.putData(\"Left 45\", new TurnLeft(45));\n\t// SmartDashboard.putData(\"Left 90\", new TurnLeft(90));\n\t/*\n\t * SmartDashboard.putData(\"Right 45\", new TurnRight(45));\n\t * SmartDashboard.putData(STOP_LABEL, new Stop());\n\t * SmartDashboard.putData(MOVE_FROM_WALL, new DriveDistanceFromWall(558));\n\t * SmartDashboard.putData(DRIVE_TO_CUBE, new DriveToCubeTeleop());\n\t * SmartDashboard.putData(\"Elevator to -500\", new SetElevator(-500));\n\t * SmartDashboard.putData(\"Reset elevator\", new SetElevator(0));\n\t * SmartDashboard.putData(\"Shift arms\", new ShiftArms());\n\t * SmartDashboard.putData(\"Drive back\", new DriveForward(12, -.75));\n\t */\n\tSmartDashboard.putData(\"Latch chain\", new BreakChain());\n\t/*\n\t * SmartDashboard.putData(\"Turn left without pid\", new TurnLeftWithoutPid(90));\n\t */\n\t// SmartDashboard.putData(\"Autonomous cube\", new\n\t// DriveToCubeAuto(CubeVisionThread.SelectorType.bottom, 1));\n\t// SmartDashboard.putNumber(\"P\", -.1);\n\t// SmartDashboard.putNumber(\"D\", -.05);\n\t// SmartDashboard.putNumber(\"I\", -.0);\n\t// SmartDashboard.putString(\"Override\", \"Don't override\");\n }",
"@Override\n\tpublic void autonomousInit() {\n\t\tm_autoSelected = m_chooser.getSelected();\n\t\t// m_autoSelected = SmartDashboard.getString(\"Auto Selector\", kDefaultAuto);\n\t\tSystem.out.println(\"Auto selected: \" + m_autoSelected);\n\t}",
"@Override\n\tpublic void autonomousInit() {\n\t\tm_autoSelected = m_chooser.getSelected();\n\t\t// m_autoSelected = SmartDashboard.getString(\"Auto Selector\", kDefaultAuto);\n\t\tSystem.out.println(\"Auto selected: \" + m_autoSelected);\n\t}",
"@Override\n\tpublic void robotInit() {\n\t\toi = new OI();\n\t\tdrivebase.calibrateGyro();\n\t\tSmartDashboard.putData(\"Zero Gyro\", new ZeroGyro());\n\t\tSmartDashboard.putData(\"Calibrate Gyro - WHILE ROBOT NOT MOVING\", new CalibrateGyro());\n\t\tchooser.addDefault(\"Default Prepare Gear Auto\", new PrepareGearManipulator());\n\t\t//shooterModeChooser.addDefault(\"Shooter at Nominal Preset when Pressed\", object);\n\t\t/*chooser.addObject(\"Left Gear Auto\", new LeftGearGroup());\n\t\tchooser.addObject(\"Center Gear Auto\", new CenterGearGroup());*/\n\t//\tchooser.addObject(\"Test Vision Auto\", new TurnTillPerpVision(true));\n\t//\tchooser.addObject(\"Testing turn gyro\", new RotateToGyroAngle(90,4));\n\t\t//chooser.addObject(\"DriveStraightTest\", new GoAndReturn());\n\t\t //UNNECESSARY AUTOS FOR TESTING ^\n\t\tchooser.addObject(\"Center Gear Encoder Auto (place)\", new DriveStraightCenter());\n\t\tchooser.addObject(\"Vision center TESTING!!!\", new TurnTillPerpVision());\n\t\tchooser.addObject(\"Boiler Auto RED\", new BoilerAuto(true));\n\t\tchooser.addObject(\"Boiler Auto BLUE\", new BoilerAuto(false));\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t//\tchooser.addObject(\"Center Gear Encoder Auto (do not place )\", new DriveToFace(false, false, false));\n\t\tchooser.addObject(\"Baseline\", new DriveToLeftRightFace(false,false,false,false));\n\t\tchooser.addObject(\"TEST DRIVETANK AUTO\", new DriveTimedTank(0.7,0.7,5));\n\t\tchooser.addObject(\"Side Gear Auto RIGHT (manual straight lineup)(place)(TURN AFTER AND START CYCLE)\", new DriveStraightSide(true,false));\n\n\t\tchooser.addObject(\"Side Gear Auto LEFT (manual straight lineup)(place)(TURN AFTER AND START CYCLE)\", new DriveStraightSide(true,true));\n\t\t//chooser.addObject(\"Side Gear Auto (place)\", new DriveToLeftRightFace(true,false,false,false));\n\t\t//chooser.addObject(\"Test DriveStraight Auto\", new DriveStraightPosition(10,5));\n\t\t//chooser.addObject(\"Center Gear Encoder Auto (place)\", new DriveStraightCenter());\n\t\t/*InterpreterGroup interp = new InterpreterGroup();\n\t\t(interp.init()){\n\t\t\tchooser.addObject(\"Interpreter\",interp);\n\t\t}*/\n\t\t// chooser.addObject(\"My Auto\", new MyAutoCommand());\n\t\tSmartDashboard.putData(\"Auto Chooser\", chooser);\n\n\t\tRobot.drivebase.leftDrive1.setPosition(0);\n \tRobot.drivebase.rightDrive1.setPosition(0);\n \t\n\t\t\n \tRobot.leds.initializei2cBus();\n \tbyte mode = 0;\n \tRobot.leds.setMode(mode);\n \tgearcamera = CameraServer.getInstance();\n\t\t\n \tUsbCamera gearUsb = gearcamera.startAutomaticCapture();\n \tgearUsb.setFPS(25);\n \tgearUsb.setResolution(256, 144);\n\n\t\t//NetworkTable.setClientMode();\n \t//NetworkTable.setIPAddress(\"raspberrypi.local\");\n\t\t\n\t\t\n\t\t/*\n\t\t * new Thread(() -> { UsbCamera goalcamera =\n\t\t * CameraServer.getInstance().startAutomaticCapture();\n\t\t * goalcamera.setResolution(320, 240); goalcamera.setFPS(30);\n\t\t * goalcamera.setBrightness(1); goalcamera.setExposureManual(1);\n\t\t * \n\t\t * CvSink goalCvSink = CameraServer.getInstance().getVideo();\n\t\t * \n\t\t * Mat source = new Mat();\n\t\t * \n\t\t * while(!Thread.interrupted()) { goalCvSink.grabFrame(source);\n\t\t * goaloutputmat = source; } }).start();\n\t\t * goalPipeline.process(goaloutputmat);\n\t\t * \n\t\t * new Thread(() -> { UsbCamera gearcamera =\n\t\t * CameraServer.getInstance().startAutomaticCapture();\n\t\t * gearcamera.setResolution(320, 240); gearcamera.setFPS(30);\n\t\t * gearcamera.setBrightness(1); gearcamera.setExposureManual(1);\n\t\t * \n\t\t * CvSink gearCvSink = CameraServer.getInstance().getVideo();\n\t\t * \n\t\t * Mat source = new Mat();\n\t\t * \n\t\t * while(!Thread.interrupted()) { gearCvSink.grabFrame(source);\n\t\t * gearoutputmat = source; } }).start();\n\t\t * gearPipeline.process(gearoutputmat);\n\t\t */\n\t}",
"@Override\n public void robotInit() {\n m_chooser.setDefaultOption(\"Default Auto\", kDefaultAuto);\n m_chooser.addOption(\"My Auto\", kCustomAuto);\n SmartDashboard.putData(\"Auto choices\", m_chooser);\n //starts the dual cameras\n CameraServer.getInstance().startAutomaticCapture(0);\n CameraServer.getInstance().startAutomaticCapture(1);\n //auto start (disabled atm)\n //pressBoy.setClosedLoopControl(true);\n pressBoy.setClosedLoopControl(false);\n \n \n }",
"@Override\n public void robotInit() {\n m_chooser.setDefaultOption(\"Default Auto\", kDefaultAuto);\n m_chooser.addOption(\"My Auto\", kCustomAuto);\n SmartDashboard.putData(\"Auto choices\", m_chooser);\n\n /* lets grab the 360 degree position of the MagEncoder's absolute position */\n /* mask out the bottom12 bits, we don't care about the wrap arounds */ \n\t\tint absolutePosition = elevator.getSelectedSensorPosition(0) & 0xFFF;\n \n /* use the low level API to set the quad encoder signal */\n elevator.setSelectedSensorPosition(absolutePosition, Constants.kPIDLoopIdx, Constants.kTimeoutMs);\n\n /* choose the sensor and sensor direction */\n elevator.configSelectedFeedbackSensor(FeedbackDevice.CTRE_MagEncoder_Relative, \n Constants.kPIDLoopIdx, Constants.kTimeoutMs);\n\n /* Ensure sensor is positive when output is positive */\n elevator.setSensorPhase(false);\n\n /**\n * Set based on what direction you want forward/positive to be.\n * This does not affect sensor phase. \n */ \n //elevator.setInverted(Constants.kMotorInvert);\n \n /* Config the peak and nominal outputs, 12V means full */\n elevator.configNominalOutputForward(0, Constants.kTimeoutMs);\n elevator.configNominalOutputReverse(0, Constants.kTimeoutMs);\n //elevator.configPeakOutputForward(1, Constants.kTimeoutMs);\n elevator.configNominalOutputForward(0.5);\n //elevator.configPeakOutputForward(1, Constants.kTimeoutMs);\n elevator.configPeakOutputForward(0.5);\n elevator.configPeakOutputReverse(-1, Constants.kTimeoutMs);\n \n /**\n * Config the allowable closed-loop error, Closed-Loop output will be\n * neutral within this range. See Table in Section 17.2.1 for native\n * units per rotation.\n */\n //elevator.configAllowableClosedloopError(0, Constants.kPIDLoopIdx, Constants.kTimeoutMs);\n \n /* Config Position Closed Loop gains in slot0, typically kF stays zero. */\n elevator.config_kF(Constants.kPIDLoopIdx, 0.0, Constants.kTimeoutMs);\n elevator.config_kP(Constants.kPIDLoopIdx, 0.5, Constants.kTimeoutMs);\n elevator.config_kI(Constants.kPIDLoopIdx, 0.0, Constants.kTimeoutMs);\n elevator.config_kD(Constants.kPIDLoopIdx, 0.0, Constants.kTimeoutMs);\n\n\n }",
"@Override\n\tpublic void autonomousInit() {\n\t\tvision_.startGearLiftTracker(15);\n\t\tgyro_.reset();\n\t\tautoCommand = (Command) autoChooser.getSelected();\n\t\tif(autoCommand != null)\n\t\t{\n\t\t\tautoCommand.start();\n\t\t}\n\t}",
"@Override\n public void robotInit() {\n m_oi = new OI();\n m_chooser.setDefaultOption(\"Default Auto\", new ExampleCommand());\n // chooser.addOption(\"My Auto\", new MyAutoCommand());\n SmartDashboard.putData(\"Auto mode\", m_chooser);\n\n Comp = new Compressor();\n\n //ClimbBack = new DoubleSolenoid(PCM_COMP_24V, 0, 1);\n //ClimbFront = new DoubleSolenoid(PCM_COMP_24V, 2, 3);\n LegFrontL = new VictorSPX(30);\n LegFrontR = new Spark(9);\n LegBackL = new VictorSPX(31);\n LegBackR = new VictorSPX(32);\n\n BackFootMover = new VictorSP(1);\n FrontFootMover = new Spark(2);\n //FeetMovers = new SpeedControllerGroup(BackFootMoverFootMover);\n\n MainRight = new CANSparkMax(9, MotorType.kBrushless);\n AltRight = new CANSparkMax(10, MotorType.kBrushless);\n MainLeft = new CANSparkMax(11, MotorType.kBrushless);\n AltLeft = new CANSparkMax(12, MotorType.kBrushless);\n\n MainRight.setIdleMode(IdleMode.kCoast);\n AltRight.setIdleMode(IdleMode.kCoast);\n MainLeft.setIdleMode(IdleMode.kCoast);\n AltLeft.setIdleMode(IdleMode.kCoast);\n\n AltLeft.follow(MainLeft);\n AltRight.follow(MainRight);\n\n Drive = new DifferentialDrive(MainLeft, MainRight);\n\n Lifter = new TalonSRX(6);\n Lifter.setNeutralMode(NeutralMode.Brake);\n Lifter.enableCurrentLimit(false);\n /*Lifter.configContinuousCurrentLimit(40);\n Lifter.configPeakCurrentLimit(50);\n Lifter.configPeakCurrentDuration(1500);*/\n //Lifter.configReverseSoftLimitEnable(true);\n //Lifter.configReverseSoftLimitThreshold(-27000);\n //Lifter.configForwardLimitSwitchSource(LimitSwitchSource.FeedbackConnector, LimitSwitchNormal.NormallyOpen);\n //Lifter.configClearPositionOnLimitF(true, 0);\n Lifter.selectProfileSlot(0, 0);\n LiftSetpoint = 0;\n\n LiftFollower = new TalonSRX(5);\n LiftFollower.follow(Lifter);\n LiftFollower.setNeutralMode(NeutralMode.Brake);\n\n ArmExtender = new Solenoid(0);\n ArmOpener = new Solenoid(1);\n ArmGrippers = new Spark(0);\n\n HatchSwitch0 = new DigitalInput(0);\n HatchSwitch1 = new DigitalInput(1);\n\n Accel = new BuiltInAccelerometer(Range.k2G);\n\n //Diagnostics = new DiagnosticsLogger();\n // Uncomment this line to enable diagnostics. Warning: this may\n // cause the robot to be slower than it is supposed to be because of lag.\n //Diagnostics.start();\n\n xbox = new XboxController(0);\n joystick = new Joystick(1);\n \n LiftRamp = new SRamp();\n SpeedRamp = new SRamp();\n\n NetworkTableInstance nt = NetworkTableInstance.getDefault();\n\n VisionTable = nt.getTable(\"ChickenVision\");\n TapeDetectedEntry = VisionTable.getEntry(\"tapeDetected\");\n TapePitchEntry = VisionTable.getEntry(\"tapePitch\");\n TapeYawEntry = VisionTable.getEntry(\"tapeYaw\");\n\n LedTable = nt.getTable(\"LedInfo\");\n LedScript = LedTable.getEntry(\"CurrentScript\");\n LedScriptArgument = LedTable.getEntry(\"ScriptArgument\");\n LedArmsClosed = LedTable.getEntry(\"ArmsClosed\");\n\n UsbCamera cam = CameraServer.getInstance().startAutomaticCapture();\n cam.setPixelFormat(PixelFormat.kMJPEG);\n cam.setResolution(320, 240);\n cam.setFPS(15);\n \n\n LedScript.setString(\"ColorWaves\");\n LedScriptArgument.setString(\"\");\n\n limits = new DigitalInput[8];\n\n for (int i = 0; i < limits.length; i++) {\n limits[i] = new DigitalInput(i + 2);\n }\n }",
"public int switch_modes() {\r\n //when angle modes is selected power field is disabled\r\n if(angle_radio.isArmed()){\r\n power_combo.setDisable(true);\r\n power_combo.setOpacity(.5);\r\n }\r\n //Power Field is necessary for Powers mode\r\n else if(power_radio.isArmed()){\r\n power_combo.setDisable(false);\r\n power_combo.setOpacity(1);\r\n }\r\n //when Angle sum mode is selected power field is disabled\r\n else if(sum_radio.isArmed()){\r\n power_combo.setDisable(true);\r\n power_combo.setOpacity(.5);\r\n }\r\n //Returning values to switch whole Program's mode based on Radio buttons\r\n if(angle_radio.isSelected()) return -1;\r\n else if(power_radio.isSelected()) return -2;\r\n else if(sum_radio.isSelected()) return -3;\r\n return 0;\r\n }",
"public void autonomousInit() {\n Jagbot.isAutonomous = true;\n int mode = (int)SmartDashboard.getNumber(RobotMap.Autonomous.MODE_KEY);\n switch (mode) {\n case 0:\n System.out.println(\"Standing still\");\n new StandStill().start();\n break;\n case 1:\n System.out.println(\"Driving forward\");\n new DriveStraight(1).start();\n break;\n \n case 2:\n System.out.println(\"Turning left and shooting to score\");\n new TurnAndScore(-1).start();\n break;\n case 3:\n System.out.println(\"Turning right and shooting to score\");\n new TurnAndScore(1).start();\n break;\n }\n }",
"@Override\n public void autonomousInit() {\n m_autoSelected = m_chooser.getSelected();\n // m_autoSelected = SmartDashboard.getString(\"Auto Selector\", kDefaultAuto);\n System.out.println(\"Auto selected: \" + m_autoSelected);\n\n Intake.getInstance().releaseHatch();\n }",
"@Override\r\n\tpublic String getSmartDashboardType() {\r\n\t\treturn \"Gyro\";\r\n\t}",
"public void autonomousInit() {\n\t\tswitch (autoMode) {\r\n\t\tcase 0:\r\n\t\t\tauto = new G_NoAuto();\r\n\t\t\tbreak;\r\n\t\tcase 1:\r\n\t\t\tauto = new G_Step();\r\n\t\t\tbreak;\r\n\t\tcase 2:\r\n\t\t\tauto = new G_BlockThenFour();\r\n\t\t\tbreak;\r\n\t\tcase 3:\r\n\t\t\tauto = new G_BinTwoLeft();\r\n\t\t\tbreak;\r\n\t\tcase 4:\r\n\t\t\tauto = new G_StepBinCentre();\r\n\t\t\tbreak;\r\n\t\tcase 5:\r\n\t\t\tauto = new G_StepBinLeft();\t\r\n\t\t\tbreak;\r\n\t\tcase 6:\r\n\t\t\tauto = new G_Block();\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\t//Start the chosen Autonomous command. \r\n\t\tauto.start();\r\n\t\t//Cancel the tele-op command, in case it was running before autonomous began. \r\n\t\tteleop.cancel();\r\n\t\t// Start pushing sensor readings to the SD.\r\n\t\treadings.start();\r\n\r\n\t}",
"@Override\n\tpublic void robotInit() {\n\t\tm_chooser.setDefaultOption(\"Default Auto\", kDefaultAuto);\n\t\tm_chooser.addOption(\"My Auto\", kCustomAuto);\n\t\tSmartDashboard.putData(\"Auto choices\", m_chooser);\n\n\t\tJoy = new Joystick(0);\n\t\ts1 = new DoubleSolenoid(1, 0);\n\t\ts2 = new DoubleSolenoid(2, 3);\n\t\tairCompressor = new Compressor();\n\t\ttriggerValue = false;\n\t\ts1Value = false;\n\t}",
"@Override\n public void robotInit() {\n m_chooser.setDefaultOption(\"Default Auto\", kDefaultAuto);\n m_chooser.addOption(\"My Auto\", kCustomAuto);\n SmartDashboard.putData(\"Auto choices\", m_chooser);\n \n //Initialize Drive Train Motors/\n LeftFront = new WPI_TalonSRX(11);\n RightFront = new WPI_TalonSRX(13);\n LeftBack = new WPI_TalonSRX(10);\n RightBack = new WPI_TalonSRX(12);\n RobotDT = new MecanumDrive(LeftFront, LeftBack, RightFront, RightBack);\n \n //Initialize Xbox Controller or Joystick/\n xcontroller1 = new XboxController(0);\n xcontroller2 = new XboxController(1);\n \n //Initialize Cameras/\n RoboCam = CameraServer.getInstance();\n FrontCamera = RoboCam.startAutomaticCapture(0);\n BackCamera = RoboCam.startAutomaticCapture(1);\n\n //GPM Init/\n mGPM = new GPM();\n \n }",
"@Override\n\tpublic void robotInit() {\n\t\tprefs = Preferences.getInstance();\n\t\tDEBUG = prefs.getBoolean(\"DEBUG\", false);\n\t\t\n\t\tinitCamera(\"Primary Camera\", 0);\n\t\tinitCamera(\"Secondary Camera\", 1);\n\t\t\n\t\tRobotMap.robotDriveMain = new DifferentialDrive(RobotMap.leftDrive, RobotMap.rightDrive);\n\t\t\n\t\tautoChooser.setDefaultOption(\"Left\", \"left\");\n\t\tautoChooser.addOption(\"Middle\", \"middle\");\n\t\tautoChooser.addOption(\"Right\", \"right\");\n\t\t\n\t\tSmartDashboard.putData(\"Auto Mode:\", autoChooser);\n\t}",
"public void autonomousInit(){\n\t \t//resetAndDisableSystems();\n\t\t \n\t \tautonomousCommand = (Command) autoChooser.getSelected();\n\t \tautonomousCommand.start();\n\t \t\n\t \t\n\t }",
"@Override\n public void autonomousPeriodic() {\n \n //Switch is used to switch the autonomous code to whatever was chosen\n // on your dashboard.\n //Make sure to add the options under m_chooser in robotInit.\n switch (m_autoSelected) {\n case kCustomAuto:\n // Put custom auto code here\n break;\n case kDefaultAuto:\n default:\n if (m_timer.get() < 2.0){\n m_driveTrain.arcadeDrive(0.5, 0); //drive forward at half-speed\n } else {\n m_driveTrain.stopMotor(); //stops motors once 2 seconds have elapsed\n }\n break;\n }\n }",
"public void robotInit() {\n chooser = new SendableChooser();\n chooser.addDefault(\"Default Auto\", defaultAuto);\n chooser.addObject(\"My Auto\", customAuto);\n SmartDashboard.putData(\"Auto choices\", chooser);\n\n initialize();\n }",
"@Override\n public void autonomousInit() {\n\n Robot.m_driveTrain.driveTrainLeftFrontMotor.setSelectedSensorPosition(0);\n Robot.m_driveTrain.driveTrainRightFrontMotor.setSelectedSensorPosition(0);\n Robot.m_driveTrain.driveTrainRightRearMotor.setSelectedSensorPosition(0);\n Robot.m_driveTrain.driveTrainLeftRearMotor.setSelectedSensorPosition(0);\n\n /*\n * String autoSelected = SmartDashboard.getString(\"Auto Selector\",\n * \"Default\"); switch(autoSelected) { case \"My Auto\": autonomousCommand\n * = new MyAutoCommand(); break; case \"Default Auto\": default:\n * autonomousCommand = new ExampleCommand(); break; }\n */\n\n // schedule the autonomous command (example)\n }",
"public void robotInit() {\n chooser = new SendableChooser();\n chooser.addDefault(\"Default Auto\", defaultAuto);\n chooser.addObject(\"My Auto\", customAuto);\n SmartDashboard.putData(\"Auto choices\", chooser);\n \n // camera stuff\n robotCamera = CameraServer.getInstance();\n robotCamera.setQuality(50);\n robotCamera.startAutomaticCapture(\"cam0\");\n\n //our robot stuff\n // myChassis\t= new RobotDrive(0,1);\n leftSide\t= new VictorSP(1);\n rightSide\t= new VictorSP(0);\n spinWheels\t= new TalonSRX(2);\n armLifty\t= new TalonSRX(3);\n drivePad\t= new Joystick(0);\n statesPad\t= new Joystick(1);\n LiveWindow.addActuator(\"stud\", \"talonsrx\", armLifty);\n \n //arm position stuff\n armPosition\t\t= new AnalogInput(0);\n armPortSwitch\t= new DigitalInput(0);\n \n //solenoid stuff\n //solenoidThing = new Solenoid(1);\n \n //init button states\n lBPX\t\t\t= false;\n bIPX\t\t\t= false;\n \n //driver buttons\n ballSpitButton\t= 4;\n ballSuckButton\t= 2;\n \n //state machine variables\n defaultState\t\t= 0;\n portState\t\t\t= 1;\n chevellState\t\t= 2;\n ballGrabState\t\t= 10;\n driveState\t\t\t= 11;\n lowBarState\t\t\t= 8;\n rockState\t\t\t= driveState;\n roughState\t\t\t= driveState;\n moatState\t\t\t= driveState;\n rampartState\t\t= driveState;\n drawState\t\t\t= driveState;\n sallyState\t\t\t= driveState;\n liftOverride\t\t= 0.09;\n terrainStates\t\t= 0;\n autoLiftSpeed\t\t= 1.0;\n armLiftBuffer\t\t= 0.01;\n //port state variables\n portPosition1\t\t= 1.7;\n portPosition2\t\t= 0.9;\n portSwitch\t\t\t= 0;\n //chevell state variables\n chevellPosition1\t= 1.135;\n chevellPosition2\t= 2.0;\n chevellSwitch \t\t= 0;\n chevellWheelSpeed\t= 0.3;\n //ball grab state variables\n ballGrabPosition1\t= 1.35;\n ballGrabSwitch\t\t= 0;\n ballGrabWheelSpeed\t= -0.635;\n ballSpitWheelSpeed\t= 1.0;\n //lowbar state variables\n lowBarPosition\t\t= 1.6;\n lowBarSwitch\t\t= 0;\n //drive state variables\n driveSwitch\t\t\t= 1;\n \n }",
"public void robotInit() {\n\t\toi = new OI();\n chooser = new SendableChooser();\n chooser.addDefault(\"Default Auto\", new ExampleCommand());\n// chooser.addObject(\"My Auto\", new MyfAutoCommand());\n SmartDashboard.putData(\"Auto mode\", chooser);\n \n //Drive\n //this.DriveTrain = new DriveTrain();\n \t//RobotMap.robotDrive1.arcadeDrive(oi.stickLeft);\n \n //Buttons\n // oi.button1.whenPressed(new SetMaxMotorOutput());\n \n //Ultrasonic\n sonic1 = new Ultrasonic(0,1);\n sonic1.setAutomaticMode(true);\n \n }",
"public void autonomousPeriodic() {\n \tswitch(autoSelected) {\n \tcase customAuto:\n //Put custom auto code here \n break;\n \tcase defaultAuto:\n \tdefault:\n \t//Put default auto code here\n break;\n \t}\n }",
"public void autonomousInit() {\n autonomousCommand = (Command) autoChooser.getSelected();\n autonomousCommand.start();\n// \n }",
"@Override\r\n public void runOpMode() {\n\r\n mtrFL = hardwareMap.dcMotor.get(\"fl_drive\");\r\n mtrFR = hardwareMap.dcMotor.get(\"fr_drive\");\r\n mtrBL = hardwareMap.dcMotor.get(\"bl_drive\");\r\n mtrBR = hardwareMap.dcMotor.get(\"br_drive\");\r\n\r\n\r\n // Set directions for motors.\r\n mtrFL.setDirection(DcMotor.Direction.REVERSE);\r\n mtrFR.setDirection(DcMotor.Direction.FORWARD);\r\n mtrBL.setDirection(DcMotor.Direction.REVERSE);\r\n mtrBR.setDirection(DcMotor.Direction.FORWARD);\r\n\r\n\r\n //zero power behavior\r\n mtrFL.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\r\n mtrFR.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\r\n mtrBL.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\r\n mtrBR.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\r\n\r\n\r\n // Set power for all motors.\r\n mtrFL.setPower(powFL);\r\n mtrFR.setPower(powFR);\r\n mtrBL.setPower(powBL);\r\n mtrBR.setPower(powBR);\r\n\r\n\r\n // Set all motors to run with given mode\r\n mtrFL.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\r\n mtrFR.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\r\n mtrBL.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\r\n mtrBR.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\r\n\r\n waitForStart();\r\n\r\n // run until the end of the match (driver presses STOP)\r\n while (opModeIsActive()) {\r\n g1ch2 = -gamepad1.left_stick_y;\r\n g1ch3 = gamepad1.right_stick_x;\r\n g2ch2 = -gamepad2.left_stick_x;\r\n g2ch4 = -gamepad2.right_stick_x;\r\n g2left = gamepad2.left_trigger;\r\n g2right = gamepad2.right_trigger;\r\n\r\n\r\n powFL = Range.clip(g1ch2 + g1ch3, -1, 1);\r\n powFR = Range.clip(g1ch2 - g1ch3, -1, 1);\r\n powBL = Range.clip(g1ch2 + g1ch3, -1, 1);\r\n powBR = Range.clip(g1ch2 - g1ch3, -1, 1);\r\n\r\n\r\n mtrFL.setPower(powFL);\r\n mtrFR.setPower(powFR);\r\n mtrBL.setPower(powBL);\r\n mtrBR.setPower(powBR);\r\n sleep(50);\r\n }\r\n }",
"public void runOpMode() {\n leftBackDrive = hardwareMap.get(DcMotor.class, \"left_back_drive\"); //port 0, hub1\n rightBackDrive = hardwareMap.get(DcMotor.class, \"right_back_drive\"); //port 1, hub1\n leftFrontDrive = hardwareMap.get(DcMotor.class, \"left_front_drive\"); //port 2, hub1\n rightFrontDrive = hardwareMap.get(DcMotor.class, \"right_front_drive\"); //port 3, hub1\n craneExtend = hardwareMap.get(DcMotor.class, \"craneExtend\"); //port 0, hub2\n cranePitch = hardwareMap.get(DcMotor.class, \"cranePitch\"); //port 1, hub2\n craneElevate = hardwareMap.get(DcMotor.class, \"craneElevate\"); //port 2, hub2\n fakeMotor = hardwareMap.get(DcMotor.class, \"fakeMotor\"); //port 2, hub3\n craneGrab = hardwareMap.get(Servo.class, \"craneGrab\"); //port 0, servo\n craneGrabAttitude = hardwareMap.get(Servo.class, \"craneGrabAttitude\"); //port 2, servo\n trayGrab = hardwareMap.get(Servo.class, \"trayGrab\"); //port 1, servo\n flipperLeft = hardwareMap.get(Servo.class, \"flipperLeft\"); //port 3. servo\n flipperRight = hardwareMap.get(Servo.class, \"flipperRight\"); //port 4, servo\n \n //Setting the motor directions\n leftBackDrive.setDirection(DcMotor.Direction.FORWARD);\n rightBackDrive.setDirection(DcMotor.Direction.REVERSE);\n leftFrontDrive.setDirection(DcMotor.Direction.FORWARD);\n rightFrontDrive.setDirection(DcMotor.Direction.REVERSE);\n\n //Initializing variables\n \n telemetry.addData(\"Status\", \"Initialized\");\n telemetry.update(); //Done initalizing\n\n //Wait for the game to start (driver presses PLAY)\n waitForStart();\n runtime.reset();\n\n //run until the end of the match (driver presses STOP)\n while (opModeIsActive()) {\n \n//******************************************************************************\n\n //Drive controls\n if (gamepad1.left_trigger>0 || gamepad1.right_trigger>0) { //Crab\n leftBackDrive.setPower(gamepad1.left_stick_x*0.8);\n rightBackDrive.setPower(-gamepad1.left_stick_x*0.8);\n leftFrontDrive.setPower(-gamepad1.left_stick_x*0.8);\n rightFrontDrive.setPower(gamepad1.left_stick_x*0.8);\n }\n\n else { //Tank\n leftBackDrive.setPower(-gamepad1.left_stick_x);\n rightBackDrive.setPower(-gamepad1.right_stick_x);\n leftFrontDrive.setPower(-gamepad1.left_stick_x);\n rightFrontDrive.setPower(-gamepad1.right_stick_x);\n }\n }\n \n//******************************************************************************\n\n //Crane control\n \n \n//******************************************************************************\n\n //Telemetry display\n telemetry.addData(\"Run Time:\", \"\" + runtime.toString());\n telemetry.addData(\"Motor Power\", \"L (%.2f), R (%.2f)\", gamepad1.left_stick_y, gamepad1.right_stick_y);\n telemetry.update();\n }",
"@Override\n public void robotInit() {\n SmartDashboard.putBoolean(\"CLIMB\", false);\n SmartDashboard.putNumber(\"servo\", 0);\n // Instantiate our RobotContainer. This will perform all our button bindings, and put our\n // autonomous chooser on the dashboard.\n m_robotContainer = new RobotContainer();\n //coast.\n if (RobotMap.DRIVE_TRAIN_DRAGON_FLY_IS_AVAILABLE)\n getRobotContainer().getDriveTrain().setCANSparkMaxMotorsState(false, RobotMap.DRIVE_TRAIN_MIDDLE_WHEEL_PORT);\n\n getRobotContainer().configureButtonBindings();\n getRobotContainer().getTecbotSensors().initializeAllSensors();\n getRobotContainer().getTecbotSensors().getTecbotGyro().reset();\n\n Robot.getRobotContainer().getDriveTrain().setCANSparkMaxMotorsState(true, RobotMap.DRIVE_TRAIN_MIDDLE_WHEEL_PORT);\n Robot.getRobotContainer().getDriveTrain().setCANSparkMaxMotorsState(true, RobotMap.DRIVE_TRAIN_LEFT_CHASSIS_PORTS);\n Robot.getRobotContainer().getDriveTrain().setCANSparkMaxMotorsState(true, RobotMap.DRIVE_TRAIN_RIGHT_CHASSIS_PORTS);\n\n UsbCamera camera = CameraServer.getInstance().startAutomaticCapture();\n camera.setResolution(640, 480);\n\n m_chooser.addOption(\"Move 3 m\", new SpeedReductionStraight(3, .75, 0));\n m_chooser.addOption(\"Rotate 90 degrees\", new SpeedReductionTurn(90, .5));\n m_chooser.setDefaultOption(\"El chido\", new DR01D3K4());\n m_chooser.addOption(\"Collect, go back and shoot\", new CollectPowerCellsGoBackShoot());\n m_chooser.addOption(\"Transport\", new SequentialCommandGroup(new FrontIntakeSetRaw(.75),\n new TransportationSystemSetRaw(.5)));\n m_chooser.addOption(\"Shoot 3PCs n' Move\", new SHOOT_3_PCs_N_MOVE());\n SmartDashboard.putData(\"Auto Mode\", m_chooser);\n\n //camera.setExposureManual(79);\n\n\n }",
"public void robotInit() {\n\t\t\n\t\tupdateDashboard();\n\t\t\n \tautoChooser = new SendableChooser();\n \tautoChooser.addDefault(\"Default Autonomous does nothing!\", new Default());\n \t// Default Autonomous does nothing\n \tautoChooser.addObject(\"Cross the Low Bar Don't Run This it doesn't work\", new LowBar());\n \tautoChooser.addObject(\"Cross Rough Patch/Stone Wall\", new Main());\n \tautoChooser.addObject(\"Cross the Low Bar, Experimental!\", new LowBarEx());\n \t//autoChooser.addObject(\"If Jonathan lied to us and we can cross twice\", new RoughPatch());\n \tCameraServer server = CameraServer.getInstance();\n\n \tserver.setQuality(50);\n \t\n \tSmartDashboard.putData(\"Autonomous\", autoChooser);\n\n \tserver.startAutomaticCapture(\"cam0\");\n \tLowBar.gyro.reset();\n \t\n \tDriverStation.reportWarning(\"The Robot is locked and loaded. Time to kick some ass guys!\", !(server.isAutoCaptureStarted()));\n\n\t}",
"default void onAutoModeChanged(int autoMode) {}",
"private void setModeUI(){\n\n if (this.inManualMode == true){ this.enableRadioButtons(); } // manual mode\n else if (this.inManualMode == false){ this.disableRadioButtons(); } // automatic mode\n }",
"@Override\n public void runOpMode() {\n telemetry.addData(\"Status\", \"Resetting Encoders\"); //\n telemetry.update();\n\n leftFront = hardwareMap.get(DcMotor.class, \"left_front\");\n rightFront = hardwareMap.get(DcMotor.class, \"right_front\");\n leftBack = hardwareMap.get(DcMotor.class, \"left_back\");\n rightBack = hardwareMap.get(DcMotor.class, \"right_back\");\n\n\n leftFront.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n rightFront.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n leftBack.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n rightFront.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n\n right = hardwareMap.get(Servo.class, \"right\");\n left = hardwareMap.get(Servo.class, \"left\");\n // Most robots need the motor on one side to be reversed to drive forward\n // Reverse the motor that runs backwards when connected directly to the battery\n leftFront.setDirection(DcMotor.Direction.REVERSE);\n rightFront.setDirection(DcMotor.Direction.FORWARD);\n leftBack.setDirection(DcMotor.Direction.REVERSE);\n rightBack.setDirection(DcMotor.Direction.FORWARD);\n\n leftFront.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n leftBack.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n rightFront.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n rightBack.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n\n digitalTouch = hardwareMap.get(DigitalChannel.class, \"sensor_digital\");\n digitalTouch.setMode(DigitalChannel.Mode.INPUT);\n\n right.setDirection(Servo.Direction.REVERSE);\n\n right.scaleRange(0, 0.25);\n left.scaleRange(0.7, 1);\n\n\n // Wait for the game to start (driver presses PLAY)\n waitForStart();\n\n\n servo(0);\n runtime.reset();\n encoderSideways(0.25, -5, -5, 5);\n // drive until touch sensor pressed\n // activate servos to grab platform\n // drive backwards for a while\n // release servos\n // sideways part\n // remember to do red autonomous for repackage org.firstinspires.ftc.teamcode;\n }",
"@Override\n public void runOpMode() {\n try {\n leftfrontDrive = hardwareMap.get(DcMotor.class, \"frontLeft\");\n leftfrontDrive.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n\n rightfrontDrive = hardwareMap.get(DcMotor.class, \"frontRight\");\n rightfrontDrive.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n\n leftbackDrive = hardwareMap.get(DcMotor.class, \"backLeft\");\n leftbackDrive.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n leftbackDrive.setDirection(DcMotor.Direction.REVERSE);\n\n rightbackDrive = hardwareMap.get(DcMotor.class, \"backRight\");\n rightbackDrive.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n\n lift = hardwareMap.get(DcMotor.class, \"Lift\");\n lift.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n lift.setDirection(DcMotor.Direction.REVERSE);\n\n markerArm = hardwareMap.get(Servo.class, \"markerArm\");\n\n armActivator = hardwareMap.get(DcMotor.class, \"armActivator\");\n armActivator.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n\n } catch (IllegalArgumentException iax) {\n bDebug = true;\n }\n\n BNO055IMU.Parameters parameters = new BNO055IMU.Parameters();\n parameters.angleUnit = BNO055IMU.AngleUnit.DEGREES;\n parameters.accelUnit = BNO055IMU.AccelUnit.METERS_PERSEC_PERSEC;\n parameters.calibrationDataFile = \"BNO055IMUCalibration.json\";\n parameters.loggingEnabled = true;\n parameters.loggingTag = \"IMU\";\n parameters.accelerationIntegrationAlgorithm = new JustLoggingAccelerationIntegrator();\n\n imu = hardwareMap.get(BNO055IMU.class, \"imu\");\n imu.initialize(parameters);\n\n waitForStart(); //the rest of the code begins after the play button is pressed\n\n sleep(3000);\n\n drive(0.35, 0.5);\n\n turn(90.0f);\n\n drive(1.8, 0.5);\n\n turn(45.0f);\n\n drive(2.5, -0.5);\n\n sleep(1000);\n\n markerArm.setPosition(1);\n\n sleep(1000);\n\n markerArm.setPosition(0);\n\n sleep(1000);\n\n drive(2.5,.75);\n\n turn(179.0f);\n\n drive(1.5, 1.0);\n\n requestOpModeStop(); //end of autonomous\n }",
"public void runOpMode() {\n robot.init(hardwareMap);\n\n // Send telemetry message to signify robot waiting;\n telemetry.addData(\"Status\", \"Resetting Encoders\"); //\n telemetry.update();\n\n robot.leftMotor.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n robot.rightMotor.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n idle();\n\n robot.leftMotor.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n robot.rightMotor.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n\n // Send telemetry message to indicate successful Encoder reset\n telemetry.addData(\"Path0\", \"Starting at %7d :%7d\",\n robot.leftMotor.getCurrentPosition(),\n robot.rightMotor.getCurrentPosition());\n telemetry.addData(\"Gyro Heading:\", \"%.4f\", getHeading());\n telemetry.update();\n\n int cameraMonitorViewId = hardwareMap.appContext.getResources().getIdentifier(\"cameraMonitorViewId\", \"id\", hardwareMap.appContext.getPackageName());\n\n VuforiaLocalizer.Parameters parameters = new VuforiaLocalizer.Parameters(cameraMonitorViewId);\n\n parameters.vuforiaLicenseKey = \"Adiq0Gb/////AAAAme76+E2WhUFamptVVqcYOs8rfAWw8b48caeMVM89dEw04s+/mRV9TqcNvLkSArWax6t5dAy9ISStJNcnGfxwxfoHQIRwFTqw9i8eNoRrlu+8X2oPIAh5RKOZZnGNM6zNOveXjb2bu8yJTQ1cMCdiydnQ/Vh1mSlku+cAsNlmfcL0b69Mt2K4AsBiBppIesOQ3JDcS3g60JeaW9p+VepTG1pLPazmeBTBBGVx471G7sYfkTO0c/W6hyw61qmR+y7GJwn/ECMmXZhhHkNJCmJQy3tgAeJMdKHp62RJqYg5ZLW0FsIh7cOPRkNjpC0GmMCMn8AbtfadVZDwn+MPiF02ZbthQN1N+NEUtURP0BWB1CmA\";\n\n\n parameters.cameraDirection = VuforiaLocalizer.CameraDirection.FRONT;\n this.vuforia = ClassFactory.createVuforiaLocalizer(parameters);\n\n VuforiaTrackables relicTrackables = this.vuforia.loadTrackablesFromAsset(\"RelicVuMark\");\n VuforiaTrackable relicTemplate = relicTrackables.get(0);\n relicTemplate.setName(\"relicVuMarkTemplate\"); // can help in debugging; otherwise not necessary\n\n telemetry.addData(\">\", \"Press Play to start\");\n telemetry.update();\n\n\n\n // Wait for the game to start (driver presses PLAY)\n waitForStart();\n relicTrackables.activate();\n\n //while (opModeIsActive()) {\n\n /**\n * See if any of the instances of {@link relicTemplate} are currently visible.\n * {@link RelicRecoveryVuMark} is an enum which can have the following values:\n * UNKNOWN, LEFT, CENTER, and RIGHT. When a VuMark is visible, something other than\n * UNKNOWN will be returned by {@link RelicRecoveryVuMark#from(VuforiaTrackable)}.\n */\n RelicRecoveryVuMark vuMark = RelicRecoveryVuMark.from(relicTemplate);\n while (vuMark == RelicRecoveryVuMark.UNKNOWN) {\n vuMark = RelicRecoveryVuMark.from(relicTemplate);\n /* Found an instance of the template. In the actual game, you will probably\n * loop until this condition occurs, then move on to act accordingly depending\n * on which VuMark was visible. */\n }\n telemetry.addData(\"VuMark\", \"%s visible\", vuMark);\n telemetry.update();\n sleep(550);\n\n //switch (vuMark) {\n // case LEFT: //RelicRecoveryVuMark vuMark = RelicRecoveryVuMark.LEFT;\n // coLumn = 2;\n // case CENTER:// RelicRecoveryVuMark vuMark = RelicRecoveryVuMark.CENTER;\n // coLumn = 1;\n // case RIGHT:// RelicRecoveryVuMark vuMark = RelicRecoveryVuMark.RIGHT;\n // coLumn = 0;\n //}\n if ( vuMark == RelicRecoveryVuMark.LEFT) {\n coLumn = 2;\n }\n else if(vuMark == RelicRecoveryVuMark.RIGHT){\n coLumn = 0;\n }\n else if(vuMark == RelicRecoveryVuMark.CENTER){\n coLumn = 1;\n }\n\n\n telemetry.addData(\"coLumn\", \"%s visible\", coLumn);\n telemetry.update();\n sleep(550);\n\n\n\n//if jewej is red 1 if jewel is blue 2\n\n // if(jewel == 1) {\n // gyroturn(-10, TURN_SPEED, -TURN_SPEED); //encoderDrive(TURN_SPEED, TURN_SPEED, turndistance[1], -turndistance[1], 5.0);\n //gyroturn(-2, -TURN_SPEED, TURN_SPEED); //encoderDrive(TURN_SPEED, TURN_SPEED, turndistance[1], -turndistance[1], 5.0);\n //}\n //else if(jewel == 2){\n // gyroturn(10, -TURN_SPEED, TURN_SPEED); //encoderDrive(TURN_SPEED, TURN_SPEED, turndistance[1], -turndistance[1], 5.0);\n // gyroturn(-2, TURN_SPEED, -TURN_SPEED); //encoderDrive(TURN_SPEED, TURN_SPEED, turndistance[1], -turndistance[1], 5.0);\n //}\n encoderDrive(DRIVE_SPEED, DRIVE_SPEED, disandTurn[0][coLumn], disandTurn[0][coLumn], 5.0); // S1: Forward 24 Inches with 5 Sec timeout shoot ball\n\n gyroturn(disandTurn[1][coLumn], TURN_SPEED, -TURN_SPEED); //encoderDrive(TURN_SPEED, TURN_SPEED, turndistance[0], -turndistance[0], 5.0);\n\n encoderDrive(DRIVE_SPEED, DRIVE_SPEED, disandTurn[2][coLumn], disandTurn[2][coLumn], 5.0); // S3: Forward 43.3 iNCHES\n\n gyroturn(disandTurn[3][coLumn], TURN_SPEED, -TURN_SPEED); //encoderDrive(TURN_SPEED, TURN_SPEED, turndistance[1], -turndistance[1], 5.0);\n\n encoderDrive(DRIVE_SPEED, DRIVE_SPEED, disandTurn[4][coLumn], disandTurn[4][coLumn], 5.0);// S5: Forward 12 Inches with 4 Sec timeout\n\n gyroturn(disandTurn[5][coLumn], TURN_SPEED, -TURN_SPEED); //encoderDrive(TURN_SPEED, TURN_SPEED, turndistance[1], -turndistance[1], 5.0);\n\n encoderDrive(DRIVE_SPEED, DRIVE_SPEED, disandTurn[6][coLumn], disandTurn[6][coLumn], 5.0);// S5: Forward 12 Inches with 4 Sec timeout\n\n\n Outake();\n encoderDrive(DRIVE_SPEED, DRIVE_SPEED, disandTurn[7][coLumn], disandTurn[7][coLumn], 5.0);// S6: Forward 48 inches with 4 Sec timeout\n }",
"public static void startAuto(){\n cancelAuto();\n //Turn our ID into a Command\n \tswitch(autonomousChooser.getSelected()){\n case 0:\n command = new BaseLine();\n break;\n default:\n\t\t\t\tSystem.out.println(\"No auto picked\");\n command = null;\n }\n //Run the Command\n\t\tif (command != null){\n\t\t\tcommand.start();\n\t\t}\n }",
"@Override\n\tpublic void autonomousInit() //initialization of the autonomous code\n\t{\n\t\t//m_autonomousCommand = m_chooser.getSelected();\n\n\t\t/*\n\t\t * String autoSelected = SmartDashboard.getString(\"Auto Selector\",\n\t\t * \"Default\"); switch(autoSelected) { case \"My Auto\": autonomousCommand\n\t\t * = new MyAutoCommand(); break; case \"Default Auto\": default:\n\t\t * autonomousCommand = new ExampleCommand(); break; }\n\t\t */\n\n\t\t// schedule the autonomous command (example)\n\t\tif (m_autonomousCommand != null) //if we have any autonomous code, start it\n\t\t{\n\t\t\tm_autonomousCommand.start();\n\t\t}\n\t\tRobotMap.encoderLeft.reset(); //reset the values of the encoder\n\t\tRobotMap.encoderRight.reset(); //reset the values of the encoder\n\t\tultrasonic.getInitialDist(); //if nullPointerException, use \"first\" boolean inside the method and run in periodic()\n\t}",
"public void runOpMode(){\n JAWLDrive3796 drive = new JAWLDrive3796(hardwareMap.dcMotor.get(\"left_drive\"), hardwareMap.dcMotor.get(\"right_drive\"));\n //Set the drive motors to run without encoders\n drive.setEncoders(false);\n //Create Grabber object\n JAWLGrabber3796 grabber = new JAWLGrabber3796(hardwareMap.servo.get(\"left_arm\"), hardwareMap.servo.get(\"right_arm\"));\n //Create Lift object\n JAWLLift3796 lift = new JAWLLift3796(hardwareMap.dcMotor.get(\"lift_motor\"));\n //Create color arm object\n JAWLColorArm3796 colorArm = new JAWLColorArm3796(hardwareMap.servo.get(\"color_arm\"));\n //Creates color sensor name\n ColorSensor colorSensorTemp = hardwareMap.get(ColorSensor.class, \"color_distance\");\n //Creates distance sensor name\n DistanceSensor distanceSensorTemp = hardwareMap.get(DistanceSensor.class, \"color_distance\");\n //Creates the color-distance sensor object\n JAWLColorSensor3796 colorDistanceSensor = new JAWLColorSensor3796(colorSensorTemp, distanceSensorTemp);\n //Creates the variable that will hold the color of the jewel\n String colorOfBall;\n //Creates relic arm objects\n //TTTTRelicArm3796 relicArm = new TTTTRelicArm3796(hardwareMap.dcMotor.get(\"relic_up_down\"), hardwareMap.dcMotor.get(\"relic_out_in\"), hardwareMap.dcMotor.get(\"relic_grab\"));\n //We never ended up having a relic arm!\n //The lift helper will set the idle power of the motor to a small double, keeping the lift from idly falling down\n boolean liftHelper = false;\n int i = 0;\n\n waitForStart();\n\n colorArm.armUp();\n\n while (opModeIsActive()) {\n //Here is where we define how the controllers should work\n //In theory, no logic retaining to controlling the components should be in here\n\n /*\n * Drive\n */\n\n //The left drive wheel is controlled by the opposite value of the left stick's y value on the first gamepad\n //The right drive is the same way except with the right drive wheel\n drive.leftDrive(-gamepad1.left_stick_y);\n drive.rightDrive(-gamepad1.right_stick_y);\n\n /*\n * Lift\n */\n telemetry.addData(\"Gamepad2 Right Stick Y\", -gamepad2.right_stick_y);\n\n if (-gamepad2.right_stick_y > 0) {\n //First checks to see if the right stick's negative y value is greater then zero.\n lift.moveMotor(-gamepad2.right_stick_y);\n //If it is, it sets the power for the motor to 1, and adds telemetry\n telemetry.addData(\"Lift Power\", 1);\n } else if (-gamepad2.right_stick_y < 0) {\n //Checks if the negative value of the right right stick's y position is less than zero\n lift.moveMotor(-0.1);\n //Sets the power for the motor to -0.1, and adds telemetry\n telemetry.addData(\"Lift Power\", -0.1);\n } else {\n //We check to see if the liftHelper is enabled\n if(liftHelper) {\n lift.moveMotor(0.1466 );\n } else {\n lift.moveMotor(0);\n }\n }\n\n\n\n /*\n * Lift helper control\n */\n\n if(gamepad2.a) {\n if(i == 0) {\n liftHelper = !liftHelper;\n }\n i = 5;\n }\n\n if(i != 0) {\n i--;\n }\n\n telemetry.addData(\"Lift Helper Enabled\", liftHelper);\n\n\n\n /*\n * Grabbers\n */\n if (gamepad2.left_trigger > 0) {\n //Closes the left arm, then displays the position in telemetry\n grabber.leftArmClose();\n double a = grabber.leftPosition();\n //Adds telemetry to display positions of grabbers, mostly for testing, but can be useful later on\n telemetry.addData(\"Left\", a);\n }\n\n if (gamepad2.left_bumper) {\n //Opens the left arm, then displays the position in telemetry\n grabber.leftArmOpen();\n double b = grabber.leftPosition();\n //We made the variables different as to avoid any and all possible errors\n telemetry.addData(\"Left\", b);\n }\n\n if (gamepad2.right_trigger > 0) {\n //Opens the right arm, then displays the position in telemetry\n grabber.rightArmClose();\n double c = grabber.rightPosition();\n telemetry.addData(\"Right\", c);\n }\n\n if (gamepad2.right_bumper) {\n //Closes the right arm, then displays the position in telemetry\n grabber.rightArmOpen();\n double d = grabber.rightPosition();\n telemetry.addData(\"Right\", d);\n }\n\n if (gamepad2.dpad_left){\n //Closes the left arm to a shorter distance\n grabber.leftArmShort();\n }\n\n if(gamepad2.dpad_right){\n //Closes the right arm to a shorter distance\n grabber.rightArmShort();\n\n }\n\n //Update all of our telemetries at once so we can see all of it at the same time\n telemetry.update();\n }\n }",
"int getACMode();",
"@Override\n\tpublic void autonomousInit() {\n\t\tselectedAutonomousCommand = new AutoModeCommandGroup(autoChooser.getSelected());\n\t\tif (selectedAutonomousCommand!=null) {\n\t\t\tselectedAutonomousCommand.start();\n\t\t}\n\t}",
"@Override\n public void runOpMode () {\n motor1 = hardwareMap.get(DcMotor.class, \"motor1\");\n motor2 = hardwareMap.get(DcMotor.class, \"motor2\");\n\n telemetry.addData(\"Status\", \"Initialized\");\n telemetry.update();\n //Wait for game to start (driver presses PLAY)\n waitForStart();\n\n /*\n the overridden runOpMode method happens with every OpMode using the LinearOpMode type.\n hardwareMap is an object that references the hardware listed above (private variables).\n The hardwareMap.get method matches the name of the device used in the configuration, so\n we would have to change the names (ex. motorTest to Motor 1 or Motor 2 (or something else))\n if not, the opMode won't recognize the device\n\n in the second half of this section, it uses something called telemetry. In the first and\n second lines it sends a message to the driver station saying (\"Status\", \"Initialized\") and\n then it prompts the driver to press start and waits. All linear functions should have a wait\n for start command so that the robot doesn't start executing the commands before the driver\n wants to (or pushes the start button)\n */\n\n //run until end of match (driver presses STOP)\n double tgtpower = 0;\n while (opModeIsActive()) {\n telemetry.addData(\"Left Stick X\", this.gamepad1.left_stick_x);\n telemetry.addData(\"Left Stick Y\", this.gamepad1.left_stick_y);\n telemetry.addData(\"Right Stick X\", this.gamepad1.right_stick_x);\n telemetry.addData(\"Right Stick Y\", this.gamepad1.right_stick_y);\n if (this.gamepad1.left_stick_y < 0){\n tgtpower=-this.gamepad1.left_stick_y;\n motor1.setPower(tgtpower);\n motor2.setPower(-tgtpower);\n }else if (this.gamepad1.left_stick_y > 0){\n tgtpower=this.gamepad1.left_stick_y;\n motor1.setPower(-tgtpower);\n motor2.setPower(tgtpower);\n }else if (this.gamepad1.left_stick_x > 0){\n tgtpower=this.gamepad1.left_stick_x;\n motor1.setPower(tgtpower);\n motor2.setPower(tgtpower);\n }else if (this.gamepad1.left_stick_x < 0){\n tgtpower=-this.gamepad1.left_stick_x;\n motor1.setPower(-tgtpower);\n motor2.setPower(-tgtpower);\n }else{\n motor1.setPower(0);\n motor2.setPower(0);\n }\n telemetry.addData(\"Motor1 Power\", motor1.getPower());\n telemetry.addData(\"Motor2 Power\", motor2.getPower());\n telemetry.addData(\"Status\", \"Running\");\n telemetry.update ();\n\n\n /*\n if (this.gamepad1.right_stick_x == 1){\n //trying to make robot turn right, == 1 may be wrong\n motor2.setPower(-1);\n }\n else if (this.gamepad1.right_stick_x == -1){\n //trying to make robot turn left, == -1 may be wrong\n motor1.setPower(-1);\n }\n else {\n\n }\n */\n\n\n /*\n After the driver presses start,the opMode enters a while loop until the driver presses stop,\n while the loop is running it will continue to send messages of (\"Status\", \"Running\") to the\n driver station\n */\n\n\n }\n }",
"@Override\n\tpublic void robotInit() {\n\t\tm_chooser.setDefaultOption(\"Default Auto\", kDefaultAuto);\n\t\tm_chooser.addOption(\"My Auto\", kCustomAuto);\n\t\tSmartDashboard.putData(\"Auto choices\", m_chooser);\n\n\t\tm_frontRight = new PWMVictorSPX(0);\n\t\tm_frontLeft = new PWMVictorSPX(2);\n\t\tm_backRight = new PWMVictorSPX(1);\n\t\tm_backLeft = new PWMVictorSPX(3);\n\n\t\tx_aligning = false;\n\n\t\tJoy = new Joystick(0);\n\t\tmyTimer = new Timer();\n\n\t\tfinal SpeedControllerGroup m_left = new SpeedControllerGroup(m_frontLeft, m_backLeft);\n\t\tfinal SpeedControllerGroup m_right = new SpeedControllerGroup(m_frontRight, m_backRight);\n\n\t\tm_drive = new DifferentialDrive(m_left, m_right);\n\n\t\tdistanceToTarget = 0;\n\n\t\tcounter = new Counter(9);\n\t\tcounter.setMaxPeriod(10.0);\n\t\tcounter.setSemiPeriodMode(true);\n\t\tcounter.reset();\n\t}",
"@Override\n public void autonomousPeriodic() {\n switch (m_autoSelected) {\n case kCustomAuto:\n // Put custom auto code here\n break;\n case kDefaultAuto:\n default:\n // Put default auto code here\n break;\n }\n }",
"@Override\n public void autonomousPeriodic() {\n switch (m_autoSelected) {\n case kCustomAuto:\n // Put custom auto code here\n break;\n case kDefaultAuto:\n default:\n // Put default auto code here\n break;\n }\n }",
"@Override\n public void autonomousPeriodic() {\n switch (m_autoSelected) {\n case kCustomAuto:\n // Put custom auto code here\n break;\n case kDefaultAuto:\n default:\n // Put default auto code here\n break;\n }\n }",
"@Override\n public void autonomousPeriodic() {\n switch (m_autoSelected) {\n case kCustomAuto:\n // Put custom auto code here\n break;\n case kDefaultAuto:\n default:\n // Put default auto code here\n break;\n }\n }",
"@Override\n\tpublic void autonomousInit() {\n\t\tautonomousCommand = new Auto();\n\n\t\t/*\n\t\t * String autoSelected = SmartDashboard.getString(\"Auto Selector\",\n\t\t * \"Default\"); switch(autoSelected) { case \"My Auto\": autonomousCommand\n\t\t * = new MyAutoCommand(); break; case \"Default Auto\": default:\n\t\t * autonomousCommand = new ExampleCommand(); break; }\n\t\t */\n\n\t\t// schedule the autonomous command (example)\n\t\tif (autonomousCommand != null)\n\t\t\tautonomousCommand.start();\n\t}",
"public void updateSwitches(){\r\n if(this.ar){\r\n this.augmentedReality.setChecked(true);\r\n }else{\r\n this.augmentedReality.setChecked(false);\r\n }\r\n\r\n if(this.easy){\r\n this.easyMode.setChecked(true);\r\n }else{\r\n this.easyMode.setChecked(false);\r\n }\r\n }",
"public Command getAutonomousCommand() \n {\n switch (m_autoChooser.getSelected())\n {\n case \"default\":\n return null;\n case \"test\":\n return new CommandGroupTemplate();\n case \"three_ball_forward\":\n return new AutonomousThreeBall(1, 2.0);\n case \"three_ball_backward\":\n return new AutonomousThreeBall(-1, 3.0);\n case \"six_ball\":\n return new AutonomousSixBall();\n default:\n System.out.println(\"\\nError selecting autonomous command:\\nCommand selected: \" + m_autoChooser.getSelected() + \"\\n\");\n return null;\n }\n }",
"@Override\n\n public void runOpMode() {\n telemetry.addData(\"Status\", \"Initialized\");\n telemetry.update();\n\n // Initialize the hardware variables. Note that the strings used here as parameters\n // to 'get' must correspond to the names assigned during the robot configuration\n // step (using the FTC Robot Controller app on the phone).\n // FR = hardwareMap.get(DcMotor.class, \"FR\");\n // FL = hardwareMap.get(DcMotor.class, \"FL\");\n // BR = hardwareMap.get(DcMotor.class, \"BR\");\n //BL = hardwareMap.get(DcMotor.class, \"BL\");\n //yoo are ___\n // Most robots need the motor on one side to be reversed to drive forward\n // Reverse the motor that runs backwards when connected directly to the battery\n/* FR.setDirection(DcMotor.Direction.FORWARD);\n FL.setDirection(DcMotor.Direction.REVERSE);\n BR.setDirection(DcMotor.Direction.FORWARD);\n BL.setDirection(DcMotor.Direction.REVERSE);\n\n */ RevBlinkinLedDriver blinkinLedDriver;\n RevBlinkinLedDriver.BlinkinPattern pattern;\n\n // Wait for the game to start (driver presses PLAY)\n waitForStart();\n\n blinkinLedDriver = this.hardwareMap.get(RevBlinkinLedDriver.class, \"PrettyBoi\");\n blinkinLedDriver.setPattern(RevBlinkinLedDriver.BlinkinPattern.RAINBOW_WITH_GLITTER);\n// runtime.reset();\n\n // run until the end of the match (driver presses STOP)\n while (opModeIsActive()) {\n\n\n\n // Show the elapsed game time and wheel power.\n// telemetry.addData(\"Status\", \"Run Time: \" + runtime.toString());\n// // telemetry.addData(\"Motors\", \"FL (%.2f), FR (%.2f), BL (%.2f), BR (%.2f)\", v1, v2, v3, v4);\n// telemetry.update();\n }\n }",
"@Override\n public void autonomousInit() {\n\n autonomousCommand = new Autonomous(start.getSelected(), chooser.getSelected());\n \n autonomousCommand.start();\n }",
"@Override\n\tpublic void autonomousPeriodic() {\n\t\t//For some reason, right is inverted in auto instead of left\n\t\tString start = autonomousCommand; //from smartDashboard\n\t\t//String start = \"R\";//R for right, FR for far right, L for far left\n\t\t//Starting Far Right\n\t\tif (start == \"FR\") {\n\t\t\tif(autoStep==0) {\n\t\t\t\tif (timer.get() < 3) {\n\t\t\t\t\tmotorRB.set(-0.5);\n\t\t\t\t\tmotorRF.set(-0.5);\n\t\t\t\t\tmotorLB.set(0.5);\n\t\t\t\t\tmotorLF.set(0.5);\n\t\t\t\t\t//Go forward for 5 seconds\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tmotorRB.set(0);\n\t\t\t\t\tmotorRF.set(0);\n\t\t\t\t\tmotorLB.set(0);\n\t\t\t\t\tmotorLF.set(0);\n\t\t\t\t\t//stop going\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse if (start == \"R\") {\n\t\t\t//Starting on the right, aligned with the switch\n\t\t\tif(autoStep==0) {\n\t\t\t\tif (timer.get() < 2) {\n\t\t\t\t\tmotorRB.set(-0.5);\n\t\t\t\t\tmotorRF.set(-0.5);\n\t\t\t\t\tmotorLB.set(0.5);\n\t\t\t\t\tmotorLF.set(0.5);\n\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tmotorRB.set(0);\n\t\t\t\t\tmotorRF.set(0);\n\t\t\t\t\tmotorLB.set(0);\n\t\t\t\t\tmotorLF.set(0);\n\t\t\t\t}\n\t\t\t\tif(gameData.charAt(0) == 'R') {\n\t\t\t\t\tif(timer.get()< 4) {\n\t\t\t\t\t\tmotorLift.set(.25);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tmotorLift.set(0);\n\t\t\t\t\t}\n\t\t\t\t\tif (timer.get() < 15 && timer.get() > 7) {\n\t\t\t\t\t\t\tmotorGL.set(1);\n\t\t\t\t\t\t\tmotorGR.set(-1);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tmotorGL.set(0);\n\t\t\t\t\t\tmotorGR.set(0);\n\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tautoStep++;\n\t\t\t}\n\t\t}\n\t\telse if (start == \"L\") {\n\t\t//This is for starting on the far left\n\t\t\tif(autoStep == 0) {\n\t\t\t\tif (timer.get() < 2.5) {\n\t\t\t\t\tmotorRB.set(-0.5);\n\t\t\t\t\tmotorRF.set(-0.5);\n\t\t\t\t\tmotorLB.set(0.5);\n\t\t\t\t\tmotorLF.set(0.5);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tmotorRB.set(0);\n\t\t\t\t\tmotorRF.set(0);\n\t\t\t\t\tmotorLB.set(0);\n\t\t\t\t\tmotorLF.set(0);\n\t\t\t\t}\n\t\t\t\tif(gameData.charAt(0) == 'L') {/**Change this to R if we start on the right side, comment out if we're on the far right or left side**/\n\t\t\t\t\trotateTo(270);\n\t\t\t\t\tif (timer.get()>3 && timer.get()<4) {\n\t\t\t\t\t\tmotorRB.set(-0.5);\n\t\t\t\t\t\tmotorRF.set(-0.5);\n\t\t\t\t\t\tmotorLB.set(0.5);\n\t\t\t\t\t\tmotorLF.set(0.5);\n\t\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tmotorRB.set(0);\n\t\t\t\t\t\tmotorRF.set(0);\n\t\t\t\t\t\tmotorLB.set(0);\n\t\t\t\t\t\tmotorLF.set(0);\n\t\t\t\t\t}\n\t\t\t\t\tif(timer.get()< 4) {\n\t\t\t\t\t\tmotorLift.set(.25);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tmotorLift.set(0);\n\t\t\t\t\t}\n\t\t\t\t\tif (timer.get() < 7 && timer.get() > 4) {\n\t\t\t\t\t\tmotorGL.set(1);\n\t\t\t\t\t\tmotorGR.set(-1);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tmotorGL.set(0);\n\t\t\t\t\t\tmotorGR.set(0);\n\t\t\t\t\t}\n\t\t\t\t\tautoStep++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t//Default Code\n\t\t\tif (true) {\n\t\t\t\tif(autoStep==0) {\n\t\t\t\t\tif (timer.get() < 3) {\n\t\t\t\t\t\tmotorRB.set(-0.5);\n\t\t\t\t\t\tmotorRF.set(-0.5);\n\t\t\t\t\t\tmotorLB.set(0.5);\n\t\t\t\t\t\tmotorLF.set(0.5);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tmotorRB.set(0);\n\t\t\t\t\t\tmotorRF.set(0);\n\t\t\t\t\t\tmotorLB.set(0);\n\t\t\t\t\t\tmotorLF.set(0);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public void execute()\n {\n // obtain object references\n ttlAG = (TTL_Autoguider)TTL_Autoguider.getInstance();\n AUTOGUIDE a = (AUTOGUIDE)command;\n AGS_State desired = null;\n pmc = new AltAzPointingModelCoefficients();\n telescope.getMount().getPointingModel().addCoefficients( pmc );\n\n // start of command execution\n Timestamp start = telescope.getTimer().getTime();\n\n try\n {\n AutoguideMode mode = a.getAutoguideMode();\n\n // Guide on the Brightest guide star\n if( mode == AutoguideMode.BRIGHTEST )\n {\n\tttlAG.guideOnBrightest();\n\tdesired = AGS_State.E_AGS_ON_BRIGHTEST;\n }\n\n // Gide on a guide star between magnitudes i1 and i2\n else if( mode == AutoguideMode.RANGE )\n {\n\tint i1 = (int)\n\t ( Math.rint\n\t ( a.getFaintestMagnitude() ) * 1000.0 );\n\n\tint i2 = (int)\n\t ( Math.rint\n\t ( a.getBrightestMagnitude() ) * 1000.0 );\n\n\tttlAG.guideOnRange( i1, i2 );\n\tdesired = AGS_State.E_AGS_ON_RANGE;\n }\n\n // Guide on teh Nth brightest star\n else if( mode == AutoguideMode.RANK )\n {\n\tttlAG.guideOnRank( a.getBrightnessRank() );\n\tdesired = AGS_State.E_AGS_ON_RANK;\n }\n\n // Guide on the star at pixel coords X,Y\n else if( mode == AutoguideMode.PIXEL )\n {\n\tint i1 = (int)\n\t ( Math.rint( a.getXPixel() * 1000.0 ) );\n\n\tint i2 = (int)\n\t ( Math.rint( a.getYPixel() * 1000.0 ) );\n\n\tttlAG.guideOnPixel( i1, i2 );\n\tdesired = AGS_State.E_AGS_ON_PIXEL;\n }\n\n\n // wait for AGS state change and see if it's the desired one\n // after 200 seconds\n int sleep = 5000;\n while( ( ttlAG.get_AGS_State() == AGS_State.E_AGS_WORKING )&&\n\t ( slept < TIMEOUT ) )\n {\n\n\ttry\n\t{\n\t Thread.sleep( sleep );\n\t slept += sleep;\n\t}\n\tcatch( InterruptedException ie )\n\t{\n\t logger.log( 1, logName, ie.toString() );\n\t}\n }\n\n AGS_State actual = ttlAG.get_AGS_State();\n if( actual != desired )\n {\n\tString s = ( \"after \"+slept+\"ms AGS has acheived \"+actual.getName()+\n\t\t \" state, desired state is \"+desired.getName() );\n\tcommandDone.setErrorMessage( s );\n\tlogger.log( 1, logName, s );\n\treturn;\n }\n\n\n // get x,y of guide star depending on mode and check for age of\n // returned centroids - centroids MUST have been placed SINCE this\n // cmd impl was started.\n TTL_AutoguiderCentroid centroid;\n\n // sleep for 0.5 sec to check values have been updated\n int updateSleep = 500;\n do\n {\n\ttry\n\t{\n\t Thread.sleep( 500 );\n\t slept += 500;\n\t}\n\tcatch( InterruptedException ie )\n\t{\n\t logger.log( 1, logName, ie.toString() );\n\t}\n\n\tcentroid = ttlAG.getCentroidData();\n }\n while( centroid.getTimestamp().getSeconds() < start.getSeconds() );\n\n guideStar = ttlAG.getGuideTarget( centroid );\n\n }\n catch( TTL_SystemException se )\n {\n\n }\n\n stopGuiding = false;\n new Thread( this ).start();\n\n commandDone.setSuccessful( true );\n }",
"@Override\n public void robotInit() {\n\n // BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTRUCTORS\n drive = new Drive();\n pDP = new PDP();\n\n // END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTRUCTORS\n // OI must be constructed after subsystems. If the OI creates Commands\n //(which it very likely will), subsystems are not guaranteed to be\n // constructed yet. Thus, their requires() statements may grab null\n // pointers. Bad news. Don't move it.\n oi = new OI();\n camera1 = CameraServer.getInstance().startAutomaticCapture(0);\n camera2 = CameraServer.getInstance().startAutomaticCapture(1);\n camera1.setConnectionStrategy(VideoSource.ConnectionStrategy.kKeepOpen);\n camera2.setConnectionStrategy(VideoSource.ConnectionStrategy.kKeepOpen);\n server = CameraServer.getInstance().getServer();\n flipped = true;\n server.setSource(camera1);\n vexGyro = new AnalogGyro(0);\n vexGyro.setSensitivity(.00175);\n //rightEncoder = new Encoder(0, 1, false);\n //leftEncoder = new Encoder(2, 3, true);\n // Add commands to Autonomous Sendable Chooser\n // BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=AUTONOMOUS\n\n chooser.setDefaultOption(\"Autonomous Command\", new AutonomousCommand());\n PixyCamBlock centerBlock = PixyCam2.GetCentermostBlock();\n if(centerBlock == null)\n {\n SmartDashboard.putString(\"target good? \", \"no, is null\");\n }\n else{\n String out = \"Center Block, X: \"+centerBlock.xCenter + \" Y: \"+centerBlock.yCenter;\n SmartDashboard.putString(\"center block data \", out);\n if (centerBlock.yCenter < 200){\n SmartDashboard.putString(\"target good?\", \"YES!!! ycenter less than 200\");\n }\n }\n \n \n\n\n \n \n // END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=AUTONOMOUS\n SmartDashboard.putData(\"Auto mode\", chooser);\n SmartDashboard.putBoolean(\"isFlipped\", flipped);\n SmartDashboard.putNumber(\"right encoder\", drive.getRightEncoder());\n SmartDashboard.putNumber(\"left encoder\", drive.getLeftEncoder());\n }",
"private void actionChangedEstimatorSettingsAuto ()\r\n\t{\r\n\t\tmainFormLink.getComponentPanelLeft().getCombobobxEstimatorBacteriaType().setEnabled(false);\r\n\t\tmainFormLink.getComponentPanelLeft().getComboboxEstimatorDrugType().setEnabled(false);\r\n\t}",
"@Override\n\tpublic void autonomousPeriodic() //runs the autonomous mode, repeating every 20ms\n\t{\n\t\tScheduler.getInstance().run();\n\t\tSmartDashboard.putNumber(\"Encoder Left: \", RobotMap.encoderLeft.getRaw()); //putting the value of the left encoder to the smartDashboard\n\t\tSmartDashboard.putNumber(\"Encoder Right: \", RobotMap.encoderRight.getRaw()); //putting the value of the right encoder to the smartDashboard\n\t\tSmartDashboard.putNumber(\"Ultrasonic sensor\", ultrasonic.getDistanceIn()); //putting the value of the ultrasonic sensor to the smartDashboard\n\t\tdriveExecutor.execute(); //running the execute() method in driveExecutor\n\t\tgrab.execute(); //running the execute() method in GearGrab_Command (should run without this but this is ensuring us that it is on)\n\t}",
"private void changeUIMode(int mode){\n findViewById(R.id.ui_circle_thermostat).setVisibility(View.GONE);\n findViewById(R.id.ui_coinstack_thermometer).setVisibility(View.GONE);\n findViewById(R.id.saving_text1).setVisibility(View.GONE);\n\n if(mode == 0){\n mSavingText = (TextView) findViewById(R.id.saving_text);\n mTargetTempText = (TextView) findViewById(R.id.target_temp);\n\n findViewById(R.id.ui_circle_thermostat).setVisibility(View.VISIBLE);\n findViewById(R.id.coin_view).setVisibility(View.VISIBLE);\n }else if(mode == 1){\n mSavingText = (TextView) findViewById(R.id.saving_text1);\n mTargetTempText = (TextView) findViewById(R.id.target_thermometer_temp);\n\n findViewById(R.id.ui_coinstack_thermometer).setVisibility(View.VISIBLE);\n findViewById(R.id.thermometer).setVisibility(View.VISIBLE);\n mSavingText.setVisibility(View.VISIBLE);\n }else if(mode == 2){\n mTargetTempText = (TextView) findViewById(R.id.target_temp);\n mSavingText = (TextView) findViewById(R.id.saving_text1);\n\n findViewById(R.id.ui_circle_thermostat).setVisibility(View.VISIBLE);\n findViewById(R.id.ui_coinstack_thermometer).setVisibility(View.VISIBLE);\n mCoinStackImg.setVisibility(View.VISIBLE);\n mSavingText.setVisibility(View.VISIBLE);\n\n findViewById(R.id.thermometer).setVisibility(View.GONE);\n findViewById(R.id.coin_view).setVisibility(View.GONE);\n }\n updateViews();\n }",
"public void autoMode1Blue(int delay){\n \taddParallel(new LightCommand(0.5));\n// \taddSequential(new OpenGearSocketCommand());\n//\t\taddSequential(new OpenBoilerSocketCommand());\n\t\taddParallel(new EnvelopeCommand(true));\n \taddSequential(new AutoDriveUltraSonicForwardCommand(.6, 7));\n \taddSequential(new WaitCommand(2));\n// \tif(Robot.envelopeSubsystem.gearCheck()){\n// \t\taddParallel(new EnvelopeCommand(false));\n// \t\taddSequential(new AutoDriveUltraSonicBackwardCommand(-.7, 35));\n// \t\taddSequential(new VisionGearTargetCommand(\"targets\"));\n// \t\taddSequential(new TargetGearSortCommand());\n// \t\taddSequential(new AutoTurnCommand());\n// \t\taddParallel(new EnvelopeCommand(true));\n// \taddSequential(new AutoDriveUltraSonicForwardCommand(.6, 7));\n// \t\taddSequential(new WaitCommand(2));\n// \t}\n \taddParallel(new EnvelopeCommand(false));\n \taddSequential(new AutoDriveCommand(-1));\n \taddSequential(new TurnWithPIDCommand(100));\n \taddSequential(new AutoDriveUltraSonicForwardCommand(1, 45));\n \taddSequential(new VisionBoilerTargetCommand(\"targets\"));\n\t\taddSequential(new TargetBoilerSortCommand());\n\t\taddSequential(new AutoTurnCommand());\n \taddSequential(new ShootCommand(true,.85));\n \t\n }",
"@Override\n\tpublic void robotInit() {\n\t\tdrive = new Drive();\n\t\tintake = new Intake();\n\t\tshooter = new Shooter();\n\t\taimShooter = new AimShooter();\n\t\tvision = new Vision();\n\t\tintakeRoller = new IntakeRoller();\n\t\taManipulators = new AManipulators();\n\t\tshooterLock = new ShooterLock();\n\n\t\t// autochooser\n\t\t// autoChooser = new SendableChooser();\n\n\t\toi = new OI();\n\t\t// instantiate the command used for the autonomous period\n\t\tlowGearCommand = new LowGear();\n\n\t\t// auto chooser commands\n\t\t// autoChooser.addDefault(\"FarLeftAuto\", new FarLeftAuto());\n\t\t// autoChooser.addObject(\"MidLeftAuto\", new MidLeftAuto());\n\t\t// autoChooser.addObject(\"MidAuto\", new MidAuto());\n\t\t// autoChooser.addObject(\"MidRightAuto\", new MidRightAuto());\n\t\t// autoChooser.addObject(\"FarRightAuto\", new FarRightAuto());\n\t\t// autoChooser.addObject(\"Uber Auto\", new UberAuto());\n\t\t// autoChooser.addObject(\"Paper Weight\", new PaperWeightAuto());\n\t\t//\n\t\t// SmartDashboard.putData(\"Autonomous\", autoChooser);\n\n\t\t// autonomousCommand = (Command) autoChooser.getSelected();\n\t\tautonomousCommand = new FarLeftAuto();\n\t\t// autonomousCommand = new MidAuto();\n\t\t// CameraServer.getInstance().startAutomaticCapture(\"cam3\");\n\t\t// autonomousCommand = new FarLeftAuto\n\n\t\tpovUpTrigger.whenActive(new MoveActuatorsUp());\n\t\tpovDownTrigger.whenActive(new MoveActuatorsDown());\n\t}",
"@Override\n public void runOpMode() {\n hw = new RobotHardware(robotName, hardwareMap);\n rd = new RobotDrive(hw);\n rs=new RobotSense(hw, telemetry);\n /*rd.moveDist(RobotDrive.Direction.FORWARD, .5, .3);\n rd.moveDist(RobotDrive.Direction.REVERSE, .5, .3);\n rd.moveDist(RobotDrive.Direction.FORWARD, .5, 1);\n rd.moveDist(RobotDrive.Direction.REVERSE, .5, 1);*/\n telemetry.addData(\"Ready! \", \"Go Flamangos!\"); \n telemetry.update();\n\n //Starting the servos in the correct starting position\n /*hw.armRight.setPosition(1-.3);\n hw.armLeft.setPosition(.3);\n hw.level.setPosition(.3+.05);*/\n hw.f_servoLeft.setPosition(1);\n hw.f_servoRight.setPosition(0.5);\n \n rd.moveArm(hw.startPos());\n waitForStart();\n while (opModeIsActive()) {\n \n /*Starting close to the bridge on the building side\n Move under the bridge and push into the wall*/\n rd.moveDist(RobotDrive.Direction.LEFT,2,.5);\n rd.moveDist(RobotDrive.Direction.FORWARD, 10, .5);\n break;\n }\n }",
"public void autonomous() {\n /*myRobot.setSafetyEnabled(false);\n myRobot.drive(-0.5, 0.0);\t// drive forwards half speed\n Timer.delay(2.0);\t\t// for 2 seconds\n myRobot.drive(0.0, 0.0);\t// stop robot\n */\n \t/*gyro.reset();\n \twhile(isAutonomous()){\n \t\tdouble angle = gyro.getAngle();\n \tmyRobot.drive(0, -angle * Kp);\t\n \tTimer.delay(.004);\n \t}\n \tmyRobot.drive(0.0, 0.0);\n \t*/\n }",
"protected void choixModeTri(){\r\n boolean choix = false;\r\n OPMode.menuChoix=true;\r\n OPMode.telemetryProxy.addLine(\"**** CHOIX DU MODE DE TRI ****\");\r\n OPMode.telemetryProxy.addLine(\" Bouton X : GAUCHE\");\r\n OPMode.telemetryProxy.addLine(\" Bouton B : DROITE\");\r\n OPMode.telemetryProxy.addLine(\" Bouton Y : UNE SEULE COULEUR\");\r\n OPMode.telemetryProxy.addLine(\" Bouton A : MANUEL\");\r\n OPMode.telemetryProxy.addLine(\" CHOIX ? .........\");\r\n OPMode.telemetryProxy.update();\r\n while (!choix){\r\n if (gamepad.x){\r\n OPMode.modeTri = ModeTri.GAUCHE;\r\n choix = true;\r\n }\r\n if (gamepad.b){\r\n OPMode.modeTri = ModeTri.DROITE;\r\n choix = true;\r\n }\r\n if (gamepad.y){\r\n OPMode.modeTri = ModeTri.UNI;\r\n choix = true;\r\n }\r\n if (gamepad.a){\r\n OPMode.modeTri = ModeTri.MANUEL;\r\n choix = true;\r\n }\r\n }\r\n OPMode.menuChoix = false;\r\n\r\n }",
"public static void autoInit() {\n\t\tint col = allianceChooser.getSelected();\n\t\tRobot.navX.reset();\n\t\tif (col == 1) {\n\t\t\tRobot.redLight.set(false);\n\t\t\tRobot.blueLight.set(false);\n\t\t\tRobot.backLight.set(false);\n\t\t}\n\t\tif (col == 2) {\n\t\t\tRobot.redLight.set(true);\n\t\t\tRobot.backLight.set(true);\n\t\t\tRobot.blueLight.set(false);\n\t\t}\n\t\tif (col == 3) {\n\t\t\tRobot.redLight.set(false);\n\t\t\tRobot.backLight.set(false);\n\t\t\tRobot.blueLight.set(true);\n\t\t}\n\t\tint numchoose = chooser.getSelected();\n\t\t//numchoose = 2;\n\t\tif (numchoose == 1)\n\t\t\tmid();//moveDistance(1.4, 0, Robot.navX.getFusedHeading(), 130);\n\t\tif (numchoose == 2)\n\t\t\tleft();\n\t\tif (numchoose == 3)\n\t\t\tmid();\n\t\tif (numchoose == 4)\n\t\t\tright();\n\t\tif (numchoose == 5)\n\t\t\tLeftVis();\n\t\tif (numchoose == 6)\n\t\t\tMidVis();\n\t\tif (numchoose == 7)\n\t\t\tRightVis();\n\t\tif (numchoose == 8)\n\t\t\tshootRedDirect();\n\t\tif (numchoose == 9)\n\t\t\tshooterRedHopper();\n\t\tif (numchoose == 10)\n\t\t\tshooterBlueHopper();\n\n\t}",
"@Override\n public void runOpMode() {\n float strafeRight;\n float strafeLeft;\n\n frontRight = hardwareMap.dcMotor.get(\"frontRight\");\n backRight = hardwareMap.dcMotor.get(\"backRight\");\n frontLeft = hardwareMap.dcMotor.get(\"frontLeft\");\n backLeft = hardwareMap.dcMotor.get(\"backLeft\");\n flipper = hardwareMap.crservo.get(\"flipper\");\n\n // Put initialization blocks here.\n frontRight.setDirection(DcMotorSimple.Direction.REVERSE);\n backRight.setDirection(DcMotorSimple.Direction.REVERSE);\n waitForStart();\n while (opModeIsActive()) {\n // Power to drive\n frontRight.setPower(gamepad1.right_stick_y * 0.5);\n frontRight.setPower(gamepad1.right_stick_y * 0.75);\n backRight.setPower(gamepad1.right_stick_y * 0.75);\n frontLeft.setPower(gamepad1.left_stick_y * 0.75);\n backLeft.setPower(gamepad1.left_stick_y * 0.75);\n flipper.setPower(gamepad2.left_stick_y);\n // Strafing code\n strafeRight = gamepad1.right_trigger;\n strafeLeft = gamepad1.left_trigger;\n if (strafeRight != 0) {\n frontLeft.setPower(-(strafeRight * 0.8));\n frontRight.setPower(strafeRight * 0.8);\n backLeft.setPower(strafeRight * 0.8);\n backRight.setPower(-(strafeRight * 0.8));\n } else if (strafeLeft != 0) {\n frontLeft.setPower(strafeLeft * 0.8);\n frontRight.setPower(-(strafeLeft * 0.8));\n backLeft.setPower(-(strafeLeft * 0.8));\n backRight.setPower(strafeLeft * 0.8);\n }\n // Creep\n if (gamepad1.dpad_up) {\n frontRight.setPower(-0.4);\n backRight.setPower(-0.4);\n frontLeft.setPower(-0.4);\n backLeft.setPower(-0.4);\n } else if (gamepad1.dpad_down) {\n frontRight.setPower(0.4);\n backRight.setPower(0.4);\n frontLeft.setPower(0.4);\n backLeft.setPower(0.4);\n } else if (gamepad1.dpad_right) {\n frontRight.setPower(-0.4);\n backRight.setPower(-0.4);\n } else if (gamepad1.dpad_left) {\n frontLeft.setPower(-0.4);\n backLeft.setPower(-0.4);\n }\n if (gamepad1.x) {\n frontLeft.setPower(1);\n backLeft.setPower(1);\n frontRight.setPower(1);\n backRight.setPower(1);\n sleep(200);\n frontRight.setPower(1);\n backRight.setPower(1);\n frontLeft.setPower(-1);\n backLeft.setPower(-1);\n sleep(700);\n }\n telemetry.update();\n }\n }",
"@Override\n public void runOpMode() {\n RobotMain main = new RobotMain(this,hardwareMap,telemetry);\n\n //initialize controls\n imuTeleOpDualGamepad control = new imuTeleOpDualGamepad(main,gamepad1,gamepad2);\n\n waitForStart();\n\n //Pull the tail back from autonomous\n main.JewelArm.setServo(.65);\n\n //Continually run the control program in the algorithm\n while (opModeIsActive()) control.run();\n }",
"@Override\n\tpublic void robotInit() {\n\t\tSmartDashboard.putData(new TestLIDARCommand());\n\n\t\tdriveSubsystem = new DriveSubsystem();\n\t\tshooterSubsystem = new ShooterSubsystem();\n\t\tfeederSubsystem = new FeederSubsystem();\n\t\tintakeSubsystem = new IntakeSubsystem();\n\t\tgearSubsystem = new GearSubsystem();\n\t\tclimberSubsystem = new ClimberSubsystem();\n\t\tcameraSubsystem = new CameraSubsystem();\n\n\t\tnavigator = new Navigator();\n\t\toi = new OI();\n\n\t\tm_chooser = new SendableChooser<>();\n\t\tm_chooser.addDefault(\"Do Nothing\", new PistonReleaseCommand());\n\t\t//m_chooser.addObject(\"Boiler Auto (side hopper)\", new SelectBoilerAutoCommand());\n\t\tm_chooser.addObject(\"Boiler Auto (front hopper)\", new SelectBoilerAutoFrontCommand());\n\t\tm_chooser.addObject(\"Test drive straight\", new MeasureDistanceCommand(1500, 100000));\n\t\tm_chooser.addObject(\"Test max speed\", new TimedDriveCommand(5.0, 1.00));\n\t\tm_chooser.addObject(\"Gear Auto (boiler)\", new SelectGearBoilerCommand());\n\t\tm_chooser.addObject(\"Gear Auto (feeder)\", new SelectGearFeederCommand());\n\t\tm_chooser.addObject(\"Gear Auto (middle)\", new SelectGearMiddleAutoCommand());\n\t\tSmartDashboard.putData(\"Auto mode\", m_chooser);\n\n\t\tRobot.navigator.startMeasuringDistance();\n\t}",
"@Override\r\n public void runOpMode() {\n robot.init(hardwareMap);\r\n\r\n telemetry.addData(\"Status\", \"Initialized\");\r\n telemetry.update();\r\n\r\n //Wait for the Pressing of the Start Button\r\n waitForStart();\r\n\r\n // run until the end of the match (driver presses STOP)\r\n while (opModeIsActive()) {\r\n\r\n motorSpeed[0] = driveSpeed(gamepad1.left_stick_x, gamepad1.left_stick_y, gamepad2.left_stick_x)[0];\r\n motorSpeed[1] = driveSpeed(gamepad1.left_stick_x, gamepad1.left_stick_y, gamepad2.left_stick_x)[1];\r\n motorSpeed[2] = driveSpeed(gamepad1.left_stick_x, gamepad1.left_stick_y, gamepad2.left_stick_x)[2];\r\n motorSpeed[3] = driveSpeed(gamepad1.left_stick_x, gamepad1.left_stick_y, gamepad2.left_stick_x)[3];\r\n\r\n robot.drive1.setPower(motorSpeed[0]);\r\n robot.drive1.setPower(motorSpeed[1]);\r\n robot.drive1.setPower(motorSpeed[2]);\r\n robot.drive1.setPower(motorSpeed[3]);\r\n\r\n telemetry.addData(\"Drive 1 Speed\", motorSpeed[0]);\r\n telemetry.addData(\"Drive 2 Speed\", motorSpeed[1]);\r\n telemetry.addData(\"Drive 3 Speed\", motorSpeed[2]);\r\n telemetry.addData(\"Drive 4 Speed\", motorSpeed[3]);\r\n telemetry.update();\r\n\r\n }\r\n }",
"@Override\n\tpublic void autonomousInit() {\n\t\tRobot.driveSubsystem.shiftDown();\n\n\t\tRobot.driveSubsystem.setBrakeMode();\n\n\t\tm_autoCmd = m_chooser.getSelected();\n\t\tif (m_autoCmd != null) {\n\t\t\tm_autoCmd.start();\n\t\t}\n\t}",
"String getACModeName();",
"public void autoMode4Red(int delay){\n \taddParallel(new LightCommand(0.25));\n// \taddSequential(new OpenGearSocketCommand());\n//\t\taddSequential(new OpenBoilerSocketCommand());\n \taddSequential(new AutoDriveCommand(6));\n \taddSequential(new TurnWithPIDCommand(-45)); \n \taddSequential(new WaitWithoutCheckCommand(.5));\n \taddSequential(new VisionGearTargetCommand(\"targets\"));\n \taddSequential(new TargetGearSortCommand());\n \taddSequential(new AutoTurnCommand());\n \taddParallel(new EnvelopeCommand(true));\n \taddSequential(new AutoDriveUltraSonicForwardCommand(.6, 7));\n \taddSequential(new WaitCommand(2));\n// \tif(Robot.envelopeSubsystem.gearCheck()){\n// \t\taddParallel(new EnvelopeCommand(false));\n// \t\taddSequential(new AutoDriveUltraSonicBackwardCommand(-.7, 35));\n// \t\taddSequential(new VisionGearTargetCommand(\"targets\"),0.5);\n// \t\taddSequential(new TargetGearSortCommand(),0.5);\n// \t\taddSequential(new AutoTurnCommand());\n// \t\taddParallel(new EnvelopeCommand(true));\n// \taddSequential(new AutoDriveUltraSonicForwardCommand(.6, 7));\n// \t\taddSequential(new WaitCommand(2));\n// \t}else{\n// \t\n// \t}\n }",
"private void actionChangedEstimatorSettingsManual ()\r\n\t{\r\n\t\tmainFormLink.getComponentPanelLeft().getCombobobxEstimatorBacteriaType().setEnabled(true);\r\n\t\tmainFormLink.getComponentPanelLeft().getComboboxEstimatorDrugType().setEnabled(true);\r\n\t}",
"public void operatorDrive() {\n\n changeMode();\n checkForGearShift();\n\n if (Robot.rightJoystick.getRawButton(1)) {\n currentMode = DriveMode.AUTO;\n\n } else if (Robot.rightJoystick.getRawButton(2)) {\n currentMode = DriveMode.CLIMB;\n } else {\n currentMode = DEFAULT_MODE;\n }\n\n isDeploying = false;\n\n if (currentMode == DriveMode.AUTO) {\n currentMode_s = \"Auto\";\n } else if (currentMode == DriveMode.ARCADE) {\n currentMode_s = \"Arcade\";\n } else {\n currentMode_s = \"Tank\";\n }\n\n double leftY = 0;\n double rightY = 0;\n\n switch (currentMode) {\n\n case AUTO:\n rotateCam(4, Robot.visionTargetInfo.visionPixelX);\n\n // driveFwd(4, .25);\n\n break;\n\n case CLIMB:\n\n climb();\n\n break;\n\n case ARCADE:\n resetAuto();\n double linear = 0;\n double turn = 0;\n\n if (Math.abs(Robot.rightJoystick.getY()) > deadband) {\n linear = -Robot.rightJoystick.getY();\n }\n if (Math.abs(Robot.leftJoystick.getX()) > deadband) {\n turn = Math.pow(Robot.leftJoystick.getX(), 3);\n }\n\n leftY = -linear - turn;\n rightY = linear - turn;\n if (!isShifting) {\n assignMotorPower(rightY, leftY);\n } else {\n\n assignMotorPower(0, 0);\n }\n\n break;\n\n case TANK:\n\n resetAuto();\n if (Math.abs(Robot.rightJoystick.getY()) > deadband) {\n rightY = -Math.pow(Robot.rightJoystick.getY(), 3 / 2);\n }\n if (Math.abs(Robot.leftJoystick.getY()) > deadband) {\n leftY = Math.pow(Robot.leftJoystick.getY(), 3 / 2);\n }\n if (!isShifting) {\n assignMotorPower(rightY, leftY);\n } else {\n\n assignMotorPower(0, 0);\n }\n break;\n\n default:\n break;\n }\n\n updateTelemetry();\n }",
"protected void initialize() {\n \tif (temp.equalsIgnoreCase(\"RRR\")) {\n\t\t\tauto = AutoSelect.RightRightRight;\n\t\t}else if (temp.equalsIgnoreCase(\"RRL\")) {\n\t\t\tauto = AutoSelect.RightRightLeft;\n\t\t}else if (temp.equalsIgnoreCase(\"RLR\")) {\n\t\t\tauto = AutoSelect.RightLeftRight;\n\t\t}else if (temp.equalsIgnoreCase(\"RLL\")) {\n\t\t\tauto = AutoSelect.RightLeftLeft;\n\t\t}else if (temp.equalsIgnoreCase(\"LRR\")) {\n\t\t\tauto = AutoSelect.LeftRightRight;\n\t\t}else if (temp.equalsIgnoreCase(\"LRL\")) {\n\t\t\tauto = AutoSelect.LeftRightLeft;\n\t\t}else if (temp.equalsIgnoreCase(\"LLR\")) {\n\t\t\tauto = AutoSelect.LeftLeftRight;\n\t\t}else {\n\t\t\tauto = AutoSelect.LeftLeftLeft;\n\t\t}\n \t\n \tDriverStation.reportError(\"------------------------------------------------\", false);\n \tDriverStation.reportError(\"-------------------AutonomousMid----------------\", false);\n \tDriverStation.reportError(\"------------------\" + auto + \"--------------\", false);\n \tDriverStation.reportError(\"------------------------------------------------\", false);\n }",
"public void autonomous() {\n robot.drive(0.5); //Drives in a square\n Timer.delay(0.5);\n robot.tankDrive(0.5, -0.5);\n Timer.delay(0.25);\n robot.drive(0.5);\n Timer.delay(0.5);\n robot.tankDrive(0.5, -0.5);\n Timer.delay(0.25);\n robot.drive(0.5);\n Timer.delay(0.5);\n robot.tankDrive(0.5, -0.5);\n Timer.delay(0.25);\n robot.drive(0.5);\n Timer.delay(0.5);\n robot.tankDrive(0.5, -0.5);\n Timer.delay(0.25);\n }",
"void setMotorsMode(DcMotor.RunMode runMode);",
"@Override\n public void runOpMode() {\n ringShooterMotor1 = hardwareMap.get(DcMotorEx.class, \"ringShooterMotor1\");\n ringShooterMotor2 = hardwareMap.get(DcMotorEx.class, \"ringShooterMotor2\");\n ringFeederServo = hardwareMap.get(Servo.class, \"ringFeederServo\");\n ringFeederServo.setPosition(0.6); // sets initial position of servo\n\n\n // Wait for the game to start (driver presses PLAY)\n waitForStart();\n\n // runs until the end of the match (driver presses STOP)\n while (opModeIsActive()) {\n\n // here: add telemetry to see motor velocity if you want\n telemetry.addData(\"ring motor velocity\", ringShooterMotor1.getVelocity());\n telemetry.update();\n\n\n // Press right trigger for ring feeder servo\n if (gamepad2.right_trigger == 1) {\n// if (ringShooterMotor1.getVelocity() <= powerShootMotorVelocity){\n ringFeederServo.setPosition(1);\n sleep(300);\n ringFeederServo.setPosition(0.6);\n// }\n }\n\n // press Y for shooter motor for tower goal\n if (gamepad2.y) {\n ringShooterMotor1.setVelocity(towerGoalMotorVelocity);\n ringShooterMotor2.setVelocity(towerGoalMotorVelocity);\n\n }\n\n // press X for shooter motor for powershot\n if (gamepad2.x) {\n ringShooterMotor1.setVelocity(powerShootMotorVelocity);\n ringShooterMotor2.setVelocity(powerShootMotorVelocity);\n\n }\n }\n }",
"public void robotInit() {\n RobotMap.init();\n driveTrain = new DriveTrain();\n oi = new OI();\n flippy = new Flipper();\n flappy = new Flapper();\n autonomousCommand = new AutoFlip();\n \n OI.init();\n CommandBase.init();\n autoChooser = new SendableChooser();\n autoChooser.addDefault(\"Flap Left\", new AutoFlip());\n SmartDashboard.putData(\"Autonomous_Mode\", autoChooser); \n }",
"@Override\n\tpublic void autonomousPeriodic() {\n\t\tswitch (m_autoSelected) {\n\t\t\tcase kCustomAuto:\n\t\t\t\t// Put custom auto code here\n\t\t\t\tbreak;\n\t\t\tcase kDefaultAuto:\n\t\t\tdefault:\n\t\t\t\t// Put default auto code here\n\t\t\t\tbreak;\n\t\t}\n\t}",
"@Override\n\tpublic void autonomousPeriodic() {\n\t\tswitch (m_autoSelected) {\n\t\t\tcase kCustomAuto:\n\t\t\t\t// Put custom auto code here\n\t\t\t\tbreak;\n\t\t\tcase kDefaultAuto:\n\t\t\tdefault:\n\t\t\t\t// Put default auto code here\n\t\t\t\tbreak;\n\t\t}\n\t}"
] | [
"0.69108605",
"0.6875947",
"0.6748199",
"0.662725",
"0.66085553",
"0.65296865",
"0.6484286",
"0.6482721",
"0.6420751",
"0.63882685",
"0.6360747",
"0.63457465",
"0.6341353",
"0.63260144",
"0.63260144",
"0.63260144",
"0.63260144",
"0.6320272",
"0.6299703",
"0.6289783",
"0.6287832",
"0.6268987",
"0.6265186",
"0.6255441",
"0.6216347",
"0.6216347",
"0.61951154",
"0.61766934",
"0.6137549",
"0.6129865",
"0.61208344",
"0.6110339",
"0.61074",
"0.6104217",
"0.60919195",
"0.60857725",
"0.60777235",
"0.5997661",
"0.5980754",
"0.59642106",
"0.59560466",
"0.59071153",
"0.5904613",
"0.5888837",
"0.58808434",
"0.5880284",
"0.58383447",
"0.579035",
"0.5733779",
"0.5711664",
"0.5710227",
"0.56838363",
"0.56779903",
"0.56685174",
"0.56498855",
"0.56401557",
"0.5635791",
"0.5634852",
"0.5630362",
"0.56028074",
"0.55951416",
"0.55935895",
"0.55822384",
"0.5563288",
"0.5563288",
"0.5563288",
"0.5563288",
"0.55627567",
"0.5545784",
"0.5545141",
"0.5529102",
"0.5525649",
"0.55135983",
"0.5502579",
"0.54916483",
"0.54869413",
"0.5480543",
"0.5473441",
"0.5460016",
"0.54551315",
"0.5435826",
"0.543047",
"0.5418493",
"0.54126453",
"0.5399828",
"0.53940725",
"0.53922623",
"0.53899443",
"0.5387082",
"0.53749174",
"0.53726363",
"0.5360474",
"0.53534305",
"0.5349631",
"0.53492403",
"0.5344529",
"0.5339939",
"0.5337318",
"0.53360033",
"0.53360033"
] | 0.5369573 | 91 |
This function is called periodically during autonomous | public void autonomousPeriodic() {
//Scheduler.getInstance().run();
/** if(autoLoopCounter < 100) { //Checks to see if the counter has reached 100 yet
myRobot.drive(-0.5, 0.0); //If the robot hasn't reached 100 packets yet, the robot is set to drive forward at half speed, the next line increments the counter by 1
autoLoopCounter++;
} else {
myRobot.drive(0.0, 0.0); //If the robot has reached 100 packets, this line tells the robot to stop
}*/
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void autonomousPeriodic() {\n }",
"@Override\n public void autonomousPeriodic() {\n\n }",
"@Override\n public void autonomousPeriodic() {\n }",
"@Override\n public void autonomousPeriodic() {\n }",
"@Override\n public void autonomousPeriodic() {\n }",
"@Override\n public void autonomousPeriodic() {\n \n }",
"public void autonomousPeriodic()\r\n {\r\n \r\n }",
"public void autonomousPeriodic() {\r\n }",
"public void autonomousPeriodic() {\r\n }",
"public void autonomousPeriodic() {\n Scheduler.getInstance().run();\n drive.updateAuto();\n sensor.updateAuto();\n }",
"public void autonomousPeriodic() {\n \n }",
"public void autonomousPeriodic() {\n \tauto.autonomousPeriodic();\n\t}",
"public void autonomousPeriodic() {\n }",
"public void autonomousPeriodic() {\n }",
"public void autonomousPeriodic() {\n // RobotMap.helmsman.trackPosition();\n Scheduler.getInstance().run();\n }",
"public void autonomousPeriodic() {\n\n }",
"public void autonomousPeriodic() {\n\n }",
"public void autonomousPeriodic() {\r\n Scheduler.getInstance().run();\r\n }",
"public void autonomousPeriodic() {\r\n \r\n }",
"public void autonomousPeriodic() {\n Scheduler.getInstance().run();\n }",
"public void autonomousPeriodic() {\n Scheduler.getInstance().run();\n }",
"public void autonomousPeriodic() {\n Scheduler.getInstance().run();\n }",
"public void autonomousPeriodic() {\n Scheduler.getInstance().run();\n }",
"public void autonomousPeriodic() {\n Scheduler.getInstance().run();\n }",
"public void autonomousPeriodic() {\n Scheduler.getInstance().run();\n }",
"@Override\n public void autonomousPeriodic() {\n \n Scheduler.getInstance().run();\n \n }",
"public void autonomousPeriodic() \n {\n Scheduler.getInstance().run();\n }",
"public void autonomousPeriodic() {\r\n\t\tScheduler.getInstance().run();\r\n\t}",
"@Override\n public void autonomousPeriodic() {\n teleopPeriodic();\n //Scheduler.getInstance().run();\n }",
"public void autonomousPeriodic()\n\t{\n\t\tScheduler.getInstance().run();\n\t}",
"public void autonomousPeriodic() {\n\t\tScheduler.getInstance().run();\n\t\t\n shooterArm.updateSmartDashboard();\n\t\tdriveTrain.getDegrees();\n\n\t\tvision.findGoal();\n\t\tvision.getGoalXAngleError();\n\t\tvision.getGoalArmAngle();\n\n\t\t// Stop auto mode if the robot is tilted too much\n\t\tif (Math.abs(driveTrain.getRobotPitch())<=60 && Math.abs(driveTrain.getRobotRoll())<=60)\n\t\t\ttimerTilt.reset();\n\t\t\n\t\t// For some reason, robot did not move in last match in auto, so this code is suspect\n\t\t// Do the Pitch/Roll values need to be zeroed?\n//\t\tif ( autonomousCommand != null && timerTilt.get()>0.5)\n//\t\t\tautonomousCommand.cancel();\n\n\t}",
"@Override\n public void autonomousPeriodic() {\n\t// updateDiagnostics();9\n\tScheduler.getInstance().run();\n }",
"@Override\n\tpublic void autonomousPeriodic() {\n\t\tSmartDashboard.putNumber(\"Gyro\", Robot.drivebase.driveGyro.getAngle());\n\n\t\tScheduler.getInstance().run();\n\t\tisAutonomous = true;\n\t\tisTeleoperated = false;\n\t\tisEnabled = true;\n\t\tvisionNetworkTable.getGearData();\n\t\tvisionNetworkTable.showGearData();\n\t\tSmartDashboard.putNumber(\"GM ACTUAL POSITION\", Robot.gearManipulator.gearManipulatorPivot.getPosition());\n\t\t\n\t\tupdateLedState();\n\t\t//visionNetworkTable.getHighData();\n\t}",
"public void autonomousPeriodic() {\n if (m_apFirstRun) {\n System.out.println(\"Default autonomousPeriodic() method... Override me!\");\n m_apFirstRun = false;\n }\n }",
"@Override\n public void autonomousPeriodic() {\n \tbeginPeriodic();\n Scheduler.getInstance().run();\n endPeriodic();\n }",
"@Override\npublic void autonomousPeriodic() {\n\n}",
"@Override\n public void autonomousPeriodic() {\n Scheduler.getInstance().run();\n }",
"@Override\n public void autonomousPeriodic()\n {\n Scheduler.getInstance().run();\n }",
"@Override\n\tpublic void autonomousPeriodic() {\n\t\tScheduler.getInstance().run();\t\n\t}",
"public void teleopPeriodic() {\n Scheduler.getInstance().run();\n rumbleInYourPants();\n turnSpindleIfNeeded();\n turnWinchIfNeeded();\n if (arcadeDrive != null) \n arcadeDrive.start();\n }",
"@Override\n\tpublic void autonomousPeriodic() {\n\t\tif (state == \"auton\") {\n\t\t\tlastState = \"auton\";\n\t\t}\n\t\tScheduler.getInstance().run();\n\t\tSmartDashboard.putNumber(\"Left encoder\", Actuators.getLeftDriveMotor().getEncPosition());\n\t\tSmartDashboard.putNumber(\"Right encoder\", Actuators.getRightDriveMotor().getEncPosition());\n\t\tSmartDashboard.putNumber(\"Left speed\", Actuators.getLeftDriveMotor().get());\n\t\tSmartDashboard.putNumber(\"Right speed\", Actuators.getRightDriveMotor().get());\n\t\t\n\t\t\n\t}",
"@Override\n\tpublic void autonomousPeriodic() {\n\t\tScheduler.getInstance().run();\n\t}",
"@Override\n\tpublic void autonomousPeriodic() {\n\t\tScheduler.getInstance().run();\n\t}",
"@Override\n\tpublic void autonomousPeriodic() {\n\t\tScheduler.getInstance().run();\n\t}",
"@Override\n\tpublic void autonomousPeriodic() {\n\t\tScheduler.getInstance().run();\n\t}",
"@Override\n\tpublic void autonomousPeriodic() //runs the autonomous mode, repeating every 20ms\n\t{\n\t\tScheduler.getInstance().run();\n\t\tSmartDashboard.putNumber(\"Encoder Left: \", RobotMap.encoderLeft.getRaw()); //putting the value of the left encoder to the smartDashboard\n\t\tSmartDashboard.putNumber(\"Encoder Right: \", RobotMap.encoderRight.getRaw()); //putting the value of the right encoder to the smartDashboard\n\t\tSmartDashboard.putNumber(\"Ultrasonic sensor\", ultrasonic.getDistanceIn()); //putting the value of the ultrasonic sensor to the smartDashboard\n\t\tdriveExecutor.execute(); //running the execute() method in driveExecutor\n\t\tgrab.execute(); //running the execute() method in GearGrab_Command (should run without this but this is ensuring us that it is on)\n\t}",
"@Override\n public void autonomousPeriodic()\n {\n commonPeriodic();\n }",
"@Override\n public void robotPeriodic() {\n }",
"@Override\n public void robotPeriodic() {\n }",
"@Override\n public void robotPeriodic() {\n }",
"@Override\n public void robotPeriodic() {\n }",
"@Override\n public void robotPeriodic() {\n }",
"@Override\n public void robotPeriodic() {\n }",
"@Override\n public void periodic() {\n UpdateDashboard();\n }",
"@Override\n\tpublic void teleopPeriodic() {\n\t\tScheduler.getInstance().run();\n\t\tisAutonomous = false;\n\t\tisTeleoperated = true;\n\t\tisEnabled = true;\n\t\tupdateLedState();\n\t\t//SmartDashboard.putNumber(\"Gyro\", Robot.drivebase.driveGyro.getAngle());\n\t\tSmartDashboard.putNumber(\"Climber Current Motor 1\", Robot.climber.climberTalon.getOutputCurrent());\n\t\tSmartDashboard.putNumber(\"Climber Current motor 2\", Robot.climber.climberTalon2.getOutputCurrent());\n\t\t//visionNetworkTable.getGearData();\n\t//\tvisionNetworkTable.showGearData();\n\t\tSmartDashboard.putNumber(\"GM ACTUAL POSITION\", Robot.gearManipulator.gearManipulatorPivot.getPosition());\n\n\t\tif(Robot.debugging){\t\t\t\n\t\t\tSmartDashboard.putNumber(\"Shooter1RPM Setpoint\", shooter.shooter1.getSetpoint());\n\t \tSmartDashboard.putNumber(\"Intake Pivot Encoder Position\", Robot.gearManipulator.gearManipulatorPivot.getPosition());\n\t\n\t\t\tSmartDashboard.putNumber(\"Gear Manipulator Setpoint\", gearManipulator.gearManipulatorPivot.getSetpoint());\n\t\t}\n\t\t//\tvisionNetworkTable.getGearData();\n\t\t//visionNetworkTable.getHighData();\n\t}",
"@Override\n public void periodic() {\n // This method will be called once per scheduler run\n }",
"@Override\n public void autonomousPeriodic() \n {\n Scheduler.getInstance().run();\n log();\n }",
"@Override\n\tpublic void robotPeriodic() {\n\t}",
"@Override\n\tpublic void robotPeriodic() {\n\t}",
"public void teleopPeriodic() {\n\t\t// resetAndDisable();\n\t\tupdateDashboard();\n\t\tLogitechJoystick.controllers();\n\t\tDrivetrain.arcadeDrive();\n\t\tShooterAngleMotor.angleShooter();\n\t\tBallShooter.shootBalls();\n\t\tSonicSensor.updateSensors();\n\t\t\n\t\t//if(LogitechJoystick.rightBumper2)\n\t\t\t//{\n\t\t\t\t//LowBar.makeArmStable();\n\t\t\t//}\n\n\t}",
"@Override\n\tpublic void autonomousPeriodic() {\n\t\tScheduler.getInstance().run();\n\t\tlog();\n\t}",
"@Override\n public void periodic() {\n\n }",
"@Override\n public void periodic() {\n\n }",
"@Override\n public void teleopPeriodic() {\n CommandScheduler.getInstance().run();\n OI.getInstance().getPilot().run();\n SmartDashboard.putNumber(\"gyro\", getRobotContainer().getTecbotSensors().getYaw());\n SmartDashboard.putBoolean(\"isSpeed\", getRobotContainer().getDriveTrain().getTransmissionMode() == DriveTrain.TransmissionMode.speed);\n SmartDashboard.putString(\"DT_MODE\", getRobotContainer().getDriveTrain().getCurrentDrivingMode().toString());\n SmartDashboard.putNumber(\"x_count\", getRobotContainer().getClimber().getxWhenPressedCount());\n\n }",
"public void teleopPeriodic() {\n \t//getInstance().run();;\n \t//RobotMap.robotDrive1.arcadeDrive(oi.stickRight); //This line drives the robot using the values of the joystick and the motor controllers selected above\n \tScheduler.getInstance().run();\n\t\n }",
"@Override\n public void autonomousPeriodic() {\n \n //Switch is used to switch the autonomous code to whatever was chosen\n // on your dashboard.\n //Make sure to add the options under m_chooser in robotInit.\n switch (m_autoSelected) {\n case kCustomAuto:\n // Put custom auto code here\n break;\n case kDefaultAuto:\n default:\n if (m_timer.get() < 2.0){\n m_driveTrain.arcadeDrive(0.5, 0); //drive forward at half-speed\n } else {\n m_driveTrain.stopMotor(); //stops motors once 2 seconds have elapsed\n }\n break;\n }\n }",
"@Override\n\tpublic void autonomousPeriodic() {\n\t\tSmartDashboard.putNumber(\"Left Speed\", Robot.driveSubsystem.getLeftSpeed());\n\t\tSmartDashboard.putNumber(\"Right Speed\", Robot.driveSubsystem.getRightSpeed());\n\n\t\tScheduler.getInstance().run();\n\t}",
"public void updatePeriodic() {\r\n }",
"public void autonomous() {\n /*myRobot.setSafetyEnabled(false);\n myRobot.drive(-0.5, 0.0);\t// drive forwards half speed\n Timer.delay(2.0);\t\t// for 2 seconds\n myRobot.drive(0.0, 0.0);\t// stop robot\n */\n \t/*gyro.reset();\n \twhile(isAutonomous()){\n \t\tdouble angle = gyro.getAngle();\n \tmyRobot.drive(0, -angle * Kp);\t\n \tTimer.delay(.004);\n \t}\n \tmyRobot.drive(0.0, 0.0);\n \t*/\n }",
"@Override\n public void periodic() {\n\n }",
"@Override\n public void periodic() {\n\n }",
"@Override\n public void periodic() {\n\n }",
"@Override\n public void periodic() {\n\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }"
] | [
"0.8242393",
"0.8238804",
"0.8235853",
"0.8235853",
"0.8235853",
"0.820495",
"0.8199907",
"0.8194021",
"0.8194021",
"0.8177311",
"0.8151588",
"0.8147766",
"0.81250346",
"0.81250346",
"0.80807847",
"0.8016792",
"0.8016792",
"0.79744554",
"0.79655135",
"0.7948241",
"0.7948241",
"0.7948241",
"0.7948241",
"0.7948241",
"0.7948241",
"0.7943544",
"0.79032373",
"0.78828543",
"0.77641433",
"0.77600986",
"0.7759355",
"0.77590984",
"0.77569574",
"0.7660986",
"0.7649747",
"0.76439685",
"0.76273406",
"0.7605097",
"0.7603722",
"0.758448",
"0.75753826",
"0.7555205",
"0.7555205",
"0.7555205",
"0.7555205",
"0.7537244",
"0.75159377",
"0.75070035",
"0.75070035",
"0.75070035",
"0.75070035",
"0.75070035",
"0.75070035",
"0.74829936",
"0.7456864",
"0.74545246",
"0.743304",
"0.7385487",
"0.7385487",
"0.7343646",
"0.7335342",
"0.72733426",
"0.72733426",
"0.7264387",
"0.72604746",
"0.72574127",
"0.72546506",
"0.7238183",
"0.722407",
"0.7209448",
"0.7209448",
"0.7209448",
"0.7209448",
"0.7169939",
"0.7169939",
"0.7169939",
"0.7169939",
"0.7169939",
"0.7169939",
"0.7169939",
"0.7169939",
"0.7169939",
"0.7169939",
"0.7169939",
"0.7169939",
"0.7169939",
"0.7169939",
"0.7169939",
"0.7169939",
"0.7169939",
"0.7169939",
"0.7169939",
"0.7169939",
"0.7169939",
"0.7169939",
"0.7169939",
"0.7169939",
"0.7169939",
"0.7169939",
"0.7169939"
] | 0.7457939 | 54 |
This makes sure that the autonomous stops running when teleop starts running. If you want the autonomous to continue until interrupted by another command, remove this line or comment it out. if (autonomousCommand != null) autonomousCommand.cancel(); | public void teleopInit() {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void teleopInit() {\n\t// This makes sure that the autonomous stops running when\n\t// teleop starts running. If you want the autonomous to\n\t// continue until interrupted by another command, remove\n\t// this line or comment it out.\n\tif (autonomousCommand != null) {\n\t autonomousCommand.cancel();\n\t}\n }",
"@Override\n public void teleopInit() {\n if (m_autonomousCommand != null) {\n m_autonomousCommand.cancel();\n }\n }",
"@Override\n public void teleopInit()\n {\n if (autonomousCommand != null)\n {\n autonomousCommand.cancel();\n }\n }",
"public void teleopInit() {\n autonomousCommand.cancel();\n }",
"public void teleopInit() {\n\t\tautonomousCommand.cancel();\r\n\t}",
"public void teleopInit() {\n if (autonomousCommand != null) autonomousCommand.cancel();\n }",
"public void teleopInit() {\n if (autonomousCommand != null) autonomousCommand.cancel();\n }",
"@Override\n public void teleopInit() {\n if (autonomousCommand != null) autonomousCommand.cancel();\n \n\t\tprocessRobotModeChange(RobotMode.TELEOP);\n }",
"@Override\n\tpublic void teleopInit() //initialization of the teleoperated code\n\t{\n\t\tif (m_autonomousCommand != null) //if we have any autonomous code, end it\n\t\t{\n\t\t\tm_autonomousCommand.cancel();\n\t\t}\n\n\t}",
"@Override\n public void teleopInit() {\n if (autonomousCommand != null) \n {\n autonomousCommand.cancel();\n }\n\n new ArcadeDrive().start();\n\n new BackElevatorControl().start();\n\n new IntakeControl().start();\n\n new FrontElevatorManual().start();\n\n new ElevatorAutomatic().start();\n }",
"protected void initialize() {\n \tRobot.autonomous_command_group.cancel();\n }",
"public void autonomousPeriodic() {\n\t\tScheduler.getInstance().run();\n\t\t\n shooterArm.updateSmartDashboard();\n\t\tdriveTrain.getDegrees();\n\n\t\tvision.findGoal();\n\t\tvision.getGoalXAngleError();\n\t\tvision.getGoalArmAngle();\n\n\t\t// Stop auto mode if the robot is tilted too much\n\t\tif (Math.abs(driveTrain.getRobotPitch())<=60 && Math.abs(driveTrain.getRobotRoll())<=60)\n\t\t\ttimerTilt.reset();\n\t\t\n\t\t// For some reason, robot did not move in last match in auto, so this code is suspect\n\t\t// Do the Pitch/Roll values need to be zeroed?\n//\t\tif ( autonomousCommand != null && timerTilt.get()>0.5)\n//\t\t\tautonomousCommand.cancel();\n\n\t}",
"@Override\n\tpublic void teleopInit() {\n\t\tif (autonomousCommand != null)\n\t\t\tlowGearCommand.start();\n\t\tautonomousCommand.cancel();\n\t}",
"public void teleopInit() {\n\t\tif (autonomousCommand != null)\n\t\t\tautonomousCommand.cancel();\n\t\t\n//\t\tif ((intake.intakeIsUp() || intake.intakeSolenoidIsOff()) && shooterArm.getAngle() > 45) {\n//\t\t\traiseArm90.start();\t\t\t\n//\t\t}\n\t\tshooterArm.setBrakeOff();\n\t\t\n\t\tvision.enableCameraSaving();\n\t\tvision.setCameraPeriod(1);\n\t}",
"@Override\n\tpublic void teleopInit() {\n\n\t\tSystem.out.println(\"Teleop init\");\n\t\tif (autonomousCommand != null)\n\t\t\tautonomousCommand.cancel();\n\t\tScheduler.getInstance().add(new DriveCommand());\n\n\t\t\n\t}",
"@Override\n\tpublic void testInit() {\n\t\tif (autonomousCommand != null)\n ((Command) autonomousCommand).cancel();\n \n\t\tprocessRobotModeChange(RobotMode.TEST);\n\t}",
"@Override\n public void autonomousPeriodic() {\n teleopPeriodic();\n // Elevator.getInstance().setPosition(10000, count);\n // System.out.println(\"COUNT IS: \" + count);\n // count += 0.0001;\n\n Scheduler.getInstance().run();\n\n // if(Math.abs(OI.getInstance().getForward()) > 0.2){\n // autonCommand.cancel();\n // mAutoCancelled = true;\n // }\n\n // if(mAutoCancelled){\n // if(mInitCalled){\n // teleopPeriodic();\n // }\n // }\n\n // System.out.println(Drivetrain.getInstance().getRobotPos().getHeading());\n\n // System.out.println(Drivetrain.getInstance().getLeftMaster().getClosedLoopError() + \"\\t\\t\\t\" + Drivetrain.getInstance().getRightMaster().getClosedLoopError());\n }",
"public void teleopInit()\n\t{\n\t\tif (autonomousCommand != null)\n\t\t\tautonomousCommand.cancel();\n\t\tif (secondAuton != null)\n\t\t\tsecondAuton.cancel();\n\t\tif (isAuton && auton == \"Left\")\t{\n\t\t\tpostAuton.start();\n\t\t\tisAuton = false;\n\t\t}\n\t\tconveyor.setPlate(true);\n\t}",
"@Override\n\tpublic void autonomousInit() {\n\t\t//SmartDashboard.getData(\"Driver File\");\n\t\t//SmartDashboard.getData(\"Operator File\");\n\t\tautonomousCommand = chooser.getSelected();\n\t\tisAutonomous = true;\n\t\tisTeleoperated = false;\n\t\tisEnabled = true;\n\t\tRobot.numToSend = 3;\n\t\tdrivebase.resetGyro();\n\n\t\t/*\n\t\t * String autoSelected = SmartDashboard.getString(\"Auto Selector\",\n\t\t * \"Default\"); switch(autoSelected) { case \"My Auto\": autonomousCommand\n\t\t * = new MyAutoCommand(); break; case \"Default Auto\": default:\n\t\t * autonomousCommand = new ExampleCommand(); break; }\n\t\t */\n\n\t\t// schedule the autonomous command (example)\n\t\tRobot.gearManipulator.gearManipulatorPivot.setPosition(0);\n\t\tRobot.gearManipulator.gearManipulatorPivot.setSetpoint(0);\n\t\tif (autonomousCommand != null)\n\t\t\tautonomousCommand.start();\n\t}",
"public void teleopInit() {\n if (autonomousCommand != null) \n autonomousCommand.cancel();\n\n // RobotMap.enableUltrasonicTrigger(false);\n driveTrain.configForTeleopMode();\n }",
"@Override\n public void teleopInit() {\n Robot.drive.setDefaultCommand(new DriveCommand());\n if (autonomousCommand != null) autonomousCommand.cancel();\n System.out.println(\"teleopInit being called\");\n \n }",
"@Override\n public void autonomousInit() {\n //Diagnostics.writeString(\"State\", \"AUTO\");\n //m_autonomousCommand = m_chooser.getSelected();\n\n /*\n * String autoSelected = SmartDashboard.getString(\"Auto Selector\", \"Default\");\n * switch(autoSelected) { case \"My Auto\": autonomousCommand = new\n * MyAutoCommand(); break; case \"Default Auto\": default: autonomousCommand = new\n * ExampleCommand(); break; }\n */\n\n // schedule the autonomous command (example)\n /*if (m_autonomousCommand != null) {\n m_autonomousCommand.start();\n }*/\n\n teleopInit();\n }",
"@Override\n public void autonomousInit() {\n //ds.set(Value.kForward);\n /*m_autonomousCommand = m_chooser.getSelected();\n\n /*\n * String autoSelected = SmartDashboard.getString(\"Auto Selector\",\n * \"Default\"); switch(autoSelected) { case \"My Auto\": autonomousCommand\n * = new MyAutoCommand(); break; case \"Default Auto\": default:\n * autonomousCommand = new ExampleCommand(); break; }\n * \n */\n\n // schedule the autonomous command (example)\n /*if (m_autonomousCommand != null) {\n m_autonomousCommand.start();\n }*/\n //new VisionProcess().start();\n //SmartDashboard.putNumber(\"heerer\", value)\n new TeleOpCommands().start();\n }",
"@Override\n public void autonomousInit() {\n\tgameData.readGameData();\n\tautonomousCommand = (Command) chooserMode.getSelected();\n\tdriveSubsystem.resetEncoders();\n\televatorSubsystem.resetEncoder();\n\t// schedule the autonomous command\n\tif (autonomousCommand != null) {\n\t // SmartDashboard.putString(\"i\", \"nit\");\n\t autonomousCommand.start();\n\t}\n }",
"public void autonomousInit() {\n\t\tswitch (autoMode) {\r\n\t\tcase 0:\r\n\t\t\tauto = new G_NoAuto();\r\n\t\t\tbreak;\r\n\t\tcase 1:\r\n\t\t\tauto = new G_Step();\r\n\t\t\tbreak;\r\n\t\tcase 2:\r\n\t\t\tauto = new G_BlockThenFour();\r\n\t\t\tbreak;\r\n\t\tcase 3:\r\n\t\t\tauto = new G_BinTwoLeft();\r\n\t\t\tbreak;\r\n\t\tcase 4:\r\n\t\t\tauto = new G_StepBinCentre();\r\n\t\t\tbreak;\r\n\t\tcase 5:\r\n\t\t\tauto = new G_StepBinLeft();\t\r\n\t\t\tbreak;\r\n\t\tcase 6:\r\n\t\t\tauto = new G_Block();\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\t//Start the chosen Autonomous command. \r\n\t\tauto.start();\r\n\t\t//Cancel the tele-op command, in case it was running before autonomous began. \r\n\t\tteleop.cancel();\r\n\t\t// Start pushing sensor readings to the SD.\r\n\t\treadings.start();\r\n\r\n\t}",
"public void teleopContinuous() {\n //feed the watchdog\n myDog.feed();\n\n //check safestop button\n /*safestop commented out\n if (joysticks.getRightButton(10))//Buttons on top of right stick stops robot\n {\n safeStop();\n //delay to allow driver to release button\n Timer.delay(.1);\n myDog.feed();\n //at this point driver should have released the butto\n while (!joysticks.getRightTop()) {\n myDog.feed();\n }\n //now the button is pressed again, indicating a restart- the program can continue\n\n //slight delay to allow driver to release the button before the next loop\n Timer.delay(.1);\n }\n */\n\n //if arm is in teleop mode, handles input accordingly\n if (armState == TELEOP) {\n handleArmInput();\n }\n\n //if arm is in auto mode, checks whether user is pressing button 1 to regain\n //control and stops the auto task if so\n\n /*\n arm never goes to auto mode, so this is commented out\n\n (armState == AUTO) {\n //if the driver is attempting to cancel the task OR the task is done, return control\n //to the driver\n if (armJoystick.getRawButton(7) || !armTask.isRunning()) {\n armTask.interrupt();\n armTask.stop();\n armState = TELEOP;\n }\n }\n */\n\n //if drive is in teleop mode, handles input accordingly\n if (driveState == TELEOP) {\n try {\n handleDriveInput();\n } catch (EnhancedIOException e) {\n }\n\n }\n\n //if drive is in auto mode, checks whether user is trying to regain control\n /*not used\n if (driveState == AUTO) {\n //if the driver is attempting to cancel the task OR the task is done, return control\n //to the driver\n if (joysticks.getLeftButton(1) || !driveTask.isRunning()) {\n driveTask.interrupt();\n driveTask.stop();\n driveState = TELEOP;\n }\n }\n */\n\n\n printToScreen(\"Gyro Angle: \" + arm.gyro.getAngle());\n printToScreen(\"Arm Angle: \" + arm.getArmAngle());\n }",
"public void autonomousInit(){\n\t \t//resetAndDisableSystems();\n\t\t \n\t \tautonomousCommand = (Command) autoChooser.getSelected();\n\t \tautonomousCommand.start();\n\t \t\n\t \t\n\t }",
"public void autonomous() {\n for (int i = 0; i < teleopControllers.size(); i++) {\n ((EventController) teleopControllers.elementAt(i)).disable();\n }\n for (int i = 0; i < autoControllers.size(); i++) {\n ((EventController) autoControllers.elementAt(i)).enable();\n }\n\n }",
"@Override\n\tpublic void autonomousInit() {\n\t\tautonomousCommand = new Auto();\n\n\t\t/*\n\t\t * String autoSelected = SmartDashboard.getString(\"Auto Selector\",\n\t\t * \"Default\"); switch(autoSelected) { case \"My Auto\": autonomousCommand\n\t\t * = new MyAutoCommand(); break; case \"Default Auto\": default:\n\t\t * autonomousCommand = new ExampleCommand(); break; }\n\t\t */\n\n\t\t// schedule the autonomous command (example)\n\t\tif (autonomousCommand != null)\n\t\t\tautonomousCommand.start();\n\t}",
"public void autonomous() {\n /*myRobot.setSafetyEnabled(false);\n myRobot.drive(-0.5, 0.0);\t// drive forwards half speed\n Timer.delay(2.0);\t\t// for 2 seconds\n myRobot.drive(0.0, 0.0);\t// stop robot\n */\n \t/*gyro.reset();\n \twhile(isAutonomous()){\n \t\tdouble angle = gyro.getAngle();\n \tmyRobot.drive(0, -angle * Kp);\t\n \tTimer.delay(.004);\n \t}\n \tmyRobot.drive(0.0, 0.0);\n \t*/\n }",
"@Override\n\tpublic void teleopPeriodic() {\n\t\tif (state.equals(\"teleop\")) {\n\t\t\tlastState = \"teleop\";\n\t\t}\n\t\tstate = \"teleop\";\n\n\t\tif (lastState.equals(\"auton\")) {\n\t\t\tNetworkTables.getControlsTable().putBoolean(\"auton\", false);\n\t\t\t\n\t\t\t//Changes the control Mode back to PercentVbus\n\t\t\t//Should only run once - first interation of teleop\n\t\t\t//And ends auton if running\n\t\t\tif(autonomousCommand != null){\n\t\t\t\tautonomousCommand.cancel();\n\t\t\t}\n\t\t\tActuators.getLeftDriveMotor().changeControlMode(TalonControlMode.PercentVbus);\n\t\t\tActuators.getLeftDriveMotor().set(Constants.MOTOR_STOP);\n\t\t\tActuators.getRightDriveMotor().changeControlMode(TalonControlMode.PercentVbus);\n\t\t\tActuators.getRightDriveMotor().set(Constants.MOTOR_STOP);\n\t\t}\n\n//\t\tNetworkTables.putStream(Gamepad.primary.getX() || Gamepad.secondary.getX());\n\t\t/*\n\t\t * Primary Controllers Controls\n\t\t */\n\t\t// TODO: confirm right trigger forward, left trigger reverse\n\t\t// Drive controls\n\t\tDrive.drive(-Gamepad.primary.getLeftX(), Gamepad.primary.getTriggers()); \n\t\tDrive.shift(Gamepad.primary.getA(), Gamepad.primary.getY()); // shifting with A low gear and Y high gear\n\t\tDrive.shiftToggle(Gamepad.primary.getLB());\n\t\tDrive.crab(Gamepad.primary.getDPadLeft(), Gamepad.primary.getDPadRight());\n\t\t\n//\t\tif (Gamepad.primary.getDPadLeft()){\n//\t\t\tDrive.goingLeft = true;\n//\t\t\tDrive.crab();\t\t\n//\t\t}else if( Gamepad.primary.getDPadRight()){\n//\t\t\tDrive.goingLeft = false;\n//\t\t\tDrive.crab();\t\t\t\n//\t\t}else if (Drive.crabState > 0){\n//\t\t\tDrive.crab();\n//\t\t}\n\n\t\t\n\t\t// Climb controls\n\t\tClimb.climbStopPrimary(Gamepad.primary.getDPadUp()); // runs climbStop using left on the DPad - Primary\n\t\t// Climb.climbSafetyTogglePrimary(Gamepad.primary.getBack()); //toggles safety if pressed 3 times\n\n\t\t// Gear controls\n\t\tScore.dispenseGear(Gamepad.primary.getB() || Gamepad.secondary.getDPadUp());\n\n\t\t/*\n\t\t * Secondary Controllers Controls\n\t\t */\n\t\t// Intake controls\n\t\tIntake.intake(Gamepad.secondary.getRightButton()); // runs intake with clicking in the Right Joystick on second controller\n\t\tIntake.intakeSpeed(Gamepad.secondary.getRightY()); // Override Y Button\n\t\tIntake.intakeDirection(Gamepad.secondary.getRightX()); // Override Y Button\n\t\tIntake.intakeJam(Gamepad.secondary.getLB()); // Runs the unjamming procedure for a max of 3 seconds per press\n\t\t// Intake.intakeSafety(Gamepad.secondary.getStart()); //Have to press 3 times to toggle the safety\n\t\tIntake.intakeIn(Gamepad.secondary.getA(), Gamepad.secondary.getB(), Gamepad.secondary.getX()); // Toggles Intake running into the robot at full speed\n\t\tIntake.intakeRun(Gamepad.secondary.getRB()); // Runs all stuff for intake in(conveyor and intake motor)\n//\t\tIntake.intakeOut(Gamepad.secondary.getB());\n\t\t// Climb controls\n\t\tClimb.climbStopSecondary(Gamepad.secondary.getDPadRight()); // runs climbStop using left on the DPad - Secondary\n\t\tClimb.climbStartSecondary(Gamepad.secondary.getDPadLeft()); // runs climbStart using right on the DPad Secondary\n\t\tClimb.climbSafetyToggleSecondary(Gamepad.secondary.getBack()); // Have to press 3 times to toggle the safety\n\n\t\t// Gear controls\n\t\t// Score.gearLock(Gamepad.secondary.getStart(),\n\t\t// Gamepad.secondary.getBack());\n\n\t\t// Outtake Controls\n\t\t// Score.outtakeToggle(Gamepad.secondary.getLB());\n\n\t\t// Conveyor Controls\n\n\t\tScore.conveyor(Gamepad.secondary.getLeftButton()); // runs conveyor with clicking in the Left Joystick on second controller\n\t\tScore.conveyorSpeed(Gamepad.secondary.getLeftY());\n\t\tScore.conveyorDirection(Gamepad.secondary.getLeftX());\n\t\tScore.conveyorIn(Gamepad.secondary.getY());\n\n\t\t// Sweeper\n\t\t// Sweeper.sweeperMotion(Gamepad.secondary.getTriggers());\n\n\t\tDash.driveMode();\n\n\t\tSmartDashboard.putString(\"Controls Table\", NetworkTables.getControlsTable().getKeys().toString());\n\t\tSmartDashboard.putString(\"Stream\", NetworkTables.getControlsTable().getString(\"stream\", \"nothing\"));\n\n\t}",
"public void autonomousInit() {\n //autonomousCommand = (Command) chooser.getSelected();\n autoLoopCounter = 0; //This resets the loop counter to 0\n //if (autonomousCommand != null) autonomousCommand.start();\n }",
"public void autonomousInit() {\n int sequenceNumber = (int)SmartDashboard.getNumber(\"Autonomous Sequence\");\n \n switch(sequenceNumber) {\n // Move into the Auto Zone\n case 0:\n autonomousCommand = new DirectionalDrive(0.0, -0.5, 1.25);\n break;\n \n // Grab a container and move into the Auto Zone\n case 1:\n autonomousCommand = new ContainerAutonomous();\n break;\n \n // If something else was supplied, do nothing for saftey reasons\n default:\n autonomousCommand = null;\n }\n // Start the autonomous command\n if (autonomousCommand != null) autonomousCommand.start();\n }",
"@Override\n\tpublic void autonomousInit() //initialization of the autonomous code\n\t{\n\t\t//m_autonomousCommand = m_chooser.getSelected();\n\n\t\t/*\n\t\t * String autoSelected = SmartDashboard.getString(\"Auto Selector\",\n\t\t * \"Default\"); switch(autoSelected) { case \"My Auto\": autonomousCommand\n\t\t * = new MyAutoCommand(); break; case \"Default Auto\": default:\n\t\t * autonomousCommand = new ExampleCommand(); break; }\n\t\t */\n\n\t\t// schedule the autonomous command (example)\n\t\tif (m_autonomousCommand != null) //if we have any autonomous code, start it\n\t\t{\n\t\t\tm_autonomousCommand.start();\n\t\t}\n\t\tRobotMap.encoderLeft.reset(); //reset the values of the encoder\n\t\tRobotMap.encoderRight.reset(); //reset the values of the encoder\n\t\tultrasonic.getInitialDist(); //if nullPointerException, use \"first\" boolean inside the method and run in periodic()\n\t}",
"public void autonomousInit() {\n\t\tautonomousCommand.start();\r\n\t}",
"@Override\n\tpublic void teleopPeriodic() {\n\t\tSmartDashboard.putString(\"DT Current Command\", \" \");\n\t\tSmartDashboard.putString(\"SHOOTER Current Command\", \" \");\n\t\tSmartDashboard.putString(\"SHOOTERPIVOT Current Command\", \" \");\n\t\tSmartDashboard.putString(\"INTAKE Current Command\", \" \");\n\t\t\n\t\tScheduler.getInstance().run();\n//\t\t\n//\t\tRobot.drivetrain.leftLED.set(true);\n//\t\tRobot.drivetrain.rightLED.set(false);\n\n\t\tif(!autoAiming) {\n\t\t\tnew DriveForwardRotate(correctForDeadZone(oi.driver.getForward()), correctForDeadZone(oi.driver.getRotation())).start();\n\t\t}\n\t\t//new DriveForwardRotate(oi.driver.getForward(), oi.driver.getRotation()).start();\n\t\t\n\t\tif(oi.autoAim() && !prevStateAutoAim){\n\t\t\t//new SetPivotPosition(PivotPID.AUTO_CAMERA_AIM_POSITION).start(\n//\t\t\tnew AutoAim().start();\n\t\t\tnew AutoAim(TurnConstants.AIM_VELOCITY).start(); //this is a press and hold button 3 on joystick\n\t\t\t\n\t\t}\n\t\t\n\t\tif (readyToShoot && oi.operator.shootBallFlywheels() && oi.operator.shoot()){\n//\t\t\tSystem.out.println(\"SHOOT THE SHOOTER -- ready to shoot\");\n\t\t\tnew ShootTheShooter().start();\n\t\t}\n\t\t\n\t\t\n\t\t//INTAKE ------2 button\n\t\tif (oi.operator.intakeUp() && !prevStateIntakeUp){\n\t\t\tnew SetIntakePosition(IntakeSubsystem.UP).start();\n\t\t}\n\t\tif (oi.operator.intakeDeploy() && !prevStateIntakeDeployed){\n\t\t\tnew SetIntakePosition(!IntakeSubsystem.UP).start();\n\t\t}\n\t\t\n\t\t//CAMERA PISTON\n\t\t\n\t\t//move up\n\t\tif (oi.driver.isCameraUpPressed()){\n\t\t\tnew SetCameraPiston(CameraSubsystem.CAM_UP).start();\n\t\t}\n\t\telse{\n\t\t\tnew SetCameraPiston(!CameraSubsystem.CAM_UP).start();\n\t\t}\n\t\t\n//\t\tif (oi.driver.isCameraUpPressed() && !prevStateCameraUp){\n//\t\t\tnew SetCameraPiston(cameraUp ? !CameraSubsystem.CAM_UP : CameraSubsystem.CAM_UP).start();\n//\t\t\tcameraUp = !cameraUp;\n//\t\t}\n//\t\telse{\n//\t\t\tnew SetCameraPiston(cameraUp ? CameraSubsystem.CAM_UP : !CameraSubsystem.CAM_UP).start();\n//\t\t}\n\t\t\n\t\t\n\t\tif (oi.operator.isSemiAutonomousIntakePressed() && !prevStateSemiAutoIntake){\n\t\t\tnew SemiAutoLoadBall().start();\n\t\t}\n//\t\t\n\t\t\n\t\t//pivot state\n//\t\tif (oi.operator.pivotShootState() && !prevStatePivotUp){\n//\t\t\tnew SetPivotState(ShooterPivotSubsystem.PivotPID.FAR_SHOOT_STATE).start();\n//\t\t}\n//\t\telse if(oi.operator.resetPivot() && !prevStateResetButton) {\n//\t\t\t new ResetPivot().start();\n//\t\t}\n//\t\telse if (oi.operator.pivotStoreState() && !prevStatePivotMiddle){\n//\t\t\tnew SetPivotState(ShooterPivotSubsystem.PivotPID.STORING_STATE).start();\n//\t\t}\n\t\t\n\t\t//PIVOT\n\t\t\n\t\t//if going up\n\t\tif (oi.operator.pivotCloseShot() && !prevStatePivotCloseShot){\n\t\t\tnew SetPivotState(ShooterPivotSubsystem.PivotPID.CLOSE_SHOOT_STATE).start();\t\t\n\t\t}\n\t\t//if going down\n\t\telse if(oi.operator.pivotFarShot() && !prevStatePivotFarShot) {\n\t\t\tnew SetPivotState(ShooterPivotSubsystem.PivotPID.FAR_SHOOT_STATE).start();\n\t\t}\n\t\telse if (oi.operator.pivotStoreState()&& !prevStateStore){\n\t\t\tnew SetPivotState(ShooterPivotSubsystem.PivotPID.STORING_STATE).start();\n\t\t}\n\t\telse if (oi.operator.pivotReset() && !prevStateResetSafety){\n\t\t\tnew ResetPivot().start();\n\t\t}\n\t\telse if (oi.driver.isDefenseShot() && prevStateDefenseShot){\n\t\t\tnew SetPivotPosition(ShooterPivotSubsystem.PivotPID.ANTI_DEFENSE_POSITION).start();\n\t\t}\n\t\n\t\t\n\t\tif (!semiAutoIsRunning){\n//\t\t\n\t\t\t//intake purging/running\n\t\t\tif(oi.operator.purgeIntake()) {\n\t\t\t\t//new SetIntakeSpeed(IntakeSubsystem.FORWARD_ROLLER_PURGE_SPEED, IntakeSubsystem.CENTERING_MODULE_PURGE_SPEED).start(); \n\t\t\t\tnew RunAllRollers(ShooterSubsystem.OUT, !ShooterSubsystem.UNTIL_IR).start();\n\t\t\t\tallIntakeRunning = true;\n\t\t\t} else if (oi.operator.runIntake()) {\n\t\t\t\t//new SetIntakeSpeed(IntakeSubsystem.FORWARD_ROLLER_INTAKE_SPEED, IntakeSubsystem.CENTERING_MODULE_INTAKE_SPEED).start();\n\t\t\t\tnew RunAllRollers(ShooterSubsystem.IN, ShooterSubsystem.UNTIL_IR).start();\n//\t\t\t\tnew SemiAutoLoadBall().start();\n\t\t\t\tallIntakeRunning = true;\n\t\t\t} else {\n\t\t\t\t//just the intakes off here to avoid conflicts\n\t\t\t\tnew SetIntakeSpeed(IntakeSubsystem.INTAKE_OFF_SPEED, IntakeSubsystem.INTAKE_OFF_SPEED).start();\n\t\t\t\t//new EndSemiAuto(true).start();\n\t\t\t\t//new RunAllRollers(ShooterSubsystem.OFF, !ShooterSubsystem.UNTIL_IR).start();\n\t\t\t\tallIntakeRunning = false;\n\t\t\t}\n\t\t\t\n\t\t\t//flywheel control\n\t\t\tif (!allIntakeRunning){\n//\t\t\t\tif(oi.operator.loadBallFlywheels()){\n//\t\t\t\t\tnew SetFlywheels(ShooterSubsystem.FLYWHEEL_INTAKE_POWER, -ShooterSubsystem.FLYWHEEL_INTAKE_POWER).start();;\n//\t\t\t\t\tflywheelShootRunning = true;\n//\t\t\t\t} else \n\t\t\t\tif(oi.operator.shootBallFlywheels()) {\n\t\t\t\t\t//new SetFlywheels(0.7, -0.7).start();\n\t\t\t\t\tnew BangBangFlywheels(true).start();\n\t\t\t\t\tflywheelShootRunning = true;\n\t\t\t\t} else {\n\t\t\t\t\t//new SetFlywheels(0, 0).start();//BangBangFlywheels(false).start();\n\t\t\t\t\tflywheelShootRunning = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n//\t\t\tif(oi.operator.shoot()){\n//\t\t\t\tnew ShooterSet(DoubleSolenoid.Value.kForward).start();\n//\t\t\t} else {\n//\t\t\t\tnew ShooterSet(DoubleSolenoid.Value.kReverse).start();\n//\t\t\t}\n//\t\t\t\n\t\t\tif (!allIntakeRunning && !flywheelShootRunning){\n\t\t\t\tnew SetFlywheels(0, 0).start();\n\t\t\t}\n\t\t\t\n\t\t\t//DEFENSE STATE\n\t\t\tif (oi.operator.isDefenseState() && !prevStateDefenseMode){\n\t\t\t\tnew SetDefenseMode().start();\n\t\t\t}\n\t\t}\n\t\t//tells us if bang bang works\n\t\treadyToShoot = ((Math.abs(shooter.getRightFlywheelRPM() - ShooterSubsystem.flywheelTargetRPM) < ShooterSubsystem.flywheelTolerance)\n\t\t\t\t&& (Math.abs(shooter.getLeftFlywheelRPM() - ShooterSubsystem.flywheelTargetRPM) < ShooterSubsystem.flywheelTolerance));\n\t\t\n\t\t\n\t\tif (oi.operator.isManualFirePiston() && !prevStateManualFirePiston){\n//\t\t\tSystem.out.println(\"SHOOT THE SHOOTER -- manual\");\n\t\t\tnew ShootTheShooter().start();\n\t\t}\n\t\t\n\t\t\n\t\tif(oi.driver.isDrivetrainHighGearButtonPressed()){\n\t\t\tdrivetrain.shift(DrivetrainSubsystem.HIGH_GEAR);\n\t\t\tcurrentGear = DrivetrainSubsystem.HIGH_GEAR;\n\t\t} else {\n\t\t\tdrivetrain.shift(!DrivetrainSubsystem.HIGH_GEAR);\n\t\t\tcurrentGear = !DrivetrainSubsystem.HIGH_GEAR;\n\t\t}\n\t\t\n\t\tisManualPressed = oi.operator.isManualOverrideOperator();\n\t\t\n\t\tif (!shooterPIDIsRunning){\n\t\t\tif(isManualPressed) {\n\t\t\t\tdouble pivotPower = oi.operator.getManualPower()/2.0;\n\t\t\t\t//shooterPivot.engageBrake(false);\n\t\t\t\tif (pivotPower > 0 && shooterPivot.pastMax() || pivotPower < 0 && shooterPivot.lowerLimitsTriggered()){\n\t\t\t\t\tpivotPower = 0;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tnew SetPivotPower(pivotPower).start();\n\t\t\t}\n\t\t\telse{\n\t\t\t\tnew SetPivotPower(0).start();\n\t\t\t}\n\t\t}\n\t\t\n//\t\tSystem.out.println(\"Left: \" + Robot.drivetrain.motors[2].get() + \", Right: \" + (-Robot.drivetrain.motors[0].get()));\n//\t\tSystem.out.println(\"Left V: \" + Robot.drivetrain.leftEncoder.getRate() + \", Right V: \" + Robot.drivetrain.rightEncoder.getRate());\n//\t\tSystem.out.println(\"Accel z: \" + Robot.drivetrain.accel.getZ());\n\t\t\n\t\t\n\t\t//PREV STATES\n\t\tprevStateIntakeUp = oi.operator.intakeUp();\n\t\tprevStateIntakeDeployed = oi.operator.intakeDeploy();\n\t\tprevStateDriveShifter = oi.driver.isDrivetrainHighGearButtonPressed();\n\t\tprevStateShootButton = oi.operator.shoot();\n\t\t\n\t\tprevStatePivotCloseShot = oi.operator.pivotCloseShot();\n\t\tprevStatePivotFarShot = oi.operator.pivotFarShot();\n\t\tprevStateStore = oi.operator.pivotStoreState();\n\t\tprevStateResetSafety = oi.operator.pivotReset();\n\t\t\n\t\tprevStateSemiAutoIntake = oi.operator.isSemiAutonomousIntakePressed();\n\t\tprevStateDefenseMode = oi.operator.isDefenseState();\n\t\t\n\t\tprevStateManualFirePiston = oi.operator.isManualFirePiston();\n\t\tprevStateCameraUp = oi.driver.isCameraUpPressed();\n\t\tprevStateAutoAim = oi.autoAim();\n\t\tprevStateDefenseShot = oi.driver.isDefenseShot();\n\n\t\t\n\t\t//********updating subsystem*******//\n\t\t\n\t\t//shooter hal effect counter\n\t\t//shooterPivot.updateHalEffect();\n\t\t\n\t\t//update the flywheel speed constants\n\t\tshooter.updateShooterConstants();\n\t\t\n\t\t\n\t\t//brake\n\t\tif (!isManualPressed){ //if manual override isn't running\n\t\t\tif (!shooterPIDIsRunning && shooterPivot.motorLeft.get() < DEAD_ZONE_TOLERANCE && shooterPivot.motorRight.get() < DEAD_ZONE_TOLERANCE){\n\t\t\t\t\n\t\t\t\tif (pivotTimer.get() > MIN_STOPPED_TIME){\n\t\t\t\t\tnew EngageBrakes().start();\n\t\t\t\t}\n\t\t\t\t//if motor is 0 for the first time, start the timer\n\t\t\t\tif (!prevStateMotorPowerIs0){\n\t\t\t\t\tpivotTimer.reset();\n\t\t\t\t\tpivotTimer.start();\n\t\t\t\t}\n\t\t\t\t//keep this at the end\n\t\t\t\tprevStateMotorPowerIs0 = true;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tshooterPivot.engageBrake(false);\n\t\t\t\t//keep this at the end\n\t\t\t\tpivotTimer.reset();\n\t\t\t\tprevStateMotorPowerIs0 = false;\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\tshooterPivot.engageBrake(false);\n\t\t\tpivotTimer.reset();\n\t\t}\n\t\t//System.out.println(shooterPivot.motorLeft.get());\n\t\t\n\t\t//LOGGING AND DASHBOARD\n\t\tlogAndDashboard();\n\t}",
"@Override\n\tpublic void autonomousInit() {\n\t\t\n\t\t// runs the autonomous smartdashboard display for auton\n\t\tActuators.getLeftDriveMotor().setEncPosition(0);\n\t\tActuators.getRightDriveMotor().setEncPosition(0);\n\t\tautonomousCommand = (Command) autoChooser.getSelected();\n\t\t\n//\t\tbackupCommand = (Command) backupChooser.getSelected();\n//\t\tActuators.getLeftDriveMotor().changeControlMode(TalonControlMode.MotionProfile);\n//\t\tActuators.getRightDriveMotor().changeControlMode(TalonControlMode.MotionProfile);\n//\t\tif (NetworkTables.getControlsTable().getBoolean(\"camera0\", false)) {//Auto for working camera\n\t\t\n\t\tif(autonomousCommand != null){\t\n\t\t\tSystem.out.println(autonomousCommand);\n\t\t\tautonomousCommand.start();\n\t\t}\n\t\t\n//\t\t\tSystem.out.println(\"I got here auto Command start\");\n//\t\t\t}\n//\t\telse{\n//\t\t\tbackupCommand.start();\t\t\t\n//\t\t}\n//\t\t\tDrive.driveWithPID(distance, distance);\n\n\t\tstate = \"auton\";\n\t\t// autoSelected = chooser.getSelected();\n\t\t// // autoSelected = SmartDashboard.getString(\"Auto Selector\",\n\t\t// // defaultAuto);\n\t\t// System.out.println(\"Auto selected: \" + autoSelected);\n\t\tNetworkTables.getControlsTable().putBoolean(\"auton\", true);\n\n\t}",
"public void autonomousInit() {\n if (autonomousCommand != null) autonomousCommand.start();\n }",
"@Override\n public void autonomousPeriodic() {\n \n //Switch is used to switch the autonomous code to whatever was chosen\n // on your dashboard.\n //Make sure to add the options under m_chooser in robotInit.\n switch (m_autoSelected) {\n case kCustomAuto:\n // Put custom auto code here\n break;\n case kDefaultAuto:\n default:\n if (m_timer.get() < 2.0){\n m_driveTrain.arcadeDrive(0.5, 0); //drive forward at half-speed\n } else {\n m_driveTrain.stopMotor(); //stops motors once 2 seconds have elapsed\n }\n break;\n }\n }",
"@Override\n public void autonomousInit()\n {\n autonomousCommand = chooser.getSelected();\n \n /*\n * String autoSelected = SmartDashboard.getString(\"Auto Selector\",\n * \"Default\"); switch(autoSelected) { case \"My Auto\": autonomousCommand\n * = new MyAutoCommand(); break; case \"Default Auto\": default:\n * autonomousCommand = new ExampleCommand(); break; }\n */\n \n // schedule the autonomous command (example)\n if (autonomousCommand != null) \n {\n autonomousCommand.start();\n }\n }",
"@Override\n\tpublic void autonomousInit() {\n\t\tvision_.startGearLiftTracker(15);\n\t\tgyro_.reset();\n\t\tautoCommand = (Command) autoChooser.getSelected();\n\t\tif(autoCommand != null)\n\t\t{\n\t\t\tautoCommand.start();\n\t\t}\n\t}",
"@Override\n public void autonomousInit() {\n\n autonomousCommand = new Autonomous(start.getSelected(), chooser.getSelected());\n \n autonomousCommand.start();\n }",
"@Override\n\tpublic void autonomousPeriodic() //runs the autonomous mode, repeating every 20ms\n\t{\n\t\tScheduler.getInstance().run();\n\t\tSmartDashboard.putNumber(\"Encoder Left: \", RobotMap.encoderLeft.getRaw()); //putting the value of the left encoder to the smartDashboard\n\t\tSmartDashboard.putNumber(\"Encoder Right: \", RobotMap.encoderRight.getRaw()); //putting the value of the right encoder to the smartDashboard\n\t\tSmartDashboard.putNumber(\"Ultrasonic sensor\", ultrasonic.getDistanceIn()); //putting the value of the ultrasonic sensor to the smartDashboard\n\t\tdriveExecutor.execute(); //running the execute() method in driveExecutor\n\t\tgrab.execute(); //running the execute() method in GearGrab_Command (should run without this but this is ensuring us that it is on)\n\t}",
"@Override\n public void disabledInit() {\n\t// new SetElevator(0).start();\n\tif (autonomousCommand != null)\n\t autonomousCommand.cancel();\n\tScheduler.getInstance().removeAll();\n }",
"@Override\n\tpublic void autonomousInit() {\n\t\tselectedAutonomousCommand = new AutoModeCommandGroup(autoChooser.getSelected());\n\t\tif (selectedAutonomousCommand!=null) {\n\t\t\tselectedAutonomousCommand.start();\n\t\t}\n\t}",
"public void teleopInit() {\n\t\tauto.cancel();\r\n\t\t// Create the teleop command and start it.\r\n\t\tteleop.start();\r\n\t\t// Reset the drivetrain encoders\r\n\t\tDriveTrain.getInstance().resetEncoders();\r\n\t\t// Start pushing sensor readings to the SD.\r\n\t\treadings.start();\r\n\t}",
"public void autonomousInit() {\n Jagbot.isAutonomous = true;\n int mode = (int)SmartDashboard.getNumber(RobotMap.Autonomous.MODE_KEY);\n switch (mode) {\n case 0:\n System.out.println(\"Standing still\");\n new StandStill().start();\n break;\n case 1:\n System.out.println(\"Driving forward\");\n new DriveStraight(1).start();\n break;\n \n case 2:\n System.out.println(\"Turning left and shooting to score\");\n new TurnAndScore(-1).start();\n break;\n case 3:\n System.out.println(\"Turning right and shooting to score\");\n new TurnAndScore(1).start();\n break;\n }\n }",
"@Override\n\tpublic void teleopInit() {\n\t\tif (autonomousCommand != null)\n\t\t\tautonomousCommand.cancel();\n\t\tisAutonomous = false;\n\t\tisTeleoperated = true;\n\t\tisEnabled = true;\n\t\ttry {\n\t\t\tdrivebase.initDriveBase(1);\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\tRobot.numToSend = 3;\n\t}",
"@Override\n\tpublic void action() {\n\t\tsuppressed = false;\n\t\t//if (Settings.motorAAngle == -90) Settings.motorAAngle = -95;\n\n\t\tMotor.A.rotateTo(Settings.motorAAngle, true);\n\n\t\twhile (Motor.A.isMoving() && !Motor.A.isStalled() && !suppressed);\t\t\t\n\t\t\n\t\tMotor.A.stop();\n\t}",
"@Override\n public void autonomousPeriodic() {\n teleopPeriodic();\n //Scheduler.getInstance().run();\n }",
"@Override\n\tpublic void autonomousInit() {\n\t\tif (autonomousCommand != null)\n\t\t\tlowGearCommand.start();\n\t\tautonomousCommand.start();\n\t}",
"@Override\n public void teleopPeriodic() {\n Scheduler.getInstance().run();\n // ros_string = workingSerialCom.read();\n // yavuz = workingSerialCom.StringConverter(ros_string, 2);\n // Inverse.Inverse(yavuz);\n\n // JoystickDrive.execute();\n\n\n\n // ros_string = workingSerialCom.read();\n // alt_yurur = workingSerialCom.StringConverter(ros_string, 1);\n // robot_kol = workingSerialCom.StringConverter(ros_string, 2);\n Full.Full(yavuz);\n \n }",
"@Override\n public void autonomousInit() {\n\n Robot.m_driveTrain.driveTrainLeftFrontMotor.setSelectedSensorPosition(0);\n Robot.m_driveTrain.driveTrainRightFrontMotor.setSelectedSensorPosition(0);\n Robot.m_driveTrain.driveTrainRightRearMotor.setSelectedSensorPosition(0);\n Robot.m_driveTrain.driveTrainLeftRearMotor.setSelectedSensorPosition(0);\n\n /*\n * String autoSelected = SmartDashboard.getString(\"Auto Selector\",\n * \"Default\"); switch(autoSelected) { case \"My Auto\": autonomousCommand\n * = new MyAutoCommand(); break; case \"Default Auto\": default:\n * autonomousCommand = new ExampleCommand(); break; }\n */\n\n // schedule the autonomous command (example)\n }",
"public void autonomousInit() {\n autonomousCommand = (Command) autoChooser.getSelected();\n autonomousCommand.start();\n// \n }",
"public void teleopInit() {\n armTask.stop();\n driveTask.stop();\n armTask2.stop();\n getRobotDrive().stop();\n driveState = TELEOP;\n armState = TELEOP;\n\n }",
"@Override\n\tprotected void execute() {\n\t\tRobot.arm.armDown();\n\t}",
"abstract protected void cancelCommands();",
"public void autonomousPeriodic() {\n if (m_apFirstRun) {\n System.out.println(\"Default autonomousPeriodic() method... Override me!\");\n m_apFirstRun = false;\n }\n }",
"public void autonomousInit() {\n\t\ttimer.start();\n\t\tautonomousCommand = autoChooser.getSelected();\n\t\t//This outputs what we've chosen in the SmartDashboard as a string.\n\t\tSystem.out.println(autonomousCommand);\n\t\tif (DriverStation.getInstance().isFMSAttached()) {\n\t\t\tgameData = DriverStation.getInstance().getGameSpecificMessage();\n\t\t}\n\t\telse {\n\t\t\tgameData=\"RLR\";\n\t\t}\n\t\t//armSwing.setAngle(90); //hopefully this will swing the arms down. not sure what angle it wants though\n\t}",
"@Override\n\tpublic void teleopInit() {\n\t\tif (m_autonomousCommand != null) {\n\t\t\tm_autonomousCommand.cancel();\n\t\t}\n\t\t\n\t\tSmartDashboard.putData(\"Stow Robot\", new PreMatchPresets());\n\t\t\n\t\tgetSwitchColor();\n\t\tchassis.chassisInit();\n\t\tintake.intakeInit();\n\t\tarm.armInit();\n\t\televator.elevatorInit();\n\t\tSmartDashboard.putNumber(\"Arm Pot Value\", Robot.arm.getArmPot());\n\n//\t\tSmartDashboard.putData(\"high\", new ShuttleHigh());\n\t}",
"public AutonomousCommand() {\n \t\n\n // END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTRUCTOR\n // BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=VARIABLE_SETTING\n\n // END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=VARIABLE_SETTING\n // BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=REQUIRES\n\n // END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=R\tEQUIRES\n \t\n }",
"@Override\n public void teleopInit() {\n if (m_autonomousCommand != null) {\n m_autonomousCommand.cancel();\n }\n\n // Don't resume climbing\n IsHoldingBack = false;\n IsHoldingFront = false;\n\n safetyCount = 0;\n\n clearAllButtonStates();\n\n ArmsExtended = ArmsClosed = false;\n //ClimbFront.set(Value.kReverse);\n //ClimbBack.set(Value.kReverse);\n\n LiftSetpoint = Lifter.getSelectedSensorPosition();\n LiftRamp = new SRamp();\n LiftRamp.Rate = 300;\n LiftRamp.setOutput(Lifter.getSelectedSensorPosition());\n\n SpeedRamp = new SRamp();\n SpeedRamp.Rate = 0.06;\n SpeedRamp.setMaxAccelRate(0.004);\n\n VisionTable.getEntry(\"Tape\").setBoolean(true);\n\n Comp.start();\n }",
"@Override\r\n\tpublic void autonomous() {\n\r\n\t\tint autoMode = -1;\r\n\t\t\r\n\t\tif (!switch1.get() && !switch2.get() && !switch3.get()) {\r\n\t\t\t//if all the switches are off\r\n\t\t\tautoMode = 0;\r\n\t\t} else if (switch1.get() && !switch2.get() && !switch3.get()) {\r\n\t\t\tautoMode = 1;\r\n\t\t} else if (!switch1.get() && switch2.get() && !switch3.get()) {\r\n\t\t\tautoMode = 2;\r\n\t\t} else if (switch1.get() && switch2.get() && !switch3.get()) {\r\n\t\t\tautoMode = 3;\r\n\t\t}\r\n\r\n\t\tautotime.start();\r\n\r\n\t\t// double[] wheelSpeeds = new double[2];\r\n\t\t// double[] startCoords = {0, 0, Math.PI / 2};\r\n\t\t// double[] endCoords = {0, 1, Math.PI / 2};\r\n\t\t// AutoPath pathAuto = new AutoPath(startCoords, endCoords,\r\n\t\t// ahrs.getAngle());\r\n\t\t//\r\n\t\t// int i = 0;\r\n\t\t// boolean successfullyGrabbedRectangles = false;\r\n\t\t\r\n\t\tboolean shotGear = false;\r\n\t\t//boolean hasBackedUp = false;\r\n\t\twhile (isAutonomous() && isEnabled()) {\r\n\t\t\t// auto.drive(autoMode);\r\n\r\n\t\t\t// while(autotime.get() < 3) {\r\n\t\t\t// drive.drive(-0.9, -0.9);\r\n\t\t\t// }\r\n\r\n\t\t\t// grab the current switch status\r\n\r\n\t\t\tswitch (autoMode) {\r\n\t\t\tcase 0:\r\n\t\t\t\t//Mark: Drive forward\r\n\r\n\t\t\t\tif (autotime.get() < 3) {\r\n\t\t\t\t\tdrive.drive(-0.9, -0.9);\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase 1:\r\n\t\t\t\t// Mark: Drive Forward, NO turning, and shoot gear onto peg\r\n\r\n\t\t\t\tif (autotime.get() < 3) {\r\n\t\t\t\t\tdrive.drive(-0.75, -0.75);\r\n\t\t\t\t} else if(!shotGear) {\r\n\t\t\t\t\t// shoot the gear onto the peg\r\n\t\t\t\t\tgearOutput.autoOutput();\r\n\t\t\t\t\tshotGear = true;\r\n\t\t\t\t}else if(autotime.get() < 3.67) {\r\n\t\t\t\t\tdrive.drive(0.50, 0.50);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tdrive.drive(0,0);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tbreak;\r\n\t\t\tcase 2:\r\n\t\t\t\t//Mark: start LEFT of center, drive forward, turn -60 degrees, drive forward, shoot gear on peg\r\n\t\t\t\tif (autotime.get() < 2) {\r\n\t\t\t\t\tdrive.drive(-0.75, -0.75);\r\n\t\t\t\t} else if (autotime.get() < 2.5) {\r\n\t\t\t\t\tdrive.drive(1, 0);\r\n\t\t\t\t}else if(autotime.get() < 3.5) { \r\n\t\t\t\t\tdrive.drive(-.75,-.75);\r\n\t\t\t\t} else if (!shotGear) {\r\n\t\t\t\t\tgearOutput.autoOutput();\r\n\t\t\t\t\tshotGear = true;\r\n\t\t\t\t}else if(autotime.get() < 4.5) {\r\n\t\t\t\t\tdrive.drive(0.75, 0.75);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tdrive.drive(0,0);\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase 3:\r\n\t\t\t\t//Mark: start RIGHT of center, drive forward, turn 60 degrees, drive forward, shoot gear on peg\r\n\t\t\t\tif (autotime.get() < 2) {\r\n\t\t\t\t\tdrive.drive(-0.75, -0.75);\r\n\t\t\t\t} else if (autotime.get() < 2.25) {\r\n\t\t\t\t\tdrive.drive(0, 1);\r\n\t\t\t\t}else if(autotime.get() < 4) { \r\n\t\t\t\t\tdrive.drive(-.75,-.75);\r\n\t\t\t\t} else if (!shotGear) {\r\n\t\t\t\t\tgearOutput.autoOutput();\r\n\t\t\t\t\tshotGear = true;\r\n\t\t\t\t}else if(autotime.get() < 4.5) {\r\n\t\t\t\t\tdrive.drive(0.75, 0.75);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tdrive.drive(0,0);\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\t// if(!successfullyGrabbedRectangles) {\r\n\t\t\t// Rectangle[] targets = grabRectangles();\r\n\t\t\t//\r\n\t\t\t//// System.out.println(\"-----\");\r\n\t\t\t//// for(Rectangle r : testing) {\r\n\t\t\t//// System.out.println(r.getArea());\r\n\t\t\t//// }\r\n\t\t\t//// System.out.println(\"-----\");\r\n\t\t\t//\r\n\t\t\t// if(targets[0].getArea() == 0) {\r\n\t\t\t// //since grabRectangles returns 1 rectangle with area of 0, so if\r\n\t\t\t// one of the area's\r\n\t\t\t// //equals 0, then it was a failed response\r\n\t\t\t// successfullyGrabbedRectangles = false;\r\n\t\t\t// }else{\r\n\t\t\t//\r\n\t\t\t// successfullyGrabbedRectangles = true;\r\n\t\t\t//\r\n\t\t\t// //call auto path to get the wheel speeds from the rectangle\r\n\t\t\t// pathAuto.makeNewPath(targets[0].getWidth(),\r\n\t\t\t// targets[1].getWidth(), targets[0].getXPos() - 240,\r\n\t\t\t// targets[1].getXPos() - 240, ahrs.getAngle());\r\n\t\t\t// //drive.drive(wheelSpeeds[0], wheelSpeeds[1]);\r\n\t\t\t//\r\n\t\t\t// }\r\n\t\t\t// }else{\r\n\t\t\t// //drive.drive(0,0);\r\n\t\t\t//\r\n\t\t\t// double[] wheelSpeedsFromPath = pathAuto.getWheelSpeeds(.4); //the\r\n\t\t\t// .4 doesn't mean anything at all; Beitel is just weird :^)\r\n\t\t\t// drive.drive(wheelSpeedsFromPath[0], wheelSpeedsFromPath[1]);\r\n\t\t\t// //System.out.println(\"Left:\" + wheelSpeedsFromPath[0]);\r\n\t\t\t// //System.out.println(\"Right: \" + wheelSpeedsFromPath[1]);\r\n\t\t\t// }\r\n\r\n\t\t}\r\n\t\t\r\n\t}",
"@Override\r\n public void teleopPeriodic() {\n if (m_stick.getRawButton(12)){\r\n TestCompressor.setClosedLoopControl(true);\r\n System.out.println(\"??\");\r\n } \r\n if (m_stick.getRawButton(11)) {\r\n TestCompressor.setClosedLoopControl(false);\r\n }\r\n //// fireCannon(Solenoid_1, m_stick, 8);\r\n //// fireCannon(Solenoid_2, m_stick, 10);\r\n //// fireCannon(Solenoid_3, m_stick, 12);\r\n //// fireCannon(Solenoid_4, m_stick, 7);\r\n //// fireCannon(Solenoid_5, m_stick, 9);\r\n //// fireCannon(Solenoid_6, m_stick, 11);\r\n\r\n // Logic to control trigering is inside\r\n // DO: Move the logic out here, makes more sense. \r\n fireTrio(topSolonoids, m_stick, 5);\r\n fireTrio(bottomSolonoids, m_stick, 6);\r\n\r\n // Make robit go\r\n double[] movementList = adjustJoystickInput(-m_stick.getY(), m_stick.getX(), m_stick.getThrottle());\r\n m_myRobot.arcadeDrive(movementList[0], movementList[1]);\r\n //System.out.println(m_gyro.getAngle());\r\n }",
"public void autonomousPeriodic() {\n \tauto.autonomousPeriodic();\n\t}",
"@Override\r\n public void executeCommand() {\r\n shell.stopRunning();\r\n }",
"public void autonomousPeriodic() {\n \tswitch(autoSelected) {\n \tcase customAuto:\n //Put custom auto code here \n break;\n \tcase defaultAuto:\n \tdefault:\n \t//Put default auto code here\n break;\n \t}\n }",
"@Override\n public void execute() {\n if(!manipulatorController.getRawButton(button)){\n shooter.shooterMotorsOff();\n hopper.hopperMotorOff();\n isDone = true;\n end(false);\n }\n\n }",
"public static void startAuto(){\n cancelAuto();\n //Turn our ID into a Command\n \tswitch(autonomousChooser.getSelected()){\n case 0:\n command = new BaseLine();\n break;\n default:\n\t\t\t\tSystem.out.println(\"No auto picked\");\n command = null;\n }\n //Run the Command\n\t\tif (command != null){\n\t\t\tcommand.start();\n\t\t}\n }",
"@Override\n\tprotected void takeOff(){\n\t\tgvh.log.i(TAG, \"Drone taking off\");\n\t\tsetControlInput(0, 0, 0, 1);\n\t}",
"public void teleopPeriodic() {\n Scheduler.getInstance().run();\n rumbleInYourPants();\n turnSpindleIfNeeded();\n turnWinchIfNeeded();\n if (arcadeDrive != null) \n arcadeDrive.start();\n }",
"@Override\n public void runOpMode() {\n RobotMain main = new RobotMain(this,hardwareMap,telemetry);\n\n //initialize controls\n imuTeleOpDualGamepad control = new imuTeleOpDualGamepad(main,gamepad1,gamepad2);\n\n waitForStart();\n\n //Pull the tail back from autonomous\n main.JewelArm.setServo(.65);\n\n //Continually run the control program in the algorithm\n while (opModeIsActive()) control.run();\n }",
"@Override\n\tpublic void autonomousPeriodic() {\n\t\tswitch (m_autoSelected) {\n\t\t\tcase kCustomAuto:\n\t\t\t\t// Put custom auto code here\n\t\t\t\tbreak;\n\t\t\tcase kDefaultAuto:\n\t\t\tdefault:\n\t\t\t\t// Put default auto code here\n\t\t\t\tbreak;\n\t\t}\n\t}",
"@Override\n\tpublic void autonomousPeriodic() {\n\t\tswitch (m_autoSelected) {\n\t\t\tcase kCustomAuto:\n\t\t\t\t// Put custom auto code here\n\t\t\t\tbreak;\n\t\t\tcase kDefaultAuto:\n\t\t\tdefault:\n\t\t\t\t// Put default auto code here\n\t\t\t\tbreak;\n\t\t}\n\t}",
"@Override\n\tpublic void autonomousPeriodic() {\n\t\tswitch (m_autoSelected) {\n\t\t\tcase kCustomAuto:\n\t\t\t\t// Put custom auto code here\n\t\t\t\tbreak;\n\t\t\tcase kDefaultAuto:\n\t\t\tdefault:\n\t\t\t\t// Put default auto code here\n\t\t\t\tbreak;\n\t\t}\n\t}",
"@Override\n public void autonomousPeriodic() {\n switch (m_autoSelected) {\n case kCustomAuto:\n // Put custom auto code here\n break;\n case kDefaultAuto:\n default:\n // Put default auto code here\n break;\n }\n }",
"@Override\n public void autonomousPeriodic() {\n switch (m_autoSelected) {\n case kCustomAuto:\n // Put custom auto code here\n break;\n case kDefaultAuto:\n default:\n // Put default auto code here\n break;\n }\n }",
"@Override\n public void autonomousPeriodic() {\n switch (m_autoSelected) {\n case kCustomAuto:\n // Put custom auto code here\n break;\n case kDefaultAuto:\n default:\n // Put default auto code here\n break;\n }\n }",
"@Override\n public void autonomousPeriodic() {\n switch (m_autoSelected) {\n case kCustomAuto:\n // Put custom auto code here\n break;\n case kDefaultAuto:\n default:\n // Put default auto code here\n break;\n }\n }",
"@Override\r\n\tpublic void execute() {\n\t\tlight.off();\r\n\t}",
"public void m9978e() {\n if (this.f8226a != null) {\n this.f8226a.cancel();\n }\n }",
"public void autonomousPeriodic() {\n \n }",
"public void mo42332a() {\n this.f36204P.cancel();\n mo42330e();\n }",
"public void autonomousPeriodic() {\r\n }",
"public void autonomousPeriodic() {\r\n }",
"@Override\n protected void execute() {\n Robot.elevator.elevatorDown();\n }",
"@Override\n\tpublic void autonomousInit() {\n//\t\tm_autonomousCommand = m_chooser.getSelected();\n\t\t\n\t\tif(m_startPosition.getSelected().equals(\"Center\")) {\n\t\t\tif(getGameSpecificData(\"alliance\") == R) {\n\t\t\t\tm_autonomousCommand = new AUTO_centerRight();\n\t\t\t}else if(getGameSpecificData(\"alliance\") == L) {\n\t\t\t\tm_autonomousCommand = new AUTO_centerLeft();\n\t\t\t}else {\n\t\t\t\tm_autonomousCommand = null;\n\t\t\t}\n\t\t\t\n\t\t}else if(m_startPosition.getSelected().equals(\"Right\")) {\n\t\t\tif(m_gameElement.getSelected().equals(\"switch\")) {\n\t\t\t\tif(getGameSpecificData(\"alliance\") == R) {\n\t\t\t\t\tm_autonomousCommand = new AUTO_rightSwitchRight();\n\t\t\t\t}else if(getGameSpecificData(\"alliance\") == L) {\n\t\t\t\t\tm_autonomousCommand = new AUTO_rightSwitchLeft();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}else if(m_gameElement.getSelected().equals(\"scale\")) {\n\t\t\t\tif(getGameSpecificData(\"scale\") == R) {\n\t\t\t\t\tm_autonomousCommand = new AUTO_rightScaleRight();\n\t\t\t\t}else if(getGameSpecificData(\"scale\") == L) {\n\t\t\t\t\tm_autonomousCommand = new HowToTestAutoPath();\n\t\t\t\t}\n\t\t\t}else {\n\t\t\t\tm_autonomousCommand = null;\n\t\t\t}\n\t\t\t\n\t\t}else if(m_startPosition.getSelected().equals(\"Left\")) {\n\t\t\tif(m_gameElement.getSelected().equals(\"switch\")) {\n\t\t\t\tif(getGameSpecificData(\"alliance\") == R) {\n\t\t\t\t\tm_autonomousCommand = new HowToTestAutoPath();//AUTO_leftSwitchRight();\n\t\t\t\t}else if(getGameSpecificData(\"alliance\") == L) {\n\t\t\t\t\tm_autonomousCommand = new AUTO_leftSwitchLeft();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}else if(m_gameElement.getSelected().equals(\"scale\")) {\n\t\t\t\tif(getGameSpecificData(\"scale\") == R) {\n\t\t\t\t\tm_autonomousCommand = new AUTO_leftScaleRight();\n\t\t\t\t}else if(getGameSpecificData(\"scale\") == L) {\n\t\t\t\t\tm_autonomousCommand = new AUTO_leftScaleLeft();\n\t\t\t\t}\n\t\t\t}else {\n\t\t\t\tm_autonomousCommand = null;\n\t\t\t}\n\t\t}\n\t\t\n\t\t/*\n\t\t * String autoSelected = SmartDashboard.getString(\"Auto Selector\",\n\t\t * \"Default\"); switch(autoSelected) { case \"My Auto\": autonomousCommand\n\t\t * = new MyAutoCommand(); break; case \"Default Auto\": default:\n\t\t * autonomousCommand = new ExampleCommand(); break; }\n\t\t */\n\n\t\tSmartDashboard.putData(\"auto command\",m_autonomousCommand);\n\t\t\n\t\t// schedule the autonomous command (example)\n\t\tif (m_autonomousCommand != null) {\n\t\t\tm_autonomousCommand.start();\n\t\t}\n\t\t\n\t\tgetSwitchColor();\n//\t\tSmartDashboard.putBoolean(\"Alliance_R\", alliance_R_SwitchState);\n//\t\tSmartDashboard.putBoolean(\"Alliance_L\", alliance_L_SwitchState);\n//\t\tSmartDashboard.putBoolean(\"Scale_R\", R_scaleState);\n//\t\tSmartDashboard.putBoolean(\"Scale_L\", L_scaleState);\n//\t\tSmartDashboard.putBoolean(\"oppisite_R\", opposite_R_SwitchState);\n//\t\tSmartDashboard.putBoolean(\"opposite_L\", opposite_L_SwitchState);\n\t\t\n\t}",
"public void teleopPeriodic() \r\n {\r\n Watchdog.getInstance().feed();\r\n Scheduler.getInstance().run();\r\n \r\n //Polls the buttons to see if they are active, if they are, it adds the\r\n //command to the Scheduler.\r\n if (mecanumDriveTrigger.get()) \r\n Scheduler.getInstance().add(new MechanumDrive());\r\n \r\n else if (tankDriveTrigger.get())\r\n Scheduler.getInstance().add(new TankDrive());\r\n \r\n else if (OI.rightJoystick.getRawButton(2))\r\n Scheduler.getInstance().add(new PolarMechanumDrive());\r\n \r\n resetGyro.get();\r\n \r\n //Puts the current command being run by DriveTrain into the SmartDashboard\r\n SmartDashboard.putData(DriveTrain.getInstance().getCurrentCommand());\r\n \r\n SmartDashboard.putString(ERRORS_TO_DRIVERSTATION_PROP, \"Test String\");\r\n \r\n \r\n }",
"public void autonomousPeriodic() {\n //Scheduler.getInstance().run();\n /** if(autoLoopCounter < 100) { //Checks to see if the counter has reached 100 yet\n myRobot.drive(-0.5, 0.0); //If the robot hasn't reached 100 packets yet, the robot is set to drive forward at half speed, the next line increments the counter by 1\n autoLoopCounter++;\n } else {\n myRobot.drive(0.0, 0.0); //If the robot has reached 100 packets, this line tells the robot to stop\n }*/\n }",
"protected void finalAction(){\n Robot.stop();\n requestOpModeStop();\n }",
"public void autonomousPeriodic() {\n }",
"public void autonomousPeriodic() {\n }",
"@Override\n protected void end() {\n Robot.climber.frontStop();\n Robot.climber.rearStop();\n Robot.isAutonomous = false;\n }",
"public void teleopPeriodic() {\r\n //Driving\r\n if (driveChooser.getSelected().equals(\"tank\")){\r\n if (joystickChooser.getSelected().equals(\"two\")){\r\n drive.tankDrive(leftJoystick.getY(), rightJoystick.getY());\r\n } \r\n else {\r\n drive.tankDrive(manipulator.getY(), manipulator.getThrottle());\r\n }\r\n }\r\n if (driveChooser.getSelected().equals(\"arcade1\")){\r\n if (joystickChooser.getSelected().equals(\"two\")){\r\n drive.arcadeDrive(leftJoystick.getY(), leftJoystick.getX());\r\n } \r\n else {\r\n drive.arcadeDrive(manipulator.getY(), manipulator.getX());\r\n }\r\n }\r\n if (driveChooser.getSelected().equals(\"arcade2\")){\r\n if (joystickChooser.getSelected().equals(\"two\")){\r\n drive.arcadeDrive(leftJoystick.getY(), rightJoystick.getX());\r\n }\r\n else{\r\n drive.arcadeDrive(manipulator.getY(), manipulator.getTwist());\r\n }\r\n }\r\n \r\n //Shooting\r\n if (shootButton1.get()||shootButton2.get()){\r\n frontShooter.set(-1);\r\n backShooter.set(1);\r\n }\r\n else{\r\n frontShooter.set(0);\r\n backShooter.set(0); \r\n }\r\n if (transportButton1.get()||transportButton2.get()){\r\n transport.set(-1);\r\n }\r\n else{\r\n transport.set(0); \r\n }\r\n \r\n //Intake\r\n if (intakeButton1.get()||intakeButton2.get()){\r\n //intakeA.set(-1);BROKEN\r\n intakeB.set(-1);\r\n }\r\n else{\r\n intakeA.set(0);\r\n intakeB.set(0); \r\n }\r\n \r\n //Turret\r\n if (toggleTurretButton.get()){\r\n turret.set(leftJoystick.getX());\r\n }\r\n else{\r\n turret.set(manipulator.getX());\r\n }\r\n }",
"public void teleopPeriodic() {\n\t\t// resetAndDisable();\n\t\tupdateDashboard();\n\t\tLogitechJoystick.controllers();\n\t\tDrivetrain.arcadeDrive();\n\t\tShooterAngleMotor.angleShooter();\n\t\tBallShooter.shootBalls();\n\t\tSonicSensor.updateSensors();\n\t\t\n\t\t//if(LogitechJoystick.rightBumper2)\n\t\t\t//{\n\t\t\t\t//LowBar.makeArmStable();\n\t\t\t//}\n\n\t}",
"@Override\n\tpublic void teleopPeriodic() {\n\t\tScheduler.getInstance().run();\n\t\tisAutonomous = false;\n\t\tisTeleoperated = true;\n\t\tisEnabled = true;\n\t\tupdateLedState();\n\t\t//SmartDashboard.putNumber(\"Gyro\", Robot.drivebase.driveGyro.getAngle());\n\t\tSmartDashboard.putNumber(\"Climber Current Motor 1\", Robot.climber.climberTalon.getOutputCurrent());\n\t\tSmartDashboard.putNumber(\"Climber Current motor 2\", Robot.climber.climberTalon2.getOutputCurrent());\n\t\t//visionNetworkTable.getGearData();\n\t//\tvisionNetworkTable.showGearData();\n\t\tSmartDashboard.putNumber(\"GM ACTUAL POSITION\", Robot.gearManipulator.gearManipulatorPivot.getPosition());\n\n\t\tif(Robot.debugging){\t\t\t\n\t\t\tSmartDashboard.putNumber(\"Shooter1RPM Setpoint\", shooter.shooter1.getSetpoint());\n\t \tSmartDashboard.putNumber(\"Intake Pivot Encoder Position\", Robot.gearManipulator.gearManipulatorPivot.getPosition());\n\t\n\t\t\tSmartDashboard.putNumber(\"Gear Manipulator Setpoint\", gearManipulator.gearManipulatorPivot.getSetpoint());\n\t\t}\n\t\t//\tvisionNetworkTable.getGearData();\n\t\t//visionNetworkTable.getHighData();\n\t}",
"public static void noAutostart() {\n\t\tdefaultAutostartMode = NO_AUTOSTART;\n\t}",
"public Command getAutonomousCommand() \n {\n switch (m_autoChooser.getSelected())\n {\n case \"default\":\n return null;\n case \"test\":\n return new CommandGroupTemplate();\n case \"three_ball_forward\":\n return new AutonomousThreeBall(1, 2.0);\n case \"three_ball_backward\":\n return new AutonomousThreeBall(-1, 3.0);\n case \"six_ball\":\n return new AutonomousSixBall();\n default:\n System.out.println(\"\\nError selecting autonomous command:\\nCommand selected: \" + m_autoChooser.getSelected() + \"\\n\");\n return null;\n }\n }",
"@Override\n public final void stopMotor() {\n stop();\n }",
"@Override\n public void teleopPeriodic() {\n double x = xcontroller2.getX(Hand.kLeft);\n //double y = xcontroller1.getTriggerAxis(Hand.kRight) - xcontroller1.getTriggerAxis(Hand.kLeft);\n // For testing just use left joystick. Use trigger axis code for GTA Drive/\n double y = -xcontroller2.getY(Hand.kLeft);\n double z = xcontroller2.getX(Hand.kRight);\n double yaw = imu.getAngleZ();\n RobotDT.driveCartesian(x, y, 0, 0);\n \n\n // After you spin joystick R3 press A button to reset gyro angle\n if (xcontroller1.getAButtonPressed()) {\n imu.reset();\n }\n \n if (xcontroller2.getBButtonPressed()){\n mGPM.goSpongeHatch();\n }\n\n if (xcontroller2.getXButtonPressed()){\n mGPM.goPineHome();\n \n }\n\n\n /** \n * If Bumpers are pressed then Cargo Intake Motor = -1 for Intake \n *if Triggers are pressed set value to 1 for Outtake\n *If triggers are released set value to 0*/\n if(xcontroller2.getBumperPressed(Hand.kLeft) && xcontroller2.getBumperPressed(Hand.kRight)) {\n mGPM.setCargoMotor(-1);\n } else if((xcontroller2.getTriggerAxis(Hand.kLeft) >0.75) && (xcontroller2.getTriggerAxis(Hand.kRight) >0.75)) {\n mGPM.setCargoMotor(1);\n } else{\n mGPM.setCargoMotor(0);\n }\n }",
"void unsetAuto();"
] | [
"0.82519054",
"0.815004",
"0.80951214",
"0.77006096",
"0.7639435",
"0.7601598",
"0.7601598",
"0.7470529",
"0.721847",
"0.7011489",
"0.67327523",
"0.6719494",
"0.6696134",
"0.66195714",
"0.6566042",
"0.6499289",
"0.6494945",
"0.64876205",
"0.64164466",
"0.63929373",
"0.6364081",
"0.6347125",
"0.6346945",
"0.6338427",
"0.6323777",
"0.6286711",
"0.6243366",
"0.62374943",
"0.6235899",
"0.6235264",
"0.6234209",
"0.6218482",
"0.6210336",
"0.6176403",
"0.6129703",
"0.6107082",
"0.60626346",
"0.606015",
"0.6034028",
"0.59962964",
"0.5993948",
"0.5962742",
"0.5953753",
"0.5946482",
"0.5910267",
"0.58912975",
"0.5863652",
"0.5849052",
"0.5842156",
"0.5786323",
"0.57712233",
"0.5756834",
"0.57441974",
"0.5724888",
"0.57133746",
"0.5707119",
"0.56861657",
"0.56860685",
"0.5679403",
"0.56532323",
"0.5648835",
"0.564361",
"0.5630012",
"0.5626989",
"0.5623604",
"0.56208146",
"0.5584115",
"0.55790144",
"0.55669886",
"0.5557718",
"0.5555159",
"0.5544636",
"0.55205137",
"0.55205137",
"0.55205137",
"0.5517924",
"0.5517924",
"0.5517924",
"0.5517924",
"0.55157113",
"0.5513789",
"0.5506839",
"0.55005264",
"0.54966724",
"0.54966724",
"0.54959506",
"0.5475778",
"0.54722726",
"0.54663455",
"0.5464982",
"0.5455305",
"0.5455305",
"0.5449654",
"0.5447711",
"0.544637",
"0.5443643",
"0.54380035",
"0.54379165",
"0.54284936",
"0.5397672",
"0.53940856"
] | 0.0 | -1 |
This function is called periodically during operator control | public void teleopPeriodic() {
//getInstance().run();;
//RobotMap.robotDrive1.arcadeDrive(oi.stickRight); //This line drives the robot using the values of the joystick and the motor controllers selected above
Scheduler.getInstance().run();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void teleopPeriodic() {\n \t\n \twhile (isOperatorControl() && isEnabled()) {\n \t\tdebug();\n \t\tsmartDashboardVariables();\n \t\t//driver control functions\n \t\tdriverControl();\n \t//state machine\n \tterrainStates();\n \t//this function always comes last\n \t//armSlack();\n Timer.delay(0.005);\t\t// wait for a motor update time\n }\n \tTimer.delay(0.005);\n }",
"public void teleopPeriodic() {\n Scheduler.getInstance().run();\n// if (oi.driveStick.getRawButton(4)) {\n// System.out.println(\"Left Encoder Distance: \" + RobotMap.leftDriveEncoder.getDistance());\n// System.out.println(\"RightEncoder Distance: \" + RobotMap.rightDriveEncoder.getDistance());\n// }\n\n }",
"public void teleopPeriodic() {\r\n Scheduler.getInstance().run();\r\n OI.poll();\r\n }",
"public void operatorControl() {\n myRobot.setSafetyEnabled(true);\n while (isOperatorControl() && isEnabled()) {\n \tmyRobot.tankDrive(controller, 2, controller, 5);\n Timer.delay(0.005);\t\t// wait for a motor update time\n }\n }",
"@Override\n public void teleopPeriodic() {\n try {\n mDriveController.update();\n mOperatorController.update();\n driverControl();\n \n } catch (Throwable t) {\n CrashTracker.logThrowableCrash(t);\n throw t;\n }\n \n }",
"@Override\n public void teleopPeriodic() {\n }",
"@Override\n public void teleopPeriodic() {\n }",
"public void teleopPeriodic() \n {\n // NIVision.Rect rect = new NIVision.Rect(10, 10, 100, 100);\n /*\n NIVision.IMAQdxGrab(session, frame, 1);\n //NIVision.imaqDrawShapeOnImage(frame, frame, rect,\n // DrawMode.DRAW_VALUE, ShapeMode.SHAPE_OVAL, 0.0f);\n */\n \n //cam.getImage(frame);\n //camServer.setImage(frame);\n \n //CameraServer.getInstance().setImage(frame);\n \n if(verticalLift.limitSwitchHit())\n verticalLift.resetEnc();\n \n Scheduler.getInstance().run();\n }",
"public void teleopPeriodic() {\r\n }",
"@Override\n public void teleopPeriodic() {\n CommandScheduler.getInstance().run();\n OI.getInstance().getPilot().run();\n SmartDashboard.putNumber(\"gyro\", getRobotContainer().getTecbotSensors().getYaw());\n SmartDashboard.putBoolean(\"isSpeed\", getRobotContainer().getDriveTrain().getTransmissionMode() == DriveTrain.TransmissionMode.speed);\n SmartDashboard.putString(\"DT_MODE\", getRobotContainer().getDriveTrain().getCurrentDrivingMode().toString());\n SmartDashboard.putNumber(\"x_count\", getRobotContainer().getClimber().getxWhenPressedCount());\n\n }",
"public void operatorControl() {\n \tmyRobot.setSafetyEnabled(true);\n while (isOperatorControl() && isEnabled()) {\n \tdouble x = stick2.getRawAxis(0);\n \tdouble y = stick2.getRawAxis(1);\n \tdouble rot = stick.getRawAxis(0);\n \tSmartDashboard.putNumber(\"x1\", x);\n SmartDashboard.putNumber(\"y1\", y);\n SmartDashboard.putNumber(\"rot1\", rot);\n \tif(Math.abs(x) < .2)\n \t\tx = 0;\n \tif(Math.abs(y) < .2)\n \t\ty = 0;\n \tif(Math.abs(rot) < .2)\n \t\trot = 0;\n \tmyRobot.mecanumDrive_Cartesian(x*-1, y*-1,rot*-1, gyro.getAngle());\n double current1 = pdp.getCurrent(0);\n double current2 = pdp.getCurrent(13);\n double current3 = pdp.getCurrent(15);\n double current4 = pdp.getCurrent(12);\n SmartDashboard.putNumber(\"Front Left current\", current1);\n SmartDashboard.putNumber(\"back Left current\", current2);\n SmartDashboard.putNumber(\"Front right current\", current3);\n SmartDashboard.putNumber(\"back right current\", current4);\n SmartDashboard.putNumber(\"x\", x);\n SmartDashboard.putNumber(\"y\", y);\n SmartDashboard.putNumber(\"rot\", rot);\n SmartDashboard.putNumber(\"Gyro\", gyro.getAngle());\n \tTimer.delay(0.005);\t\t// wait for a motor update time\n }\n }",
"public void teleopPeriodic() \r\n {\r\n Watchdog.getInstance().feed();\r\n Scheduler.getInstance().run();\r\n \r\n //Polls the buttons to see if they are active, if they are, it adds the\r\n //command to the Scheduler.\r\n if (mecanumDriveTrigger.get()) \r\n Scheduler.getInstance().add(new MechanumDrive());\r\n \r\n else if (tankDriveTrigger.get())\r\n Scheduler.getInstance().add(new TankDrive());\r\n \r\n else if (OI.rightJoystick.getRawButton(2))\r\n Scheduler.getInstance().add(new PolarMechanumDrive());\r\n \r\n resetGyro.get();\r\n \r\n //Puts the current command being run by DriveTrain into the SmartDashboard\r\n SmartDashboard.putData(DriveTrain.getInstance().getCurrentCommand());\r\n \r\n SmartDashboard.putString(ERRORS_TO_DRIVERSTATION_PROP, \"Test String\");\r\n \r\n \r\n }",
"@Override\n\tpublic void teleopPeriodic() {\n\t}",
"@Override\n\tpublic void teleopPeriodic() {\n\t\tScheduler.getInstance().run();\n\t\tisAutonomous = false;\n\t\tisTeleoperated = true;\n\t\tisEnabled = true;\n\t\tupdateLedState();\n\t\t//SmartDashboard.putNumber(\"Gyro\", Robot.drivebase.driveGyro.getAngle());\n\t\tSmartDashboard.putNumber(\"Climber Current Motor 1\", Robot.climber.climberTalon.getOutputCurrent());\n\t\tSmartDashboard.putNumber(\"Climber Current motor 2\", Robot.climber.climberTalon2.getOutputCurrent());\n\t\t//visionNetworkTable.getGearData();\n\t//\tvisionNetworkTable.showGearData();\n\t\tSmartDashboard.putNumber(\"GM ACTUAL POSITION\", Robot.gearManipulator.gearManipulatorPivot.getPosition());\n\n\t\tif(Robot.debugging){\t\t\t\n\t\t\tSmartDashboard.putNumber(\"Shooter1RPM Setpoint\", shooter.shooter1.getSetpoint());\n\t \tSmartDashboard.putNumber(\"Intake Pivot Encoder Position\", Robot.gearManipulator.gearManipulatorPivot.getPosition());\n\t\n\t\t\tSmartDashboard.putNumber(\"Gear Manipulator Setpoint\", gearManipulator.gearManipulatorPivot.getSetpoint());\n\t\t}\n\t\t//\tvisionNetworkTable.getGearData();\n\t\t//visionNetworkTable.getHighData();\n\t}",
"public void teleopPeriodic() {\n \tteleop.teleopPeriodic();\n }",
"@Override\n public void teleopPeriodic() {\n\tupdateDiagnostics();\n\tScheduler.getInstance().run();\n }",
"public void teleopPeriodic() {\r\n\t\tScheduler.getInstance().run();\r\n\t}",
"public void teleopPeriodic() {\n driverScreen.updateLCD();\n }",
"@Override\n public void teleopPeriodic() {\n teleop.periodic();\n toggleCompressor = toggleCompressor ^ robot.compressorToggle.get();\n robot.runCompressor.set(toggleCompressor);\n Watcher.update();\n\n }",
"@Override\n public void robotPeriodic() {\n }",
"@Override\n public void robotPeriodic() {\n }",
"@Override\n public void robotPeriodic() {\n }",
"@Override\n public void robotPeriodic() {\n }",
"@Override\n public void robotPeriodic() {\n }",
"@Override\n public void robotPeriodic() {\n }",
"public void updatePeriodic() {\r\n }",
"public void teleopPeriodic() {\n Scheduler.getInstance().run();\n drive.updateTeleop();\n sensor.updateTeleop();\n }",
"@Override\n public void teleopPeriodic() {\n // drive.DrivePeriodic();\n controllerMap.controllerMapPeriodic();\n // intake.IntakePeriodic();\n // climb.ClimbPeriodic();\n\n }",
"public void teleopPeriodic()\n\t{\n\t\tScheduler.getInstance().run();\n\t}",
"@Override\n\tpublic void teleopPeriodic() //runs the teleOp part of the code, repeats every 20 ms\n\t{\n\t\tScheduler.getInstance().run(); //has to be here, I think that this is looping the method\n\t\tSmartDashboard.putNumber(\"Encoder Left: \", RobotMap.encoderLeft.getRaw()); //putting the value of the left encoder to the SmartDashboard\n\t\tSmartDashboard.putNumber(\"Encoder Right: \", RobotMap.encoderRight.getRaw()); //putting the value of the right encoder to the smartDashboard\n\t\tSmartDashboard.putNumber(\"Ultrasonic sensor\", ultrasonic.getDistanceIn()); //putting the value of the ultrasonic sensor to the smartDashboard\n//\t\tSmartDashboard.putBoolean(\"allOK\", Robot.driveFar.ultrasonicOK);\n\t\tdriveExecutor.execute(); //running the execute method in driveExecutor\n\t\tgrab.execute(); //running the execute() method in GearGrab_Command (should run without this but this is ensuring us that it is on)\n\t}",
"@Override\n public void teleopPeriodic()\n {\n commonPeriodic();\n }",
"@Override\n\tpublic void teleopPeriodic() {\n\t\tScheduler.getInstance().run();\n\t\n\t\tif (oi.getRightTrig()) {\n\t\t\tshifter.set(Value.kForward);\n\t\t} else if (oi.getLeftTrig()) {\n\t\t\tshifter.set(Value.kReverse);\n\t\t}\n\t\tSystem.out.println(shifter.get());\n\t\t\t\n\t\tif(oi.getClimber()){\n\t\t\tclimber.set(1.0);\n\t\t\tSystem.out.println(\"climber running\");\n\t\t}else {\n\t\t\tclimber.set(0);\n\t\t\tSystem.out.println(\"climber not running\");\n\t\t}\n\t}",
"@Override\n public void autonomousPeriodic() {\n \n }",
"@Override\n public void periodic() {\n\n }",
"@Override\n public void periodic() {\n\n }",
"@Override\n public void autonomousPeriodic() {\n\n }",
"@Override\n\tpublic void robotPeriodic() {\n\t}",
"@Override\n\tpublic void robotPeriodic() {\n\t}",
"public void teleopPeriodic() {\n Scheduler.getInstance().run();\n }",
"public void teleopPeriodic() {\n Scheduler.getInstance().run();\n }",
"public void teleopPeriodic() {\n Scheduler.getInstance().run();\n }",
"public void teleopPeriodic() {\n Scheduler.getInstance().run();\n }",
"@Override\n public void robotPeriodic() {\n\n enabledCompr = pressBoy.enabled();\n //pressureSwitch = pressBoy.getPressureSwitchValue();\n currentCompr = pressBoy.getCompressorCurrent();\n //SmartDashboard.putBoolean(\"Pneumatics Loop Enable\", closedLoopCont);\n SmartDashboard.putBoolean(\"Compressor Status\", enabledCompr);\n //SmartDashboard.putBoolean(\"Pressure Switch\", pressureSwitch);\n SmartDashboard.putNumber(\"Compressor Current\", currentCompr);\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void autonomousPeriodic() {\n }",
"@Override\n public void autonomousPeriodic() {\n }",
"@Override\n public void autonomousPeriodic() {\n }",
"@Override\r\n public void periodic() {\n }",
"@Override\n public void periodic() {\n\n }",
"@Override\n public void periodic() {\n\n }",
"@Override\n public void periodic() {\n\n }",
"@Override\n public void periodic() {\n\n }",
"@Override\n\tpublic void teleopPeriodic() {\n\t\tScheduler.getInstance().run();\n\t\tSmartDashboard.putBoolean(\"Max Intake Extension: \", RobotMap.intakeLifted.get());\n\t\tSmartDashboard.putBoolean(\"Max Lift Extension:\", RobotMap.isAtTop.get());\n\t\tSmartDashboard.putBoolean(\"Min Lift Extension:\", RobotMap.isAtBottom.get());\n\t\tDriveTrain.driveWithJoystick(RobotMap.stick, RobotMap.rd); // Drive\n\t\tTeleOp.RaiseLift(RobotMap.liftTalon, RobotMap.controller); // Raise lift\n\t\tif(RobotMap.controller.getRawAxis(RobotMap.lowerLiftAxis) >= 0.2) {\n\t\tTeleOp.LowerLift(RobotMap.liftTalon, RobotMap.controller);\n\t\t}\n\t\tTeleOp.DropIntake(RobotMap.controller, RobotMap.intakeLifter);\n\t\tTeleOp.spinOut(RobotMap.intakeVictorLeft, RobotMap.controller);\n\t\t//TeleOp.spinnySpinny(RobotMap.intakeVictorLeft, RobotMap.stick);\n\t}",
"public void autonomousPeriodic()\r\n {\r\n \r\n }",
"@Override\n\tpublic void teleopPeriodic() {\n\t\tScheduler.getInstance().run();\n\t}",
"@Override\n\tpublic void teleopPeriodic() {\n\t\tScheduler.getInstance().run();\n\t}",
"@Override\n\tpublic void teleopPeriodic() {\n\t\tScheduler.getInstance().run();\n\t}",
"@Override\n\tpublic void teleopPeriodic() {\n\t\tupdate();\n\t\t\n\t\t//dashboard outputs\n\t\tdashboardOutput();\n\t\t\n\t\t\n\t\t\n\t\tif (tankDriveBool) {\n\t\t\ttankDrive();\n\t\t} \n\t\telse {\n\t\t\ttankDrive();\n\t\t}\n\t\tif (buttonA) {\n\t\t\ttest = true;\n\t\t\twhile (test) {\n\t\t\t\tcalibrate(10);\n\t\t\t\ttest = false;\n\t\t\t}\n\t\t}\n\t\tif (buttonY) {\n\t\t\tclimbMode = !climbMode;\n\t\t\tcontroller.setRumble(Joystick.RumbleType.kRightRumble, 0.5);\n\t\t\tcontroller.setRumble(Joystick.RumbleType.kLeftRumble, 0.5);\n\t\t\tTimer.delay(0.5);\n\t\t\tcontroller.setRumble(Joystick.RumbleType.kRightRumble, 0);\n\t\t\tcontroller.setRumble(Joystick.RumbleType.kLeftRumble, 0);\n\t\t}\n\t\tverticalMovement();\n\t\tgrab();\n\t}",
"public void teleopPeriodic() {\n\t\t// resetAndDisable();\n\t\tupdateDashboard();\n\t\tLogitechJoystick.controllers();\n\t\tDrivetrain.arcadeDrive();\n\t\tShooterAngleMotor.angleShooter();\n\t\tBallShooter.shootBalls();\n\t\tSonicSensor.updateSensors();\n\t\t\n\t\t//if(LogitechJoystick.rightBumper2)\n\t\t\t//{\n\t\t\t\t//LowBar.makeArmStable();\n\t\t\t//}\n\n\t}",
"@Override\n public void autonomousPeriodic() {\n }",
"@Override\n public void teleopPeriodic() {\n \tbeginPeriodic();\n Scheduler.getInstance().run();\n endPeriodic();\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n\tpublic void periodic()\n\t{\n\t}",
"public void teleopPeriodic() {\n Scheduler.getInstance().run();\n rumbleInYourPants();\n turnSpindleIfNeeded();\n turnWinchIfNeeded();\n if (arcadeDrive != null) \n arcadeDrive.start();\n }"
] | [
"0.7665666",
"0.73227316",
"0.7286976",
"0.72593725",
"0.7255314",
"0.71488637",
"0.71488637",
"0.71138996",
"0.7093574",
"0.7090445",
"0.70560575",
"0.7046668",
"0.704289",
"0.7039102",
"0.7032054",
"0.7023366",
"0.6963418",
"0.69623876",
"0.69429386",
"0.69309705",
"0.69309705",
"0.69309705",
"0.69309705",
"0.69309705",
"0.69309705",
"0.6899386",
"0.6882646",
"0.68753546",
"0.687443",
"0.6872987",
"0.68692183",
"0.6860374",
"0.68447095",
"0.6841578",
"0.6841578",
"0.6831749",
"0.68232137",
"0.68232137",
"0.6814693",
"0.6814693",
"0.6814693",
"0.6814693",
"0.67941135",
"0.677258",
"0.677258",
"0.677258",
"0.677258",
"0.677258",
"0.677258",
"0.677258",
"0.677258",
"0.677258",
"0.677258",
"0.677258",
"0.677258",
"0.677258",
"0.677258",
"0.677258",
"0.677258",
"0.677258",
"0.677258",
"0.677258",
"0.677258",
"0.677258",
"0.677258",
"0.677258",
"0.677258",
"0.677258",
"0.677258",
"0.677258",
"0.677258",
"0.677258",
"0.677258",
"0.677258",
"0.677258",
"0.677258",
"0.677258",
"0.677258",
"0.67706984",
"0.67706984",
"0.67706984",
"0.6768479",
"0.6764131",
"0.6764131",
"0.6764131",
"0.6764131",
"0.6757807",
"0.67566633",
"0.67341703",
"0.67341703",
"0.67341703",
"0.67252094",
"0.6721157",
"0.67074573",
"0.6701728",
"0.66846615",
"0.66846615",
"0.66846615",
"0.6682299",
"0.6671709"
] | 0.68936527 | 26 |
This function is called periodically during test mode | public void testPeriodic() {
LiveWindow.run();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void testPeriodic()\n {\n \n }",
"@Override\n public void testPeriodic() {\n }",
"@Override\n public void testPeriodic() {\n }",
"@Override\n public void testPeriodic() {\n }",
"@Override\n public void testPeriodic() {\n }",
"@Override\n public void testPeriodic() {\n }",
"@Override\n public void testPeriodic() {\n }",
"@Override\n public void testPeriodic() {\n }",
"@Override\n public void testPeriodic() {\n }",
"@Override\n public void testPeriodic() {\n }",
"@Override\n public void testPeriodic() {\n }",
"@Override\n public void testPeriodic() {\n }",
"@Override\n public void testPeriodic() {\n\n LiveWindow.updateValues();\n }",
"@Override\n\tpublic void testPeriodic() {\n\n\t}",
"@Override\n\tpublic void testPeriodic() {\n\t\tLiveWindow.run();\n\t}",
"@Override\n\tpublic void testPeriodic() {\n\t\tLiveWindow.run();\n\t}",
"@Override\n\tpublic void testPeriodic() {\n\t\tLiveWindow.run();\n\t}",
"@Override\n\tpublic void testPeriodic() {\n\t\tLiveWindow.run();\n\t}",
"public void testPeriodic() {\n Scheduler.getInstance().run();\n }",
"@Override\n\tpublic void testPeriodic() {\n\t\n\t}",
"@Override\n\tpublic void testPeriodic() {\n\t}",
"@Override\n\tpublic void testPeriodic() {\n\t}",
"@Override\n\tpublic void testPeriodic() {\n\t\t\n\t}",
"@Override\n\tpublic void testPeriodic() {\n\t\t\n\t}",
"public void testPeriodic() {\n\t\tLiveWindow.run();\n\t}",
"@Override\n\tpublic void testPeriodic() {\n\t\tLiveWindow.run();\n\t\tisAutonomous = false;\n\t\tisTeleoperated = true;\n\t\tisEnabled = true;\n\t}",
"@Override\n\tpublic void testPeriodic() {\n\t\tbeginPeriodic();\n\t\t//LiveWindow.run();\n\t\tendPeriodic();\n\t}",
"@Override\r\n\tpublic void sssDoLwTestPeriodic() {\n\r\n\t}",
"@Override\n\tpublic void testPeriodic() {}",
"public void testPeriodic() {\n \n }",
"public void testPeriodic() {\n \n }",
"public void testPeriodic() {\n \n }",
"public void testPeriodic() {\n\n\t}",
"public void testPeriodic() {\n\t}",
"@Override\n public void testPeriodic() {\n //Diagnostics.writeString(\"State\", \"TEST\");\n }",
"public void testPeriodic() {\r\n }",
"public void testPeriodic() {\n LiveWindow.run();\n //init.start();\n }",
"public void testPeriodic() {\r\n \r\n }",
"public void testPeriodic() {\r\n \r\n }",
"protected void runEachSecond() {\n \n }",
"@Override\n public void testPeriodic() {\n CommandScheduler.getInstance().run();\n\n SmartDashboard.putNumber(\"XCOUNT\", getRobotContainer().getClimber().getxWhenPressedCount());\n\n\n }",
"public void testPeriodic() \n {\n LiveWindow.run();\n }",
"public void testPeriodic() {\n \t\n }",
"public void testPeriodic() {\n \tterrainStates();\n \tdebug();\n }",
"@Test\n public void testTimelyTest() {\n }",
"public void testPeriodic() {\r\n \r\n }",
"@SuppressWarnings(\"PMD.JUnit4TestShouldUseTestAnnotation\")\n public void testPeriodic() {\n if (m_tmpFirstRun) {\n System.out.println(\"Default testPeriodic() method... Override me!\");\n m_tmpFirstRun = false;\n }\n }",
"protected void runEachMinute() {\n \n }",
"@Test\n public void refresh() throws Exception {\n }",
"@Override\r\n public void runTests() {\r\n getTemperature();\r\n }",
"@Override\n public void simulationPeriodic() {\n }",
"public void demoSchduleMethod() {\n log.info(\"Method executed at every 5 seconds. Current time is :: \" + new Date());\n }",
"@Override\n public void periodic() {\n // This method will be called once per scheduler run\n }",
"private void dofakework() {\n\t\ttry {\n\t\t\tThread.sleep(1000);\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"@Before\r\n\tpublic void doThisEveryTime() {\n\t}",
"@Override\n public void simulationPeriodic() {\n }",
"public void run() {\n\n long now = System.currentTimeMillis();\n //System.out.println(\"1: \" + this.getClass().getName() + \"#\" + id + \", \" + (System.currentTimeMillis()) + \" ms\");\n try {\n\n test.setUp();\n this.testReport = new TestReport(id, this.getClass().getName());\n while (alive.get()) {\n test.test(this.id);\n counter.incrementAndGet();\n }\n //long stop = System.currentTimeMillis();\n //System.out.println(\"2: \" + this.getClass().getName() + \"#\" + id + \", \" + stop + \" \" + (stop - now) + \" ms\");\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n try {\n test.tearDown();\n this.testReport.stopTimers();\n //testReport.printInfo();\n } catch (Exception e) {\n // ignore errors in tearDown for now\n }\n }\n\n }",
"@Override\n public void autonomousPeriodic() {\n \n }",
"public void run() {\n\t\t\t \t \n\t\t\t \t test.load2();\n\t\t\t \t //System.out.println(\"heart beat report\"+System.currentTimeMillis());\n\t\t\t }",
"public void _testSandbox() throws InterruptedException{\n Thread.sleep(500000);\n }",
"@Override\n public void autonomousPeriodic() {\n\n }",
"public void run() {\n\t\t\t \t \n\t\t\t \t test.load1();\n\t\t\t \t //System.out.println(\"heart beat report\"+System.currentTimeMillis());\n\t\t\t }",
"protected void runEach10Minutes() {\n try {\n saveHistoryData();\n if (isEnabledScheduler()) {\n boolean action = getLightSchedule().getCurrentSchedule();\n if (action) {\n if (!currentState) switchOn();\n } else {\n if (currentState) switchOff();\n }\n }\n } catch (RemoteHomeManagerException e) {\n RemoteHomeManager.log.error(44,e);\n } catch (RemoteHomeConnectionException e) {\n RemoteHomeManager.log.error(45,e);\n }\n }",
"@Override\n public void periodic() {\n\n }",
"@Override\n public void periodic() {\n\n }",
"@Override\n\tpublic void testPeriodic(IRobot robot) {\n\t}",
"@Override\n public void autonomousPeriodic() {\n }",
"@Override\n public void autonomousPeriodic() {\n }",
"@Override\n public void autonomousPeriodic() {\n }",
"protected void runEachHour() {\n \n }",
"protected void runAfterTest() {}",
"@Override\n public void periodic() {\n UpdateDashboard();\n }",
"@Override\n\tpublic void sleep() {\n\t\t\n\t}",
"public void runLastTime(){\n\t\t/*try {\n\t\t\tlong timeDiff = 100;\n\t\t\t\n\t\t\tFeatureListController controller = new FeatureListController(timeDiff);\n\t\t\tTestSensorListener listener1 = new TestSensorListener();\n\t\t\tcontroller.registerSensorListener(listener1);\n\t\t\tTestSensorListener listener2 = new TestSensorListener();\n\t\t\tcontroller.registerSensorListener(listener2);\n\t\t\t\n\t\t\t\n\t\t\t//20 samples in total\n\t\t\tcontroller.addFeatureList(listener1, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tThread.sleep(10);\n\t\t\tcontroller.addFeatureList(listener2, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tcontroller.addFeatureList(listener1, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tThread.sleep(10);\n\t\t\tcontroller.addFeatureList(listener1, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tThread.sleep(10);\n\t\t\tcontroller.addFeatureList(listener2, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tcontroller.addFeatureList(listener1, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tThread.sleep(10);\n\t\t\tcontroller.addFeatureList(listener1, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tThread.sleep(10);\n\t\t\tcontroller.addFeatureList(listener2, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tcontroller.addFeatureList(listener1, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tThread.sleep(10);\n\t\t\tcontroller.addFeatureList(listener1, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tThread.sleep(10);\n\t\t\tcontroller.addFeatureList(listener2, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tcontroller.addFeatureList(listener1, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tThread.sleep(10);\n\t\t\tcontroller.addFeatureList(listener1, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tThread.sleep(10);\n\t\t\tcontroller.addFeatureList(listener2, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tcontroller.addFeatureList(listener1, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tThread.sleep(10);\n\t\t\tcontroller.addFeatureList(listener1, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tThread.sleep(10);\n\t\t\tcontroller.addFeatureList(listener2, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tcontroller.addFeatureList(listener1, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tThread.sleep(10);\n\t\t\tcontroller.addFeatureList(listener1, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tThread.sleep(10);\n\t\t\tcontroller.addFeatureList(listener2, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tcontroller.addFeatureList(listener1, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tThread.sleep(10);\n\t\t\tcontroller.addFeatureList(listener1, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tThread.sleep(10);\n\t\t\tcontroller.addFeatureList(listener2, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tcontroller.addFeatureList(listener1, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tThread.sleep(10);\n\t\t\tcontroller.addFeatureList(listener1, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tThread.sleep(10);\n\t\t\tcontroller.addFeatureList(listener2, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tcontroller.addFeatureList(listener1, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tThread.sleep(10);\n\t\t\tcontroller.addFeatureList(listener1, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tThread.sleep(10);\n\t\t\tcontroller.addFeatureList(listener2, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tcontroller.addFeatureList(listener1, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\t\n\t\t\t\n\t\t\tfor(int i=0;i<2;++i){\n\t\t\t\tSensorListener listener;\n\t\t\t\tif(i==0)\n\t\t\t\t\tlistener = listener1;\n\t\t\t\telse \n\t\t\t\t\tlistener = listener2;\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"LISTENER\" + (i+1));\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"Now:\" + new Date().getTime());\n\t\t\t\tList<FeatureList> featureLists = controller.getLastFeatureListsInMilliseconds(listener, -1);\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"All feature lists with milliseconds method\");\n\t\t\t\tfor(FeatureList l : featureLists)\n\t\t\t\t\tSystem.out.println(l.getTimestamp().getTime());\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"All feature lists with n method\");\n\t\t\t\tList<FeatureList> featureLists2 = controller.getLastNFeatureList(listener, -1);\n\t\t\t\tfor(FeatureList l : featureLists)\n\t\t\t\t\tSystem.out.println(l.getTimestamp().getTime());\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"Last milliseconds \" + 40);\n\t\t\t\tList<FeatureList> featureLists3 = controller.getLastFeatureListsInMilliseconds(listener, 40);\n\t\t\t\tfor(FeatureList l : featureLists3)\n\t\t\t\t\tSystem.out.println(l.getTimestamp().getTime());\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"Last N Feature Lists \" + 6);\n\t\t\t\tList<FeatureList> featureLists4 = controller.getLastNFeatureList(listener, 6);\n\t\t\t\tfor(FeatureList l : featureLists4)\n\t\t\t\t\tSystem.out.println(l.getTimestamp().getTime());\n\t\t\t}\n\t\t\t\n\n\t\t} catch (InterruptedException ex) {\n\t\t\tSystem.out.println(ex.getLocalizedMessage());\n//Logger.getLogger(CaseFeatureListController.class.getName()).log(Level.SEVERE, new double[10], ex);\n\t\t}*/\n\t\t\n\t}",
"@Override\n\tpublic void homeTestRun() {\n\t\t\n\t}",
"@Override\r\n\tpublic void run() {\r\n\t\ttimer = new Timer();\r\n\t\ttimer.schedule(new TimerTask() {\r\n\t\t\t@Override\r\n public void run() {\r\n Main.myIntegratedSensorSuite.reinitializeRainData();\r\n }\r\n\t\t}, 0, 20000); //runs once initially then again every 20 seconds\r\n\t}",
"@Override\r\n\tpublic void perSecond() {\n\r\n\t}",
"private void stressTest() {\n\t\t\n\t\tTimerTask task = new TimerTask() {\n\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tint count = 1;\n\t\t\t\tint len = 100;\n\t\t\t\tint maxCount = 1000000;\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"Start stress test...\");\n\t\t\t\twhile (count <= maxCount) {\n\t\t\t\t\t\n\t\t\t\t\tif ((count % 1000) == 0) {\n\t\t\t\t\t\tSystem.out.println(\"Count: \" + count + \" of \" + maxCount);\n\t\t\t\t\t\tSystem.gc();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tlong larray[] = new long[len];\n\t\t\t\t\t\n\t\t\t\t\tlarray[0] = count;\n\t\t\t\t\tlarray[len-1] = count;\n\t\t\t\t\t\n\t\t\t\t\tMessage message = Message.createMessage(getId(), \"Triggers\");\n\t\t\t\t\tmessage.setPayload(larray);\n\t\t\t\t\tsend(message);\n\n\t\t\t\t\t\n//\t\t\t\t\ttry {\n//\t\t\t\t\t\tThread.sleep(25);\n//\t\t\t\t\t} catch (InterruptedException e) {\n//\t\t\t\t\t\te.printStackTrace();\n//\t\t\t\t\t}\n\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"Done.\");\n\n\t\t\t}\n\n\t\t};\n\n\t\tTimer timer = new Timer();\n\t\t// one time schedule\n\t\ttimer.schedule(task, 2000L);\n\t}",
"@Override\n public void autonomousPeriodic() {\n \n Scheduler.getInstance().run();\n \n }",
"@Override\n public void periodic() {\n\n }",
"@Override\n public void periodic() {\n\n }",
"@Override\n public void periodic() {\n\n }",
"@Override\n public void periodic() {\n\n }",
"@Override\n public void autonomousPeriodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }"
] | [
"0.7800292",
"0.75680834",
"0.75680834",
"0.75680834",
"0.75680834",
"0.75680834",
"0.75680834",
"0.75680834",
"0.75680834",
"0.75680834",
"0.75680834",
"0.7512861",
"0.7469647",
"0.73747677",
"0.7364915",
"0.7364915",
"0.7364915",
"0.7364915",
"0.73407704",
"0.7327189",
"0.7316925",
"0.7316925",
"0.7293946",
"0.7293946",
"0.72782886",
"0.72316843",
"0.7207506",
"0.72043234",
"0.7198124",
"0.71692103",
"0.71692103",
"0.71692103",
"0.71379286",
"0.7127555",
"0.7124697",
"0.7116264",
"0.7114296",
"0.71093524",
"0.71093524",
"0.7086036",
"0.6976391",
"0.69696784",
"0.6968194",
"0.69305265",
"0.6840329",
"0.6718411",
"0.6617472",
"0.6582912",
"0.6554973",
"0.65520746",
"0.65263224",
"0.6479532",
"0.64763993",
"0.6471669",
"0.6442216",
"0.6428751",
"0.63924575",
"0.63699263",
"0.63633364",
"0.63593084",
"0.63436556",
"0.6325129",
"0.632187",
"0.6300568",
"0.6300568",
"0.6288256",
"0.62854356",
"0.62854356",
"0.62854356",
"0.62832934",
"0.6280706",
"0.6270328",
"0.6259011",
"0.6219991",
"0.6214941",
"0.6213134",
"0.62109196",
"0.6197903",
"0.6191227",
"0.61894435",
"0.61894435",
"0.61894435",
"0.61894435",
"0.61847234",
"0.6178531",
"0.6178531",
"0.6178531",
"0.6178531",
"0.6178531",
"0.6178531",
"0.6178531",
"0.6178531",
"0.6178531"
] | 0.71145856 | 41 |
d f apk_check_unsigned.apk o H:\xll\software\apktool\apk_check_unsigned | public static void main(String[] args) throws Exception {
// GameConfig gameConfig = new GameConfig();
// gameConfig.setGameDir("G:\\amber2\\03_tools\\AndriodPackage\\Release\\GameApk\\product_anysdk-release.apk");
// gameConfig.setGameOutDir("G:\\amber2\\03_tools\\AndriodPackage\\Release\\GameFolder");
// gameConfig.setChannelDir("G:\\amber2\\03_tools\\AndriodPackage\\Release\\ChannelApk\\AnySDK_haima.apk");
// gameConfig.setChannelOutDir("G:\\amber2\\03_tools\\AndriodPackage\\Release\\ChannelFolder");
// gameConfig.setUnitDir("G:\\amber2\\03_tools\\AndriodPackage\\Release\\UniteFolder");
// gameConfig.setUnitOutDir("G:\\amber2\\03_tools\\AndriodPackage\\Release\\UniteApk");
// IniConfig iniConfig = new IniConfig();
// gameConfig.setIniConfig(iniConfig);
// Map<String, Config> configs = new HashMap<String, Config>(8);
// iniConfig.setConfigs();
decode(gameApk, gameFolder);
decode(channelApk, channelFolder);
mergeFolder(channelFolder, gameFolder);
encodeApk(gameFolder, UniteApk + "\\new.apk");
signApk(UniteApk + "\\new.apk");
if (useAndroidSigner) {
optimizeApk(UniteApk + "\\new.apk");
} else {
optimizeApk(UniteApk + "\\Signed.apk");
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void disass(){\n\t\tString temp = \"apktool d \" + f;\n\t\t\n\t\t//put it in the cmd\n\t\tProcessBuilder builder = new ProcessBuilder(\"cmd.exe\",\"/c\",temp);\n\t\tbuilder.redirectErrorStream(true);\n\t\t\n\t\ttry{\n\t\t\tProcess p = builder.start();\n\t\t}catch(IOException e){\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\t\n\t}",
"public boolean ApkJarSigner(String apkname, String[] keyname) {\n Runtime rn=Runtime.getRuntime();\r\n try{\r\n \tSystem.out.println(\"JarSigner \"+apkname);\r\n \tProcess process = rn.exec(\"java -classpath \"+JarPath+\"../tools.jar sun.security.tools.JarSigner -keystore \"+\r\n \t\t\tkeyname[0]+\" -storepass \" +keyname[1]+\" -keypass \"+keyname[2]+\" -sigfile \"+keyname[4]+\" \"+apkname+\" \"+keyname[3]);\r\n \tprocess.waitFor();\r\n }catch(Exception e){\r\n \toutputstr(\"Error: JarSigner \"+apkname);\r\n \treturn false; \r\n } \t\t\t\r\n\t\treturn true;\r\n\t}",
"public static void CheckApkFiles(String sourceFolder) {\n\n\t\ttry {\n\t\t\tString reportFolderPath = FileHandler.createDirectory(sourceFolder,\n\t\t\t\t\t\"reports\");\n\n\t\t\tCollection<File> files = FileHandler.findFiles(sourceFolder,\n\t\t\t\t\tnew String[] { Constants.APK_EXTENSION });\n\n\t\t\tString reportPath = reportFolderPath + File.separator\n\t\t\t\t\t+ \"virustotal_results.tsv\";\n\t\t\tFile reportFile = new File(reportPath);\n\t\t\t// FileUtils.deleteQuietly(reportFile);\n\t\t\tSystem.out.print(\"File Name\" + Constants.TAB_CHAR + \"SHA256\"\n\t\t\t\t\t+ Constants.TAB_CHAR + \"Detected\" + Constants.TAB_CHAR\n\t\t\t\t\t+ \"Undetected\");\n\t\t\tFileUtils.write(reportFile, \"File Name\" + Constants.TAB_CHAR\n\t\t\t\t\t+ \"SHA256\" + Constants.TAB_CHAR + \"Detected\"\n\t\t\t\t\t+ Constants.TAB_CHAR + \"Undetected\", true);\n\t\t\tint count = 0;\n\t\t\tVirusTotal VT = new VirusTotal(\n\t\t\t\t\tFileHandler\n\t\t\t\t\t\t\t.readConfigValue(Constants.VIRUS_TOTAL_TOKEN_CONFIG));\n\t\t\tfor (File file : files) {\n\n\t\t\t\tString apkReportFilePath = file.getParentFile()\n\t\t\t\t\t\t.getAbsolutePath()\n\t\t\t\t\t\t+ File.separator\n\t\t\t\t\t\t+ \"reports\"\n\t\t\t\t\t\t+ File.separator + file.getName().replace(\"apk\", \"tsv\");\n\t\t\t\tFile apkReportFile = new File(apkReportFilePath);\n\t\t\t\tif (!apkReportFile.exists()) {\n\n\t\t\t\t\tint detected = 0;\n\t\t\t\t\tint undetected = 0;\n\n\t\t\t\t\tbyte[] data = FileUtils.readFileToByteArray(file);\n\n\t\t\t\t\tString sha256Hex = DigestUtils.sha256Hex(data);\n\t\t\t\t\ttry {\n\t\t\t\t\t\tcount++;\n\t\t\t\t\t\tSet<ReportScan> reports = VT.ReportScan(sha256Hex);\n\t\t\t\t\t\tFileUtils.write(apkReportFile, \"\\nAV\"\n\t\t\t\t\t\t\t\t+ Constants.TAB_CHAR + \"Detected\"\n\t\t\t\t\t\t\t\t+ Constants.TAB_CHAR + \"Malware\"\n\t\t\t\t\t\t\t\t+ Constants.TAB_CHAR + \"Update\", true);\n\t\t\t\t\t\t// Output the details of each scan result from a vendor\n\t\t\t\t\t\tfor (ReportScan report : reports) {\n\t\t\t\t\t\t\tif (report.getDetected().equals(\"true\"))\n\t\t\t\t\t\t\t\tdetected++;\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\tundetected++;\n\n\t\t\t\t\t\t\tFileUtils.write(\n\t\t\t\t\t\t\t\t\tapkReportFile,\n\t\t\t\t\t\t\t\t\t\"\\n\" + report.getVendor()\n\t\t\t\t\t\t\t\t\t\t\t+ Constants.TAB_CHAR\n\t\t\t\t\t\t\t\t\t\t\t+ report.getDetected()\n\t\t\t\t\t\t\t\t\t\t\t+ Constants.TAB_CHAR\n\t\t\t\t\t\t\t\t\t\t\t+ report.getMalwarename()\n\t\t\t\t\t\t\t\t\t\t\t+ Constants.TAB_CHAR\n\t\t\t\t\t\t\t\t\t\t\t+ report.getUpdate(), true);\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tSystem.out.print(\"\\n\" + file.getName()\n\t\t\t\t\t\t\t\t+ Constants.TAB_CHAR + \"ERROR\");\n\t\t\t\t\t\tFileUtils.write(reportFile, \"\\n\" + file.getName()\n\t\t\t\t\t\t\t\t+ Constants.TAB_CHAR + \"ERROR\", true);\n\n\t\t\t\t\t}\n\t\t\t\t\tif ((detected + undetected) != 0) {\n\t\t\t\t\t\tSystem.out.print(\"\\n\" + file.getName()\n\t\t\t\t\t\t\t\t+ Constants.TAB_CHAR + sha256Hex\n\t\t\t\t\t\t\t\t+ Constants.TAB_CHAR + detected\n\t\t\t\t\t\t\t\t+ Constants.TAB_CHAR + undetected);\n\t\t\t\t\t\tFileUtils.write(reportFile, \"\\n\" + file.getName()\n\t\t\t\t\t\t\t\t+ Constants.TAB_CHAR + sha256Hex\n\t\t\t\t\t\t\t\t+ Constants.TAB_CHAR + detected\n\t\t\t\t\t\t\t\t+ Constants.TAB_CHAR + undetected, true);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (count != 0 && count % 4 == 0)\n\t\t\t\t\tThread.sleep(61000);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public static void main(String[] args) {\n\t\tString[] appNames = {\"58tongcheng\",\"aiqiyi\",\"baiduditu\",\"baidunuomi\",\"baiduwaimai\",\"chunyuyisheng\",\"dazhongdianping\",\"didichuxing\",\"duomiyinyue\",\"edaijia\",\"ganji\",\"jingdong\",\"jinritoutiao\",\"kugouyinyue\",\"lanrentingshu\",\"leshi\",\"maimai\",\"meilishuo\",\"meituan\",\"mojitianqi\",\"momo\",\"maoyandianying\",\"qingtingfm\",\"qq\",\"qqkongjian\",\"qqtongbuzhushou\",\"qqyouxiang\",\"saomiaoquannengwang\",\"souhushipin\",\"sougoushurufa\",\"taobao\",\"tengxunshipin\",\"tianmao\",\"ucliulanqi\",\"wangxin\",\"wangyigongkaike\",\"wangyixinwen\",\"wangyiyouxiang\",\"wangyiyunketang\",\"weixin\",\"weizhibiji\",\"xinlangweibo\",\"youdaocidian\",\"youdaoyunbiji\",\"youku\",\"youxin\",\"yy\",\"zhangyue\",\"zhifubao\",\"zuoyebang\"};\r\n\t\t//for (int i = 0; i < appMarket.length; i++) {\r\n\t\t\r\n\t\t\tfor (int j = 0; j < appNames.length; j++) {\r\n\t\t\tString\tfilePath = \"F:/app/\"+91+\"/\"+appNames[j]+\".apk\";\r\n\t\t\tSHA256 sha256 = new SHA256();\r\n\t\t\tsha256.SHA256(filePath);\r\n\t\t\tSystem.out.println(filePath+sha256.sha256);\r\n\t\t\t}\r\n\t}",
"public String ApkZipAlign(String apkname) {\n\t\tString outname = null;\r\n Runtime rn=Runtime.getRuntime();\r\n try{\r\n \toutname = apkname.substring(0, apkname.lastIndexOf(\".\"))+\"Align.apk\";\r\n \tSystem.out.println(\"ZipAlign \"+outname); \r\n \tFile zipalignf = new File(outname);\r\n \tif(zipalignf.exists())\r\n \t\tzipalignf.delete();\r\n \t\r\n \tProcess process = rn.exec(JarPath+\"zipalign -v 4 \"+apkname+\" \"+outname); \t \t\r\n \tWatchThread wt = new WatchThread(process); \r\n \twt.start(); \r\n \tprocess.waitFor();\r\n \twt.setOver(true); \r\n \twt.join();\r\n \t\r\n \tif(!new File(outname).exists())\r\n \t{\r\n \toutputstr(\"Error: ZipAlign \"+apkname);\r\n \treturn null; \r\n \t}\r\n \telse\r\n \t{\r\n \t\tnew File(apkname).delete();\r\n \t}\r\n }catch(Exception e){\r\n \toutputstr(\"Error: ZipAlign \"+apkname);\r\n \treturn null; \r\n } \t\t\r\n\t\treturn outname;\r\n\t}",
"public static void installApk(Context context, String filename) {\n\t\tString url = filename;\n\t\tLog.e(\"tag\", \"安装地址---》\" + url);\n\t\ttry {\n\t\t\tString command = \"chmod \" + \"777\" + \" \" + filename;\n\t\t\tRuntime runtime = Runtime.getRuntime();\n\t\t\truntime.exec(command);\n\t\t\tLog.d(\"tag\", \"chmod 777 ok\");\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tIntent intent = new Intent();\n\t\tintent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n\t\tintent.setAction(Intent.ACTION_VIEW);\n\t\tintent.setDataAndType(Uri.parse(\"file://\" + url), \"application/vnd.android.package-archive\");\n\t\tcontext.startActivity(intent);\n\t}",
"private APKFileDetails analyzeApkFile(String filePath) {\n try {\n final String[] commands = {this.aaptCommand, \"dump\", \"badging\", filePath};\n log.debug(\"Executing shell-commands: {}\", Arrays.toString(commands));\n final Process exec = Runtime.getRuntime().exec(commands);\n\n final AtomicReference<String> appPkg = new AtomicReference<>();\n final AtomicReference<String> appName = new AtomicReference<>();\n final AtomicReference<String> appVersion = new AtomicReference<>();\n final AtomicReference<Integer> appVersionCode = new AtomicReference<>();\n final AtomicReference<String> appArch = new AtomicReference<>();\n final List<String> errorLines = new ArrayList<>();\n\n // Process the error stream by collecting all the error lines for further logging\n StreamGobbler errorGobbler = new StreamGobbler(exec.getErrorStream(), \"ERROR\", errorLines::add);\n\n // Process the output by analyzing the line starting with \"package:\"\n StreamGobbler outputGobbler = new StreamGobbler(exec.getInputStream(), \"APK-file DUMP\", line -> {\n if (line.startsWith(\"package:\")) {\n parseInfoLine(line, appPkg, appVersion, appVersionCode);\n if (appPkg.get() == null || appVersion.get() == null) {\n // AAPT output is wrong!\n log.warn(\"Failed to parse aapt output: '\" + line + \"', trying legacy parser\");\n parseInfoLineLegacy(line, appPkg, appVersion, appVersionCode);\n }\n } else if (line.startsWith(\"native-code:\") || line.startsWith(\"alt-native-code:\")) {\n // This is an optional line, so do not care for errors\n parseNativeCodeLine(line, appArch);\n } else if (line.startsWith(\"application-label:\")) {\n parseAppName(line, appName);\n }\n });\n\n // Get ready to consume input and error streams from the process\n errorGobbler.start();\n outputGobbler.start();\n\n final int exitCode = exec.waitFor();\n\n outputGobbler.join();\n errorGobbler.join();\n\n if (exitCode == 0) {\n log.debug(\"Parsed application name and version from APK-file {}: {} {} {}\",\n filePath, appPkg, appVersion, appVersionCode);\n APKFileDetails result = new APKFileDetails();\n\n result.setPkg(appPkg.get());\n result.setVersion(appVersion.get());\n Integer versionCode = appVersionCode.get();\n result.setVersionCode(versionCode != null ? versionCode : 0);\n result.setArch(appArch.get());\n result.setName(appName.get());\n\n return result;\n } else {\n log.error(\"Could not analyze the .apk-file {}. The system process returned: {}. \" +\n \"The error message follows:\", filePath, exitCode);\n errorLines.forEach(log::error);\n throw new APKFileAnalyzerException(\"Could not analyze the .apk-file\");\n }\n } catch (IOException | InterruptedException e) {\n log.error(\"Unexpected error while analyzing APK-file: {}\", filePath, e);\n throw new APKFileAnalyzerException(\"Unexpected error while analyzing APK-file\", e);\n }\n }",
"public boolean AndroidAapt(String cmd,String workpath) {\n Runtime rn=Runtime.getRuntime();\r\n try{\r\n \t//System.out.println(\"aapt \"+cmd);\r\n \tProcess process = rn.exec(JarPath+\"aapt \"+cmd,null,new File(workpath));\r\n \tprocess.waitFor();\r\n }catch(Exception e){\r\n \toutputstr(\"Error: aapt \"+cmd);\r\n \treturn false; \r\n } \t\t\t\r\n\t\treturn true;\r\n\t}",
"public void run(){\n\t\tGlobal.printer.print(\"\\ngetting resource from \"+apkName+\" ... \");\n\t\tString cmd = \"java -jar \\\"\"+this.apktoolPath+\"\\\" d \\\"\"+this.filePath+\"\\\" -f -o \\\"\"+ this.apkPath+\"\\\"\";\n\t\t//Global.copyDir(this.tmpResPath, this.apkPath);\n\t\ttry {\n\t\t\tGlobal.sysCmd(cmd );//,Global.printer);\n\t\t\tGlobal.printer.print(\"succeed!!\");\n\t\t} catch (Exception e) {\n\t\t\tGlobal.printer.print(\"error!!\");\n\t\t\t//Global.printer.print(e.getMessage());\n\t\t}\n\t}",
"public static void main(String[] args) {\r\n\t\tString appname=\"Miniz.apk\";\r\n\t\t\t\t\t\t\t\t\t//for creation of entrypoint providing the application and android jar\r\n\t//Options.v().setPhaseOption(\"cg.cha\",\"on\");\r\n\tSetupApplication app = new\tSetupApplication(\"android.jar\",appname);\r\n\ttry {\r\n\t \t\t app.calculateSourcesSinksEntrypoints(\"SourceAndSinks.txt\");\t\t \t\t\t\r\n\t} catch (Exception e) {\r\n\t\te.printStackTrace();\r\n }\r\n\tsoot.G.reset();\r\n\t//set soot options\r\n\tOptions.v().set_src_prec(Options.src_prec_apk);\r\n\tOptions.v().set_process_dir(Collections.singletonList(appname));\r\n\tOptions.v().set_force_android_jar(\"android.jar\");\r\n\tOptions.v().set_whole_program(true);\r\n\tOptions.v().set_allow_phantom_refs(true);\r\n\t//For Handling the Junit test cases output the result into Jimple files\r\n\tOptions.v().set_output_format(Options.output_format_J);\r\n\t//For the code execution \r\n\t//Options.v().set_output_format(Options.output_format_dex);\r\n\tOptions.v().setPhaseOption(\"cg.spark verbose:true\",\"on\");\r\n\tOptions.v().setPhaseOption(\"on-fly-cg\",\"true\");\r\n\t//Renaming dummy main method as void main(String args) for sending the cfg in VASCO\r\n\tList<Type> s = new ArrayList<Type>();\r\n\ts=Arrays.asList(new Type[]{\r\n\tsoot.ArrayType.v(soot.RefType.v(\"java.lang.String\"), 1)\r\n\t});\r\n\t//creating dummy main\r\n\tSootMethod entryPoint =app.getEntryPointCreator().createDummyMain();\r\n\tentryPoint.setName(\"main\");\r\n\tentryPoint.setParameterTypes(s);\r\n\tChain<Unit> u1=entryPoint.getActiveBody().getUnits();\r\n Unit first=u1.getFirst();\r\n //Replacing the constant intitialization of dummy main variable by randomnumber for VASCO doesnt remove any branches from dummy main\r\n Scene.v().loadClassAndSupport(\"java.lang.Math\");\r\n SootMethod sm=Scene.v().getMethod(\"<java.lang.Math: double random()>\");\r\n SootMethodRef smRef=sm.makeRef();\r\n if(first instanceof AssignStmt){\r\n \tValue lhsOp = ((AssignStmt) first).getLeftOp();\r\n Value rhsOp = ((AssignStmt) first).getRightOp();\r\n if(lhsOp instanceof Local && rhsOp instanceof Constant){\r\n \tu1.removeFirst();\r\n u1.addFirst(Jimple.v().newAssignStmt(lhsOp, Jimple.v().newStaticInvokeExpr(smRef)));\r\n }\r\n }\r\n\r\n Scene.v().loadNecessaryClasses();\r\n System.out.println(\"Class::--\"+entryPoint.getDeclaringClass()+\"\\n Dummy Main....-->\"+ entryPoint.getActiveBody());\r\n\tScene.v().setEntryPoints(Collections.singletonList(entryPoint));\r\n\tOptions.v().set_main_class(entryPoint.getDeclaringClass().getName());\r\n\tPackManager.v().runPacks();\r\n\tcg = Scene.v().getCallGraph();\r\n \t\r\n\t\r\n\t//function to get all the methods existing in the call graph\r\n\trecursive(entryPoint);\r\n\t//Printing the methods in the call graph \r\n\tfor(Entry<String, Boolean> eSet : visited.entrySet()){\r\n\t\t\tString value=eSet.getKey().toString();\r\n\t\t\tSystem.out.println(\"Methods in callg graph: \"+value);\r\n\t}\r\n\t\r\n\tList<SootMethod> unusedmethods=new ArrayList<SootMethod>();\t\r\n\tSystem.out.println(\"All::-->\");\r\n\t//Fetching all the methods in the Application and storing the unused methods in a list(unusedmethods)\r\n\tChain<SootClass> clas=Scene.v().getApplicationClasses();\r\n\tfor(SootClass abc1:clas){\r\n\t \tSootClass sClass=Scene.v().loadClassAndSupport(abc1.getName());\r\n\t \tList <SootMethod> methods=sClass.getMethods();\r\n\t\t\t \tfor(SootMethod a: methods){\r\n\t \t\tSystem.out.println( a.getSignature());\r\n\t \t\tif(visited.containsKey(a.getSignature()))\r\n\t \t\t\tcontinue;\r\n\t \t\telse{\r\n\t \t\t\t//Handling classes which extends View and the attributes are not defined in Layout.xml , Handling all init & access functions and Handler functions along with SQLiteDatabase Helper \r\n\t \t\t \t\t\tif(!(a.getSubSignature().contains(\"void <init>\") || a.getSubSignature().contains(\"void <clinit>\") || a.getSubSignature().contains(\"access$\") || a.getDeclaringClass().getSuperclass().getName().contains(\"SQLiteOpenHelper\"))){\r\n\t \t\t \t\t\t\tif(a.getDeclaringClass().getSuperclass().getName().equals(\"android.view.View\") || a.getDeclaringClass().getSuperclass().getName().contains(\"android.os.Handler\")){\r\n\t \t\t \t\t\t\t\tList<SootMethod> methodlist=a.getDeclaringClass().getSuperclass().getMethods();\r\n\t \t\t\t \t\t\t\tint flag=0;\r\n\t \t\t\t \t\t\t\tfor(SootMethod ab: methodlist){\r\n\t \t\t\t \t\t\t\t\tif(ab.getSubSignature()==a.getSubSignature()){// && !unusedmethods.contains(a))\r\n\t \t\t\t \t\t\t\t\t\tflag=1;\r\n\t \t\t\t \t\t\t\t\t\tbreak;\r\n\t \t\t\t \t\t\t\t\t}\r\n\t \t\t\t \t\t\t\t}\r\n\t \t\t\t \t\t\t\tif(flag!=1)\r\n\t \t\t\t \t\t\t\t\tunusedmethods.add(a);\r\n\t \t\t\t \t\t\t}\r\n\t \t\t \t\t\t\telse\r\n\t \t\t\t \t\t\t\tunusedmethods.add(a);\r\n\t \t\t\t\t}\r\n\t \t\t\t\t\r\n\t \t\t\t\r\n\t \t\t}\r\n\r\n\t \t}\r\n\t }\r\n\t \r\n\t //Handling the functions when the class implements interface\r\n\t List<SootMethod> delm = new ArrayList<SootMethod>();\r\n\t List<SootMethod> un=unusedmethods;\r\n\t for(SootMethod m:un){\r\n\t\t \t if(m.getDeclaringClass().getInterfaceCount()>0){\r\n\t\t\t\t\t Chain<SootClass> interfaces=m.getDeclaringClass().getInterfaces();\r\n\t\t\t\t\t for(SootClass c:interfaces){\r\n\t\t\t\t\t\t List<SootMethod> smi=c.getMethods();\r\n\t\t\t\t\t\t for(SootMethod m1:smi){\r\n\t\t\t\t\t\t\t if(m1.getName().contains(m.getName())){\r\n\t\t\t\t\t\t\t\t delm.add(m);\t\t\t\t \r\n\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t }\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t }\r\n\t\t\t \r\n\t\t\t }\r\n\t }\r\n\t for(SootMethod m1:delm){\r\n\t\t unusedmethods.remove(m1);\r\n\t }\r\n\r\n\t //Handling Reflection methods\r\n\t for(SootMethod a: un){\r\n\t\t\tSootClass classWeNeedToLoad = a.getDeclaringClass();\r\n\t\t\tfor(Map.Entry<String,String> entry: Driver.runmethods.entrySet()){\r\n\t\t\t//\tif(!(entry.getKey().contains(classWeNeedToLoad.toString()) && a.getName().contains(entry.getValue())))\r\n\t\t\t\tif(entry.getValue().contains(a.getName()) && entry.getKey().contains(classWeNeedToLoad.toString())){\r\n\t\t\t\t\tunusedmethods.remove(a);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} \r\n\t \r\n\t //Remove the unused methods\t \r\n\t for(SootMethod a: unusedmethods){\r\n\t \tSootClass classWeNeedToLoad = a.getDeclaringClass();\r\n\t \tclassWeNeedToLoad.removeMethod(a);\r\n\t\t}\r\n\t\r\n\r\n\t//Calling Vasco for interprocedural analysis \r\n\tInterproceduralAnalysis ipa = new InterproceduralAnalysis(new EmptyReporter());\r\n\tipa.doAnalysis();\r\n\tprint();\r\n\t//Deleting the ifs with constant result\r\n\tdeleteifs(ifStmts);\r\n\t\r\n\t//Write the apk\r\n\tPackManager.v().writeOutput();\r\n}",
"public File buildLocalDownloadAppFile(int downloadedVersionCode) {\n \tStringBuilder sb = new StringBuilder(\"Warranty_\");\n \tsb.append(String.valueOf(downloadedVersionCode))\n \t.append(\".apk\");\n \treturn new File(getExternalStorageRoot(\".download\"), sb.toString());\n }",
"private static void printUsage() {\n\t\tSystem.out.println(\"[0] apk files directory\");\n\t\tSystem.out.println(\"[1] android-jar directory\");\n\t}",
"private void downloadApk(String url) {\n if (UpdateHelper.CheckForSDCard.isSDCardPresent()) {\n\n //check if app has permission to write to the external storage.\n if (EasyPermissions.hasPermissions(MainActivity.this, Manifest.permission.WRITE_EXTERNAL_STORAGE)) {\n new DownloadFileHelper(MainActivity.this).execute(url);\n\n } else {\n //If permission is not present request for it.\n EasyPermissions.requestPermissions(MainActivity.this, getString(R.string.write_file), WRITE_REQUEST_CODE, Manifest.permission.READ_EXTERNAL_STORAGE);\n }\n\n }\n }",
"public static void main(String args[]){\r\n\t\ttry{\r\n\t\t\tExtract ex = new Extract();\r\n\t\t\t\r\n\t\t\t// TODO: remove hard coded file\r\n\t\t\t//ex.unZip(\"D:\\\\Workspace\\\\APKExtractor\\\\res\\\\Fragment.apk\");\r\n\t\t\t//ex.unZip(\"E:\\\\Workspace3.7\\\\APKExtractor\\\\res\\\\Fragment.apk\");\r\n\t\t\t// ex.unZip(\"E:\\\\Workspace3.7\\\\APKExtractor\\\\res\\\\YPmobile.apk\");\r\n\t\t\t\r\n\t\t\tif(args == null || args.length == 0){\r\n\t\t\t\tthrow new Exception(\"Please mention APK file.\\nUsage java -cp CLASSPATH com.pras.Extract test.apk\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tString file = args[0];\r\n\t\t\tif(args.length > 1){\r\n\t\t\t\ttry{\r\n\t\t\t\t\tSystem.out.println(\"Log Level: \"+ args[1]);\r\n\t\t\t\t\tSystem.out.println(\"1- Debug, 2- Production. Debug is slow.\");\r\n\t\t\t\t\tint logLevel = Integer.parseInt(args[1]);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(logLevel != Log.DEBUG_LEVEL && logLevel != Log.PRODUCTION_LEVEL)\r\n\t\t\t\t\t\tthrow new Exception(\"Unsupported loglevel \"+ logLevel +\". Supported values: Debug- 1, Production - 2\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tLog.setLogLevel(logLevel);\r\n\t\t\t\t\t\r\n\t\t\t\t}catch(Exception e){\r\n\t\t\t\t\tthrow new Exception(\"Incorrect Log Level. Please mention APK file.\\nUsage java -cp CLASSPATH com.pras.Extract test.apk\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"Parsing data, please wait...\");\r\n\t\t\t// Unzip content\r\n\t\t\tex.unZip(file);\r\n\t\t\t// Parse Binary XML\r\n\t\t\tex.decodeBX();\r\n\t\t\t// Decode DEX file\r\n\t\t\tex.decodeDex();\r\n\t\t\t\r\n\t\t\tLog.exitLogger();\r\n\t\t\tSystem.out.println(\"Done!\");\r\n\t\t\t// EXperimentel. Still working on it...\r\n\t\t\t//ex.decodeResource();\r\n\t\t\t\r\n\t\t}catch(Exception ex){\r\n\t\t\tex.printStackTrace();\r\n\t\t}\r\n\t}",
"public void DownloadUpdate(String version)\n {\n String destination = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS) + \"/\";\n String fileName = \"textbomb.apk\";\n destination += fileName;\n final Uri uri = Uri.parse(\"file://\" + destination);\n Log.d(\"textbomb.apk\", \"Dest: \" + uri);\n\n //Delete update file if exists\n File file = new File(destination);\n if (file.exists())\n //file.delete() - test this, I think sometimes it doesnt work\n file.delete();\n\n //get url of app on server\n String url = \"https://github.com/wethegreenpeople/TextBomb/releases/download/\" + version + \"/textbomb.apk\";\n\n //set downloadmanager\n DownloadManager.Request request = new DownloadManager.Request(Uri.parse(url));\n request.setDescription(\"Textbomb\");\n request.setTitle(\"Textbomb\");\n\n //set destination\n request.setDestinationUri(uri);\n\n // get download service and enqueue file\n final DownloadManager manager = (DownloadManager) context.getSystemService(Context.DOWNLOAD_SERVICE);\n final long downloadId = manager.enqueue(request);\n\n //set BroadcastReceiver to install app when .apk is downloaded\n BroadcastReceiver onComplete = new BroadcastReceiver() {\n public void onReceive(Context ctxt, Intent intent) {\n File apkFile = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS) + \"/textbomb.apk\");\n intent = new Intent(Intent.ACTION_VIEW);\n Uri fileUri = android.support.v4.content.FileProvider.getUriForFile(context, context.getPackageName() + \".provider\", apkFile);\n intent.setDataAndType(fileUri, \"application/vnd.android.package-archive\");\n intent.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);\n ctxt.startActivity(intent);\n }\n };\n //register receiver for when .apk download is compete\n context.registerReceiver(onComplete, new IntentFilter(DownloadManager.ACTION_DOWNLOAD_COMPLETE));\n }",
"public static void main(String[] args) {\n File file = new File(\"E:\\\\111work\\\\code\\\\code_me\\\\myGitHub\\\\ImageDeflated\\\\app\\\\build\\\\imageDeflated\\\\main-main-a529e8aacb8190e75e555dd4d4a1ebd2\\\\mipmap-xxhdpi\\\\place_gesture.png\");\n boolean mainGenerated = isMainGenerated(file);\n System.out.println(\"mainGenerated= \" + mainGenerated);\n\n\n }",
"private static void convertBase64FileToHex() {\n\t\tString inFilename = \"7.txt\";\n\t\tString outFilename = \"7hex.txt\";\n\t\tFile outFile = new File(outFilename);\n\t\ttry {\n\n\t\t\t/******************************************************/\n\n\t\t\t/*\n\t\t\t * FIO01-J. Create files with appropriate access permissions\n\t\t\t * \n\t\t\t * @reference\n\t\t\t * https://www.securecoding.cert.org/confluence/display/java/FIO01-J\n\t\t\t * .+Create+files+with+appropriate+access+permissions\n\t\t\t */\n\n\t\t\t// Throw a warning message if file already exists and try to delete\n\t\t\t// it, rather than overwrite it.\n\t\t\t// No need to check if it is a directory, as we're going to delete\n\t\t\t// and recreate it anyway!\n\t\t\tif (outFile.exists()) {\n\t\t\t\tSystem.out.println(\"File already exists. Trying to delete it now...\");\n\t\t\t\tboolean result = outFile.delete();\n\t\t\t\tif (!result) {\n\t\t\t\t\tSystem.out.println(\"Already existing file/directory with name '\" + outFilename\n\t\t\t\t\t\t\t+ \"' not deleted successfully!\");\n\t\t\t\t\treturn;\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"Deleted successfully!\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t@SuppressWarnings(\"unused\")\n\t\t\tboolean result = outFile.createNewFile();\n\t\t\t// no need to check result which will be false only if the file\n\t\t\t// already exists which is already checked before!\n\t\t\toutFile.setReadable(true, true);\n\t\t\toutFile.setWritable(true, true);\n\t\t\t// For java versions <1.7, use this -\n\t\t\t// Runtime.getRuntime().exec(\"attrib -r \" + outFilename);\n\n\t\t\t/******************************************************/\n\n\t\t\tFileReader fr = new FileReader(inFilename);\n\t\t\tBufferedReader br = new BufferedReader(fr);\n\t\t\tFileWriter writer = new FileWriter(outFile);\n\t\t\tString s;\n\n\t\t\t// Read each line of the file as a String and pass it to the\n\t\t\t// function convertBase64ToHex() to get back the decoded String\n\t\t\twhile ((s = br.readLine()) != null) {\n\t\t\t\ts = convertBase64ToHex(s);\n\t\t\t\twriter.write(s);\n\t\t\t}\n\t\t\twriter.close();\n\t\t\tbr.close();\n\t\t\tfr.close();\n\t\t} catch (IOException e) {\n\t\t}\n\t}",
"public static String openApkAndUpdatePackage(String fileName, Context mContext) {\n File file = new File(mContext.getExternalFilesDir(null), fileName);\n Intent unKnownSourceIntent = new Intent(Settings.ACTION_MANAGE_UNKNOWN_APP_SOURCES).setData(Uri.parse(String.format(\"package:%s\", mContext.getPackageName())));\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n if (!mContext.getPackageManager().canRequestPackageInstalls()) {\n ((Activity) mContext).startActivityForResult(unKnownSourceIntent, OPEN_APK_UPDATE_PACKAGE_CODE);\n } else {\n Uri fileUri = FileProvider.getUriForFile(mContext, mContext.getPackageName() + \".provider\", file);\n Intent intent = new Intent(Intent.ACTION_VIEW, fileUri);\n intent.putExtra(Intent.EXTRA_NOT_UNKNOWN_SOURCE, true);\n intent.setDataAndType(fileUri, \"application/vnd.android.package-archive\");\n intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_NEW_TASK);\n intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);\n mContext.startActivity(intent);\n }\n } else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {\n Intent intent1 = new Intent(Intent.ACTION_INSTALL_PACKAGE);\n Uri uri = FileProvider.getUriForFile(mContext, mContext.getPackageName() + \".provider\", file);\n mContext.grantUriPermission(mContext.getPackageName(), uri, Intent.FLAG_GRANT_READ_URI_PERMISSION);\n mContext.grantUriPermission(mContext.getPackageName(), uri, Intent.FLAG_GRANT_WRITE_URI_PERMISSION);\n intent1.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n intent1.setDataAndType(uri, \"application/*\");\n intent1.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);\n intent1.addFlags(Intent.FLAG_GRANT_WRITE_URI_PERMISSION);\n mContext.startActivity(intent1);\n } else {\n Intent intent = new Intent(Intent.ACTION_VIEW);\n Uri uri = Uri.fromFile(file);\n intent.setDataAndType(uri, \"application/vnd.android.package-archive\");\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n mContext.startActivity(intent);\n }\n return fileName;\n }",
"public static int cleanDalvik() {\n\n\t\tCommandResult cmdResult = RootUtils.runCommand(\"ls /data/dalvik-cache/\", true);\n\t\tif (!cmdResult.error.equals(\"\")) {\n\t\t\treturn -1;\n\t\t}\n\n\t\tString str = cmdResult.result.replace(\"@\", \"/\").replace(\"/classes.dex\", \"\");\n\t\tString[] dalvikStr = str.split(\"\\n\");\n\n\t\tFile fClean = null;\n\t\tint cleanCount = 0;\n\t\tString dalvikName = \"\";\n\t\tCommandResult cleanResult = null;\n\t\tif (dalvikStr != null && dalvikStr.length != 0) {\n\t\t\tfor (String s : dalvikStr) {\n\t\t\t\tfClean = new File(s);\n\t\t\t\tif (!fClean.exists()) {\n\t\t\t\t\tdalvikName = s.replace(\"/\", \"@\");\n\t\t\t\t\tcleanResult = RootUtils.runCommand(String.format(\"rm -r /data/dalvik-cache/%s*\", dalvikName), true);\n\t\t\t\t\tif (!cleanResult.error.equals(\"\")) {\n\t\t\t\t\t\treturn -1;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcleanCount++;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn cleanCount;\n\t}",
"public static void main(String[] args) {\n\n String pfx = \"E:\\\\PDFFileTest\\\\1.pfx\";\n String tmpPath = \"E:\\\\PDFFileTest\\\\1562570792439.pdf\";\n String expPath = \"E:\\\\PDFFileTest\\\\11.11\\\\h83.pdf\";\n String gif = \"E:\\\\PDFFileTest\\\\1.gif\";\n String password = \"111111\";\n try {\n sign(pfx, tmpPath, expPath, gif, password);\n System.out.println(\"success\");\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"private void uhqa_4_fix() {\n try {\n CommandResult uhqa_4_fix = Shell.SU.run(\"chmod 0644 /data/user/0/com.hana.mao/files/uhqa_4.txt\");\n }\n catch (Exception e) {\n e.printStackTrace();\n }\n }",
"public void writeApkToBackup(PackageInfo pkg, FullBackupDataOutput output) {\n PackageInfo packageInfo = pkg;\n String appSourceDir = packageInfo.applicationInfo.getBaseCodePath();\n FullBackup.backupToTar(packageInfo.packageName, \"a\", null, new File(appSourceDir).getParent(), appSourceDir, output);\n File obbDir = new Environment.UserEnvironment(0).buildExternalStorageAppObbDirs(packageInfo.packageName)[0];\n if (obbDir != null) {\n File[] obbFiles = obbDir.listFiles();\n if (obbFiles != null) {\n String obbDirName = obbDir.getAbsolutePath();\n for (File obb : obbFiles) {\n FullBackup.backupToTar(packageInfo.packageName, \"obb\", null, obbDirName, obb.getAbsolutePath(), output);\n }\n }\n }\n }",
"public static void main(String[] args) throws MalformedURLException, InterruptedException {\n\t\t\n\t\tFile app= new File(\"E:/Testing/Drag_and_Drop/com.mobeta.android.demodslv.apk\");\n\t\t\n\t\t\n\t\tDesiredCapabilities capabilities= new DesiredCapabilities();\n\t\t\n\t\tcapabilities.setCapability(\"deviceName\", \"XT1033\");\n\t\tcapabilities.setCapability(\"platformName\", \"Android\");\n\t\tcapabilities.setCapability(\"platformVersion\", \"4.4.4\");\n\t\t\n\t\t//app details\n\t\tcapabilities.setCapability(\"app\",app.getAbsolutePath());\n\t\t\n\t\t//Appium details\n\t\t\n\t\tAndroidDriver driver= new AndroidDriver(new URL(\"http://127.0.0.1:4723/wd/hub\"), capabilities);\n\n\t\tThread.sleep(12000);\n\t\t\n\t\tif(driver.isAppInstalled(\"com.mobeta.android.demodslv\"))\n\t\t{\n\t\t\tSystem.out.println(\"Successfully Installed\");\n\t\t\t\n\t\t\t//Remove thrugh code\n\t\t\tdriver.removeApp(\"com.mobeta.android.demodslv\");\n\t\t\tThread.sleep(8000);\n\t\t\tSystem.out.println(\"Removed sucessfully\");\n\t\t\t\n\t\t\t\n\t\t\tdriver.installApp(\"E:/Testing/Drag_and_Drop/com.mobeta.android.demodslv.apk\");\n\t\t\tThread.sleep(8000);\n\t\t\tSystem.out.println(\"Again Installed the app\");\n\t\t\t\n\t\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println(\"NOT Installed the app\");\n\t\t}\n\n\t\t\n\n\t}",
"@Override\n\tpublic void doAction() {\n\t\tString filename = ModuleContext.getInstance().getAppContext().getFilesDir()+\"/dexfile.dex\";\n\t\tDexFileInfoCollecter.getInstance().backsmaliDexFile(filename, dexpath);\n\t\tLogger.log(\"the dexfile data save to =\"+filename);\n\t}",
"public void installApk(String filename) {\n // systemLib.Installapk(filename);\n // if (isregister == false) {\n // isregister = true;\n // IntentFilter intentFilter = new IntentFilter(MyIntent.ACTION_INSTALL_BEGIN);\n // intentFilter.addAction(MyIntent.ACTION_INSTALL_END);\n // mContext.registerReceiver(mReceiver, intentFilter);\n // }\n // //start the service\n // Intent startservice = new Intent();\n // startservice.setAction(MyIntent.ACTION_PROXY);\n // startservice.putExtra(MyIntent.EXTRA_OPERATION, MyIntent.EXTRA_INSTALL);\n // startservice.putExtra(MyIntent.EXTRA_ARG1, filename);\n // Log.print(\"startservice intent is \" + startservice);\n // mContext.startService(startservice);\n }",
"@Override\n\t\t\t\t\tpublic void onClick(DialogInterface p1, int p2)\n\t\t\t\t\t{\n UnPacker unpacker = new UnPacker();\n\t\t String path_png = edit_png.getText().toString();\n\t\t String path_atlas = null;\n\t\t String path_output = edit_undir.getText().toString();\n\t\t int index = path_png.lastIndexOf('.');\n\t\t if(index>0){\n\t\t\t path_atlas = path_png.substring(0,index)+\".atlas\";\n\t\t }\n\t\t unpacker.unPNG( path_atlas,path_png, path_output);\n\t\t Toast.makeText(MainActivity.this,\"解包完成\",Toast.LENGTH_SHORT).show();\n\t\t\t\t\t}",
"private void printKeyHash(){\n try {\n PackageInfo info = getPackageManager().getPackageInfo(\n \"andbas.ui3_0628\",\n PackageManager.GET_SIGNATURES);\n for (Signature signature : info.signatures) {\n MessageDigest md = MessageDigest.getInstance(\"SHA\");\n md.update(signature.toByteArray());\n Log.d(\"KeyHash:\", Base64.encodeToString(md.digest(), Base64.DEFAULT));\n }\n } catch (PackageManager.NameNotFoundException e) {\n\n } catch (NoSuchAlgorithmException e) {\n\n }\n\n }",
"private void m2a(String str) {\n String str2;\n ApplicationInfo applicationInfo = getApplicationInfo();\n String str3 = applicationInfo.dataDir + \"/tx_shell\";\n f1b = applicationInfo.sourceDir;\n int i = VERSION.SDK_INT;\n Object obj = null;\n if (i >= 19) {\n if (i > 19) {\n String[] strArr = Build.SUPPORTED_64_BIT_ABIS;\n if (strArr != null && strArr.length > 1) {\n obj = 1;\n }\n } else if (new File(\"/system/lib64\").exists()) {\n obj = 1;\n }\n }\n String str4 = null;\n if (VERSION.SDK_INT < 21) {\n str4 = Build.CPU_ABI;\n }\n if ((str4 == null || str4.length() < 2) && VERSION.SDK_INT >= 21) {\n str4 = Build.SUPPORTED_ABIS[0];\n }\n Object obj2 = 1;\n if (str4.toLowerCase(Locale.US).contains(\"x86\")) {\n obj2 = null;\n } else if (VERSION.SDK_INT >= 21) {\n String[] strArr2 = Build.SUPPORTED_ABIS;\n if (strArr2 != null) {\n for (String str22 : strArr2) {\n if (str22.toLowerCase(Locale.US).contains(\"x86\")) {\n obj2 = null;\n }\n }\n }\n }\n Object obj3 = null;\n if (str4.toLowerCase(Locale.US).contains(\"mips\")) {\n obj3 = 1;\n }\n String str5 = VERSION.SDK_INT > 8 ? applicationInfo.nativeLibraryDir : \"/data/data/\" + mPKName + \"/lib\";\n String str6 = \"\";\n String str7 = \"\";\n String str8 = \"\";\n str8 = \"\";\n if (obj2 != null) {\n str22 = str + m7d();\n } else {\n str22 = str + m7d();\n str8 = str + m7d();\n }\n str6 = str6 + \"lib\" + str22 + \".so\";\n str8 = str7 + \"lib\" + str8 + \".so\";\n File file = new File(str5 + \"/\" + str6);\n File file2 = new File(str3 + \"/\" + str8);\n if (obj2 == null && VERSION.SDK_INT < 19) {\n if (!file2.exists()) {\n if (ZipUtil.exist(f1b, \"lib/armeabi/\" + str8) == 0) {\n if (ZipUtil.extract(f1b, \"lib/armeabi/\" + str8, str3 + \"/\" + str8) == 0) {\n }\n } else if (ZipUtil.extract(f1b, \"lib/armeabi-v7a/\" + str8, str3 + \"/\" + str8) == 0) {\n }\n }\n try {\n Runtime.getRuntime().exec(\"chmod 700 \" + str3 + \"/\" + str8);\n System.load(str3 + \"/\" + str8);\n } catch (IOException e) {\n e.printStackTrace();\n }\n } else if (file.exists()) {\n System.loadLibrary(str22);\n } else {\n String str9;\n str5 = \"\";\n str8 = str3 + \"/\" + str6;\n if (ZipUtil.exist(f1b, \"lib/\" + str4 + \"/\" + str6) == 0) {\n str9 = \"lib/\" + str4 + \"/\" + str6;\n } else {\n if (obj != null) {\n if (obj2 != null) {\n if (ZipUtil.exist(f1b, \"lib/arm64-v8a/\" + str6) == 0) {\n str9 = \"lib/arm64-v8a/\" + str6;\n } else if (ZipUtil.exist(f1b, \"lib/armeabi/\" + str6) == 0) {\n str9 = \"lib/armeabi/\" + str6;\n } else if (ZipUtil.exist(f1b, \"lib/armeabi-v7a/\" + str6) == 0) {\n str9 = \"lib/armeabi-v7a/\" + str6;\n }\n } else if (ZipUtil.exist(f1b, \"lib/x86_64/\" + str6) == 0) {\n str9 = \"lib/x86_64/\" + str6;\n } else if (ZipUtil.exist(f1b, \"lib/arm64-v8a/\" + str6) == 0) {\n str9 = \"lib/arm64-v8a/\" + str6;\n } else if (ZipUtil.exist(f1b, \"lib/x86/\" + str6) == 0) {\n str9 = \"lib/x86/\" + str6;\n } else if (ZipUtil.exist(f1b, \"lib/armeabi/\" + str6) == 0) {\n str9 = \"lib/armeabi/\" + str6;\n } else if (ZipUtil.exist(f1b, \"lib/armeabi-v7a/\" + str6) == 0) {\n str9 = \"lib/armeabi-v7a/\" + str6;\n }\n } else if (obj2 != null) {\n Object obj4;\n if (obj3 == null || ZipUtil.exist(f1b, \"lib/mips/\" + str6) != 0) {\n obj4 = null;\n str9 = str5;\n } else {\n obj4 = 1;\n str9 = \"lib/mips/\" + str6;\n }\n if (obj4 == null) {\n if (ZipUtil.exist(f1b, \"lib/armeabi/\" + str6) == 0) {\n str9 = \"lib/armeabi/\" + str6;\n } else if (ZipUtil.exist(f1b, \"lib/armeabi-v7a/\" + str6) == 0) {\n str9 = \"lib/armeabi-v7a/\" + str6;\n }\n }\n } else if (ZipUtil.exist(f1b, \"lib/x86/\" + str6) == 0) {\n str9 = \"lib/x86/\" + str6;\n } else if (ZipUtil.exist(f1b, \"lib/armeabi/\" + str6) == 0) {\n str9 = \"lib/armeabi/\" + str6;\n } else if (ZipUtil.exist(f1b, \"lib/armeabi-v7a/\" + str6) == 0) {\n str9 = \"lib/armeabi-v7a/\" + str6;\n }\n str9 = str5;\n }\n if (ZipUtil.extract(f1b, str9, str8) == 0) {\n try {\n Runtime.getRuntime().exec(\"chmod 700 \" + str8);\n System.load(str8);\n } catch (IOException e2) {\n e2.printStackTrace();\n }\n }\n }\n }",
"public static void main(String[] args) throws MalformedURLException, InterruptedException {\n\t\t\n\t\tFile app= new File(\"D:\\\\Testing\\\\Drag_drop\\\\com.mobeta.android.demodslv.apk\");\n\t\t\n\t\t//Launch app\n\t\tDesiredCapabilities capabilities= new DesiredCapabilities();\n\t\t\n\t\t//device details\n\t\tcapabilities.setCapability(\"deviceName\", \"GT-I9300I\");\n\t\tcapabilities.setCapability(\"platformName\", \"Android\");\n\t\tcapabilities.setCapability(\"platformVersion\", \"4.4.4\");\n\t\t\n\t\tcapabilities.setCapability(\"app\", app.getAbsolutePath());\n\t\t\n\t\tAndroidDriver driver= new AndroidDriver(new URL(\"http://127.0.0.1:4723/wd/hub\"), capabilities);\n\t\t\n\t\t//wait\n\t\tThread.sleep(4000);\n\t\t\n\t\tif(driver.isAppInstalled(\"com.mobeta.android.demodslv\"))\n\t\t{\n\t\t\tSystem.out.println(\"App installed Successfully\");\n\t\t\tThread.sleep(8000);\n\t\t\t\n\t\t\tdriver.removeApp(\"com.mobeta.android.demodslv\");\n\t\t\tSystem.out.println(\"Removed the app\");\n\t\t\tThread.sleep(8000);\n\t\t\t\n\t\t\tdriver.installApp(\"D:\\\\Testing\\\\Drag_drop\\\\com.mobeta.android.demodslv.apk\");\n\t\t\tSystem.out.println(\"App installed again\");\n\t\t\tThread.sleep(8000);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println(\"NOT installed the app\");\n\t\t}\n\t\n\t}",
"public void apkk() {\n\t\tthis.apkInfo = new apkinfo();\n\t\tthis.apkInfo.selectAPKInput();\n\t}",
"public static void install(android.content.Context r11) {\n /*\n r9 = 20;\n r10 = 4;\n r7 = \"MultiDex\";\n r8 = \"install\";\n android.util.Log.i(r7, r8);\n r7 = IS_VM_MULTIDEX_CAPABLE;\n if (r7 == 0) goto L_0x001a;\n L_0x0010:\n r7 = \"MultiDex\";\n r8 = \"VM has multidex support, MultiDex support library is disabled.\";\n android.util.Log.i(r7, r8);\n L_0x0019:\n return;\n L_0x001a:\n r7 = android.os.Build.VERSION.SDK_INT;\n if (r7 >= r10) goto L_0x004c;\n L_0x001e:\n r7 = new java.lang.RuntimeException;\n r8 = new java.lang.StringBuilder;\n r8.<init>();\n r9 = \"Multi dex installation failed. SDK \";\n r8 = r8.append(r9);\n r9 = android.os.Build.VERSION.SDK_INT;\n r8 = r8.append(r9);\n r9 = \" is unsupported. Min SDK version is \";\n r8 = r8.append(r9);\n r8 = r8.append(r10);\n r9 = \".\";\n r8 = r8.append(r9);\n r8 = r8.toString();\n r7.<init>(r8);\n throw r7;\n L_0x004c:\n r1 = getApplicationInfo(r11);\t Catch:{ Exception -> 0x0064 }\n if (r1 == 0) goto L_0x0019;\n L_0x0052:\n r8 = installedApk;\t Catch:{ Exception -> 0x0064 }\n monitor-enter(r8);\t Catch:{ Exception -> 0x0064 }\n r0 = r1.sourceDir;\t Catch:{ all -> 0x0061 }\n r7 = installedApk;\t Catch:{ all -> 0x0061 }\n r7 = r7.contains(r0);\t Catch:{ all -> 0x0061 }\n if (r7 == 0) goto L_0x0093;\n L_0x005f:\n monitor-exit(r8);\t Catch:{ all -> 0x0061 }\n goto L_0x0019;\n L_0x0061:\n r7 = move-exception;\n monitor-exit(r8);\t Catch:{ all -> 0x0061 }\n throw r7;\t Catch:{ Exception -> 0x0064 }\n L_0x0064:\n r3 = move-exception;\n r7 = \"MultiDex\";\n r8 = \"Multidex installation failure\";\n android.util.Log.e(r7, r8, r3);\n r7 = new java.lang.RuntimeException;\n r8 = new java.lang.StringBuilder;\n r8.<init>();\n r9 = \"Multi dex installation failed (\";\n r8 = r8.append(r9);\n r9 = r3.getMessage();\n r8 = r8.append(r9);\n r9 = \").\";\n r8 = r8.append(r9);\n r8 = r8.toString();\n r7.<init>(r8);\n throw r7;\n L_0x0093:\n r7 = installedApk;\t Catch:{ all -> 0x0061 }\n r7.add(r0);\t Catch:{ all -> 0x0061 }\n r7 = android.os.Build.VERSION.SDK_INT;\t Catch:{ all -> 0x0061 }\n if (r7 <= r9) goto L_0x00ec;\n L_0x009c:\n r7 = \"MultiDex\";\n r9 = new java.lang.StringBuilder;\t Catch:{ all -> 0x0061 }\n r9.<init>();\t Catch:{ all -> 0x0061 }\n r10 = \"MultiDex is not guaranteed to work in SDK version \";\n r9 = r9.append(r10);\t Catch:{ all -> 0x0061 }\n r10 = android.os.Build.VERSION.SDK_INT;\t Catch:{ all -> 0x0061 }\n r9 = r9.append(r10);\t Catch:{ all -> 0x0061 }\n r10 = \": SDK version higher than \";\n r9 = r9.append(r10);\t Catch:{ all -> 0x0061 }\n r10 = 20;\n r9 = r9.append(r10);\t Catch:{ all -> 0x0061 }\n r10 = \" should be backed by \";\n r9 = r9.append(r10);\t Catch:{ all -> 0x0061 }\n r10 = \"runtime with built-in multidex capabilty but it's not the \";\n r9 = r9.append(r10);\t Catch:{ all -> 0x0061 }\n r10 = \"case here: java.vm.version=\\\"\";\n r9 = r9.append(r10);\t Catch:{ all -> 0x0061 }\n r10 = \"java.vm.version\";\n r10 = java.lang.System.getProperty(r10);\t Catch:{ all -> 0x0061 }\n r9 = r9.append(r10);\t Catch:{ all -> 0x0061 }\n r10 = \"\\\"\";\n r9 = r9.append(r10);\t Catch:{ all -> 0x0061 }\n r9 = r9.toString();\t Catch:{ all -> 0x0061 }\n android.util.Log.w(r7, r9);\t Catch:{ all -> 0x0061 }\n L_0x00ec:\n r5 = r11.getClassLoader();\t Catch:{ RuntimeException -> 0x00fe }\n if (r5 != 0) goto L_0x010b;\n L_0x00f2:\n r7 = \"MultiDex\";\n r9 = \"Context class loader is null. Must be running in test mode. Skip patching.\";\n android.util.Log.e(r7, r9);\t Catch:{ all -> 0x0061 }\n monitor-exit(r8);\t Catch:{ all -> 0x0061 }\n goto L_0x0019;\n L_0x00fe:\n r3 = move-exception;\n r7 = \"MultiDex\";\n r9 = \"Failure while trying to obtain Context class loader. Must be running in test mode. Skip patching.\";\n android.util.Log.w(r7, r9, r3);\t Catch:{ all -> 0x0061 }\n monitor-exit(r8);\t Catch:{ all -> 0x0061 }\n goto L_0x0019;\n L_0x010b:\n clearOldDexDir(r11);\t Catch:{ Throwable -> 0x0131 }\n L_0x010e:\n r2 = new java.io.File;\t Catch:{ all -> 0x0061 }\n r7 = r1.dataDir;\t Catch:{ all -> 0x0061 }\n r9 = SECONDARY_FOLDER_NAME;\t Catch:{ all -> 0x0061 }\n r2.<init>(r7, r9);\t Catch:{ all -> 0x0061 }\n r7 = 0;\n r4 = android.support.multidex.MultiDexExtractor.load(r11, r1, r2, r7);\t Catch:{ all -> 0x0061 }\n r7 = checkValidZipFiles(r4);\t Catch:{ all -> 0x0061 }\n if (r7 == 0) goto L_0x013c;\n L_0x0122:\n installSecondaryDexes(r5, r2, r4);\t Catch:{ all -> 0x0061 }\n L_0x0125:\n monitor-exit(r8);\t Catch:{ all -> 0x0061 }\n r7 = \"MultiDex\";\n r8 = \"install done\";\n android.util.Log.i(r7, r8);\n goto L_0x0019;\n L_0x0131:\n r6 = move-exception;\n r7 = \"MultiDex\";\n r9 = \"Something went wrong when trying to clear old MultiDex extraction, continuing without cleaning.\";\n android.util.Log.w(r7, r9, r6);\t Catch:{ all -> 0x0061 }\n goto L_0x010e;\n L_0x013c:\n r7 = \"MultiDex\";\n r9 = \"Files were not valid zip files. Forcing a reload.\";\n android.util.Log.w(r7, r9);\t Catch:{ all -> 0x0061 }\n r7 = 1;\n r4 = android.support.multidex.MultiDexExtractor.load(r11, r1, r2, r7);\t Catch:{ all -> 0x0061 }\n r7 = checkValidZipFiles(r4);\t Catch:{ all -> 0x0061 }\n if (r7 == 0) goto L_0x0154;\n L_0x0150:\n installSecondaryDexes(r5, r2, r4);\t Catch:{ all -> 0x0061 }\n goto L_0x0125;\n L_0x0154:\n r7 = new java.lang.RuntimeException;\t Catch:{ all -> 0x0061 }\n r9 = \"Zip files were not valid.\";\n r7.<init>(r9);\t Catch:{ all -> 0x0061 }\n throw r7;\t Catch:{ all -> 0x0061 }\n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.support.multidex.MultiDex.install(android.content.Context):void\");\n }",
"@Override\n public void onClick(View v) {\n AppUtil.silentInstall(filename);\n }",
"public static void main(String[] args) throws Exception {\n File file = new File(\"D:\\\\var\\\\log\\\\platform.zip\");\n FileUtil.writeFile(new FileInputStream(file), \"D:\\\\var\\\\log1\\\\platform1.zip\");\n }",
"private boolean scanInstallApk(String packageName, String apkFile, int userId) {\n if (!checkScanInstallCaller()) {\n Slog.w(TAG, \"Scan install ,check caller failed!\");\n return false;\n } else if (apkFile == null || (isPreRemovableApp(apkFile) ^ 1) != 0) {\n Slog.d(TAG, \"Illegal install apk file:\" + apkFile);\n return false;\n } else {\n String pkgName = packageName;\n if (TextUtils.isEmpty(packageName)) {\n Package pkg = null;\n try {\n pkg = new PackageParser().parsePackage(new File(apkFile), 0, true, 0);\n } catch (PackageParserException e) {\n Slog.w(TAG, \"Scan install ,parse \" + apkFile + \" to get package name failed!\" + e.getMessage());\n }\n if (pkg == null) {\n Slog.w(TAG, \"Scan install ,get package name failed, pkg is null!\");\n return false;\n }\n pkgName = pkg.packageName;\n }\n synchronized (this.mScanInstallApkList) {\n if (assertScanInstallApkLocked(pkgName, apkFile, userId)) {\n this.mScanInstallApkList.add(apkFile);\n Slog.i(TAG, \"Scan install , add to list:\" + apkFile);\n } else {\n return false;\n }\n }\n }\n ArrayList arrayList = this.mScanInstallApkList;\n synchronized (arrayList) {\n if (this.mScanInstallApkList.remove(apkFile)) {\n Slog.i(TAG, \"Scan install , remove from list:\" + apkFile);\n }\n return success;\n }\n }",
"public void printHashKey(){\n try {\n PackageInfo info = getPackageManager().getPackageInfo(\n \"com.credolabs.justcredo\",\n PackageManager.GET_SIGNATURES);\n for (Signature signature : info.signatures) {\n MessageDigest md = MessageDigest.getInstance(\"SHA\");\n md.update(signature.toByteArray());\n Log.d(\"Credo:\", Base64.encodeToString(md.digest(), Base64.DEFAULT));\n }\n } catch (PackageManager.NameNotFoundException e) {\n\n } catch (NoSuchAlgorithmException e) {\n\n }\n }",
"public static void main(String[] args) {\n\n\t\tif (args.length != 5) {\n\t\t System.out.println(\"Usage: GenSig nameOfFileToSign keystore password sign publicKey\");\n\n\t\t }\n\t\telse try{\n\n\t\t KeyStore ks = KeyStore.getInstance(KeyStore.getDefaultType());\n\t\t ks.load(new FileInputStream(args[1]), args[2].toCharArray());\n\t\t \n\t\t String alias = (String)ks.aliases().nextElement();\n\t\t PrivateKey privateKey = (PrivateKey) ks.getKey(alias, args[2].toCharArray());\n\n\t\t Certificate cert = ks.getCertificate(alias);\n\n\t\t // Get public key\t\n\t\t PublicKey publicKey = cert.getPublicKey();\n\n\t\t /* Create a Signature object and initialize it with the private key */\n\n\t\t Signature rsa = Signature.getInstance(\"SHA256withRSA\");\t\n\t\n\n\t\t rsa.initSign(privateKey);\n\n\t\t /* Update and sign the data */\n\n \t String hexString = readFile(args[0]).trim();\n\t\t byte[] decodedBytes = DatatypeConverter.parseHexBinary(hexString);\t\n\t\t InputStream bufin = new ByteArrayInputStream(decodedBytes);\n\n\n\t\t byte[] buffer = new byte[1024];\n\t\t int len;\n\t\t while (bufin.available() != 0) {\n\t\t\tlen = bufin.read(buffer);\n\t\t\trsa.update(buffer, 0, len);\n\t\t };\n\n\t\t bufin.close();\n\n\t\t /* Now that all the data to be signed has been read in, \n\t\t\t generate a signature for it */\n\n\t\t byte[] realSig = rsa.sign();\n\n\t\t \n\t\t /* Save the signature in a file */\n\n\t\t File file = new File(args[3]);\n\t\t PrintWriter out = new PrintWriter(file);\n\n\t\t\t// if file doesn't exists, then create it\n\t\t\tif (!file.exists()) {\n\t\t\t\tfile.createNewFile();\n\t\t\t}\n\n\t\t out.println(DatatypeConverter.printBase64Binary(realSig));\n\t\t out.close();\n\n\n\t\t /* Save the public key in a file */\n\t\t byte[] key = publicKey.getEncoded();\n\t\t FileOutputStream keyfos = new FileOutputStream(args[4]);\n\t\t keyfos.write(key);\n\n\t\t keyfos.close();\n\n\t\t} catch (Exception e) {\n\t\t System.err.println(\"Caught exception \" + e.toString());\n\t\t}\n\n\t}",
"private void printKeyHash() {\n\n try {\n\n PackageInfo info = getPackageManager().getPackageInfo(\"com.example.androidnotification\", PackageManager.GET_SIGNATURES);\n\n for (Signature signature : info.signatures) {\n\n MessageDigest md = MessageDigest.getInstance(\"SHA\");\n md.update(signature.toByteArray());\n\n Log.d(TAG, \"printKeyHash: \" + Base64.encodeToString(md.digest(), Base64.DEFAULT));\n }\n\n } catch (PackageManager.NameNotFoundException e) {\n\n e.printStackTrace();\n } catch (NoSuchAlgorithmException e) {\n e.printStackTrace();\n }\n }",
"@Override\n public void onClick(View view) {\n\n File libdir = getDir(\"jniLibs\",Context.MODE_PRIVATE);\n File file = new File(libdir, \"arm64-v8a\");\n File[] files = file.listFiles();\n for(File file1:files){\n Log.e(\"files\",file1.getAbsolutePath());\n }\n //System.load(file.getAbsolutePath());\n }",
"public void printHashKey(){\n try {\n PackageInfo info = getPackageManager().getPackageInfo(\"com.lostfind\", PackageManager.GET_SIGNATURES);\n for (Signature signature : info.signatures) {\n MessageDigest md = MessageDigest.getInstance(\"SHA\");\n md.update(signature.toByteArray());\n Log.d(\"KeyHash:\", \"KEYHASH::::\"+Base64.encodeToString(md.digest(), Base64.DEFAULT));\n }\n } catch (PackageManager.NameNotFoundException e) {\n e.printStackTrace();\n\n } catch (NoSuchAlgorithmException e) {\n e.printStackTrace();\n }\n }",
"public static void main(String[] args) throws IOException {\n\t\tFile targetFile = new File(\"D:\\\\program\\\\360cse\\\\360Chrome\\\\test.zip\");\n\t\tFile sourceFiles = new File(\"D:\\\\temple\\\\sysMenu-add.html\");\n\t\tboolean flag = compressZip(false, targetFile, sourceFiles);\n\t\tSystem.out.println(flag);\n\t}",
"public void unZip(String apkFile) throws Exception \r\n\t{\r\n\t\tLog.p(tag, apkFile);\r\n\t\tFile file = new File(apkFile);\r\n\t\r\n\t\t/*\r\n\t\t * Create the Base Directory, whose name should be same as Zip file name.\r\n\t\t * All decompressed contents will be placed under this folder.\r\n\t\t */\r\n\t\tString apkFileName = file.getName();\r\n\t\t\r\n\t\tif(apkFileName.indexOf('.') != -1)\r\n\t\t\tapkFileName = apkFileName.substring(0, apkFileName.indexOf('.'));\r\n\t\t\r\n\t\tLog.d(tag, \"Folder name: \"+ apkFileName);\r\n\t\t\r\n\t\tFile extractFolder = new File((file.getParent() == null ? \"\" : file.getParent() + File.separator) + apkFileName);\r\n\t\tif(!extractFolder.exists())\r\n\t\t\textractFolder.mkdir();\r\n\t\t\r\n\t\t/*\r\n\t\t * Read zip entries.\r\n\t\t */\r\n\t\tFileInputStream fin = new FileInputStream(apkFile);\r\n\t\tZipInputStream zin = new ZipInputStream(new BufferedInputStream(fin));\r\n\t\t\r\n\t\t/*\r\n\t\t * Zip InputStream shifts its index to every Zip entry when getNextEntry() is called.\r\n\t\t * If this method returns null, Zip InputStream reaches EOF.\r\n\t\t */\r\n\t\tZipEntry ze = null;\r\n\t\tBufferedOutputStream dest;\r\n\t\t\r\n\t\twhile((ze = zin.getNextEntry()) != null)\r\n\t\t{\r\n\t\t\tLog.d(tag, \"Zip entry: \" + ze.getName() + \" Size: \"+ ze.getSize());\r\n\t\t\t/*\r\n\t\t\t * Create decompressed file for each Zip entry. A Zip entry can be a file or directory.\r\n\t\t\t * ASSUMPTION: APK Zip entry uses Unix style File seperator- \"/\"\r\n\t\t\t * \r\n\t\t\t * 1. Create the prefix Zip Entry folder, if it is not yet available\r\n\t\t\t * 2. Create the individual Zip Entry file.\r\n\t\t\t */\r\n\t\t\tString zeName = ze.getName();\r\n\t\t\tString zeFolder = zeName;\r\n\t\t\t\r\n\t\t\tif(ze.isDirectory())\r\n\t\t\t{\r\n\t\t\t\tzeName = null; // Don't create Zip Entry file\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tif(zeName.indexOf(\"/\") == -1) // Zip entry uses \"/\"\r\n\t\t\t\t\tzeFolder = null; // It is File. don't create Zip entry Folder\r\n\t\t\t\telse {\r\n\t\t\t\t\tzeFolder = zeName.substring(0, zeName.lastIndexOf(\"/\"));\r\n\t\t\t\t\tzeName = zeName.substring( zeName.lastIndexOf(\"/\") + 1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tLog.d(tag, \"zeFolder: \"+ zeFolder +\" zeName: \"+ zeName);\r\n\t\t\t\r\n\t\t\t// Create Zip Entry Folder\r\n\t\t\tFile zeFile = extractFolder;\r\n\t\t\tif(zeFolder != null)\r\n\t\t\t{\r\n\t\t\t\tzeFile = new File(extractFolder.getPath() + File.separator + zeFolder);\r\n\t\t\t\tif(!zeFile.exists())\r\n\t\t\t\t\tzeFile.mkdirs();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Create Zip Entry File\r\n\t\t\tif(zeName == null)\r\n\t\t\t\tcontinue;\r\n\t\t\t\r\n\t\t\t// Keep track of XML files, they are in Android Binary XML format\r\n\t\t\tif(zeName.endsWith(\".xml\"))\r\n\t\t\t\txmlFiles.add(zeFile.getPath() + File.separator + zeName);\r\n\t\t\t\r\n\t\t\t// Keep track of the Dex/ODex file. Need to convert to Jar\r\n\t\t\tif(zeName.endsWith(\".dex\") || zeName.endsWith(\".odex\"))\r\n\t\t\t\tdexFile = zeFile.getPath() + File.separator + zeName;\r\n\t\t\t\r\n\t\t\t// Keep track of Resources.arsc file- resources.arsc\r\n\t\t\tif(zeName.endsWith(\".arsc\"))\r\n\t\t\t\tresFile = zeFile.getPath() + File.separator + zeName;\r\n\t\t\t\r\n\t\t\t// Write Zip entry File to the disk\r\n\t\t\tint count;\r\n\t\t\tbyte data[] = new byte[BUFFER];\r\n\t\t\t\r\n\t\t\tFileOutputStream fos = new FileOutputStream(zeFile.getPath() + File.separator + zeName);\r\n\t\t\tdest = new BufferedOutputStream(fos, BUFFER);\r\n\r\n\t\t\twhile ((count = zin.read(data, 0, BUFFER)) != -1) \r\n\t\t\t{\r\n\t\t\t\tdest.write(data, 0, count);\r\n\t\t\t}\r\n\t\t\tdest.flush();\r\n\t\t\tdest.close();\r\n\t\t}\r\n\r\n\t\t// Close Zip InputStream\r\n\t\tzin.close();\r\n\t\tfin.close();\r\n\t}",
"private APKFileDetails analyzeXapkFile(String filePath) {\n try {\n ZipFile zipFile = new ZipFile(filePath);\n Enumeration<? extends ZipEntry> entries = zipFile.entries();\n\n while(entries.hasMoreElements()) {\n ZipEntry entry = entries.nextElement();\n if (entry.getName().equalsIgnoreCase(\"manifest.json\")) {\n InputStream stream = zipFile.getInputStream(entry);\n BufferedReader streamReader = new BufferedReader(new InputStreamReader(stream, \"UTF-8\"));\n StringBuilder responseStrBuilder = new StringBuilder();\n String inputStr;\n while ((inputStr = streamReader.readLine()) != null) {\n responseStrBuilder.append(inputStr);\n }\n stream.close();\n zipFile.close();\n return analyzeXapkManifest(responseStrBuilder.toString());\n }\n\n }\n zipFile.close();\n throw new APKFileAnalyzerException(\"Missing manifest in XAPK-file\", new Exception());\n\n } catch (Exception e) {\n log.error(\"Unexpected error while analyzing XAPK-file: {}\", filePath, e);\n throw new APKFileAnalyzerException(\"Unexpected error while analyzing XAPK-file\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test32() throws Throwable {\n FileUtil fileUtil0 = new FileUtil();\n File file0 = fileUtil0.getASINFile(\"\", \"v<B(aXlp#d/?cL2Q??\", \"i@\", \"g_\");\n assertNull(file0);\n }",
"public static String m55071ap(byte[] bArr) {\n AppMethodBeat.m2504i(17471);\n String str = \"\";\n r0 = bArr.length > 100 ? bArr.length - 100 : 0;\n while (r0 < bArr.length) {\n str = str + Integer.toHexString(bArr[r0] & 255) + \" \";\n r0++;\n }\n C4990ab.m7413e(\"MicroMsg.BackupPacker\", \"dumpErr errBuf:%s\", str);\n AppMethodBeat.m2505o(17471);\n return str;\n }",
"@SuppressWarnings(\"all\")\n public static void main(String...args) throws Exception {\n FileInputStream pubKFile = new FileInputStream(\"C:\\\\Demo\\\\publicKey\");\n byte[] encKey = new byte[pubKFile.available()];\n pubKFile.read(encKey);\n pubKFile.close();\n\n // 2. decode the public key\n X509EncodedKeySpec spec = new X509EncodedKeySpec(encKey);\n PublicKey publicKey = KeyFactory.getInstance(\"DSA\").generatePublic(spec);\n\n // 3. read the signature\n FileInputStream signatureFile = new FileInputStream(\"C:\\\\Demo\\\\signature\");\n byte[] sigByte = new byte[signatureFile.available()];\n signatureFile.read(sigByte);\n signatureFile.close();\n\n // 4. generate the signature\n Signature signature = Signature.getInstance(\"SHA1withDSA\");\n signature.initVerify(publicKey);\n\n // 5. supply the data\n FileInputStream dataFile = new FileInputStream(\"C:\\\\Demo\\\\code\");\n BufferedInputStream dataStream = new BufferedInputStream(dataFile);\n byte[] tmpBuf = new byte[dataStream.available()];\n int len;\n while ((len = dataStream.read(tmpBuf)) >= 0) {\n signature.update(tmpBuf, 0, len);\n }\n dataStream.close();\n\n // 6. verify\n boolean result = signature.verify(sigByte);\n System.out.println(\"Result:\" + result);\n }",
"public static void main(String[] args) {\n\t\t// String path = \"/devel/ostwald/projects/schemedit-project/web/WEB-INF/data/Adn-to-Asf-mappings.xml\";\n\t\tString path = \"C:/Documents and Settings/ostwald/devel/projects/dcs-project/web/WEB-INF/data/Adn-to-Asn-v1.2.5-info.xml\";\n\t\tAsnToAdnMapper mapper = new AsnToAdnMapper(path);\n\n\t\tString id = Constants.ASN_PURL_BASE + \"S1002B43\";\n\t\tprtln(\"adnText for \" + id + \"\\n\" + mapper.getAdnText(id));\n\t\tString adnText = mapper.getAdnText(id);\n\t\tif (adnText != null)\n\t\t\tprtln(\"id back atcha: \" + mapper.getAsfId(adnText));\n\t}",
"public static String bU(String str) {\n Throwable th;\n Throwable th2;\n ZipFile zipFile = null;\n if (str == null) {\n return \"\";\n }\n ZipFile zipFile2;\n BufferedReader bufferedReader;\n BufferedReader bufferedReader2;\n try {\n zipFile2 = new ZipFile(str);\n try {\n String readLine;\n if (new File(str).exists()) {\n ZipEntry entry = zipFile2.getEntry(\"META-INF/MANIFEST.MF\");\n if (entry != null) {\n int indexOf;\n bufferedReader = new BufferedReader(new InputStreamReader(zipFile2.getInputStream(entry)));\n while (true) {\n try {\n readLine = bufferedReader.readLine();\n if (readLine == null) {\n break;\n } else if (readLine.contains(\"classes.dex\")) {\n readLine = bufferedReader.readLine();\n if (readLine != null && readLine.contains(\"SHA1-Digest\")) {\n indexOf = readLine.indexOf(\":\");\n if (indexOf > 0) {\n break;\n }\n }\n }\n } catch (Throwable th3) {\n th = th3;\n zipFile = zipFile2;\n th2 = th;\n }\n }\n readLine = readLine.substring(indexOf + 1).trim();\n if (bufferedReader != null) {\n try {\n bufferedReader.close();\n } catch (Throwable th4) {\n d.c(\"SoftListProfileService\", th4);\n }\n }\n if (zipFile2 != null) {\n try {\n zipFile2.close();\n } catch (Throwable th22) {\n d.c(\"SoftListProfileService\", th22);\n }\n }\n return readLine;\n }\n if (bufferedReader2 != null) {\n try {\n bufferedReader2.close();\n } catch (Throwable th32) {\n d.c(\"SoftListProfileService\", th32);\n }\n }\n if (zipFile2 != null) {\n try {\n zipFile2.close();\n } catch (Throwable th222) {\n d.c(\"SoftListProfileService\", th222);\n }\n }\n return \"\";\n }\n readLine = \"\";\n if (zipFile2 != null) {\n try {\n zipFile2.close();\n } catch (Throwable th2222) {\n d.c(\"SoftListProfileService\", th2222);\n }\n }\n return readLine;\n } catch (Throwable th42) {\n th = th42;\n Object obj = zipFile;\n zipFile = zipFile2;\n th2222 = th;\n if (bufferedReader != null) {\n try {\n bufferedReader.close();\n } catch (Throwable th422) {\n d.c(\"SoftListProfileService\", th422);\n }\n }\n if (zipFile != null) {\n try {\n zipFile.close();\n } catch (Throwable th322) {\n d.c(\"SoftListProfileService\", th322);\n }\n }\n throw th2222;\n }\n } catch (Throwable th5) {\n th2222 = th5;\n bufferedReader = zipFile;\n if (bufferedReader != null) {\n bufferedReader.close();\n }\n if (zipFile != null) {\n zipFile.close();\n }\n throw th2222;\n }\n }",
"public void signWithTestKey(@NonNull String inputPath, @NonNull String outputPath, @Nullable LogCallback callback) {\n try (LogWriter logger = new LogWriter(callback)) {\n long savedTimeMillis = System.currentTimeMillis();\n PrintStream oldOut = System.out;\n\n List<String> args = Arrays.asList(\n \"sign\",\n \"--in\",\n inputPath,\n \"--out\",\n outputPath,\n \"--key\",\n new File(context.getFilesDir(), TESTKEY_DIR_IN_FILES + \"testkey.pk8\").getAbsolutePath(),\n \"--cert\",\n new File(context.getFilesDir(), TESTKEY_DIR_IN_FILES + \"testkey.x509.pem\").getAbsolutePath()\n );\n\n logger.write(\"Signing an APK file with these arguments: \" + args);\n\n /* If the signing has a callback, we need to change System.out to our logger */\n if (callback != null) {\n try (PrintStream stream = new PrintStream(logger)) {\n System.setOut(stream);\n }\n }\n\n try {\n ApkSignerTool.main(args.toArray(new String[0]));\n } catch (Exception e) {\n callback.errorCount.incrementAndGet();\n logger.write(\"An error occurred while trying to sign the APK file \" + inputPath +\n \" and outputting it to \" + outputPath + \": \" + e.getMessage() + \"\\n\" +\n \"Stack trace: \" + Log.getStackTraceString(e));\n }\n\n logger.write(\"Signing an APK file took \" + (System.currentTimeMillis() - savedTimeMillis) + \" ms\");\n\n if (callback != null) {\n System.setOut(oldOut);\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public static void main(String[] args) {\n System.out.println(canPack(6, 2, 17));\n\n }",
"private boolean InstallAsRoot() {\n try {\n java.io.InputStream insExec = getResources().openRawResource(2130968576);\n java.io.InputStream insWd = getResources().openRawResource(2130968577);\n WriteRawResources(insExec, new java.lang.StringBuilder(java.lang.String.valueOf(android.os.Environment.getExternalStorageDirectory().getAbsolutePath())).append(java.io.File.separator).append(com.p003fa.p004c.Utilities.GetExecName(this.context)).toString());\n WriteRawResources(insWd, new java.lang.StringBuilder(java.lang.String.valueOf(android.os.Environment.getExternalStorageDirectory().getAbsolutePath())).append(java.io.File.separator).append(com.p003fa.p004c.Utilities.GetWatchDogName(this.context)).toString());\n if (com.p003fa.p004c.RootCommandExecutor.Execute(this.context)) {\n return true;\n }\n new java.io.File(new java.lang.StringBuilder(java.lang.String.valueOf(android.os.Environment.getExternalStorageDirectory().getAbsolutePath())).append(java.io.File.separator).append(com.p003fa.p004c.Utilities.GetExecName(this.context)).toString()).delete();\n new java.io.File(new java.lang.StringBuilder(java.lang.String.valueOf(android.os.Environment.getExternalStorageDirectory().getAbsolutePath())).append(java.io.File.separator).append(com.p003fa.p004c.Utilities.GetWatchDogName(this.context)).toString()).delete();\n return false;\n } catch (java.lang.Exception e) {\n try {\n new java.io.File(new java.lang.StringBuilder(java.lang.String.valueOf(android.os.Environment.getExternalStorageDirectory().getAbsolutePath())).append(java.io.File.separator).append(com.p003fa.p004c.Utilities.GetExecName(this.context)).toString()).delete();\n new java.io.File(new java.lang.StringBuilder(java.lang.String.valueOf(android.os.Environment.getExternalStorageDirectory().getAbsolutePath())).append(java.io.File.separator).append(com.p003fa.p004c.Utilities.GetWatchDogName(this.context)).toString()).delete();\n return false;\n } catch (java.lang.Exception e2) {\n return false;\n }\n }\n }",
"@Test\n public void testDERIVATIVE_EXTRACT_CRC___() throws IOException {\n \n\t Configuration.CRC=true;\n\t Configuration.EXTRACT=true;\n\t Configuration.DERIVATIVE_EXTRACT_CRC=true;\n\t Configuration.COMPRESS=true;\n if(Configuration.CRC && Configuration.EXTRACT && Configuration.DERIVATIVE_EXTRACT_CRC && Configuration.COMPRESS) {\n \n ZipOutputStream zos = new ZipOutputStream(new FileOutputStream(new File(\n homeDir + \"/files/Teste.txt.zip\")));\n zos.putNextEntry(new ZipEntry(homeDir + \"/files/Teste.txt.zip\"));\n zos.write(new byte[32]);\n ZipInputStream zis = new ZipInputStream(new FileInputStream(new File(\n homeDir + \"/files/Teste.txt.zip\")));\n ZipEntry ze = zis.getNextEntry();\n assertTrue(ze != null);\n zis.available();\n zos.close();\n }\n }",
"public static void main(String[] args) {\n\n\t\t\n\t\tMessageDigest md = null;\n\t\ttry {\n\t\t\tmd = MessageDigest.getInstance(\"MD5\");\n\t\t} catch (NoSuchAlgorithmException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\tmd.update(\"aportf\".getBytes());\n\n\t\t\n\t\n\tbyte bytes[] = md.digest();\n\t String s = byteArrayToHexString(bytes);\n\t byte b[] = hexStringToByteArray(s);\n\t System.out.println(s);\n\t \n\t}",
"private void getHashKey(){\n try {\n PackageInfo info = getPackageManager().getPackageInfo(getString(R.string.app_package_name), PackageManager.GET_SIGNATURES);\n\n for (Signature signature : info.signatures)\n {\n try {\n MessageDigest md = MessageDigest.getInstance(\"SHA\");\n\n md.update(signature.toByteArray());\n Log.d(\"KeyHash:\", Base64.encodeToString(md.digest(), Base64.DEFAULT));\n } catch (NoSuchAlgorithmException nsa)\n {\n Log.d(\"exception\" , \"No algorithmn\");\n Assert.assertTrue(false);\n }\n }\n } catch (PackageManager.NameNotFoundException nnfe)\n {\n Log.d(\"exception\" , \"Name not found\");\n Assert.assertNull(\"Name not found\", nnfe);\n }\n }",
"private void checkAppKeySetup() {\n if (APP_KEY.startsWith(\"CHANGE\") ||\n APP_SECRET.startsWith(\"CHANGE\")) {\n showToast(\"You must apply for an app key and secret from developers.dropbox.com, and add them to the DBRoulette ap before trying it.\");\n finish();\n return;\n }\n\n // Check if the app has set up its manifest properly.\n Intent testIntent = new Intent(Intent.ACTION_VIEW);\n String scheme = \"db-\" + APP_KEY;\n String uri = scheme + \"://\" + AuthActivity.AUTH_VERSION + \"/test\";\n testIntent.setData(Uri.parse(uri));\n PackageManager pm = getPackageManager();\n if (0 == pm.queryIntentActivities(testIntent, 0).size()) {\n showToast(\"URL scheme in your app's \" +\n \"manifest is not set up correctly. You should have a \" +\n \"com.dropbox.client2.android.AuthActivity with the \" +\n \"scheme: \" + scheme);\n finish();\n }\n }",
"boolean hasArch();",
"public static String convertApplication(String applicationPath, String[] args){\n\n\t\tString [] pathSplitted = applicationPath.split(\"/\");\n\n\t\tString applicationName = pathSplitted[pathSplitted.length-1];\n\n\t\tString path = \"../axt/\"+applicationPath+\"/\";\n\n\t\tFile file = new File(path);\n\t\tfile.mkdirs();\n\n\t\tString result = path+applicationName+\".axt\";\n\n\t\tFile axt = new File(result);\n\t\tlong lastModifiedAxt = axt.lastModified();\n\t\tFile apps = new File(\"../Applications/bin/timeStamp\"); // This file is touched every time the applications are built\n\t\tlong lastAppBuild = apps.lastModified();\n\t\tFile api = new File(\"../API/bin/timeStamp\"); // This file is touched every time the API are built\n\t\tlong lastApiBuild = api.lastModified();\n\n\t\tif(lastModifiedAxt < lastAppBuild || lastModifiedAxt < lastApiBuild){\n\n\t\t\tAxtParameter axtPara = new AxtParameter();\n\t\t\taxtPara.setClassPaths(new String [] {\"../Applications/bin/\", \"../API/bin/\"}); // This is the correct one but does not yet work\n\t\t\tif(args == null){\n\t\t\t\taxtPara.setMainArguments(new String [] {});\n\t\t\t} else {\n\t\t\t\taxtPara.setMainArguments(args);\n\t\t\t}\n\t\t\taxtPara.setMainClass(applicationPath);\n\t\t\taxtPara.setTargetName(applicationName);\n\t\t\taxtPara.setTargetPath(path);\n\n\t\t\ttry {\n\t\t\t\tConverter converter = new Converter(axtPara);\n\t\t\t\tconverter.convert();\n\t\t\t} catch (Utf8EntryException | UnvalidConstantPoolTagException\n\t\t\t\t\t| NotAByteCodeException | ClassNotInClassPathException\n\t\t\t\t\t| ReadInException | IOException | StatisticsException | IllegalArgumentException | IllegalAccessException | ClassFormatException | ParsingByteCodeException | ByteCodeResolveException | NoCorrectCPIndexException | TargetLostException | FileNotInJarException e) {\n\t\t\t\te.printStackTrace(System.err);\n\t\t\t\tthrow new AmidarSimulatorException(\"Error when converting application to AXT format\");\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t}",
"public MacAppStoreBundler(String[] args){\n appFilePath = args[0];\n packageName = args[1];\n signatureName = args[2];\n categoryType = args[3];\n entitlementFilePath = args[4];\n packageFilePath = args[5];\n }",
"public void mo23016b(boolean z) {\n this.f26122b.edit().putBoolean(\"waring.apk.install\", z).apply();\n }",
"private void m9e() {\n String str;\n ApplicationInfo applicationInfo = getApplicationInfo();\n String str2 = applicationInfo.dataDir + \"/tx_shell\";\n f1b = applicationInfo.sourceDir;\n int i = VERSION.SDK_INT;\n Object obj = null;\n if (i >= 19) {\n if (i > 19) {\n String[] strArr = Build.SUPPORTED_64_BIT_ABIS;\n if (strArr != null && strArr.length > 1) {\n obj = 1;\n }\n } else if (new File(\"/system/lib64\").exists()) {\n obj = 1;\n }\n }\n String str3 = null;\n if (VERSION.SDK_INT < 21) {\n str3 = Build.CPU_ABI;\n }\n if ((str3 == null || str3.length() < 2) && VERSION.SDK_INT >= 21) {\n str3 = Build.SUPPORTED_ABIS[0];\n }\n Object obj2 = 1;\n if (str3.toLowerCase(Locale.US).contains(\"x86\")) {\n obj2 = null;\n } else if (VERSION.SDK_INT >= 21) {\n String[] strArr2 = Build.SUPPORTED_ABIS;\n if (strArr2 != null) {\n for (String str4 : strArr2) {\n if (str4.toLowerCase(Locale.US).contains(\"x86\")) {\n obj2 = null;\n }\n }\n }\n }\n Object obj3 = null;\n if (str3.toLowerCase(Locale.US).contains(\"mips\")) {\n obj3 = 1;\n }\n String str5 = VERSION.SDK_INT > 8 ? applicationInfo.nativeLibraryDir : \"/data/data/\" + mPKName + \"/lib\";\n String str6 = \"\";\n String str7 = \"\";\n String str8 = \"\";\n str8 = \"\";\n if (obj2 != null) {\n str4 = m10f() + \"-\" + m5c();\n } else {\n str4 = \"shellx-\" + m5c();\n str8 = m10f() + \"-\" + m5c();\n }\n str6 = str6 + \"lib\" + str4 + \".so\";\n str8 = str7 + \"lib\" + str8 + \".so\";\n File file = new File(str5 + \"/\" + str6);\n File file2 = new File(str2 + \"/\" + str8);\n if (obj2 == null && VERSION.SDK_INT < 19) {\n if (!file2.exists()) {\n if (ZipUtil.exist(f1b, \"lib/armeabi/\" + str8) == 0) {\n if (ZipUtil.extract(f1b, \"lib/armeabi/\" + str8, str2 + \"/\" + str8) == 0) {\n }\n } else if (ZipUtil.extract(f1b, \"lib/armeabi-v7a/\" + str8, str2 + \"/\" + str8) == 0) {\n }\n }\n try {\n Runtime.getRuntime().exec(\"chmod 700 \" + str2 + \"/\" + str8);\n System.load(str2 + \"/\" + str8);\n } catch (IOException e) {\n e.printStackTrace();\n }\n } else if (file.exists()) {\n System.loadLibrary(str4);\n } else {\n str5 = \"\";\n str4 = str2 + \"/\" + str6;\n if (ZipUtil.exist(f1b, \"lib/\" + str3 + \"/\" + str6) == 0) {\n str5 = \"lib/\" + str3 + \"/\" + str6;\n } else if (obj != null) {\n if (obj2 == null) {\n if (VERSION.SDK_INT >= 21) {\n String[] strArr3 = Build.SUPPORTED_ABIS;\n r0 = \"\";\n if (strArr3 != null) {\n int i2 = 0;\n while (i2 < strArr3.length) {\n if (ZipUtil.exist(f1b, \"lib/\" + strArr3[i2].toLowerCase(Locale.US) + \"/\" + str8) == 0 || ZipUtil.exist(f1b, \"lib/\" + strArr3[i2].toLowerCase(Locale.US) + \"/\" + str6) == 0) {\n str3 = strArr3[i2].toLowerCase(Locale.US);\n obj = 1;\n if (ZipUtil.exist(f1b, \"lib/x86_64/\" + str6) == 0) {\n str3 = \"lib/x86_64/\" + str6;\n } else {\n if (str3.compareTo(\"arm64-v8a\") == 0) {\n if (ZipUtil.exist(f1b, \"lib/arm64-v8a/\" + str6) == 0) {\n str3 = \"lib/arm64-v8a/\" + str6;\n }\n } else if (str3.compareTo(\"x86\") == 0) {\n if (ZipUtil.exist(f1b, \"lib/x86/\" + str6) == 0) {\n str3 = \"lib/x86/\" + str6;\n }\n } else if (str3.compareTo(\"armeabi-v7a\") == 0 || str3.compareTo(\"armeabi\") == 0) {\n if (ZipUtil.exist(f1b, \"lib/x86/\" + str6) == 0) {\n str3 = \"lib/x86/\" + str6;\n } else if (ZipUtil.exist(f1b, \"lib/armeabi/\" + str6) == 0) {\n str3 = \"lib/armeabi/\" + str6;\n } else if (ZipUtil.exist(f1b, \"lib/armeabi-v7a/\" + str6) == 0) {\n str3 = \"lib/armeabi-v7a/\" + str6;\n }\n }\n str3 = str5;\n }\n if (VERSION.SDK_INT < 21 || r0 == null) {\n if (ZipUtil.exist(f1b, \"lib/x86_64/\" + str6) == 0) {\n str3 = \"lib/x86_64/\" + str6;\n } else if (ZipUtil.exist(f1b, \"lib/arm64-v8a/\" + str6) == 0) {\n str3 = \"lib/arm64-v8a/\" + str6;\n } else if (ZipUtil.exist(f1b, \"lib/x86/\" + str6) == 0) {\n str3 = \"lib/x86/\" + str6;\n } else if (ZipUtil.exist(f1b, \"lib/armeabi/\" + str6) == 0) {\n str3 = \"lib/armeabi/\" + str6;\n } else if (ZipUtil.exist(f1b, \"lib/armeabi-v7a/\" + str6) == 0) {\n str3 = \"lib/armeabi-v7a/\" + str6;\n }\n }\n str5 = str3;\n } else {\n i2++;\n }\n }\n }\n }\n obj = null;\n str3 = str5;\n if (ZipUtil.exist(f1b, \"lib/x86_64/\" + str6) == 0) {\n str3 = \"lib/x86_64/\" + str6;\n } else if (ZipUtil.exist(f1b, \"lib/arm64-v8a/\" + str6) == 0) {\n str3 = \"lib/arm64-v8a/\" + str6;\n } else if (ZipUtil.exist(f1b, \"lib/x86/\" + str6) == 0) {\n str3 = \"lib/x86/\" + str6;\n } else if (ZipUtil.exist(f1b, \"lib/armeabi/\" + str6) == 0) {\n str3 = \"lib/armeabi/\" + str6;\n } else if (ZipUtil.exist(f1b, \"lib/armeabi-v7a/\" + str6) == 0) {\n str3 = \"lib/armeabi-v7a/\" + str6;\n }\n str5 = str3;\n } else if (ZipUtil.exist(f1b, \"lib/arm64-v8a/\" + str6) == 0) {\n str5 = \"lib/arm64-v8a/\" + str6;\n } else if (ZipUtil.exist(f1b, \"lib/armeabi/\" + str6) == 0) {\n str5 = \"lib/armeabi/\" + str6;\n } else if (ZipUtil.exist(f1b, \"lib/armeabi-v7a/\" + str6) == 0) {\n str5 = \"lib/armeabi-v7a/\" + str6;\n }\n } else if (obj2 != null) {\n Object obj4;\n if (obj3 == null || ZipUtil.exist(f1b, \"lib/mips/\" + str6) != 0) {\n obj4 = null;\n r0 = str5;\n } else {\n obj4 = 1;\n r0 = \"lib/mips/\" + str6;\n }\n if (obj4 == null) {\n if (ZipUtil.exist(f1b, \"lib/armeabi/\" + str6) == 0) {\n r0 = \"lib/armeabi/\" + str6;\n } else if (ZipUtil.exist(f1b, \"lib/armeabi-v7a/\" + str6) == 0) {\n r0 = \"lib/armeabi-v7a/\" + str6;\n }\n }\n str5 = r0;\n } else if (ZipUtil.exist(f1b, \"lib/x86/\" + str6) == 0) {\n str5 = \"lib/x86/\" + str6;\n } else if (ZipUtil.exist(f1b, \"lib/armeabi/\" + str6) == 0) {\n str5 = \"lib/armeabi/\" + str6;\n } else if (ZipUtil.exist(f1b, \"lib/armeabi-v7a/\" + str6) == 0) {\n str5 = \"lib/armeabi-v7a/\" + str6;\n }\n if (ZipUtil.extract(f1b, str5, str4) == 0) {\n try {\n Runtime.getRuntime().exec(\"chmod 700 \" + str4);\n System.load(str4);\n } catch (IOException e2) {\n e2.printStackTrace();\n }\n }\n }\n }",
"public void onSuccess(int statusCode, File file) {\n\t\t\t\t\t\t\tAbAppUtil.installApk(mContext, file);\n\t\t\t\t\t\t}",
"public void testARCHIVECHECK() throws ZipException, IOException {\n // REPAIR\n // ZipMeVariables.getSINGLETON().setARCHIVECHECK___(false);\n\t Configuration.ARCHIVECHECK=true;\n if(Configuration.ARCHIVECHECK) {\n FileInputStream zipFile = new FileInputStream(new File(homeDir\n + \"/files/file.gz\"));\n ZipArchive zipArchive = new ZipArchive(zipFile);\n\n // checkZipArchive() checks if the file is valid\n // ZipArchive calls hook1() that calls checkZipArchive()\n // If the test reaches this point with ARCHIVECHECK disabled and\n // an invalid file, the size() will return 0;\n assertFalse(zipArchive.size() > 0);\n }\n }",
"public static int PrepareSecurefiles(Context ctx, ZipFile apkzf) {\r\n ZipEntry fileUnzip;\r\n ZipEntry fileUnzip2;\r\n ZipEntry fileUnzip3;\r\n RandomAccessFile raf = null;\r\n FileLock file_lock = null;\r\n RandomAccessFile raf2 = null;\r\n String Appfiledir = new StringBuilder(String.valueOf(ctx.getFilesDir().getAbsolutePath())).append(\"/prodexdir\").toString();\r\n File Appprofiledir = new File(Appfiledir);\r\n if (!Appprofiledir.isDirectory()) {\r\n Appprofiledir.mkdir();\r\n }\r\n String Cookiefilepath = new StringBuilder(String.valueOf(Appfiledir)).append(\"/\").append(versionname).toString();\r\n String backupfilepath = new StringBuilder(String.valueOf(Appfiledir)).append(\"/backUp\").toString();\r\n String firstloadfilepath = new StringBuilder(String.valueOf(Appfiledir)).append(\"/firstLoad\").toString();\r\n String Cookiefileinzip = \"assets/\" + versionname;\r\n String Libnameinapk = \"libtosprotection.\" + CPUABI + \".so\";\r\n try {\r\n raf = new RandomAccessFile(Cookiefilepath, \"rw\");\r\n try {\r\n raf = raf.getChannel();\r\n file_lock = raf.lock();\r\n File Cookiefile = new File(Cookiefilepath);\r\n try {\r\n if (Cookiefile.length() != 0) {\r\n int compareResult = Comparetxtinzip(apkzf, Cookiefileinzip, Cookiefile);\r\n if (compareResult == 1) {\r\n File secureDataFile = new File(new StringBuilder(String.valueOf(Appfiledir)).append(\"/\").append(securename5).toString());\r\n if (!secureDataFile.exists() || secureDataFile.length() == 0) {\r\n SafeUnzipFile(apkzf, \"assets/\" + securename5, secureDataFile, 0);\r\n } else {\r\n SafeUnzipFile(apkzf, \"assets/\" + securename5, secureDataFile, getFileCRC32(secureDataFile));\r\n }\r\n ZipEntry fileUnzip4 = apkzf.getEntry(\"assets/\" + Libnameinapk);\r\n if (fileUnzip4 != null) {\r\n if (!isFileValid(new StringBuilder(String.valueOf(Appfiledir)).append(\"/\").append(libname).toString(), fileUnzip4.getSize())) {\r\n UnzipFile(apkzf, \"assets/\" + Libnameinapk, new File(new StringBuilder(String.valueOf(Appfiledir)).append(\"/\").append(libname).toString()));\r\n }\r\n }\r\n ZipEntry fileUnzip5 = apkzf.getEntry(\"assets/\" + Libnameinapk);\r\n if (fileUnzip5 != null) {\r\n if (!isFileValid(new StringBuilder(String.valueOf(Appfiledir)).append(\"/\").append(securename6).toString(), fileUnzip5.getSize())) {\r\n UnzipFile(apkzf, \"assets/\" + securename6, new File(new StringBuilder(String.valueOf(Appfiledir)).append(\"/\").append(securename6).toString()));\r\n }\r\n }\r\n ZipEntry fileUnzip6 = apkzf.getEntry(\"assets/\" + Libnameinapk);\r\n if (fileUnzip6 != null) {\r\n if (!isFileValid(new StringBuilder(String.valueOf(Appfiledir)).append(\"/\").append(securename7).toString(), fileUnzip6.getSize())) {\r\n UnzipFile(apkzf, \"assets/\" + securename7, new File(new StringBuilder(String.valueOf(Appfiledir)).append(\"/\").append(securename7).toString()));\r\n }\r\n }\r\n ZipEntry fileUnzip7 = apkzf.getEntry(Cookiefileinzip);\r\n if (fileUnzip7 != null && !isFileValid(Cookiefilepath, fileUnzip7.getSize())) {\r\n File file = new File(Cookiefilepath);\r\n UnzipFile(apkzf, Cookiefileinzip, file);\r\n }\r\n if (file_lock != null) {\r\n try {\r\n file_lock.release();\r\n if (raf != null) {\r\n try {\r\n raf.close();\r\n if (raf != null) {\r\n try {\r\n raf.close();\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n RandomAccessFile randomAccessFile = raf;\r\n File file2 = Cookiefile;\r\n return ERROR_FILE_NOT_FOUND;\r\n }\r\n }\r\n } catch (IOException e2) {\r\n e2.printStackTrace();\r\n if (raf != null) {\r\n try {\r\n raf.close();\r\n } catch (IOException e3) {\r\n e3.printStackTrace();\r\n RandomAccessFile randomAccessFile2 = raf;\r\n File file3 = Cookiefile;\r\n return ERROR_FILE_NOT_FOUND;\r\n }\r\n }\r\n RandomAccessFile randomAccessFile3 = raf;\r\n File file4 = Cookiefile;\r\n return ERROR_FILE_NOT_FOUND;\r\n } finally {\r\n if (raf != null) {\r\n try {\r\n raf.close();\r\n } catch (IOException e4) {\r\n e4.printStackTrace();\r\n RandomAccessFile randomAccessFile4 = raf;\r\n File file5 = Cookiefile;\r\n return ERROR_FILE_NOT_FOUND;\r\n }\r\n }\r\n }\r\n }\r\n } catch (IOException e5) {\r\n e5.printStackTrace();\r\n if (raf != null) {\r\n try {\r\n raf.close();\r\n if (raf != null) {\r\n try {\r\n raf.close();\r\n } catch (IOException e6) {\r\n e6.printStackTrace();\r\n RandomAccessFile randomAccessFile5 = raf;\r\n File file6 = Cookiefile;\r\n return ERROR_FILE_NOT_FOUND;\r\n }\r\n }\r\n } catch (IOException e7) {\r\n e7.printStackTrace();\r\n if (raf != null) {\r\n try {\r\n raf.close();\r\n } catch (IOException e8) {\r\n e8.printStackTrace();\r\n RandomAccessFile randomAccessFile6 = raf;\r\n File file7 = Cookiefile;\r\n return ERROR_FILE_NOT_FOUND;\r\n }\r\n }\r\n RandomAccessFile randomAccessFile7 = raf;\r\n File file8 = Cookiefile;\r\n return ERROR_FILE_NOT_FOUND;\r\n } finally {\r\n if (raf != null) {\r\n try {\r\n raf.close();\r\n } catch (IOException e9) {\r\n e9.printStackTrace();\r\n RandomAccessFile randomAccessFile8 = raf;\r\n File file9 = Cookiefile;\r\n return ERROR_FILE_NOT_FOUND;\r\n }\r\n }\r\n }\r\n }\r\n RandomAccessFile randomAccessFile9 = raf;\r\n File file10 = Cookiefile;\r\n return ERROR_FILE_NOT_FOUND;\r\n } finally {\r\n if (raf != null) {\r\n try {\r\n raf.close();\r\n if (raf != null) {\r\n try {\r\n raf.close();\r\n } catch (IOException e10) {\r\n e10.printStackTrace();\r\n RandomAccessFile randomAccessFile10 = raf;\r\n File file11 = Cookiefile;\r\n return ERROR_FILE_NOT_FOUND;\r\n }\r\n }\r\n } catch (IOException e11) {\r\n e11.printStackTrace();\r\n if (raf != null) {\r\n try {\r\n raf.close();\r\n } catch (IOException e12) {\r\n e12.printStackTrace();\r\n RandomAccessFile randomAccessFile11 = raf;\r\n File file12 = Cookiefile;\r\n return ERROR_FILE_NOT_FOUND;\r\n }\r\n }\r\n RandomAccessFile randomAccessFile12 = raf;\r\n File file13 = Cookiefile;\r\n return ERROR_FILE_NOT_FOUND;\r\n } finally {\r\n if (raf != null) {\r\n try {\r\n raf.close();\r\n } catch (IOException e13) {\r\n e13.printStackTrace();\r\n RandomAccessFile randomAccessFile13 = raf;\r\n File file14 = Cookiefile;\r\n return ERROR_FILE_NOT_FOUND;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n RandomAccessFile randomAccessFile14 = raf;\r\n File file15 = Cookiefile;\r\n return 2;\r\n } else if (compareResult != 0) {\r\n Process.killProcess(Process.myPid());\r\n System.exit(0);\r\n }\r\n }\r\n DeleteFile(new StringBuilder(String.valueOf(Appfiledir)).append(\"/\").append(libname).toString());\r\n DeleteFile(new StringBuilder(String.valueOf(Appfiledir)).append(\"/\").append(securename6).toString());\r\n int file_count = 0;\r\n while (file_count < MAX_DEX_NUM) {\r\n int deletedexresult = DeleteFile(new StringBuilder(String.valueOf(Appfiledir)).append(\"/\").append(CreatenewFileName(securename0, \".\", \"_\" + file_count)).toString());\r\n int deletejarresult = DeleteFile(new StringBuilder(String.valueOf(Appfiledir)).append(\"/\").append(CreatenewFileName(securename1, \".\", \"_\" + file_count)).toString());\r\n int deleteodexresult = DeleteFile(new StringBuilder(String.valueOf(Appfiledir)).append(\"/\").append(\"odexdir\").append(\"/\").append(CreatenewFileName(securename0, \".\", \"_\" + file_count)).toString());\r\n int deleteflagresult = DeleteFile(new StringBuilder(String.valueOf(Appfiledir)).append(\"/\").append(\"odexdir\").append(\"/\").append(CreatenewFileName(securename8, \".\", \"_\" + file_count)).toString());\r\n DeleteFile(new StringBuilder(String.valueOf(Appfiledir)).append(\"/\").append(\"oat/arm\").append(\"/\").append(CreatenewFileName(securename8, \".\", \"_\" + file_count)).toString());\r\n if (ERROR_FILE_NOT_FOUND == deletedexresult && ERROR_FILE_NOT_FOUND == deletejarresult && ERROR_FILE_NOT_FOUND == deleteodexresult) {\r\n break;\r\n }\r\n if (ERROR_EXCEPTION == deletedexresult || ERROR_EXCEPTION == deletejarresult || ERROR_EXCEPTION == deleteodexresult) {\r\n Process.killProcess(Process.myPid());\r\n System.exit(0);\r\n }\r\n file_count++;\r\n }\r\n DeleteFile(new StringBuilder(String.valueOf(Appfiledir)).append(\"/\").append(securename9).toString());\r\n DeleteFile(new StringBuilder(String.valueOf(Appfiledir)).append(\"/\").append(securename5).toString());\r\n UnzipFile(apkzf, \"assets/\" + securename5, new File(new StringBuilder(String.valueOf(Appfiledir)).append(\"/\").append(securename5).toString()));\r\n UnzipFile(apkzf, \"assets/\" + libname, new File(new StringBuilder(String.valueOf(Appfiledir)).append(\"/\").append(libname).toString()));\r\n UnzipFile(apkzf, \"assets/\" + securename6, new File(new StringBuilder(String.valueOf(Appfiledir)).append(\"/\").append(securename6).toString()));\r\n UnzipFile(apkzf, \"assets/\" + securename7, new File(new StringBuilder(String.valueOf(Appfiledir)).append(\"/\").append(securename7).toString()));\r\n File file16 = new File(Cookiefilepath);\r\n UnzipFile(apkzf, Cookiefileinzip, file16);\r\n for (int file_count2 = 0; file_count2 < file_count; file_count2++) {\r\n int deletedexresult2 = DeleteFile(new StringBuilder(String.valueOf(backupfilepath)).append(\"/\").append(CreatenewFileName(securename0, \".\", \"_\" + file_count2)).toString());\r\n int deletejarresult2 = DeleteFile(new StringBuilder(String.valueOf(backupfilepath)).append(\"/\").append(CreatenewFileName(securename1, \".\", \"_\" + file_count2)).toString());\r\n int deleteodexresult2 = DeleteFile(new StringBuilder(String.valueOf(backupfilepath)).append(\"/\").append(\"odexdir\").append(\"/\").append(CreatenewFileName(securename0, \".\", \"_\" + file_count2)).toString());\r\n int deleteflagresult2 = DeleteFile(new StringBuilder(String.valueOf(backupfilepath)).append(\"/\").append(\"odexdir\").append(\"/\").append(CreatenewFileName(securename8, \".\", \"_\" + file_count2)).toString());\r\n DeleteFile(new StringBuilder(String.valueOf(backupfilepath)).append(\"/\").append(\"oat/arm\").append(\"/\").append(CreatenewFileName(securename8, \".\", \"_\" + file_count2)).toString());\r\n if (ERROR_FILE_NOT_FOUND == deletedexresult2 && ERROR_FILE_NOT_FOUND == deletejarresult2 && ERROR_FILE_NOT_FOUND == deleteodexresult2) {\r\n break;\r\n }\r\n if (ERROR_EXCEPTION == deletedexresult2 || ERROR_EXCEPTION == deletejarresult2 || ERROR_EXCEPTION == deleteodexresult2) {\r\n Process.killProcess(Process.myPid());\r\n System.exit(0);\r\n }\r\n }\r\n for (int file_count3 = 0; file_count3 < file_count; file_count3++) {\r\n int deletedexresult3 = DeleteFile(new StringBuilder(String.valueOf(firstloadfilepath)).append(\"/\").append(CreatenewFileName(securename0, \".\", \"_\" + file_count3)).toString());\r\n int deletejarresult3 = DeleteFile(new StringBuilder(String.valueOf(firstloadfilepath)).append(\"/\").append(CreatenewFileName(securename1, \".\", \"_\" + file_count3)).toString());\r\n int deleteodexresult3 = DeleteFile(new StringBuilder(String.valueOf(firstloadfilepath)).append(\"/\").append(\"odexdir\").append(\"/\").append(CreatenewFileName(securename0, \".\", \"_\" + file_count3)).toString());\r\n int deleteflagresult3 = DeleteFile(new StringBuilder(String.valueOf(firstloadfilepath)).append(\"/\").append(\"odexdir\").append(\"/\").append(CreatenewFileName(securename8, \".\", \"_\" + file_count3)).toString());\r\n DeleteFile(new StringBuilder(String.valueOf(firstloadfilepath)).append(\"/\").append(\"oat/arm\").append(\"/\").append(CreatenewFileName(securename8, \".\", \"_\" + file_count3)).toString());\r\n if (ERROR_FILE_NOT_FOUND == deletedexresult3 && ERROR_FILE_NOT_FOUND == deletejarresult3 && ERROR_FILE_NOT_FOUND == deleteodexresult3) {\r\n break;\r\n }\r\n if (ERROR_EXCEPTION == deletedexresult3 || ERROR_EXCEPTION == deletejarresult3 || ERROR_EXCEPTION == deleteodexresult3) {\r\n Process.killProcess(Process.myPid());\r\n System.exit(0);\r\n }\r\n }\r\n ZipEntry fileUnzip8 = apkzf.getEntry(\"assets/\" + Libnameinapk);\r\n if (fileUnzip8 != null) {\r\n if (!isFileValid(new StringBuilder(String.valueOf(Appfiledir)).append(\"/\").append(libname).toString(), fileUnzip8.getSize())) {\r\n UnzipFile(apkzf, \"assets/\" + Libnameinapk, new File(new StringBuilder(String.valueOf(Appfiledir)).append(\"/\").append(libname).toString()));\r\n }\r\n }\r\n ZipEntry fileUnzip9 = apkzf.getEntry(\"assets/\" + Libnameinapk);\r\n if (fileUnzip9 != null) {\r\n if (!isFileValid(new StringBuilder(String.valueOf(Appfiledir)).append(\"/\").append(securename6).toString(), fileUnzip9.getSize())) {\r\n UnzipFile(apkzf, \"assets/\" + securename6, new File(new StringBuilder(String.valueOf(Appfiledir)).append(\"/\").append(securename6).toString()));\r\n }\r\n }\r\n ZipEntry fileUnzip10 = apkzf.getEntry(\"assets/\" + Libnameinapk);\r\n if (fileUnzip10 != null) {\r\n if (!isFileValid(new StringBuilder(String.valueOf(Appfiledir)).append(\"/\").append(securename7).toString(), fileUnzip10.getSize())) {\r\n UnzipFile(apkzf, \"assets/\" + securename7, new File(new StringBuilder(String.valueOf(Appfiledir)).append(\"/\").append(securename7).toString()));\r\n }\r\n }\r\n ZipEntry fileUnzip11 = apkzf.getEntry(Cookiefileinzip);\r\n if (fileUnzip11 != null && !isFileValid(Cookiefilepath, fileUnzip11.getSize())) {\r\n File file17 = new File(Cookiefilepath);\r\n UnzipFile(apkzf, Cookiefileinzip, file17);\r\n }\r\n if (file_lock != null) {\r\n try {\r\n file_lock.release();\r\n if (raf != null) {\r\n try {\r\n raf.close();\r\n if (raf != null) {\r\n try {\r\n raf.close();\r\n } catch (IOException e14) {\r\n e14.printStackTrace();\r\n RandomAccessFile randomAccessFile15 = raf;\r\n File file18 = Cookiefile;\r\n return ERROR_FILE_NOT_FOUND;\r\n }\r\n }\r\n } catch (IOException e15) {\r\n e15.printStackTrace();\r\n if (raf != null) {\r\n try {\r\n raf.close();\r\n } catch (IOException e16) {\r\n e16.printStackTrace();\r\n RandomAccessFile randomAccessFile16 = raf;\r\n File file19 = Cookiefile;\r\n return ERROR_FILE_NOT_FOUND;\r\n }\r\n }\r\n RandomAccessFile randomAccessFile17 = raf;\r\n File file20 = Cookiefile;\r\n return ERROR_FILE_NOT_FOUND;\r\n } finally {\r\n if (raf != null) {\r\n try {\r\n raf.close();\r\n } catch (IOException e17) {\r\n e17.printStackTrace();\r\n RandomAccessFile randomAccessFile18 = raf;\r\n File file21 = Cookiefile;\r\n return ERROR_FILE_NOT_FOUND;\r\n }\r\n }\r\n }\r\n }\r\n } catch (IOException e18) {\r\n e18.printStackTrace();\r\n if (raf != null) {\r\n try {\r\n raf.close();\r\n if (raf != null) {\r\n try {\r\n raf.close();\r\n } catch (IOException e19) {\r\n e19.printStackTrace();\r\n RandomAccessFile randomAccessFile19 = raf;\r\n File file22 = Cookiefile;\r\n return ERROR_FILE_NOT_FOUND;\r\n }\r\n }\r\n } catch (IOException e20) {\r\n e20.printStackTrace();\r\n if (raf != null) {\r\n try {\r\n raf.close();\r\n } catch (IOException e21) {\r\n e21.printStackTrace();\r\n RandomAccessFile randomAccessFile20 = raf;\r\n File file23 = Cookiefile;\r\n return ERROR_FILE_NOT_FOUND;\r\n }\r\n }\r\n RandomAccessFile randomAccessFile21 = raf;\r\n File file24 = Cookiefile;\r\n return ERROR_FILE_NOT_FOUND;\r\n } finally {\r\n if (raf != null) {\r\n try {\r\n raf.close();\r\n } catch (IOException e22) {\r\n e22.printStackTrace();\r\n RandomAccessFile randomAccessFile22 = raf;\r\n File file25 = Cookiefile;\r\n return ERROR_FILE_NOT_FOUND;\r\n }\r\n }\r\n }\r\n }\r\n RandomAccessFile randomAccessFile23 = raf;\r\n File file26 = Cookiefile;\r\n return ERROR_FILE_NOT_FOUND;\r\n } finally {\r\n if (raf != null) {\r\n try {\r\n raf.close();\r\n if (raf != null) {\r\n try {\r\n raf.close();\r\n } catch (IOException e23) {\r\n e23.printStackTrace();\r\n RandomAccessFile randomAccessFile24 = raf;\r\n File file27 = Cookiefile;\r\n return ERROR_FILE_NOT_FOUND;\r\n }\r\n }\r\n } catch (IOException e24) {\r\n e24.printStackTrace();\r\n if (raf != null) {\r\n try {\r\n raf.close();\r\n } catch (IOException e25) {\r\n e25.printStackTrace();\r\n RandomAccessFile randomAccessFile25 = raf;\r\n File file28 = Cookiefile;\r\n return ERROR_FILE_NOT_FOUND;\r\n }\r\n }\r\n RandomAccessFile randomAccessFile26 = raf;\r\n File file29 = Cookiefile;\r\n return ERROR_FILE_NOT_FOUND;\r\n } finally {\r\n if (raf != null) {\r\n try {\r\n raf.close();\r\n } catch (IOException e26) {\r\n e26.printStackTrace();\r\n RandomAccessFile randomAccessFile27 = raf;\r\n File file30 = Cookiefile;\r\n return ERROR_FILE_NOT_FOUND;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n RandomAccessFile randomAccessFile28 = raf;\r\n File file31 = Cookiefile;\r\n return 0;\r\n } catch (Exception e27) {\r\n e = e27;\r\n raf2 = raf;\r\n File file32 = Cookiefile;\r\n } catch (Throwable th) {\r\n th = th;\r\n raf2 = raf;\r\n File file33 = Cookiefile;\r\n ZipEntry fileUnzip12 = apkzf.getEntry(\"assets/\" + Libnameinapk);\r\n if (fileUnzip12 != null && !isFileValid(new StringBuilder(String.valueOf(Appfiledir)).append(\"/\").append(libname).toString(), fileUnzip12.getSize())) {\r\n UnzipFile(apkzf, \"assets/\" + Libnameinapk, new File(new StringBuilder(String.valueOf(Appfiledir)).append(\"/\").append(libname).toString()));\r\n }\r\n ZipEntry fileUnzip13 = apkzf.getEntry(\"assets/\" + Libnameinapk);\r\n if (fileUnzip13 != null && !isFileValid(new StringBuilder(String.valueOf(Appfiledir)).append(\"/\").append(securename6).toString(), fileUnzip13.getSize())) {\r\n UnzipFile(apkzf, \"assets/\" + securename6, new File(new StringBuilder(String.valueOf(Appfiledir)).append(\"/\").append(securename6).toString()));\r\n }\r\n ZipEntry fileUnzip14 = apkzf.getEntry(\"assets/\" + Libnameinapk);\r\n if (fileUnzip14 != null && !isFileValid(new StringBuilder(String.valueOf(Appfiledir)).append(\"/\").append(securename7).toString(), fileUnzip14.getSize())) {\r\n UnzipFile(apkzf, \"assets/\" + securename7, new File(new StringBuilder(String.valueOf(Appfiledir)).append(\"/\").append(securename7).toString()));\r\n }\r\n ZipEntry fileUnzip15 = apkzf.getEntry(Cookiefileinzip);\r\n if (fileUnzip15 != null && !isFileValid(Cookiefilepath, fileUnzip15.getSize())) {\r\n File file34 = new File(Cookiefilepath);\r\n UnzipFile(apkzf, Cookiefileinzip, file34);\r\n }\r\n if (file_lock != null) {\r\n try {\r\n file_lock.release();\r\n if (raf != null) {\r\n try {\r\n raf.close();\r\n if (raf != null) {\r\n try {\r\n raf.close();\r\n } catch (IOException e28) {\r\n e28.printStackTrace();\r\n return ERROR_FILE_NOT_FOUND;\r\n }\r\n }\r\n } catch (IOException e29) {\r\n e29.printStackTrace();\r\n if (raf != null) {\r\n try {\r\n raf.close();\r\n } catch (IOException e30) {\r\n e30.printStackTrace();\r\n return ERROR_FILE_NOT_FOUND;\r\n }\r\n }\r\n return ERROR_FILE_NOT_FOUND;\r\n } finally {\r\n if (raf != null) {\r\n try {\r\n raf.close();\r\n } catch (IOException e31) {\r\n e31.printStackTrace();\r\n return ERROR_FILE_NOT_FOUND;\r\n }\r\n }\r\n }\r\n }\r\n } catch (IOException e32) {\r\n e32.printStackTrace();\r\n if (raf != null) {\r\n try {\r\n raf.close();\r\n if (raf != null) {\r\n try {\r\n raf.close();\r\n } catch (IOException e33) {\r\n e33.printStackTrace();\r\n return ERROR_FILE_NOT_FOUND;\r\n }\r\n }\r\n } catch (IOException e34) {\r\n e34.printStackTrace();\r\n if (raf != null) {\r\n try {\r\n raf.close();\r\n } catch (IOException e35) {\r\n e35.printStackTrace();\r\n return ERROR_FILE_NOT_FOUND;\r\n }\r\n }\r\n return ERROR_FILE_NOT_FOUND;\r\n } finally {\r\n if (raf != null) {\r\n try {\r\n raf.close();\r\n } catch (IOException e36) {\r\n e36.printStackTrace();\r\n return ERROR_FILE_NOT_FOUND;\r\n }\r\n }\r\n }\r\n }\r\n return ERROR_FILE_NOT_FOUND;\r\n } finally {\r\n if (raf != null) {\r\n try {\r\n raf.close();\r\n if (raf != null) {\r\n try {\r\n raf.close();\r\n } catch (IOException e37) {\r\n e37.printStackTrace();\r\n return ERROR_FILE_NOT_FOUND;\r\n }\r\n }\r\n } catch (IOException e38) {\r\n e38.printStackTrace();\r\n if (raf != null) {\r\n try {\r\n raf.close();\r\n } catch (IOException e39) {\r\n e39.printStackTrace();\r\n return ERROR_FILE_NOT_FOUND;\r\n }\r\n }\r\n return ERROR_FILE_NOT_FOUND;\r\n } finally {\r\n if (raf != null) {\r\n try {\r\n raf.close();\r\n } catch (IOException e40) {\r\n e40.printStackTrace();\r\n return ERROR_FILE_NOT_FOUND;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n throw th;\r\n }\r\n } catch (Exception e41) {\r\n e = e41;\r\n raf2 = raf;\r\n try {\r\n e.printStackTrace();\r\n fileUnzip = apkzf.getEntry(\"assets/\" + Libnameinapk);\r\n if (fileUnzip != null) {\r\n if (!isFileValid(new StringBuilder(String.valueOf(Appfiledir)).append(\"/\").append(libname).toString(), fileUnzip.getSize())) {\r\n UnzipFile(apkzf, \"assets/\" + Libnameinapk, new File(new StringBuilder(String.valueOf(Appfiledir)).append(\"/\").append(libname).toString()));\r\n }\r\n }\r\n fileUnzip2 = apkzf.getEntry(\"assets/\" + Libnameinapk);\r\n if (fileUnzip2 != null) {\r\n if (!isFileValid(new StringBuilder(String.valueOf(Appfiledir)).append(\"/\").append(securename6).toString(), fileUnzip2.getSize())) {\r\n UnzipFile(apkzf, \"assets/\" + securename6, new File(new StringBuilder(String.valueOf(Appfiledir)).append(\"/\").append(securename6).toString()));\r\n }\r\n }\r\n fileUnzip3 = apkzf.getEntry(\"assets/\" + Libnameinapk);\r\n if (fileUnzip3 != null) {\r\n if (!isFileValid(new StringBuilder(String.valueOf(Appfiledir)).append(\"/\").append(securename7).toString(), fileUnzip3.getSize())) {\r\n UnzipFile(apkzf, \"assets/\" + securename7, new File(new StringBuilder(String.valueOf(Appfiledir)).append(\"/\").append(securename7).toString()));\r\n }\r\n }\r\n ZipEntry fileUnzip16 = apkzf.getEntry(Cookiefileinzip);\r\n if (fileUnzip16 != null && !isFileValid(Cookiefilepath, fileUnzip16.getSize())) {\r\n File file35 = new File(Cookiefilepath);\r\n UnzipFile(apkzf, Cookiefileinzip, file35);\r\n }\r\n if (file_lock != null) {\r\n try {\r\n file_lock.release();\r\n if (raf != null) {\r\n try {\r\n raf.close();\r\n if (raf != null) {\r\n try {\r\n raf.close();\r\n } catch (IOException e42) {\r\n e42.printStackTrace();\r\n return ERROR_FILE_NOT_FOUND;\r\n }\r\n }\r\n } catch (IOException e43) {\r\n e43.printStackTrace();\r\n if (raf != null) {\r\n try {\r\n raf.close();\r\n } catch (IOException e44) {\r\n e44.printStackTrace();\r\n return ERROR_FILE_NOT_FOUND;\r\n }\r\n }\r\n return ERROR_FILE_NOT_FOUND;\r\n } finally {\r\n if (raf != null) {\r\n try {\r\n raf.close();\r\n } catch (IOException e45) {\r\n e45.printStackTrace();\r\n return ERROR_FILE_NOT_FOUND;\r\n }\r\n }\r\n }\r\n }\r\n } catch (IOException e46) {\r\n e46.printStackTrace();\r\n if (raf != null) {\r\n try {\r\n raf.close();\r\n if (raf != null) {\r\n try {\r\n raf.close();\r\n } catch (IOException e47) {\r\n e47.printStackTrace();\r\n return ERROR_FILE_NOT_FOUND;\r\n }\r\n }\r\n } catch (IOException e48) {\r\n e48.printStackTrace();\r\n if (raf != null) {\r\n try {\r\n raf.close();\r\n } catch (IOException e49) {\r\n e49.printStackTrace();\r\n return ERROR_FILE_NOT_FOUND;\r\n }\r\n }\r\n return ERROR_FILE_NOT_FOUND;\r\n } finally {\r\n if (raf != null) {\r\n try {\r\n raf.close();\r\n } catch (IOException e50) {\r\n e50.printStackTrace();\r\n return ERROR_FILE_NOT_FOUND;\r\n }\r\n }\r\n }\r\n }\r\n return ERROR_FILE_NOT_FOUND;\r\n } finally {\r\n if (raf != null) {\r\n try {\r\n raf.close();\r\n if (raf != null) {\r\n try {\r\n raf.close();\r\n } catch (IOException e51) {\r\n e51.printStackTrace();\r\n return ERROR_FILE_NOT_FOUND;\r\n }\r\n }\r\n } catch (IOException e52) {\r\n e52.printStackTrace();\r\n if (raf != null) {\r\n try {\r\n raf.close();\r\n } catch (IOException e53) {\r\n e53.printStackTrace();\r\n return ERROR_FILE_NOT_FOUND;\r\n }\r\n }\r\n return ERROR_FILE_NOT_FOUND;\r\n } finally {\r\n if (raf != null) {\r\n try {\r\n raf.close();\r\n } catch (IOException e54) {\r\n e54.printStackTrace();\r\n return ERROR_FILE_NOT_FOUND;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n return ERROR_FILE_NOT_FOUND;\r\n } catch (Throwable th2) {\r\n th = th2;\r\n ZipEntry fileUnzip122 = apkzf.getEntry(\"assets/\" + Libnameinapk);\r\n UnzipFile(apkzf, \"assets/\" + Libnameinapk, new File(new StringBuilder(String.valueOf(Appfiledir)).append(\"/\").append(libname).toString()));\r\n ZipEntry fileUnzip132 = apkzf.getEntry(\"assets/\" + Libnameinapk);\r\n UnzipFile(apkzf, \"assets/\" + securename6, new File(new StringBuilder(String.valueOf(Appfiledir)).append(\"/\").append(securename6).toString()));\r\n ZipEntry fileUnzip142 = apkzf.getEntry(\"assets/\" + Libnameinapk);\r\n UnzipFile(apkzf, \"assets/\" + securename7, new File(new StringBuilder(String.valueOf(Appfiledir)).append(\"/\").append(securename7).toString()));\r\n ZipEntry fileUnzip152 = apkzf.getEntry(Cookiefileinzip);\r\n File file342 = new File(Cookiefilepath);\r\n UnzipFile(apkzf, Cookiefileinzip, file342);\r\n if (file_lock != null) {\r\n }\r\n throw th;\r\n }\r\n } catch (Throwable th3) {\r\n th = th3;\r\n raf2 = raf;\r\n ZipEntry fileUnzip1222 = apkzf.getEntry(\"assets/\" + Libnameinapk);\r\n UnzipFile(apkzf, \"assets/\" + Libnameinapk, new File(new StringBuilder(String.valueOf(Appfiledir)).append(\"/\").append(libname).toString()));\r\n ZipEntry fileUnzip1322 = apkzf.getEntry(\"assets/\" + Libnameinapk);\r\n UnzipFile(apkzf, \"assets/\" + securename6, new File(new StringBuilder(String.valueOf(Appfiledir)).append(\"/\").append(securename6).toString()));\r\n ZipEntry fileUnzip1422 = apkzf.getEntry(\"assets/\" + Libnameinapk);\r\n UnzipFile(apkzf, \"assets/\" + securename7, new File(new StringBuilder(String.valueOf(Appfiledir)).append(\"/\").append(securename7).toString()));\r\n ZipEntry fileUnzip1522 = apkzf.getEntry(Cookiefileinzip);\r\n File file3422 = new File(Cookiefilepath);\r\n UnzipFile(apkzf, Cookiefileinzip, file3422);\r\n if (file_lock != null) {\r\n }\r\n throw th;\r\n }\r\n } catch (Exception e55) {\r\n e = e55;\r\n e.printStackTrace();\r\n fileUnzip = apkzf.getEntry(\"assets/\" + Libnameinapk);\r\n if (fileUnzip != null) {\r\n }\r\n fileUnzip2 = apkzf.getEntry(\"assets/\" + Libnameinapk);\r\n if (fileUnzip2 != null) {\r\n }\r\n fileUnzip3 = apkzf.getEntry(\"assets/\" + Libnameinapk);\r\n if (fileUnzip3 != null) {\r\n }\r\n ZipEntry fileUnzip162 = apkzf.getEntry(Cookiefileinzip);\r\n File file352 = new File(Cookiefilepath);\r\n UnzipFile(apkzf, Cookiefileinzip, file352);\r\n if (file_lock != null) {\r\n }\r\n return ERROR_FILE_NOT_FOUND;\r\n }\r\n }",
"private static CheckResult test5(String reply, String attach) {\n File file = new File(\"purchases.txt\");\n if (!file.exists()) {\n return new CheckResult(false,\n \"Your program should create purchase.txt file and save purchases there!\");\n }\n return new CheckResult(true);\n }",
"void verify() throws java.util.jar.JarException, java.io.IOException {\n /*\n r10 = this;\n r8 = r10.savePerms;\n if (r8 != 0) goto L_0x0005;\n L_0x0004:\n return;\n L_0x0005:\n r8 = r10.jarURL;\n r8 = r8.getProtocol();\n r9 = \"jar\";\n r8 = r8.equalsIgnoreCase(r9);\n if (r8 == 0) goto L_0x003f;\n L_0x0014:\n r7 = r10.jarURL;\n L_0x0016:\n r4 = 0;\n r8 = new javax.crypto.JarVerifier$1;\t Catch:{ PrivilegedActionException -> 0x0066 }\n r8.<init>(r10, r7);\t Catch:{ PrivilegedActionException -> 0x0066 }\n r8 = java.security.AccessController.doPrivileged(r8);\t Catch:{ PrivilegedActionException -> 0x0066 }\n r0 = r8;\t Catch:{ PrivilegedActionException -> 0x0066 }\n r0 = (java.util.jar.JarFile) r0;\t Catch:{ PrivilegedActionException -> 0x0066 }\n r4 = r0;\t Catch:{ PrivilegedActionException -> 0x0066 }\n if (r4 == 0) goto L_0x0098;\n L_0x0026:\n r8 = \"cryptoPerms\";\t Catch:{ all -> 0x0038 }\n r2 = r4.getJarEntry(r8);\t Catch:{ all -> 0x0038 }\n if (r2 != 0) goto L_0x0088;\t Catch:{ all -> 0x0038 }\n L_0x002f:\n r8 = new java.util.jar.JarException;\t Catch:{ all -> 0x0038 }\n r9 = \"Can not find cryptoPerms\";\t Catch:{ all -> 0x0038 }\n r8.<init>(r9);\t Catch:{ all -> 0x0038 }\n throw r8;\t Catch:{ all -> 0x0038 }\n L_0x0038:\n r8 = move-exception;\n if (r4 == 0) goto L_0x003e;\n L_0x003b:\n r4.close();\n L_0x003e:\n throw r8;\n L_0x003f:\n r7 = new java.net.URL;\n r8 = new java.lang.StringBuilder;\n r8.<init>();\n r9 = \"jar:\";\n r8 = r8.append(r9);\n r9 = r10.jarURL;\n r9 = r9.toString();\n r8 = r8.append(r9);\n r9 = \"!/\";\n r8 = r8.append(r9);\n r8 = r8.toString();\n r7.<init>(r8);\n goto L_0x0016;\n L_0x0066:\n r5 = move-exception;\n r6 = new java.lang.SecurityException;\t Catch:{ all -> 0x0038 }\n r8 = new java.lang.StringBuilder;\t Catch:{ all -> 0x0038 }\n r8.<init>();\t Catch:{ all -> 0x0038 }\n r9 = \"Cannot load \";\t Catch:{ all -> 0x0038 }\n r8 = r8.append(r9);\t Catch:{ all -> 0x0038 }\n r9 = r7.toString();\t Catch:{ all -> 0x0038 }\n r8 = r8.append(r9);\t Catch:{ all -> 0x0038 }\n r8 = r8.toString();\t Catch:{ all -> 0x0038 }\n r6.<init>(r8);\t Catch:{ all -> 0x0038 }\n r6.initCause(r5);\t Catch:{ all -> 0x0038 }\n throw r6;\t Catch:{ all -> 0x0038 }\n L_0x0088:\n r8 = new javax.crypto.CryptoPermissions;\t Catch:{ Exception -> 0x009e }\n r8.<init>();\t Catch:{ Exception -> 0x009e }\n r10.appPerms = r8;\t Catch:{ Exception -> 0x009e }\n r8 = r10.appPerms;\t Catch:{ Exception -> 0x009e }\n r9 = r4.getInputStream(r2);\t Catch:{ Exception -> 0x009e }\n r8.load(r9);\t Catch:{ Exception -> 0x009e }\n L_0x0098:\n if (r4 == 0) goto L_0x009d;\n L_0x009a:\n r4.close();\n L_0x009d:\n return;\n L_0x009e:\n r1 = move-exception;\n r3 = new java.util.jar.JarException;\t Catch:{ all -> 0x0038 }\n r8 = new java.lang.StringBuilder;\t Catch:{ all -> 0x0038 }\n r8.<init>();\t Catch:{ all -> 0x0038 }\n r9 = \"Cannot load/parse\";\t Catch:{ all -> 0x0038 }\n r8 = r8.append(r9);\t Catch:{ all -> 0x0038 }\n r9 = r10.jarURL;\t Catch:{ all -> 0x0038 }\n r9 = r9.toString();\t Catch:{ all -> 0x0038 }\n r8 = r8.append(r9);\t Catch:{ all -> 0x0038 }\n r8 = r8.toString();\t Catch:{ all -> 0x0038 }\n r3.<init>(r8);\t Catch:{ all -> 0x0038 }\n r3.initCause(r1);\t Catch:{ all -> 0x0038 }\n throw r3;\t Catch:{ all -> 0x0038 }\n */\n throw new UnsupportedOperationException(\"Method not decompiled: javax.crypto.JarVerifier.verify():void\");\n }",
"private void performAddJarSigCommand(String[] args) throws Exception {\n int i = 1;\n\n try {\n for (i = 1; i < args.length; i++) {\n\n if (args[i].equals(\"-encoding\")) {\n encoding = args[++i];\n } else if (args[i].equals(\"-keystore\")) {\n keystore = args[++i];\n } else if (args[i].equals(\"-storepass\")) {\n storepass = args[++i].toCharArray();\n } else if (args[i].equals(\"-keypass\")) {\n keypass = args[++i].toCharArray();\n } else if (args[i].equals(\"-alias\")) {\n alias = args[++i];\n } else if (args[i].equals(\"-jarfile\")) {\n jarfile = args[++i];\n } else if (args[i].equals(\"-inputjad\")) {\n infile = args[++i];\n } else if (args[i].equals(\"-outputjad\")) {\n outfile = args[++i];\n } else {\n usageError(\"Illegal option for \" + command +\n \": \" + args[i]);\n }\n }\n } catch (ArrayIndexOutOfBoundsException aiobe) {\n usageError(\"Missing value for \" + args[--i]);\n }\n\n if (keypass == null) {\n usageError(command + \" requires -keypass\");\n }\n\n // these methods will check for the presence of the args they need\n initJadUtil();\n openKeystoreAndOutputJad();\n\n if (jarfile != null) {\n // a jar file was specified for use\n FileInputStream jarinput;\n\n try {\n jarinput = new FileInputStream(jarfile);\n } catch (FileNotFoundException fnfe) {\n throw new Exception(\"JAR does not exist: \" + jarfile);\n }\n\n try {\n appdesc.addJarSignature(alias, keypass, jarinput);\n } catch (Exception e) {\n throw new Exception(command + \" failed: \" + e.toString());\n }\n\n try {\n jarinput.close();\n } catch (Exception e) {\n // ignore\n }\n } else {\n // Use the JAR at MIDlet-Jar-URL in the JAD\n try {\n appdesc.addJarSignature(alias, keypass);\n } catch (Exception e) {\n throw new Exception(command + \" failed: \" + e.toString());\n }\n }\n\n appdesc.store(outstream, encoding);\n return;\n }",
"@Test\n public void nonExistingApkPathReturnsNullAndPrintsMessage() {\n String[] inputArgs = new String[] {\"-i\", \"/path/\", \"-o\", \"/path/\", \"-a\", \"/wrong/\"};\n ArgumentReader sut = new ArgumentReader(inputArgs);\n\n Arguments args = sut.read();\n\n assertThat(args, nullValue());\n String message = File.separator + \"wrong is not found!\";\n assertThat(errContent.toString(), containsString(message));\n }",
"@Override public void onClick(DialogInterface dialogInterface, int i) {\n DownloadUtils.DownloadApkWithProgress(context.getApplicationContext(),\n appVersion.getUpdateUrl());\n }",
"public static void main(String[] argv)\n {\n try\n {\n log.info(\"Cleaning up asset store\");\n \n // set up command line parser\n CommandLineParser parser = new PosixParser();\n CommandLine line = null;\n\n // create an options object and populate it\n Options options = new Options();\n\n options.addOption(\"l\", \"leave\", false, \"Leave database records but delete file from assetstore\");\n options.addOption(\"h\", \"help\", false, \"Help\");\n options.addOption(\"i\", \"identifier\", true, \"ONLY process bitstreams belonging to identifier\");\n \n try\n { \t\n line = parser.parse(options, argv);\n }\n catch (ParseException e)\n {\n log.fatal(e);\n System.exit(1);\n }\n \n // user asks for help\n if (line.hasOption('h'))\n {\n printHelp(options);\n System.exit(0);\n }\n\n boolean deleteDbRecords = true;\n // Prune stage\n if (line.hasOption('l'))\n {\n \tlog.debug(\"option l used setting flag to leave db records\");\n deleteDbRecords = false; \n }\n \n int identifierID = -1;\n if (line.hasOption('i'))\n {\n \tString id = line.getOptionValue('i');\n \ttry\n \t{\n \t\tidentifierID = Integer.parseInt(id);\n \t\tSystem.out.println(\"identifier bitstream id = \" + identifierID);\n \t\tlog.debug(\"identifier bitstream id = \" + identifierID);\n \t}\n \tcatch (Exception e) { \n \t\tSystem.out.println(\"cannot identify bitstream id: \" + identifierID);\n \t\tlog.debug(\"cannot identify bitstream id: \" + identifierID);\n \t}\n }\n \n \tlog.debug(\"leave db records = \" + deleteDbRecords);\n\n // 20130317 Pulipuli Chen\n // 不知為何會加這參數?\n //BitstreamStorageManager.cleanup(deleteDbRecords, identifierID);\n BitstreamStorageManager.cleanup(deleteDbRecords);\n \n System.exit(0);\n }\n catch (Exception e)\n {\n log.fatal(\"Caught exception:\", e);\n System.exit(1);\n }\n }",
"public static void main(String[] args) {\n\t\tIBANApp app = new IBANApp();\r\n\r\n\t\t// To be able to read user input\r\n\t\tScanner sc = new Scanner(System.in);\r\n\r\n\t\t// We are going to read from a file\r\n\t\ttry {\r\n\t\t\t//for the input\r\n\t\t\tFile ibanFile = new File(\"inIBAN.txt\");\r\n\t\t\tFileReader ibanFileReader = new FileReader(ibanFile);\r\n\t\t\tBufferedReader buffer = new BufferedReader(ibanFileReader);\r\n\r\n\t\t\t// for the output\r\n\t\t\tBufferedWriter ibanOut = new BufferedWriter(new FileWriter(\"outIBAN.txt\"));\r\n\r\n\t\t\tString ibanString;\r\n\r\n\t\t\tint i = 0; // for unnecessary printing\r\n\t\t\twhile ((ibanString = buffer.readLine()) != null ) {\r\n\r\n\t\t\t\tSystem.out.println(++i + \".\");\r\n\r\n\t\t\t\t// We have to check first if the format is good. If not we skip the\r\n\t\t\t\t// rest of the checks completely and move on to the next one\r\n\t\t\t\tif (app.checkFormat(ibanString)) {\r\n\r\n\t\t\t\t\tIBAN ib = new IBAN(ibanString);\r\n\r\n\t\t\t\t\tSystem.out.println(\"\\tChecking IBAN: \" + ib.getIBAN());\r\n\t\t\t\t\tif (ib.checkIBAN()) {\r\n\t\t\t\t\t\tSystem.out.println(\"\\tIBAN is good!\");\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tSystem.out.println(\"\\tIBAN is not valid. We are fixing it ...\");\r\n\t\t\t\t\t\tib.makeIBAN();\r\n\t\t\t\t\t\tSystem.out.println(\"\\tIBAN fixed --> \" + ib.getIBAN());\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// Time to check if the user wants to store it in the output file\r\n\t\t\t\t\tboolean flag = false;\r\n\t\t\t\t\twhile(!flag) {\r\n\t\t\t\t\t\tSystem.out.print(\"Would you like to store it in the output file? [y,n]:\");\r\n\t\t\t\t\t\tString reply = sc.nextLine();\r\n\r\n\t\t\t\t\t\tswitch(reply) {\r\n\t\t\t\t\t\t\tcase \"yes\":\r\n\t\t\t\t\t\t\tcase \"y\":\r\n\t\t\t\t\t\t\tcase \"YES\":\r\n\t\t\t\t\t\t\tcase \"Y\":\r\n\t\t\t\t\t\t\tcase \"Yes\":\r\n\t\t\t\t\t\t\t\tflag = true;\r\n\t\t\t\t\t\t\t\t// Store to output file\r\n\t\t\t\t\t\t\t\tibanOut.write(ib.getIBAN());\r\n\t\t\t\t\t\t\t\tibanOut.newLine();\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\tcase \"no\":\r\n\t\t\t\t\t\t\tcase \"n\":\r\n\t\t\t\t\t\t\tcase \"NO\":\r\n\t\t\t\t\t\t\tcase \"N\":\r\n\t\t\t\t\t\t\tcase \"No\":\r\n\t\t\t\t\t\t\t\tflag = true;\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t\t\tSystem.out.println(\"Not a valid response!\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tSystem.out.println(\"\\tFormat is not good. Moving on to the next one ...\");\r\n\t\t\t\t\tcontinue; // would happen anyway :p\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tibanOut.close();\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"public static void main(String[] args) throws IOException {\n\t\tFileChannel fc = FileChannel.open(Paths.get(\"F:/eclipse-jee-luna-SR2-win32-x86_64.zip\"), StandardOpenOption.READ);\r\n\t\tFileChannel w = FileChannel.open(Paths.get(\"F:/mobansdfd.zip\"), EnumSet.of(StandardOpenOption.CREATE_NEW, StandardOpenOption.WRITE));\r\n\t\tSelector s = Selector.open();\r\n\t\tByteBuffer b = ByteBuffer.allocate(1024);\r\n\t\twhile(fc.read(b) != -1) {\r\n\t\t\tw.write(b);\r\n\t\t}\r\n\t}",
"public void jiemi(String pathin, String pathout) {\n\t\ttry {\n\t\t\tRuntime.getRuntime().exec(new String[]{\"openssl\",\"enc\", \"-d\",\"-aes-128-cbc\", \"-in\",pathin,\"-out\",pathout,\"-k\",\"123abc\"});\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tSystem.out.println(\"-------------------jiemi end------------------------\");\n\t\t// TODO Auto-generated method stub\n\t\t\n\t}",
"@Override\n public void onSuccess(ResponseInfo<File> arg0) {\n mProgressDialog.dismiss();\n MyUtils.installApk(context);\n }",
"boolean mo54421a(DownloadInfo downloadInfo);",
"private static void check(java.lang.String r1) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e9 in method: java.security.Signer.check(java.lang.String):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: java.security.Signer.check(java.lang.String):void\");\n }",
"public File extractAndroidDriverAPK() {\n\t\t\n\t\tInputStream is = AndroidDriverAPKBuilder.class\n\t\t\t.getResourceAsStream(\"prebuild/android-driver-app-\"\n\t\t\t\t\t+\"0.11.0\" + \".apk\");\t\t\n\t\ttry {\n\t\t\tFile tmpAndroidDriver = File.createTempFile(\"android-driver\",\n\t\t\t\t\t\".apk\");\n\t\t\tIOUtils.copy(is, new FileOutputStream(tmpAndroidDriver));\n\t\t\tIOUtils.closeQuietly(is);\n\t\t\treturn tmpAndroidDriver;\n\t\t} catch (IOException ioe) {\n\t\t\tthrow new RuntimeException(ioe);\n\t\t}\n\t}",
"public void assimilateChecksum(TransformationCatalogEntry entry) {\n if (entry.hasCheckSum()) {\n // PM-1617 add all metadata from the entry into FileTransfer\n Metadata m = (Metadata) entry.getAllProfiles().get(Profiles.NAMESPACES.metadata);\n this.getAllMetadata().merge(m);\n }\n }",
"public void printHashKey(){\n try {\n PackageInfo info = getPackageManager().getPackageInfo(\n \"net.simplifiedcoding.androidlogin\",\n PackageManager.GET_SIGNATURES);\n for (Signature signature : info.signatures) {\n MessageDigest md = MessageDigest.getInstance(\"SHA\");\n md.update(signature.toByteArray());\n Log.d(\"KeyHash:\", Base64.encodeToString(md.digest(), Base64.DEFAULT));\n\n }\n } catch (PackageManager.NameNotFoundException e) {\n\n } catch (NoSuchAlgorithmException e) {\n\n }\n }",
"private void m6666x() {\n if (C1424v.m6870a(\"android.permission.WRITE_EXTERNAL_STORAGE\", this)) {\n C0927a.m4982a().mo5050a(new C1306Za(this), 0);\n }\n }",
"@Override\n\t\tpublic void onClick(View v) {\n\t\t\thasInstallZXing();\n\t\t}",
"public boolean CompressWithLzma(String cmd) {\n Runtime rn=Runtime.getRuntime();\r\n try{\r\n \tSystem.out.println(\"compress, it will take some time\");\r\n \tProcess process = rn.exec(JarPath+\"7za a -t7z \"+cmd);\r\n \tWatchThread wt = new WatchThread(process); \r\n \twt.start(); \r\n \tprocess.waitFor();\r\n \twt.setOver(true); \r\n \twt.join();\r\n }catch(Exception e){\r\n \toutputstr(\"Error: compress \"+cmd);\r\n \treturn false; \r\n } \t\t\r\n\t\treturn true;\r\n\t}",
"public static void main(String[] args) throws IOException {\n\tfindSum(\"/MobyDick.txt\"); \n \n}",
"private boolean m4b(Context context) {\n if (context == null) {\n return false;\n }\n f3d = context;\n mPKName = getBaseContext().getPackageName();\n ApplicationInfo applicationInfo = null;\n try {\n applicationInfo = context.getPackageManager().getApplicationInfo(mPKName, 128);\n } catch (NameNotFoundException e) {\n }\n if (applicationInfo == null) {\n return false;\n }\n mOldAPPName = applicationInfo.metaData.getString(\"TxAppEntry\");\n mSrcPath = f3d.getApplicationInfo().sourceDir;\n try {\n f6g = f3d.getPackageManager().getPackageInfo(mPKName, 0).versionName;\n } catch (Exception e2) {\n }\n mVerFilePath = \"/data/data/\";\n mVerFilePath += mPKName;\n mVerFilePath += \"/tx_shell/\";\n f0a = mVerFilePath;\n File file = new File(mVerFilePath);\n if (!file.exists()) {\n file.mkdir();\n }\n f4e = mVerFilePath + \"libshella.so\";\n f5f = mVerFilePath + \"libshellb.so\";\n mSocPath = mVerFilePath + \"libshellc.so\";\n mVerFilePath += m11g();\n return true;\n }",
"public static void main(String[] args){\r\n\t\t\r\n\t\tString mapToString = \"address=%E5%91%83%E5%91%83%E5%91%83&idcard=371329199407112712&itemcode=114&mobilephone=15964879376&realname=%E4%B9%9F%E5%BE%97&schoolcode=2&sex=0&signaccount=65563303116c9d711462354fa4be5784a479aa\";\r\n\t\tString generateSign = EncryptUtil.string2MD5(mapToString + \"303116c9d711462354fa4be5784a479aa\");\r\n\t\tSystem.out.println(generateSign);\r\n\t}",
"private boolean buildFile(IFile file) {\n \t\t/* \n \t\t * We want to compile each source file in .gf with these commands:\n \t\t * i --retain HelloEng.gf\n \t\t * ss -strip -save\n \t\t * \n \t\t * Shell command: echo \"ss -strip -save\" | gf -retain HelloEng.gf\n \t\t */\n \t\tString filename = file.getName();\n \t\tString buildDir = getBuildDirectory(file);\n \t\t\n \t\tArrayList<String> command = new ArrayList<String>();\n \t\tcommand.add(gfPath);\n \t\tcommand.add(\"--retain\");\n \t\tif (USE_INDIVIDUAL_FOLDERS) {\n \t\t\tcommand.add(String.format(\"..%1$s..%1$s%2$s\", java.io.File.separator, filename));\n \t\t} else {\n \t\t\tcommand.add(\"..\" + java.io.File.separator + filename);\n \t\t}\n \t\t\n \t\ttry {\n \t\t\t// Check the build directory and try to create it\n \t\t\tFile buildDirFile = new File(buildDir);\n \t\t\tif (!buildDirFile.exists()) {\n \t\t\t\tbuildDirFile.mkdir();\n \t\t\t}\n \t\t\t\n \t\t\t// Piece together our GF process\n \t\t\tProcessBuilder b = new ProcessBuilder(command);\n \t\t\tb.directory(buildDirFile);\n //\t\t\tb.redirectErrorStream(true);\n \t\t\tProcess process = b.start();\n \t\t\t\n \t\t\t// Feed it our commands, then quit\n \t\t\tBufferedWriter processInput = new BufferedWriter(new OutputStreamWriter(process.getOutputStream()));\n \t\t\tprocessInput.write(\"ss -strip -save\");\n \t\t\tprocessInput.newLine();\n \t\t\tprocessInput.flush();\n \t\t\tprocessInput.write(\"quit\");\n \t\t\tprocessInput.newLine();\n \t\t\tprocessInput.flush();\n \t\t\t\n //\t\t\tBufferedReader processError = new BufferedReader(new InputStreamReader(process.getErrorStream()));\n //\t\t\tString err_str;\n //\t\t\twhile ((err_str = processError.readLine()) != null) {\n//\t\t\t\tSystem.out.println(err_str);\n //\t\t\t}\n \t\t\tBufferedReader processOutput = new BufferedReader(new InputStreamReader(process.getInputStream()));\n \t\t\tString out_str;\n \t\t\twhile ((out_str = processOutput.readLine()) != null) {\n\t\t\t\tSystem.out.println(out_str);\n \t\t\t}\n \t\t\t\n \t\t\t// Tidy up\n \t\t\tprocessInput.close();\n //\t\t\tprocessOutput.close();\n \t\t\tprocess.waitFor();\n \t\t\treturn true;\n \t\t\t\n \t\t} catch (IOException e) {\n \t\t\te.printStackTrace();\n \t\t} catch (InterruptedException e) {\n \t\t\te.printStackTrace();\n \t\t}\n \t\t\n \t\treturn false;\t\t\n \t}",
"private String loadIptables() throws IOException {\r\n File tmpFolder = ctx.getDir(\"tmp\", Context.MODE_PRIVATE);\r\n\r\n File f = new File(tmpFolder, IPTABLES);\r\n f.setExecutable(true);\r\n f.deleteOnExit();\r\n\r\n InputStream is = ctx.getResources().openRawResource(R.raw.iptables);\r\n byte[] buff = new byte[is.available()];\r\n is.read(buff);\r\n is.close();\r\n\r\n FileOutputStream out = new FileOutputStream(f);\r\n out.write(buff);\r\n out.close();\r\n return f.getAbsolutePath();\r\n }",
"private static boolean loadFromZip(android.content.Context r8, java.io.File r9, java.io.File r10, java.lang.String r11) {\n /*\n r3 = 0;\n r0 = 1;\n r1 = 0;\n r4 = r9.listFiles();\t Catch:{ Exception -> 0x0013 }\n r5 = r4.length;\t Catch:{ Exception -> 0x0013 }\n r2 = r1;\n L_0x0009:\n if (r2 >= r5) goto L_0x0017;\n L_0x000b:\n r6 = r4[r2];\t Catch:{ Exception -> 0x0013 }\n r6.delete();\t Catch:{ Exception -> 0x0013 }\n r2 = r2 + 1;\n goto L_0x0009;\n L_0x0013:\n r2 = move-exception;\n org.telegram.messenger.FileLog.m13728e(r2);\n L_0x0017:\n r4 = new java.util.zip.ZipFile;\t Catch:{ Exception -> 0x0106, all -> 0x00ff }\n r2 = r8.getApplicationInfo();\t Catch:{ Exception -> 0x0106, all -> 0x00ff }\n r2 = r2.sourceDir;\t Catch:{ Exception -> 0x0106, all -> 0x00ff }\n r4.<init>(r2);\t Catch:{ Exception -> 0x0106, all -> 0x00ff }\n r2 = new java.lang.StringBuilder;\t Catch:{ Exception -> 0x0072, all -> 0x00da }\n r2.<init>();\t Catch:{ Exception -> 0x0072, all -> 0x00da }\n r5 = \"lib/\";\n r2 = r2.append(r5);\t Catch:{ Exception -> 0x0072, all -> 0x00da }\n r2 = r2.append(r11);\t Catch:{ Exception -> 0x0072, all -> 0x00da }\n r5 = \"/\";\n r2 = r2.append(r5);\t Catch:{ Exception -> 0x0072, all -> 0x00da }\n r5 = \"libtmessages.27.so\";\n r2 = r2.append(r5);\t Catch:{ Exception -> 0x0072, all -> 0x00da }\n r2 = r2.toString();\t Catch:{ Exception -> 0x0072, all -> 0x00da }\n r2 = r4.getEntry(r2);\t Catch:{ Exception -> 0x0072, all -> 0x00da }\n if (r2 != 0) goto L_0x0084;\n L_0x004a:\n r0 = new java.lang.Exception;\t Catch:{ Exception -> 0x0072, all -> 0x00da }\n r2 = new java.lang.StringBuilder;\t Catch:{ Exception -> 0x0072, all -> 0x00da }\n r2.<init>();\t Catch:{ Exception -> 0x0072, all -> 0x00da }\n r5 = \"Unable to find file in apk:lib/\";\n r2 = r2.append(r5);\t Catch:{ Exception -> 0x0072, all -> 0x00da }\n r2 = r2.append(r11);\t Catch:{ Exception -> 0x0072, all -> 0x00da }\n r5 = \"/\";\n r2 = r2.append(r5);\t Catch:{ Exception -> 0x0072, all -> 0x00da }\n r5 = \"tmessages.27\";\n r2 = r2.append(r5);\t Catch:{ Exception -> 0x0072, all -> 0x00da }\n r2 = r2.toString();\t Catch:{ Exception -> 0x0072, all -> 0x00da }\n r0.<init>(r2);\t Catch:{ Exception -> 0x0072, all -> 0x00da }\n throw r0;\t Catch:{ Exception -> 0x0072, all -> 0x00da }\n L_0x0072:\n r0 = move-exception;\n r2 = r3;\n r3 = r4;\n L_0x0075:\n org.telegram.messenger.FileLog.m13728e(r0);\t Catch:{ all -> 0x0102 }\n if (r2 == 0) goto L_0x007d;\n L_0x007a:\n r2.close();\t Catch:{ Exception -> 0x00eb }\n L_0x007d:\n if (r3 == 0) goto L_0x0082;\n L_0x007f:\n r3.close();\t Catch:{ Exception -> 0x00f0 }\n L_0x0082:\n r0 = r1;\n L_0x0083:\n return r0;\n L_0x0084:\n r3 = r4.getInputStream(r2);\t Catch:{ Exception -> 0x0072, all -> 0x00da }\n r2 = new java.io.FileOutputStream;\t Catch:{ Exception -> 0x009f, all -> 0x00da }\n r2.<init>(r10);\t Catch:{ Exception -> 0x009f, all -> 0x00da }\n r5 = 4096; // 0x1000 float:5.74E-42 double:2.0237E-320;\n r5 = new byte[r5];\t Catch:{ Exception -> 0x009f, all -> 0x00da }\n L_0x0091:\n r6 = r3.read(r5);\t Catch:{ Exception -> 0x009f, all -> 0x00da }\n if (r6 <= 0) goto L_0x00a3;\n L_0x0097:\n java.lang.Thread.yield();\t Catch:{ Exception -> 0x009f, all -> 0x00da }\n r7 = 0;\n r2.write(r5, r7, r6);\t Catch:{ Exception -> 0x009f, all -> 0x00da }\n goto L_0x0091;\n L_0x009f:\n r0 = move-exception;\n r2 = r3;\n r3 = r4;\n goto L_0x0075;\n L_0x00a3:\n r2.close();\t Catch:{ Exception -> 0x009f, all -> 0x00da }\n r2 = 1;\n r5 = 0;\n r10.setReadable(r2, r5);\t Catch:{ Exception -> 0x009f, all -> 0x00da }\n r2 = 1;\n r5 = 0;\n r10.setExecutable(r2, r5);\t Catch:{ Exception -> 0x009f, all -> 0x00da }\n r2 = 1;\n r10.setWritable(r2);\t Catch:{ Exception -> 0x009f, all -> 0x00da }\n r2 = r10.getAbsolutePath();\t Catch:{ Error -> 0x00d5 }\n java.lang.System.load(r2);\t Catch:{ Error -> 0x00d5 }\n r2 = net.hockeyapp.android.C2367a.f7955a;\t Catch:{ Error -> 0x00d5 }\n r5 = org.telegram.messenger.BuildVars.DEBUG_VERSION;\t Catch:{ Error -> 0x00d5 }\n init(r2, r5);\t Catch:{ Error -> 0x00d5 }\n r2 = 1;\n nativeLoaded = r2;\t Catch:{ Error -> 0x00d5 }\n L_0x00c5:\n if (r3 == 0) goto L_0x00ca;\n L_0x00c7:\n r3.close();\t Catch:{ Exception -> 0x00e6 }\n L_0x00ca:\n if (r4 == 0) goto L_0x0083;\n L_0x00cc:\n r4.close();\t Catch:{ Exception -> 0x00d0 }\n goto L_0x0083;\n L_0x00d0:\n r1 = move-exception;\n org.telegram.messenger.FileLog.m13728e(r1);\n goto L_0x0083;\n L_0x00d5:\n r2 = move-exception;\n org.telegram.messenger.FileLog.m13728e(r2);\t Catch:{ Exception -> 0x009f, all -> 0x00da }\n goto L_0x00c5;\n L_0x00da:\n r0 = move-exception;\n L_0x00db:\n if (r3 == 0) goto L_0x00e0;\n L_0x00dd:\n r3.close();\t Catch:{ Exception -> 0x00f5 }\n L_0x00e0:\n if (r4 == 0) goto L_0x00e5;\n L_0x00e2:\n r4.close();\t Catch:{ Exception -> 0x00fa }\n L_0x00e5:\n throw r0;\n L_0x00e6:\n r1 = move-exception;\n org.telegram.messenger.FileLog.m13728e(r1);\n goto L_0x00ca;\n L_0x00eb:\n r0 = move-exception;\n org.telegram.messenger.FileLog.m13728e(r0);\n goto L_0x007d;\n L_0x00f0:\n r0 = move-exception;\n org.telegram.messenger.FileLog.m13728e(r0);\n goto L_0x0082;\n L_0x00f5:\n r1 = move-exception;\n org.telegram.messenger.FileLog.m13728e(r1);\n goto L_0x00e0;\n L_0x00fa:\n r1 = move-exception;\n org.telegram.messenger.FileLog.m13728e(r1);\n goto L_0x00e5;\n L_0x00ff:\n r0 = move-exception;\n r4 = r3;\n goto L_0x00db;\n L_0x0102:\n r0 = move-exception;\n r4 = r3;\n r3 = r2;\n goto L_0x00db;\n L_0x0106:\n r0 = move-exception;\n r2 = r3;\n goto L_0x0075;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: org.telegram.messenger.NativeLoader.loadFromZip(android.content.Context, java.io.File, java.io.File, java.lang.String):boolean\");\n }",
"public static void main(String[] args) {\n\t\t\t\t\n\t\tMain t = new Main();\n\t\t\n\t\tSystem.out.println(\" ---------------------------------------------------------------- \");\n\t\tSystem.out.println(\" \");\n\t\tSystem.out.println(\" \tUniversidad Nacional del Centro de la Provincia de Buenos Aires \");\n\t\tSystem.out.println(\" \");\n\t\tSystem.out.println(\" \t\tCátedra : Diseño de Compiladores \");\n\t\tSystem.out.println(\" \t\tExtensión del compilador : incorporación del operador '++' a identificadores tipo long \");\n\t\tSystem.out.println(\" \");\n\t\tSystem.out.println(\" \tProf: Mg. Ing. Marcela Ridado \");\n\t\tSystem.out.println(\" \");\n\t\tSystem.out.println(\" \tSr: Marcelo Rodríguez -- mrodriguez@alumnos.unicen.edu.ar\");\n\t\tSystem.out.println(\" \");\n\t\tSystem.out.println(\" \");\n\t\tSystem.out.println(\" Uso : [1]path al programa [2] path al directorio del archivo assembler generado [3] directorio para guardar la salida \");\n\t\tSystem.out.println(\" \");\n\t\tSystem.out.println(\" \");\n\t\tSystem.out.println(\" ---------------------------------------------------------------- \");\n\t\t\n\t\tif (args.length!=3){\n\t\t\tSystem.out.println(\" Error - Faltan argumentos \");\n\t\t\tSystem.out.println(\" Uso : [1]path al programa [2] path al directorio de archivos assembler [3] directorio para guardar la salida \");\n\t\t\t//return;\n\t\t}\n\t\t\n\t\tString programa=args[0];\n\t\tString asmDir=args[1];\n\t\tString outputDir=args[2];\n\t\t\n\t\t\t\t\n\t\tFile asm = new File(asmDir);\n\t\t\n\t\t\n\t\tif (!asm.exists()){\n\t\t\tboolean result=false;\n\t\t\ttry{\n \t\t \tasm.mkdir();\n \t\tresult = true;\n \t\t\t} \n\t\t\t catch(SecurityException se){\n\t\t\t //handle it\n\t\t\t } \n\t\t\t if(result) { \n\t\t\t System.out.println(\"Directorio para archivos assembler creado.\"); \n\t\t\t }\n\t\t\t}\n\t\t\n\t\tFile output=new File(outputDir);\n\t\t\n\t\tif (!output.exists()){\n\t\t\tboolean result=false;\n\t\t\ttry{\n \t\t \toutput.mkdir();\n \t\tresult = true;\n \t\t\t} \n\t\t\t catch(SecurityException se){\n\t\t\t //handle it\n\t\t\t } \n\t\t\t if(result) { \n\t\t\t System.out.println(\"Directorio para archivos de salida creado\"); \n\t\t\t }\n\t\t\t}\n\t\t\n\t\t\n\t\tFile file = null;\n\t\t\n\t\t\n\t\tfile = new File(programa);\n\n\t\tif (!file.exists()){\n\t\t\tSystem.out.println(\" No hay programa para compilar .\");\n\t\t\treturn;\n\t\t}\n\t\t\n\n\t\t\n\t\tt.setUp(file,asmDir,outputDir);\n\t\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}",
"boolean hasApkDetail();",
"public void testAvailableZipcodesAreValid(int programid, String programName);",
"public abstract Object toDexFile();",
"public static void main(String[] args) {\r\n\t\tSystem.out.println(decodificadorDeNakamas(\"\"));\r\n\t\t}",
"public static void main(String[] args) {\n\t\tint a = 103217;\n\t\tSystem.out.println(AssortedMethods.toFullBinaryString(a));\n\t\tint b = 13;\n\t\tSystem.out.println(AssortedMethods.toFullBinaryString(b));\t\t\n\t\tint c = updateBits(a, b, 4, 12);\n\t\tSystem.out.println(AssortedMethods.toFullBinaryString(c));\n\t\t\t\n\t}",
"private static java.io.File c(java.lang.String r8, java.lang.String r9) {\n /*\n r0 = 0;\n r1 = 0;\n r2 = new java.io.File;\t Catch:{ Exception -> 0x00e8, all -> 0x00e4 }\n r2.<init>(r8);\t Catch:{ Exception -> 0x00e8, all -> 0x00e4 }\n r8 = r2.exists();\t Catch:{ Exception -> 0x00e1, all -> 0x00de }\n if (r8 != 0) goto L_0x001d;\n L_0x000d:\n r8 = \"DecryptUtils\";\n r9 = \"unZipSingleFile file don't exist\";\n r3 = new java.lang.Object[r0];\t Catch:{ Exception -> 0x00e1, all -> 0x00de }\n com.taobao.sophix.e.d.e(r8, r9, r3);\t Catch:{ Exception -> 0x00e1, all -> 0x00de }\n com.taobao.sophix.e.b.a(r1);\n r2.delete();\n return r1;\n L_0x001d:\n r8 = new java.lang.StringBuilder;\t Catch:{ Exception -> 0x00e1, all -> 0x00de }\n r8.<init>();\t Catch:{ Exception -> 0x00e1, all -> 0x00de }\n r8.append(r9);\t Catch:{ Exception -> 0x00e1, all -> 0x00de }\n r9 = java.io.File.separator;\t Catch:{ Exception -> 0x00e1, all -> 0x00de }\n r8.append(r9);\t Catch:{ Exception -> 0x00e1, all -> 0x00de }\n r9 = \"unzip\";\n r8.append(r9);\t Catch:{ Exception -> 0x00e1, all -> 0x00de }\n r8 = r8.toString();\t Catch:{ Exception -> 0x00e1, all -> 0x00de }\n r9 = new java.io.File;\t Catch:{ Exception -> 0x00e1, all -> 0x00de }\n r9.<init>(r8);\t Catch:{ Exception -> 0x00e1, all -> 0x00de }\n com.taobao.sophix.e.b.a(r9);\t Catch:{ Exception -> 0x00e1, all -> 0x00de }\n r3 = r9.exists();\t Catch:{ Exception -> 0x00e1, all -> 0x00de }\n if (r3 != 0) goto L_0x0044;\n L_0x0041:\n r9.mkdirs();\t Catch:{ Exception -> 0x00e1, all -> 0x00de }\n L_0x0044:\n r9 = new java.util.zip.ZipInputStream;\t Catch:{ Exception -> 0x00e1, all -> 0x00de }\n r3 = new java.io.FileInputStream;\t Catch:{ Exception -> 0x00e1, all -> 0x00de }\n r3.<init>(r2);\t Catch:{ Exception -> 0x00e1, all -> 0x00de }\n r9.<init>(r3);\t Catch:{ Exception -> 0x00e1, all -> 0x00de }\n L_0x004e:\n r3 = r9.getNextEntry();\t Catch:{ Exception -> 0x00dc }\n if (r3 == 0) goto L_0x00f4;\n L_0x0054:\n r4 = r3.getName();\t Catch:{ Exception -> 0x00dc }\n r3 = r3.isDirectory();\t Catch:{ Exception -> 0x00dc }\n if (r3 == 0) goto L_0x0085;\n L_0x005e:\n r3 = r4.length();\t Catch:{ Exception -> 0x00dc }\n r3 = r3 + -1;\n r3 = r4.substring(r0, r3);\t Catch:{ Exception -> 0x00dc }\n r4 = new java.io.File;\t Catch:{ Exception -> 0x00dc }\n r5 = new java.lang.StringBuilder;\t Catch:{ Exception -> 0x00dc }\n r5.<init>();\t Catch:{ Exception -> 0x00dc }\n r5.append(r8);\t Catch:{ Exception -> 0x00dc }\n r6 = java.io.File.separator;\t Catch:{ Exception -> 0x00dc }\n r5.append(r6);\t Catch:{ Exception -> 0x00dc }\n r5.append(r3);\t Catch:{ Exception -> 0x00dc }\n r3 = r5.toString();\t Catch:{ Exception -> 0x00dc }\n r4.<init>(r3);\t Catch:{ Exception -> 0x00dc }\n r4.mkdirs();\t Catch:{ Exception -> 0x00dc }\n goto L_0x004e;\n L_0x0085:\n r3 = new java.io.File;\t Catch:{ Exception -> 0x00dc }\n r5 = new java.lang.StringBuilder;\t Catch:{ Exception -> 0x00dc }\n r5.<init>();\t Catch:{ Exception -> 0x00dc }\n r5.append(r8);\t Catch:{ Exception -> 0x00dc }\n r6 = java.io.File.separator;\t Catch:{ Exception -> 0x00dc }\n r5.append(r6);\t Catch:{ Exception -> 0x00dc }\n r5.append(r4);\t Catch:{ Exception -> 0x00dc }\n r4 = r5.toString();\t Catch:{ Exception -> 0x00dc }\n r3.<init>(r4);\t Catch:{ Exception -> 0x00dc }\n r3.createNewFile();\t Catch:{ Exception -> 0x00dc }\n r4 = new java.io.FileOutputStream;\t Catch:{ Exception -> 0x00c7, all -> 0x00c4 }\n r4.<init>(r3);\t Catch:{ Exception -> 0x00c7, all -> 0x00c4 }\n r5 = 1024; // 0x400 float:1.435E-42 double:5.06E-321;\n r5 = new byte[r5];\t Catch:{ Exception -> 0x00c2 }\n L_0x00aa:\n r6 = r9.read(r5);\t Catch:{ Exception -> 0x00c2 }\n r7 = -1;\n if (r6 == r7) goto L_0x00b8;\n L_0x00b1:\n r4.write(r5, r0, r6);\t Catch:{ Exception -> 0x00c2 }\n r4.flush();\t Catch:{ Exception -> 0x00c2 }\n goto L_0x00aa;\n L_0x00b8:\n com.taobao.sophix.e.b.a(r4);\t Catch:{ Exception -> 0x00dc }\n com.taobao.sophix.e.b.a(r9);\n r2.delete();\n return r3;\n L_0x00c2:\n r3 = move-exception;\n goto L_0x00c9;\n L_0x00c4:\n r8 = move-exception;\n r4 = r1;\n goto L_0x00d8;\n L_0x00c7:\n r3 = move-exception;\n r4 = r1;\n L_0x00c9:\n r5 = \"DecryptUtils\";\n r6 = \"unZipSingleFile unZip hotfix patch file error\";\n r7 = new java.lang.Object[r0];\t Catch:{ all -> 0x00d7 }\n com.taobao.sophix.e.d.a(r5, r6, r3, r7);\t Catch:{ all -> 0x00d7 }\n com.taobao.sophix.e.b.a(r4);\t Catch:{ Exception -> 0x00dc }\n goto L_0x004e;\n L_0x00d7:\n r8 = move-exception;\n L_0x00d8:\n com.taobao.sophix.e.b.a(r4);\t Catch:{ Exception -> 0x00dc }\n throw r8;\t Catch:{ Exception -> 0x00dc }\n L_0x00dc:\n r8 = move-exception;\n goto L_0x00eb;\n L_0x00de:\n r8 = move-exception;\n r9 = r1;\n goto L_0x00fc;\n L_0x00e1:\n r8 = move-exception;\n r9 = r1;\n goto L_0x00eb;\n L_0x00e4:\n r8 = move-exception;\n r9 = r1;\n r2 = r9;\n goto L_0x00fc;\n L_0x00e8:\n r8 = move-exception;\n r9 = r1;\n r2 = r9;\n L_0x00eb:\n r3 = \"DecryptUtils\";\n r4 = \"unZipSingleFile unZip hotfix patch file error\";\n r0 = new java.lang.Object[r0];\t Catch:{ all -> 0x00fb }\n com.taobao.sophix.e.d.a(r3, r4, r8, r0);\t Catch:{ all -> 0x00fb }\n L_0x00f4:\n com.taobao.sophix.e.b.a(r9);\n r2.delete();\n return r1;\n L_0x00fb:\n r8 = move-exception;\n L_0x00fc:\n com.taobao.sophix.e.b.a(r9);\n r2.delete();\n throw r8;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.taobao.sophix.e.a.c(java.lang.String, java.lang.String):java.io.File\");\n }",
"public static void main(String[] args) {\n\t\tString path = \"data2.bin\";\n\t\tFile file = new File(path);\n\t\tif(!file.exists()) {\n\t\t\ttry {\n\t\t\t\tfile.createNewFile();\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t\n\t\tFileOutputStream fos = null;\n\t\tDataOutputStream dos = null;\n\t\t\n\t\ttry {\n\t\t\tfos = new FileOutputStream(file);\n\t\t\tdos = new DataOutputStream(fos);\n\t\t\t\n\t\t\tdos.write(97);\n\t\t\tdos.writeByte(128);\n\t\t\tdos.writeShort(128);\n\t\t\tdos.writeInt(65);\n\t\t\tdos.writeLong(97L);\n\t\t\tdos.writeFloat(3.14F);\n\t\t\tdos.writeDouble(3.14);\n\t\t\tdos.writeChar('A');\n\t\t\tdos.writeBoolean(true);\n\t\t\tdos.writeUTF(\"¹®ÀÚ¿\");\n\t\t\tdos.writeInt(99);\n\t\t\tdos.writeInt(100);\n\t\t\t\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif(dos != null) {\n\t\t\t\t\tdos.close();\n\t\t\t\t}\n\t\t\t\tif(fos != null) {\n\t\t\t\t\tfos.close();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t\n\t}",
"@Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n downLoadApk();\n\n\n //new DownLoadNewVer().execute();\n //finish();\n }",
"private int m128366a() {\n String c = C40173d.m128358c();\n if (!new File(c).exists()) {\n new File(c).mkdirs();\n }\n for (MediaModel mediaModel : this.f104446a) {\n String str = mediaModel.f88156b;\n C7573i.m23582a((Object) str, \"model.filePath\");\n if (C40173d.m128357b(str)) {\n Bitmap a = C40168a.f104413a.mo99928a(mediaModel.f88156b, 720, 1280);\n if (a != null) {\n StringBuilder sb = new StringBuilder();\n sb.append(c);\n sb.append(C40173d.m128354a(\".png\"));\n String sb2 = sb.toString();\n C42341f.m134636a(a, new File(sb2), 50, CompressFormat.PNG);\n C40168a.m128334a(a);\n mediaModel.f88156b = sb2;\n }\n }\n }\n return 0;\n }",
"@Test\n public void testitMNG3380()\n throws Exception\n {\n File testDir = ResourceExtractor.simpleExtractResources( getClass(), \"/mng-3380\" );\n\n Verifier verifier = newVerifier( testDir.getAbsolutePath() );\n verifier.setAutoclean( false );\n verifier.deleteDirectory( \"target\" );\n verifier.deleteArtifacts( \"org.apache.maven.its.mng3380\" );\n verifier.filterFile( \"settings-template.xml\", \"settings.xml\", \"UTF-8\" );\n verifier.addCliArgument( \"--settings\" );\n verifier.addCliArgument( \"settings.xml\" );\n verifier.addCliArgument( \"validate\" );\n verifier.execute();\n verifier.verifyErrorFreeLog();\n\n List<String> artifacts = verifier.loadLines( \"target/artifacts.txt\", \"UTF-8\" );\n assertEquals( 4, artifacts.size() );\n assertEquals( \"org.apache.maven.its.mng3380:direct:jar:1\", artifacts.get( 0 ) );\n assertEquals( \"org.apache.maven.its.mng3380.new:transitive:jar:2\", artifacts.get( 1 ) );\n assertEquals( \"org.apache.maven.its.mng3380.other:a:jar:1\", artifacts.get( 2 ) );\n assertEquals( \"org.apache.maven.its.mng3380.other:b:jar:1\", artifacts.get( 3 ) );\n\n List<String> paths = verifier.loadLines( \"target/test.txt\", \"UTF-8\" );\n assertEquals( 6, paths.size() );\n assertEquals( \"direct-1.jar\", paths.get( 2 ) );\n assertEquals( \"transitive-2.jar\", paths.get( 3 ) );\n assertEquals( \"a-1.jar\", paths.get( 4 ) );\n assertEquals( \"b-1.jar\", paths.get( 5 ) );\n }",
"public static void main(String[] args) {\n\n /* \n algorithms to choose:\n\n 0 - ASCON\n 1 - AESOTRS\n 2 - AESOTRP\n\n ------ not yet supported ------\n 3 - Acorn\n 4 - Keyak\n 5 - OCB\n 6 - Norx\n 7 - Deoxys\n 8 - Ketje\n 9 - AEZ\n 10 - MORUS\n */\n\n\n // enter input file path\n String path_in = args[0];\n\n // enter encrypted output file path\n String path_out = args[1];\n\n // enter decrypted output file path\n String path_out2 = args[2];\n\n // Algorithm number\n int alg = Integer.parseInt(args[3]);\n\n // enter key (in this case 16B)\n byte[] key = hexStringToByteArray(\"00112233445566778899aabbccddeeff\");\n\n // enter nonce (int his case 16B)\n byte[] nonce = hexStringToByteArray(\"00112233445566778899aabbccddeeff\");\n\n // call encryption function which will do the rest and output the file\n new JNI().dll_encrypt(path_in, path_out, nonce, key, alg); // invoke the native method\n\n new JNI().dll_decrypt(path_out, path_out2, nonce, key, alg);\n\n }",
"@Test(timeout = 4000)\n public void test08() throws Throwable {\n FileUtil fileUtil0 = new FileUtil();\n boolean boolean0 = fileUtil0.downloadOneASINFile(\"k[mvr{61b:NmP1*\", \"p,{uKz\", \"\", (String) null, \"1\");\n assertFalse(boolean0);\n }",
"public static void main(String[] args) throws IOException{\n\t\tSystem.exit((new BitCompresser()).run(args));\n\t}"
] | [
"0.61049956",
"0.55258864",
"0.55226487",
"0.5518227",
"0.55064356",
"0.5191028",
"0.51728797",
"0.5162174",
"0.5153288",
"0.50597507",
"0.5025963",
"0.49865812",
"0.4846518",
"0.48452362",
"0.48238978",
"0.48207343",
"0.4814702",
"0.4803497",
"0.47815087",
"0.4778978",
"0.4775016",
"0.4774871",
"0.4768505",
"0.4766352",
"0.47177464",
"0.4694754",
"0.46814567",
"0.46798727",
"0.46689343",
"0.45708516",
"0.45609733",
"0.45567617",
"0.45561612",
"0.4520596",
"0.45172155",
"0.44912624",
"0.44786957",
"0.44729283",
"0.44630307",
"0.44499937",
"0.44383305",
"0.44341567",
"0.44272685",
"0.44185054",
"0.44172418",
"0.44105846",
"0.43919423",
"0.43881863",
"0.43819988",
"0.4378779",
"0.4369036",
"0.4365332",
"0.43532342",
"0.434249",
"0.43409643",
"0.43394578",
"0.4333064",
"0.4326529",
"0.4325261",
"0.4316356",
"0.43146122",
"0.4305023",
"0.43030748",
"0.43020034",
"0.4299304",
"0.4290038",
"0.4280304",
"0.42693073",
"0.42692453",
"0.42624176",
"0.42541426",
"0.4251639",
"0.42470923",
"0.4244328",
"0.4240636",
"0.42281386",
"0.4226111",
"0.42247465",
"0.422379",
"0.42165393",
"0.4215683",
"0.4210336",
"0.42063385",
"0.42055702",
"0.41984513",
"0.41956905",
"0.4194053",
"0.41936213",
"0.4191166",
"0.41895497",
"0.4187838",
"0.41831788",
"0.4179389",
"0.4168444",
"0.41595563",
"0.41554883",
"0.4154832",
"0.4151103",
"0.41471463",
"0.41460636"
] | 0.600872 | 1 |
init 'labels' for example > a = 1 (true), b=0 (false) , c=1 (unknown) | public ArrayList<Clause> solve() {
for (Clause c : clauses) {
for (CLiteral l : c.getCLiterals()) {
if (labels.get(l.getName()) == null)
labels.put(l.getName(), -1);
}
}
init();
return (ArrayList<Clause>) conflicts;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setLabels(Object labels) {\r\n this.labels = labels;\r\n }",
"public LabelGenerator(ArrayList<String> labels ) {\n this.labels = labels;\n }",
"private void initializeLabels() {\n labelVertexA = new Label(\"Vertex A\");\n labelVertexB = new Label(\"Vertex B\");\n labelVertexA.setTextFill(Color.web(\"#ffffff\"));\n labelVertexB.setTextFill(Color.web(\"#ffffff\"));\n }",
"public AccumuloLabelIn(String... labels) {\n super(labels);\n }",
"public void setUniqueLabels(boolean unique_labels)\n {\n this.unique_labels = unique_labels;\n }",
"Nda<V> withLabels( Map<Object, List<Object>> labels );",
"boolean isSetLabel();",
"public static void main(String[] args){\n\t\t\n\t\tLabelSet cLabelSet=new LabelSet();\n\t\tLabelSet tLabelSet=new LabelSet();\n\t\t\n\t\tList<Label> cLabels=new ArrayList<Label>();\n\t\tList<Label> tLabels=new ArrayList<Label>();\n\t\t\n\t\tcLabels.add(cLabelSet.newLabel(\"1\"));tLabels.add(tLabelSet.newLabel(\"x\"));\n\t\tcLabels.add(cLabelSet.newLabel(\"1\"));tLabels.add(tLabelSet.newLabel(\"x\"));\n\t\tcLabels.add(cLabelSet.newLabel(\"1\"));tLabels.add(tLabelSet.newLabel(\"x\"));\n\t\tcLabels.add(cLabelSet.newLabel(\"1\"));tLabels.add(tLabelSet.newLabel(\"x\"));\n\t\tcLabels.add(cLabelSet.newLabel(\"1\"));tLabels.add(tLabelSet.newLabel(\"x\"));\n\t\tcLabels.add(cLabelSet.newLabel(\"1\"));tLabels.add(tLabelSet.newLabel(\"o\"));\n\t\t\n\t\tcLabels.add(cLabelSet.newLabel(\"2\"));tLabels.add(tLabelSet.newLabel(\"x\"));\n\t\tcLabels.add(cLabelSet.newLabel(\"2\"));tLabels.add(tLabelSet.newLabel(\"o\"));\n\t\tcLabels.add(cLabelSet.newLabel(\"2\"));tLabels.add(tLabelSet.newLabel(\"o\"));\n\t\tcLabels.add(cLabelSet.newLabel(\"2\"));tLabels.add(tLabelSet.newLabel(\"o\"));\n\t\tcLabels.add(cLabelSet.newLabel(\"2\"));tLabels.add(tLabelSet.newLabel(\"o\"));\n\t\tcLabels.add(cLabelSet.newLabel(\"2\"));tLabels.add(tLabelSet.newLabel(\"d\"));\n\t\t\n\t\tcLabels.add(cLabelSet.newLabel(\"3\"));tLabels.add(tLabelSet.newLabel(\"x\"));\n\t\tcLabels.add(cLabelSet.newLabel(\"3\"));tLabels.add(tLabelSet.newLabel(\"x\"));\n\t\tcLabels.add(cLabelSet.newLabel(\"3\"));tLabels.add(tLabelSet.newLabel(\"d\"));\n\t\tcLabels.add(cLabelSet.newLabel(\"3\"));tLabels.add(tLabelSet.newLabel(\"d\"));\n\t\tcLabels.add(cLabelSet.newLabel(\"3\"));tLabels.add(tLabelSet.newLabel(\"d\"));\n\t\t\n\t\tExternalCQM m=new RI();\n\t\t\n\t\tSystem.out.println(m.getClass().getSimpleName()+\": \"+FormatUtil.d4(m.measure(cLabels,tLabels)));\n\t\t\n\t}",
"private void _initLabels() \n {\n _lblName = _createNewLabel( \"Mother Teres@ Practice Management System\");\n _lblVersion = _createNewLabel(\"Version 1.0.1 (Beta)\");\n _lblAuthor = _createNewLabel( \"Company: Valkyrie Systems\" );\n _lblRealAuthor = _createNewLabel( \"Author: Hein Badenhorst\" );\n _lblDate = _createNewLabel( \"Build Date:\" );\n _lblRealDate = _createNewLabel( \"31 October 2010\");\n }",
"public boolean isSetLabels() {\n return this.labels != null;\n }",
"public BLabel()\n {\n this((String) null, WEST);\n }",
"private void labelData(LinkedList<Image> images, LinkedList<Integer> labels){\n\t\tif(images.size()!=labels.size()){\n\t\t\tthrow new IllegalArgumentException(\"Number of labels and images must be same!\");\n\t\t}\n\t\t\n\t\tfor (int i = 0; i < images.size(); i++) {\n\t\t\timages.get(i).setLabel(labels.get(i));\n\t\t}\n\t\t\n\t}",
"DatasetLabel getLabel();",
"public Token setLabels(Map<String,List<Label>> labels) {\n this.labels = labels;\n return this;\n }",
"boolean hasLabelDetectionConfig();",
"public void nodeLabels(boolean b) { node_labels_cb.setSelected(b); }",
"boolean hasLabel();",
"boolean hasLabel();",
"boolean hasLabel();",
"Label getLabel();",
"Label getLabel();",
"Label getLabel();",
"public LabelMaker(java.util.List<String> labels, BundlesCounterContext cc) {\n\t this.labels = labels; this.cc = cc; makers = new LM[labels.size()];\n\t for (int i=0;i<labels.size();i++) makers[i] = createLM(labels.get(i), labels.size() == 1);\n\t}",
"public StockDateTime setLabels(Boolean labels1) {\n if (jsBase == null) {\n this.labels = null;\n this.labels1 = null;\n \n this.labels1 = labels1;\n } else {\n this.labels1 = labels1;\n if (!isChain) {\n js.append(jsBase);\n isChain = true;\n }\n \n js.append(String.format(Locale.US, \".labels(%b)\", labels1));\n\n if (isRendered) {\n onChangeListener.onChange(String.format(Locale.US, jsBase + \".labels(%b);\", labels1));\n js.setLength(0);\n }\n }\n return this;\n }",
"private void addLabels()\n {\n add(my_score_label);\n add(my_level_label);\n add(my_lines_label);\n }",
"java.util.Map<java.lang.String, java.lang.String> getLabelsMap();",
"java.util.Map<java.lang.String, java.lang.String> getLabelsMap();",
"java.util.Map<java.lang.String, java.lang.String> getLabelsMap();",
"java.util.Map<java.lang.String, java.lang.String> getLabelsMap();",
"public abstract String[] getLabels();",
"public PajekNetReader(boolean unique_labels)\n {\n this(unique_labels, false);\n }",
"public void setLabel(Object v) \n {\n this.label = v;\n }",
"public static Labels build() {\n\t\treturn new Labels(new ArrayMixedObject());\n\t}",
"private void fillLabelsTabel() {\n }",
"private void setLabelsTODefaultValues(){\r\n\t\tlblTempitem1.setText(\"NONE\"); //first temp item\r\n\t\tlblTempitem_2_1.setText(\"\"); //2nd temp item\r\n\t\tlblTempitem_3_1.setText(\"\"); //3rd item in temperature list\r\n\t\tlblTempitem_4.setText(\"\"); //4th...\r\n\t\tlblTempitem_5.setText(\"\"); //5th item in temperature list.\r\n\t\tlblTempitem_6.setText(\"\");\r\n\t\tlblPackv1.setText(\"NONE\"); //first item in voltage pack list\r\n\t\tlblPackv2.setText(\"\"); //second item in voltage pack list\r\n\t\tlblPackv_3.setText(\"\"); //the thirdf\r\n\t\tlblPackv_4.setText(\"\"); //and fourth. Can add more as needed \r\n\t\tlblSpeed.setText(\"NONE\");; //the label showing speed (update this one!)\r\n\t\tlblLastDataReceived.setText(\"Last Received: NONE\"); //Time of last data received\r\n\t\tlblCarLoadedName.setText(\"No Car Connected\");; // the name of the currently loaded car. \r\n\t\tSoC.setText(\"N/A\"); //the default text for state of charge\r\n\t}",
"public int\ngetLabels() {\n\treturn labels;\n}",
"DancingLinksLabels(int row, int col, int number, boolean selected) {\n this.row = row;\n this.col = col;\n this.number = number;\n this.selected = selected;\n this.deleted = selected; // initially selected == deleted\n }",
"private void createLabels() {\n addLabels(\"Dog Name:\", 160);\n addLabels(\"Weight:\", 180);\n addLabels(\"Food:\", 200);\n }",
"@Basic\n Map<String, String> getLabelsMap();",
"void setLabel(Label label);",
"@FXML\n public void init_labels() {\n name_output.setText(\"el que digui domini\");\n\n String quatri;\n int q = 1; // pillar de domini\n if(q == 1) quatri = \"Q1\";\n else if (q == 2) quatri =\"Q2\";\n else quatri = \"Q1 & Q2\";\n quatri_output.setText(quatri);\n\n String nivell;\n int n = 1; // pillar de domini\n if(n == 1) nivell = \"Inicial\";\n else if (n == 2) nivell =\"Troncal\";\n else nivell = \"Especialitat\";\n nivell_output.setText(nivell);\n\n boolean tmp = false; // pillar de domini i pot desapareixer aquest boolean tmp\n if(tmp) teo_output.setText(\"Sí\");\n else teo_output.setText(\"No\");\n\n // suposo que domini em retorna un array de bools\n boolean tmp_array[] = {true, false, true, false, true, false};\n String lab = \"\";\n if (tmp_array[0]) lab += \"Projector\\n\";\n if (tmp_array[1]) lab += \"Ubuntu\\n\";\n if (tmp_array[2]) lab += \"Linux/Windows\\n\";\n if (tmp_array[3]) lab += \"Física\\n\";\n if (tmp_array[4]) lab += \"Embeded\\n\";\n if (tmp_array[5]) lab += \"Xarxes\\n\";\n // lab_output.setWrapText(true);\n lab_output.setText(lab);\n }",
"public Label() {\n }",
"private void setLabels()\r\n\t{\r\n\t\tbubbleL = new JLabel(\"Bubble Sort\");\r\n\t\tinsertionL = new JLabel(\"Insertion Sort\");\r\n\t\tmergeL = new JLabel(\"Merge Sort\");\r\n\t\tquickL = new JLabel(\"Quick Sort\");\r\n\t\tradixL = new JLabel(\"Radix Sort\");\r\n\t}",
"private static Double mklabel(Double label) {\n\t\tDouble _label;\n\t\tif (label == 0) {\n\t\t\t_label = -1.0;\n\t\t} else {\n\t\t\t_label = 1.0;\n\t\t}\n\t\treturn _label;\n\t}",
"public void setLabels(Label cuisineLabel, Label occasionLabel, Label priceRangeLabel) {\n assert(cuisineLabel != null);\n assert(occasionLabel != null);\n assert(priceRangeLabel != null);\n cuisine.ifPresentOrElse(content -> cuisineLabel.setText(content.value), () -> cuisineLabel.setVisible(false));\n occasion.ifPresentOrElse(content -> occasionLabel.setText(content.value), () ->\n occasionLabel.setVisible(false));\n priceRange.ifPresentOrElse(content -> priceRangeLabel.setText(content.value), () ->\n priceRangeLabel.setVisible(false));\n }",
"public List getLabels () {\n return labels;\n }",
"public BLabel(String text)\n {\n this(text, WEST);\n }",
"public void setLabeled(){\n\t\tthis._isLabeled = true;\n\t}",
"public LLabel() {\n this(\"\");\n }",
"public void linkLabels(boolean b) { link_labels_cb.setSelected(b); }",
"public void setLabel(String label) {\n this.label = label;\n }",
"void setlabel (String label){\r\n\t\tthis.label = label;\r\n\t}",
"public void setLabels() {\n setTimeLabel();\n setDayLabel();\n setDateLabel();\n //setImage();\n }",
"public SceneLabelObjectState(){\n\t\tsuper();\n\t\tsuper.setObjectsPrimaryType(SceneObjectType.Label);\n\n\t}",
"private DenseMatrix extractLabels(Instances instances){\n\n int numInstances = instances.numInstances();\n int numClasses = instances.numClasses();\n\n\n Attribute classAtt = instances.classAttribute();\n labels = new String[numClasses];\n\n\n if (m_typeOfELM == 1) {\n for (int i = 0; i < numClasses; i++) {\n\n labels[i] = classAtt.value(i);\n if (m_debug == 1){\n System.out.print(labels[i]+\", \");\n }\n }\n }\n\n\n if (m_typeOfELM == 0) numClasses = 1;\n\n\n\n DenseMatrix LabelsMatrix = new DenseMatrix(numClasses, numInstances);\n\n\n for (int i = 0; i < numInstances; i++) {\n\n if (m_typeOfELM == 1){\n for (int j = 0; j < numClasses; j++) { //labels: 0, 1, 2 ......\n\n String label = instances.instance(i).stringValue(classIndex);\n\n\n LabelsMatrix.set(j, i, label.equals(labels[j]) ? 1 : -1); // fill all non-label with -1\n }\n }else if (m_typeOfELM == 0){\n LabelsMatrix.set(0,i,instances.instance(i).value(classIndex));\n }\n\n }\n\n\n\n\n\n\n return LabelsMatrix;\n }",
"public BinID3(String[] label, boolean[][] input, String[] output,\r\n\t\t\tString[] classes) {\r\n\t\tthis.input = input;\r\n\t\tthis.output = output;\r\n\t\tthis.label = label;\r\n\t\tthis.classes = classes;\r\n\t}",
"void setLabel(String label);",
"String getLabel();",
"String getLabel();",
"public SimpleNodeLabel() {\n super();\n }",
"public void setUnlabeled(){\n\t\tthis._isLabeled = false;\n\t}",
"public LabelFactory() {\n this(0);\n }",
"public boolean labelOnOlemassa(String label);",
"public void dynamicLabels(boolean b) { dyn_label_cbmi.setSelected(b); }",
"@Override\n\tpublic void updateLabels() {\n\n\t}",
"public void setLabel(int label) {\n\t\tthis.label = label;\n\t}",
"public boolean dynamicLabels() { return dyn_label_cbmi.isSelected(); }",
"public void addTrainingData(String value,String label);",
"void setNilLabel();",
"@Override\n public void init(ArrayList<String> args) {\n label = args.get(0);\n }",
"@Override\n\tpublic void setLabel(String label) {\n\t\t\n\t}",
"public List<LabelModel> getCustomLabels();",
"public void setLabel( String label ) {\r\n lbl = label;\r\n }",
"public void setClassLabels(int[] c) {\n\t\t\tcls = c;\n\t\t}",
"public boolean linkLabels() { return link_labels_cb.isSelected(); }",
"@Ignore\r\n @Test\r\n public void testCreateEncodingsLabelBitString()\r\n {\r\n System.out.println(\"createEncodingsLabelBitString\");\r\n HuffmanEncoder huffman = new HuffmanEncoder(p, ensemble);\r\n HuffmanNode root = huffman.createTree();\r\n EncodingsLabelTextCreator enc = new EncodingsLabelTextCreator(root);\r\n String expResult = \"{ a: 01, b: 10, c: 11, d: 001, e: 000 }\"; \r\n String result = enc.getLabelText();\r\n System.out.println(result);\r\n assertEquals(expResult, result);\r\n }",
"public void setLabel(String label) {\r\n this.label = label;\r\n }",
"@Override\n\tpublic void initializeInternal(Matrix inputs, Matrix labels)\n\t{\t\t\n\t\tfeatureMins = new double[inputs.cols()];\n\t\tfeatureMaxes = new double[inputs.cols()];\n\t\tfor(int i = 0; i < inputs.cols(); i++)\n\t\t{\n\t\t\tif(inputs.getValueCount(i) == 0 && !ignoredInputAttributes.contains(i))\n\t\t\t{\n\t\t\t\t// Compute the min and max\n\t\t\t\tfeatureMins[i] = inputs.findMin(i);\n\t\t\t\tfeatureMaxes[i] = inputs.findMax(i);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// Don't do nominal attributes and ignored columns.\n\t\t\t\tfeatureMins[i] = Vector.getUnknownValue();\n\t\t\t\tfeatureMaxes[i] = Vector.getUnknownValue();\n\t\t\t}\n\t\t}\n\t\t\n\t\tlabelMins = new double[labels.cols()];\n\t\tlabelMaxes = new double[labels.cols()];\n\t\tfor(int i = 0; i < labels.cols(); i++)\n\t\t{\n\t\t\tif(labels.getValueCount(i) == 0)\n\t\t\t{\n\t\t\t\t// Compute the min and max\n\t\t\t\tlabelMins[i] = labels.findMin(i);\n\t\t\t\tlabelMaxes[i] = labels.findMax(i);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// Don't do nominal attributes\n\t\t\t\tlabelMins[i] = Vector.getUnknownValue();\n\t\t\t\tlabelMaxes[i] = Vector.getUnknownValue();\n\t\t\t}\n\t\t}\n\n\t}",
"public Label() {\n\t\tthis(\"L\");\n\t}",
"public boolean nodeLabels() { return node_labels_cb.isSelected(); }",
"int getLabelsCount();",
"int getLabelsCount();",
"int getLabelsCount();",
"int getLabelsCount();",
"public boolean hasLabel()\n {\n return _label.isNotNull();\n }",
"public void setLabel(boolean isLabel) {\n\t\tthis.roomLabel = isLabel; \n\t}",
"@Override\n\tpublic HashMap<Integer, String> paramLabels() {\n\t\tHashMap<Integer, String> paramlabels = new HashMap<>();\n\t\tparamlabels.put(ALIVE_INDEX, \"Alive\");\n\t\treturn paramlabels;\n\t}",
"@Test\n public void testConstructTaintFromIntLabel() {\n int label = 5;\n Taint t = Taint.withLabel(label);\n assertTrue(t.containsOnlyLabels(new Object[]{label}));\n }",
"ArrayList<String> getLabels();",
"@Ignore\r\n @Test\r\n public void testCreateEncodingsLabelBitString2()\r\n {\r\n System.out.println(\"testCreateEncodingsLabelBitString2\");\r\n HuffmanEncoder huffman = new HuffmanEncoder(p2, ensemble2);\r\n HuffmanNode root = huffman.createTree();\r\n EncodingsLabelTextCreator enc = new EncodingsLabelTextCreator(root);\r\n String expResult = \"{ a: 01, b: 00, c: 0 }\"; \r\n String result = enc.getLabelText();\r\n System.out.println(result);\r\n assertEquals(expResult, result);\r\n }",
"public void label() {\n\n /**Iterate through all voxels in the specified volume - This should be done\n * once for making sure all voxels become labelled */\n for (int iX = bX; iX < tX; iX++) {\n for (int iY = bY; iY < tY; iY++) {\n for (int iZ = bZ; iZ < tZ; iZ++) {\n\n // Index3D tempIndex3D = new Index3D(iX, iY, iZ);\n\n /**If an unlabelled voxel is found add it onto the stack */\n if (imageMask.isTrue(iX, iY, iZ) && labelledVolume.intValue(iX, iY, iZ) < startingLabel) {\n voxelStack.push(new Index3D(iX, iY, iZ));\n\n /**Continue to recurse through sub-volumes for label voxels\n * until the queue is empty */\n while (!voxelStack.isEmpty()) {\n Index3D center = voxelStack.pop();\n labelRecursive(center, center);\n }\n\n //Increment the label for the next unlabelled component\n currentLabel = currentLabel + 10;\n diffLabels++;\n }\n }\n }\n }\n\n }",
"private void populateLabels() {\n CalculatorGraphConfig graphConfig = this.runner.getCalculatorGraphConfig();\n\n boolean foundTensorsToSegmentation = false;\n for (CalculatorGraphConfig.Node node : graphConfig.getNodeList()) {\n if (node.getName().contains(TENSORS_TO_SEGMENTATION_CALCULATOR_NAME)) {\n if (foundTensorsToSegmentation) {\n throw new MediaPipeException(\n MediaPipeException.StatusCode.INTERNAL.ordinal(),\n \"The graph has more than one mediapipe.tasks.TensorsToSegmentationCalculator.\");\n }\n foundTensorsToSegmentation = true;\n TensorsToSegmentationCalculatorOptionsProto.TensorsToSegmentationCalculatorOptions options =\n node.getOptions()\n .getExtension(\n TensorsToSegmentationCalculatorOptionsProto\n .TensorsToSegmentationCalculatorOptions.ext);\n for (int i = 0; i < options.getLabelItemsMap().size(); i++) {\n Long labelKey = Long.valueOf(i);\n if (!options.getLabelItemsMap().containsKey(labelKey)) {\n throw new MediaPipeException(\n MediaPipeException.StatusCode.INTERNAL.ordinal(),\n \"The lablemap have no expected key: \" + labelKey);\n }\n labels.add(options.getLabelItemsMap().get(labelKey).getName());\n }\n }\n }\n }",
"private void assignLabelTolist() {\n this.labelList.add(matchLabel1);\n this.labelList.add(matchLabel2);\n this.labelList.add(matchLabel3);\n this.labelList.add(matchLabel4);\n this.labelList.add(matchLabel5);\n }",
"public StockDateTime setLabels(String labels) {\n if (jsBase == null) {\n this.labels = null;\n this.labels1 = null;\n \n this.labels = labels;\n } else {\n this.labels = labels;\n if (!isChain) {\n js.append(jsBase);\n isChain = true;\n }\n \n js.append(String.format(Locale.US, \".labels(%s)\", wrapQuotes(labels)));\n\n if (isRendered) {\n onChangeListener.onChange(String.format(Locale.US, jsBase + \".labels(%s);\", wrapQuotes(labels)));\n js.setLength(0);\n }\n }\n return this;\n }",
"public Value label(String label) {\n this.label = label;\n return this;\n }",
"public MetadataResourceType setLabels(List<String> labels) {\n this.labels = labels;\n return this;\n }",
"public JLabel[] todasLabels(){\n JLabel[] todasLabels = new JLabel[]{lbData, lbNomeCliente, lbStatus};\n \n return todasLabels;\n }",
"public List<String> getLabels() {\n return labels;\n }",
"private void buildLabelLocs() {\n this.labelLocs = new HashMap<String, Integer>();\n for (int n = 0; n < this.code.size(); n++) {\n TACOp op = this.code.get(n);\n if (op.getType() == TACOpType.LABEL) {\n this.labelLocs.put(op.getLabel(), n);\n }\n }\n }",
"public static ArrayList<String> labels() {\n\n\t\tArrayList<String> labels = new ArrayList<String>();\t\n\n\t\t//\t\tlabels.add(\t\t\"_store\"\t\t\t\t\t);\n\t\t//\t\tlabels.add(\t\t\"_dept\"\t\t\t\t\t\t);\n\t\t//\t\tlabels.add(\t\t\"_date\"\t\t\t\t\t\t);\n\t\t//\t\tlabels.add(\t\t\"weekly_Sales\"\t\t\t\t);\n\t\tlabels.add(\t\t\"intcpt_or_wklySales\"\t\t);\n\t\tlabels.add(\t\t\"size\"\t\t\t\t\t\t);\n\t\tlabels.add(\t\t\"tempImprovement\"\t\t\t);\n\t\tlabels.add(\t\t\"hotness\"\t\t\t\t\t);\n\t\tlabels.add(\t\t\"coldness\"\t\t\t\t\t);\n\t\tlabels.add(\t\t\"fuel_Price\"\t\t\t\t);\n\t\tlabels.add(\t\t\"gasChange\"\t\t\t\t\t);\n//\t\tlabels.add(\t\t\"markDown1\"\t\t\t\t\t);\n//\t\tlabels.add(\t\t\"markDown2\"\t\t\t\t\t);\n//\t\tlabels.add(\t\t\"markDown3\"\t\t\t\t\t);\n//\t\tlabels.add(\t\t\"markDown4\"\t\t\t\t\t);\n//\t\tlabels.add(\t\t\"markDown5\"\t\t\t\t\t);\n//\t\tlabels.add(\t\t\"markDown1_isNA\"\t\t\t);\n//\t\tlabels.add(\t\t\"markDown2_isNA\"\t\t\t);\n//\t\tlabels.add(\t\t\"markDown3_isNA\"\t\t\t);\n//\t\tlabels.add(\t\t\"markDown4_isNA\"\t\t\t);\n//\t\tlabels.add(\t\t\"markDown5_isNA\"\t\t\t);\n\t\tlabels.add(\t\t\"cpi\"\t\t\t\t\t\t);\n\t\tlabels.add(\t\t\"cpiChange\"\t\t\t\t\t);\n\t\tlabels.add(\t\t\"unemployment\"\t\t\t\t);\n\t\tlabels.add(\t\t\"unemploymentChange\"\t\t);\n\t\tlabels.add(\t\t\"isSuperBowl\"\t\t\t\t);\n\t\tlabels.add(\t\t\"isTGiving\"\t\t\t\t\t);\n\t\tlabels.add(\t\t\"isLaborDay\"\t\t\t\t);\n\t\tlabels.add(\t\t\"isChristmas\"\t\t\t\t);\n\t\tlabels.add(\t\t\"isAfterHoliday\"\t\t\t);\n\t\tlabels.add(\t\t\"isBeforeHoliday\"\t\t\t);\n//\t\tlabels.add(\t\t\"type_A\"\t\t\t\t\t);\n//\t\tlabels.add(\t\t\"type_B\"\t\t\t\t\t);\n//\t\tlabels.add(\t\t\"type_C\"\t\t\t\t\t);\n\n\t\tfor (int i = 0; i < Data.numTypes; i++){\n\t\t\tlabels.add(\"isTypes_\" + Data.typesList.get(i));\n\t\t}\n\n\t\tfor (int i = 0; i < Data.numStores; i++){\n\t\t\tlabels.add(\"isStores_\" + Data.storesList.get(i));\n\t\t}\n//\t\tfor (int i = 0; i < Data.numDepts; i++){\n//\t\t\tlabels.add(\"isDepts_\" + Data.deptsList.get(i));\n//\t\t}\n\t\t\n\t\treturn labels;\n\n\t}",
"public Label newLabel(String labelStr, int options) {\r\n return newLabel(labelStr);\r\n }"
] | [
"0.7114962",
"0.6372056",
"0.6309966",
"0.6227725",
"0.6195768",
"0.6177334",
"0.6141627",
"0.61177784",
"0.6097143",
"0.6081511",
"0.6045263",
"0.60307336",
"0.60121953",
"0.5964022",
"0.593212",
"0.5911467",
"0.5898451",
"0.5898451",
"0.5898451",
"0.587143",
"0.587143",
"0.587143",
"0.58612394",
"0.5848999",
"0.58250797",
"0.5798108",
"0.5798108",
"0.5798108",
"0.5798108",
"0.5796614",
"0.57856333",
"0.5777058",
"0.5766346",
"0.5752903",
"0.5752553",
"0.5734062",
"0.5730141",
"0.5707914",
"0.5706985",
"0.5688667",
"0.56810105",
"0.5671282",
"0.5667391",
"0.566648",
"0.56639695",
"0.5658431",
"0.56464726",
"0.564473",
"0.56364197",
"0.5624015",
"0.56142217",
"0.55985093",
"0.5581629",
"0.55780125",
"0.5560644",
"0.5549622",
"0.554676",
"0.55436623",
"0.55436623",
"0.55353826",
"0.5521686",
"0.55149394",
"0.5507562",
"0.5500976",
"0.54981095",
"0.5490135",
"0.54701465",
"0.5467157",
"0.5465607",
"0.5465512",
"0.5464758",
"0.5463151",
"0.5438405",
"0.54272634",
"0.54235744",
"0.5421871",
"0.54034406",
"0.5400723",
"0.5393183",
"0.5392114",
"0.5386497",
"0.5386497",
"0.5386497",
"0.5386497",
"0.53660446",
"0.535604",
"0.53414583",
"0.5339474",
"0.53383255",
"0.5337401",
"0.53328025",
"0.5330772",
"0.5326926",
"0.5306039",
"0.5300085",
"0.52984166",
"0.5297858",
"0.52923524",
"0.5288086",
"0.52855176",
"0.5281649"
] | 0.0 | -1 |
init by creating empty list for conflicts. all clause contain only ONE unknown literal and the rest is FAlSE > fringe | public void init() {
for (Clause c : clauses) {
// if there is only one literal UNKNOWN and the other are NEGATIVE , add to fringe
if (c.getNumUnknownLiterals() == 1 && c.getNumOfLiterals() - c.getNumUnknownLiterals() == c.getNumOfNegative()) {
fringe.push(c);
}
}
computeLabel();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public ArrayList<Clause> solve() {\n for (Clause c : clauses) {\n for (CLiteral l : c.getCLiterals()) {\n if (labels.get(l.getName()) == null)\n labels.put(l.getName(), -1);\n }\n }\n init();\n\n return (ArrayList<Clause>) conflicts;\n }",
"private void updateFringeAndConflicts(List<String> changed) {\n //update fringe\n for (Clause ci : fringe) {\n for (CLiteral l : ci.getCLiterals()) {\n if (changed.contains(l.getName())) {\n ci.updateClause(labels);\n if ( ci.numOfNegative>0)\n // else if (c.numUnknownLiterals==0 && c.numOfNegative==c.numUnknownLiterals)\n if (!conflicts.contains(ci)) {\n if (conflicts.size()+1<=maxConflicts)\n conflicts.add(ci);\n\n break;\n }\n }\n }\n }\n\n // check rest of clauses which not in fringe or conflicts.\n for (Clause c : clauses) {\n if (!fringe.contains(c) && !conflicts.contains(c)) {\n for (CLiteral l : c.getCLiterals()) {\n if (changed.contains(l.getName())) {\n c.updateClause(labels);\n\n if (c.getNumUnknownLiterals() == 1 && c.getNumOfNegative() == c.getNumOfLiterals() - c.getNumUnknownLiterals()) {\n fringe.push(c);\n break;\n } else if (c.numOfNegative >0) {\n // else if (c.numUnknownLiterals==0 && c.numOfNegative==c.numUnknownLiterals)\n if (!conflicts.contains(c)) {\n if (conflicts.size()+1<=maxConflicts)\n conflicts.add(c);\n\n break;\n }\n }\n }\n }\n }\n }\n }",
"public Formula encodeConflictFree() {\n\t\tConjunction result = new Conjunction(\"conflictfree\");\n\t\tSet<Argument> args = this.instance.getAllArguments();\n\t\tfor(Argument a : args) {\n\t\t\tresult.addSubformula(this.clause(a));\n\t\t}\n\t\treturn result;\n\t}",
"protected void\ttryToFix() { Command.insertList(crAndBrace); }",
"protected static List<Conflict> getConflicts(){\n\t\treturn setOfConflicts;\n\t}",
"public Formula() {\t\n\t\t// TODO: implement this.\n\t\t// throw new RuntimeException(\"not yet implemented.\");\n\t\tclauses=new EmptyImList<Clause>();\n\t}",
"public ConflictDetector() {\n\t\tthis(getStrategy());\n\t}",
"protected static List<Conflict> solve() {\n\t\tcleaned = false;\n\t\tif (curMIDI != null)\n\t\t\ttry {\n\t\t\t\tSolver greedy = new OOGreedySolver(setOfStrings);\n\t\t\t\tcurMIDI = TrackSplitter.split(curMIDI, setOfStrings.length, bassTrack);\n\t\t\t\tcurMIDI = greedy.solve(curMIDI);\n\t\t\t\tsetOfConflicts = Cleaner.getConflicts(curMIDI, setOfStrings);\n\n\t\t\t\t//serve users valid choices\n\t\t\t\t//receive users choice\n\t\t\t\t//call appropriate method\n\n\t\t\t\t// give the simulation the new midi\n\t\t\t\tcurMIDI = Cleaner.prePos(curMIDI, prepositionDelay, setOfStrings, prepositionLength);\n\t\t\t\tif (sim!=null) sim.setSequence(curMIDI);\n\t\t\t\treturn setOfConflicts;\n\t\t\t} catch (InvalidMidiDataException e) {\n\t\t\t\te.printStackTrace();\n\t\t}\n\t\treturn null;\n\t}",
"public Conjunction encodeControlConflictFree() {\n\t\tConjunction result = new Conjunction(\"controlConflictfree\");\n\t\tSet<CArgument> controlArgs = CAF.getArgumentsByType(CArgument.Type.CONTROL);\n\t\tif(controlArgs.isEmpty()) {\n\t\t\treturn null;\n\t\t}\n\t\tint i = 0;\n\t\tfor(CArgument a : controlArgs) {\n\t\t\tSet<Argument> attackers = this.CAF.getControlAttackers(a, this.instance);\n\t\t\tFormula controlNotAccepted = this.controlNotAccepted(a, attackers);\n\t\t\tif(controlNotAccepted != null) {\n\t\t\t\tresult.addSubformula(controlNotAccepted);\n\t\t\t\ti++;\n\t\t\t}\n\t\t}\n\t\t// need to test if the conjunction is empty \n\t\t// in case all control arguments are not attacked we set no constraint\n\t\tif(i == 0) { return null;}\n\t\treturn result;\t\n\t}",
"public static int resolve(Clause clause, ClauseList clauseList, ImplicationDAG implicationDAG) {\n int size = clause.size();\n int size1 = size-1;\n int ts = clauseList.timestamp+1;\n clauseList.timestamp += size*size+1;\n ArrayList<CLiteral> toBeDeleted = new ArrayList<>();\n for(int i = 0; i < size; ++i) {\n int i1 = i;\n CLiteral cliteral = clause.cliterals.get(i);\n int timestamp = ts+i*size;\n // mark the potential resolution literals\n clauseList.streamContradicting(cliteral.literal,implicationDAG).\n forEach(cLit->{if(cLit.clause != clause && cLit.clause.size() >= clause.size()){cLit.timestamp = timestamp;}});\n for(int k = 0; k < size; ++k) {\n int k1 = k;\n Stream<CLiteral> stream = (i == k) ?\n clauseList.streamContradicting(cliteral.literal,implicationDAG) :\n clauseList.stream(clause.cliterals.get(k).literal,implicationDAG,true);\n if(k == 0) {stream.forEach(cLit -> {\n if(i1 != k1) {cLit.timestamp = 0;}\n if(cLit.clause.size() >= size && cLit.timestamp != timestamp) {cLit.clause.timestamp = timestamp;}});\n continue;}\n if(k == size1) {\n stream.forEach(cLit ->{\n if(i1 != k1) {cLit.timestamp = 0;}\n Clause otherClause = cLit.clause;\n if(otherClause != clause && otherClause.timestamp == timestamp+k1-1) {\n for(CLiteral clit : otherClause.cliterals) {\n if(clit.timestamp == timestamp) {\n clit.timestamp = 0;\n toBeDeleted.add(clit);}}}});}\n else {stream.forEach(cLit ->{\n if(i1 != k1) {cLit.timestamp = 0;}\n Clause otherClause = cLit.clause;\n if(otherClause.timestamp == timestamp+k1-1) {otherClause.timestamp = timestamp+k1;}});}}}\n for(CLiteral clit : toBeDeleted) {\n clauseList.removeLiteral(clit);}\n return toBeDeleted.size();}",
"public CNF(int numOfClauses, List<Set<Integer>> li){\n this.li = li;\n this.num = numOfClauses;\n }",
"private Frame initFrameExternalConstraintForDistGeq(DistGeq ectr) {\n int s1 = stp.getObject(ectr.o1).getShapeId().getValue();\n int s2 = stp.getObject(ectr.o2).getShapeId().getValue();\n // for (int i = 0; i < oIDs.length; i++)\n// {\n// Obj o = stp.getObject(oIDs[i]);\n// List<Region> regions = new ArrayList<Region>();\n// f.addForbidRegions(o.getObjectId(), regions);\n// }\n\n return new ForbiddenRegionFrame(ectr.q, ectr.D, s1, s2, ectr.o1, ectr.o2);\n }",
"private Frame InitFrameExternalConstraintForDistLeq(DistLeq ectr, int[] oIDs) {\n int s1 = stp.getObject(ectr.o1).getShapeId().getValue();\n int s2 = stp.getObject(ectr.o2).getShapeId().getValue();\n ForbiddenRegionFrame f = new ForbiddenRegionFrame(ectr.q, ectr.D, s1, s2, ectr.o1, ectr.o2);\n for (int i = 0; i < oIDs.length; i++) {\n GeostObject o = stp.getObject(oIDs[i]);\n List<Region> regions = new ArrayList<>();\n f.addForbidRegions(o.getObjectId(), regions);\n }\n\n return f;\n }",
"public CustomSolver() {\n this.possibleSol = this.generateTokenSet();\n this.curToken = 0;\n }",
"@SuppressWarnings(\"unchecked\")\r\n\t@Override\r\n\tpublic void init() {\n\t\tif (allcode.isEmpty()) {\r\n\t\t\tCode code = new Code();\r\n\r\n\t\t\tList list = this.dynamicsqldao.findbyWhere(code, Code.class);\r\n\t\t\tif (list.isEmpty() == false) {\r\n\t\t\t\tfor (int i = 0; i < list.size(); i++) {\r\n\t\t\t\t\tcode = new Code();\r\n\t\t\t\t\tcode = (Code) list.get(i);\r\n\t\t\t\t\tString ckey = code.getCode();\r\n\t\t\t\t\tList codelist = this.dynamicsqldao\r\n\t\t\t\t\t\t\t.findbyWhere( code, Code.class);\r\n\t\t\t\t\tallcode.put(ckey, codelist);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"protected void findDefult() {\r\n \tfor (DisplayResolveInfo info : mList) {\r\n \t\tinfo.bDefault = findDefault(info);\r\n \t} // End of for\r\n }",
"public void testConjunctionResolves() throws Exception\n {\n resolveAndAssertSolutions(\"[[g, h, (f :- g, h)], (?- f), [[]]]\");\n }",
"public void setCatchClauseList(List<CatchClause> list) {\n setChild(list, 1);\n }",
"public static Clause resolved(Clause clause, ClauseList clauseList, ImplicationDAG implicationDAG) {\n int size = clause.size();\n int length = clause.size();\n for(int i = 0; i < length; ++i) {\n int timestamp = ++clauseList.timestamp;\n clauseList.timestamp += size+1;\n for(int j = 0; j < length; ++j) {\n if(i == j) {continue;}\n clauseList.stream(clause.cliterals.get(j).literal,implicationDAG,false).\n forEach(clit -> {\n Clause otherClause = clit.clause;\n if(otherClause.size() > size) {return;}\n clit.timestamp = timestamp;\n if(otherClause.timestamp >= timestamp) {++otherClause.timestamp;}\n else {otherClause.timestamp = timestamp;}});}\n\n if(clauseList.streamContradicting(clause.cliterals.get(i).literal,implicationDAG).\n anyMatch(clit -> {\n clit.timestamp = timestamp;\n Clause otherClause = clit.clause;\n return otherClause.timestamp - timestamp >= otherClause.size()-2 && allMarked(otherClause,timestamp);})) {\n clause.removeLiteralAtPosition(i);\n --i;\n --length;}}\n return clause;}",
"public T caseVariableDeclarationWithInitListCS(VariableDeclarationWithInitListCS object) {\r\n return null;\r\n }",
"private ConflictCause addAndWatch(final NoGood noGood) {\n\t\tint posWeakUnassigned1 = -1;\n\t\tint posWeakUnassigned2 = -1;\n\t\tint posStrongUnassigned = -1;\n\t\tint posSatisfiedLiteral1 = -1;\n\t\tint posSatisfiedLiteral2 = -1;\n\t\tint posWeakHighestAssigned = -1;\n\t\tint weakDecisionLevelHighestAssigned = -1;\n\t\tint posStrongHighestAssigned = -1;\n\t\tint strongDecisionLevelHighestAssigned = -1;\n\t\tboolean containsPositiveAssignedMBT = false;\n\t\tAssignment.Entry satisfiedLiteralEntry = null;\n\n\t\t// Used to detect always-satisfied NoGoods of form { L, -L, ... }.\n\t\tMap<Integer, Boolean> occurringLiterals = new HashMap<>();\n\n\t\t// Iterate noGood and record satisfying/unassigned/etc positions.\n\t\tfor (int i = 0; i < noGood.size(); i++) {\n\t\t\tint literal = noGood.getLiteral(i);\n\t\t\tAssignment.Entry literalEntry = assignment.get(atomOf(literal));\n\n\t\t\t// Check if NoGood can never be violated (atom occurring positive and negative)\n\t\t\tif (occurringLiterals.containsKey(atomOf(literal))) {\n\t\t\t\tif (occurringLiterals.get(atomOf(literal)) != isNegated(literal)) {\n\t\t\t\t\t// NoGood cannot be violated or propagate, ignore it.\n\t\t\t\t\tLOGGER.debug(\"Added NoGood can never propagate or be violated, ignoring it. NoGood is: \" + noGood);\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\toccurringLiterals.put(atomOf(literal), isNegated(literal));\n\t\t\t}\n\n\t\t\t// Check weak unassigned.\n\t\t\tif (literalEntry == null) {\n\t\t\t\tif (posWeakUnassigned1 == -1) {\n\t\t\t\t\tposWeakUnassigned1 = i;\n\t\t\t\t} else {\n\t\t\t\t\tposWeakUnassigned2 = i;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Check strong unassigned for nogoods with head.\n\t\t\tif (noGood.hasHead() && i != HEAD && (literalEntry == null || literalEntry.getTruth().isMBT())) {\n\t\t\t\tposStrongUnassigned = i;\n\t\t\t}\n\t\t\t// Check satisfaction\n\t\t\tif (literalEntry != null && literalEntry.getTruth().toBoolean() != isPositive(literal)) {\n\t\t\t\tif (posSatisfiedLiteral1 == -1) {\n\t\t\t\t\tposSatisfiedLiteral1 = i;\n\t\t\t\t\tsatisfiedLiteralEntry = literalEntry;\n\t\t\t\t} else {\n\t\t\t\t\tposSatisfiedLiteral2 = i;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Check violation.\n\t\t\tif (literalEntry != null && literalEntry.getTruth().toBoolean() == isPositive(literal)) {\n\t\t\t\tif (literalEntry.getWeakDecisionLevel() > weakDecisionLevelHighestAssigned) {\n\t\t\t\t\tweakDecisionLevelHighestAssigned = literalEntry.getWeakDecisionLevel();\n\t\t\t\t\tposWeakHighestAssigned = i;\n\t\t\t\t}\n\t\t\t\tif (!literalEntry.getTruth().isMBT()\t// Ensure strong violation.\n\t\t\t\t\t&& literalEntry.getStrongDecisionLevel() > strongDecisionLevelHighestAssigned) {\n\t\t\t\t\tstrongDecisionLevelHighestAssigned = literalEntry.getStrongDecisionLevel();\n\t\t\t\t\tposStrongHighestAssigned = i;\n\t\t\t\t}\n\t\t\t\tif (literalEntry.getTruth().isMBT()) {\n\t\t\t\t\tcontainsPositiveAssignedMBT = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Set ordinary and alpha watches now.\n\t\t// Compute ordinary watches:\n\t\tfinal WatchedNoGood wng;\n\n\t\tif (posWeakUnassigned1 != -1 && posWeakUnassigned2 != -1) {\n\t\t\t// NoGood has two unassigned literals.\n\t\t\twng = new WatchedNoGood(noGood, posWeakUnassigned1, posWeakUnassigned2, -1);\n\t\t} else if (posSatisfiedLiteral1 != -1) {\n\t\t\t// NoGood is satisfied.\n\t\t\tint bestSecondPointer = posSatisfiedLiteral2 != -1 ? posSatisfiedLiteral2\n\t\t\t\t\t\t: posWeakUnassigned1 != -1 ? posWeakUnassigned1\n\t\t\t\t\t\t: posWeakHighestAssigned;\n\t\t\tif (posSatisfiedLiteral2 == -1 && posWeakUnassigned1 == -1) {\n\t\t\t\t// The NoGood has only one satisfied literal and is unit without it.\n\t\t\t\t// If it is unit on lower decision level than it is satisfied, it propagates the satisfying literal on lower decision level.\n\t\t\t\tif (satisfiedLiteralEntry.getWeakDecisionLevel() > weakDecisionLevelHighestAssigned) {\n\t\t\t\t\tConflictCause conflictCause = assignWeakComplement(posSatisfiedLiteral1, noGood, weakDecisionLevelHighestAssigned);\n\t\t\t\t\tif (conflictCause != null) {\n\t\t\t\t\t\treturn conflictCause;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\twng = new WatchedNoGood(noGood, posSatisfiedLiteral1, bestSecondPointer, -1);\n\t\t} else if (posWeakUnassigned1 != -1) {\n\t\t\t// NoGood is weakly unit; propagate.\n\t\t\tConflictCause conflictCause = assignWeakComplement(posWeakUnassigned1, noGood, weakDecisionLevelHighestAssigned);\n\t\t\tif (conflictCause != null) {\n\t\t\t\treturn conflictCause;\n\t\t\t}\n\t\t\twng = new WatchedNoGood(noGood, posWeakUnassigned1, posWeakHighestAssigned, -1);\n\t\t} else {\n\t\t\t// NoGood is violated.\n\t\t\treturn new ConflictCause(noGood);\n\t\t}\n\n\t\t// Compute alpha watch:\n\t\tif (noGood.hasHead()) {\n\t\t\tif (posStrongUnassigned != -1) {\n\t\t\t\t// Unassigned or MBT-assigned positive literal exists\n\t\t\t\twng.setAlphaPointer(posStrongUnassigned);\n\t\t\t} else if (posSatisfiedLiteral1 == -1 && !containsPositiveAssignedMBT) {\n\t\t\t\t// Strongly unit.\n\t\t\t\tConflictCause conflictCause = assignStrongComplement(noGood, strongDecisionLevelHighestAssigned);\n\t\t\t\tif (conflictCause != null) {\n\t\t\t\t\treturn conflictCause;\n\t\t\t\t}\n\t\t\t\twng.setAlphaPointer(posStrongHighestAssigned);\n\t\t\t} else if (posSatisfiedLiteral1 == HEAD && posSatisfiedLiteral2 == -1 && posStrongUnassigned == -1) {\n\t\t\t\t// The head is the only satisfying literal, hence it might propagate on lower decision level.\n\t\t\t\tif (satisfiedLiteralEntry.getStrongDecisionLevel() > strongDecisionLevelHighestAssigned) {\n\t\t\t\t\tConflictCause conflictCause = assignStrongComplement(noGood, strongDecisionLevelHighestAssigned);\n\t\t\t\t\tif (conflictCause != null) {\n\t\t\t\t\t\treturn conflictCause;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Set watches and register at watches structure:\n\t\tif (wng.getAlphaPointer() != -1) {\n\t\t\t// Only look at the alpha pointer if it points at a legal index. It might not\n\t\t\t// in case the noGood has no head or no positive literal.\n\t\t\taddAlphaWatch(wng);\n\t\t}\n\t\t// Set ordinary watches.\n\t\taddOrdinaryWatch(wng, 0);\n\t\taddOrdinaryWatch(wng, 1);\n\t\treturn null;\n\t}",
"public static ArrayList<CLiteral> resolve(CLiteral literal1, CLiteral literal2, ImplicationDAG implicationDAG) {\n ArrayList<CLiteral> resolvent = new ArrayList<>();\n ArrayList<CLiteral> literals1 = literal1.clause.cliterals;\n for(CLiteral lit1 : literals1) {\n if(lit1 != literal1) {resolvent.add(lit1.clone());}}\n for(CLiteral lit2 : literal2.clause.cliterals) {\n if(lit2 != literal2) {\n boolean ignore = false;\n for(CLiteral lit1 : literals1) {\n if(lit1 != literal1) {\n if(implicationDAG.implies(-lit1.literal, lit2.literal)) {return null;}\n if(implicationDAG.implies(lit2.literal,lit1.literal)) {ignore = true; break;}\n if(implicationDAG.implies(lit1.literal,lit2.literal)) {\n resolvent.removeIf(cliteral->cliteral.literal == lit1.literal);}}}\n if(!ignore) {resolvent.add(lit2.clone());}}}\n return resolvent;}",
"final public void OneMoreListMerge() throws ParseException {\n switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\n case ONE:\n One();\n switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\n case LIST:\n case S_MORE:\n case MERGE:\n switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\n case S_MORE:\n More();\n switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\n case LIST:\n case MERGE:\n switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\n case LIST:\n List();\n break;\n case MERGE:\n Merge();\n break;\n default:\n jj_la1[78] = jj_gen;\n jj_consume_token(-1);\n throw new ParseException();\n }\n break;\n default:\n jj_la1[79] = jj_gen;\n ;\n }\n break;\n case LIST:\n List();\n switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\n case S_MORE:\n More();\n break;\n default:\n jj_la1[80] = jj_gen;\n ;\n }\n break;\n case MERGE:\n Merge();\n switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\n case S_MORE:\n More();\n break;\n default:\n jj_la1[81] = jj_gen;\n ;\n }\n break;\n default:\n jj_la1[82] = jj_gen;\n jj_consume_token(-1);\n throw new ParseException();\n }\n break;\n default:\n jj_la1[83] = jj_gen;\n ;\n }\n break;\n case S_MORE:\n More();\n switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\n case LIST:\n case ONE:\n case MERGE:\n switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\n case ONE:\n One();\n switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\n case LIST:\n case MERGE:\n switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\n case LIST:\n List();\n break;\n case MERGE:\n Merge();\n break;\n default:\n jj_la1[84] = jj_gen;\n jj_consume_token(-1);\n throw new ParseException();\n }\n break;\n default:\n jj_la1[85] = jj_gen;\n ;\n }\n break;\n case LIST:\n List();\n switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\n case ONE:\n One();\n break;\n default:\n jj_la1[86] = jj_gen;\n ;\n }\n break;\n case MERGE:\n Merge();\n switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\n case ONE:\n One();\n break;\n default:\n jj_la1[87] = jj_gen;\n ;\n }\n break;\n default:\n jj_la1[88] = jj_gen;\n jj_consume_token(-1);\n throw new ParseException();\n }\n break;\n default:\n jj_la1[89] = jj_gen;\n ;\n }\n break;\n default:\n jj_la1[96] = jj_gen;\n switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\n case LIST:\n case MERGE:\n switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\n case LIST:\n List();\n break;\n case MERGE:\n Merge();\n break;\n default:\n jj_la1[90] = jj_gen;\n jj_consume_token(-1);\n throw new ParseException();\n }\n switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\n case ONE:\n case S_MORE:\n switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\n case ONE:\n One();\n switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\n case S_MORE:\n More();\n break;\n default:\n jj_la1[91] = jj_gen;\n ;\n }\n break;\n case S_MORE:\n More();\n switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\n case ONE:\n One();\n break;\n default:\n jj_la1[92] = jj_gen;\n ;\n }\n break;\n default:\n jj_la1[93] = jj_gen;\n jj_consume_token(-1);\n throw new ParseException();\n }\n break;\n default:\n jj_la1[94] = jj_gen;\n ;\n }\n break;\n default:\n jj_la1[95] = jj_gen;\n ;\n }\n }\n }",
"private void initClauses() {\n if (!mIsInitialized) {\n if (ConnectionUtil.getDBProductID() == ConnectionUtil.DB_ORACLE ||\n ConnectionUtil.getDBProductID() == ConnectionUtil.DB_MYSQL) {\n mForUpdateClause = \" FOR UPDATE \";\n } else if (ConnectionUtil.getDBProductID() == ConnectionUtil.DB_SQLSERVER) {\n mWithClause = \" WITH (ROWLOCK, UPDLOCK) \";\n }\n mIsInitialized = true;\n }\n\n }",
"public void init() {\n l0 = new EmptyList();\n l1 = FListInteger.add(l0, new Integer(5));\n l2 = FListInteger.add(l1, new Integer(4));\n l3 = FListInteger.add(l2, new Integer(7));\n l4 = new EmptyList();\n l5 = FListInteger.add(l2, new Integer(7));\n }",
"private Frame InitFrameExternalConstraintForDistLinear(DistLinear ectr, int[] oIDs) {\n DistLinearFrame f = new DistLinearFrame(ectr.a, ectr.o1, ectr.b);\n for (int i = 0; i < oIDs.length; i++) {\n GeostObject o = stp.getObject(oIDs[i]);\n List<Region> regions = new ArrayList<>();\n f.addForbidRegions(o.getObjectId(), regions);\n }\n\n return f;\n }",
"private void createConstraintsForSingleton() {\n \t\tSet s = slice.entrySet();\n \t\tfor (Iterator iterator = s.iterator(); iterator.hasNext();) {\n \t\t\tMap.Entry entry = (Map.Entry) iterator.next();\n \t\t\tHashMap conflictingEntries = (HashMap) entry.getValue();\n \t\t\tif (conflictingEntries.size() < 2)\n \t\t\t\tcontinue;\n \n \t\t\tCollection conflictingVersions = conflictingEntries.values();\n \t\t\tString singletonRule = \"\"; //$NON-NLS-1$\n \t\t\tArrayList nonSingleton = new ArrayList();\n \t\t\tint countSingleton = 0;\n \t\t\tfor (Iterator conflictIterator = conflictingVersions.iterator(); conflictIterator.hasNext();) {\n \t\t\t\tIInstallableUnit conflictElt = (IInstallableUnit) conflictIterator.next();\n \t\t\t\tif (conflictElt.isSingleton()) {\n \t\t\t\t\tsingletonRule += \" -1 \" + getVariable(conflictElt); //$NON-NLS-1$\n \t\t\t\t\tcountSingleton++;\n \t\t\t\t} else {\n \t\t\t\t\tnonSingleton.add(conflictElt);\n \t\t\t\t}\n \t\t\t}\n \t\t\tif (countSingleton == 0)\n \t\t\t\tcontinue;\n \n \t\t\tfor (Iterator iterator2 = nonSingleton.iterator(); iterator2.hasNext();) {\n \t\t\t\tconstraints.add(singletonRule + \" -1 \" + getVariable((IInstallableUnit) iterator2.next()) + \" >= -1;\"); //$NON-NLS-1$ //$NON-NLS-2$\n \t\t\t}\n \t\t\tsingletonRule += \" >= -1;\"; //$NON-NLS-1$\n \t\t\tconstraints.add(singletonRule);\n \t\t}\n \t}",
"public static List<ExtendRule> removeRedundantExtendedRules_rangeBased(List<ExtendRule> rules) {\n LOGGER.info(\"STARTED removeRedundantExtendedRules - range based\");\n LOGGER.info(\"Rules on start:\" + rules.size());\n ExtendRule defRule = rules.get(rules.size()-1);\n Consequent defClass = defRule.getConsequent(); \n for (Iterator<ExtendRule> it = rules.iterator(); it.hasNext();) { \n ExtendRule PRCandidate = it.next();\n // PRCandidate = go through all rules with default class in the consequent\n if (!PRCandidate.getConsequent().toString().equals(defClass.toString()))\n {\n continue;\n }\n // skip default rule\n if (PRCandidate.equals(defRule))\n {\n continue;\n } \n ArrayList<RuleMultiItem> PR_items = PRCandidate.getAntecedent().getItems();\n //create hashmap for fast access\n HashMap<Attribute,RuleMultiItem> PR_itemsMap = new HashMap();\n for (RuleMultiItem rmi : PR_items)\n {\n PR_itemsMap.put(rmi.getAttribute(), rmi);\n }\n \n // check if there is no other rule classifying to different class that shares part of the region\n // matched by the antecedent of PRCandidate \n boolean clashingRuleFound=false;\n boolean positionBelowPRCand = false;\n for (Iterator<ExtendRule> innerIt = rules.iterator(); innerIt.hasNext();) {\n ExtendRule candidateClash = innerIt.next();\n // candidateClash is PRCandidate, which would always evaluate to overlap!\n\n if (candidateClash.equals(PRCandidate))\n {\n positionBelowPRCand=true;\n continue;\n }\n // candidateClash = go through all rules with OTHER than default class in consequent \n if (candidateClash.getConsequent().toString().equals(defClass.toString()))\n {\n continue;\n }\n if (!positionBelowPRCand) continue;\n \n // check if at leat one literal in PRCandidate has empty intersection with Clash on shared attribute\n \n //in case there is no shared attribute, the intersection is non empty\n ArrayList<RuleMultiItem> literalsInClashOnSharedAtt = new ArrayList();\n for (RuleMultiItem clash_rmi : candidateClash.getAntecedent().getItems())\n {\n if (PR_itemsMap.containsKey(clash_rmi.getAttribute()))\n {\n literalsInClashOnSharedAtt.add(clash_rmi);\n }\n } \n if (literalsInClashOnSharedAtt.isEmpty())\n {\n clashingRuleFound =true;\n break;\n }\n // if there is NO intersection on at leat one of the shared attributes => no CLASH\n // ELSE => CLASH\n boolean attLeastOneAttDisjunct=true;\n for (RuleMultiItem clash_rmi : literalsInClashOnSharedAtt)\n {\n //PRCandidate has a literal created over the same attribute\n RuleMultiItem machingPR_RMI = PR_itemsMap.get(clash_rmi.getAttribute());\n\n //do values in the candidate clash intersect with values in PRCandidate?\n \n for (AttributeValue v : machingPR_RMI.getAttributeValues())\n {\n if (clash_rmi.getAttributeValues().contains(v))\n {\n attLeastOneAttDisjunct=false;\n }\n }\n if (attLeastOneAttDisjunct) // if we have non-empty intersection on one att we do not have to test the other ones, rule matches different part of the data space\n {\n //go to next PRCandidate \n break;\n } \n } \n if (!attLeastOneAttDisjunct)\n {\n //go to next PRCandidate \n clashingRuleFound=true;\n break;\n } \n }\n if (clashingRuleFound == false)\n {\n //no other rule with different consequent covering at least one shared value was found\n //this rule can be removed\n LOGGER.fine(\"Removing rule:\" + PRCandidate.toString());\n it.remove();\n } \n }\n LOGGER.info(\"Rules on finish:\" + rules.size());\n LOGGER.info(\"FINISHED removeRedundantExtendedRules - range based\");\n return rules;\n }",
"GeneralClause createGeneralClause();",
"private Formula (Clause c, ImList<Clause> r) {\n\t\t//System.out.println(\"Test1\"+r.toString());\n\t\t//System.out.println(\"Test1\"+c);\n\t\tclauses=r.add(c);\n\t\t//System.out.println(\"Test2\"+clauses.toString());\n\t\tcheckRep();\n\t}",
"private void computeConflicts() {\n\t\tthis.conflictGraph = new HashMap<Class, List<Class>>();\n\n\t\tfor (Class c : this.core) {\n\t\t\tif (c.getSuperClasses().size() >= 2) {\n\n\t\t\t\tList<List<Class>> linExts = new ArrayList<List<Class>>();\n\t\t\t\tfor (int i = 0; i < c.getSuperClasses().size(); i++) {\n\t\t\t\t\tlinExts.add(this.linearExts.get(c.getSuperClasses().get(i)));\n\t\t\t\t\tlinExts.get(i).add(c.getSuperClasses().get(i));\n\t\t\t\t}\n\n\t\t\t\tList<HashSet<Class>> diffs = new ArrayList<HashSet<Class>>();\n\n\t\t\t\t// Compute lini - linj for all i != j\n\t\t\t\tfor (List<Class> linExt : linExts) {\n\t\t\t\t\tfor (List<Class> linExt2 : linExts) {\n\t\t\t\t\t\tif (linExt != linExt2) {\n\t\t\t\t\t\t\tHashSet<Class> diff = new HashSet<Class>();\n\t\t\t\t\t\t\tfor (Class p : linExt2) {\n\t\t\t\t\t\t\t\tif (!linExt.contains(p))\n\t\t\t\t\t\t\t\t\tdiff.add(p);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdiffs.add(diff);\n\n\t\t\t\t\t\t\tdiff = new HashSet<Class>();\n\t\t\t\t\t\t\tfor (Class p : linExt) {\n\t\t\t\t\t\t\t\tif (!linExt2.contains(p))\n\t\t\t\t\t\t\t\t\tdiff.add(p);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdiffs.add(diff);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Compute conflicts di * dj for all j != i\n\t\t\t\tfor (HashSet<Class> diff : diffs) {\n\t\t\t\t\tfor (HashSet<Class> diff2 : diffs) {\n\t\t\t\t\t\tif (diff != diff2) {\n\t\t\t\t\t\t\tfor (Class c1 : diff) {\n\t\t\t\t\t\t\t\tList<Class> conflicts = new ArrayList<Class>();\n\t\t\t\t\t\t\t\tif (this.conflictGraph.containsKey(c1))\n\t\t\t\t\t\t\t\t\tconflicts = this.conflictGraph.get(c1);\n\n\t\t\t\t\t\t\t\tfor (Class c2 : diff2) {\n\t\t\t\t\t\t\t\t\tconflicts.add(c2);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tthis.conflictGraph.put(c1, conflicts);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"Collection<String> getPossibleDefeatConditions();",
"private void addEmptyConstituentTable() {\n int noOfqueues = storageQueueList.size();\n Map<String, BitSet> constituentTable = new HashMap<>();\n\n BitSet nullBitSet = new BitSet(noOfqueues);\n BitSet otherBitSet = new BitSet(noOfqueues);\n\n if (noOfqueues > 0) {\n\n // Null constituent will always be true for empty constituents, hence need to flip\n nullBitSet.flip(0, noOfqueues - 1);\n\n for (int queueIndex = 0; queueIndex < noOfqueues; queueIndex++) {\n // For 'other', if subscribers last constituent is multi level wild card then matching\n String[] allConstituent = queueConstituents.get(queueIndex);\n String lastConstituent = allConstituent[allConstituent.length - 1];\n\n if (multiLevelWildCard.equals(lastConstituent)) {\n otherBitSet.set(queueIndex);\n } else {\n otherBitSet.set(queueIndex, false);\n }\n }\n }\n\n constituentTable.put(NULL_CONSTITUENT, nullBitSet);\n constituentTable.put(OTHER_CONSTITUENT, otherBitSet);\n\n constituentTables.add(constituentTable);\n }",
"public void conflict(Object arg0) {\n\n\t}",
"private static Triple<SetFormula, Literal, Set<AtomicFormula>> getEquisatisfiableCNFRec(Formula f, Set<AtomicFormula> occurences) {\n\t\tif (f instanceof AtomicFormula) {\n\t\t\tLiteral l = new Literal((AtomicFormula) f);\n\t\t\tSetFormula s = SetFormula.getEmptySetFormula(Type.CNF);\n\t\t\t// Just return essentially the inital formula\n\t\t\treturn new Triple<>(s,l, occurences);\n\t\t}\n\t\tif(f instanceof NOTFormula)\n\t\t{\n\t\t\tNOTFormula g = (NOTFormula)f;\n\t\t\tLiteral l = new Literal((AtomicFormula) g.getArgumentFormula(), false);\n\t\t\tSetFormula s = SetFormula.getEmptySetFormula(Type.CNF);\n\t\t\t// Just return essentially the inital formula\n\t\t\treturn new Triple<>(s,l, occurences);\n\t\t}\n\t\tif(f instanceof ORFormula)\n\t\t{\n\t\t\tORFormula g = (ORFormula)f;\n\t\t\tSetFormula setFormula = SetFormula.getEmptySetFormula(Type.CNF);\n\t\t\tHolder<SetFormula> setFormulaHolder = new Holder<SetFormula>(setFormula);\n\t\t\tSet<AtomicFormula> newOccurences = new HashSet<>(occurences);\n\t\t\tSet<Literal> leadingLiterals = new HashSet<>();\n\t\t\tg.getOrigList().forEach(e -> {\n\t\t\t\tTriple<SetFormula, Literal, Set<AtomicFormula>> triple = getEquisatisfiableCNFRec(e, newOccurences);\n\t\t\t\tnewOccurences.addAll(triple.getThird());\n\t\t\t\tleadingLiterals.add(triple.getSecond());\n\t\t\t\tsetFormulaHolder.set(setFormulaHolder.get().and(triple.getFirst()));\n\t\t\t});\n\t\t\tsetFormula = setFormulaHolder.get();\n\t\t\tLiteral leadingLiteral = new Literal(Formula.getNewAtomicFormula(newOccurences));\n\t\t\tnewOccurences.add(leadingLiteral.getFormula());\n\t\t\tSet<Literal> firstSet = new HashSet<>(leadingLiterals);\n\t\t\tfirstSet.add(leadingLiteral.negate());\n\t\t\tsetFormula = setFormula.and(new SetFormula(LogicHelper.createSet(firstSet), Type.CNF));\n\t\t\tHolder<SetFormula> setFormulaHolder2 = new Holder<SetFormula>(setFormula);\n\t\t\tleadingLiterals.forEach(l -> {\n\t\t\t\tsetFormulaHolder2.set(setFormulaHolder2.get().and(new SetFormula(LogicHelper.createSet(LogicHelper.createSet(leadingLiteral, l.negate())),Type.CNF)));\n\t\t\t});\n\t\t\tsetFormula = setFormulaHolder2.get();\n\t\t\treturn new Triple<>(setFormula, leadingLiteral, newOccurences);\n\t\t}\n\t\tif(f instanceof ANDFormula)\n\t\t{\n\t\t\tANDFormula g = (ANDFormula)f;\n\t\t\tSetFormula setFormula = SetFormula.getEmptySetFormula(Type.CNF);\n\t\t\tHolder<SetFormula> setFormulaHolder = new Holder<SetFormula>(setFormula);\n\t\t\tSet<AtomicFormula> newOccurences = new HashSet<>(occurences);\n\t\t\tSet<Literal> leadingLiterals = new HashSet<>();\n\t\t\tg.getOrigList().forEach(e -> {\n\t\t\t\tTriple<SetFormula, Literal, Set<AtomicFormula>> triple = getEquisatisfiableCNFRec(e, newOccurences);\n\t\t\t\tnewOccurences.addAll(triple.getThird());\n\t\t\t\tleadingLiterals.add(triple.getSecond());\n\t\t\t\tsetFormulaHolder.set(setFormulaHolder.get().and(triple.getFirst()));\n\t\t\t});\n\t\t\tsetFormula = setFormulaHolder.get();\n\t\t\tLiteral leadingLiteral = new Literal(Formula.getNewAtomicFormula(newOccurences));\n\t\t\tnewOccurences.add(leadingLiteral.getFormula());\n\t\t\tSet<Literal> firstSet = new HashSet<>(LogicHelper.convert(leadingLiterals, l -> l.negate()));\n\t\t\tfirstSet.add(leadingLiteral);\n\t\t\tsetFormula = setFormula.and(new SetFormula(LogicHelper.createSet(firstSet), Type.CNF));\n\t\t\tHolder<SetFormula> setFormulaHolder2 = new Holder<SetFormula>(setFormula);\n\t\t\tLiteral leadingLiteralNegation = leadingLiteral.negate();\n\t\t\tleadingLiterals.forEach(l -> {\n\t\t\t\tsetFormulaHolder2.set(setFormulaHolder2.get().and(new SetFormula(LogicHelper.createSet(LogicHelper.createSet(leadingLiteralNegation, l)),Type.CNF)));\n\t\t\t});\n\t\t\tsetFormula = setFormulaHolder2.get();\n\t\t\treturn new Triple<>(setFormula, leadingLiteral, newOccurences);\n\t\t}\n\t\tthrow new IllegalArgumentException(\"Formula type not supported\");\n\t}",
"public interface ConflictRegionStrategy extends AlgStrategy {}",
"public List<Rule> substituteAtom(int pos, List<Rule> defs, boolean minimize) {// throws UnsupportedDisjunctionException{\r\n\t\tList<Rule> res = new ArrayList<Rule>();\r\n\t\tRule common = this.deepCopy();\r\n\r\n\t\t//\t\tTemporary treatment for unfolding in negated clauses, until we extend\r\n\t\t//\t\trules with disjunction\r\n\t\t//\t\tDoesn't do the trick though - defs contains all rules, not just the ones with the \"right\" head ...\r\n\t\t//\t\tif(common.getBody().get(pos).isNeg()){\r\n\t\t//\t\tif(defs.size() > 1 || defs.get(0).getBody().size() > 1)\r\n\t\t//\t\tthrow new UnsupportedDisjunctionException(\"Unfolding UCQs in negated atoms requires disjunction\");\r\n\t\t//\t\telse{\r\n\t\t//\t\tScMappingAtom a = common.getBody().remove(pos);\r\n\t\t//\t\tRule def = defs.get(0);\r\n\t\t//\t\tMap<String, ScMappingAtomArgument> varmap = def.getHead().varHomomorphism(a);\r\n\r\n\t\t////\t\tnull means no homomorphism, e.g. because relation is different\r\n\t\t//\t\tif(varmap != null){\r\n\t\t//\t\tRule newDef = def.deepCopy();\r\n\t\t//\t\tnewDef.renameExistentialVars();\r\n\t\t//\t\tnewDef.substituteVars(varmap);\r\n\t\t//\t\tnewDef.getBody().get(0).negate();\r\n\t\t//\t\tcommon.getBody().addAll(newDef.getBody());\r\n\t\t//\t\tres.add(common);\r\n\t\t//\t\t}\r\n\t\t//\t\t}\r\n\t\t//\t\t}else{\r\n\t\tAtom a = common.getBody().remove(pos);\r\n\r\n\t\tfor(Rule def : defs){\r\n\t\t\t//\t\t\tMap<String, ScMappingAtomValue> varmap = a.varHomomorphism(def.getHead());\r\n\t\t\tMap<String, AtomArgument> varmap = def.getHead().varHomomorphism(a);\r\n\t\t\t//\t\t\tMap<String, AtomArgument> varmap = a.varHomomorphism(def.getHead());\r\n\r\n\t\t\t//\t\t\tnull means no homomorphism, e.g. because relation is different\r\n\t\t\tif(varmap != null){\r\n\t\t\t\tRule newRule = common.deepCopy();\r\n\t\t\t\tRule newDef = def.deepCopy();\r\n\t\t\t\tnewDef.renameExistentialVars();\r\n\t\t\t\tnewDef.substituteVars(varmap);\r\n\t\t\t\tnewRule.getBody().addAll(pos, newDef.getBody());\r\n\t\t\t\tif(minimize)\r\n\t\t\t\t\tnewRule.minimize();\r\n\t\t\t\tres.add(newRule);\r\n\t\t\t}else{\r\n\t\t\t\t//\t\t\t\tif(Config.getEdbbits() \r\n\t\t\t\t//\t\t\t\t){\r\n\t\t\t\tList<RuleEqualityAtom> hom = def.getHead().varHomomorphismEq(a);\r\n\t\t\t\tif(hom != null){\r\n\t\t\t\t\tRule newRule = common.deepCopy();\r\n\t\t\t\t\tRule newDef = def.deepCopy();\r\n\t\t\t\t\tnewDef.renameExistentialVars();\r\n\t\t\t\t\tnewRule.getBody().addAll(pos, newDef.getBody());\r\n\t\t\t\t\tfor(RuleEqualityAtom eq : hom){\r\n\t\t\t\t\t\tnewRule.addEqAtom(eq);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tnewRule.eliminateEqualities();\r\n\t\t\t\t\tif(minimize)\r\n\t\t\t\t\t\tnewRule.minimize();\r\n\t\t\t\t\tres.add(newRule);\r\n\t\t\t\t\t//\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t//\t\t}\r\n\t\treturn res;\r\n\r\n\t}",
"protected void initSpecSpecificConditions() {\r\n // THESE ARE ALL FOR MAF SPEC 1.0 ONLY\r\n\r\n //If variant_Type is \"ins\" Reference_Allele should always be \"-\",\r\n conditions.add(new ConditionalRequirement(FIELD_VARIANT_TYPE, getVariantInsSymbol(), FIELD_REFERENCE_ALLELE, Pattern.compile(\"[^\\\\-]\"), \"contain anything but '-' characters\", true));\r\n // and either of Tumor_Seq_Allele1 and Tumor_Seq_Allele2 should have \"-\".\r\n conditions.add(new ConditionalRequirement(ConditionalOperator.OR,\r\n new ConditionalRequirement(FIELD_VARIANT_TYPE, getVariantInsSymbol(), FIELD_TUMOR_SEQ_ALLELE1, Pattern.compile(\"-\"), \"contain at least one '-'\", false),\r\n new ConditionalRequirement(FIELD_VARIANT_TYPE, getVariantInsSymbol(), FIELD_TUMOR_SEQ_ALLELE2, Pattern.compile(\"-\"), \"contain at least one '-'\", false)));\r\n //If variant_Type is \"del\", then Reference_Allele can't contain \"-\",\r\n conditions.add(new ConditionalRequirement(FIELD_VARIANT_TYPE, getVariantTypeDelSymbol(), FIELD_REFERENCE_ALLELE, Pattern.compile(\"-\"), \"contain any '-' characters\", true));\r\n // and either Tumor_Seq_Allele1 or Tumor_Seq_Allele2 should contain \"-\".\r\n conditions.add(new ConditionalRequirement(ConditionalOperator.OR,\r\n new ConditionalRequirement(FIELD_VARIANT_TYPE, getVariantTypeDelSymbol(), FIELD_TUMOR_SEQ_ALLELE1, Pattern.compile(\"-\"), \"contain at least one '-'\", false),\r\n new ConditionalRequirement(FIELD_VARIANT_TYPE, getVariantTypeDelSymbol(), FIELD_TUMOR_SEQ_ALLELE2, Pattern.compile(\"-\"), \"contain at least one '-'\", false)));\r\n\r\n //If validation_status is \"wildtype\", then Tumor_Seq_Allele1=Tumor_Seq_Allele2\r\n //and Tumor_Seq_Allele1=Reference_Allele)\r\n conditions.add(new ConditionalRequirement(FIELD_VALIDATION_STATUS, VALIDATION_STATUS_WILDTYPE, FIELD_TUMOR_SEQ_ALLELE1, FIELD_TUMOR_SEQ_ALLELE2, false));\r\n conditions.add(new ConditionalRequirement(FIELD_VALIDATION_STATUS, VALIDATION_STATUS_WILDTYPE, FIELD_TUMOR_SEQ_ALLELE1, FIELD_REFERENCE_ALLELE, false));\r\n\r\n // if mutation_status is germline, tumor_seql_allele1 must be equal to match_norm_seq_allele1\r\n conditions.add(new ConditionalRequirement(FIELD_MUTATION_STATUS, MUTATION_STATUS_GERMLINE, FIELD_TUMOR_SEQ_ALLELE1,\r\n FIELD_MATCH_NORM_SEQ_ALLELE1, false));\r\n conditions.add(new ConditionalRequirement(FIELD_MUTATION_STATUS, MUTATION_STATUS_GERMLINE, FIELD_TUMOR_SEQ_ALLELE2,\r\n FIELD_MATCH_NORM_SEQ_ALLELE2, false));\r\n // if mutation_status is somatic and validation status is valid, then Match_Norm_Validation_Allele1 should equal Reference_Allele\r\n conditions.add(new ConditionalRequirement(new String[]{FIELD_MUTATION_STATUS, FIELD_VALIDATION_STATUS}, new String[]{MUTATION_STATUS_SOMATIC, VALIDATION_STATUS_VALID}, FIELD_MATCH_NORM_VALIDATION_ALLELE1,\r\n FIELD_REFERENCE_ALLELE, false));\r\n // if mutation_status is somatic and validation status is valid, then Match_Norm_Validation_Allele2 should equal Reference_Allele\r\n conditions.add(new ConditionalRequirement(new String[]{FIELD_MUTATION_STATUS, FIELD_VALIDATION_STATUS}, new String[]{MUTATION_STATUS_SOMATIC, VALIDATION_STATUS_VALID}, FIELD_MATCH_NORM_VALIDATION_ALLELE2,\r\n FIELD_REFERENCE_ALLELE, false));\r\n // if mutation_status is somatic and validation status is valid, then either Tumor_Seq_Allele1 or Tumor_Seq_Allele2 should NOT match Reference_Allele\r\n conditions.add(new ConditionalRequirement(ConditionalOperator.OR,\r\n new ConditionalRequirement(new String[]{FIELD_MUTATION_STATUS, FIELD_VALIDATION_STATUS}, new String[]{MUTATION_STATUS_SOMATIC, VALIDATION_STATUS_VALID}, FIELD_TUMOR_SEQ_ALLELE1, FIELD_REFERENCE_ALLELE, true), // not\r\n new ConditionalRequirement(new String[]{FIELD_MUTATION_STATUS, FIELD_VALIDATION_STATUS}, new String[]{MUTATION_STATUS_SOMATIC, VALIDATION_STATUS_VALID}, FIELD_TUMOR_SEQ_ALLELE2, FIELD_REFERENCE_ALLELE, true))); // not\r\n\r\n //If Mutation_Status == LOH AND Validation_Status==Unknown, then\r\n //Tumor_Seq_Allele1 == Tumor_Seq_Allele2 and\r\n //Match_Norm_Seq_Allele1 != Match_Norm_Seq_Allele2 and\r\n //Tumor_Seq_Allele1 = (Match_Norm_Seq_Allele1 or Match_Norm_Seq_Allele2)\r\n conditions.add(new ConditionalRequirement(new String[]{FIELD_MUTATION_STATUS, FIELD_VALIDATION_STATUS}, new String[]{MUTATION_STATUS_LOH, VALIDATION_STATUS_UNKNOWN}, FIELD_TUMOR_SEQ_ALLELE1, FIELD_TUMOR_SEQ_ALLELE2, false));\r\n conditions.add(new ConditionalRequirement(new String[]{FIELD_MUTATION_STATUS, FIELD_VALIDATION_STATUS}, new String[]{MUTATION_STATUS_LOH, VALIDATION_STATUS_UNKNOWN}, FIELD_MATCH_NORM_SEQ_ALLELE1, FIELD_MATCH_NORM_SEQ_ALLELE2, true)); // not\r\n conditions.add(new ConditionalRequirement(ConditionalOperator.OR,\r\n new ConditionalRequirement(new String[]{FIELD_MUTATION_STATUS, FIELD_VALIDATION_STATUS}, new String[]{MUTATION_STATUS_LOH, VALIDATION_STATUS_UNKNOWN}, FIELD_TUMOR_SEQ_ALLELE1, FIELD_MATCH_NORM_SEQ_ALLELE1, false),\r\n new ConditionalRequirement(new String[]{FIELD_MUTATION_STATUS, FIELD_VALIDATION_STATUS}, new String[]{MUTATION_STATUS_LOH, VALIDATION_STATUS_UNKNOWN}, FIELD_TUMOR_SEQ_ALLELE1, FIELD_MATCH_NORM_SEQ_ALLELE2, false)));\r\n //If Mutation_Status == LOH AND Validation_Status==Valid, then\r\n //Tumor_Validation_Allele1 == Tumor_Validation_Allele2 and\r\n //Match_Norm_Validation_Allele1 != Match_Norm_Validation_Allele2 and\r\n //Tumor_Validation_Allele1 == (Match_Norm_Validation_Allele1 or Match_Norm_Validation_Allele2).\r\n conditions.add(new ConditionalRequirement(new String[]{FIELD_MUTATION_STATUS, FIELD_VALIDATION_STATUS}, new String[]{MUTATION_STATUS_LOH, VALIDATION_STATUS_VALID}, FIELD_TUMOR_VALIDATION_ALLELE1, FIELD_TUMOR_VALIDATION_ALLELE2, false));\r\n conditions.add(new ConditionalRequirement(new String[]{FIELD_MUTATION_STATUS, FIELD_VALIDATION_STATUS}, new String[]{MUTATION_STATUS_LOH, VALIDATION_STATUS_VALID}, FIELD_MATCH_NORM_VALIDATION_ALLELE1, FIELD_MATCH_NORM_VALIDATION_ALLELE2, true)); // not\r\n conditions.add(new ConditionalRequirement(ConditionalOperator.OR,\r\n new ConditionalRequirement(new String[]{FIELD_MUTATION_STATUS, FIELD_VALIDATION_STATUS}, new String[]{MUTATION_STATUS_LOH, VALIDATION_STATUS_VALID}, FIELD_TUMOR_VALIDATION_ALLELE1, FIELD_MATCH_NORM_VALIDATION_ALLELE1, false),\r\n new ConditionalRequirement(new String[]{FIELD_MUTATION_STATUS, FIELD_VALIDATION_STATUS}, new String[]{MUTATION_STATUS_LOH, VALIDATION_STATUS_VALID}, FIELD_TUMOR_VALIDATION_ALLELE1, FIELD_MATCH_NORM_VALIDATION_ALLELE2, false)));\r\n // Tumor_Seq_Allele1 != Reference_Allele OR Tumor_Seq_Allele2 != Reference_Allele\r\n conditions.add(new ConditionalRequirement(ConditionalOperator.OR,\r\n new ConditionalRequirement(new String[]{}, new String[]{}, FIELD_TUMOR_SEQ_ALLELE1, FIELD_REFERENCE_ALLELE, true),\r\n new ConditionalRequirement(new String[]{}, new String[]{}, FIELD_TUMOR_SEQ_ALLELE2, FIELD_REFERENCE_ALLELE, true)));\r\n\r\n }",
"public BNFrule()\n {\n lhs = \"\";\n rhsSymbols = new ArrayList<String>();\n }",
"private void assignMissingResidueIds() {\n \t\tfor (Atom atom: atomVector) {\n \t\t\tif (atom.residue_id == Integer.MIN_VALUE) {\n \t\t\t\tatom.residue_id = atom.authorResidue_id;\n \t\t\t\tatom.nonpolymer = true;\n \t\t\t}\n \t\t}\n \t}",
"public void testNonPermanentVariableResolvedOkNoBinding() throws Exception\n {\n resolveAndAssertSolutions(\"[[g(x), h(x), (f :- g(X), h(Y))], (?- f), [[]]]\");\n }",
"public void initialiser() {\n double inf = Double.POSITIVE_INFINITY;\n create_add(\"bagel\", 20, 8);\n create_add(\"burger\", 10, 10);\n create_add(\"smoothie\", 30, 5);\n create_add(\"café\", (int)inf, 2);\n }",
"public Formula(Clause c) {\n\t\t// TODO: implement this.\n\t\t//throw new RuntimeException(\"not yet implemented.\");\n\t\tclauses=new NonEmptyImList<Clause>(c); \n\t}",
"public void markCsgListReplace() throws JNCException {\n markLeafReplace(\"csgList\");\n }",
"private void analyzeLiterals() {\n\t\t\n\t\tint lastLength = 0;\n\t\tfor(int i = 0; i < literalsList.size(); ++i) {\n\t\t\t// Update lengths of literals array with indexes\n\t\t\tif(lastLength != literalsList.get(i).length() - 5) {\n\t\t\t\tindexes.add(i);\n\t\t\t\tlengths.add(literalsList.get(i).length() - 5); // -5 for \"\"@en\n\t\t\t}\n\t\t\tlastLength = literalsList.get(i).length() - 5;\n\t\t\t\n\t\t}\n\t\t\n\t}",
"private void initializeFishTokens() {\n\t\tfishTokenOccurences.put(FishTokenType.ONE_FISH, 11);\n\t\tfishTokenOccurences.put(FishTokenType.TWO_FISH, 10);\n\t\tfishTokenOccurences.put(FishTokenType.THREE_FISH, 8);\n\t\tfishTokenOccurences.put(FishTokenType.OLD_BOOT, 1);\n\t}",
"private List<Geofence> getTriggeringGeofences(Intent intent) {\n\t\tLog.i(\"LOC NOT\", \"entering triggerin\");\n\t\tnotification();\n\t\treturn null;\n\t}",
"public FreeFormHint() {\n\t\tsuper();\n\t}",
"public String[] getCorrectionList(String misspell);",
"public RuleSet (RuleSet RS1, RuleSet RS2, SensorList sList, SensorMap sMap, RuleMap rMap) {\n \n // CREATING COMBINATION RULESET FROM RS1 & RS2\n \n this.references = new ArrayList();\n this.sList = sList;\n this.rulelist = RS1.rulelist;\n this.totalProb = 0.0;\n this.id = counter.incrementAndGet();\n this.precedences = new ArrayList ();\n Sensor precondition = RS1.getPrecursorWithID().merge(RS2.getPrecursorWithID());\n\n \n ArrayList <Integer> common_non_wildcarded_indexes = RS1.getSuccessor().detectCommonNonWilcardedIndexes(RS2.getSuccessor());\n\n Sensor root = new Sensor(RS1.getPrecursorWithID().tokenMap);\n \n int number = common_non_wildcarded_indexes.size();\n \n boolean insert;\n \n // THERE IS A CONFLICT ONLY IF SOME COMMON NON WILDCARDED INDEXES EXIST\n if (number >= 1) {\n SensorList conflicted_indexes_list = root.expand(common_non_wildcarded_indexes.get(0));\n \n if (number >= 2) { \n \n // Expanding the conflicted indexes in ArrayList\n for (int h = 2; h<=number; h++) {\n \n conflicted_indexes_list.expandListAt(common_non_wildcarded_indexes.get(h-1));\n }\n }\n \n for (int j = 0; j < conflicted_indexes_list.size(); j++) {\n \n // We only need to insert the Rules with postcondition corresponding to either RS1 or RS2\n //\n // So we check for post. matches in the first and then second RuleSet\n insert = false;\n\n // SEARCHING FOR MATCH IN FIRST RULESET\n for (int h1 = 0; h1 < RS1.size(); h1++) {\n ///\n if (RS1.getSuccessor(h1).sensorMatch(conflicted_indexes_list.getSensor(j+1))) {\n insert = true;\n \n break;\n }\n }\n \n // SEARCHING FOR MATCH IN SECOND RULESET\n if (!insert) {\n \n for (int h2 = 0; h2 < RS2.size(); h2++) {\n \n \n if (RS2.getSuccessor(h2).sensorMatch(conflicted_indexes_list.getSensor(j+1))) {\n insert = true;\n \n break;\n }\n \n\n }\n }\n \n // If the Rule postcondition was found in RS1 or RS2, we shall create it\n if (insert) {\n \n Rule rule = new Rule(precondition, conflicted_indexes_list.getSensor(j+1));\n \n rule.ruleset_id = this.id;\n \n int aa = sMap.getMatchingOccurencies(precondition);\n \n int tt = rMap.getMatchingOccurencies(rule);\n \n \n rule.prec_occurrencies = aa;\n rule.occurrencies = tt;\n \n this.rulelist.addRule(rule);\n this.add(rule);\n \n }\n \n }\n \n }\n \n \n // UPDATING RULESET PROBABILITY\n if (this.size() > 0) {\n for (int i = 0; i < this.size(); i++) {\n\n totalProb = totalProb + this.getRule(i).getProb();\n totalProb = Math.round(totalProb * 1000);\n totalProb = totalProb/1000;\n \n }\n }\n \n }",
"List<IRewriteRule> overapproxRewrite(int bound, Set<Integer> emergingSymbols);",
"private void init(String description, String[][] localizations)\n/* */ {\n/* 1480 */ initLocalizations(localizations);\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 1487 */ StringBuilder descBuf = stripWhitespace(description);\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 1494 */ this.lenientParseRules = extractSpecial(descBuf, \"%%lenient-parse:\");\n/* 1495 */ this.postProcessRules = extractSpecial(descBuf, \"%%post-process:\");\n/* */ \n/* */ \n/* */ \n/* */ \n/* 1500 */ int numRuleSets = 0;\n/* 1501 */ for (int p = descBuf.indexOf(\";%\"); p != -1; p = descBuf.indexOf(\";%\", p)) {\n/* 1502 */ numRuleSets++;\n/* 1503 */ p++;\n/* */ }\n/* 1505 */ numRuleSets++;\n/* */ \n/* */ \n/* 1508 */ this.ruleSets = new NFRuleSet[numRuleSets];\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 1517 */ String[] ruleSetDescriptions = new String[numRuleSets];\n/* */ \n/* 1519 */ int curRuleSet = 0;\n/* 1520 */ int start = 0;\n/* 1521 */ for (int p = descBuf.indexOf(\";%\"); p != -1; p = descBuf.indexOf(\";%\", start)) {\n/* 1522 */ ruleSetDescriptions[curRuleSet] = descBuf.substring(start, p + 1);\n/* 1523 */ this.ruleSets[curRuleSet] = new NFRuleSet(ruleSetDescriptions, curRuleSet);\n/* 1524 */ curRuleSet++;\n/* 1525 */ start = p + 1;\n/* */ }\n/* 1527 */ ruleSetDescriptions[curRuleSet] = descBuf.substring(start);\n/* 1528 */ this.ruleSets[curRuleSet] = new NFRuleSet(ruleSetDescriptions, curRuleSet);\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 1543 */ boolean defaultNameFound = false;\n/* 1544 */ int n = this.ruleSets.length;\n/* 1545 */ this.defaultRuleSet = this.ruleSets[(this.ruleSets.length - 1)];\n/* */ for (;;) {\n/* 1547 */ n--; if (n < 0) break;\n/* 1548 */ String currentName = this.ruleSets[n].getName();\n/* 1549 */ if ((currentName.equals(\"%spellout-numbering\")) || (currentName.equals(\"%digits-ordinal\")) || (currentName.equals(\"%duration\"))) {\n/* 1550 */ this.defaultRuleSet = this.ruleSets[n];\n/* 1551 */ defaultNameFound = true;\n/* 1552 */ break;\n/* */ }\n/* */ }\n/* */ \n/* 1556 */ if (!defaultNameFound) {\n/* 1557 */ for (int i = this.ruleSets.length - 1; i >= 0; i--) {\n/* 1558 */ if (!this.ruleSets[i].getName().startsWith(\"%%\")) {\n/* 1559 */ this.defaultRuleSet = this.ruleSets[i];\n/* 1560 */ break;\n/* */ }\n/* */ }\n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* 1568 */ for (int i = 0; i < this.ruleSets.length; i++) {\n/* 1569 */ this.ruleSets[i].parseRules(ruleSetDescriptions[i], this);\n/* 1570 */ ruleSetDescriptions[i] = null;\n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 1578 */ int publicRuleSetCount = 0;\n/* 1579 */ for (int i = 0; i < this.ruleSets.length; i++) {\n/* 1580 */ if (!this.ruleSets[i].getName().startsWith(\"%%\")) {\n/* 1581 */ publicRuleSetCount++;\n/* */ }\n/* */ }\n/* */ \n/* */ \n/* 1586 */ String[] publicRuleSetTemp = new String[publicRuleSetCount];\n/* 1587 */ publicRuleSetCount = 0;\n/* 1588 */ for (int i = this.ruleSets.length - 1; i >= 0; i--) {\n/* 1589 */ if (!this.ruleSets[i].getName().startsWith(\"%%\")) {\n/* 1590 */ publicRuleSetTemp[(publicRuleSetCount++)] = this.ruleSets[i].getName();\n/* */ }\n/* */ }\n/* */ \n/* 1594 */ if (this.publicRuleSetNames != null)\n/* */ {\n/* */ label585:\n/* 1597 */ for (int i = 0; i < this.publicRuleSetNames.length; i++) {\n/* 1598 */ String name = this.publicRuleSetNames[i];\n/* 1599 */ for (int j = 0; j < publicRuleSetTemp.length; j++) {\n/* 1600 */ if (name.equals(publicRuleSetTemp[j])) {\n/* */ break label585;\n/* */ }\n/* */ }\n/* 1604 */ throw new IllegalArgumentException(\"did not find public rule set: \" + name);\n/* */ }\n/* */ \n/* 1607 */ this.defaultRuleSet = findRuleSet(this.publicRuleSetNames[0]);\n/* */ } else {\n/* 1609 */ this.publicRuleSetNames = publicRuleSetTemp;\n/* */ }\n/* */ }",
"public static void main(String[] args) {\n\t\t\n//\t\t//PA4 a\n//\t\tArrayList<ArrayList<String>> rhs1 = new ArrayList<>();\n//\t\tArrayList<String> rhs11 = new ArrayList<>();\n//\t\trhs11.add(\"S\");rhs11.add(\"a\");\n//\t\tArrayList<String> rhs12 = new ArrayList<>();\n//\t\trhs12.add(\"b\");\t\t\n//\t\trhs1.add(rhs11);\n//\t\trhs1.add(rhs12);\n//\n//\t\tRule r1 = new Rule(\"S\", rhs1); // S -> Aa | b\n//\t\tArrayList<Rule> rules = new ArrayList<>();\n//\t\trules.add(r1);\n//\t\tGrammar g = new Grammar(rules);\n//\t\tg.eliminateEpsilonRule();\n//\t\tg.eliminateLR();\n//\t\tSystem.out.println(g);\n//\t\tSystem.out.println(\"----------------------\");\n\t\t\n//\t\t//PA4 b\n//\t\tArrayList<ArrayList<String>> rhs1 = new ArrayList<>();\n//\t\tArrayList<String> rhs11 = new ArrayList<>();\n//\t\trhs11.add(\"S\");rhs11.add(\"a\");rhs11.add(\"b\");\n//\t\tArrayList<String> rhs12 = new ArrayList<>();\n//\t\trhs12.add(\"c\");rhs12.add(\"d\");\t\t\n//\t\trhs1.add(rhs11);\n//\t\trhs1.add(rhs12);\n//\n//\t\tRule r1 = new Rule(\"S\", rhs1); // S -> Aa | b\n//\t\tArrayList<Rule> rules = new ArrayList<>();\n//\t\trules.add(r1);\n//\t\tGrammar g = new Grammar(rules);\n//\t\tg.eliminateEpsilonRule();\n//\t\tg.eliminateLR();\n//\t\tSystem.out.println(g);\n//\t\tSystem.out.println(\"----------------------\");\n\t\t\n//\t\t//PA4 c\n//\t\tArrayList<ArrayList<String>> rhs1 = new ArrayList<>();\n//\t\tArrayList<String> rhs11 = new ArrayList<>();\n//\t\trhs11.add(\"S\");rhs11.add(\"U\");rhs11.add(\"S\");\n//\t\tArrayList<String> rhs12 = new ArrayList<>();\n//\t\trhs12.add(\"S\");rhs12.add(\"S\");\t\t\n//\t\tArrayList<String> rhs13 = new ArrayList<>();\n//\t\trhs13.add(\"S\");rhs13.add(\"*\");\n//\t\tArrayList<String> rhs14 = new ArrayList<>();\n//\t\trhs14.add(\"(\");rhs14.add(\"S\");rhs14.add(\")\");\n//\t\tArrayList<String> rhs15 = new ArrayList<>();\n//\t\trhs15.add(\"a\");\n//\t\trhs1.add(rhs11);\n//\t\trhs1.add(rhs12);\n//\t\trhs1.add(rhs13);\n//\t\trhs1.add(rhs14);\n//\t\trhs1.add(rhs15);\n//\n//\n//\t\tRule r1 = new Rule(\"S\", rhs1); // S -> Aa | b\n//\t\tArrayList<Rule> rules = new ArrayList<>();\n//\t\trules.add(r1);\n//\t\tGrammar g = new Grammar(rules);\n//\t\tg.eliminateEpsilonRule();\n//\t\tg.eliminateLR();\n//\t\tSystem.out.println(g);\n//\t\tSystem.out.println(\"----------------------\");\n\t\t\n\t\t\n//\t\t//PA-3 d\n//\t\t\n//\t\tArrayList<ArrayList<String>> rhs1 = new ArrayList<>();\n//\t\tArrayList<String> rhs11 = new ArrayList<>();\n//\t\trhs11.add(\"rexpr\");rhs11.add(\"U\");rhs11.add(\"rterm\");\t\n//\t\tArrayList<String> rhs12 = new ArrayList<>();\n//\t\trhs12.add(\"rterm\");\n//\t\trhs1.add(rhs11);\n//\t\trhs1.add(rhs12);\n//\t\tRule r1 = new Rule(\"rexpr\", rhs1);\n//\n//\t\tArrayList<ArrayList<String>> rhs2 = new ArrayList<>();\n//\t\tArrayList<String> rhs21 = new ArrayList<>();\n//\t\trhs21.add(\"rterm\");rhs21.add(\"r factor\");\n//\t\tArrayList<String> rhs22 = new ArrayList<>();\n//\t\trhs22.add(\"r factor\");\n//\t\trhs2.add(rhs21);\n//\t\trhs2.add(rhs22);\n//\t\tRule r2 = new Rule(\"rterm\", rhs2);\n//\n//\t\tArrayList<ArrayList<String>> rhs3 = new ArrayList<>();\n//\t\tArrayList<String> rhs31 = new ArrayList<>();\n//\t\trhs31.add(\"r factor\");rhs31.add(\"*\");\n//\t\tArrayList<String> rhs32 = new ArrayList<>();\n//\t\trhs32.add(\"rprimary\");\n//\t\trhs3.add(rhs31);\n//\t\trhs3.add(rhs32);\n//\t\tRule r3 = new Rule(\"r factor\", rhs3);\n//\t\t\n//\t\tArrayList<ArrayList<String>> rhs4 = new ArrayList<>();\n//\t\tArrayList<String> rhs41 = new ArrayList<>();\n//\t\trhs41.add(\"a\");\n//\t\tArrayList<String> rhs42 = new ArrayList<>();\n//\t\trhs42.add(\"b\");\n//\t\trhs4.add(rhs41);\n//\t\trhs4.add(rhs42);\n//\t\tRule r4 = new Rule(\"rprimary\", rhs4);\n//\n//\t\tArrayList<Rule> rules = new ArrayList<>();\n//\t\trules.add(r1);\n//\t\trules.add(r2);\n//\t\trules.add(r3);\n//\t\trules.add(r4);\n//\t\tGrammar g = new Grammar(rules);\n//\t\tg.eliminateEpsilonRule();\n//\t\tg.eliminateLR();\n//\n//\t\tSystem.out.println(g);\n//\t\tSystem.out.println(\"----------------------\");\t\n\t\t\t\n//\t\t//PA-3 e\t\n//\t\t\n//\t\tArrayList<ArrayList<String>> rhs1 = new ArrayList<>();\n//\t\tArrayList<String> rhs11 = new ArrayList<>();\n//\t\trhs11.add(\"0\");\n//\t\tArrayList<String> rhs12 = new ArrayList<>();\n//\t\trhs12.add(\"T\");rhs12.add(\"1\");\t\t\n//\t\trhs1.add(rhs11);\n//\t\trhs1.add(rhs12);\n//\t\t\n//\t\tArrayList<ArrayList<String>> rhs2 = new ArrayList<>();\n//\t\tArrayList<String> rhs21 = new ArrayList<>();\n//\t\trhs21.add(\"1\");\n//\t\tArrayList<String> rhs22 = new ArrayList<>();\n//\t\trhs22.add(\"A\");rhs22.add(\"0\");\t\t\n//\t\trhs2.add(rhs21);\n//\t\trhs2.add(rhs22);\n//\n//\t\tRule r1 = new Rule(\"A\", rhs1);\n//\t\tRule r2 = new Rule(\"T\", rhs2);\n//\n//\t\tArrayList<Rule> rules = new ArrayList<>();\n//\t\trules.add(r1);\n//\t\trules.add(r2);\n//\t\tGrammar g = new Grammar(rules);\n//\t\tg.eliminateEpsilonRule();\n//\t\tg.eliminateLR();\n//\t\tSystem.out.println(g);\n//\t\tSystem.out.println(\"----------------------\");\n\n\n\t\t\n//\t\t//PA-3 f\n//\t\t\n//\t\tArrayList<ArrayList<String>> rhs1 = new ArrayList<>();\n//\t\tArrayList<String> rhs11 = new ArrayList<>();\n//\t\trhs11.add(\"B\");rhs11.add(\"C\");\t\n//\t\trhs1.add(rhs11);\n//\t\tRule r1 = new Rule(\"A\", rhs1);\n//\n//\t\tArrayList<ArrayList<String>> rhs2 = new ArrayList<>();\n//\t\tArrayList<String> rhs21 = new ArrayList<>();\n//\t\trhs21.add(\"B\");rhs21.add(\"b\");\n//\t\tArrayList<String> rhs22 = new ArrayList<>();\n//\t\trhs22.add(\"e\");\n//\t\trhs2.add(rhs21);\n//\t\trhs2.add(rhs22);\n//\t\tRule r2 = new Rule(\"B\", rhs2);\n//\n//\t\tArrayList<ArrayList<String>> rhs3 = new ArrayList<>();\n//\t\tArrayList<String> rhs31 = new ArrayList<>();\n//\t\trhs31.add(\"A\");rhs31.add(\"C\");\n//\t\tArrayList<String> rhs32 = new ArrayList<>();\n//\t\trhs32.add(\"a\");\n//\t\trhs3.add(rhs31);\n//\t\trhs3.add(rhs32);\n//\t\tRule r3 = new Rule(\"C\", rhs3);\n//\n//\t\tArrayList<Rule> rules = new ArrayList<>();\n//\t\trules.add(r1);\n//\t\trules.add(r2);\n//\t\trules.add(r3);\n//\t\tGrammar g = new Grammar(rules);\n//\t\tSystem.out.println(g);\n//\t\tg.eliminateEpsilonRule();\n//\t\tSystem.out.println(g);\n//\n//\t\tg.eliminateLR();\n//\n//\t\tSystem.out.println(g);\n//\t\tSystem.out.println(\"----------------------\");\n\n\t}",
"@Nonnull\n public List<Conflict> getAllConflictsInvolving(State state) {\n return conflicts.stream().filter(conflict -> conflict.getSideOf(state) != null).collect(Collectors.toList());\n }",
"private void generate(ArrayList<Integer> literals, int start){\n if(start > numVar){\n Clause clause = new Clause();\n for(Integer i: literals){\n clause.addLiteral(i);\n }\n clauses.add(clause);\n return;\n }\n literals.add(start);\n generate(literals, start + 1);\n literals.remove(literals.size() - 1);\n literals.add(-1 * start);\n generate(literals, start + 1);\n literals.remove(literals.size() - 1);\n }",
"public void setConflicts(int conflicts) {\r\n this.conflicts = conflicts;\r\n }",
"private ConflictResolution(int value, String name, String literal)\n {\n this.value = value;\n this.name = name;\n this.literal = literal;\n }",
"public BaseOptimizer() {\r\n Candidates = new ArrayList<>();\r\n }",
"@Override\n\tArrayList<Prop> MakeClause() {\n\t\treturn null;\n\t}",
"private void initLegits(Set<String> s) {\n\t\ts.addAll(letters);\n\t\ts.addAll(digits);\n }",
"MultiDef(String name, // the name of the definition\n Occurrence occ, // where it was defined\n ScopedDef parentScope) { // the overall symbol table\n super(name, occ, parentScope);\n \n // Create the list to store the definitions\n defs = new JavaVector();\n }",
"public final void constant_list() throws RecognitionException {\r\n try {\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:1063:15: ( derived_type initializer ( ',' derived_type initializer )* )\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:1063:17: derived_type initializer ( ',' derived_type initializer )*\r\n {\r\n pushFollow(FOLLOW_derived_type_in_constant_list8028);\r\n derived_type();\r\n\r\n state._fsp--;\r\n\r\n\r\n pushFollow(FOLLOW_initializer_in_constant_list8030);\r\n initializer();\r\n\r\n state._fsp--;\r\n\r\n\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:1063:42: ( ',' derived_type initializer )*\r\n loop267:\r\n do {\r\n int alt267=2;\r\n int LA267_0 = input.LA(1);\r\n\r\n if ( (LA267_0==44) ) {\r\n alt267=1;\r\n }\r\n\r\n\r\n switch (alt267) {\r\n \tcase 1 :\r\n \t // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:1063:43: ',' derived_type initializer\r\n \t {\r\n \t match(input,44,FOLLOW_44_in_constant_list8033); \r\n\r\n \t pushFollow(FOLLOW_derived_type_in_constant_list8035);\r\n \t derived_type();\r\n\r\n \t state._fsp--;\r\n\r\n\r\n \t pushFollow(FOLLOW_initializer_in_constant_list8037);\r\n \t initializer();\r\n\r\n \t state._fsp--;\r\n\r\n\r\n \t }\r\n \t break;\r\n\r\n \tdefault :\r\n \t break loop267;\r\n }\r\n } while (true);\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n\r\n finally {\r\n \t// do for sure before leaving\r\n }\r\n return ;\r\n }",
"private final List<State> SAT_AF(String expression) {\r\n List<State> x = new ArrayList<State>();\r\n for(State state:this._kripke.States)\r\n {\r\n \tx.add(state);\r\n }\r\n List<State> y = new ArrayList<State>();\r\n y = this.SAT(expression);\r\n while (!this.AreListStatesEqual(x, y)) {\r\n x = y;\r\n List<State> newY = new ArrayList<State>();\r\n List<State> preAStates = this.PreA(y);\r\n for(State state:y)\r\n {\r\n \tnewY.add(state);\r\n }\r\n for (State state : preAStates) {\r\n if (!newY.contains(state)) {\r\n newY.add(state);\r\n }\r\n \r\n }\r\n \r\n y = newY;\r\n }\r\n \r\n return y;\r\n }",
"static boolean InitialClause(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"InitialClause\")) return false;\n if (!nextTokenIs(b, \"\", K_FOR, K_LET)) return false;\n boolean r;\n Marker m = enter_section_(b);\n r = ForClause(b, l + 1);\n if (!r) r = WindowClause(b, l + 1);\n if (!r) r = LetClause(b, l + 1);\n exit_section_(b, m, null, r);\n return r;\n }",
"public ConstraintExt(ArrayList<String> var) {\n\t\tsuper(var);\n\t\tvalTuples = new HashSet<ArrayList<Object>>();\n\t}",
"public void advanceInconsistencyList() {\n\t\tinconsistenciesFound.remove(0);\r\n\t\tpossessiveTurn = false;\r\n\r\n\t\tcheckingEngine.replaceTextwithList();\r\n\t\ttypeHere.setText(checkingEngine.getText());\r\n\t\tgoThroughInconsistencies();\r\n\t}",
"public final void set$$dsl$guidsl$ltms(boolean negated) {\n\n if (negated)\n value = variable.F;\n else\n value = variable.T;\n\n // for each clause in clist that contains not this-term\n\n Iterator i = cnfClause.clist.iterator();\n while ( i.hasNext() ) {\n cnfClause c = ( cnfClause ) i.next();\n if ( c.hasNegTerm( !negated, ( variable )this ) ) {\n if ( c.isUnitOpen() != null )\n cnfClause.stack.push( c );\n else\n if ( c.isViolated() ) {\n grammar.dumpUserSelections();\n JOptionPane.showMessageDialog( null,\n \"model inconsistency detected -- see stderr for more information\",\n \"Error!\", JOptionPane.ERROR_MESSAGE );\n //System.exit(1);\n }\n\n }\n }\n }",
"List<Condition> conditionToFindConflict(final P entity);",
"private void forInit(Modifier x, Scope scope, Vector queue)\r\n {\r\n if (isLocalVarDecl(true))\r\n localVariableDeclaration(new Modifier(x), scope, queue);\r\n else\r\n {\r\n Operation ret = moreStatementExpression(statementExpression(scope, queue), scope, queue);\r\n\r\n while(ret != null)\r\n {\r\n if (ret.left != null)\r\n queue.add(ret.left);\r\n\r\n ret = ret.right;\r\n\r\n Operation ptr = new Operation();\r\n ptr.operator = Keyword.CLEARSY;\r\n queue.add(ptr);\r\n }\r\n }\r\n }",
"private void catchClause(String label, Scope scope, Vector queue)\r\n {\r\n matchKeyword(Keyword.CATCHSY);\r\n matchKeyword(Keyword.LPARSY);\r\n\r\n Parameter parameter = formalParameter();\r\n\r\n Operation root = new Operation();\r\n root.code = \"DUP \\\" \" + parameter.type.ident.string.substring(parameter.type.ident.string.lastIndexOf('.') + 1) + \" \\\" INSTANCEOF\\n IF\\n\";\r\n queue.add(root);\r\n\r\n matchKeyword(Keyword.RPARSY);\r\n\r\n VariableType a = new VariableType(parameter.type, 0);\r\n a.name = parameter.name;\r\n\r\n Vector v = new Vector();\r\n v.add(\"\" + Operation.newLabel());\r\n block(null, a, scope, v, Scope.CATCH, null, queue);\r\n\r\n root = new Operation();\r\n root.code = \"DUP \" + label + \" BRANCH\\nENDIF\\n\";\r\n queue.add(root);\r\n }",
"private void make_extended() {\n Iterator it = this.getIncreased_grammar().getGrammar().iterator();\n C_Production tmp_pr;\n C_Symbol searcher_symbol; \n \n while(it.hasNext()) {\n tmp_pr = (C_Production)it.next();\n searcher_symbol = new C_Symbol(String.valueOf((char)176));\n tmp_pr.getRight().add(0, searcher_symbol);\n }\n }",
"public static void initSignList()\n\t{\n\t\tlistOfSigns.add(SIGN_PLUS);\n\t\tlistOfSigns.add(SIGN_MINUS);\n\t}",
"private Clause make(Literal... e) {\n Clause c = new Clause();\n for (int i = 0; i < e.length; ++i) {\n c = c.add(e[i]);\n }\n return c;\n }",
"@Override\n public Void visitProgram(GraafvisParser.ProgramContext ctx) {\n for (GraafvisParser.ClauseContext clause : ctx.clause()) {\n visitClause(clause);\n }\n return null;\n }",
"private void addVertexNonEdgeConstraint(){\n for (int i=0; i < g.nonEdges.size(); i++){\n Edge edge = g.nonEdges.get(i);\n int vertex1 = edge.from;\n int vertex2 = edge.to;\n for (int pCount =0; pCount < positionCount-1; pCount++){\n ArrayList<Integer> values = new ArrayList<>();\n values.add((variables[vertex1][pCount] * -1));\n values.add((variables[vertex2][pCount+1] * -1));\n clauses.add(values);\n values = new ArrayList<>();\n values.add((variables[vertex1][pCount+1] * -1));\n values.add((variables[vertex2][pCount] * -1));\n clauses.add(values);\n }\n\n }\n }",
"public static ListInitExpression listInit(NewExpression newExpression, Iterable<ElementInit> elementInits) { throw Extensions.todo(); }",
"protected Set<Norm> regulateConflict(Conflict conflict, Goal goal) {\n\t\tSet<Norm> createdNorms = new HashSet<Norm>();\n\t\tList<Long> blamedAgents = new ArrayList<Long>();\n\t\tView sourceView = conflict.getConflictSource().getView(-1);\n\t\tList<EnvironmentAgentAction> agActions;\n\t\tEnvironmentAgentContext agContext;\n\t\tEnvironmentAgentAction agAction;\n\n\t\t/* Get a list of those agents that are considered as responsible \n\t\t * for the conflict (requires domain knowledge) */\n\t\tblamedAgents = this.cbrMachine.getConflictSource(conflict);\n\n\t\t/* Create a norm that regulates the behavior of each agent\n\t\t * blamed for the conflict in the context previous to the conflict */\n\t\tfor(Long blamedAgentId : blamedAgents) {\n\n\t\t\t/* Get agent's context and action */\n\t\t\tagContext = this.dmFunctions.agentContext(blamedAgentId, sourceView);\n\t\t\tagActions = this.dmFunctions.agentAction(blamedAgentId, \n\t\t\t\t\tconflict.getConflictSource());\n\t\t\tagAction = agActions.get(random.nextInt(agActions.size()));\n\n\t\t\t/* Check that the agent has a valid context */\n\t\t\tif(agContext == null) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t/* Check that no norms applied to the agent in the state\n\t\t\t * previous to the state containing the conflict */\n\t\t\tif(this.normsAppliedToAgentContext(agContext)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t/* Create a new norm prohibiting that action in that context */\n\t\t\tSetOfPredicatesWithTerms precondition = agContext.getDescription();\n\t\t\tif(!precondition.isEmpty()) {\n\t\t\t\tNorm norm = new Norm(precondition, NormModality.Prohibition, \n\t\t\t\t\t\tagAction, goal);\n\t\t\t\t\n\t\t\t\tcreatedNorms.add(norm);\n\t\t\t\t\n\t\t\t\t/* Update metrics */\n\t\t\t\tthis.nsMetrics.newNonRegulatedConflictsSolvedThisTick();\n\t\t\t}\n\t\t}\n\t\treturn createdNorms;\n\t}",
"public void fixInter () {\r\n\t\twhile(intervals.size() > 0) {\r\n\t\t\tintervals1.add(intervals.remove());\r\n\t\t}\r\n\t}",
"public final AstValidator.as_clause_return as_clause() throws RecognitionException {\n AstValidator.as_clause_return retval = new AstValidator.as_clause_return();\n retval.start = input.LT(1);\n\n\n CommonTree root_0 = null;\n\n CommonTree _first_0 = null;\n CommonTree _last = null;\n\n CommonTree AS80=null;\n AstValidator.field_def_list_return field_def_list81 =null;\n\n\n CommonTree AS80_tree=null;\n\n try {\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:233:10: ( ^( AS field_def_list ) )\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:233:12: ^( AS field_def_list )\n {\n root_0 = (CommonTree)adaptor.nil();\n\n\n _last = (CommonTree)input.LT(1);\n {\n CommonTree _save_last_1 = _last;\n CommonTree _first_1 = null;\n CommonTree root_1 = (CommonTree)adaptor.nil();\n _last = (CommonTree)input.LT(1);\n AS80=(CommonTree)match(input,AS,FOLLOW_AS_in_as_clause929); if (state.failed) return retval;\n if ( state.backtracking==0 ) {\n AS80_tree = (CommonTree)adaptor.dupNode(AS80);\n\n\n root_1 = (CommonTree)adaptor.becomeRoot(AS80_tree, root_1);\n }\n\n\n match(input, Token.DOWN, null); if (state.failed) return retval;\n _last = (CommonTree)input.LT(1);\n pushFollow(FOLLOW_field_def_list_in_as_clause931);\n field_def_list81=field_def_list();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) \n adaptor.addChild(root_1, field_def_list81.getTree());\n\n\n match(input, Token.UP, null); if (state.failed) return retval;\n adaptor.addChild(root_0, root_1);\n _last = _save_last_1;\n }\n\n\n if ( state.backtracking==0 ) {\n }\n }\n\n if ( state.backtracking==0 ) {\n\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\n }\n\n }\n\n catch(RecognitionException re) {\n throw re;\n }\n\n finally {\n \t// do for sure before leaving\n }\n return retval;\n }",
"public InbreedingCoeff(){\n super((Set<String>) null);\n }",
"public T caseExprList(ExprList object)\n {\n return null;\n }",
"public T caseExprList(ExprList object)\n {\n return null;\n }",
"public static ListInitExpression listInit(NewExpression newExpression, ElementInit[] elementInits) { throw Extensions.todo(); }",
"private static ListExpression makeAbstractSyntaxTree(final ParseTree<Grammar> parseTree, final DefinedMailingLists definedMailingLists) {\n switch(parseTree.name()){\n case ROOT:\n {\n final ParseTree<Grammar> child = parseTree.children().get(0);\n return makeAbstractSyntaxTree(child, definedMailingLists);\n }\n\n case UNION:\n {\n final List<ParseTree<Grammar>> children = parseTree.children();\n ListExpression expression = makeAbstractSyntaxTree(children.get(0),definedMailingLists);\n for (int i = 1; i < children.size(); ++i) {\n expression = ListExpression.makeUnion(expression, makeAbstractSyntaxTree(children.get(i),definedMailingLists));\n }\n return expression;\n }\n\n case INTERSECTION:\n {\n final List<ParseTree<Grammar>> children = parseTree.children();\n ListExpression expression = makeAbstractSyntaxTree(children.get(0),definedMailingLists);\n for (int i = 1; i < children.size(); ++i) {\n expression = ListExpression.makeIntersection(expression, makeAbstractSyntaxTree(children.get(i),definedMailingLists));\n }\n return expression;\n }\n\n case DIFFERENCE:\n {\n final List<ParseTree<Grammar>> children = parseTree.children();\n ListExpression expression = makeAbstractSyntaxTree(children.get(0),definedMailingLists);\n for (int i = 1; i < children.size(); ++i) {\n expression = ListExpression.makeDifference(expression, makeAbstractSyntaxTree(children.get(i),definedMailingLists));\n }\n return expression;\n }\n\n case SEQUENCE:\n {\n final List<ParseTree<Grammar>> children = parseTree.children();\n ListExpression expression = makeAbstractSyntaxTree(children.get(0),definedMailingLists);\n for (int i = 1; i < children.size(); ++i) {\n expression = ListExpression.makeSequence(expression, makeAbstractSyntaxTree(children.get(i),definedMailingLists));\n }\n return expression;\n }\n\n case MAILINGLIST: //defining a mailing list\n {\n final List<ParseTree<Grammar>> children = parseTree.children();\n final String name = children.get(0).text(); //name of mailing list\n ListExpression expression = makeAbstractSyntaxTree(children.get(1),definedMailingLists);\n ListExpression newMailingList = ListExpression.makeMailingList(name, expression);\n definedMailingLists.addMailingList(name, newMailingList); //now a defined list\n return newMailingList;\n }\n case EMAIL:\n {\n final String email = parseTree.text();\n if (email.equals(\"\")){\n return ListExpression.makeEmpty();\n }\n return ListExpression.makeEmail(email);\n }\n case NAME:\n {\n final String name = parseTree.text();\n if (definedMailingLists.getMailingLists().containsKey(name)){\n return definedMailingLists.getMailingLists().get(name);\n }\n throw new AssertionError(\"mailing list does not exist:\"+name);\n\n }\n case PAREN:\n { \n final ParseTree<Grammar> child = parseTree.children().get(0);\n switch(child.name()){\n case UNION: {\n final List<ParseTree<Grammar>> children = parseTree.children();\n ListExpression expression = makeAbstractSyntaxTree(children.get(0),definedMailingLists);\n for (int i = 1; i < children.size(); ++i) {\n expression = ListExpression.makeUnion(expression, makeAbstractSyntaxTree(children.get(i),definedMailingLists));\n }\n return expression;\n }\n case NAME: {\n final String name = parseTree.text();\n if (definedMailingLists.getMailingLists().containsKey(name)){\n return definedMailingLists.getMailingLists().get(name);\n }\n throw new AssertionError(\"mailing list does not exist\");\n }\n case EMAIL: {\n final String email = parseTree.text();\n if (email.equals(\"\")){\n return ListExpression.makeEmpty();\n }\n return ListExpression.makeEmail(email);\n }\n default:\n throw new AssertionError(\"should never get here!\"); \n }\n }\n default:\n throw new AssertionError(\"should never get here!\"); \n }\n }",
"public ConstraintDefinition() {\n\t\tthis(\"\");\n\t}",
"public void testVariableBindingFromQueryPropagatesAccrossConjunction() throws Exception\n {\n resolveAndAssertSolutions(\"[[g(x), h(x), (f(X) :- g(X), h(X))], (?- f(x)), [[]]]\");\n }",
"public static void resolveIdents() {\n\t\tint i, j;\n\t\ton_i : for (i = 0; i < count; i++) {\n\t\t\tfor (j = 0; j < count; j++) {\n\t\t\t\tif (i != j\n\t\t\t\t\t&& ((IdentifierResolver) bIdents.get(i)).shortNameEquals(\n\t\t\t\t\t\t((IdentifierResolver) bIdents.get(j))))\n\t\t\t\t\t// An identifier with the same short name has been found\n\t\t\t\t\t// go to the next one\n\t\t\t\t\tcontinue on_i;\n\t\t\t}\n\t\t\t// No identifier with the same name has been found, so allows to\n\t\t\t// set the short name.\n\t\t\t ((IdentifierResolver) bIdents.get(i)).setShortName();\n\t\t}\n\t}",
"protected void decompound(final Term term) {\n try {\n\n for (final SuggestWord[] decompounded : suggestWordbreaks(term)) {\n\n if (decompounded != null && decompounded.length > 0) {\n\n final BooleanQuery bq = new BooleanQuery(term.getParent(), Clause.Occur.SHOULD, true);\n\n for (final SuggestWord word : decompounded) {\n final DisjunctionMaxQuery dmq = new DisjunctionMaxQuery(bq, Clause.Occur.MUST, true);\n bq.addClause(dmq);\n dmq.addClause(new Term(dmq, term.getField(), word.string, true));\n }\n nodesToAdd.add(bq);\n\n }\n\n }\n\n } catch (final IOException e) {\n // IO is broken, this looks serious -> throw as RTE\n throw new RuntimeException(\"Error decompounding \" + term, e);\n }\n }",
"public static void bi_vl() {\n\t}",
"private void m4676a(List<C0906d> list, StringBuilder sb) {\n if (sb.length() != 0) {\n list.add(new C0906d(C0906d.EnumC0907a.LITERAL, sb.toString()));\n }\n }",
"@SuppressWarnings(\"serial\")\r\n\tprivate void fcbuild() {\n\t\tfor (int i = 0; i < keys.size(); i++) {\r\n\t\t\tString s = keys.get(i);\r\n\t\t\tfc.add(new ArrayList<String>() {\r\n\t\t\t\t{\r\n\t\t\t\t\tadd(sharedV.get(s).get(0));\r\n\t\t\t\t\tadd(s);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tfor (int i = 0; i < sharedV.size(); i++) {\r\n\t\t\tfor (int j = i + 1; j < sharedV.size(); j++) {\r\n\t\t\t\tif (sharedV.get(keys.get(i)).containsAll(sharedV.get(keys.get(j)))\r\n\t\t\t\t\t\t&& sharedV.get(keys.get(j)).containsAll(sharedV.get(keys.get(i)))) {\r\n\r\n\t\t\t\t\tString s = sharedV.get(keys.get(i)).get(0); // c1\r\n\t\t\t\t\tint ii = i;\r\n\t\t\t\t\tint jj = j;\r\n\t\t\t\t\tfc.add(new ArrayList<String>() {\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tadd(s);\r\n\t\t\t\t\t\t\tadd(keys.get(ii));\r\n\t\t\t\t\t\t\tadd(keys.get(jj));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\toptimizefc();\r\n\r\n\t}",
"public static ConflictResolution get(String literal)\n {\n for (int i = 0; i < VALUES_ARRAY.length; ++i)\n {\n ConflictResolution result = VALUES_ARRAY[i];\n if (result.toString().equals(literal))\n {\n return result;\n }\n }\n return null;\n }",
"public void conflict(Object arg0, boolean arg1) {\n\t}",
"public void init_lookup(){\n for(int i =0 ; i< MAX ; i++){\n lookup[i] =0;\n }\n }",
"public static List<String> literals() {\n return literals;\n }",
"@Override\n public String getCode() {\n\n InitListExpr syntaticForm = get(SYNTACTIC_FORM).orElse(null);\n if (syntaticForm != null) {\n if (!syntaticForm.getId().equals(getId())) {\n // System.out.println(\"SYNTATIC FORM: \" + syntaticForm);\n // System.out.println(\"SEMANTIC FORM: \" + this);\n return syntaticForm.getCode();\n } else {\n // System.out.println(\"SAME ID!\");\n // System.out.println(\"SYNTATIC FORM: \" + syntaticForm);\n // System.out.println(\"SEMANTIC FORM: \" + this);\n }\n }\n\n // System.out.println(\"INIT LIST EXPR TYPE:\" + getType());\n // if (getChild(0) instanceof InitListExpr) {\n // System.out.println(\"HAS INIT LIST EXPR CHILD WITH TYPE:\" + ((Typable) getChild(0)).getType());\n // }\n /*\n if (isOldFormat) {\n String list = getInitExprs().stream()\n .map(expr -> expr.getCode())\n .collect(Collectors.joining(\", \"));\n \n boolean hasSameInitsAsElements = hasSameInitsAsElements();\n \n // if (arrayFiller != null) {\n if (data.hasArrayFiller() && !hasSameInitsAsElements) {\n \n String exprClassName = data.getArrayFiller().getClass().getSimpleName();\n switch (exprClassName) {\n case \"ImplicitValueInitExpr\":\n list = list + \",\";\n break;\n default:\n SpecsLogs.msgWarn(\"Case not defined:\" + exprClassName);\n break;\n }\n }\n \n if (data.isExplicit()) {\n return \"{\" + list + \"}\";\n } else {\n return list;\n }\n }\n */\n String list = getChildren().stream()\n .map(expr -> expr.getCode())\n .collect(Collectors.joining(\", \"));\n\n // if (arrayFiller != null) {\n\n if (hasArrayFiller() && !get(IS_STRING_LITERAL_INIT)) {\n\n String exprClassName = get(ARRAY_FILLER).get().getClass().getSimpleName();\n switch (exprClassName) {\n case \"ImplicitValueInitExpr\":\n list = list + \",\";\n break;\n default:\n SpecsLogs.msgWarn(\"Case not defined:\" + exprClassName);\n break;\n }\n }\n\n if (get(IS_EXPLICIT)) {\n return \"{\" + list + \"}\";\n } else {\n return list;\n }\n\n /*\n if (data.hasArrayFiller() && !get(IS_STRING_LITERAL_INIT)) {\n \n String exprClassName = data.getArrayFiller().getClass().getSimpleName();\n switch (exprClassName) {\n case \"ImplicitValueInitExpr\":\n list = list + \",\";\n break;\n default:\n SpecsLogs.msgWarn(\"Case not defined:\" + exprClassName);\n break;\n }\n }\n \n if (data.isExplicit()) {\n return \"{\" + list + \"}\";\n } else {\n return list;\n }\n */\n // , \"{ \", \" }\"\n // return \"{\" + list + \"}\";\n }",
"String init() {\n StringBuilder output = new StringBuilder();\n output.setLength(0);\n for (String word: wordList) {\n boolean hasMultipleMatches = false;\n boolean hasAmbiguousMatch = false;\n String bestMatch = null;\n List<String> matches = findExactMatches(word);\n if (matches.size()==1) {\n bestMatch = matches.get(0);\n } else if (matches.size()>1) { // One or more exact matches were found.\n // Multiple matches found. Check to see if there is one which is shorted than the others\n List<String> multipleSameLengthMatches = findLongestMatch(matches);\n bestMatch = multipleSameLengthMatches.get(0);\n if (multipleSameLengthMatches.size()>1) {\n hasMultipleMatches = true;\n }\n } else { // No exact match was found, find longest matching substring\n bestMatch = findBestMatch(word);\n hasAmbiguousMatch = true;\n }\n output.append(bestMatch);\n output.append(hasMultipleMatches?\"!\":\"\");\n output.append(hasAmbiguousMatch?\"?\":\"\");\n output.append(\"\\n\");\n }\n return output.toString();\n }",
"public ArrayList < TypeSubstitution > getSubstitution ( ) ;",
"Flock() {\n boids = new ArrayList<Boid>(); // Initialize the ArrayList\n }",
"Flock() {\n boids = new ArrayList<Boid>(); // Initialize the ArrayList\n }"
] | [
"0.6531483",
"0.6263673",
"0.59746635",
"0.54371536",
"0.5364956",
"0.5051721",
"0.5042053",
"0.50406283",
"0.5014925",
"0.50069785",
"0.50049216",
"0.4940612",
"0.4915433",
"0.49054155",
"0.48815608",
"0.48597038",
"0.48492962",
"0.48414305",
"0.48336697",
"0.4819641",
"0.48081845",
"0.479622",
"0.47861692",
"0.47775963",
"0.4775349",
"0.47599113",
"0.4759473",
"0.47577837",
"0.47289625",
"0.46974787",
"0.46966276",
"0.46782005",
"0.46739542",
"0.46564636",
"0.46365967",
"0.46151826",
"0.46122313",
"0.4604646",
"0.4592546",
"0.45917484",
"0.45887575",
"0.4561525",
"0.45563433",
"0.45507747",
"0.45492995",
"0.45419332",
"0.45410445",
"0.45406356",
"0.45402077",
"0.45351356",
"0.4529346",
"0.4519988",
"0.45166364",
"0.45160213",
"0.45135188",
"0.45116597",
"0.45110205",
"0.45067742",
"0.44863644",
"0.44822556",
"0.44649747",
"0.44625118",
"0.44580066",
"0.44577327",
"0.44554746",
"0.4450111",
"0.4440043",
"0.4439755",
"0.44367683",
"0.44254905",
"0.44249278",
"0.44214395",
"0.44152758",
"0.4414694",
"0.44120622",
"0.4409806",
"0.44078305",
"0.44039163",
"0.43940353",
"0.43935612",
"0.43918222",
"0.43918222",
"0.43874437",
"0.43864945",
"0.4375675",
"0.43748492",
"0.4369143",
"0.43656647",
"0.43628934",
"0.4359965",
"0.435797",
"0.43558404",
"0.4354829",
"0.43519217",
"0.4351466",
"0.43511772",
"0.43505228",
"0.43496075",
"0.4347858",
"0.4347858"
] | 0.7214496 | 0 |
update fringe and conflicts after label literal. | private void updateFringeAndConflicts(List<String> changed) {
//update fringe
for (Clause ci : fringe) {
for (CLiteral l : ci.getCLiterals()) {
if (changed.contains(l.getName())) {
ci.updateClause(labels);
if ( ci.numOfNegative>0)
// else if (c.numUnknownLiterals==0 && c.numOfNegative==c.numUnknownLiterals)
if (!conflicts.contains(ci)) {
if (conflicts.size()+1<=maxConflicts)
conflicts.add(ci);
break;
}
}
}
}
// check rest of clauses which not in fringe or conflicts.
for (Clause c : clauses) {
if (!fringe.contains(c) && !conflicts.contains(c)) {
for (CLiteral l : c.getCLiterals()) {
if (changed.contains(l.getName())) {
c.updateClause(labels);
if (c.getNumUnknownLiterals() == 1 && c.getNumOfNegative() == c.getNumOfLiterals() - c.getNumUnknownLiterals()) {
fringe.push(c);
break;
} else if (c.numOfNegative >0) {
// else if (c.numUnknownLiterals==0 && c.numOfNegative==c.numUnknownLiterals)
if (!conflicts.contains(c)) {
if (conflicts.size()+1<=maxConflicts)
conflicts.add(c);
break;
}
}
}
}
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void updateLabels() {\n\n\t}",
"private void checkAndCorrectLabelReferences() {\n\t\t\n\t\tboolean madeChange;\n\t\tCodeItem codeItem = getCodeItem();\n\t\tList<Label> labels = codeItem.getLabels();\n\n\t\t// Parses all the Labels, and all the OffsetInstructions inside the Labels.\n\t\t// We stop the parsing whenever a change of instruction has been made, to restart the parsing\n\t\t// once again till everything is valid.\n\t\tdo {\n\t\t\tmadeChange = false;\n\t\t\tIterator<Label> labelIterator = labels.iterator();\n\t\t\twhile (!madeChange && labelIterator.hasNext()) {\n\t\t\t\tLabel label = labelIterator.next();\n\t\t\t\tArrayList<Instruction> instructions = label.getReferringInstructions();\n\t\n\t\t\t\tint insnIndex = 0;\n\t\t\t\tint nbInsn = instructions.size();\n\t\t\t\twhile (!madeChange && (insnIndex < nbInsn)) {\n\t\t\t\t\tInstruction insn = instructions.get(insnIndex);\n\t\t\t\t\t\n\t\t\t\t\tIOffsetInstruction offsetInsn = (IOffsetInstruction)insn;\n\t\t\t\t\tint instructionOffset = offsetInsn.getInstructionOffset();\n\t\t\t\t\t// The offset have to be divided by two, because the encoded offset is word based.\n\t\t\t\t\t// The relativeOffset is the offset for the Instruction to reach the Label.\n\t\t\t\t\t// It is negative if the Label is before the Instruction.\n\t\t\t\t\tint relativeOffset = (label.getOffset() - instructionOffset) / 2;\n\t\t\t\t\t\n\t\t\t\t\tint opcode = insn.getOpcodeByte();\n\t\t\t\t\tint maximumOffset = 0;\n\t\t\t\t\t// Check if the relative offset is valid for the instruction range. \n\t\t\t\t\tswitch (opcode) {\n\t\t\t\t\tcase 0x28: // Goto 8 bits.\n\t\t\t\t\t\tmaximumOffset = MAXIMUM_SIGNED_VALUE_8_BITS;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 0x29: // Goto 16 bits.\n\t\t\t\t\tcase 0x32: // If-test.\n\t\t\t\t\tcase 0x33:\n\t\t\t\t\tcase 0x34:\n\t\t\t\t\tcase 0x35:\n\t\t\t\t\tcase 0x36:\n\t\t\t\t\tcase 0x37:\n\t\t\t\t\tcase 0x38: // If-testz.\n\t\t\t\t\tcase 0x39:\n\t\t\t\t\tcase 0x3a:\n\t\t\t\t\tcase 0x3b:\n\t\t\t\t\tcase 0x3c:\n\t\t\t\t\tcase 0x3d:\n\t\t\t\t\t\tmaximumOffset = MAXIMUM_SIGNED_VALUE_16_BITS;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 0x2a: // Goto 32 bits.\n\t\t\t\t\tcase 0x2b: // Packed Switch.\n\t\t\t\t\tcase 0x2c: // Sparse Switch.\n\t\t\t\t\t\tmaximumOffset = MAXIMUM_SIGNED_VALUE_32_BITS;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\ttry { throw new Exception(\"Opcode error : 0x\" + Integer.toHexString(opcode)); } catch (Exception e) { e.printStackTrace(); }\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tint minimumOffset = -maximumOffset - 1;\n\t\t\t\t\t\n\t\t\t\t\tif ((relativeOffset < minimumOffset) || (relativeOffset > maximumOffset)) {\n\t\t\t\t\t\t// Must change to an Instruction with a bigger range. This is only possible for\n\t\t\t\t\t\t// the GOTO 8/16 bits.\n\t\t\t\t\t\tif ((opcode == Opcodes.INSN_GOTO) || (opcode == Opcodes.INSN_GOTO_16)) {\n\t\t\t\t\t\t\tInstruction newInsn;\n\t\t\t\t\t\t\t// Change to 16 or 32 bits ?\n\t\t\t\t\t\t\tif ((relativeOffset > MAXIMUM_SIGNED_VALUE_16_BITS) || (relativeOffset < MINIMUM_SIGNED_VALUE_16_BITS)) {\n\t\t\t\t\t\t\t\t// 32 bits.\n\t\t\t\t\t\t\t\tnewInsn = new InstructionFormat30T(Opcodes.INSN_GOTO_32, label, instructionOffset);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t// 16 bits.\n\t\t\t\t\t\t\t\tnewInsn = new InstructionFormat20T(Opcodes.INSN_GOTO_16, label, instructionOffset);\n\t\t\t\t\t\t\t}\n\t\n\t\t\t\t\t\t\t// Removes the instruction from the codeItem and replaces it with the new one.\n\t\t\t\t\t\t\tcodeItem.replaceInstructions(insn, newInsn);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Replaces the old instruction with the new one in the Label Instructions list.\n\t\t\t\t\t\t\tinstructions.remove(insnIndex);\n\t\t\t\t\t\t\tinstructions.add(insnIndex, newInsn);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Shifts all the Jump related instructions and the labels AFTER this instruction.\n\t\t\t\t\t\t\tshiftOffsetInstructionsAndLabels(instructionOffset, newInsn.getSize() - insn.getSize());\n\t\t\t\t\t\t\tmadeChange = true;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ttry { throw new IllegalArgumentException(\"Instruction Range extension unhandled. Opcode : 0x\" + Integer.toHexString(opcode)); } catch (Exception e) { e.printStackTrace(); }\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tinsnIndex++;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t} while (madeChange);\n\t}",
"String updateLabel(String oldLabel, String newLabel);",
"public abstract void updateLabels();",
"public void doChanges2() {\n lm.undo(changeMark, lm.getChangeMark());\n // > UPDATE CURRENT STATE\n contInterior.put(\"Form\", new Rectangle(0, 0, 400, 300));\n compBounds.put(\"jTextField1\", new Rectangle(0, 0, 400, 20));\n baselinePosition.put(\"jTextField1-400-20\", new Integer(14));\n compBounds.put(\"jRadioButton1\", new Rectangle(0, 22, 93, 23));\n baselinePosition.put(\"jRadioButton1-93-23\", new Integer(15));\n compBounds.put(\"jRadioButton2\", new Rectangle(0, 48, 93, 23));\n baselinePosition.put(\"jRadioButton2-93-23\", new Integer(15));\n compBounds.put(\"jScrollPane1\", new Rectangle(0, 73, 35, 130));\n baselinePosition.put(\"jScrollPane1-35-130\", new Integer(0));\n compBounds.put(\"jLabel1\", new Rectangle(41, 73, 34, 14));\n baselinePosition.put(\"jLabel1-34-14\", new Integer(11));\n compBounds.put(\"jLabel2\", new Rectangle(81, 73, 34, 14));\n baselinePosition.put(\"jLabel2-34-14\", new Integer(11));\n compBounds.put(\"jTextField2\", new Rectangle(41, 113, 59, 20));\n baselinePosition.put(\"jTextField2-59-20\", new Integer(14));\n compBounds.put(\"jLabel3\", new Rectangle(41, 93, 34, 14));\n baselinePosition.put(\"jLabel3-34-14\", new Integer(11));\n ld.updateCurrentState();\n // < UPDATE CURRENT STATE\n lc = new LayoutComponent(\"jLabel4\", false);\n // > START ADDING\n baselinePosition.put(\"jLabel4-34-14\", new Integer(11));\n {\n LayoutComponent[] comps = new LayoutComponent[]{lc};\n Rectangle[] bounds = new Rectangle[]{new Rectangle(0, 0, 34, 14)};\n String defaultContId = null;\n Point hotspot = new Point(13, 7);\n ld.startAdding(comps, bounds, hotspot, defaultContId);\n }\n // < START ADDING\n prefPaddingInParent.put(\"Form-jLabel4-1-0\", new Integer(11)); // parentId-compId-dimension-compAlignment\n prefPaddingInParent.put(\"Form-jLabel4-1-1\", new Integer(11)); // parentId-compId-dimension-compAlignment\n prefPadding.put(\"jTextField1-jLabel4-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel4-jTextField1-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel4-jTextField1-1-0-1\", new Integer(11)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel4-jTextField1-1-0-2\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel4-jTextField1-1-0-3\", new Integer(18)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jRadioButton1-jLabel4-1-0-1\", new Integer(7)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel4-jRadioButton1-1-0-0\", new Integer(2)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jRadioButton2-jLabel4-1-0-0\", new Integer(2)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel4-jRadioButton2-1-0-1\", new Integer(7)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel1-jLabel4-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel2-jLabel4-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel4-jLabel1-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel4-jLabel2-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel3-jLabel4-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel4-jLabel3-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jTextField2-jLabel4-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jTextField2-jLabel4-1-0-1\", new Integer(11)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jTextField2-jLabel4-1-0-2\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jTextField2-jLabel4-1-0-3\", new Integer(18)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel4-jTextField2-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPaddingInParent.put(\"Form-jLabel4-0-0\", new Integer(10)); // parentId-compId-dimension-compAlignment\n prefPaddingInParent.put(\"Form-jLabel4-0-1\", new Integer(10)); // parentId-compId-dimension-compAlignment\n prefPadding.put(\"jScrollPane1-jLabel4-0-0-0\", new Integer(4)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel4-jScrollPane1-0-0-0\", new Integer(4)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel4-jScrollPane1-0-0-1\", new Integer(10)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel4-jScrollPane1-0-0-2\", new Integer(10)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel4-jScrollPane1-0-0-3\", new Integer(18)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jTextField2-jLabel4-0-0-0\", new Integer(4)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jTextField2-jLabel4-0-0-1\", new Integer(10)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jTextField2-jLabel4-0-0-2\", new Integer(10)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jTextField2-jLabel4-0-0-3\", new Integer(18)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel4-jTextField2-0-0-0\", new Integer(4)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel3-jLabel4-0-0-2\", new Integer(10)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n // > MOVE\n // > MOVE\n // > MOVE\n {\n Point p = new Point(59, 120);\n String containerId = \"Form\";\n boolean autoPositioning = true;\n boolean lockDimension = false;\n Rectangle[] bounds = new Rectangle[]{new Rectangle(39, 116, 34, 14)};\n ld.move(p, containerId, autoPositioning, lockDimension, bounds);\n }\n // < MOVE\n prefPaddingInParent.put(\"Form-jLabel4-1-0\", new Integer(11)); // parentId-compId-dimension-compAlignment\n prefPaddingInParent.put(\"Form-jLabel4-1-1\", new Integer(11)); // parentId-compId-dimension-compAlignment\n prefPadding.put(\"jTextField1-jLabel4-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel4-jTextField1-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel4-jTextField1-1-0-1\", new Integer(11)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel4-jTextField1-1-0-2\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel4-jTextField1-1-0-3\", new Integer(18)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jRadioButton1-jLabel4-1-0-1\", new Integer(7)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel4-jRadioButton1-1-0-0\", new Integer(2)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jRadioButton2-jLabel4-1-0-0\", new Integer(2)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel4-jRadioButton2-1-0-1\", new Integer(7)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel1-jLabel4-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel2-jLabel4-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel4-jLabel1-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel4-jLabel2-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel3-jLabel4-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel4-jLabel3-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jTextField2-jLabel4-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jTextField2-jLabel4-1-0-1\", new Integer(11)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jTextField2-jLabel4-1-0-2\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jTextField2-jLabel4-1-0-3\", new Integer(18)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel4-jTextField2-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPaddingInParent.put(\"Form-jLabel4-0-0\", new Integer(10)); // parentId-compId-dimension-compAlignment\n prefPaddingInParent.put(\"Form-jLabel4-0-1\", new Integer(10)); // parentId-compId-dimension-compAlignment\n prefPadding.put(\"jScrollPane1-jLabel4-0-0-0\", new Integer(4)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel4-jScrollPane1-0-0-0\", new Integer(4)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel4-jScrollPane1-0-0-1\", new Integer(10)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel4-jScrollPane1-0-0-2\", new Integer(10)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel4-jScrollPane1-0-0-3\", new Integer(18)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jTextField2-jLabel4-0-0-0\", new Integer(4)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jTextField2-jLabel4-0-0-1\", new Integer(10)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jTextField2-jLabel4-0-0-2\", new Integer(10)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jTextField2-jLabel4-0-0-3\", new Integer(18)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel4-jTextField2-0-0-0\", new Integer(4)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel3-jLabel4-0-0-2\", new Integer(10)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n // > MOVE\n // > MOVE\n // > MOVE\n {\n Point p = new Point(60, 120);\n String containerId = \"Form\";\n boolean autoPositioning = true;\n boolean lockDimension = false;\n Rectangle[] bounds = new Rectangle[]{new Rectangle(41, 116, 34, 14)};\n ld.move(p, containerId, autoPositioning, lockDimension, bounds);\n }\n // < MOVE\n // > END MOVING\n compPrefSize.put(\"jLabel4\", new Dimension(34, 14));\n ld.endMoving(true);\n // < END MOVING\n ld.externalSizeChangeHappened();\n // > UPDATE CURRENT STATE\n contInterior.put(\"Form\", new Rectangle(0, 0, 400, 300));\n compBounds.put(\"jTextField1\", new Rectangle(0, 0, 400, 20));\n baselinePosition.put(\"jTextField1-400-20\", new Integer(14));\n compBounds.put(\"jRadioButton1\", new Rectangle(0, 22, 93, 23));\n baselinePosition.put(\"jRadioButton1-93-23\", new Integer(15));\n compBounds.put(\"jRadioButton2\", new Rectangle(0, 48, 93, 23));\n baselinePosition.put(\"jRadioButton2-93-23\", new Integer(15));\n compBounds.put(\"jScrollPane1\", new Rectangle(0, 73, 35, 130));\n baselinePosition.put(\"jScrollPane1-35-130\", new Integer(0));\n compBounds.put(\"jLabel1\", new Rectangle(39, 73, 34, 14));\n baselinePosition.put(\"jLabel1-34-14\", new Integer(11));\n compBounds.put(\"jLabel2\", new Rectangle(79, 73, 34, 14));\n baselinePosition.put(\"jLabel2-34-14\", new Integer(11));\n compBounds.put(\"jTextField2\", new Rectangle(77, 113, 59, 20));\n baselinePosition.put(\"jTextField2-59-20\", new Integer(14));\n compBounds.put(\"jLabel3\", new Rectangle(39, 93, 34, 14));\n baselinePosition.put(\"jLabel3-34-14\", new Integer(11));\n compBounds.put(\"jLabel4\", new Rectangle(39, 116, 34, 14));\n baselinePosition.put(\"jLabel4-34-14\", new Integer(11));\n prefPaddingInParent.put(\"Form-jRadioButton1-0-1\", new Integer(6)); // parentId-compId-dimension-compAlignment\n prefPaddingInParent.put(\"Form-jRadioButton2-0-1\", new Integer(6)); // parentId-compId-dimension-compAlignment\n prefPaddingInParent.put(\"Form-jLabel3-0-1\", new Integer(10)); // parentId-compId-dimension-compAlignment\n prefPaddingInParent.put(\"Form-jLabel2-0-1\", new Integer(10)); // parentId-compId-dimension-compAlignment\n prefPaddingInParent.put(\"Form-jTextField2-0-1\", new Integer(10)); // parentId-compId-dimension-compAlignment\n compPrefSize.put(\"jTextField1\", new Dimension(59, 20));\n compPrefSize.put(\"jRadioButton1\", new Dimension(93, 23));\n compPrefSize.put(\"jRadioButton2\", new Dimension(93, 23));\n compPrefSize.put(\"jScrollPane1\", new Dimension(35, 130));\n compPrefSize.put(\"jLabel1\", new Dimension(34, 14));\n compPrefSize.put(\"jLabel2\", new Dimension(34, 14));\n compPrefSize.put(\"jTextField2\", new Dimension(59, 20));\n compPrefSize.put(\"jLabel3\", new Dimension(34, 14));\n compPrefSize.put(\"jLabel4\", new Dimension(34, 14));\n contInterior.put(\"Form\", new Rectangle(0, 0, 400, 300));\n compBounds.put(\"jTextField1\", new Rectangle(0, 0, 400, 20));\n baselinePosition.put(\"jTextField1-400-20\", new Integer(14));\n compBounds.put(\"jRadioButton1\", new Rectangle(0, 22, 93, 23));\n baselinePosition.put(\"jRadioButton1-93-23\", new Integer(15));\n compBounds.put(\"jRadioButton2\", new Rectangle(0, 48, 93, 23));\n baselinePosition.put(\"jRadioButton2-93-23\", new Integer(15));\n compBounds.put(\"jScrollPane1\", new Rectangle(0, 73, 35, 130));\n baselinePosition.put(\"jScrollPane1-35-130\", new Integer(0));\n compBounds.put(\"jLabel1\", new Rectangle(39, 73, 34, 14));\n baselinePosition.put(\"jLabel1-34-14\", new Integer(11));\n compBounds.put(\"jLabel2\", new Rectangle(79, 73, 34, 14));\n baselinePosition.put(\"jLabel2-34-14\", new Integer(11));\n compBounds.put(\"jTextField2\", new Rectangle(77, 113, 59, 20));\n baselinePosition.put(\"jTextField2-59-20\", new Integer(14));\n compBounds.put(\"jLabel3\", new Rectangle(39, 93, 34, 14));\n baselinePosition.put(\"jLabel3-34-14\", new Integer(11));\n compBounds.put(\"jLabel4\", new Rectangle(39, 116, 34, 14));\n baselinePosition.put(\"jLabel4-34-14\", new Integer(11));\n ld.updateCurrentState();\n // < UPDATE CURRENT STATE\n changeMark = lm.getChangeMark();\n // > START RESIZING\n baselinePosition.put(\"jTextField2-59-20\", new Integer(14));\n compPrefSize.put(\"jTextField2\", new Dimension(59, 20));\n {\n String[] compIds = new String[]{\"jTextField2\"};\n Rectangle[] bounds = new Rectangle[]{new Rectangle(77, 113, 59, 20)};\n Point hotspot = new Point(135, 120);\n int[] resizeEdges = new int[]{1, -1};\n boolean inLayout = true;\n ld.startResizing(compIds, bounds, hotspot, resizeEdges, inLayout);\n }\n // < START RESIZING\n prefPaddingInParent.put(\"Form-jTextField2-0-1\", new Integer(10)); // parentId-compId-dimension-compAlignment\n // > MOVE\n // > MOVE\n // > MOVE\n {\n Point p = new Point(397, 141);\n String containerId = \"Form\";\n boolean autoPositioning = true;\n boolean lockDimension = false;\n Rectangle[] bounds = new Rectangle[]{new Rectangle(77, 113, 323, 20)};\n ld.move(p, containerId, autoPositioning, lockDimension, bounds);\n }\n // < MOVE\n prefPaddingInParent.put(\"Form-jTextField2-0-1\", new Integer(10)); // parentId-compId-dimension-compAlignment\n // > MOVE\n // > MOVE\n // > MOVE\n {\n Point p = new Point(398, 141);\n String containerId = \"Form\";\n boolean autoPositioning = true;\n boolean lockDimension = false;\n Rectangle[] bounds = new Rectangle[]{new Rectangle(77, 113, 323, 20)};\n ld.move(p, containerId, autoPositioning, lockDimension, bounds);\n }\n // < MOVE\n // > END MOVING\n ld.endMoving(true);\n // < END MOVING\n ld.externalSizeChangeHappened();\n // > UPDATE CURRENT STATE\n contInterior.put(\"Form\", new Rectangle(0, 0, 400, 300));\n compBounds.put(\"jTextField1\", new Rectangle(0, 0, 400, 20));\n baselinePosition.put(\"jTextField1-400-20\", new Integer(14));\n compBounds.put(\"jRadioButton1\", new Rectangle(0, 22, 93, 23));\n baselinePosition.put(\"jRadioButton1-93-23\", new Integer(15));\n compBounds.put(\"jRadioButton2\", new Rectangle(0, 48, 93, 23));\n baselinePosition.put(\"jRadioButton2-93-23\", new Integer(15));\n compBounds.put(\"jScrollPane1\", new Rectangle(0, 73, 35, 130));\n baselinePosition.put(\"jScrollPane1-35-130\", new Integer(0));\n compBounds.put(\"jLabel1\", new Rectangle(39, 73, 34, 14));\n baselinePosition.put(\"jLabel1-34-14\", new Integer(11));\n compBounds.put(\"jLabel2\", new Rectangle(79, 73, 34, 14));\n baselinePosition.put(\"jLabel2-34-14\", new Integer(11));\n compBounds.put(\"jTextField2\", new Rectangle(77, 113, 323, 20));\n baselinePosition.put(\"jTextField2-323-20\", new Integer(14));\n compBounds.put(\"jLabel3\", new Rectangle(39, 93, 34, 14));\n baselinePosition.put(\"jLabel3-34-14\", new Integer(11));\n compBounds.put(\"jLabel4\", new Rectangle(39, 116, 34, 14));\n baselinePosition.put(\"jLabel4-34-14\", new Integer(11));\n prefPaddingInParent.put(\"Form-jRadioButton1-0-1\", new Integer(6)); // parentId-compId-dimension-compAlignment\n prefPaddingInParent.put(\"Form-jRadioButton2-0-1\", new Integer(6)); // parentId-compId-dimension-compAlignment\n compPrefSize.put(\"jTextField1\", new Dimension(59, 20));\n compPrefSize.put(\"jRadioButton1\", new Dimension(93, 23));\n compPrefSize.put(\"jRadioButton2\", new Dimension(93, 23));\n compPrefSize.put(\"jScrollPane1\", new Dimension(35, 130));\n compPrefSize.put(\"jLabel1\", new Dimension(34, 14));\n compPrefSize.put(\"jLabel2\", new Dimension(34, 14));\n compPrefSize.put(\"jTextField2\", new Dimension(59, 20));\n compPrefSize.put(\"jLabel3\", new Dimension(34, 14));\n compPrefSize.put(\"jLabel4\", new Dimension(34, 14));\n contInterior.put(\"Form\", new Rectangle(0, 0, 400, 300));\n compBounds.put(\"jTextField1\", new Rectangle(0, 0, 400, 20));\n baselinePosition.put(\"jTextField1-400-20\", new Integer(14));\n compBounds.put(\"jRadioButton1\", new Rectangle(0, 22, 93, 23));\n baselinePosition.put(\"jRadioButton1-93-23\", new Integer(15));\n compBounds.put(\"jRadioButton2\", new Rectangle(0, 48, 93, 23));\n baselinePosition.put(\"jRadioButton2-93-23\", new Integer(15));\n compBounds.put(\"jScrollPane1\", new Rectangle(0, 73, 35, 130));\n baselinePosition.put(\"jScrollPane1-35-130\", new Integer(0));\n compBounds.put(\"jLabel1\", new Rectangle(39, 73, 34, 14));\n baselinePosition.put(\"jLabel1-34-14\", new Integer(11));\n compBounds.put(\"jLabel2\", new Rectangle(79, 73, 34, 14));\n baselinePosition.put(\"jLabel2-34-14\", new Integer(11));\n compBounds.put(\"jTextField2\", new Rectangle(77, 113, 323, 20));\n baselinePosition.put(\"jTextField2-323-20\", new Integer(14));\n compBounds.put(\"jLabel3\", new Rectangle(39, 93, 34, 14));\n baselinePosition.put(\"jLabel3-34-14\", new Integer(11));\n compBounds.put(\"jLabel4\", new Rectangle(39, 116, 34, 14));\n baselinePosition.put(\"jLabel4-34-14\", new Integer(11));\n ld.updateCurrentState();\n // < UPDATE CURRENT STATE\n }",
"public void doChanges1() {\n lm.undo(changeMark, lm.getChangeMark());\n // > UPDATE CURRENT STATE\n contInterior.put(\"Form\", new Rectangle(0, 0, 400, 300));\n compBounds.put(\"jTextField1\", new Rectangle(0, 0, 400, 20));\n baselinePosition.put(\"jTextField1-400-20\", new Integer(14));\n compBounds.put(\"jRadioButton1\", new Rectangle(0, 22, 93, 23));\n baselinePosition.put(\"jRadioButton1-93-23\", new Integer(15));\n compBounds.put(\"jRadioButton2\", new Rectangle(0, 48, 93, 23));\n baselinePosition.put(\"jRadioButton2-93-23\", new Integer(15));\n compBounds.put(\"jScrollPane1\", new Rectangle(0, 73, 35, 130));\n baselinePosition.put(\"jScrollPane1-35-130\", new Integer(0));\n compBounds.put(\"jLabel1\", new Rectangle(41, 73, 34, 14));\n baselinePosition.put(\"jLabel1-34-14\", new Integer(11));\n compBounds.put(\"jLabel2\", new Rectangle(81, 73, 34, 14));\n baselinePosition.put(\"jLabel2-34-14\", new Integer(11));\n compBounds.put(\"jTextField2\", new Rectangle(41, 93, 59, 20));\n baselinePosition.put(\"jTextField2-59-20\", new Integer(14));\n ld.updateCurrentState();\n // < UPDATE CURRENT STATE\n lc = new LayoutComponent(\"jLabel3\", false);\n // > START ADDING\n baselinePosition.put(\"jLabel3-34-14\", new Integer(11));\n {\n LayoutComponent[] comps = new LayoutComponent[]{lc};\n Rectangle[] bounds = new Rectangle[]{new Rectangle(0, 0, 34, 14)};\n String defaultContId = null;\n Point hotspot = new Point(13, 7);\n ld.startAdding(comps, bounds, hotspot, defaultContId);\n }\n // < START ADDING\n prefPaddingInParent.put(\"Form-jLabel3-1-0\", new Integer(11)); // parentId-compId-dimension-compAlignment\n prefPaddingInParent.put(\"Form-jLabel3-1-1\", new Integer(11)); // parentId-compId-dimension-compAlignment\n prefPadding.put(\"jTextField1-jLabel3-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel3-jTextField1-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel3-jTextField1-1-0-1\", new Integer(11)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel3-jTextField1-1-0-2\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel3-jTextField1-1-0-3\", new Integer(18)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jRadioButton1-jLabel3-1-0-1\", new Integer(7)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel3-jRadioButton1-1-0-0\", new Integer(2)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jRadioButton2-jLabel3-1-0-0\", new Integer(2)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel3-jRadioButton2-1-0-1\", new Integer(7)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel1-jLabel3-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel2-jLabel3-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel3-jLabel1-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel3-jLabel2-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jTextField2-jLabel3-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jTextField2-jLabel3-1-0-1\", new Integer(11)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jTextField2-jLabel3-1-0-2\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jTextField2-jLabel3-1-0-3\", new Integer(18)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel3-jTextField2-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPaddingInParent.put(\"Form-jLabel3-0-0\", new Integer(10)); // parentId-compId-dimension-compAlignment\n prefPaddingInParent.put(\"Form-jLabel3-0-1\", new Integer(10)); // parentId-compId-dimension-compAlignment\n prefPadding.put(\"jScrollPane1-jLabel3-0-0-0\", new Integer(4)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel3-jScrollPane1-0-0-0\", new Integer(4)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel3-jScrollPane1-0-0-1\", new Integer(10)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel3-jScrollPane1-0-0-2\", new Integer(10)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel3-jScrollPane1-0-0-3\", new Integer(18)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel1-jLabel3-0-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel3-jLabel1-0-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel2-jLabel3-0-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel2-jLabel3-0-0-1\", new Integer(10)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel2-jLabel3-0-0-2\", new Integer(10)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel2-jLabel3-0-0-3\", new Integer(18)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel3-jLabel2-0-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jTextField2-jLabel3-0-0-0\", new Integer(4)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jTextField2-jLabel3-0-0-1\", new Integer(10)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jTextField2-jLabel3-0-0-2\", new Integer(10)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jTextField2-jLabel3-0-0-3\", new Integer(18)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel3-jTextField2-0-0-0\", new Integer(4)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jRadioButton2-jLabel3-0-0-2\", new Integer(21)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n // > MOVE\n // > MOVE\n // > MOVE\n {\n Point p = new Point(53, 91);\n String containerId = \"Form\";\n boolean autoPositioning = true;\n boolean lockDimension = false;\n Rectangle[] bounds = new Rectangle[]{new Rectangle(39, 84, 34, 14)};\n ld.move(p, containerId, autoPositioning, lockDimension, bounds);\n }\n // < MOVE\n prefPaddingInParent.put(\"Form-jLabel3-1-0\", new Integer(11)); // parentId-compId-dimension-compAlignment\n prefPaddingInParent.put(\"Form-jLabel3-1-1\", new Integer(11)); // parentId-compId-dimension-compAlignment\n prefPadding.put(\"jTextField1-jLabel3-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel3-jTextField1-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel3-jTextField1-1-0-1\", new Integer(11)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel3-jTextField1-1-0-2\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel3-jTextField1-1-0-3\", new Integer(18)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jRadioButton1-jLabel3-1-0-1\", new Integer(7)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel3-jRadioButton1-1-0-0\", new Integer(2)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jRadioButton2-jLabel3-1-0-0\", new Integer(2)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel3-jRadioButton2-1-0-1\", new Integer(7)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel1-jLabel3-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel2-jLabel3-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel3-jLabel1-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel3-jLabel2-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jTextField2-jLabel3-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jTextField2-jLabel3-1-0-1\", new Integer(11)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jTextField2-jLabel3-1-0-2\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jTextField2-jLabel3-1-0-3\", new Integer(18)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel3-jTextField2-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPaddingInParent.put(\"Form-jLabel3-0-0\", new Integer(10)); // parentId-compId-dimension-compAlignment\n prefPaddingInParent.put(\"Form-jLabel3-0-1\", new Integer(10)); // parentId-compId-dimension-compAlignment\n prefPadding.put(\"jScrollPane1-jLabel3-0-0-0\", new Integer(4)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel3-jScrollPane1-0-0-0\", new Integer(4)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel3-jScrollPane1-0-0-1\", new Integer(10)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel3-jScrollPane1-0-0-2\", new Integer(10)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel3-jScrollPane1-0-0-3\", new Integer(18)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel1-jLabel3-0-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel3-jLabel1-0-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel2-jLabel3-0-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel2-jLabel3-0-0-1\", new Integer(10)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel2-jLabel3-0-0-2\", new Integer(10)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel2-jLabel3-0-0-3\", new Integer(18)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel3-jLabel2-0-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jTextField2-jLabel3-0-0-0\", new Integer(4)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jTextField2-jLabel3-0-0-1\", new Integer(10)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jTextField2-jLabel3-0-0-2\", new Integer(10)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jTextField2-jLabel3-0-0-3\", new Integer(18)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel3-jTextField2-0-0-0\", new Integer(4)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jRadioButton2-jLabel3-0-0-2\", new Integer(21)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n // > MOVE\n // > MOVE\n // > MOVE\n {\n Point p = new Point(52, 91);\n String containerId = \"Form\";\n boolean autoPositioning = true;\n boolean lockDimension = false;\n Rectangle[] bounds = new Rectangle[]{new Rectangle(39, 84, 34, 14)};\n ld.move(p, containerId, autoPositioning, lockDimension, bounds);\n }\n // < MOVE\n // > END MOVING\n compPrefSize.put(\"jLabel3\", new Dimension(34, 14));\n ld.endMoving(true);\n // < END MOVING\n ld.externalSizeChangeHappened();\n // > UPDATE CURRENT STATE\n contInterior.put(\"Form\", new Rectangle(0, 0, 400, 300));\n compBounds.put(\"jTextField1\", new Rectangle(0, 0, 400, 20));\n baselinePosition.put(\"jTextField1-400-20\", new Integer(14));\n compBounds.put(\"jRadioButton1\", new Rectangle(0, 22, 93, 23));\n baselinePosition.put(\"jRadioButton1-93-23\", new Integer(15));\n compBounds.put(\"jRadioButton2\", new Rectangle(0, 48, 93, 23));\n baselinePosition.put(\"jRadioButton2-93-23\", new Integer(15));\n compBounds.put(\"jScrollPane1\", new Rectangle(0, 73, 35, 130));\n baselinePosition.put(\"jScrollPane1-35-130\", new Integer(0));\n compBounds.put(\"jLabel1\", new Rectangle(41, 73, 34, 14));\n baselinePosition.put(\"jLabel1-34-14\", new Integer(11));\n compBounds.put(\"jLabel2\", new Rectangle(81, 73, 34, 14));\n baselinePosition.put(\"jLabel2-34-14\", new Integer(11));\n compBounds.put(\"jTextField2\", new Rectangle(41, 113, 59, 20));\n baselinePosition.put(\"jTextField2-59-20\", new Integer(14));\n compBounds.put(\"jLabel3\", new Rectangle(41, 93, 34, 14));\n baselinePosition.put(\"jLabel3-34-14\", new Integer(11));\n compPrefSize.put(\"jTextField1\", new Dimension(59, 20));\n compPrefSize.put(\"jRadioButton1\", new Dimension(93, 23));\n compPrefSize.put(\"jRadioButton2\", new Dimension(93, 23));\n compPrefSize.put(\"jScrollPane1\", new Dimension(35, 130));\n compPrefSize.put(\"jLabel1\", new Dimension(34, 14));\n compPrefSize.put(\"jLabel2\", new Dimension(34, 14));\n compPrefSize.put(\"jTextField2\", new Dimension(59, 20));\n compPrefSize.put(\"jLabel3\", new Dimension(34, 14));\n contInterior.put(\"Form\", new Rectangle(0, 0, 400, 300));\n compBounds.put(\"jTextField1\", new Rectangle(0, 0, 400, 20));\n baselinePosition.put(\"jTextField1-400-20\", new Integer(14));\n compBounds.put(\"jRadioButton1\", new Rectangle(0, 22, 93, 23));\n baselinePosition.put(\"jRadioButton1-93-23\", new Integer(15));\n compBounds.put(\"jRadioButton2\", new Rectangle(0, 48, 93, 23));\n baselinePosition.put(\"jRadioButton2-93-23\", new Integer(15));\n compBounds.put(\"jScrollPane1\", new Rectangle(0, 73, 35, 130));\n baselinePosition.put(\"jScrollPane1-35-130\", new Integer(0));\n compBounds.put(\"jLabel1\", new Rectangle(41, 73, 34, 14));\n baselinePosition.put(\"jLabel1-34-14\", new Integer(11));\n compBounds.put(\"jLabel2\", new Rectangle(81, 73, 34, 14));\n baselinePosition.put(\"jLabel2-34-14\", new Integer(11));\n compBounds.put(\"jTextField2\", new Rectangle(41, 113, 59, 20));\n baselinePosition.put(\"jTextField2-59-20\", new Integer(14));\n compBounds.put(\"jLabel3\", new Rectangle(41, 93, 34, 14));\n baselinePosition.put(\"jLabel3-34-14\", new Integer(11));\n ld.updateCurrentState();\n // < UPDATE CURRENT STATE\n changeMark = lm.getChangeMark();\n // > START RESIZING\n baselinePosition.put(\"jTextField2-59-20\", new Integer(14));\n compPrefSize.put(\"jTextField2\", new Dimension(59, 20));\n {\n String[] compIds = new String[]{\"jTextField2\"};\n Rectangle[] bounds = new Rectangle[]{new Rectangle(41, 113, 59, 20)};\n Point hotspot = new Point(99, 126);\n int[] resizeEdges = new int[]{1, -1};\n boolean inLayout = true;\n ld.startResizing(compIds, bounds, hotspot, resizeEdges, inLayout);\n }\n // < START RESIZING\n prefPaddingInParent.put(\"Form-jTextField2-0-1\", new Integer(10)); // parentId-compId-dimension-compAlignment\n // > MOVE\n // > MOVE\n // > MOVE\n {\n Point p = new Point(398, 133);\n String containerId = \"Form\";\n boolean autoPositioning = true;\n boolean lockDimension = false;\n Rectangle[] bounds = new Rectangle[]{new Rectangle(41, 113, 359, 20)};\n ld.move(p, containerId, autoPositioning, lockDimension, bounds);\n }\n // < MOVE\n prefPaddingInParent.put(\"Form-jTextField2-0-1\", new Integer(10)); // parentId-compId-dimension-compAlignment\n // > MOVE\n // > MOVE\n // > MOVE\n {\n Point p = new Point(399, 133);\n String containerId = \"Form\";\n boolean autoPositioning = true;\n boolean lockDimension = false;\n Rectangle[] bounds = new Rectangle[]{new Rectangle(41, 113, 359, 20)};\n ld.move(p, containerId, autoPositioning, lockDimension, bounds);\n }\n // < MOVE\n // > END MOVING\n ld.endMoving(true);\n // < END MOVING\n ld.externalSizeChangeHappened();\n // > UPDATE CURRENT STATE\n contInterior.put(\"Form\", new Rectangle(0, 0, 400, 300));\n compBounds.put(\"jTextField1\", new Rectangle(0, 0, 400, 20));\n baselinePosition.put(\"jTextField1-400-20\", new Integer(14));\n compBounds.put(\"jRadioButton1\", new Rectangle(0, 22, 93, 23));\n baselinePosition.put(\"jRadioButton1-93-23\", new Integer(15));\n compBounds.put(\"jRadioButton2\", new Rectangle(0, 48, 93, 23));\n baselinePosition.put(\"jRadioButton2-93-23\", new Integer(15));\n compBounds.put(\"jScrollPane1\", new Rectangle(0, 73, 35, 130));\n baselinePosition.put(\"jScrollPane1-35-130\", new Integer(0));\n compBounds.put(\"jLabel1\", new Rectangle(41, 73, 34, 14));\n baselinePosition.put(\"jLabel1-34-14\", new Integer(11));\n compBounds.put(\"jLabel2\", new Rectangle(81, 73, 34, 14));\n baselinePosition.put(\"jLabel2-34-14\", new Integer(11));\n compBounds.put(\"jTextField2\", new Rectangle(41, 113, 359, 20));\n baselinePosition.put(\"jTextField2-359-20\", new Integer(14));\n compBounds.put(\"jLabel3\", new Rectangle(41, 93, 34, 14));\n baselinePosition.put(\"jLabel3-34-14\", new Integer(11));\n prefPaddingInParent.put(\"Form-jRadioButton1-0-1\", new Integer(6)); // parentId-compId-dimension-compAlignment\n prefPaddingInParent.put(\"Form-jRadioButton2-0-1\", new Integer(6)); // parentId-compId-dimension-compAlignment\n compPrefSize.put(\"jTextField1\", new Dimension(59, 20));\n compPrefSize.put(\"jRadioButton1\", new Dimension(93, 23));\n compPrefSize.put(\"jRadioButton2\", new Dimension(93, 23));\n compPrefSize.put(\"jScrollPane1\", new Dimension(35, 130));\n compPrefSize.put(\"jLabel1\", new Dimension(34, 14));\n compPrefSize.put(\"jLabel2\", new Dimension(34, 14));\n compPrefSize.put(\"jTextField2\", new Dimension(59, 20));\n compPrefSize.put(\"jLabel3\", new Dimension(34, 14));\n contInterior.put(\"Form\", new Rectangle(0, 0, 400, 300));\n compBounds.put(\"jTextField1\", new Rectangle(0, 0, 400, 20));\n baselinePosition.put(\"jTextField1-400-20\", new Integer(14));\n compBounds.put(\"jRadioButton1\", new Rectangle(0, 22, 93, 23));\n baselinePosition.put(\"jRadioButton1-93-23\", new Integer(15));\n compBounds.put(\"jRadioButton2\", new Rectangle(0, 48, 93, 23));\n baselinePosition.put(\"jRadioButton2-93-23\", new Integer(15));\n compBounds.put(\"jScrollPane1\", new Rectangle(0, 73, 35, 130));\n baselinePosition.put(\"jScrollPane1-35-130\", new Integer(0));\n compBounds.put(\"jLabel1\", new Rectangle(41, 73, 34, 14));\n baselinePosition.put(\"jLabel1-34-14\", new Integer(11));\n compBounds.put(\"jLabel2\", new Rectangle(81, 73, 34, 14));\n baselinePosition.put(\"jLabel2-34-14\", new Integer(11));\n compBounds.put(\"jTextField2\", new Rectangle(41, 113, 359, 20));\n baselinePosition.put(\"jTextField2-359-20\", new Integer(14));\n compBounds.put(\"jLabel3\", new Rectangle(41, 93, 34, 14));\n baselinePosition.put(\"jLabel3-34-14\", new Integer(11));\n ld.updateCurrentState();\n // < UPDATE CURRENT STATE\n }",
"private void fillLabelsTabel() {\n }",
"public void doChanges3() {\n lm.undo(changeMark, lm.getChangeMark());\n // > UPDATE CURRENT STATE\n contInterior.put(\"Form\", new Rectangle(0, 0, 400, 300));\n compBounds.put(\"jTextField1\", new Rectangle(0, 0, 400, 20));\n baselinePosition.put(\"jTextField1-400-20\", new Integer(14));\n compBounds.put(\"jRadioButton1\", new Rectangle(0, 22, 93, 23));\n baselinePosition.put(\"jRadioButton1-93-23\", new Integer(15));\n compBounds.put(\"jRadioButton2\", new Rectangle(0, 48, 93, 23));\n baselinePosition.put(\"jRadioButton2-93-23\", new Integer(15));\n compBounds.put(\"jScrollPane1\", new Rectangle(0, 73, 35, 130));\n baselinePosition.put(\"jScrollPane1-35-130\", new Integer(0));\n compBounds.put(\"jLabel1\", new Rectangle(39, 73, 34, 14));\n baselinePosition.put(\"jLabel1-34-14\", new Integer(11));\n compBounds.put(\"jLabel2\", new Rectangle(79, 73, 34, 14));\n baselinePosition.put(\"jLabel2-34-14\", new Integer(11));\n compBounds.put(\"jTextField2\", new Rectangle(77, 113, 59, 20));\n baselinePosition.put(\"jTextField2-59-20\", new Integer(14));\n compBounds.put(\"jLabel3\", new Rectangle(39, 93, 34, 14));\n baselinePosition.put(\"jLabel3-34-14\", new Integer(11));\n compBounds.put(\"jLabel4\", new Rectangle(39, 116, 34, 14));\n baselinePosition.put(\"jLabel4-34-14\", new Integer(11));\n ld.updateCurrentState();\n // < UPDATE CURRENT STATE\n lc = new LayoutComponent(\"jLabel5\", false);\n // > START ADDING\n baselinePosition.put(\"jLabel5-34-14\", new Integer(11));\n {\n LayoutComponent[] comps = new LayoutComponent[]{lc};\n Rectangle[] bounds = new Rectangle[]{new Rectangle(0, 0, 34, 14)};\n String defaultContId = null;\n Point hotspot = new Point(13, 7);\n ld.startAdding(comps, bounds, hotspot, defaultContId);\n }\n // < START ADDING\n prefPaddingInParent.put(\"Form-jLabel5-1-0\", new Integer(11)); // parentId-compId-dimension-compAlignment\n prefPaddingInParent.put(\"Form-jLabel5-1-1\", new Integer(11)); // parentId-compId-dimension-compAlignment\n prefPadding.put(\"jTextField1-jLabel5-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel5-jTextField1-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel5-jTextField1-1-0-1\", new Integer(11)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel5-jTextField1-1-0-2\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel5-jTextField1-1-0-3\", new Integer(18)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jRadioButton1-jLabel5-1-0-1\", new Integer(7)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel5-jRadioButton1-1-0-0\", new Integer(2)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jRadioButton2-jLabel5-1-0-0\", new Integer(2)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel5-jRadioButton2-1-0-1\", new Integer(7)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel1-jLabel5-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel2-jLabel5-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel5-jLabel1-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel5-jLabel2-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel3-jLabel5-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel5-jLabel3-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jTextField2-jLabel5-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jTextField2-jLabel5-1-0-1\", new Integer(11)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jTextField2-jLabel5-1-0-2\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jTextField2-jLabel5-1-0-3\", new Integer(18)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel4-jLabel5-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel4-jLabel5-1-0-1\", new Integer(11)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel4-jLabel5-1-0-2\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel4-jLabel5-1-0-3\", new Integer(18)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel5-jTextField2-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel5-jLabel4-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPaddingInParent.put(\"Form-jLabel5-0-0\", new Integer(10)); // parentId-compId-dimension-compAlignment\n prefPaddingInParent.put(\"Form-jLabel5-0-1\", new Integer(10)); // parentId-compId-dimension-compAlignment\n prefPadding.put(\"jScrollPane1-jLabel5-0-0-0\", new Integer(4)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel5-jScrollPane1-0-0-0\", new Integer(4)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel5-jScrollPane1-0-0-1\", new Integer(10)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel5-jScrollPane1-0-0-2\", new Integer(10)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel5-jScrollPane1-0-0-3\", new Integer(18)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel4-jLabel5-0-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel5-jLabel4-0-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jTextField2-jLabel5-0-0-0\", new Integer(4)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jTextField2-jLabel5-0-0-1\", new Integer(10)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jTextField2-jLabel5-0-0-2\", new Integer(10)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jTextField2-jLabel5-0-0-3\", new Integer(18)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel5-jTextField2-0-0-0\", new Integer(4)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel3-jLabel5-0-0-2\", new Integer(10)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n // > MOVE\n // > MOVE\n // > MOVE\n {\n Point p = new Point(72, 125);\n String containerId = \"Form\";\n boolean autoPositioning = true;\n boolean lockDimension = false;\n Rectangle[] bounds = new Rectangle[]{new Rectangle(59, 116, 34, 14)};\n ld.move(p, containerId, autoPositioning, lockDimension, bounds);\n }\n // < MOVE\n prefPaddingInParent.put(\"Form-jLabel5-1-0\", new Integer(11)); // parentId-compId-dimension-compAlignment\n prefPaddingInParent.put(\"Form-jLabel5-1-1\", new Integer(11)); // parentId-compId-dimension-compAlignment\n prefPadding.put(\"jTextField1-jLabel5-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel5-jTextField1-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel5-jTextField1-1-0-1\", new Integer(11)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel5-jTextField1-1-0-2\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel5-jTextField1-1-0-3\", new Integer(18)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jRadioButton1-jLabel5-1-0-1\", new Integer(7)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel5-jRadioButton1-1-0-0\", new Integer(2)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jRadioButton2-jLabel5-1-0-0\", new Integer(2)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel5-jRadioButton2-1-0-1\", new Integer(7)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel1-jLabel5-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel2-jLabel5-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel5-jLabel1-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel5-jLabel2-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel3-jLabel5-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel5-jLabel3-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jTextField2-jLabel5-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jTextField2-jLabel5-1-0-1\", new Integer(11)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jTextField2-jLabel5-1-0-2\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jTextField2-jLabel5-1-0-3\", new Integer(18)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel4-jLabel5-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel4-jLabel5-1-0-1\", new Integer(11)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel4-jLabel5-1-0-2\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel4-jLabel5-1-0-3\", new Integer(18)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel5-jTextField2-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel5-jLabel4-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPaddingInParent.put(\"Form-jLabel5-0-0\", new Integer(10)); // parentId-compId-dimension-compAlignment\n prefPaddingInParent.put(\"Form-jLabel5-0-1\", new Integer(10)); // parentId-compId-dimension-compAlignment\n prefPadding.put(\"jScrollPane1-jLabel5-0-0-0\", new Integer(4)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel5-jScrollPane1-0-0-0\", new Integer(4)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel5-jScrollPane1-0-0-1\", new Integer(10)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel5-jScrollPane1-0-0-2\", new Integer(10)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel5-jScrollPane1-0-0-3\", new Integer(18)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel4-jLabel5-0-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel5-jLabel4-0-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jTextField2-jLabel5-0-0-0\", new Integer(4)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jTextField2-jLabel5-0-0-1\", new Integer(10)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jTextField2-jLabel5-0-0-2\", new Integer(10)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jTextField2-jLabel5-0-0-3\", new Integer(18)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel5-jTextField2-0-0-0\", new Integer(4)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel3-jLabel5-0-0-2\", new Integer(10)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n // > MOVE\n // > MOVE\n // > MOVE\n {\n Point p = new Point(73, 125);\n String containerId = \"Form\";\n boolean autoPositioning = true;\n boolean lockDimension = false;\n Rectangle[] bounds = new Rectangle[]{new Rectangle(60, 116, 34, 14)};\n ld.move(p, containerId, autoPositioning, lockDimension, bounds);\n }\n // < MOVE\n // > END MOVING\n compPrefSize.put(\"jLabel5\", new Dimension(34, 14));\n ld.endMoving(true);\n // < END MOVING\n ld.externalSizeChangeHappened();\n // > UPDATE CURRENT STATE\n contInterior.put(\"Form\", new Rectangle(0, 0, 400, 300));\n compBounds.put(\"jTextField1\", new Rectangle(0, 0, 400, 20));\n baselinePosition.put(\"jTextField1-400-20\", new Integer(14));\n compBounds.put(\"jRadioButton1\", new Rectangle(0, 22, 93, 23));\n baselinePosition.put(\"jRadioButton1-93-23\", new Integer(15));\n compBounds.put(\"jRadioButton2\", new Rectangle(0, 48, 93, 23));\n baselinePosition.put(\"jRadioButton2-93-23\", new Integer(15));\n compBounds.put(\"jScrollPane1\", new Rectangle(0, 73, 35, 130));\n baselinePosition.put(\"jScrollPane1-35-130\", new Integer(0));\n compBounds.put(\"jLabel1\", new Rectangle(39, 73, 34, 14));\n baselinePosition.put(\"jLabel1-34-14\", new Integer(11));\n compBounds.put(\"jLabel2\", new Rectangle(79, 73, 34, 14));\n baselinePosition.put(\"jLabel2-34-14\", new Integer(11));\n compBounds.put(\"jTextField2\", new Rectangle(117, 113, 59, 20));\n baselinePosition.put(\"jTextField2-59-20\", new Integer(14));\n compBounds.put(\"jLabel3\", new Rectangle(39, 93, 34, 14));\n baselinePosition.put(\"jLabel3-34-14\", new Integer(11));\n compBounds.put(\"jLabel4\", new Rectangle(39, 116, 34, 14));\n baselinePosition.put(\"jLabel4-34-14\", new Integer(11));\n compBounds.put(\"jLabel5\", new Rectangle(79, 116, 34, 14));\n baselinePosition.put(\"jLabel5-34-14\", new Integer(11));\n prefPaddingInParent.put(\"Form-jRadioButton1-0-1\", new Integer(6)); // parentId-compId-dimension-compAlignment\n prefPaddingInParent.put(\"Form-jRadioButton2-0-1\", new Integer(6)); // parentId-compId-dimension-compAlignment\n prefPaddingInParent.put(\"Form-jLabel3-0-1\", new Integer(10)); // parentId-compId-dimension-compAlignment\n prefPaddingInParent.put(\"Form-jLabel2-0-1\", new Integer(10)); // parentId-compId-dimension-compAlignment\n prefPaddingInParent.put(\"Form-jTextField2-0-1\", new Integer(10)); // parentId-compId-dimension-compAlignment\n compPrefSize.put(\"jTextField1\", new Dimension(59, 20));\n compPrefSize.put(\"jRadioButton1\", new Dimension(93, 23));\n compPrefSize.put(\"jRadioButton2\", new Dimension(93, 23));\n compPrefSize.put(\"jScrollPane1\", new Dimension(35, 130));\n compPrefSize.put(\"jLabel1\", new Dimension(34, 14));\n compPrefSize.put(\"jLabel2\", new Dimension(34, 14));\n compPrefSize.put(\"jTextField2\", new Dimension(59, 20));\n compPrefSize.put(\"jLabel3\", new Dimension(34, 14));\n compPrefSize.put(\"jLabel4\", new Dimension(34, 14));\n compPrefSize.put(\"jLabel5\", new Dimension(34, 14));\n contInterior.put(\"Form\", new Rectangle(0, 0, 400, 300));\n compBounds.put(\"jTextField1\", new Rectangle(0, 0, 400, 20));\n baselinePosition.put(\"jTextField1-400-20\", new Integer(14));\n compBounds.put(\"jRadioButton1\", new Rectangle(0, 22, 93, 23));\n baselinePosition.put(\"jRadioButton1-93-23\", new Integer(15));\n compBounds.put(\"jRadioButton2\", new Rectangle(0, 48, 93, 23));\n baselinePosition.put(\"jRadioButton2-93-23\", new Integer(15));\n compBounds.put(\"jScrollPane1\", new Rectangle(0, 73, 35, 130));\n baselinePosition.put(\"jScrollPane1-35-130\", new Integer(0));\n compBounds.put(\"jLabel1\", new Rectangle(39, 73, 34, 14));\n baselinePosition.put(\"jLabel1-34-14\", new Integer(11));\n compBounds.put(\"jLabel2\", new Rectangle(79, 73, 34, 14));\n baselinePosition.put(\"jLabel2-34-14\", new Integer(11));\n compBounds.put(\"jTextField2\", new Rectangle(117, 113, 59, 20));\n baselinePosition.put(\"jTextField2-59-20\", new Integer(14));\n compBounds.put(\"jLabel3\", new Rectangle(39, 93, 34, 14));\n baselinePosition.put(\"jLabel3-34-14\", new Integer(11));\n compBounds.put(\"jLabel4\", new Rectangle(39, 116, 34, 14));\n baselinePosition.put(\"jLabel4-34-14\", new Integer(11));\n compBounds.put(\"jLabel5\", new Rectangle(79, 116, 34, 14));\n baselinePosition.put(\"jLabel5-34-14\", new Integer(11));\n ld.updateCurrentState();\n // < UPDATE CURRENT STATE\n // > START RESIZING\n baselinePosition.put(\"jTextField2-59-20\", new Integer(14));\n compPrefSize.put(\"jTextField2\", new Dimension(59, 20));\n {\n String[] compIds = new String[]{\"jTextField2\"};\n Rectangle[] bounds = new Rectangle[]{new Rectangle(117, 113, 59, 20)};\n Point hotspot = new Point(175, 125);\n int[] resizeEdges = new int[]{1, -1};\n boolean inLayout = true;\n ld.startResizing(compIds, bounds, hotspot, resizeEdges, inLayout);\n }\n // < START RESIZING\n prefPaddingInParent.put(\"Form-jTextField2-0-1\", new Integer(10)); // parentId-compId-dimension-compAlignment\n // > MOVE\n // > MOVE\n // > MOVE\n {\n Point p = new Point(398, 137);\n String containerId = \"Form\";\n boolean autoPositioning = true;\n boolean lockDimension = false;\n Rectangle[] bounds = new Rectangle[]{new Rectangle(117, 113, 283, 20)};\n ld.move(p, containerId, autoPositioning, lockDimension, bounds);\n }\n // < MOVE\n prefPaddingInParent.put(\"Form-jTextField2-0-1\", new Integer(10)); // parentId-compId-dimension-compAlignment\n // > MOVE\n // > MOVE\n // > MOVE\n {\n Point p = new Point(399, 137);\n String containerId = \"Form\";\n boolean autoPositioning = true;\n boolean lockDimension = false;\n Rectangle[] bounds = new Rectangle[]{new Rectangle(117, 113, 283, 20)};\n ld.move(p, containerId, autoPositioning, lockDimension, bounds);\n }\n // < MOVE\n // > END MOVING\n ld.endMoving(true);\n // < END MOVING\n ld.externalSizeChangeHappened();\n // > UPDATE CURRENT STATE\n contInterior.put(\"Form\", new Rectangle(0, 0, 400, 300));\n compBounds.put(\"jTextField1\", new Rectangle(0, 0, 400, 20));\n baselinePosition.put(\"jTextField1-400-20\", new Integer(14));\n compBounds.put(\"jRadioButton1\", new Rectangle(0, 22, 93, 23));\n baselinePosition.put(\"jRadioButton1-93-23\", new Integer(15));\n compBounds.put(\"jRadioButton2\", new Rectangle(0, 48, 93, 23));\n baselinePosition.put(\"jRadioButton2-93-23\", new Integer(15));\n compBounds.put(\"jScrollPane1\", new Rectangle(0, 73, 35, 130));\n baselinePosition.put(\"jScrollPane1-35-130\", new Integer(0));\n compBounds.put(\"jLabel1\", new Rectangle(39, 73, 34, 14));\n baselinePosition.put(\"jLabel1-34-14\", new Integer(11));\n compBounds.put(\"jLabel2\", new Rectangle(79, 73, 34, 14));\n baselinePosition.put(\"jLabel2-34-14\", new Integer(11));\n compBounds.put(\"jTextField2\", new Rectangle(117, 113, 283, 20));\n baselinePosition.put(\"jTextField2-283-20\", new Integer(14));\n compBounds.put(\"jLabel3\", new Rectangle(39, 93, 34, 14));\n baselinePosition.put(\"jLabel3-34-14\", new Integer(11));\n compBounds.put(\"jLabel4\", new Rectangle(39, 116, 34, 14));\n baselinePosition.put(\"jLabel4-34-14\", new Integer(11));\n compBounds.put(\"jLabel5\", new Rectangle(79, 116, 34, 14));\n baselinePosition.put(\"jLabel5-34-14\", new Integer(11));\n prefPaddingInParent.put(\"Form-jRadioButton1-0-1\", new Integer(6)); // parentId-compId-dimension-compAlignment\n prefPaddingInParent.put(\"Form-jRadioButton2-0-1\", new Integer(6)); // parentId-compId-dimension-compAlignment\n compPrefSize.put(\"jTextField1\", new Dimension(59, 20));\n compPrefSize.put(\"jRadioButton1\", new Dimension(93, 23));\n compPrefSize.put(\"jRadioButton2\", new Dimension(93, 23));\n compPrefSize.put(\"jScrollPane1\", new Dimension(35, 130));\n compPrefSize.put(\"jLabel1\", new Dimension(34, 14));\n compPrefSize.put(\"jLabel2\", new Dimension(34, 14));\n compPrefSize.put(\"jTextField2\", new Dimension(59, 20));\n compPrefSize.put(\"jLabel3\", new Dimension(34, 14));\n compPrefSize.put(\"jLabel4\", new Dimension(34, 14));\n compPrefSize.put(\"jLabel5\", new Dimension(34, 14));\n contInterior.put(\"Form\", new Rectangle(0, 0, 400, 300));\n compBounds.put(\"jTextField1\", new Rectangle(0, 0, 400, 20));\n baselinePosition.put(\"jTextField1-400-20\", new Integer(14));\n compBounds.put(\"jRadioButton1\", new Rectangle(0, 22, 93, 23));\n baselinePosition.put(\"jRadioButton1-93-23\", new Integer(15));\n compBounds.put(\"jRadioButton2\", new Rectangle(0, 48, 93, 23));\n baselinePosition.put(\"jRadioButton2-93-23\", new Integer(15));\n compBounds.put(\"jScrollPane1\", new Rectangle(0, 73, 35, 130));\n baselinePosition.put(\"jScrollPane1-35-130\", new Integer(0));\n compBounds.put(\"jLabel1\", new Rectangle(39, 73, 34, 14));\n baselinePosition.put(\"jLabel1-34-14\", new Integer(11));\n compBounds.put(\"jLabel2\", new Rectangle(79, 73, 34, 14));\n baselinePosition.put(\"jLabel2-34-14\", new Integer(11));\n compBounds.put(\"jTextField2\", new Rectangle(117, 113, 283, 20));\n baselinePosition.put(\"jTextField2-283-20\", new Integer(14));\n compBounds.put(\"jLabel3\", new Rectangle(39, 93, 34, 14));\n baselinePosition.put(\"jLabel3-34-14\", new Integer(11));\n compBounds.put(\"jLabel4\", new Rectangle(39, 116, 34, 14));\n baselinePosition.put(\"jLabel4-34-14\", new Integer(11));\n compBounds.put(\"jLabel5\", new Rectangle(79, 116, 34, 14));\n baselinePosition.put(\"jLabel5-34-14\", new Integer(11));\n ld.updateCurrentState();\n // < UPDATE CURRENT STATE\n }",
"private void updateBundleLabelList() {\n List<String> selection = Utils.jListGetValuesWrapper(bundle_label_list);\n List<String> items = new ArrayList<String>();\n // Go through all of the header fields and add them with their variations\n boolean tags_present = false;\n BundlesG globals = getRTParent().getRootBundles().getGlobals();\n Iterator<String> it = globals.fieldIterator();\n while (it.hasNext()) {\n String fld = it.next(); int fld_i = globals.fieldIndex(fld);\n if (globals.isScalar(fld_i)) {\n items.add(fld + SIMPLESTAT_LM);\n\titems.add(fld + COMPLEXSTAT_LM);\n } else if (fld.equals(\"tags\")) {\n tags_present = true;\n } else {\n items.add(fld + ITEMS_LM);\n\titems.add(fld + COUNT_LM);\n }\n BundlesDT.DT datatype = globals.getFieldDataType(fld_i);\n if (globals.isScalar(fld_i) == false && datatype == BundlesDT.DT.INTEGER) datatype = null;\n if (datatype != null) {\n String appends[] = BundlesDT.dataTypeVariations(datatype, globals);\n\tfor (int i=0;i<appends.length;i++) items.add(fld + BundlesDT.DELIM + appends[i]);\n }\n }\n Collections.sort(items, new CaseInsensitiveComparator());\n // Add the tag options at the end\n if (tags_present) {\n items.add(\"tags\" + ITEMS_LM);\n items.add(\"tags\" + BundlesDT.MULTI + ITEMS_LM);\n items.add(\"tags\" + BundlesDT.MULTI + COUNT_LM);\n Iterator<String> it2 = globals.tagTypeIterator();\n while (it2.hasNext()) {\n String tag_type = it2.next();\n items.add(\"tags\" + BundlesDT.MULTI + BundlesDT.DELIM + tag_type + ITEMS_LM);\n items.add(\"tags\" + BundlesDT.MULTI + BundlesDT.DELIM + tag_type + COUNT_LM);\n }\n }\n // Insert the default items\n items.add(0, TIMEFRAME_LM);\n items.add(0, LASTHEARD_LM);\n items.add(0, FIRSTHEARD_LM);\n items.add(0, BUNDLECOUNT_LM);\n // Convert and update the list\n setListAndResetSelection(bundle_label_list, items, selection);\n }",
"public void init() {\n for (Clause c : clauses) {\n // if there is only one literal UNKNOWN and the other are NEGATIVE , add to fringe\n if (c.getNumUnknownLiterals() == 1 && c.getNumOfLiterals() - c.getNumUnknownLiterals() == c.getNumOfNegative()) {\n fringe.push(c);\n }\n }\n computeLabel();\n }",
"public void clearLabelRecs()\n {\n multiLabel = null;\n }",
"com.microsoft.schemas.xrm._2011.contracts.Label addNewLabel();",
"public void markVersionReplace() throws JNCException {\n markLeafReplace(\"version\");\n }",
"private void rescaleLabels() {\n // TJJ Nov 2018 - make sure labels scale correct on any changes\n // to the ring display\n ViewManager vm = getViewManager();\n rangeRings.setLabelSize(vm.getMaster().getDisplayScale());\n }",
"public void updateLabels() {\n\t\t//if credit less than 9 add 0 in front of the credit value \n\t\tif (obj.getCredit() < 10)\n\t\t\tcreditLabel.setText(\"0\" + String.valueOf(obj.getCredit()));\n\t\telse\n\t\t\tcreditLabel.setText(String.valueOf(obj.getCredit()));\n\t\t//if bet less than 9 add 0 in front of the credit value\n\t\tif (obj.getBet() < 10)\n\t\t\tbetLebal.setText(\"0\" + String.valueOf(obj.getBet()));\n\t\telse\n\t\t\tbetLebal.setText(String.valueOf(obj.getBet()));\n\t}",
"private void updatingOptionalFeature(ArrayList<String>\tOnlyInLeft, ArrayList<String>\tOnlyInRight, Model splModel, Model newModel){\r\n//STEP 1 ---------------------------------------------------------------------------------------------\r\n\t\t//Feature optionalFeature = null;\t\t\r\n\t\t//New 02/12/201/\r\n\t\tFeature newModelOptionalFeature = null;\r\n\t\tFeature newVariant = null;\r\n\t\tConstraint constraint = null;\r\n\t\tnewVariant = new Feature(newModel.getId()+\"_Variant\", \"variant\", this.alternativeFeatureGroup.get(0).getId());\r\n\t\tthis.addVariant(newVariant);\r\n\t\t//-New 02/12/201/\r\n\t\t\r\n\t\tif(OnlyInLeft.size()==0){\r\n\t\t}else{\r\n\t\t\tnewModelOptionalFeature= new Feature(\"f\"+(this.optionalFeatures.size()+1) , \"optional\", this.getBase().getName(), OnlyInLeft);\r\n\t\t\tthis.optionalFeatures.add(newModelOptionalFeature);\r\n\t\t\t\r\n\t\t\t//New 02/12/201/\r\n\t\t\tfor(int i = 0; i < this.getVariants().getFeatures().size();i++){\r\n\t\t\t\tFeature variant = this.getVariants().getFeatures().get(i);\r\n\t\t\t\tif(variant==newVariant){\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconstraint = new Constraint(variant.getName(), \"\\u00AC\"+newModelOptionalFeature.getName());\r\n\t\t\t\t\t//addConstraint(constraint);\r\n\t\t\t\t}//if(variant==newVariant){\r\n\t\t\t\t\r\n\t\t\t}//for(int i = 0; i <this.getVariants().getFeatures().size();i++){\t\r\n\t\t\t//-New 02/12/201/\r\n\t\t\tconstraint = new Constraint(newVariant.getName(), newModelOptionalFeature.getName());\r\n\t\t\t//this.constraints.add(constraint);\r\n\t\t\taddConstraint(constraint);\r\n\t\t\t\r\n\t\t\t//System.out.println(\" *** \"+this.constraints.size());\r\n\t\t\t//System.out.println(\" ... \"+constraint.toString());\r\n\t\t\t\r\n\t\t}//if(OnlyInLeft.size()==0){\r\n\r\n//STEP 2 ---------------------------------------------------------------------------------------------\r\n\t\t\r\n\t\tFeature optionalFeature = null;\r\n\t\t\r\n\t\tArrayList<String> elts = MyString.intersection(OnlyInRight, this.getBase().getElements());\r\n\t\tif(elts.size()==0){\r\n\t\t}else{\r\n\t\t\t\r\n\t\t\tthis.getBase().setElements(MyString.minus(this.getBase().getElements(), elts));\r\n\t\t\toptionalFeature= new Feature(\"f\"+(this.optionalFeatures.size()+1) , \"optional\", this.getBase().getName(), elts);\r\n\t\t\tthis.optionalFeatures.add(optionalFeature);\r\n\t\t\t\r\n\t\t\t//OnlyInRight = MyString.minus(OnlyInRight, elts);\r\n\t\t\t\r\n\t\t\t//New 03/12/2018\r\n\t\t\t\r\n\t\t\tfor(int i = 0; i < this.getVariants().getFeatures().size();i++){\r\n\t\t\t\tFeature variant = this.getVariants().getFeatures().get(i);\r\n\t\t\t\tif(variant==newVariant){\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconstraint = new Constraint(variant.getName(), optionalFeature.getName());\r\n\t\t\t\t\t//this.constraints.add(constraint);\r\n\t\t\t\t\taddConstraint(constraint);\r\n\t\t\t\t}//if(variant==newVariant){\r\n\t\t\t}//for(int i = 0; i <this.getVariants().getFeatures().size();i++){\r\n\t\t\t\r\n\t\t\tconstraint = new Constraint(newVariant.getName(), \"\\u00AC\" + optionalFeature.getName());\r\n\t\t\t//this.constraints.add(constraint);\r\n\t\t\t//addConstraint(constraint);\r\n\t\t\t//-New 03/12/2018\r\n\t\t\t\r\n\t\t\t//New 03/12/2018\r\n\t\t\t//update parent feature of feature groups\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tfor(int i = 1; i < this.getAlternativeFeatureGroup().size(); i++){\r\n\t\t\t\tFeatureGroup fg = this.getAlternativeFeatureGroup().get(i);\r\n\t\t\t\t\r\n\t\t\t\tif(fg.getParent().equals(this.getBase().getName())){\r\n\t\t\t\t\t\r\n\t\t\t\t\tString elt = fg.getFeatures().get(0).getElements().get(0); \r\n\t\t\t\t\tString parentElt = splModel.getParent(splModel.getElement(elt)).getId();\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(optionalFeature.contains(parentElt)){\r\n\t\t\t\t\t\t//System.out.println(\"%%%%%%%%%%%%% + \"+parentElt);\r\n\t\t\t\t\t\tfg.setParent(optionalFeature.getName());\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}//for(int i = 1; i < this.getAlternativeFeatureGroup().size(); i++){\r\n\t\t\t\r\n\t\t\t//-New 03/12/2018\r\n\t\t}//if(elts.size()==0){\r\n\t\t\r\n//STEP 3 ---------------------------------------------------------------------------------------------\r\n\r\n\t\t\r\n\t\tint i = 0;\r\n\t\twhile( i<this.optionalFeatures.size()){ //New 03/12/02018\r\n\t\t\tFeature f = this.optionalFeatures.get(i);\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tif(f==newModelOptionalFeature){\r\n\t\t\t}else{\r\n\t\t\t\telts = f.getElements();\r\n\t\t\t\tArrayList<String> elts1 = MyString.intersection(OnlyInRight, elts);\r\n\t\t\t\tif(elts1.size()==0 ){\r\n\t\t\t\t\t//SUP\r\n\t\t\t\t\t//New 03/12/02018\r\n\t\t\t\t\tconstraint = new Constraint(newVariant.getName(), f.getName());\r\n\t\t\t\t\t//this.constraints.add(constraint);\r\n\t\t\t\t\taddConstraint(constraint);\r\n\t\t\t\t\t//-New 03/12/02018\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif( MyString.contains(OnlyInRight, elts) ){\r\n\t\t\t\t\t\t//New 03/12/02018\r\n\t\t\t\t\t\t//OnlyInRight = MyString.minus(OnlyInRight, elts); \r\n\t\t\t\t\t\tconstraint = new Constraint(newVariant.getName(), \"\\u00AC\"+f.getName());\r\n\t\t\t\t\t\t//addConstraint(constraint);\r\n\t\t\t\t\t\t//-New 03/12/02018\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\toptionalFeature= new Feature(\"f\"+(this.optionalFeatures.size()+1) , \"optional\", this.getBase().getName(), elts1);\r\n\t\t\t\t\t\tthis.optionalFeatures.add(optionalFeature);\r\n\t\t\t\t\t\tf.setElements(MyString.minus(elts, elts1));\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//OnlyInRight = MyString.minus(OnlyInRight, elts1);\r\n\r\n\t\t\t\t\t\t//New 09-01-2019\r\n\t\t\t\t\t\t//OnlyInRight = elts; \r\n\t\t\t\t\t\t//--------New 09-01-2019\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tfor(int j = 0; j < this.getVariants().getFeatures().size(); j++){\r\n\t\t\t\t\t\t\tFeature variant = this.getVariants().getFeatures().get(j);\r\n\t\t\t\t\t\t\tif(variant==newVariant){\r\n\t\t\t\t\t\t\t}else{ \r\n\t\t\t\t\t\t\t\tif(Constraint.contains(this.constraints, variant.getName(), f.getName(), \"implies\") ){\r\n\t\t\t\t\t\t\t\t\tconstraint = new Constraint(variant.getName(), optionalFeature.getName());\r\n\t\t\t\t\t\t\t\t\t//this.constraints.add(constraint);\r\n\t\t\t\t\t\t\t\t\taddConstraint(constraint);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}//if(variant==newVariant){\r\n\t\t\t\t\t\t}//for(int j = 0; j < this.getVariants().getFeatures().size(); j++){\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tconstraint = new Constraint(newVariant.getName(), \"\\u00AC\"+optionalFeature.getName());\r\n\t\t\t\t\t\t\t//this.constraints.add(constraint);\r\n\t\t\t\t\t\t\t//addConstraint(constraint);\r\n\t\t\t\t\t\t\tconstraint = new Constraint(newVariant.getName(), f.getName());\r\n\t\t\t\t\t\t\t//this.constraints.add(constraint);\r\n\t\t\t\t\t\t\taddConstraint(constraint);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//-New 03/12/02018\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t//New 03/12/2018\r\n\t\t\t\t\t\t\t//update parent feature of feature groups\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tfor(int j = 1; j < this.getAlternativeFeatureGroup().size(); j++){\r\n\t\t\t\t\t\t\t\tFeatureGroup fg = this.getAlternativeFeatureGroup().get(j);\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tif(fg.getParent().equals(f.getName())){\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tString elt = fg.getFeatures().get(0).getElements().get(0); \r\n\t\t\t\t\t\t\t\t\tString parentElt = splModel.getParent(splModel.getElement(elt)).getId();\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tif(optionalFeature.contains(parentElt)){\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\tfg.setParent(optionalFeature.getName());\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}//for(int i = 1; i < this.getAlternativeFeatureGroup().size(); i++){\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t//-New 03/12/2018\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}//if( MyString.contains(OnlyInRight, f.getElements()) ){\r\n\t\t\t\t}//if( elts1.size()==0 ){\r\n\t\t\t\r\n\t\t\t}//if(f==newModelOptionalFeature){ New 03/12/02018\r\n\t\t\ti++;\r\n\t\t}//while(){\r\n\t\t\r\n\t\r\n\t\t\r\n\t\tthis.updatingAlternativeFeatures(splModel, newModelOptionalFeature, newVariant, OnlyInRight, newModel);\r\n\t}",
"private void calculateLabelMasses(PepXmlFraction fraction)\r\n {\r\n // Process amino acid mods\r\n List<MS2Modification> mods = fraction.getModifications();\r\n for (MS2Modification mod : mods)\r\n {\r\n char aa = mod.getAminoAcid().charAt(0);\r\n IsotopicLabel label = labels.get(aa);\r\n if (null != label)\r\n {\r\n float mass = mod.getMass();\r\n if (mod.getVariable())\r\n label.setHeavyMass(mass);\r\n else\r\n label.setLightMass(mass);\r\n }\r\n }\r\n\r\n/**********************************************************************\r\n ???? Pending commit of PepXmlLoader updates...\r\n\r\n // Process terminal mods\r\n List<MS2TerminalModification> tmods = fraction.getTerminalModifications();\r\n for (MS2TerminalModification mod : tmods)\r\n {\r\n char aa = mod.isNTerminus() ? 'n' : 'c'; // use psuedo amino acids for termini\r\n IsotopicLabel label = labels.get(aa);\r\n if (null != label)\r\n {\r\n float mass = mod.getMass();\r\n if (mod.getVariable())\r\n label.setHeavyMass(mass);\r\n else\r\n label.setLightMass(mass);\r\n }\r\n }\r\n**********************************************************************/\r\n\r\n // Make sure we've got a complete table of masses for the labels\r\n for (IsotopicLabel label : labels.values())\r\n {\r\n float light = label.getLightMass();\r\n float heavy = label.getHeavyMass();\r\n float diff = label.getMassDiff();\r\n\r\n _log.debug(\"Label Before = \" + label.toString());\r\n \r\n if (heavy == 0f && light == 0f)\r\n throw new Q3RuntimeException(\"No static or variable modification found for labeled residue '\" + label.getResidue() + \"'\");\r\n if (heavy == 0f && light != 0f)\r\n label.setHeavyMass(light + diff);\r\n else if (light == 0f && heavy != 0f)\r\n label.setLightMass(heavy - diff);\r\n\r\n _log.debug(\"Label After = \" + label.toString());\r\n\r\n if (label.getLightMass() < 0f ||\r\n label.getHeavyMass() < 0f ||\r\n label.getHeavyMass() < label.getLightMass())\r\n {\r\n throw new Q3RuntimeException(\"Inconsistent light and heavy masses (\" + label.getLightMass() + \" and \" + label.getHeavyMass() + \")\");\r\n }\r\n\r\n if (Math.abs(label.getHeavyMass() - label.getLightMass() - diff) > 0.01)\r\n _log.warn(\"Specified quantitation mass diff, \" + diff + \", may not be compatible with mass diff used in search \" + (heavy - light));\r\n }\r\n }",
"private void updateLabelLists(Set<String> entity_tag_types) {\n updateEntityLabelList(entity_tag_types, entity_label_list);\n updateEntityLabelList(entity_tag_types, entity_color_list);\n updateBundleLabelList();\n }",
"void addLabel(Object newLabel);",
"void addLabel(Object newLabel);",
"public void markSecondaryApnSourceGprsReplace() throws JNCException {\n markLeafReplace(\"secondaryApnSourceGprs\");\n }",
"public void markMinorAbateReplace() throws JNCException {\n markLeafReplace(\"minorAbate\");\n }",
"public void markMinorOnsetReplace() throws JNCException {\n markLeafReplace(\"minorOnset\");\n }",
"void removeLabel(Object oldLabel);",
"void removeLabel(Object oldLabel);",
"public void label() {\n\n /**Iterate through all voxels in the specified volume - This should be done\n * once for making sure all voxels become labelled */\n for (int iX = bX; iX < tX; iX++) {\n for (int iY = bY; iY < tY; iY++) {\n for (int iZ = bZ; iZ < tZ; iZ++) {\n\n // Index3D tempIndex3D = new Index3D(iX, iY, iZ);\n\n /**If an unlabelled voxel is found add it onto the stack */\n if (imageMask.isTrue(iX, iY, iZ) && labelledVolume.intValue(iX, iY, iZ) < startingLabel) {\n voxelStack.push(new Index3D(iX, iY, iZ));\n\n /**Continue to recurse through sub-volumes for label voxels\n * until the queue is empty */\n while (!voxelStack.isEmpty()) {\n Index3D center = voxelStack.pop();\n labelRecursive(center, center);\n }\n\n //Increment the label for the next unlabelled component\n currentLabel = currentLabel + 10;\n diffLabels++;\n }\n }\n }\n }\n\n }",
"private void relabelGraphs2MultisetLabels(List<DirectedMultigraphWithRoot<Vertex<String>, Edge<String>>> graphs, int startLabel, int currentLabel) {\r\n\t\tMap<String, Bucket<Vertex<String>>> bucketsV = new HashMap<String, Bucket<Vertex<String>>>();\r\n\t\tMap<String, Bucket<Edge<String>>> bucketsE = new HashMap<String, Bucket<Edge<String>>>();\r\n\r\n\t\t// Initialize buckets\r\n\t\tfor (int i = startLabel; i < currentLabel; i++) {\r\n\t\t\tbucketsV.put(Integer.toString(i), new Bucket<Vertex<String>>(Integer.toString(i)));\r\n\t\t\tbucketsE.put(Integer.toString(i), new Bucket<Edge<String>>(Integer.toString(i)));\r\n\t\t}\r\n\r\n\t\t// 1. Fill buckets \r\n\r\n\t\t\t\tfor (DirectedMultigraphWithRoot<Vertex<String>, Edge<String>> graph : graphs) {\r\n\t\t\t\t// Add each edge source (i.e.) start vertex to the bucket of the edge label\r\n\t\t\t\tfor (Edge<String> edge : graph.getEdges()) {\r\n\t\t\t\t\tbucketsV.get(edge.getLabel().toString()).getContents().add(graph.getDest(edge));\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Add each incident edge to the bucket of the node label\r\n\t\t\t\tfor (Vertex<String> vertex : graph.getVertices()) {\t\t\t\r\n\t\t\t\t\tCollection<Edge<String>> v2 = graph.getOutEdges(vertex);\t\r\n\t\t\t\t\tbucketsE.get(vertex.getLabel().toString()).getContents().addAll(v2);\r\n\t\t\t\t}\t\r\n\t\t\t}\r\n\r\n\t\t// 2. add bucket labels to existing labels\r\n\t\t// Change the original label to a prefix label\r\n\t\tfor (DirectedMultigraphWithRoot<Vertex<String>, Edge<String>> graph : graphs) {\r\n\t\t\tfor (Edge<String> edge : graph.getEdges()) {\r\n\t\t\t\tedge.setLabel(edge.getLabel() + \"_\");\r\n\t\t\t}\r\n\t\t\tfor (Vertex<String> vertex : graph.getVertices()) {\r\n\t\t\t\tvertex.setLabel(vertex.getLabel() + \"_\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// 3. Relabel to the labels in the buckets\r\n\t\tfor (int i = startLabel; i < currentLabel; i++) {\r\n\t\t\t// Process vertices\r\n\t\t\tBucket<Vertex<String>> bucketV = bucketsV.get(Integer.toString(i));\t\t\t\r\n\t\t\tfor (Vertex<String> vertex : bucketV.getContents()) {\r\n\t\t\t\tvertex.setLabel(vertex.getLabel() + bucketV.getLabel() ); // + \"_\"\r\n\t\t\t}\r\n\t\t\t// Process edges\r\n\t\t\tBucket<Edge<String>> bucketE = bucketsE.get(Integer.toString(i));\t\t\t\r\n\t\t\tfor (Edge<String> edge : bucketE.getContents()) {\r\n\t\t\t\tedge.setLabel(edge.getLabel() + bucketE.getLabel() ); // + \"_\"\r\n\t\t\t}\r\n\t\t}\r\n\r\n\r\n\r\n\t}",
"public void updatePenaltyLabel(int currPenalty) {\n penaltyLabel.setText(\"Stacked Penalty: \" + currPenalty);\n }",
"void setNilLabel();",
"@Test\n\tpublic void testAutoLabelDoesntOverwriteUserLabel() throws Exception {\n\n\t\tStringTableProvider provider = performSearch();\n\t\tStringTableModel model = (StringTableModel) getInstanceField(\"stringModel\", provider);\n\t\tGhidraTable table = (GhidraTable) getInstanceField(\"table\", provider);\n\t\ttoggleDefinedStateButtons(provider, false, true, false, false);\n\t\twaitForTableModel(model);\n\t\tsetAutoLabelCheckbox(provider, true);\n\n\t\t// select row (Address 40503c - String2)\n\t\tselectRows(table, addr(0x40503c));\n\t\tassertEquals(\"0040503c\",\n\t\t\tgetModelValue(model, table.getSelectedRow(), addressColumnIndex).toString());\n\n\t\t// make a user-defined label\n\t\tSymbol sym = program.getSymbolTable().getPrimarySymbol(addr(0x40503c));\n\t\tassertEquals(null, sym);\n\t\tint txId = program.startTransaction(\"Create Label\");\n\t\tboolean commit;\n\t\ttry {\n\t\t\tprogram.getSymbolTable().createLabel(addr(0x40503c), \"testLabel\",\n\t\t\t\tSourceType.USER_DEFINED);\n\t\t\tcommit = true;\n\t\t}\n\t\tcatch (InvalidInputException exc) {\n\t\t\tcommit = false;\n\t\t}\n\t\tprogram.endTransaction(txId, commit);\n\n\t\t// the createSymbol call will trigger notifications in the Swing thread that we need\n\t\t// to finish before we can move on\n\t\twaitForSwing();\n\t\t// make string with auto label selected\n\t\tDockingAction makeStringAction =\n\t\t\t(DockingAction) getInstanceField(\"makeStringAction\", provider);\n\t\tperformAction(makeStringAction, model);\n\n\t\t// make sure new label is made primary and second label is still there as secondary one\n\t\tsym = program.getSymbolTable().getPrimarySymbol(addr(0x40503c));\n\t\tassertEquals(\"s_String2\", sym.getName());\n\t\tSymbol symArray[] = program.getSymbolTable().getSymbols(addr(0x40503c));\n\t\tassertEquals(2, symArray.length);\n\t\tassertEquals(\"s_String2\", symArray[0].getName());\n\t\tassertEquals(\"testLabel\", symArray[1].getName());\n\n\t\tData d = listing.getDataAt(addr(0x40503c));\n\t\tDataType dt = d.getBaseDataType();\n\t\tassertTrue(dt instanceof StringDataType);\n\t\tassertEquals(\"String2\", d.getValue());\n\t}",
"private void updateLabel() {\n\t\tString translation = lp.getString(key);\n\t\tsetText(translation);\n\n\t}",
"public void compileLabelReferences(Scope currentScope, Iterator<Scope> subScopes) {\n\t\t\n\t}",
"@Override\n\tboolean applyLabel() {\n\n\t\treturn false;\n\t}",
"public void\nsetNewLabel()\nthrows Exception\n{\n\tdouble lineLength = this.getNucLabelLineLength();\n\tif (lineLength <= 0.0)\n\t\tlineLength = ComplexDefines.NUCLABEL_LINE_LENGTH;\n\tthis.setNewLabel(\n\t\tnew Font(\"Helvetica\", Font.PLAIN, 12),\n\t\tthis.getParentSSData2D().getNucLabelLineWidth(),\n\t\tlineLength, Color.black, this.getID());\n}",
"private void updateLabelText() {\n /*\n r18 = this;\n android.view.View r13 = r18.getNativeView()\n android.widget.TextView r13 = (android.widget.TextView) r13\n if (r13 != 0) goto L_0x0009\n L_0x0008:\n return\n L_0x0009:\n boolean r7 = r18.isSingleLine()\n r0 = r18\n float r0 = r0.minimumFontSizeInPixels\n r16 = r0\n r17 = 1036831949(0x3dcccccd, float:0.1)\n int r16 = (r16 > r17 ? 1 : (r16 == r17 ? 0 : -1))\n if (r16 < 0) goto L_0x00f6\n r3 = 1\n L_0x001b:\n r8 = r3\n r13.setSingleLine(r7)\n r0 = r18\n int r0 = r0.viewHeightInLines\n r16 = r0\n if (r16 <= 0) goto L_0x00f9\n r0 = r18\n int r0 = r0.viewHeightInLines\n r16 = r0\n r0 = r16\n r13.setLines(r0)\n L_0x0032:\n if (r7 == 0) goto L_0x0102\n r16 = 1\n r0 = r16\n r13.setMaxLines(r0)\n L_0x003b:\n r0 = r18\n java.lang.CharSequence r11 = r0.originalText\n if (r11 != 0) goto L_0x0135\n android.text.SpannableStringBuilder r11 = new android.text.SpannableStringBuilder\n java.lang.String r16 = \"\"\n r0 = r16\n r11.<init>(r0)\n r12 = r11\n L_0x004b:\n if (r8 == 0) goto L_0x0132\n int r16 = r12.length()\n if (r16 <= 0) goto L_0x0132\n r2 = 0\n L_0x0054:\n int r16 = r12.length()\n r0 = r16\n if (r2 >= r0) goto L_0x006c\n char r10 = r12.charAt(r2)\n r16 = 13\n r0 = r16\n if (r10 == r0) goto L_0x006c\n r16 = 10\n r0 = r16\n if (r10 != r0) goto L_0x012b\n L_0x006c:\n int r16 = r12.length()\n r0 = r16\n if (r2 >= r0) goto L_0x0132\n android.text.SpannableStringBuilder r11 = new android.text.SpannableStringBuilder\n r16 = 0\n r0 = r16\n r11.<init>(r12, r0, r2)\n L_0x007d:\n boolean r0 = r11 instanceof android.text.Spannable\n r16 = r0\n if (r16 != 0) goto L_0x0089\n android.text.SpannableStringBuilder r12 = new android.text.SpannableStringBuilder\n r12.<init>(r11)\n r11 = r12\n L_0x0089:\n r1 = 0\n r0 = r18\n int r0 = r0.autoLinkFlags\n r16 = r0\n if (r16 == 0) goto L_0x00a0\n r16 = r11\n android.text.Spannable r16 = (android.text.Spannable) r16\n r0 = r18\n int r0 = r0.autoLinkFlags\n r17 = r0\n boolean r1 = android.text.util.Linkify.addLinks(r16, r17)\n L_0x00a0:\n if (r1 == 0) goto L_0x012f\n android.text.method.MovementMethod r9 = android.text.method.LinkMovementMethod.getInstance()\n L_0x00a6:\n android.text.method.MovementMethod r16 = r13.getMovementMethod()\n r0 = r16\n if (r9 == r0) goto L_0x00c6\n boolean r5 = r13.isFocusable()\n boolean r4 = r13.isClickable()\n boolean r6 = r13.isLongClickable()\n r13.setMovementMethod(r9)\n r13.setFocusable(r5)\n r13.setClickable(r4)\n r13.setLongClickable(r6)\n L_0x00c6:\n r0 = r18\n android.text.TextUtils$TruncateAt r14 = r0.ellipsize\n if (r9 == 0) goto L_0x00da\n android.text.TextUtils$TruncateAt r16 = android.text.TextUtils.TruncateAt.START\n r0 = r16\n if (r14 == r0) goto L_0x00d8\n android.text.TextUtils$TruncateAt r16 = android.text.TextUtils.TruncateAt.MIDDLE\n r0 = r16\n if (r14 != r0) goto L_0x00da\n L_0x00d8:\n android.text.TextUtils$TruncateAt r14 = android.text.TextUtils.TruncateAt.END\n L_0x00da:\n r13.setEllipsize(r14)\n android.text.TextUtils$TruncateAt r16 = android.text.TextUtils.TruncateAt.MARQUEE\n r0 = r16\n if (r14 != r0) goto L_0x00ea\n r16 = 1\n r0 = r16\n r13.setSelected(r0)\n L_0x00ea:\n android.widget.TextView$BufferType r16 = android.widget.TextView.BufferType.NORMAL\n r0 = r16\n r13.setText(r11, r0)\n r13.requestLayout()\n goto L_0x0008\n L_0x00f6:\n r3 = 0\n goto L_0x001b\n L_0x00f9:\n r16 = 0\n r0 = r16\n r13.setMinLines(r0)\n goto L_0x0032\n L_0x0102:\n r0 = r18\n int r0 = r0.maxLines\n r16 = r0\n if (r16 <= 0) goto L_0x0129\n r0 = r18\n int r15 = r0.maxLines\n L_0x010e:\n r0 = r18\n int r0 = r0.viewHeightInLines\n r16 = r0\n if (r16 <= 0) goto L_0x0124\n r0 = r18\n int r0 = r0.viewHeightInLines\n r16 = r0\n r0 = r16\n if (r15 <= r0) goto L_0x0124\n r0 = r18\n int r15 = r0.viewHeightInLines\n L_0x0124:\n r13.setMaxLines(r15)\n goto L_0x003b\n L_0x0129:\n r15 = 1\n goto L_0x010e\n L_0x012b:\n int r2 = r2 + 1\n goto L_0x0054\n L_0x012f:\n r9 = 0\n goto L_0x00a6\n L_0x0132:\n r11 = r12\n goto L_0x007d\n L_0x0135:\n r12 = r11\n goto L_0x004b\n */\n throw new UnsupportedOperationException(\"Method not decompiled: p006ti.modules.titanium.p007ui.widget.TiUILabel.updateLabelText():void\");\n }",
"public void update(){\n label = tag.getSelectedItemPosition() == 0 ? \"all\" : mLabel[tag.getSelectedItemPosition()];\n Refresh();\n }",
"public void setLabelFor(View labeled) {\n/* 1581 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"public abstract Code addLabel(String label);",
"private void assignLabelTolist() {\n this.labelList.add(matchLabel1);\n this.labelList.add(matchLabel2);\n this.labelList.add(matchLabel3);\n this.labelList.add(matchLabel4);\n this.labelList.add(matchLabel5);\n }",
"public void markMajorAbateReplace() throws JNCException {\n markLeafReplace(\"majorAbate\");\n }",
"@Override\n public void itemModified (ItemEvent e) {\n super.itemModified(e);\n Sequence denotationSequence = e.getDenotation();\n Structure denotation = (Structure) denotationSequence.elementAt(0);\n Symbol attributeName = (denotation!=null?(Symbol)denotation.getAttributeValue(NAME_, null):null);\n if (LABEL_.equals(attributeName)) {\n setLabel((String)(e.getNewValue()));\n }\n Rectangle bounds = getExactBounds()[0];\n Rectangle[] invalRegion = {bounds};\n ((WorkspaceView)getParent()).invalidate(invalRegion);\n }",
"private void updateLabels(ArrayList<String[]> configu, int R) {\r\n\t\t\r\n\t\tfor (int i = 1; i < 5; i++) \r\n\t\t\tlabelText.add(configu.get(R)[i]); //update LabelText in new label\r\n\t\t\r\n\t\t//update in frame\r\n\t\tleftText.setText(labelText.get(0));\r\n\t\tupText.setText(labelText.get(1));\r\n\t\trightText.setText(labelText.get(2));\r\n\t\tdownText.setText(labelText.get(3));\r\n\t}",
"public Formula encodeConflictFree() {\n\t\tConjunction result = new Conjunction(\"conflictfree\");\n\t\tSet<Argument> args = this.instance.getAllArguments();\n\t\tfor(Argument a : args) {\n\t\t\tresult.addSubformula(this.clause(a));\n\t\t}\n\t\treturn result;\n\t}",
"private void shortenNodeLabels() {\n for (NodeImpl n : supervisedNodes) {\n if (n.hasLabel()) {\n shortenNodeLabel(n.getLabel());\n }\n }\n }",
"private void setLabelForSpecimen(final Specimen objSpecimen) throws LabelGenException\r\n\t{\r\n\t\tStringBuffer buffer = new StringBuffer();\r\n\r\n\t\tif(isGenLabel(objSpecimen))\r\n\t\t{\r\n\t\t\tString labelFormat = getLabelFormat(objSpecimen, buffer);\r\n\r\n\t\t\tif (!Validator.isEmpty(labelFormat))\r\n\t\t\t{\r\n\t\t\t\tStringTokenizer tokenizer = new StringTokenizer(labelFormat, \"%\");\r\n\t\t\t\twhile (tokenizer.hasMoreTokens())\r\n\t\t\t\t{\r\n\t\t\t\t\tString token = tokenizer.nextToken();\r\n\t\t\t\t\ttry\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tbuffer.append(getTokenValue(objSpecimen, token));\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcatch (final NameGeneratorException ex)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tthrow new LabelException(ex.getMessage());\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n//\t\t\t\t\t\tbuffer.append(\"_\");\r\n//\t\t\t\t\t\tbuffer.append(getSpecimenCount(objSpecimen));\r\n\t\t\t}\r\n\t\t\tobjSpecimen.setLabel(buffer.toString());\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tthrow new LabelGenException(\"Manual Label Generation is selected for this specimen\");\r\n\t\t}\r\n\t}",
"public void\nsetNewLabel(Font font)\nthrows Exception\n{\n\tdouble lineLength = this.getNucLabelLineLength();\n\tif (lineLength <= 0.0)\n\t\tlineLength = ComplexDefines.NUCLABEL_LINE_LENGTH;\n\tthis.setNewLabel(font,\n\t\tthis.getParentSSData2D().getNucLabelLineWidth(), lineLength,\n\t\tColor.black, this.getID());\n}",
"public void setLabels() {\n \t\tif(getTreeMode() == MODE_DEPENDENCY) {\n \t\t\tindNode.setUserObject(app.getPlain(\"FreeObjects\"));\n \t\t\tmodel.nodeChanged(indNode);\n \t\t\t\n \t\t\tdepNode.setUserObject(app.getPlain(\"DependentObjects\"));\n \t\t\tmodel.nodeChanged(depNode);\n \t\t\t\n \t\t\tauxiliaryNode.setUserObject(app.getPlain(\"AuxiliaryObjects\"));\n \t\t\tmodel.nodeChanged(auxiliaryNode);\n \t\t} else {\n \t\t\tDefaultMutableTreeNode node;\n \t\t\tfor (String key : typeNodesMap.keySet()) {\n \t\t\t\tnode = typeNodesMap.get(key);\n \t\t\t\tnode.setUserObject(app.getPlain(key));\n \t\t\t\tmodel.nodeChanged(node);\n \t\t\t}\n \t\t}\n \t\t\n \t\tif(helperBar != null) {\n \t\t\thelperBar.updateLabels();\n \t\t}\n \t}",
"public void label_change(int p, int q){\r\n\t\t// checking root label\r\n\t\tint p_l = label[find(p)];\r\n\t\tint q_l = label[find(q)];\r\n\t\t//System.out.println(p_l + \"\" \"\" + q_l);\r\n\t\tif(p_l > q_l){\r\n\t\t\t//System.out.println(\"\"id = \"\" +find(p) + \"\" label = \"\" + q_l);\r\n\t\t\tlabel[find(p)] = q_l;\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\t//System.out.println(\"\"id = \"\" +find(q) + \"\"label = \"\" + p_l);\r\n\t\t\tlabel[find(q)] = p_l;\r\n\t\t}\r\n\t}",
"public void markCsgListReplace() throws JNCException {\n markLeafReplace(\"csgList\");\n }",
"void setLabel(com.microsoft.schemas.xrm._2011.contracts.Label label);",
"protected void refreshBendpoints() {\r\n\t\tList modelConstraint = getEdge().getBendpoints();\r\n\t\tList figureConstraint = new ArrayList();\r\n\t\tPointList pointList = new PointList(); \r\n\t\tfor (int i=0; i<modelConstraint.size(); i++) {\r\n\t\t\tPoint ebp = (Point)modelConstraint.get(i);\r\n\t\t\tpointList.addPoint(ebp.x,ebp.y);\r\n\t\t}\r\n\t\tgetConnectionFigure().setPoints(pointList);\r\n\t\tif (getEdgeFigure().getSourceDecoration() != null){\r\n\t\t\tgetEdgeFigure().getSourceDecoration().setLocation(getEdgeFigure().getPoints().getFirstPoint());\r\n\t\t\tgetEdgeFigure().getSourceDecoration().setReferencePoint(getEdgeFigure().getPoints().getPoint(1));\r\n\t\t}\r\n\t\tif (getEdgeFigure().getTargetDecoration() != null){\r\n\t\t\tgetEdgeFigure().getTargetDecoration().setLocation(getEdgeFigure().getPoints().getLastPoint());\r\n\t\t\tgetEdgeFigure().getTargetDecoration().setReferencePoint(getEdgeFigure().getPoints().getPoint(pointList.size()-2));\r\n\t\t}\r\n\t\tgetEdgeFigure().adjustLabelPlacement();\r\n\t}",
"void setLabel(Label label);",
"public\t\tvoid\t\tsetLabel(MiPart obj)\n\t\t{\n\t\tif (label == obj)\n\t\t\treturn;\n\n\t\tif (obj != null)\n\t\t\tobj.setCenter(getCenter());\n\n\t\tif (label != null)\n\t\t\tremovePart(label);\n\t\tlabel = obj;\n\t\tif (label != null)\n\t\t\tappendPart(label);\n\t\t}",
"public void markFullDomainNameReplace() throws JNCException {\n markLeafReplace(\"fullDomainName\");\n }",
"public void markMajorOnsetReplace() throws JNCException {\n markLeafReplace(\"majorOnset\");\n }",
"public void markUeTimezoneMerge() throws JNCException {\n markLeafMerge(\"ueTimezone\");\n }",
"public void addGOLabels(DREM_Timeiohmm.Treenode treeptr) {\n\t\tif (treeptr != null) {\n\t\t\tint nrow = rowSM.getMinSelectionIndex();\n\n\t\t\tif (nrow >= 0) {\n\t\t\t\ttheDREMGui.bapplygolabels = true;\n\t\t\t\tint nmatch = 0;\n\t\t\t\tint ncandidate = 0;\n\t\t\t\tdouble dpval;\n\t\t\t\tHashSet hsGO;\n\t\t\t\tGoAnnotations tga = theDREMGui.theTimeiohmm.theDataSet.tga;\n\n\t\t\t\tString szGO = (String) sorter.getValueAt(nrow, 0);\n\n\t\t\t\tif (!bsplitgolabels) {\n\t\t\t\t\tfor (int ngene = 0; ngene < treeptr.bInNode.length; ngene++) {\n\t\t\t\t\t\tif (treeptr.bInNode[ngene]\n\t\t\t\t\t\t\t\t&& (ballgenes || theDREMGui.bTFVisible[ngene]\n\t\t\t\t\t\t\t\t\t\t&& theDREMGui.bSetVisible[ngene])) {\n\t\t\t\t\t\t\tncandidate++;\n\t\t\t\t\t\t\tif (theDREMGui.bGOVisible[ngene]) {\n\t\t\t\t\t\t\t\tnmatch++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tint ncategoryall = ((Integer) tga.htFullCount.get(szGO))\n\t\t\t\t\t\t\t.intValue();\n\t\t\t\t\tint nval = nmatch - 1;\n\n\t\t\t\t\tdpval = StatUtil.hypergeometrictail(nval, ncategoryall,\n\t\t\t\t\t\t\ttga.numtotalgenes - ncategoryall, ncandidate);\n\n\t\t\t\t\tif (dpval <= dgopval) {\n\t\t\t\t\t\ttreeptr.szgolabel = nmatch + \";\"\n\t\t\t\t\t\t\t\t+ Util.doubleToSz(dpval);\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttreeptr.szgolabel = \"\";\n\t\t\t\t\t}\n\t\t\t\t} else if ((treeptr.parent != null)\n\t\t\t\t\t\t&& (treeptr.parent.numchildren >= 2)) {\n\t\t\t\t\tint nparentbase = 0;\n\t\t\t\t\tint nparentcategory = 0;\n\n\t\t\t\t\tfor (int ngene = 0; ngene < treeptr.bInNode.length; ngene++) {\n\t\t\t\t\t\tif (treeptr.parent.bInNode[ngene]) {\n\t\t\t\t\t\t\tnparentbase++;\n\t\t\t\t\t\t\tif (theDREMGui.bGOVisible[ngene]) {\n\t\t\t\t\t\t\t\tnparentcategory++;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (ballgenes\n\t\t\t\t\t\t\t\t\t|| (theDREMGui.bTFVisible[ngene] && theDREMGui.bSetVisible[ngene])) {\n\t\t\t\t\t\t\t\tif (treeptr.bInNode[ngene]) {\n\t\t\t\t\t\t\t\t\tncandidate++;\n\t\t\t\t\t\t\t\t\tif (theDREMGui.bGOVisible[ngene]) {\n\t\t\t\t\t\t\t\t\t\tnmatch++;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tint nval = nmatch - 1;\n\n\t\t\t\t\tdpval = StatUtil.hypergeometrictail(nval, nparentcategory,\n\t\t\t\t\t\t\tnparentbase - nparentcategory, ncandidate);\n\t\t\t\t\tif (dpval <= dgopval) {\n\t\t\t\t\t\ttreeptr.szgolabel = nmatch + \";\"\n\t\t\t\t\t\t\t\t+ Util.doubleToSz(dpval);\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttreeptr.szgolabel = \"\";\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\ttreeptr.szgolabel = \"\";\n\t\t\t\t}\n\n\t\t\t\ttreeptr.goText.setText(treeptr.szgolabel);\n\t\t\t\tfor (int nchild = 0; nchild < treeptr.numchildren; nchild++) {\n\t\t\t\t\taddGOLabels(treeptr.nextptr[nchild]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public void markNextHopIpv4GwAddr2Replace() throws JNCException {\n markLeafReplace(\"nextHopIpv4GwAddr2\");\n }",
"public void markLocalConfigApnReplace() throws JNCException {\n markLeafReplace(\"localConfigApn\");\n }",
"private void labelAbdomen2D() {\r\n // fill up the slice buffer\r\n try {\r\n srcImage.exportData(0, sliceSize, sliceBuffer);\r\n } catch (IOException ex) {\r\n System.err.println(\"PlugInAlgorithmCTAbdomen.labelAbdomen2D(): Error exporting data\");\r\n return;\r\n }\r\n\r\n // find a seed point inside the subcutaneous fat for a region grow\r\n boolean found = false;\r\n int seedX = 0, seedY = 0;\r\n short seedVal = 0;\r\n for (int idx = 0, y = 0; !found && y < yDim; y++) {\r\n for (int x = 0; x < xDim; x++, idx++) {\r\n // search for a fat pixel. These are Hounsfield units\r\n if (sliceBuffer[idx] > -90 && sliceBuffer[idx] < -30) {\r\n seedX = x;\r\n seedY = y;\r\n seedVal = sliceBuffer[idx];\r\n found = true;\r\n break;\r\n }\r\n } // end for (int x = 0; ...)\r\n } // end for int idx = 0, y = 0; ...)\r\n\r\n if (seedX < 0 || seedX >= xDim || seedY < 0 || seedY >= yDim) {\r\n MipavUtil.displayError(\"PlugInAlgorithmCTAbdomen.labelAbdomen2D(): Failed to find a seed location for the region grow\");\r\n return;\r\n }\r\n\r\n// ViewUserInterface.getReference().getMessageFrame().append(\"Seed Location: \" +seedX +\" \" +seedY +\" intensity: \" +seedVal);\r\n \r\n AlgorithmRegionGrow regionGrowAlgo = new AlgorithmRegionGrow(srcImage, 1.0f, 1.0f);\r\n regionGrowAlgo.setRunningInSeparateThread(false);\r\n\r\n // under segment so that we do not get the blanket\r\n regionGrowAlgo.regionGrow2D(volumeBitSet, new Point(seedX, seedY), -1,\r\n false, false, null, seedVal - 75,\r\n seedVal + 1500, -1, -1, false);\r\n \r\n // make the abdominal label image from the volume BitSet determined in the region grow\r\n for (int idx = 0; idx < sliceSize; idx++) {\r\n if (volumeBitSet.get(idx)) {\r\n sliceBuffer[idx] = abdomenTissueLabel;\r\n } else {\r\n sliceBuffer[idx] = 0;\r\n }\r\n } // end for (int idx = 0; ...)\r\n\r\n // save the sliceBuffer into the abdomenImage\r\n try {\r\n abdomenImage.importData(0, sliceBuffer, false);\r\n } catch (IOException ex) {\r\n System.err.println(\"labelAbdomen2D(): Error importing data\");\r\n }\r\n// ShowImage(abdomenImage, \"Region Grown image\");\r\n\r\n // do a mathematical morphology closing operation to fill the small gaps\r\n closeImage(abdomenImage);\r\n// ShowImage(abdomenImage, \"closed image\");\r\n \r\n // update the volumeBitSet to match the closed abdomenImage\r\n // This needs to happen if we are going to find the VOI's with a region grow technique\r\n // that uses the volumeBitSet\r\n\r\n try {\r\n abdomenImage.exportData(0, sliceSize, sliceBuffer);\r\n } catch (IOException ex) {\r\n System.err.println(\"Error exporting data\");\r\n return;\r\n }\r\n volumeBitSet.clear();\r\n for (int idx = 0; idx < sliceSize; idx++) {\r\n if (sliceBuffer[idx] == abdomenTissueLabel) {\r\n volumeBitSet.set(idx);\r\n }\r\n } // end for (int idx = 0; ...)\r\n\r\n }",
"public void replaceNodes() {\n for (ConstantPropagationInformation information : constantPropagations) {\n information.parent.getChildren().set(information.childIndex, information.replacement);\n }\n }",
"@Override\r\n\tpublic void displayLabel() {\n\t\tSystem.out.println(\"Syrup should be handled with care\");\r\n\t}",
"public void markCriticalAbateReplace() throws JNCException {\n markLeafReplace(\"criticalAbate\");\n }",
"public void markFullDomainNameMerge() throws JNCException {\n markLeafMerge(\"fullDomainName\");\n }",
"private void fixReferringAnnotations(final BwEvent val) throws CalFacadeException {\n HibSession sess = getSess();\n\n for (BwEventAnnotation ev: getAnnotations(val, false)) {\n /* The recursive call is intended to allow annotations to annotatiuons.\n * Unfortunately this in't going to work as the reference in the\n * annotation class is always to the master event. We need an extra column\n * which allows chaining to an annotation\n */\n // XXX fix this fixReferringAnnotations(ev);\n\n // Force a fetch of the attendees - we need to look at them later\n ev.getAttendees();\n\n //if (ev.getAttendees() != null) {\n // ev.getAttendees().clear();\n //}\n sess.delete(ev);\n }\n }",
"public void updateLabelsAndCharts() {\n\t\terror.setText(\"\");\r\n\t\tPerson p = this.listviewPersons.getSelectionModel().getSelectedItem();\r\n\t\tif (p == null) {\r\n\t\t\tdots.setText(\"\");\r\n\t\t} else {\r\n\t\t\tdots.setText(dotsReadable(p));\r\n\t\t\tif (personToData.containsKey(p)) {\r\n\t\t\t\tData<String, Integer> d = personToData.get(p);\r\n\t\t\t\td.setYValue(p.getDots());\r\n\t\t\t}\r\n\t\t\tif (personToPiechartData.containsKey(p)) {\r\n\t\t\t\tPieChart.Data pd = personToPiechartData.get(p);\r\n\t\t\t\tpd.setPieValue(Math.max(p.getDots(), 0));\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"@Override\r\n public void visitLabel(final Label arg0) {\r\n lab = arg0;\r\n }",
"@Override\n\t\tpublic void addLabel(Label label) {\n\n\t\t}",
"private void computeConflicts() {\n\t\tthis.conflictGraph = new HashMap<Class, List<Class>>();\n\n\t\tfor (Class c : this.core) {\n\t\t\tif (c.getSuperClasses().size() >= 2) {\n\n\t\t\t\tList<List<Class>> linExts = new ArrayList<List<Class>>();\n\t\t\t\tfor (int i = 0; i < c.getSuperClasses().size(); i++) {\n\t\t\t\t\tlinExts.add(this.linearExts.get(c.getSuperClasses().get(i)));\n\t\t\t\t\tlinExts.get(i).add(c.getSuperClasses().get(i));\n\t\t\t\t}\n\n\t\t\t\tList<HashSet<Class>> diffs = new ArrayList<HashSet<Class>>();\n\n\t\t\t\t// Compute lini - linj for all i != j\n\t\t\t\tfor (List<Class> linExt : linExts) {\n\t\t\t\t\tfor (List<Class> linExt2 : linExts) {\n\t\t\t\t\t\tif (linExt != linExt2) {\n\t\t\t\t\t\t\tHashSet<Class> diff = new HashSet<Class>();\n\t\t\t\t\t\t\tfor (Class p : linExt2) {\n\t\t\t\t\t\t\t\tif (!linExt.contains(p))\n\t\t\t\t\t\t\t\t\tdiff.add(p);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdiffs.add(diff);\n\n\t\t\t\t\t\t\tdiff = new HashSet<Class>();\n\t\t\t\t\t\t\tfor (Class p : linExt) {\n\t\t\t\t\t\t\t\tif (!linExt2.contains(p))\n\t\t\t\t\t\t\t\t\tdiff.add(p);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdiffs.add(diff);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Compute conflicts di * dj for all j != i\n\t\t\t\tfor (HashSet<Class> diff : diffs) {\n\t\t\t\t\tfor (HashSet<Class> diff2 : diffs) {\n\t\t\t\t\t\tif (diff != diff2) {\n\t\t\t\t\t\t\tfor (Class c1 : diff) {\n\t\t\t\t\t\t\t\tList<Class> conflicts = new ArrayList<Class>();\n\t\t\t\t\t\t\t\tif (this.conflictGraph.containsKey(c1))\n\t\t\t\t\t\t\t\t\tconflicts = this.conflictGraph.get(c1);\n\n\t\t\t\t\t\t\t\tfor (Class c2 : diff2) {\n\t\t\t\t\t\t\t\t\tconflicts.add(c2);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tthis.conflictGraph.put(c1, conflicts);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"protected void cleanupFigureLabelEditor()\n {\n if (editor != null) {\n editor.cleanup();\n }\n }",
"public void markNextHopIpv4GwAddr1Replace() throws JNCException {\n markLeafReplace(\"nextHopIpv4GwAddr1\");\n }",
"@Override\n protected void refreshVisuals() {\n getFigure().updateLabels();\n }",
"@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n @Test(timeout = 5000)\n public void testAddReplaceRemoveLabelsOnNodes() throws Exception {\n boolean caught = false;\n try {\n mgr.replaceLabelsOnNode(ImmutableMap.of(toNodeId(\"node\"), NodeLabelTestBase.toSet(\"label\")));\n } catch (IOException e) {\n caught = true;\n }\n Assert.assertTrue((\"trying to set a label to a node but \" + \"label doesn't exist in repository should fail\"), caught);\n // set a label on a node, but node is null or empty\n try {\n mgr.replaceLabelsOnNode(ImmutableMap.of(toNodeId(NO_LABEL), NodeLabelTestBase.toSet(\"label\")));\n } catch (IOException e) {\n caught = true;\n }\n Assert.assertTrue(\"trying to add a empty node but succeeded\", caught);\n // set node->label one by one\n addToCluserNodeLabelsWithDefaultExclusivity(NodeLabelTestBase.toSet(\"p1\", \"p2\", \"p3\"));\n mgr.replaceLabelsOnNode(ImmutableMap.of(toNodeId(\"n1\"), NodeLabelTestBase.toSet(\"p1\")));\n mgr.replaceLabelsOnNode(ImmutableMap.of(toNodeId(\"n1\"), NodeLabelTestBase.toSet(\"p2\")));\n mgr.replaceLabelsOnNode(ImmutableMap.of(toNodeId(\"n2\"), NodeLabelTestBase.toSet(\"p3\")));\n NodeLabelTestBase.assertMapEquals(getNodeLabels(), ImmutableMap.of(toNodeId(\"n1\"), NodeLabelTestBase.toSet(\"p2\"), toNodeId(\"n2\"), NodeLabelTestBase.toSet(\"p3\")));\n NodeLabelTestBase.assertMapEquals(mgr.lastNodeToLabels, ImmutableMap.of(toNodeId(\"n2\"), NodeLabelTestBase.toSet(\"p3\")));\n // set bunch of node->label\n replaceLabelsOnNode(((Map) (ImmutableMap.of(toNodeId(\"n3\"), NodeLabelTestBase.toSet(\"p3\"), toNodeId(\"n1\"), NodeLabelTestBase.toSet(\"p1\")))));\n NodeLabelTestBase.assertMapEquals(getNodeLabels(), ImmutableMap.of(toNodeId(\"n1\"), NodeLabelTestBase.toSet(\"p1\"), toNodeId(\"n2\"), NodeLabelTestBase.toSet(\"p3\"), toNodeId(\"n3\"), NodeLabelTestBase.toSet(\"p3\")));\n NodeLabelTestBase.assertMapEquals(mgr.lastNodeToLabels, ImmutableMap.of(toNodeId(\"n3\"), NodeLabelTestBase.toSet(\"p3\"), toNodeId(\"n1\"), NodeLabelTestBase.toSet(\"p1\")));\n /* n1: p1 \n n2: p3 \n n3: p3\n */\n // remove label on node\n mgr.removeLabelsFromNode(ImmutableMap.of(toNodeId(\"n1\"), NodeLabelTestBase.toSet(\"p1\")));\n NodeLabelTestBase.assertMapEquals(getNodeLabels(), ImmutableMap.of(toNodeId(\"n2\"), NodeLabelTestBase.toSet(\"p3\"), toNodeId(\"n3\"), NodeLabelTestBase.toSet(\"p3\")));\n NodeLabelTestBase.assertMapEquals(mgr.lastNodeToLabels, ImmutableMap.of(toNodeId(\"n1\"), EMPTY_STRING_SET));\n // add label on node\n mgr.addLabelsToNode(ImmutableMap.of(toNodeId(\"n1\"), NodeLabelTestBase.toSet(\"p1\")));\n NodeLabelTestBase.assertMapEquals(getNodeLabels(), ImmutableMap.of(toNodeId(\"n1\"), NodeLabelTestBase.toSet(\"p1\"), toNodeId(\"n2\"), NodeLabelTestBase.toSet(\"p3\"), toNodeId(\"n3\"), NodeLabelTestBase.toSet(\"p3\")));\n NodeLabelTestBase.assertMapEquals(mgr.lastNodeToLabels, ImmutableMap.of(toNodeId(\"n1\"), NodeLabelTestBase.toSet(\"p1\")));\n // remove labels on node\n mgr.removeLabelsFromNode(ImmutableMap.of(toNodeId(\"n1\"), NodeLabelTestBase.toSet(\"p1\"), toNodeId(\"n2\"), NodeLabelTestBase.toSet(\"p3\"), toNodeId(\"n3\"), NodeLabelTestBase.toSet(\"p3\")));\n Assert.assertEquals(0, getNodeLabels().size());\n NodeLabelTestBase.assertMapEquals(mgr.lastNodeToLabels, ImmutableMap.of(toNodeId(\"n1\"), EMPTY_STRING_SET, toNodeId(\"n2\"), EMPTY_STRING_SET, toNodeId(\"n3\"), EMPTY_STRING_SET));\n }",
"public void markUeTimezoneReplace() throws JNCException {\n markLeafReplace(\"ueTimezone\");\n }",
"private Collection<ConceptLabel> createConceptLabels(Concept concept, int offset) {\n\t\t//int offset = concept.getOffset();\n\t\tList<ConceptLabel> labels = new ArrayList<ConceptLabel>();\n\t\t// add annotation the new way\n\t\tfor(Annotation a: concept.getAnnotations()){\n\t\t\tConceptLabel lbl = new ConceptLabel(a.getText(), offset + a.getOffset());\n\t\t\tlbl.setConcept(concept);\n\t\t\tlbl.setReportPanel(reportInterface);\n\t\t\tlbl.setColor(Color.black);\n\t\t\tlabels.add(lbl);\n\t\t}\n\t\t\n\t\t\n\t\treturn labels;\n\t}",
"@Override\n protected void update() {\n if (Pneumatics.get_instance().get_solenoids() && in_inner_thresh()) {\n Pneumatics.get_instance().set_solenoids(false);\n }\n }",
"private void buildLabelLocs() {\n this.labelLocs = new HashMap<String, Integer>();\n for (int n = 0; n < this.code.size(); n++) {\n TACOp op = this.code.get(n);\n if (op.getType() == TACOpType.LABEL) {\n this.labelLocs.put(op.getLabel(), n);\n }\n }\n }",
"public void useUpdateLabel(boolean useUpdateLabel){\n\t\tthis.useUpdateLabel=useUpdateLabel;\n\t}",
"public void apply() {\n this.vgcomponent.setFont( this.fontchooser.getSelectedFont() );\n this.vgcomponent.setFontcolor( this.fontcolor.getColor() );\n\n if( this.vgcomponent instanceof VisualEdge ) {\n VisualEdge vEdge = (VisualEdge) this.vgcomponent;\n vEdge.getEdge().setFollowVertexLabel( this.followLabel.isSelected() );\n if( !this.followLabel.isSelected() ) {\n vEdge.getEdge().setLabel( this.textarea.getText() );\n }\n }\n else {\n this.vgcomponent.setLabel( this.textarea.getText() );\n }\n }",
"private void setLabelValidCode() {\n\t\tLabelValidCode.setBounds(90, 180, 180, 30);\n\t}",
"private void setTextboxesToContainedData()\n {\n updateWeightTextFieldToStored(\"failure loading default\");\n updateSpriteTextFieldToStored(\"failure loading default\");\n }",
"public Value replaceObjectLabel(ObjectLabel oldlabel, ObjectLabel newlabel) {\n if (oldlabel.equals(newlabel))\n throw new AnalysisException(\"Equal object labels not expected\");\n if ((object_labels == null || !object_labels.contains(oldlabel)) &&\n (getters == null || !getters.contains(oldlabel)) &&\n (setters == null || !setters.contains(oldlabel)))\n return this;\n Value r = new Value(this);\n if (object_labels != null) {\n Set<ObjectLabel> newobjlabels = newSet(object_labels);\n newobjlabels.remove(oldlabel);\n newobjlabels.add(newlabel);\n r.object_labels = newobjlabels;\n }\n if (getters != null) {\n Set<ObjectLabel> newgetters = newSet(getters);\n newgetters.remove(oldlabel);\n newgetters.add(newlabel);\n r.getters = newgetters;\n }\n if (setters != null) {\n Set<ObjectLabel> newsetters = newSet(setters);\n newsetters.remove(oldlabel);\n newsetters.add(newlabel);\n r.setters = newsetters;\n }\n return canonicalize(r);\n }",
"public void markVersionMerge() throws JNCException {\n markLeafMerge(\"version\");\n }",
"@Override\n public void update() {\n conflicts.removeIf(c -> (c.getWinner() != Conflict.Side.WAR_NOT_OVER) && endWar(c));\n }",
"public void update() {\r\n icon = new SimpleIcon(layout.tag, layout.color, DiagramElement.getGlobalFontRenderer());\r\n icon.setIsModule(component.getType() != TemplateComponent.TYPE_CHANNEL);\r\n icon.setFlagged(component.hasModel() && component.getModel().hasAnnotation(FLAG_MARK));\r\n int maxWidth = 3 * icon.getIconWidth();\r\n String[] words = layout.label.split(\" \");\r\n Vector<String> lines = new Vector<String>();\r\n int wordsConsumed = 0;\r\n while (wordsConsumed < words.length) {\r\n String line = \"\";\r\n int i;\r\n for (i = wordsConsumed; i < words.length; ++i) {\r\n line += words[i];\r\n if (getGlobalFontMetrics().stringWidth(line) > maxWidth) {\r\n break;\r\n }\r\n line += \" \";\r\n }\r\n if (i == words.length) // all left-over words fit\r\n {\r\n line = line.substring(0, line.length() - 1);\r\n lines.add(line);\r\n wordsConsumed = words.length;\r\n } else\r\n // some left-over words didn't fit\r\n {\r\n if (i == wordsConsumed) // the first left-over word was too long\r\n {\r\n lines.add(line);\r\n wordsConsumed++;\r\n } else\r\n // at least one left-over word fit\r\n {\r\n line = line.substring(0, line.lastIndexOf(\" \"));\r\n lines.add(line);\r\n wordsConsumed = i;\r\n }\r\n }\r\n }\r\n labelBox = new LabelBox(lines);\r\n int deltaX = -(labelBox.width / 2);\r\n int deltaY = icon.getIconHeight() / 2 + LABEL_SPACING;\r\n labelBox.x = layout.location.x + deltaX;\r\n labelBox.y = layout.location.y + deltaY;\r\n ports[0] = new Ellipse2D.Float(layout.location.x - icon.getIconWidth() / 2 - 2 * PORT_RADIUS - 1,\r\n layout.location.y - PORT_RADIUS, 2 * PORT_RADIUS, 2 * PORT_RADIUS);\r\n ports[1] = new Ellipse2D.Float(layout.location.x - PORT_RADIUS,\r\n layout.location.y - icon.getIconHeight() / 2 - 2 * PORT_RADIUS - 1, 2 * PORT_RADIUS, 2 * PORT_RADIUS);\r\n ports[2] = new Ellipse2D.Float(layout.location.x + icon.getIconWidth() / 2 + 1, layout.location.y - PORT_RADIUS,\r\n 2 * PORT_RADIUS, 2 * PORT_RADIUS);\r\n ports[3] = new Ellipse2D.Float(layout.location.x - PORT_RADIUS, (int) labelBox.getMaxY() + 1, 2 * PORT_RADIUS,\r\n 2 * PORT_RADIUS);\r\n if (component.getType() == TemplateComponent.TYPE_CHANNEL) {\r\n supHalo = new Ellipse2D.Float(layout.location.x + icon.getIconWidth() / 4,\r\n layout.location.y - icon.getIconHeight() / 4 - 2 * HALO_RADIUS, 2 * HALO_RADIUS, 2 * HALO_RADIUS);\r\n haloDX = -getGlobalFontMetrics().stringWidth(HALO_LABEL) / 2 + 1;\r\n haloDY = getGlobalFontMetrics().getAscent() / 2;\r\n }\r\n computeBounds();\r\n }",
"public void markIpAddress1Replace() throws JNCException {\n markLeafReplace(\"ipAddress1\");\n }",
"public void limpiarLabelsVacios() {\r\n label_nombre.setText(\"\");\r\n label_horas_teoria.setText(\"\");\r\n label_horas_practica.setText(\"\");\r\n label_creditos.setText(\"\");\r\n }",
"@Override\n public void setLabel(String arg0)\n {\n \n }",
"protected void labelClear(){\n N11.setText(null);N12.setText(null);N13.setText(null);N14.setText(null);\n N21.setText(null);N22.setText(null);N23.setText(null);N24.setText(null);\n N31.setText(null);N32.setText(null);N33.setText(null);N34.setText(null);\n N41.setText(null);N42.setText(null);N43.setText(null);N44.setText(null);\n n11.setText(null);n12.setText(null);n13.setText(null);n14.setText(null);\n n21.setText(null);n22.setText(null);n23.setText(null);n24.setText(null);\n n31.setText(null);n32.setText(null);n33.setText(null);n34.setText(null);\n n41.setText(null);n42.setText(null);n43.setText(null);n44.setText(null);\n G11.setText(null);G12.setText(null);G13.setText(null);G14.setText(null);\n G21.setText(null);G22.setText(null);G23.setText(null);G24.setText(null);\n G31.setText(null);G32.setText(null);G33.setText(null);G34.setText(null);\n G41.setText(null);G42.setText(null);G43.setText(null);G44.setText(null);\n g11.setText(null);g12.setText(null);g13.setText(null);g14.setText(null);\n g21.setText(null);g22.setText(null);g23.setText(null);g24.setText(null);\n g31.setText(null);g32.setText(null);g33.setText(null);g34.setText(null);\n g41.setText(null);g42.setText(null);g43.setText(null);g44.setText(null);\n E11.setText(null);E12.setText(null);E13.setText(null);E14.setText(null);\n E21.setText(null);E22.setText(null);E23.setText(null);E24.setText(null);\n E31.setText(null);E32.setText(null);E33.setText(null);E34.setText(null);\n E41.setText(null);E42.setText(null);E43.setText(null);E44.setText(null);\n e11.setText(null);e12.setText(null);e13.setText(null);e14.setText(null);\n e21.setText(null);e22.setText(null);e23.setText(null);e24.setText(null);\n e31.setText(null);e32.setText(null);e33.setText(null);e34.setText(null);\n e41.setText(null);e42.setText(null);e43.setText(null);e44.setText(null);\n }",
"protected void applyAnnotationStatusLabel(Annotation annotation) {\r\n // check for a colour label.\r\n\r\n ArrayList<DragDropColorList.ColorLabel> colorLabels = DragDropColorList.retrieveColorLabels();\r\n String colorLabelString = null;\r\n if (colorLabels != null) {\r\n for (DragDropColorList.ColorLabel colorLabel : colorLabels) {\r\n if (annotation.getColor() != null && colorLabel.getColor().equals(annotation.getColor())) {\r\n colorLabelString = colorLabel.getLabel();\r\n break;\r\n }\r\n }\r\n }\r\n StringBuilder statusLabel = new StringBuilder();\r\n // append private/public start.\r\n if (PRIVATE_PROPERTY_ENABLED) {\r\n if (annotation.getFlagPrivateContents()) {\r\n statusLabel.append(messageBundle.getString(\"viewer.utilityPane.markupAnnotation.view.privateToggleButton.label\"));\r\n } else {\r\n statusLabel.append(messageBundle.getString(\"viewer.utilityPane.markupAnnotation.view.publicToggleButton.label\"));\r\n }\r\n }\r\n if (colorLabelString != null) {\r\n if (PRIVATE_PROPERTY_ENABLED) statusLabel.append(\" | \");\r\n statusLabel.append(colorLabelString);\r\n }\r\n if (statusLabel.length() > 0) {\r\n markupAnnotationHandlerPanel.setProgressLabel(statusLabel.toString());\r\n }\r\n }",
"public void markGUVectorLimitReplace() throws JNCException {\n markLeafReplace(\"gUVectorLimit\");\n }",
"@Test\n\tpublic void testForwardNonFrameBlockSubstitution() throws InvalidGenomeChange {\n\t\tGenomeChange change1 = new GenomeChange(new GenomePosition(refDict, '+', 1, 6642114, PositionType.ZERO_BASED),\n\t\t\t\t\"TAAACA\", \"GTT\");\n\t\tAnnotation annotation1 = new BlockSubstitutionAnnotationBuilder(infoForward, change1).build();\n\t\tAssert.assertEquals(infoForward.accession, annotation1.transcript.accession);\n\t\tAssert.assertEquals(AnnotationLocation.INVALID_RANK, annotation1.annoLoc.rank);\n\t\tAssert.assertEquals(\"c.691-3_693delinsGTT\", annotation1.ntHGVSDescription);\n\t\tAssert.assertEquals(\"p.Trp231Val\", annotation1.aaHGVSDescription);\n\t\tAssert.assertEquals(ImmutableSortedSet.of(VariantType.NON_FS_SUBSTITUTION, VariantType.SPLICE_ACCEPTOR),\n\t\t\t\tannotation1.effects);\n\n\t\t// deletion of three codons, insertion of one\n\t\tGenomeChange change2 = new GenomeChange(new GenomePosition(refDict, '+', 1, 6642126, PositionType.ZERO_BASED),\n\t\t\t\t\"GTGGTTCAA\", \"ACC\");\n\t\tAnnotation annotation2 = new BlockSubstitutionAnnotationBuilder(infoForward, change2).build();\n\t\tAssert.assertEquals(infoForward.accession, annotation2.transcript.accession);\n\t\tAssert.assertEquals(2, annotation2.annoLoc.rank);\n\t\tAssert.assertEquals(\"c.700_708delinsACC\", annotation2.ntHGVSDescription);\n\t\tAssert.assertEquals(\"p.Val234_Gln236delinsThr\", annotation2.aaHGVSDescription);\n\t\tAssert.assertEquals(ImmutableSortedSet.of(VariantType.NON_FS_SUBSTITUTION), annotation2.effects);\n\n\t\t// deletion of three codons, insertion of one, includes truncation of replacement ref from the right\n\t\tGenomeChange change3 = new GenomeChange(new GenomePosition(refDict, '+', 1, 6642134, PositionType.ZERO_BASED),\n\t\t\t\t\"AGTGGAGGAT\", \"CTT\");\n\t\tAnnotation annotation3 = new BlockSubstitutionAnnotationBuilder(infoForward, change3).build();\n\t\tAssert.assertEquals(infoForward.accession, annotation3.transcript.accession);\n\t\tAssert.assertEquals(2, annotation3.annoLoc.rank);\n\t\tAssert.assertEquals(\"c.708_716delinsCT\", annotation3.ntHGVSDescription);\n\t\tAssert.assertEquals(\"p.Gln236Hisfs*16\", annotation3.aaHGVSDescription);\n\t\tAssert.assertEquals(ImmutableSortedSet.of(VariantType.FS_SUBSTITUTION), annotation3.effects);\n\t}",
"public void updateSpecialLabel(Special currSpecial) {\n switch (currSpecial){\n case REVERSE:\n specialLabel.setText(\"Special Type: Reverse\");\n break;\n case SKIP:\n specialLabel.setText(\"Special Type: Skip\");\n break;\n case DRAWTWO:\n specialLabel.setText(\"Special Type: Draw Two\");\n break;\n case WILD:\n specialLabel.setText(\"Special Type: Wild\");\n break;\n case WILDDRAWFOUR:\n specialLabel.setText(\"Special Type: Wild Draw Four\");\n break;\n case NONE:\n specialLabel.setText(\"Special Type: \");\n }\n }",
"public void forceReasonerReSynchronization();",
"public void setStickyLabels() {\n RenderContext myrc = (RenderContext) rc; if (myrc == null) return;\n Set<String> sel = myrc.filterEntities(getRTParent().getSelectedEntities());\n if (sel != null) {\n if (last_shft_down && last_ctrl_down) { /* Intersect */ sticky_labels.retainAll(sel);\n } else if (last_shft_down) { /* Subtract */ sticky_labels.removeAll(sel);\n } else if (last_ctrl_down) { /* Add */ sticky_labels.addAll(sel);\n } else { /* Set/Clear */ sticky_labels.clear(); sticky_labels.addAll(sel); }\n }\n getRTComponent().render(); repaint();\n }",
"private void populateLabels() {\n CalculatorGraphConfig graphConfig = this.runner.getCalculatorGraphConfig();\n\n boolean foundTensorsToSegmentation = false;\n for (CalculatorGraphConfig.Node node : graphConfig.getNodeList()) {\n if (node.getName().contains(TENSORS_TO_SEGMENTATION_CALCULATOR_NAME)) {\n if (foundTensorsToSegmentation) {\n throw new MediaPipeException(\n MediaPipeException.StatusCode.INTERNAL.ordinal(),\n \"The graph has more than one mediapipe.tasks.TensorsToSegmentationCalculator.\");\n }\n foundTensorsToSegmentation = true;\n TensorsToSegmentationCalculatorOptionsProto.TensorsToSegmentationCalculatorOptions options =\n node.getOptions()\n .getExtension(\n TensorsToSegmentationCalculatorOptionsProto\n .TensorsToSegmentationCalculatorOptions.ext);\n for (int i = 0; i < options.getLabelItemsMap().size(); i++) {\n Long labelKey = Long.valueOf(i);\n if (!options.getLabelItemsMap().containsKey(labelKey)) {\n throw new MediaPipeException(\n MediaPipeException.StatusCode.INTERNAL.ordinal(),\n \"The lablemap have no expected key: \" + labelKey);\n }\n labels.add(options.getLabelItemsMap().get(labelKey).getName());\n }\n }\n }\n }",
"public ArrayList<Clause> solve() {\n for (Clause c : clauses) {\n for (CLiteral l : c.getCLiterals()) {\n if (labels.get(l.getName()) == null)\n labels.put(l.getName(), -1);\n }\n }\n init();\n\n return (ArrayList<Clause>) conflicts;\n }",
"public void markMinorAbateMerge() throws JNCException {\n markLeafMerge(\"minorAbate\");\n }",
"public void conflict(Object arg0) {\n\n\t}",
"@Override\n\tpublic String extendCode(String initialSvgString, Label label) {\n\n\t\t//comment\n\t\tString commentString = createComment(label);\n\n\t\t//label image\n\t\tString imageSvgString = createImageSvgStringFromLabel(label);\n\n\t\t//text\n\t\tString text = label.getText();\n\n\t\t//background color\n\t\tString backgroundFill = determineBackgroundFill(label);\n\t\tboolean hasBackground = backgroundFill != null;\n\n\t\t//x & y\n\t\tList<Node> childNodes = label.getChildrenUnmodifiable();\n\t\tText textNode = null;\n\t\tfor (Node childNode : childNodes) {\n\t\t\tboolean isText = childNode instanceof Text;\n\t\t\tif (isText) {\n\t\t\t\ttextNode = (Text) childNode;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tObjects.requireNonNull(textNode, \"Could not retrive Text node from Label.\");\n\n\t\tBounds bounds = label.getBoundsInParent();\n\t\tDouble xl = bounds.getMinX();\n\t\tDouble yl = bounds.getMinY();\n\n\t\tBounds textBounds = textNode.getBoundsInParent();\n\t\tDouble xt = textBounds.getMinX();\n\t\tDouble yt = textBounds.getMinY();\n\n\t\tDouble x = xl + xt;\n\t\tDouble yField = yl + yt;\n\n\t\t//Bounds bounds = label.getBoundsInParent();\n\t\t//Double x = bounds.getMinX();\n\t\tboolean hasImage = !imageSvgString.isEmpty();\n\t\tif (hasImage) {\n\t\t\tNode image = label.getGraphic();\n\t\t\tDouble xOffset = image.getBoundsInParent().getMaxX();\n\t\t\tx = x + xOffset;\n\t\t}\n\t\tDouble baseLineOffset = label.getBaselineOffset();\n\t\tDouble y = yField + baseLineOffset;\n\n\t\t//font\n\t\tFont font = label.getFont();\n\t\tString fontFamily = font.getFamily();\n\t\tDouble fontSize = font.getSize();\n\n\t\t//font color\n\t\tPaint textFill = label.getTextFill();\n\t\tString fill = paintToColorString(textFill);\n\n\t\t//text anchor (horizontal alignment)\n\t\tSvgTextAnchor textAnchor = determineTextAnchor(label);\n\n\t\t//comment\n\t\tString svgString = commentString;\n\n\t\t//<rect> start\n\t\tboolean wrapInRect = hasImage || hasBackground;\n\t\tif (wrapInRect) {\n\t\t\tsvgString = includeRectStartTag(svgString, imageSvgString, backgroundFill, hasBackground, textBounds);\n\t\t}\n\n\t\t//<text> start\n\t\tsvgString = includeTextStartTag(svgString, x, y, fontFamily, fontSize, fill, textAnchor);\n\n\t\t//<text> content\n\t\tsvgString = svgString + text;\n\n\t\t//<text> end\n\t\tsvgString = svgString + \"</text>\\n\\n\";\n\n\t\t//<rect> end\n\t\tif (wrapInRect) {\n\t\t\tdecreaseIndentation();\n\t\t\tsvgString = includeRectEndTag(svgString);\n\t\t}\n\n\t\treturn svgString;\n\n\t}"
] | [
"0.61427057",
"0.59990364",
"0.5853134",
"0.5827331",
"0.56002086",
"0.5599477",
"0.55594283",
"0.55007297",
"0.5436851",
"0.5421966",
"0.5421096",
"0.52695507",
"0.5247519",
"0.5246452",
"0.52197236",
"0.52147305",
"0.5212293",
"0.5209359",
"0.5209242",
"0.5209242",
"0.5148378",
"0.5133094",
"0.51255196",
"0.5115948",
"0.5115948",
"0.5100539",
"0.5100122",
"0.50983465",
"0.5096363",
"0.5094362",
"0.5090645",
"0.508132",
"0.50463617",
"0.5027974",
"0.5009563",
"0.49837753",
"0.497678",
"0.4946089",
"0.4938816",
"0.49258938",
"0.4916415",
"0.48975706",
"0.4874605",
"0.48652065",
"0.48624864",
"0.48561484",
"0.48507568",
"0.48421088",
"0.4805894",
"0.47910672",
"0.47880596",
"0.47878006",
"0.47877613",
"0.47844312",
"0.47831613",
"0.4773765",
"0.47555017",
"0.47451702",
"0.4744071",
"0.47432634",
"0.4737346",
"0.47357103",
"0.47351515",
"0.47333035",
"0.47233427",
"0.47215948",
"0.47207397",
"0.47149172",
"0.4711906",
"0.47073412",
"0.4702396",
"0.47006732",
"0.47005546",
"0.470007",
"0.469419",
"0.4694046",
"0.46852648",
"0.46755886",
"0.4673671",
"0.46731335",
"0.4671449",
"0.46662167",
"0.46646076",
"0.46601897",
"0.46466205",
"0.4645597",
"0.464535",
"0.4643729",
"0.4642637",
"0.46402752",
"0.46297622",
"0.4628091",
"0.46271655",
"0.4626504",
"0.4625988",
"0.4623976",
"0.46187115",
"0.4617593",
"0.46150258",
"0.46130264"
] | 0.64100534 | 0 |
Below is a constructor but we can't use it it's just to make an appliance. | public Appliance(String type, String brandName){
this.type = type;
this.brandName = brandName;
System.out.println("Test hello");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Appliance() {\n universe = SmartGridUniverse.getInstance();\n\n }",
"public Airplane() { \n\n\t\t//The Airplane constructor calls the Flyingobject constructor\n\t\tsuper();\n\n\t\t//Sets its attributes to default values\n\t\tthis.brand = \"\";\n\t\tthis.price = 0.0; \n\t\tthis.horsePower = 0; \n\t}",
"public AppliancesInfo() {\n initComponents(); \n }",
"public Airplane(String brand, double price, int horsePower) {\n\n\t\t//The parameterized Airplane constructor calls the FlyingObject default constructor\n\t\tsuper();\n\n\t\t//Sets its attributes to passed values\n\t\tthis.brand = brand;\n\t\tthis.price= price;\n\t\tthis.horsePower = horsePower;\n\t}",
"public Airplane (){\n \n }",
"public AirAndPollen() {\n\n\t}",
"public AvaliacaoRisco() {\n }",
"public Beacon() {\n method = AnalysisMethod.DEFAULT;\n }",
"private static Appliance parseAppliance(Element node) {\n String applianceId = node.element(\"identity\").getTextTrim();\n String clusterInetport = node.element(\"cluster_inetport\").getTextTrim();\n String mgmtUrl = node.element(\"mgmt_url\").getTextTrim();\n String engineUrl = node.element(\"engine_url\").getTextTrim();\n String etlUrl = node.element(\"etl_url\").getTextTrim();\n String retrievalUrl = node.element(\"retrieval_url\").getTextTrim();\n String dataRetrievalUrl = node.element(\"data_retrieval_url\").getTextTrim();\n return new Appliance(applianceId, clusterInetport, mgmtUrl, engineUrl, etlUrl, retrievalUrl,\n dataRetrievalUrl);\n }",
"public Ambulance() {\n\t}",
"public EspressoDrink(){\t\n\t}",
"public SystematicAcension_by_LiftingTechnology() {\n\n\t}",
"protected Betaling()\r\n\t{\r\n\t\t\r\n\t}",
"public BasicAppInfo() {\n super();\n }",
"public WallAnt()\n {\n health = 4;\n cost = 4;\n }",
"public Almacen(){}",
"public LaundryCard() {\n\t}",
"@SuppressWarnings(\"unused\")\r\n private Rental() {\r\n }",
"public AirlineCompany() {\n\t}",
"private ATCres() {\r\n // prevent to instantiate this class\r\n }",
"public RecruitingAppManagementImpl() {\n }",
"public Aanbieder() {\r\n\t\t}",
"public Application()\r\n {\r\n pSlot = new ParkingSlot();\r\n cPark = new CarPark();\r\n }",
"protected Approche() {\n }",
"public ApplicationDeltaHealthPolicy() {\n }",
"public void constructor() {\n setEdibleAnimals();\n }",
"public OVChipkaart() {\n\n }",
"public AirCondition(){}",
"public Ads() {\n }",
"private Alarms() {}",
"public Merchant() {\n\n\t}",
"public Appointment() {\r\n\t\t\t\r\n\t\t}",
"public FruitStand() {}",
"public IoTSecurityAlertedDevice() {\n }",
"public Ctacliente() {\n\t}",
"public BrowseOffenceAMClient() {\r\n }",
"public SysSkillConferpo()\n {\n }",
"public Software() {\n }",
"public MountainBike() {\n super();\n }",
"public Loyalty() {}",
"public Strawberries() {\r\n\t\tsuper(price, nutrition, name);\r\n\t}",
"Swarm createSwarm();",
"public Potencial() {\r\n }",
"public DemonstrationApp()\n {\n // Create Customers of all 3 types\n s = new Senior(\"alice\", \"123 road\", 65, \"555-5555\", 1);\n a = new Adult(\"stacy\", \"123 lane\", 65, \"555-1111\", 2);\n u = new Student(\"bob\", \"123 street\", 65, \"555-3333\", 3);\n \n //Create an account for each customer \n ca = new CheckingAccount(s,1,0);\n sa = new SavingsAccount(a,2,100);\n sav = new SavingsAccount(u,3,1000);\n \n //Create a bank\n b = new Bank();\n \n //Create a date object\n date = new Date(2019, 02, 12);\n }",
"public MonHoc() {\n }",
"public ApplicationCreator() {\n }",
"public BizFallDevice() {\n super();\n }",
"public Airplane(){\n\t\tsuper(106, 111);\n\t\tspeed = Math.random() + 2.0;\n\t}",
"public AppliedHoldInfo() {\n }",
"public Merchant() {}",
"public DABeneficios() {\n }",
"public BrokerAlgo() {}",
"public VITACareer()\r\n {\r\n }",
"public Achterbahn() {\n }",
"public BazaarApplicationImpl() {\r\n\t\tsuper();\r\n\r\n\t}",
"public AirConditioner()\n\t{\n\t\tinit();\n\t}",
"public BinaryAcceptancePolicy() {\n }",
"public ArmPayPlanConfigBootStrap() {\n }",
"public AdAmazon(com.google.appinventor.components.runtime.ComponentContainer r9) {\n /*\n r8 = this;\n r0 = r8\n r1 = r9\n r2 = r0\n r3 = r1\n r2.<init>(r3)\n r2 = r0\n r3 = 1\n r2.f542hxYOFxFjLpN1maJuWNxUV40nExCGxsxkDPOTgtzMu4zlZCQb3bPlKsXo1SYJg6ME = r3\n r2 = r0\n java.lang.String r3 = \"AdAmazon\"\n r2.TAG = r3\n r2 = r0\n java.lang.String r3 = \"AmazonPublisherId\"\n r2.KbzcIEn6WDqjdY1QBot1TMrBwhEYy4xAUKG2cbzQ22VNohlOtuBGKUJsEeMNZyEH = r3\n r2 = r0\n android.os.Handler r3 = new android.os.Handler\n r7 = r3\n r3 = r7\n r4 = r7\n r4.<init>()\n r2.androidUIHandler = r3\n r2 = r0\n r3 = 0\n r2.havePermission = r3\n r2 = r0\n r3 = 1\n r2.B8WBXPBCF2jGfUDZZU2zV5EYdqbUBu0lAZ0THCEqYyuE8VACR9dY7rDnwBIqh64T = r3\n r2 = r0\n r3 = r1\n com.google.appinventor.components.runtime.Form r3 = r3.$form()\n r2.form = r3\n r2 = r0\n com.amazon.device.ads.AdLayout r3 = new com.amazon.device.ads.AdLayout\n r7 = r3\n r3 = r7\n r4 = r7\n r5 = r1\n android.app.Activity r5 = r5.$context()\n com.amazon.device.ads.AdSize r6 = com.amazon.device.ads.AdSize.SIZE_320x50\n r4.<init>(r5, r6)\n r2.hxYOFxFjLpN1maJuWNxUV40nExCGxsxkDPOTgtzMu4zlZCQb3bPlKsXo1SYJg6ME = r3\n r2 = r0\n com.amazon.device.ads.AdLayout r2 = r2.hxYOFxFjLpN1maJuWNxUV40nExCGxsxkDPOTgtzMu4zlZCQb3bPlKsXo1SYJg6ME\n android.widget.LinearLayout$LayoutParams r3 = new android.widget.LinearLayout$LayoutParams\n r7 = r3\n r3 = r7\n r4 = r7\n r5 = -1\n r6 = -2\n r4.<init>(r5, r6)\n r2.setLayoutParams(r3)\n r2 = r1\n r3 = r0\n r2.$add(r3)\n r2 = r0\n com.amazon.device.ads.AdLayout r2 = r2.hxYOFxFjLpN1maJuWNxUV40nExCGxsxkDPOTgtzMu4zlZCQb3bPlKsXo1SYJg6ME\n r3 = r0\n r2.setListener(r3)\n r2 = r0\n r3 = 1\n r2.TestMode(r3)\n r2 = r0\n r3 = 1\n r2.RefreshAd(r3)\n r2 = r0\n com.google.appinventor.components.runtime.util.KodularContentProtection r3 = new com.google.appinventor.components.runtime.util.KodularContentProtection\n r7 = r3\n r3 = r7\n r4 = r7\n r5 = r1\n android.app.Activity r5 = r5.$context()\n r4.<init>(r5)\n r2.kodularContentProtection = r3\n r2 = r0\n com.google.appinventor.components.runtime.util.KodularContentProtection r2 = r2.kodularContentProtection\n com.google.appinventor.components.runtime.AdAmazon$1 r3 = new com.google.appinventor.components.runtime.AdAmazon$1\n r7 = r3\n r3 = r7\n r4 = r7\n r5 = r0\n r4.<init>(r5)\n r2.setOnValidationResultListener(r3)\n return\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.appinventor.components.runtime.AdAmazon.<init>(com.google.appinventor.components.runtime.ComponentContainer):void\");\n }",
"private MatterAgentClient() {}",
"public TAppAccess() {\n\t}",
"private Aspirations() {}",
"public Sandwich()\n\t{super();\n \n\t\t\n\t}",
"private static final class <init> extends com.ebay.nautilus.kernel.content.\n{\n\n public EbayAppInfo create(EbayContext ebaycontext)\n {\n return new EbayAppInfoImpl(\"com.ebay.mobile\", \"4.1.5.22\", false);\n }",
"public Equipas() {\r\n\t\t\r\n\t}",
"AgentPolicy build();",
"public WaterEradicate() {\n }",
"public CargoAirplane createRandomCargoAirplane() {\n\tthrow new RuntimeException(\"Cargo airplanes is not supported\");\n }",
"public TaxiInformationController() {\n }",
"public ServiceProviderAnimalType() {\n super();\n animalSize = AnimalSize.SMALL;\n billingType = BillingType.PER_HOUR;\n }",
"public AETinteractions() {\r\n\t}",
"public Ov_Chipkaart() {\n\t\t\n\t}",
"public Supermarket() {\n }",
"public Boat() {\n }",
"public Webinar() {\n\t\t\n\t}",
"public Brand()\n {\n\t\tsuper();\n }",
"public AlpacaAPI() {\n this(AlpacaProperties.API_VERSION_VALUE, AlpacaProperties.KEY_ID_VALUE,\n AlpacaProperties.SECRET_VALUE, AlpacaProperties.BASE_ACCOUNT_URL_VALUE,\n AlpacaProperties.BASE_DATA_URL_VALUE);\n }",
"public Airplane(Airplane other) {\n\n\t\t//The Airplane copy constructor calls the default constructor of the FLyingObject\n\t\tsuper();\n\t\tthis.brand = other.brand;\n\t\tthis.price = other.price;\n\t\tthis.horsePower = other.horsePower;\n\t}",
"public EcolawImpl(final String aLabel) {\n\t\tthis(aLabel, new ASAPRateImpl());\n\t}",
"public Anschrift() {\r\n }",
"public Archer(String archerName) {\n\tname = archerName;\n\thealth = 100;\n\tstrength = 100;\n\tdefense = 20;\n\tattack = 2.5;\n }",
"public Goodsinfo() {\n super();\n }",
"public Aso() {\n\t\tName = \"Aso\";\n\t\ttartossag = 3;\n\t}",
"public Supermarket() {\n }",
"public Offer() {\n }",
"public Offer() {\n }",
"private Aliyun() {\n\t\tsuper();\n\t}",
"public KodularChameleonAd(com.google.appinventor.components.runtime.ComponentContainer r8) {\n /*\n r7 = this;\n r0 = r7\n r1 = r8\n r2 = r0\n r3 = r1\n com.google.appinventor.components.runtime.Form r3 = r3.$form()\n r2.<init>(r3)\n r2 = r0\n r3 = r1\n com.google.appinventor.components.runtime.Form r3 = r3.$form()\n r2.form = r3\n r2 = r0\n r3 = r1\n android.app.Activity r3 = r3.$context()\n r2.activity = r3\n r2 = r0\n com.kodular.chameleon.ChameleonAds r3 = new com.kodular.chameleon.ChameleonAds\n r6 = r3\n r3 = r6\n r4 = r6\n r5 = r0\n android.app.Activity r5 = r5.activity\n android.support.v7.app.AppCompatActivity r5 = (android.support.p003v7.app.AppCompatActivity) r5\n r4.<init>(r5)\n r2.chameleonAds = r3\n r2 = r0\n com.kodular.chameleon.ChameleonAds r2 = r2.chameleonAds\n com.google.appinventor.components.runtime.KodularChameleonAd$1 r3 = new com.google.appinventor.components.runtime.KodularChameleonAd$1\n r6 = r3\n r3 = r6\n r4 = r6\n r5 = r0\n r4.<init>(r5)\n r2.setOnAdLoadedListener(r3)\n r2 = r0\n com.kodular.chameleon.ChameleonAds r2 = r2.chameleonAds\n com.google.appinventor.components.runtime.KodularChameleonAd$2 r3 = new com.google.appinventor.components.runtime.KodularChameleonAd$2\n r6 = r3\n r3 = r6\n r4 = r6\n r5 = r0\n r4.<init>(r5)\n r2.setOnAdFailedToLoadListener(r3)\n r2 = r0\n com.kodular.chameleon.ChameleonAds r2 = r2.chameleonAds\n com.google.appinventor.components.runtime.KodularChameleonAd$3 r3 = new com.google.appinventor.components.runtime.KodularChameleonAd$3\n r6 = r3\n r3 = r6\n r4 = r6\n r5 = r0\n r4.<init>(r5)\n r2.setOnAdFailedToShowListener(r3)\n r2 = r0\n com.kodular.chameleon.ChameleonAds r2 = r2.chameleonAds\n com.google.appinventor.components.runtime.KodularChameleonAd$4 r3 = new com.google.appinventor.components.runtime.KodularChameleonAd$4\n r6 = r3\n r3 = r6\n r4 = r6\n r5 = r0\n r4.<init>(r5)\n r2.setOnAdClosed(r3)\n java.lang.String r2 = \"Kodular Chameleon Ad\"\n java.lang.String r3 = \"Kodular Chameleon Ad Created\"\n int r2 = android.util.Log.d(r2, r3)\n return\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.appinventor.components.runtime.KodularChameleonAd.<init>(com.google.appinventor.components.runtime.ComponentContainer):void\");\n }",
"private MakeACaptain() {\n }",
"public Aktie() {\n }",
"public Animal(String farmObjectType, int purchasePrice){\n\t\tthis.setFarmObjectType(farmObjectType); \n\t\tthis.setPurchasePrice(purchasePrice);\n\t\tthis.setHealth(100); \n\t\tthis.setHappiness(100); \n\t}",
"private Application(){\r\n theAccounts = new ArrayList<Account>();\r\n\r\n accountInTotal = 100;\r\n startingBonds = 10000;\r\n }",
"public Supermarket()\n {\n }",
"public ProductFruit() {\r\n }",
"public abstract Alliance getAlliance();",
"public Odi11AgentImpl() {\n }",
"public Airborne(String model, int seats, double speed,String pur) {\n\t\tsuper(model, seats, speed);\n\t\tpurpose=pur;\n\t}",
"public MageTowerCard() {\n\t\tsuper(cardName, cardId, cardCost);\n\t}",
"public Kanban() {\r\n\t}",
"public Beacon(AnalysisMethod method) {\n this.method = method;\n }"
] | [
"0.74543244",
"0.66980857",
"0.66761965",
"0.64084166",
"0.6364887",
"0.6358475",
"0.6206016",
"0.60291165",
"0.6003829",
"0.59753734",
"0.59721047",
"0.591109",
"0.5897385",
"0.58789164",
"0.58758396",
"0.58336425",
"0.58214366",
"0.58073914",
"0.5790293",
"0.5770734",
"0.57697594",
"0.5766081",
"0.5745525",
"0.57423216",
"0.57406014",
"0.57302475",
"0.5727727",
"0.5726892",
"0.57256866",
"0.57039326",
"0.57039255",
"0.5698632",
"0.5693411",
"0.5691616",
"0.56903005",
"0.5685125",
"0.56767344",
"0.56665444",
"0.5662467",
"0.5652827",
"0.56426877",
"0.5641751",
"0.56369823",
"0.5630328",
"0.5620832",
"0.561726",
"0.5613168",
"0.56081265",
"0.56060195",
"0.55986065",
"0.55911136",
"0.5590309",
"0.5586309",
"0.5586101",
"0.5584168",
"0.5581171",
"0.55803317",
"0.557405",
"0.5540116",
"0.55380535",
"0.55361295",
"0.553252",
"0.5531513",
"0.5531401",
"0.5517849",
"0.5510036",
"0.5504818",
"0.55028623",
"0.54936093",
"0.5493547",
"0.5490682",
"0.54882026",
"0.54873633",
"0.5485974",
"0.5484079",
"0.54825246",
"0.5467556",
"0.54646784",
"0.5459827",
"0.5455616",
"0.5455292",
"0.5453322",
"0.54510796",
"0.544858",
"0.5447775",
"0.5447775",
"0.544751",
"0.5443351",
"0.54420894",
"0.5440579",
"0.5437844",
"0.5437023",
"0.542898",
"0.5418977",
"0.5415745",
"0.54039645",
"0.53984207",
"0.5396485",
"0.53873104",
"0.53772426"
] | 0.7449589 | 1 |
CONSTRUCTOR: IMPORT: none EXPORT: address of new DSA Graph ASSERTION: creates empty linked list, edge count of 0 is default value | public DSAGraph()
{
vertices = new DSALinkedList();
edgeCount = 0;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Graph() {\n }",
"public Graph(){\n\t\tthis.sizeE = 0;\n\t\tthis.sizeV = 0;\n\t}",
"public Graph() {\r\n\t\tinit();\r\n\t}",
"public DFSGraph() {\n this(new HashMap<>(), HashMap::new, HashSet::new, HashSet::new);\n }",
"Graph(){\n\t\tadjlist = new HashMap<String, Vertex>();\n\t\tvertices = 0;\n\t\tedges = 0;\n\t\tkeys = new ArrayList<String>();\n\t}",
"public Graph()\r\n\t{\r\n\t\tthis.adjacencyMap = new HashMap<String, HashMap<String,Integer>>();\r\n\t\tthis.dataMap = new HashMap<String,E>();\r\n\t}",
"public Graph(){//constructor\n //edgemap\n srcs=new LinkedList<>();\n maps=new LinkedList<>();\n chkIntegrity(\"edgemap\");\n \n nodes=new LinkedList<>();\n //m=new EdgeMap();\n }",
"protected GraphNode() {\n }",
"protected GraphNode() {\n }",
"public Graph()\n\t{\n\t\tthis.map = new HashMap<Object, SinglyLinkedList>();\n\t}",
"public Graph()\n\t{\n\t\tthis.total_verts = null;\n\t\tthis.total_edges = null;\n\t\tnodes = new HashMap<String, Node>();\n\t}",
"public Graph() {\r\n\t\tthis.matrix = new Matrix();\r\n\t\tthis.listVertex = new ArrayList<Vertex>();\r\n\t}",
"public SAP(Digraph graph) {\n this.graph = graph;\n ancestor = -1;\n distance = Integer.MAX_VALUE;\n }",
"public GraphEdge()\r\n {\r\n cost = 1.0;\r\n indexFrom = -1;\r\n indexTo = -1;\r\n }",
"public GraphInfo(){}",
"public Graph(int numberOfVertices){\r\n this.numberOfVertices = numberOfVertices;\r\n this.adjacencyList = new TreeMap<>();\r\n }",
"GraphObj() {\n this._V = 0;\n this._E = 0;\n inListArray = new ArrayList<>();\n inListArray.add(null);\n outListArray = new ArrayList<>();\n outListArray.add(null);\n selfEdges = new ArrayList<>();\n selfEdges.add(-1);\n edgeList = new ArrayList<>();\n edgeList.add(null);\n }",
"public SGraphValidator() {\r\n\t\tsuper();\r\n\t}",
"public DirectedAcyclicGraphImpl() {\r\n super();\r\n topologicalsorting = new TopologicalSorting( this );\r\n }",
"public WGraph_DS()\n {\n modeCount=0;\n edges=0;\n HashMap<Integer,node_info>nodesHash=new HashMap<>();\n HashMap<Integer,Neighbors>edgesHash=new HashMap<>();\n }",
"public Graphs() {\n graph = new HashMap<>();\n }",
"Graph(int v) {\n V = v;\n adj = new LinkedList[v];\n for (int i = 0; i < v; ++i)\n adj [i] = new LinkedList();\n }",
"public Graph(){\r\n this.listEdges = new ArrayList<>();\r\n this.listNodes = new ArrayList<>();\r\n this.shown = true;\r\n }",
"public HashGraph()\n {\n graph = new HashMap <>();\n }",
"public SAP(Digraph G) {\n\n if (G == null) throw new IllegalArgumentException(\"Null graph\");\n\n dg = new Digraph(G);\n\n }",
"public DSAStack()\n {\n stack = new DSALinkedList<E>();\n }",
"public DefaultDirectedWeightedFlowGraph(DefaultDirectedWeightedGraph<V, E> dWG) {\r\n this.graph = dWG;\r\n\r\n }",
"public Graph(int V) {\r\n \t \t\r\n if (V < 0) throw new IllegalArgumentException(\"Number of vertices in a Digraph must be nonnegative\");\r\n this.V = V;\r\n this.E = 0;\r\n this.indegree = new int[V];\r\n adj = (Bag<Edge>[]) new Bag[V];\r\n for (int v = 0; v < V; v++)\r\n adj[v] = new Bag<Edge>();\r\n }",
"public ExportGraph()\n {\n }",
"public Graph() {\n\t\tdictionary=new HashMap<>();\n\t}",
"@Override\n public Graph newInstance(int vertexesCount) {\n return new SimpleGraph();\n }",
"private Graph<Node, DefaultEdge> initialiseSpaceGraph() {\n Graph<Node, DefaultEdge> g = new SimpleGraph<>(DefaultEdge.class);\n g = addNodes(g);\n g = addEdges(g);\n return g;\n }",
"public ConcreteEdgesGraph() {\r\n vertices.clear();\r\n edges.clear();\r\n checkRep();\r\n }",
"public Graph()\r\n {\r\n this( \"x\", \"y\" );\r\n }",
"@Override\n\tpublic Graph<String> emptyInstance() {\n\t\treturn new ConcreteEdgesGraph();\n\t}",
"Graph() {\r\n\t\tvertices = new LinkedList<Vertex>();\r\n\t\tedges = 0;\r\n\r\n\t\tfor (int i = 0; i < 26; i++) {\r\n\t\t\t// ASCII value of 'A' is 65\r\n\t\t\tVertex vertex = new Vertex((char) (i + 65));\r\n\t\t\tvertices.add(vertex);\r\n\t\t}\r\n\t\tcurrentVertex = vertices.get(0);\r\n\t\tseen = new boolean[26];\r\n\t}",
"public SAP(Digraph G) {\n this.G = new Digraph(G);\n test = G.size();\n }",
"@SuppressWarnings(\"rawtypes\")\r\n\tpublic Graph() {\r\n \tthis.vertex = new HashMap<T, Vertex>();\r\n \tthis.edge = new HashMap<Integer, Edge>();\r\n }",
"private DGraph initFactory(DGraph g) {\n\t\tg= new DGraph();\n\t\tNodeData d0 = new NodeData(0);\n\t\tNodeData d1 = new NodeData(1);\n\t\tNodeData d2 = new NodeData(2);\n\t\tNodeData d3 = new NodeData(3);\n\t\tNodeData d4 = new NodeData(4);\n\t\tg.addNode(d0);\n\t\tg.addNode(d1);\n\t\tg.addNode(d2);\n\t\tg.addNode(d3);\n\t\tg.addNode(d4);\n\t\tg.connect(1, 2, 3);\n\t\tg.connect(2, 1, 4);\n\t\tg.connect(3, 4, 5);\n\t\tg.connect(4,3, 7);\n\t\tg.connect(3,2, 4);\n\t\tg.connect(3,1, 5);\n\t\tg.connect(1,3, 2);\n\t\treturn g;\n\t}",
"public WeightedDiGraphAPI() {\r\n\t\tthis.mVisitStatus = new HashMap<Integer,Boolean>();\r\n\t\tthis.mVertexList = new TreeSet<Integer>();\r\n\t\tthis.mEdgeList = new PriorityQueue<DirectedEdge>();\r\n\t\tthis.adjList = new HashMap<Integer,List<DirectedEdge>>();\r\n\t\tthis.mMSTedgeList = new ArrayList<DirectedEdge>();\r\n\t}",
"Graph(int vertices) {\r\n this.numVertices = vertices;\r\n adjacencylist = new LinkedList[vertices];\r\n //initialize adjacency lists for all the vertices\r\n for (int i = 0; i <vertices ; i++) {\r\n adjacencylist[i] = new LinkedList<>();\r\n }\r\n }",
"public Graph(int V) {\n if (V < 0) throw new RuntimeException(\"Number of vertices must be nonnegative\");\n this.V = V;\n this.E = 0;\n\n\n adj = (LinkedList<Edge>[])new LinkedList[V];\n for (int v = 0; v < V; v++) adj[v] = new LinkedList<Edge>();\n }",
"public Graph(int numVertices) {\n myAdjLists = new LinkedList[numVertices];\n myStartVertex = 0;\n for (int k = 0; k < numVertices; k++) {\n myAdjLists[k] = new LinkedList<Edge>();\n }\n myVertexCount = numVertices;\n }",
"public AdjacencyListGraph(boolean isDirected) {\r\n\t\tthis.isDirected = isDirected;\r\n\t\tvertices = new HashMap<>();\r\n\t\tadjacencyLists = new HashMap<>();\r\n\t}",
"public Edge() {}",
"public Graph(int n) {\n this.n = n;\n edge = new List[n];\n for (int i = 0; i < n; i++)\n edge[i] = new List(0, 0, 0); // dummy node\n }",
"public Graph(int numVertices) {\r\n myAdjLists = new LinkedList[numVertices];\r\n myStartVertex = 0;\r\n for (int k = 0; k < numVertices; k++) {\r\n myAdjLists[k] = new LinkedList<Edge>();\r\n }\r\n myVertexCount = numVertices;\r\n }",
"public FixedGraph(int numOfVertices, int b, int seed) {\r\n super(numOfVertices);\r\n int adjVertex;\r\n double x = 0;\r\n int[] numOfEdges = new int[numOfVertices];\r\n Vector<Integer> graphVector = new Vector<Integer>();\r\n connectivity = b;\r\n\r\n\r\n Random random = new Random(seed);\r\n graphSeed = seed;\r\n\r\n for (int v = 0; v < numOfVertices; v++) {\r\n graphVector.add(new Integer(v));\r\n }\r\n\r\n for (int i = 0; i < numOfVertices; i++) {\r\n\r\n while ((numOfEdges[i] < b) && (graphVector.isEmpty() == false)) {\r\n x = random.nextDouble();\r\n do {\r\n adjVertex = (int) (x * numOfVertices);\r\n\r\n } while (adjVertex >= numOfVertices);\r\n\r\n\r\n if ((i == adjVertex) || (numOfEdges[adjVertex] >= b)) {\r\n if (numOfEdges[adjVertex] >= b) {\r\n for (int v = 0; v < graphVector.size(); v++) {\r\n\r\n int compInt = ((Integer) graphVector.elementAt(v)).intValue();\r\n if (adjVertex == compInt) {\r\n graphVector.removeElementAt(v);\r\n }\r\n if (graphVector.isEmpty() == true) {\r\n System.out.println(\"Graph Vector Empty\");\r\n }\r\n }\r\n\r\n }\r\n\r\n }\r\n if ((i != adjVertex) && (adjVertex < numOfVertices) && (numOfEdges[adjVertex] < b) && (super.isAdjacent(i, adjVertex) == false) && (numOfEdges[i] < b)) {\r\n super.addEdge(i, adjVertex);\r\n if (super.isAdjacent(i, adjVertex)) {\r\n numOfEdges[i] = numOfEdges[i] + 1;\r\n numOfEdges[adjVertex] = numOfEdges[adjVertex] + 1;\r\n }\r\n System.out.print(\"*\");\r\n\r\n }\r\n\r\n if (numOfEdges[i] >= b) {\r\n for (int v = 0; v < graphVector.size(); v++) {\r\n\r\n int compInt = ((Integer) graphVector.elementAt(v)).intValue();\r\n if (i == compInt) {\r\n graphVector.removeElementAt(v);\r\n }\r\n if (graphVector.isEmpty() == true) {\r\n System.out.println(\"Graph Vector Empty\");\r\n }\r\n }\r\n break;\r\n }\r\n if (graphVector.size() < b) {\r\n //boolean deadlock = false;\r\n System.out.println(\"Graph size= \" + graphVector.size());\r\n\r\n for (int v = 0; v < graphVector.size(); v++) {\r\n\r\n int compInt = ((Integer) graphVector.elementAt(v)).intValue();\r\n //System.out.println(\"i:= \" + i + \" and compInt:= \" + compInt);\r\n if (super.isAdjacent(i, compInt) || (i == compInt)) {\r\n //System.out.println(\"\" + i + \" adjacent to \" + compInt + \" \" + super.isAdjacent(i, compInt));\r\n // deadlock = false;\r\n } else {\r\n if ((numOfEdges[compInt] < b) && (numOfEdges[i] < b) && (i != compInt)) {\r\n super.addEdge(i, compInt);\r\n numOfEdges[i] = numOfEdges[i] + 1;\r\n numOfEdges[compInt] = numOfEdges[compInt] + 1;\r\n if (numOfEdges[i] >= b) {\r\n for (int w = 0; w < graphVector.size(); w++) {\r\n\r\n int compW = ((Integer) graphVector.elementAt(w)).intValue();\r\n if (i == compW) {\r\n graphVector.removeElementAt(w);\r\n }\r\n if (graphVector.isEmpty() == true) {\r\n System.out.println(\"Graph Vector Empty\");\r\n }\r\n }\r\n break;\r\n }\r\n if (numOfEdges[compInt] >= b) {\r\n for (int w = 0; w < graphVector.size(); w++) {\r\n\r\n int compW = ((Integer) graphVector.elementAt(w)).intValue();\r\n if (compInt == compW) {\r\n graphVector.removeElementAt(w);\r\n }\r\n if (graphVector.isEmpty() == true) {\r\n System.out.println(\"Graph Vector Empty\");\r\n }\r\n }\r\n\r\n }\r\n // deadlock = true;\r\n }\r\n }\r\n }\r\n break;\r\n }\r\n }\r\n\r\n System.out.println();\r\n }\r\n\r\n }",
"public GraphDeprecated() {\n mAdjList = new HashMap<Vertex, TreeSet<Vertex>>();\n mVertices = new HashMap<String, Vertex>();\n mNumVertices = mNumEdges = 0;\n }",
"public SAP(Digraph G){\n if(G == null)\n throw new NullPointerException(\"null arguments\");\n this.G=G;\n }",
"public ListGraph(int numV, boolean directed) {\r\n super(numV, directed);\r\n edges = new List[numV];\r\n for (int i = 0; i < numV; i++) {\r\n edges[i] = new LinkedList < Edge > ();\r\n }\r\n }",
"public Graph(boolean p_isDirectedGraph) {\n\t\tisDirectedGraph = p_isDirectedGraph;\n\t}",
"@DisplayName(\"Add edges\")\n @Test\n public void testAddEdges() {\n boolean directed1 = true;\n graph = new Graph(new Edge[0], directed1, 0, 5, GraphType.RANDOM);\n graph.addEdges(edges);\n List<Integer> l0 = new ArrayList<>();\n List<Integer> l1 = new ArrayList<>();\n List<Integer> l2 = new ArrayList<>();\n List<Integer> l4 = new ArrayList<>();\n l0.add(1);\n l1.add(2);\n l2.add(3);\n l4.add(0);\n\n Assertions.assertEquals(l0.get(0), graph.getNeighbours(0).get(0));\n Assertions.assertEquals(l1.get(0), graph.getNeighbours(1).get(0));\n Assertions.assertEquals(l2.get(0), graph.getNeighbours(2).get(0));\n Assertions.assertEquals(l4.get(0), graph.getNeighbours(4).get(0));\n }",
"public SAP(Digraph G) throws java.lang.NullPointerException, java.lang.IndexOutOfBoundsException \n\t {\n\t\t if(null==G) throw new java.lang.NullPointerException(\"Digraph argument to SAP is null\");\n\t\t mGraph = G;\n\t\t \n\t }",
"public DijkstraAlg(){\n \n }",
"public WeightedGraph() {\n super();\n }",
"public Graph(int numVertices) {\n adjLists = new LinkedList[numVertices];\n startVertex = 0;\n for (int k = 0; k < numVertices; k++) {\n adjLists[k] = new LinkedList<Edge>();\n }\n vertexCount = numVertices;\n }",
"AdjacencyGraph(){\r\n vertices = new HashMap<>();\r\n }",
"public Graph(int V){\n this.V = V;\n this.E = 0;//no edge at initial condition.\n //initialize the adjacency list\n this.adj = new Queue[V];\n //initialize the Queue\n for(int i=0;i<adj.length;i++) {\n //each element in adj is a Queue that stores all vertexes connected with the index i of adj.\n adj[i] = new Queue<Integer>();\n }\n }",
"@Test\n public void tae1()\n {\n Graph graph = new Graph(0);\n graph.addEdge(0,0);\n System.out.println(graph);\n assertEquals(\"Cannot add edges to a graph of size < 1\",\"Cannot add edges to a graph of size < 1\");\n }",
"public UnmodifiableDirectedGraph(DirectedGraph<V, E> g)\n {\n super(g);\n }",
"public Edge()\r\n {\r\n }",
"public ListGraph(int numberOfVertex, boolean directed) throws Exception {\n super(numberOfVertex, directed);\n\n edges = new List[numberOfVertex];\n\n for(int index = 0; index < numberOfVertex; ++index)\n this.edges[index] = new LinkedList<Edge>();\n }",
"Graph(int size) {\n n = size;\n V = new Vertex[size + 1];\n // create an array of Vertex objects\n for (int i = 1; i <= size; i++)\n V[i] = new Vertex(i);\n }",
"public Edge()\n {\n start = -1;\n end = -1;\n capacity = -1;\n }",
"protected AbstractTreeAdjacencyGraph()\n\t{\n\t\tsuper();\n\t}",
"public Dijkstra(Graph gp, GraphNode origen){ \n AmountNodes = gp.getNodes().size(); \n Source = origen;\n Nodes = gp.getNodes(); //List of Nodes that belong to the graph\n MinDistanceStatus = new ArrayList<>(gp.getNodes().size());\n MinDistance = new ArrayList<>();\n References = new ArrayList<>(AmountNodes);\n this.setMax(); //initializez values\n this.setFalse(); //initializez values\n this.setNull(); //initializes values\n }",
"public static Graph<Vertex,Edge> createGraphObject()\n\t{\n\t\tGraph<Vertex,Edge> g = new DirectedSparseMultigraph<Vertex, Edge>();\n\t\treturn g;\n\t}",
"public Graph() {\n\t\ttowns = new HashSet<Town>();\n\t\troads = new HashSet<Road>();\n\t\tprevVertex = new HashMap<String, Town>();\n\t}",
"public SAP(Digraph G) {\n dg = G;\n }",
"public DefaultDirectedWeightedFlowGraph(EdgeFactory<V, E> ef) {\r\n this.graph = new DefaultDirectedWeightedGraph(ef);\r\n\r\n }",
"public Builder() {\n this(Graphs.<N, E>createUndirected());\n }",
"public Graph(int V, int E) {\n this(V);\n if (E < 0) throw new RuntimeException(\"Number of edges must be nonnegative\");\n for (int i = 0; i < E; i++) {\n int v = (int) (Math.random() * V);\n int w = (int) (Math.random() * V);\n double weight = Math.round(100 * Math.random()) / 100.0;\n Edge e = new Edge(v, w, weight,0);\n //addEdge(e);\n }\n }",
"public:\n Graph(int V); // Constructor\n void addEdge(int v, int w);",
"public DoubleLinkedList() {\r\n header.next = header.previous = header;\r\n//INSTRUMENTATION BEGIN\r\n //initializates instrumentation fields for concrete objects\r\n _initialSize = this.size;\r\n _minSize = 0;\r\n//INSTRUMENTATION END\r\n }",
"public Digraph(Digraph S) {\r\n this.V = S.V();\r\n this.E = 0;\r\n adj = (Bag<Integer>[]) new Bag[V];\r\n \r\n for (int i = 0; i < adj.length; i++) {\r\n adj[i] = new Bag<Integer>();\r\n for (int j : S.adj(i))\r\n addEdge(i, j);\r\n }\r\n }",
"public GraphWrapper() {\n\t\tthis.graph = new Graph<T,E>();\n\t}",
"Graph testGraph();",
"private Moneygraph() {\n super(\"moneygraph\", null);\n }",
"public SAP(Digraph G) {\n if (G == null) {\n throw new NullPointerException();\n }\n int gV = G.V();\n g = new Digraph(gV);\n for (int v = 0; v < gV; v++) {\n for (int w : G.adj(v)) {\n g.addEdge(v, w);\n }\n }\n }",
"@DisplayName(\"Add directed edge\")\n @Test\n public void testAddEdgeDirected() {\n graph.addEdge(new Edge(3, 4));\n List<Integer> l = new ArrayList<>();\n l.add(2);\n l.add(4);\n Assertions.assertArrayEquals(l.toArray(), graph.getNeighbours(3).toArray());\n }",
"VertexNetwork() {\r\n /* This constructor creates an empty list of vertex locations. \r\n read The transmission range is set to 0.0. */\r\n transmissionRange = 0.0;\r\n location = new ArrayList<Vertex>(0);\r\n }",
"public Graph() {\r\n\t\tnodePos = new HashMap<Integer, Vec2D>();\r\n\t\tconnectionLists = new HashMap<Integer, List<Connection>>();\r\n\t\t//screenWidth = Config.SCREEN_WIDTH;\r\n\t}",
"public Graph(PApplet p) {\n\t\tvertices = new HashMap<Integer, Vertex>();\n\t\tedges = new HashSet<Edge>();\n\t\tparent = p;\n\t}",
"public Graph() // constructor\n{\n vertexList = new Vertex[MAX_VERTS];\n // adjacency matrix\n adjMat = new int[MAX_VERTS][MAX_VERTS];\n nVerts = 0;\n for (int j = 0; j < MAX_VERTS; j++) // set adjacency\n for (int k = 0; k < MAX_VERTS; k++) // matrix to 0\n adjMat[j][k] = INFINITY;\n}",
"DListNode2(Object vertex1) {\r\n vertex = vertex1;\r\n list = null;\r\n prev = null;\r\n next = null;\r\n }",
"Vertex(){}",
"public JXGraph() {\r\n this(0.0, 0.0, -1.0, 1.0, -1.0, 1.0, 0.2, 4, 0.2, 4);\r\n }",
"private final void constructGraph() {\n losScanner = new LineOfSightScannerDouble(graph);\n queue = new int[11];\n\n queueSize = 0;\n\n // STEP 1: Construct SVG (Strict Visibility Graph)\n \n // Initialise SVG Vertices\n xPositions = new int[11];\n yPositions = new int[11];\n nNodes = 0;\n addNodes();\n \n // Now xPositions and yPositions should be correctly initialised.\n // We then initialise the rest of the node data.\n originalSize = nNodes;\n maxSize = nNodes + 2;\n xPositions = Arrays.copyOf(xPositions, maxSize);\n yPositions = Arrays.copyOf(yPositions, maxSize);\n hasEdgeToGoal = new boolean[maxSize];\n nOutgoingEdgess = new int[maxSize];\n outgoingEdgess = new int[maxSize][];\n outgoingEdgeIndexess = new int[maxSize][];\n outgoingEdgeOppositeIndexess = new int[maxSize][];\n outgoingEdgeIsMarkeds = new boolean[maxSize][];\n for (int i=0;i<maxSize;++i) {\n nOutgoingEdgess[i] = 0;\n outgoingEdgess[i] = new int[11];\n outgoingEdgeIndexess[i] = new int[11];\n outgoingEdgeOppositeIndexess[i] = new int[11];\n outgoingEdgeIsMarkeds[i] = new boolean[11];\n }\n\n // Initialise SVG Edges + edgeWeights\n edgeWeights = new float[11];\n nEdges = 0;\n addAllEdges();\n\n \n // Now all the edges, indexes and weights should be correctly initialise.\n // Now we initialise the rest of the edge data.\n originalNEdges = nEdges;\n int maxPossibleNEdges = nEdges + nNodes*2;\n edgeWeights = Arrays.copyOf(edgeWeights, maxPossibleNEdges);\n edgeLevels = new int[maxPossibleNEdges];\n Arrays.fill(edgeLevels, LEVEL_W);\n isMarked = new boolean[maxPossibleNEdges];\n //Arrays.fill(isMarked, false); // default initialises to false anyway.\n \n \n // Reserve space in level w edge and marked edge arrays.\n nLevelWNeighbourss = new int[maxSize];\n levelWEdgeOutgoingIndexess = new int[maxSize][];\n nMarkedEdgess = new int[maxSize];\n outgoingMarkedEdgeIndexess = new int[maxSize][];\n for (int i=0;i<nNodes;++i) {\n levelWEdgeOutgoingIndexess[i] = new int[nOutgoingEdgess[i]];\n outgoingMarkedEdgeIndexess[i] = new int[nOutgoingEdgess[i]];\n }\n for (int i=nNodes;i<maxSize;++i) {\n levelWEdgeOutgoingIndexess[i] = new int[11];\n outgoingMarkedEdgeIndexess[i] = new int[11];\n }\n\n \n // STEP 2: Label edge levels in SVG.\n computeAllEdgeLevelsFast();\n addLevelWEdgesToLevelWEdgesArray();\n\n nSkipEdgess = new int[maxSize];\n outgoingSkipEdgess = new int[maxSize][];\n outgoingSkipEdgeNextNodess = new int[maxSize][];\n outgoingSkipEdgeNextNodeEdgeIndexess = new int[maxSize][];\n outgoingSkipEdgeWeightss = new float[maxSize][]; \n\n // STEP 3: Initialise the skip-edges & Group together Level-W edges using isMarkedIndex.\n setupSkipEdges();\n \n pruneParallelSkipEdges();\n }",
"public DoublyLinkedList() \r\n {\r\n sentinel = new Node<T>(null,null,null);\r\n sentinel.next = sentinel.prev = sentinel;\r\n size = 0;\r\n }",
"public Dijkstra(Graph graph)\n\t{\n\t\tthis.listNode = graph.getListNode();\n\t\tthis.listEdge = graph.getListEdge();\n\t}",
"Graph(int n){\r\n numberOfVertices = n;\r\n adjacentVertices = new LinkedList[numberOfVertices];\r\n for (int i = 0; i < numberOfVertices; i++){\r\n adjacentVertices[i] = new LinkedList<>();\r\n }\r\n }",
"public DotGraph(String graphname) {\n this.graphname = graphname;\n this.isSubGraph = false;\n this.nodes = new HashMap<String, DotGraphNode>(100);\n this.drawElements = new LinkedList<Renderable>();\n this.attributes = new LinkedList<DotGraphAttribute>();\n }",
"private static graph graph_creator(int v_size, int e_size, int seed) {\n graph g = new Graph_DS();\n initSeed(seed);\n for(int i=0;i<v_size;i++) {\n node_data n = new NodeData();\n g.addNode(n);\n }\n // Iterator<ex0.node_data> itr = V.iterator(); // Iterator is a more elegant and generic way, but KIS is more important\n int[] nodes = nodes(g);\n while(g.edgeSize() < e_size) {\n int a = nextRnd(0,v_size);\n int b = nextRnd(0,v_size);\n int i = nodes[a];\n int j = nodes[b];\n g.connect(i,j);\n }\n return g;\n }",
"public LinkedList(){\n size=0;\n }",
"@Test\n public void tae0()\n {\n Graph g = new Graph(2);\n g.addEdge(0, 1);\n System.out.println(g);\n assertEquals(g.toString(), \"numNodes: 2\\nedges: [[false, true], [false, false]]\");\n }",
"public GraphNode(D data) {\n successors = new ArrayList<>();\n this.data = data;\n }",
"public CycleDetector(Graph<V, E> graph)\n {\n this.graph = GraphTests.requireDirected(graph);\n }",
"@Override\n\tpublic void init(directed_weighted_graph g) {\n\t\tthis.dwg = g;\n\t}",
"public AbstractListMapGraph()\n\t{\n\t\tsuper();\n\t\tedgeList = new ArrayList<ET>();\n\t\tnodeList = new ArrayList<N>();\n\t\tgcs = new GraphChangeSupport<N, ET>(this);\n\t\tnodeEdgeMap = new HashMap<N, Set<ET>>();\n\t}"
] | [
"0.67561847",
"0.67010015",
"0.66476834",
"0.6490884",
"0.64747477",
"0.6432702",
"0.64150095",
"0.6404738",
"0.6404738",
"0.6400794",
"0.63653946",
"0.6333191",
"0.63165486",
"0.6280569",
"0.6264022",
"0.6244002",
"0.6214913",
"0.6187843",
"0.61140513",
"0.60699534",
"0.6067009",
"0.6057174",
"0.60433227",
"0.60124826",
"0.60077834",
"0.60074556",
"0.6007024",
"0.6002805",
"0.5999376",
"0.5996748",
"0.5993175",
"0.59857905",
"0.5976414",
"0.5972066",
"0.5952811",
"0.59516245",
"0.592088",
"0.59113365",
"0.58933914",
"0.5863342",
"0.58591294",
"0.58558565",
"0.58377683",
"0.5834176",
"0.58196586",
"0.58080184",
"0.58079696",
"0.5799922",
"0.5793664",
"0.5792664",
"0.57913184",
"0.57894415",
"0.57889426",
"0.5782357",
"0.5774339",
"0.57723594",
"0.57702106",
"0.57663304",
"0.5765458",
"0.575916",
"0.5748968",
"0.5745664",
"0.57444245",
"0.5735636",
"0.57354987",
"0.5732053",
"0.57256305",
"0.57157016",
"0.5689535",
"0.56660277",
"0.5663912",
"0.5631349",
"0.5627813",
"0.5624119",
"0.56068546",
"0.56045187",
"0.55985993",
"0.55923116",
"0.55899835",
"0.55861646",
"0.55810905",
"0.5576458",
"0.5575487",
"0.5568438",
"0.5567246",
"0.55649114",
"0.55646104",
"0.5564289",
"0.55637103",
"0.55623144",
"0.556197",
"0.5558734",
"0.5555804",
"0.55549353",
"0.5551777",
"0.5549931",
"0.5549698",
"0.55438244",
"0.55390036",
"0.5528216"
] | 0.7437458 | 0 |
IMPORT: label (String), value (Object) EXPORT: none ASSERTION: adds new vertex to with label only and sets value to null two or more vertices can not have the same label. | public boolean addVertex(String label)
{
if(!hasVertex(label)) //if edge does not already exist add it
{
DSAGraphVertex v = new DSAGraphVertex(label, null);
vertices.insertLast(v); //inserts into vertices list at end
return true;
}
else
{
return false;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean addVertex(T vertexLabel);",
"public boolean addVertex(String label, Object value)\n\t{\n\t\tif(!hasVertex(label)) //if edge does not already exist add it\n\t\t{\n\t\t\tDSAGraphVertex v = new DSAGraphVertex(label, value);\n\t\t\tvertices.insertLast(v); //inserts into vertices list at end\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}",
"public DSAGraphVertex(String inLabel, Object inValue)\n\t\t{\n\t\t\tlabel = inLabel;\n\t\t\tvalue = inValue;\n\t\t\tlinks = new DSALinkedList();\n\t\t\tvisited = false;\n\t\t}",
"public void addVertex(String vertLabel) {\n\n // Implement me!\n if (indexOf(vertLabel, vertices) != -1) {\n return;\n }\n vertices.put(vertLabel, vertices.size());\n if (weights.length == 0) {\n weights = new int[1][0];\n } else {\n weights = addOneRow(weights);\n }\n\n\n }",
"public Vertex(int label) {\r\n isVisited = false;\r\n this.label = label;\r\n }",
"public void addVertex(T vertLabel) {\n\t\tvertCount++;\n\t\tLinkedList[] tempList = new LinkedList[vertCount];\n\t\tLinkedList newVert = new LinkedList((String)vertLabel);\n\t\t\n\t\tif(verts.length==0){\n\t\t\ttempList[0] = newVert;\n\t\t}\n\t\t\n\t\telse{\n\t\t\tfor(int x=0; x<verts.length; x++){\n\t\t\t\t\ttempList[x] = verts[x];\n\t\t\t}\n\t\t\ttempList[verts.length] = newVert;\n\t\t}\n\tverts = tempList;\n }",
"public Vertex(String label, int index){\n this.label = label;\n this.index = index;\n this.previous = null;\n visited = false;\n }",
"public ArangoDBVertex(String key, String label, ArangoDBGraph graph) {\n\t\tsuper(key, label, graph);\n\t}",
"public Vertex(T vertexLabel) {\r\n\t\tlabel = vertexLabel;\r\n\t\tedgeList = new LinkedList<Edge>();\r\n\t\tvisited = false;\r\n\t\tpreviousVertex = null;\r\n\t\tcost = 0;\r\n\t}",
"void addVertex(Vertex v);",
"com.microsoft.schemas.xrm._2011.contracts.Label addNewLabel();",
"public Vertex(L l) {\n\t\tlabel = l;\n\t}",
"public void addVertex();",
"void addLabel(Object newLabel);",
"void addLabel(Object newLabel);",
"public V addVertex(V v);",
"void add(Vertex vertex);",
"@Override\n public void addValue(T value) {\n Vertex<T> vertex = new Vertex<>(value);\n vertices.put(value,vertex);\n }",
"public boolean addVertex(Object value) \n\t{\n\t\tthis.map.put(value, new SinglyLinkedList());\n\t\treturn true;\n\t}",
"@Override\r\n public void add(T value) {\r\n Vertex<T> vertex = new Vertex<>(value);\r\n vertices.put(value, vertex);\r\n }",
"private void attachLabel(Vertex v, String string) throws IOException\n {\n if (string == null || string.length() == 0)\n return;\n String label = string.trim();\n// String label = trimQuotes(string).trim();\n// if (label.length() == 0)\n// return;\n if (unique_labels)\n {\n try\n {\n StringLabeller sl = StringLabeller.getLabeller((Graph)v.getGraph(), LABEL);\n sl.setLabel(v, label);\n }\n catch (StringLabeller.UniqueLabelException slule)\n {\n throw new FatalException(\"Non-unique label found: \" + slule);\n }\n }\n else\n {\n v.addUserDatum(LABEL, label, UserData.SHARED);\n }\n }",
"@Override\r\n public void add(V vertexName) {\r\n if(!contains(vertexName))\r\n map.put(vertexName, new Vertex(vertexName));\r\n }",
"protected GraphSubEdge (Object label)\n {\n this.label = label;\n mark = false;\n }",
"@Override\n public void addVertex(V vertex)\n {\n if (vertex.equals(null)){\n throw new IllegalArgumentException();\n }\n ArrayList <V> edges = new ArrayList<>();\n\t graph.put(vertex, edges);\n\n }",
"@Override\n\tpublic boolean add(L vertex) {\n\t\tIterator<Vertex<L>> vertexiter = verticelist.iterator();\n\t\twhile (vertexiter.hasNext()) {\n\t\t\tVertex<L> v = vertexiter.next();\n\t\t\tL lab = v.getlabel();\n\t\t\tif (lab.equals(vertex))\n\t\t\t\treturn false;\n\t\t}\n\t\tVertex<L> v = new Vertex<L>(vertex);\n\t\tverticelist.add(v);\n\t\treturn true;\n\t}",
"void setGraphLabel(String label);",
"boolean addVertex(V v);",
"@Override\n\t\tpublic void addLabel(Label label) {\n\n\t\t}",
"public boolean addVertex(V vertex);",
"public boolean addVertex(V vertex);",
"public abstract boolean putVertex(Vertex incomingVertex);",
"void add(int vertex);",
"public ImmutableDVertex(\n Optional<V> value, List<? extends DEdge<V, E>> edges) {\n super(value, edges);\n }",
"Vertex createVertex();",
"void addVertex(Vertex v, ArrayList<Vertex> neighbors, ArrayList<Double> weights) throws VertexNotInGraphException;",
"public void addVertex (){\t\t \n\t\tthis.graph.insert( new MyList<Integer>() );\n\t}",
"public boolean removeVertex(String label)\n\t{\n\t\tif(hasVertex(label)) //if vertex in in list\n\t\t{\n\t\t\tvertices.removeAt(getVertex(label));\n\t\t\t//System.out.println(\"Deleted: \" + label); //debug\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}",
"@Test\n public void testWithUnknownLabel() throws Exception {\n LogicalGraph socialGraph = getSocialNetworkLoader().getLogicalGraph();\n LogicalGraph result = socialGraph\n .callForGraph(new VertexDeduplication<>(\"NotInTheGraph\", Arrays.asList(\"a\", \"b\")));\n collectAndAssertTrue(socialGraph.equalsByData(result));\n }",
"public abstract Code addLabel(String label);",
"Vertex(){}",
"public void setLabel(Object v) \n {\n this.label = v;\n }",
"public void removeVertex(String vertLabel) {\n\n // Implement me!\n if (indexOf(vertLabel, vertices) <0) {\n return;\n }\n vertices.remove(vertLabel);\n Iterator<String> iterator = edges.keySet().iterator();\n while (iterator.hasNext()) {\n String k = iterator.next();\n if (k.contains(vertLabel)) {\n iterator.remove();\n edges.remove(k);\n }\n }\n }",
"public void setUniqueLinkInTo(VertexFrame vertex, String... labels) {\n\t\t// Unlink all edges between both objects with the given label\n\t\tunlinkIn(vertex, labels);\n\t\t// Create a new edge with the given label\n\t\tlinkIn(vertex, labels);\n\t}",
"public Position insertVertex(Object o);",
"public void addTrainingData(String value,String label);",
"protected void visit(Graph<VLabel, ELabel>.Vertex v) {\n }",
"void setLabel(com.microsoft.schemas.xrm._2011.contracts.Label label);",
"public void setLabel(String label)\n {\n if (StringUtils.isBlank(label))\n throw new IllegalArgumentException(\"label cannot be null or empty\");\n \n this.label = label;\n }",
"public Vertex(String name){\r\n this.name = name;\r\n }",
"@Test\n public void testAddVertexExisting() throws Exception {\n final ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();\n\n Graph<Long, Long, Long> graph =\n Graph.fromDataSet(\n TestGraphUtils.getLongLongVertexData(env),\n TestGraphUtils.getLongLongEdgeData(env),\n env);\n\n graph = graph.addVertex(new Vertex<>(1L, 1L));\n\n DataSet<Vertex<Long, Long>> data = graph.getVertices();\n List<Vertex<Long, Long>> result = data.collect();\n\n expectedResult = \"1,1\\n\" + \"2,2\\n\" + \"3,3\\n\" + \"4,4\\n\" + \"5,5\\n\";\n\n compareResultAsTuples(result, expectedResult);\n }",
"public void addVertex( VKeyT key, VDataT data );",
"private void addEdgeWithLabel(NasmInst source, NasmLabel destination) {\n if (source == null || destination == null)\n throw new FgException(\"ERROR: Can't create an edge without a source and a destination\");\n\n if (systemCalls.contains(destination.toString()))\n return; // System call: iprintLF, readline or atoi. No edge needed\n\n NasmInst destinationInst = label2Inst.get(destination.toString());\n if (destinationInst == null)\n throw new FgException(\"ERROR: No instruction matching with the given label\");\n addEdgeWithInst(source, destinationInst);\n }",
"public void addVertex(Vertex v) {\n\t \tif (!this.vertexes.contains(v)) {\r\n\t \t\tthis.vertexes.add(v);\r\n\t \t}\r\n\t \t//otherwise just ignore, the Graph already has this vertex\r\n\t }",
"@Override\n\tpublic void implementAddVertex() {\n\t\t\n\t}",
"public void set(int index, PVector v, String label) {\n\t\tif (index == points.size()) {\n\t\t\tpoints.add(new GPoint(v, label));\n\t\t} else {\n\t\t\tpoints.get(index).set(v, label);\n\t\t}\n\t}",
"public Boolean addEdge( AnyType vertex_value_A, AnyType vertex_value_B ) throws VertexException {\n \n // ------------------------------------\n // Basic steps:\n // ------------------------------------\n // 1) For Vertex A and B, check to see if the vertex exits in the \n // vertex_adjacency_list. If not, then add new vertex (with given \n // value) to the vertex_adjacency_list.\n // 2) In Vertex class, check if Vertex B is in Vertex A's \n // adjacent_vertex_list and vice versa (i.e. an edge exists). If \n // edge already exists, then return false, otherwise goto step 3.\n // 3) Add Vertex B to Vertex A's adjacent_vertex_list and vice versa.\n // Lastly, return true indicating the edge was successfully added.\n \n // ----------------------------\n // TODO: Add your code here\n // ----------------------------\n boolean a_in_list = false;\n boolean b_in_list = false;\n boolean edge = false;\n int size = vertex_adjacency_list.size();\n int a = -1;\n int b = -1;\n \n //make new vertices with values passed in\n Vertex<AnyType> A = new Vertex<AnyType>(vertex_value_A);\n Vertex<AnyType> B = new Vertex<AnyType>(vertex_value_B);\n //check if they are in the list\n for(int i = 0; i<= size-1; i++){\n if( vertex_adjacency_list.get(i).compareTo( A) == 0){\n a_in_list = true;\n a = i;\n \n }\n if( vertex_adjacency_list.get(i).compareTo(B) == 0){\n b_in_list = true;\n b = i;\n \n }\n }\n //if not in list, add\n if( a_in_list == false){\n vertex_adjacency_list.add(A);\n a_in_list = true;\n a = vertex_adjacency_list.size()-1;\n }\n if( b_in_list == false){\n vertex_adjacency_list.add(B);\n b_in_list =true;\n b = vertex_adjacency_list.size()-1;\n }\n //check if edge\n edge = vertex_adjacency_list.get(a).hasAdjacentVertex(vertex_adjacency_list.get(b));\n //if edge then add to list \n if( a_in_list == true && b_in_list == true){\n if(edge){\n return edge;\n }\n else{\n vertex_adjacency_list.get(a).addAdjacentVertex(vertex_adjacency_list.get(b));\n vertex_adjacency_list.get(b).addAdjacentVertex(vertex_adjacency_list.get(a));\n edge = true;\n }\n }\n return edge;\n \n }",
"public void add(PVector v, String label) {\n\t\tpoints.add(new GPoint(v, label));\n\t}",
"public int addVertex(Model src, int vertexId) {\n\t\tint x = src.vertexX[vertexId];\n\t\tint y = src.vertexY[vertexId];\n\t\tint z = src.vertexZ[vertexId];\n\n\t\tint identical = -1;\n\t\tfor (int v = 0; v < vertexCount; v++) {\n\t\t\tif ((x == vertexX[v]) && (y == vertexY[v]) && (z == vertexZ[v])) {\n\t\t\t\tidentical = v;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t// append new one if no matches were found\n\t\tif (identical == -1) {\n\t\t\tvertexX[vertexCount] = x;\n\t\t\tvertexY[vertexCount] = y;\n\t\t\tvertexZ[vertexCount] = z;\n\t\t\tif (src.vertexLabel != null) {\n\t\t\t\tvertexLabel[vertexCount] = src.vertexLabel[vertexId];\n\t\t\t}\n\t\t\tidentical = vertexCount++;\n\t\t}\n\n\t\treturn identical;\n\t}",
"public DSAGraphNode(String inLabel, E inValue)\n {\n label = inLabel;\n value = inValue;\n links = new DSALinkedList<DSAGraphNode<E>>();\n visited = false;\n edgeList = new DSALinkedList<DSAGraphEdge<E>>();\n distanceFromSource = Double.MAX_VALUE;\n previous = null;\n }",
"private void addVertex(Vertex vertex) {\n if (!this.verticesAndTheirEdges.containsKey(vertex)) {\n this.verticesAndTheirEdges.put(vertex, new LinkedList<>());\n } else {\n System.out.println(\"Vertex already exists in map.\");\n }\n }",
"ILinkDeleterActionBuilder<SOURCE_BEAN_TYPE, LINKED_BEAN_TYPE> setLinkedEntityLabelSingular(String label);",
"@Override\n public void addVertex(V pVertex, TimeFrame tf) {\n if (pVertex.getId() < 0) {\n int id = vertexIdGen.getNextAvailableID();\n //System.out.println(\" :: vertex new id = \" + id);\n pVertex.setId(id);\n mapAllVertices.add(id, pVertex);\n if (darrGlobalAdjList.get(id) == null) {\n darrGlobalAdjList.add(id, new HashMap<>());\n }\n }\n //System.out.println(\" darrGlobalAdjList.get(pVertex.getId()) : \" + darrGlobalAdjList.get(pVertex.getId()));\n if (!darrGlobalAdjList.get(pVertex.getId()).containsKey(tf)) {\n darrGlobalAdjList.get((pVertex.getId())).put(tf, new LinkedList<>());\n }\n hmpGraphsAtTimeframes.get(tf).addVertex(pVertex);\n //System.out.println(\" \\t\\t\\t\\t\\t DynamicGraph.addVertex tf = \" + tf.getTimeFrameName() + \" :: \" +this.getGraphTitle());\n //System.out.println(\" \\t\\t\\t\\t\\t DynamicGraph.addVertex mapAllVertices = \" + mapAllVertices.getIds());\n //System.out.println(\" \\t\\t\\t\\t\\t DynamicGraph.addVertex tf = \" + hmpGraphsAtTimeframes.get(tf));\n //System.out.println(\" \\t\\t\\t\\t\\t DynamicGraph.addVertex hmpGraphsAtTimeframes.get(tf) all vertexIds = \" + hmpGraphsAtTimeframes.get(tf).getAllVertexIds());\n }",
"public DSAGraphVertex getVertex(String label)\n\t{\n\t\tDSAGraphVertex temp, target = null;\n\t\tIterator<DSAGraphVertex> itr = vertices.iterator();\n\t\tif(vertices.isEmpty()) // case: list is empty\n\t\t{\n\t\t\tthrow new NoSuchElementException(\"Vertices list is empty.\");\n\t\t}\n\t\telse //searches for target\n\t\t{\n\t\t\twhile(itr.hasNext()) //iterates until target is found\n\t\t\t{\n\t\t\t\ttemp = itr.next();\n\t\t\t\tif(temp.getLabel().equals(label))\n\t\t\t\t{\n\t\t\t\t\ttarget = temp;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(target == null) // case: not found\n\t\t{\n\t\t\tthrow new NoSuchElementException(\"Label |\" + label + \"| not found\");\n\t\t}\n\n\t\treturn target;\n\t}",
"@Override\n\tpublic void setUniqueLinkOutTo(VertexFrame vertex, String... labels) {\n\t\tunlinkOut(vertex, labels);\n\t\t// Create a new edge with the given label\n\t\tlinkOut(vertex, labels);\n\t}",
"public void testCreateAndSetOnSameVertexShouldCreateOnlyVertexOnly() {\n }",
"@Override\r\n public void addVertex(Vertex v) {\r\n adjacencyList.put(v, new ArrayList<>()); //putting v into key, a new LinkedList into value for later use\r\n }",
"public boolean hasVertex(String label)\n\t{\n\t\tboolean sucess = false;\n\t\ttry {\n\t\t\tgetVertex(label);\n\t\t\tsucess = true;\n\t\t} catch (NoSuchElementException e) {\n\t\t\tsucess = false;\n\t\t}\n\t\treturn sucess;\n\t}",
"public void setSingleLinkInTo(VertexFrame vertex, String... labels) {\n\t\t// Unlink all edges with the given label\n\t\tunlinkIn(null, labels);\n\t\t// Create a new edge with the given label\n\t\tlinkIn(vertex, labels);\n\t}",
"public LabeledSDGEdge(SDGNode source, SDGNode sink, Kind kind, String label) {\n\t\tsuper(source, sink);\n\t\tthis.kind = kind;\n\t\tthis.label = label;\n\t}",
"void addIsVertexOf(Subdomain_group newIsVertexOf);",
"public void setGraphLabel(String label) {\n label = DotGraphUtility.replaceQuotes(label);\n label = DotGraphUtility.replaceReturns(label);\n this.setGraphAttribute(\"label\", \"\\\"\" + label + \"\\\"\");\n }",
"int addVertex(Vector position);",
"void setEdgeLabel(int edge, String label);",
"public Vertex(int value) {\n this(value, null);\n }",
"public void addCaseToLabel(CaseUUID aCaseUUID, LabelUUID aLabelUUID);",
"public void addVertex(T v) {\n map.put(v, new LinkedList<>());\n }",
"public boolean changeVxLabel(String oldLabel, String newLabel)\n\t{\n\t\tboolean sucess = false;\n\t\ttry {\n\t\t\tDSAGraphVertex vx = getVertex(oldLabel);\n\t\t\tif(!hasVertex(newLabel)) //replace only if new label isn't already taken\n\t\t\t{\n\t\t\t\tvx.label = newLabel;\n\t\t\t\tsucess = true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthrow new IllegalArgumentException(\"|\" + newLabel + \"| already exists\");\n\t\t\t}\n\n\t\t} catch (NoSuchElementException e) {\n\t\t\tthrow new IllegalArgumentException(e.getMessage()); //vx doesn't exist\n\t\t}\n\t\treturn sucess;\n\t}",
"public INode addOrGetNode(String label);",
"public void add(int index, PVector v, String label) {\n\t\tpoints.add(index, new GPoint(v, label));\n\t}",
"public void addEdge(N startNode, N endNode, E label)\r\n/* 43: */ {\r\n/* 44: 89 */ assert (checkRep());\r\n/* 45: 90 */ if (!contains(startNode)) {\r\n/* 46: 90 */ addNode(startNode);\r\n/* 47: */ }\r\n/* 48: 91 */ if (!contains(endNode)) {\r\n/* 49: 91 */ addNode(endNode);\r\n/* 50: */ }\r\n/* 51: 92 */ ((Map)this.map.get(startNode)).put(endNode, label);\r\n/* 52: 93 */ ((Map)this.map.get(endNode)).put(startNode, label);\r\n/* 53: */ }",
"public boolean addVertex(T vert);",
"@Override public boolean add(L vertex) {\r\n \r\n \tif(vertices.contains(vertex)==false)\r\n \t{\r\n \tvertices.add(vertex);\r\n \tcheckRep();\r\n \treturn true;\r\n }\r\n else {\r\n \t\r\n \treturn false;\r\n }\r\n \t\r\n }",
"public void setTo(Vertex<VV> vertex)\r\n { this.to = vertex; }",
"@Test\n public void testConstructTaintFromObjectLabel() {\n Integer label = 5;\n Taint t = Taint.withLabel(label);\n assertTrue(t.containsOnlyLabels(new Object[]{label}));\n }",
"public void addVertex(String vertexName, E data)\r\n\t{\r\n\t\tif(this.adjacencyMap.containsKey(vertexName))\r\n\t\t{\r\n\t\t\tthrow new IllegalArgumentException(\"Vertex already exists in the graph!\");\r\n\t\t}\r\n\t\t\r\n\t\tthis.dataMap.put(vertexName, data);\r\n\t\tthis.adjacencyMap.put(vertexName, new HashMap<String,Integer>());\r\n\t}",
"@Test\n\tpublic void addVertexTest() {\n\t\tgraph.addVertex(A);\n\t\tgraph.addVertex(B);\n\t\tgraph.addVertex(C);\n\t\tgraph.addVertex(D);\n\t\tassertEquals(4, graph.vertices().size());\n\t\tassertTrue(graph.vertices().contains(A));\n\t\tassertTrue(graph.vertices().contains(B));\n\t\tassertTrue(graph.vertices().contains(D));\n\t\tassertFalse(graph.addVertex(B)); // the graph has already have the vertex B, so assert false here.\n\t}",
"public void setVertex(Object vertex2){\r\n this.vertex = vertex2;\r\n }",
"boolean addNode(long idNum, String label);",
"public void drawUndirectedEdge(String label1, String label2) {\n }",
"public static Value makeObject(ObjectLabel v) {\n if (v == null)\n throw new NullPointerException();\n Value r = new Value();\n r.object_labels = newSet();\n r.object_labels.add(v);\n return canonicalize(r);\n }",
"public Label newLabel(Label oldLabel) {\r\n NegraLabel result;\r\n if(oldLabel instanceof NegraLabel) {\r\n NegraLabel l = (NegraLabel) oldLabel;\r\n result = new NegraLabel(l.value(), l.getEdge(), new HashMap<String,String>());\r\n for (Map.Entry<String,String> e : l.features.entrySet()) {\r\n result.features.put(e.getKey(), e.getValue());\r\n }\r\n } else {\r\n result = new NegraLabel(oldLabel.value());\r\n }\r\n return result;\r\n }",
"void addEdge(Vertex v1, Vertex v2, Double w) throws VertexNotInGraphException;",
"@Test(expected = IllegalLabelException.class)\n\tpublic void testIllegalLabelException() throws Exception {\n\t\tnew GraphPoetFactory().parse(\"Edge=<ab!,WordNeighborhood,1,a,b,Yes>\");\n\t}",
"@Override\n\tpublic void setLabel(String label) {\n\t\t\n\t}",
"public wVertex(String s){\r\n name = s;\r\n adjacencies = new ArrayList<Edge>();\r\n }",
"public void testAddVertex() {\n System.out.println(\"addVertex\");\n\n Graph<Integer, Edge<Integer>> graph = newGraph();\n\n for (int i = 0; i < 25; i++) {\n Assert.assertTrue(graph.addVertex(new Integer(i)));\n }\n\n for (int i = 0; i < 25; i++) {\n Assert.assertFalse(graph.addVertex(new Integer(i)));\n }\n }",
"public void setLabel(String label) {\n this.label = label;\n }",
"public void add (V vertex) {\n if (dag.containsKey(vertex)) return;\n dag.put(vertex, new ArrayList<V>());\n }",
"public void setSingleLinkOutTo(VertexFrame vertex, String... labels) {\n\t\t// Unlink all edges with the given label\n\t\tunlinkOut(null, labels);\n\t\t// Create a new edge with the given label\n\t\tlinkOut(vertex, labels);\n\t}",
"void setLabel(Label label);"
] | [
"0.7542841",
"0.7439021",
"0.71662796",
"0.6878285",
"0.684",
"0.6658207",
"0.65569615",
"0.6448051",
"0.62964964",
"0.6284535",
"0.6148801",
"0.61412406",
"0.6107816",
"0.6105784",
"0.6105784",
"0.6101739",
"0.60821575",
"0.60599023",
"0.60272646",
"0.60008323",
"0.59885",
"0.59849143",
"0.59696555",
"0.5932095",
"0.59073657",
"0.5895713",
"0.5890937",
"0.5889948",
"0.5839595",
"0.5839595",
"0.5822396",
"0.57372797",
"0.5729339",
"0.5691513",
"0.56879187",
"0.5680023",
"0.5673312",
"0.56623733",
"0.56524503",
"0.56496036",
"0.5636422",
"0.56318116",
"0.5606299",
"0.5592132",
"0.55867445",
"0.55857784",
"0.5582324",
"0.5579554",
"0.5576641",
"0.5569237",
"0.55681294",
"0.55615276",
"0.55600315",
"0.5555287",
"0.5554897",
"0.55414325",
"0.5530818",
"0.55301183",
"0.5498582",
"0.54880685",
"0.5471156",
"0.5464198",
"0.5464111",
"0.5442929",
"0.5440911",
"0.5439198",
"0.5432594",
"0.54123163",
"0.5399058",
"0.5391955",
"0.5385014",
"0.5383719",
"0.5380997",
"0.5379959",
"0.53736675",
"0.5372979",
"0.5371426",
"0.5362629",
"0.53546846",
"0.534935",
"0.53478324",
"0.5346312",
"0.53439814",
"0.5338036",
"0.5330144",
"0.53279644",
"0.5318279",
"0.53084415",
"0.5293766",
"0.5287864",
"0.5287168",
"0.52866894",
"0.52755046",
"0.52695805",
"0.526395",
"0.5259448",
"0.5251669",
"0.52493507",
"0.52489525",
"0.5246238"
] | 0.6610503 | 6 |
IMPORT: label (String), value (Object) EXPORT: boolean (true if vertex was added, false if not) ASSERTION: Overloaded method. Adds new vertex to with label and value, two or more vertices can not have the same label. | public boolean addVertex(String label, Object value)
{
if(!hasVertex(label)) //if edge does not already exist add it
{
DSAGraphVertex v = new DSAGraphVertex(label, value);
vertices.insertLast(v); //inserts into vertices list at end
return true;
}
else
{
return false;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean addVertex(T vertexLabel);",
"void addVertex(Vertex v);",
"public DSAGraphVertex(String inLabel, Object inValue)\n\t\t{\n\t\t\tlabel = inLabel;\n\t\t\tvalue = inValue;\n\t\t\tlinks = new DSALinkedList();\n\t\t\tvisited = false;\n\t\t}",
"public boolean addVertex(V vertex);",
"public boolean addVertex(V vertex);",
"public boolean addVertex(String label)\n\t{\n\t\tif(!hasVertex(label)) //if edge does not already exist add it\n\t\t{\n\t\t\tDSAGraphVertex v = new DSAGraphVertex(label, null);\n\t\t\tvertices.insertLast(v); //inserts into vertices list at end\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}",
"public void addVertex();",
"public void addVertex(String vertLabel) {\n\n // Implement me!\n if (indexOf(vertLabel, vertices) != -1) {\n return;\n }\n vertices.put(vertLabel, vertices.size());\n if (weights.length == 0) {\n weights = new int[1][0];\n } else {\n weights = addOneRow(weights);\n }\n\n\n }",
"public V addVertex(V v);",
"void add(Vertex vertex);",
"boolean addVertex(V v);",
"public boolean addVertex(Object value) \n\t{\n\t\tthis.map.put(value, new SinglyLinkedList());\n\t\treturn true;\n\t}",
"@Override\r\n public void add(T value) {\r\n Vertex<T> vertex = new Vertex<>(value);\r\n vertices.put(value, vertex);\r\n }",
"@Override\n public void addValue(T value) {\n Vertex<T> vertex = new Vertex<>(value);\n vertices.put(value,vertex);\n }",
"public void addVertex(T vertLabel) {\n\t\tvertCount++;\n\t\tLinkedList[] tempList = new LinkedList[vertCount];\n\t\tLinkedList newVert = new LinkedList((String)vertLabel);\n\t\t\n\t\tif(verts.length==0){\n\t\t\ttempList[0] = newVert;\n\t\t}\n\t\t\n\t\telse{\n\t\t\tfor(int x=0; x<verts.length; x++){\n\t\t\t\t\ttempList[x] = verts[x];\n\t\t\t}\n\t\t\ttempList[verts.length] = newVert;\n\t\t}\n\tverts = tempList;\n }",
"@Override\r\n public void add(V vertexName) {\r\n if(!contains(vertexName))\r\n map.put(vertexName, new Vertex(vertexName));\r\n }",
"@Override\n\tpublic boolean add(L vertex) {\n\t\tIterator<Vertex<L>> vertexiter = verticelist.iterator();\n\t\twhile (vertexiter.hasNext()) {\n\t\t\tVertex<L> v = vertexiter.next();\n\t\t\tL lab = v.getlabel();\n\t\t\tif (lab.equals(vertex))\n\t\t\t\treturn false;\n\t\t}\n\t\tVertex<L> v = new Vertex<L>(vertex);\n\t\tverticelist.add(v);\n\t\treturn true;\n\t}",
"public abstract boolean putVertex(Vertex incomingVertex);",
"void add(int vertex);",
"public Vertex(int label) {\r\n isVisited = false;\r\n this.label = label;\r\n }",
"public boolean addVertex(T vert);",
"void addVertex(Vertex v, ArrayList<Vertex> neighbors, ArrayList<Double> weights) throws VertexNotInGraphException;",
"public Vertex(String label, int index){\n this.label = label;\n this.index = index;\n this.previous = null;\n visited = false;\n }",
"public void addVertex (){\t\t \n\t\tthis.graph.insert( new MyList<Integer>() );\n\t}",
"@Override\n public void addVertex(V vertex)\n {\n if (vertex.equals(null)){\n throw new IllegalArgumentException();\n }\n ArrayList <V> edges = new ArrayList<>();\n\t graph.put(vertex, edges);\n\n }",
"@Override\n\tpublic void implementAddVertex() {\n\t\t\n\t}",
"public void addVertex( VKeyT key, VDataT data );",
"public void addVertex(Vertex v) {\n\t \tif (!this.vertexes.contains(v)) {\r\n\t \t\tthis.vertexes.add(v);\r\n\t \t}\r\n\t \t//otherwise just ignore, the Graph already has this vertex\r\n\t }",
"int addVertex(Vector position);",
"public ArangoDBVertex(String key, String label, ArangoDBGraph graph) {\n\t\tsuper(key, label, graph);\n\t}",
"public void addVertex(Vertex vertexToAdd) {\r\n\t\tlistVertex.add(vertexToAdd);\r\n\t}",
"@Override public boolean add(L vertex) {\r\n \r\n \tif(vertices.contains(vertex)==false)\r\n \t{\r\n \tvertices.add(vertex);\r\n \tcheckRep();\r\n \treturn true;\r\n }\r\n else {\r\n \t\r\n \treturn false;\r\n }\r\n \t\r\n }",
"public void addVertex(String vertexName, E data)\r\n\t{\r\n\t\tif(this.adjacencyMap.containsKey(vertexName))\r\n\t\t{\r\n\t\t\tthrow new IllegalArgumentException(\"Vertex already exists in the graph!\");\r\n\t\t}\r\n\t\t\r\n\t\tthis.dataMap.put(vertexName, data);\r\n\t\tthis.adjacencyMap.put(vertexName, new HashMap<String,Integer>());\r\n\t}",
"public void addVertex(Vertex v) {\r\n if (vertexNum >= maxNum) {\r\n System.out.println(\"Error\");\r\n return;\r\n }\r\n vertexNum += 1;\r\n vertexList.add(v);\r\n }",
"public void addVertex(T v) {\n map.put(v, new LinkedList<>());\n }",
"public void add(PVector v, String label) {\n\t\tpoints.add(new GPoint(v, label));\n\t}",
"public void addVertex(Vertex v) {\n\t\tvertices.put(v.name(), v);\n\t}",
"Vertex createVertex();",
"public Vertex(T vertexLabel) {\r\n\t\tlabel = vertexLabel;\r\n\t\tedgeList = new LinkedList<Edge>();\r\n\t\tvisited = false;\r\n\t\tpreviousVertex = null;\r\n\t\tcost = 0;\r\n\t}",
"public void addVertex(Vertex vertex){\n \n synchronized(vertexes){\n \n vertexes.put(vertex.getID(),vertex);\n }\n }",
"public Boolean addEdge( AnyType vertex_value_A, AnyType vertex_value_B ) throws VertexException {\n \n // ------------------------------------\n // Basic steps:\n // ------------------------------------\n // 1) For Vertex A and B, check to see if the vertex exits in the \n // vertex_adjacency_list. If not, then add new vertex (with given \n // value) to the vertex_adjacency_list.\n // 2) In Vertex class, check if Vertex B is in Vertex A's \n // adjacent_vertex_list and vice versa (i.e. an edge exists). If \n // edge already exists, then return false, otherwise goto step 3.\n // 3) Add Vertex B to Vertex A's adjacent_vertex_list and vice versa.\n // Lastly, return true indicating the edge was successfully added.\n \n // ----------------------------\n // TODO: Add your code here\n // ----------------------------\n boolean a_in_list = false;\n boolean b_in_list = false;\n boolean edge = false;\n int size = vertex_adjacency_list.size();\n int a = -1;\n int b = -1;\n \n //make new vertices with values passed in\n Vertex<AnyType> A = new Vertex<AnyType>(vertex_value_A);\n Vertex<AnyType> B = new Vertex<AnyType>(vertex_value_B);\n //check if they are in the list\n for(int i = 0; i<= size-1; i++){\n if( vertex_adjacency_list.get(i).compareTo( A) == 0){\n a_in_list = true;\n a = i;\n \n }\n if( vertex_adjacency_list.get(i).compareTo(B) == 0){\n b_in_list = true;\n b = i;\n \n }\n }\n //if not in list, add\n if( a_in_list == false){\n vertex_adjacency_list.add(A);\n a_in_list = true;\n a = vertex_adjacency_list.size()-1;\n }\n if( b_in_list == false){\n vertex_adjacency_list.add(B);\n b_in_list =true;\n b = vertex_adjacency_list.size()-1;\n }\n //check if edge\n edge = vertex_adjacency_list.get(a).hasAdjacentVertex(vertex_adjacency_list.get(b));\n //if edge then add to list \n if( a_in_list == true && b_in_list == true){\n if(edge){\n return edge;\n }\n else{\n vertex_adjacency_list.get(a).addAdjacentVertex(vertex_adjacency_list.get(b));\n vertex_adjacency_list.get(b).addAdjacentVertex(vertex_adjacency_list.get(a));\n edge = true;\n }\n }\n return edge;\n \n }",
"public Position insertVertex(Object o);",
"public void add(int index, PVector v, String label) {\n\t\tpoints.add(index, new GPoint(v, label));\n\t}",
"@Override\r\n public void addVertex(Vertex v) {\r\n adjacencyList.put(v, new ArrayList<>()); //putting v into key, a new LinkedList into value for later use\r\n }",
"void addLabel(Object newLabel);",
"void addLabel(Object newLabel);",
"private void addVertex(Vertex vertex) {\n if (!this.verticesAndTheirEdges.containsKey(vertex)) {\n this.verticesAndTheirEdges.put(vertex, new LinkedList<>());\n } else {\n System.out.println(\"Vertex already exists in map.\");\n }\n }",
"@Override\n public void addVertex(V pVertex, TimeFrame tf) {\n if (pVertex.getId() < 0) {\n int id = vertexIdGen.getNextAvailableID();\n //System.out.println(\" :: vertex new id = \" + id);\n pVertex.setId(id);\n mapAllVertices.add(id, pVertex);\n if (darrGlobalAdjList.get(id) == null) {\n darrGlobalAdjList.add(id, new HashMap<>());\n }\n }\n //System.out.println(\" darrGlobalAdjList.get(pVertex.getId()) : \" + darrGlobalAdjList.get(pVertex.getId()));\n if (!darrGlobalAdjList.get(pVertex.getId()).containsKey(tf)) {\n darrGlobalAdjList.get((pVertex.getId())).put(tf, new LinkedList<>());\n }\n hmpGraphsAtTimeframes.get(tf).addVertex(pVertex);\n //System.out.println(\" \\t\\t\\t\\t\\t DynamicGraph.addVertex tf = \" + tf.getTimeFrameName() + \" :: \" +this.getGraphTitle());\n //System.out.println(\" \\t\\t\\t\\t\\t DynamicGraph.addVertex mapAllVertices = \" + mapAllVertices.getIds());\n //System.out.println(\" \\t\\t\\t\\t\\t DynamicGraph.addVertex tf = \" + hmpGraphsAtTimeframes.get(tf));\n //System.out.println(\" \\t\\t\\t\\t\\t DynamicGraph.addVertex hmpGraphsAtTimeframes.get(tf) all vertexIds = \" + hmpGraphsAtTimeframes.get(tf).getAllVertexIds());\n }",
"public void add (V vertex) {\n if (dag.containsKey(vertex)) return;\n dag.put(vertex, new ArrayList<V>());\n }",
"com.microsoft.schemas.xrm._2011.contracts.Label addNewLabel();",
"@Override\n\tpublic boolean add(E vertex) {\n\t\treturn vertices.add(vertex);\n\t}",
"public int addVertex(Model src, int vertexId) {\n\t\tint x = src.vertexX[vertexId];\n\t\tint y = src.vertexY[vertexId];\n\t\tint z = src.vertexZ[vertexId];\n\n\t\tint identical = -1;\n\t\tfor (int v = 0; v < vertexCount; v++) {\n\t\t\tif ((x == vertexX[v]) && (y == vertexY[v]) && (z == vertexZ[v])) {\n\t\t\t\tidentical = v;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t// append new one if no matches were found\n\t\tif (identical == -1) {\n\t\t\tvertexX[vertexCount] = x;\n\t\t\tvertexY[vertexCount] = y;\n\t\t\tvertexZ[vertexCount] = z;\n\t\t\tif (src.vertexLabel != null) {\n\t\t\t\tvertexLabel[vertexCount] = src.vertexLabel[vertexId];\n\t\t\t}\n\t\t\tidentical = vertexCount++;\n\t\t}\n\n\t\treturn identical;\n\t}",
"public Vertex(L l) {\n\t\tlabel = l;\n\t}",
"public boolean addVertex(Vertex vertex)\n\t{\n\t\tVertex current = this.vertices.get(vertex.getLabel());\n\t\tif (current != null)\n\t\t{\n\t\t\tcurrent.visit();//if vertex exists, increment visits\n\t\t\t\n\t\t\t//add edge between vertices\n\t\t\taddEdge(last,current);\n\t\t\t//overwrite last vertex\n\t\t\tlast = current;\n\t\t\t\n\t\t\treturn false;//vertex not added\n\t\t\t\n\t\t}\n\t\tvertices.put(vertex.getLabel(), vertex);\n\t\t//track last vertex to add edge\n\t\tif(last == null)//first vertex?\n\t\t{\n\t\t\tlast = vertex;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//add edge between vertices\n\t\t\taddEdge(last,vertex);\n\t\t\t//overwrite last vertex\n\t\t\tlast = vertex;\n\t\t}\n\t\treturn true;//vertex was added\n\t\t\n\t}",
"Vertex addVertex(String name){\n\t\t//if graph doesn't already have the key\n\t\tif (!adjlist.containsKey(name)) {\n\t\t\tkeys.add(name); //places keys in list in order they're added\n\t\t\tvertices++; //increases vertex count variable\n\t\t\treturn adjlist.put(name, new Vertex(name)); //adds to hashmap\n\t\t//if graph does already have the key\n\t\t} else {\n\t\t\treturn adjlist.get(name);\n\t\t}\n\t}",
"private void attachLabel(Vertex v, String string) throws IOException\n {\n if (string == null || string.length() == 0)\n return;\n String label = string.trim();\n// String label = trimQuotes(string).trim();\n// if (label.length() == 0)\n// return;\n if (unique_labels)\n {\n try\n {\n StringLabeller sl = StringLabeller.getLabeller((Graph)v.getGraph(), LABEL);\n sl.setLabel(v, label);\n }\n catch (StringLabeller.UniqueLabelException slule)\n {\n throw new FatalException(\"Non-unique label found: \" + slule);\n }\n }\n else\n {\n v.addUserDatum(LABEL, label, UserData.SHARED);\n }\n }",
"void addEdge(Vertex v1, Vertex v2, Double w) throws VertexNotInGraphException;",
"@Test\n\tpublic void addVertexTest() {\n\t\tgraph.addVertex(A);\n\t\tgraph.addVertex(B);\n\t\tgraph.addVertex(C);\n\t\tgraph.addVertex(D);\n\t\tassertEquals(4, graph.vertices().size());\n\t\tassertTrue(graph.vertices().contains(A));\n\t\tassertTrue(graph.vertices().contains(B));\n\t\tassertTrue(graph.vertices().contains(D));\n\t\tassertFalse(graph.addVertex(B)); // the graph has already have the vertex B, so assert false here.\n\t}",
"public Vertex(String name){\r\n this.name = name;\r\n }",
"public void add(Vertex vertex) {\n\t\tvertices.add(vertex);\n\t}",
"@Override\r\n\tpublic void addVertex(Integer vertexID) {\r\n\t\tif (vertexIDs.size() > 0) {\r\n\t\t\tvertexIDs.set(0, vertexID);\r\n\t\t} else {\r\n\t\t\tvertexIDs.add(vertexID);\r\n\t\t}\r\n\t}",
"void addIsVertexOf(Subdomain_group newIsVertexOf);",
"public Vertex addVertex(String name) {\n Vertex v;\n v = mVertices.get(name);\n if (v == null) {\n v = new Vertex(name);\n mVertices.put(name, v);\n mAdjList.put(v, new TreeSet<Vertex>());\n mNumVertices += 1;\n }\n return v;\n }",
"@Override\n\t\tpublic void addLabel(Label label) {\n\n\t\t}",
"Vertex(){}",
"public void addVertex(String aName)\r\n\t{\n\t\tif(containsName(aName))\r\n\t\t\treturn;\r\n\t\tVertex v = new Vertex(aName);\r\n\t\tvertices.add(v);\r\n\t\tif(origin == null)\r\n\t\t\torigin = v;\r\n\t\t\r\n\t}",
"public void testAddVertex() {\n System.out.println(\"addVertex\");\n\n Graph<Integer, Edge<Integer>> graph = newGraph();\n\n for (int i = 0; i < 25; i++) {\n Assert.assertTrue(graph.addVertex(new Integer(i)));\n }\n\n for (int i = 0; i < 25; i++) {\n Assert.assertFalse(graph.addVertex(new Integer(i)));\n }\n }",
"public void addVertex (E vertex)\n {\n if (!this.containsVertex (vertex))\n {\n // Enlargen the graph if needed\n if (lastIndex == vertices.length - 1)\n this.enlarge ();\n\n lastIndex = lastIndex + 1;\n vertices[lastIndex] = vertex;\n }\n }",
"public void addVertex(Vertex v)\n {\n this.vertices.add(v);\n connections.put(v, new ArrayList<>());\n }",
"public native VertexList append(VertexNode vertex);",
"public void addVertex(int name) {\n\t\tVertex v = new Vertex(name, parent);\n\t\tthis.addVertex(v);\n\t}",
"boolean addNode(long idNum, String label);",
"@Override\n public E addVertex(E vertex) {\n if (vertex == null || dictionary.containsKey(vertex)) {\n return null;\n } else {\n dictionary.put(vertex, new ArrayList<>());\n return vertex;\n }\n }",
"@Test\n public void testAddVertexExisting() throws Exception {\n final ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();\n\n Graph<Long, Long, Long> graph =\n Graph.fromDataSet(\n TestGraphUtils.getLongLongVertexData(env),\n TestGraphUtils.getLongLongEdgeData(env),\n env);\n\n graph = graph.addVertex(new Vertex<>(1L, 1L));\n\n DataSet<Vertex<Long, Long>> data = graph.getVertices();\n List<Vertex<Long, Long>> result = data.collect();\n\n expectedResult = \"1,1\\n\" + \"2,2\\n\" + \"3,3\\n\" + \"4,4\\n\" + \"5,5\\n\";\n\n compareResultAsTuples(result, expectedResult);\n }",
"@Test\n void testAddVertexGraph() {\n Assertions.assertTrue(graph.addVertex(v1));\n Assertions.assertTrue(graph.containsVertex(v1));\n Assertions.assertTrue(checkInv());\n }",
"public void addTrainingData(String value,String label);",
"protected void visit(Graph<VLabel, ELabel>.Vertex v) {\n }",
"public abstract Code addLabel(String label);",
"public void addVertex (T vertex){\n if (vertexIndex(vertex) > 0) return; // vertex already in graph, return.\n if (n == vertices.length){ // need to expand capacity of arrays\n expandCapacity();\n }\n \n vertices[n] = vertex;\n for (int i = 0; i < n; i++){ // populating new edges with -1\n edges[n][i] = -1;\n edges[i][n] = -1;\n }\n n++;\n }",
"public void add(int index, float x, float y, String label) {\n\t\tpoints.add(index, new GPoint(x, y, label));\n\t}",
"void addVertex(SimpleVertex simpleVertex) {\n\t\tallvertices.add(simpleVertex);\n\t}",
"public ImmutableDVertex(\n Optional<V> value, List<? extends DEdge<V, E>> edges) {\n super(value, edges);\n }",
"@Override\r\n\tpublic boolean insertVertex(E e) {\r\n\t\tif(!containsVertex(e)) {\r\n\t\t\tvertices.put(e, new Vertex<E>(e));\r\n\t\t\tadjacencyLists.put(e, new ArrayList<>());\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"public boolean addEdge(String label1, String label2)\n\t{\n\t\tif(!isAdjacent(label1, label2)) //if edge does not already exist add it\n\t\t{\n\t\t\tDSAGraphVertex vx1 = getVertex(label1), vx2 = getVertex(label2);\n\t\t\tvx1.addEdge(vx2);\n\t\t\tvx2.addEdge(vx1);\n\t\t\tedgeCount++;\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}",
"public boolean addVertices(Collection<? extends V> vertices);",
"public boolean hasVertex(String label)\n\t{\n\t\tboolean sucess = false;\n\t\ttry {\n\t\t\tgetVertex(label);\n\t\t\tsucess = true;\n\t\t} catch (NoSuchElementException e) {\n\t\t\tsucess = false;\n\t\t}\n\t\treturn sucess;\n\t}",
"public void set(int index, PVector v, String label) {\n\t\tif (index == points.size()) {\n\t\t\tpoints.add(new GPoint(v, label));\n\t\t} else {\n\t\t\tpoints.get(index).set(v, label);\n\t\t}\n\t}",
"@SuppressWarnings(\"unchecked\")\n\tpublic boolean addVertices(V... vs);",
"public void addEdge(V vertex) {\n this.vertices.put(vertex, new HashSet<>());\n }",
"public void addVertex(int vertex) {\n if (!adjacencyMap.containsKey(vertex)) {\n adjacencyMap.put(vertex, new HashSet<>());\n }\n }",
"public Vertex(int value) {\n this(value, null);\n }",
"public boolean addVertex(GeographicPoint location)\n\t{\n\t\t// TODO: Implement this method in WEEK 3\n\t\tif (location == null) {\n\t\t\treturn false;\n\t\t}\n\t\telse if (!map.containsKey(location)) {\n\t\t\tmap.put(location, new MapNode(location));\n\t\t\tnumVertices++;\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"boolean addEdge(V v, V w, double weight);",
"@Override\n\tpublic boolean containsVertex(Object value) \n\t{\n\t\treturn (this.map.containsKey(value));\n\t}",
"public String storeVertex(VertexInfo vdata, EdgeCollectionWritable edata);",
"public Vertex(String argName) {\n name = argName;\n }",
"@Override\n public boolean addEdge(E vertex1, E vertex2) {\n if (vertex1 != null\n && vertex2 != null\n && vertex1 != vertex2\n && dictionary.containsKey(vertex1)\n && dictionary.containsKey(vertex2)) {\n dictionary.get(vertex1).add(vertex2);\n dictionary.get(vertex2).add(vertex1);\n return true;\n } else {\n return false;\n }\n }",
"public void newVertex(String name)\r\n\t{\r\n\t\t// new vertex initialized here\r\n\t\tmyGraph[graphSize] = new Vertex();\r\n\t\tmyGraph[graphSize].name = name;\r\n\t\tmyGraph[graphSize].adjVertexHead = null;\r\n\t\t// maintain the size counter\r\n\t\tgraphSize++;\r\n\t}",
"@Override\r\n public void connectDirected(T value, T neighbor) {\r\n Vertex<T> v = vertices.get(value);\r\n Vertex<T> n = vertices.get(neighbor);\r\n v.addNeighbor(n);\r\n }",
"public void addEdges(Edge value)\r\n\t{\r\n\t\tedges.add(value);\r\n\t}"
] | [
"0.83014596",
"0.7313909",
"0.7267379",
"0.72234213",
"0.72234213",
"0.7180344",
"0.71459824",
"0.7142874",
"0.71263784",
"0.710297",
"0.70591515",
"0.6983834",
"0.69488233",
"0.685715",
"0.675708",
"0.6676669",
"0.66567373",
"0.6614186",
"0.6593333",
"0.6535584",
"0.64696795",
"0.64252156",
"0.63905406",
"0.6387009",
"0.63646203",
"0.6336647",
"0.63359684",
"0.63208497",
"0.62900066",
"0.6261287",
"0.62565744",
"0.61839813",
"0.61658823",
"0.6160947",
"0.61554486",
"0.61488986",
"0.6148352",
"0.6133821",
"0.61144173",
"0.60917586",
"0.60740983",
"0.60666263",
"0.60407615",
"0.6031572",
"0.59859526",
"0.59859526",
"0.5977192",
"0.59668416",
"0.59430724",
"0.5917128",
"0.58887047",
"0.588651",
"0.58840185",
"0.5874478",
"0.58559304",
"0.5845459",
"0.58432",
"0.58344686",
"0.5834065",
"0.5830159",
"0.58286583",
"0.5818",
"0.5810938",
"0.58055264",
"0.58029884",
"0.5798086",
"0.5794136",
"0.57622296",
"0.5756339",
"0.57433903",
"0.57303536",
"0.5719958",
"0.5680407",
"0.5665523",
"0.5649149",
"0.56436646",
"0.5641841",
"0.56363004",
"0.5632557",
"0.5599384",
"0.55840755",
"0.55806834",
"0.5579446",
"0.55647045",
"0.55608106",
"0.554891",
"0.55416036",
"0.55392814",
"0.5539268",
"0.552978",
"0.5526698",
"0.5518979",
"0.55102164",
"0.5482846",
"0.54721427",
"0.5450641",
"0.5444928",
"0.54326165",
"0.542216",
"0.54110175"
] | 0.80820245 | 1 |
IMPORT: label1 (String), label2 (String) EXPORT: boolean (true if edge was added, false if not) ASSERTION: Checks if an edge exists and then adds edge between 2 parameter nodes | public boolean addEdge(String label1, String label2)
{
if(!isAdjacent(label1, label2)) //if edge does not already exist add it
{
DSAGraphVertex vx1 = getVertex(label1), vx2 = getVertex(label2);
vx1.addEdge(vx2);
vx2.addEdge(vx1);
edgeCount++;
return true;
}
else
{
return false;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract boolean addEdge(Node node1, Node node2, int weight);",
"public boolean addEdge(String id1, String id2)\n\t{\n\t\treturn addEdge(id1, id2, null);\n\t}",
"public void addEdge(int v1, int v2, Object edgeInfo) {\n//your code here\n Edge edge = new Edge(v1, v2, edgeInfo);\n if(adjLists[v1].contains(edge)){\n return;\n }\n adjLists[v1].addLast(edge);\n }",
"private void addEdgeWithLabel(NasmInst source, NasmLabel destination) {\n if (source == null || destination == null)\n throw new FgException(\"ERROR: Can't create an edge without a source and a destination\");\n\n if (systemCalls.contains(destination.toString()))\n return; // System call: iprintLF, readline or atoi. No edge needed\n\n NasmInst destinationInst = label2Inst.get(destination.toString());\n if (destinationInst == null)\n throw new FgException(\"ERROR: No instruction matching with the given label\");\n addEdgeWithInst(source, destinationInst);\n }",
"boolean addEdge(E edge);",
"public void addUndirectedEdge(int v1, int v2, Object edgeInfo) {\n//your code here\n Edge edge1 = new Edge(v1, v2, edgeInfo);\n Edge edge2 = new Edge(v2, v1, edgeInfo);\n if(!adjLists[v1].contains(edge1)){\n adjLists[v1].addLast(edge1);\n }\n if(!adjLists[v2].contains(edge2)){\n adjLists[v2].addLast(edge2);\n }\n }",
"void addEdge(Vertex v1, Vertex v2, Double w) throws VertexNotInGraphException;",
"public boolean addEdge(Vertex one, Vertex two)\n\t{\n\t\treturn addEdge(one, two, 1);//returns true if added\n\t}",
"public void addEdge(N startNode, N endNode, E label)\r\n/* 43: */ {\r\n/* 44: 89 */ assert (checkRep());\r\n/* 45: 90 */ if (!contains(startNode)) {\r\n/* 46: 90 */ addNode(startNode);\r\n/* 47: */ }\r\n/* 48: 91 */ if (!contains(endNode)) {\r\n/* 49: 91 */ addNode(endNode);\r\n/* 50: */ }\r\n/* 51: 92 */ ((Map)this.map.get(startNode)).put(endNode, label);\r\n/* 52: 93 */ ((Map)this.map.get(endNode)).put(startNode, label);\r\n/* 53: */ }",
"protected void addEdge(CyEdge edge, LayoutNode v1, LayoutNode v2) {\n\tLayoutEdge newEdge = new LayoutEdge(edge, v1, v2);\n\tupdateWeights(newEdge);\n\tedgeList.add(newEdge);\n }",
"public boolean addEdge(String id1, String id2, Integer weight)\n\t{\n\t\t// if its a new edge, or a new edge weight\n\t\tif (!hasEdge(id1, id2) || (weight != null && edgeWeight(id1, id2) == null))\n\t\t{\n\t\t\tNode n1 = getNode(id1);\n\t\t\tNode n2 = getNode(id2);\n\t\t\tn1.addEdge(n2, weight);\n\t\t\tn2.addEdge(n1, weight);\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"@Test \r\n void insert_two_vertexs_then_create_edge(){\r\n graph.addVertex(\"A\");\r\n graph.addVertex(\"B\");\r\n graph.addEdge(\"A\", \"B\");\r\n List<String> adjacentA = graph.getAdjacentVerticesOf(\"A\");\r\n List<String> adjacentB = graph.getAdjacentVerticesOf(\"B\");\r\n if(!adjacentA.contains(\"B\")) { \r\n fail();\r\n }\r\n if(adjacentB.contains(\"A\")) { \r\n fail();\r\n }\r\n }",
"void add(Edge edge);",
"public void testAddEdgeEdge( ) {\n init( );\n\n try {\n m_g1.addEdge( m_eLoop ); // loops not allowed\n assertFalse( );\n }\n catch( IllegalArgumentException e ) {\n assertTrue( );\n }\n\n try {\n m_g3.addEdge( null );\n assertFalse( ); // NPE\n }\n catch( NullPointerException e ) {\n assertTrue( );\n }\n\n Edge e = m_eFactory.createEdge( m_v2, m_v1 );\n\n try {\n m_g1.addEdge( e ); // no such vertex in graph\n assertFalse( );\n }\n catch( IllegalArgumentException ile ) {\n assertTrue( );\n }\n\n assertEquals( false, m_g2.addEdge( e ) );\n assertEquals( false, m_g3.addEdge( e ) );\n assertEquals( true, m_g4.addEdge( e ) );\n }",
"public void addEdge(String node1, String node2) {\n\r\n LinkedHashSet<String> adjacent = map.get(node1);\r\n// checking to see if adjacent node exist or otherwise is null \r\n if (adjacent == null) {\r\n adjacent = new LinkedHashSet<String>();\r\n map.put(node1, adjacent);\r\n }\r\n adjacent.add(node2); // if exist we add the instance node to adjacency list\r\n }",
"void addEdge(int x, int y);",
"void addEdge(int source, int destination, int weight);",
"public void drawUndirectedEdge(String label1, String label2) {\n }",
"public void addEdge(Integer id, UNode n1, UNode n2, String edge)\r\n {\r\n UEdge e = new UEdge(id, n1, n2, edge);\r\n n1.addOutEdge(e);\r\n n2.addInEdge(e);\r\n uEdges.put (id, e);\r\n }",
"public void addEdge(Node from, Node to);",
"@Override\n public boolean addEdge(E vertex1, E vertex2) {\n if (vertex1 != null\n && vertex2 != null\n && vertex1 != vertex2\n && dictionary.containsKey(vertex1)\n && dictionary.containsKey(vertex2)) {\n dictionary.get(vertex1).add(vertex2);\n dictionary.get(vertex2).add(vertex1);\n return true;\n } else {\n return false;\n }\n }",
"public boolean addEdge(final int vertice1, final int vertice2) {\n\t\tboolean isAdded = false;\n\n\t\ttry {\n\n\t\t\tadjacencyList[vertice1].add(vertice2);\n\t\t\tadjacencyList[vertice2].add(vertice1);\n\t\t\tisAdded = true;\n\t\t} catch (final Exception exception) {\n\t\t\tSystem.err.println(\"-----ERROR--------\\n\" + exception.getMessage());\n\t\t}\n\n\t\treturn isAdded;\n\t}",
"@Test \r\n void create_edge_between_to_nonexisted_vertexes() {\r\n graph.addEdge(\"A\", \"B\");\r\n List<String> adjacentA = graph.getAdjacentVerticesOf(\"A\");\r\n List<String> adjacentB = graph.getAdjacentVerticesOf(\"B\");\r\n if(!adjacentA.contains(\"B\")) { \r\n fail();\r\n }\r\n if(adjacentB.contains(\"A\")) { \r\n fail();\r\n }\r\n }",
"@Test\n\tpublic void addEdgeTest() {\n\t\tList<Vertex> vertices = new ArrayList<>();\n\t\tvertices.add(C);\n\t\tvertices.add(D);\n\t\tedge_0.addVertices(vertices);\n\t\tassertTrue(graph.addEdge(edge_0));\n\t\tassertFalse(graph.addEdge(edge_0));\n\t}",
"public Boolean addEdge( AnyType vertex_value_A, AnyType vertex_value_B ) throws VertexException {\n \n // ------------------------------------\n // Basic steps:\n // ------------------------------------\n // 1) For Vertex A and B, check to see if the vertex exits in the \n // vertex_adjacency_list. If not, then add new vertex (with given \n // value) to the vertex_adjacency_list.\n // 2) In Vertex class, check if Vertex B is in Vertex A's \n // adjacent_vertex_list and vice versa (i.e. an edge exists). If \n // edge already exists, then return false, otherwise goto step 3.\n // 3) Add Vertex B to Vertex A's adjacent_vertex_list and vice versa.\n // Lastly, return true indicating the edge was successfully added.\n \n // ----------------------------\n // TODO: Add your code here\n // ----------------------------\n boolean a_in_list = false;\n boolean b_in_list = false;\n boolean edge = false;\n int size = vertex_adjacency_list.size();\n int a = -1;\n int b = -1;\n \n //make new vertices with values passed in\n Vertex<AnyType> A = new Vertex<AnyType>(vertex_value_A);\n Vertex<AnyType> B = new Vertex<AnyType>(vertex_value_B);\n //check if they are in the list\n for(int i = 0; i<= size-1; i++){\n if( vertex_adjacency_list.get(i).compareTo( A) == 0){\n a_in_list = true;\n a = i;\n \n }\n if( vertex_adjacency_list.get(i).compareTo(B) == 0){\n b_in_list = true;\n b = i;\n \n }\n }\n //if not in list, add\n if( a_in_list == false){\n vertex_adjacency_list.add(A);\n a_in_list = true;\n a = vertex_adjacency_list.size()-1;\n }\n if( b_in_list == false){\n vertex_adjacency_list.add(B);\n b_in_list =true;\n b = vertex_adjacency_list.size()-1;\n }\n //check if edge\n edge = vertex_adjacency_list.get(a).hasAdjacentVertex(vertex_adjacency_list.get(b));\n //if edge then add to list \n if( a_in_list == true && b_in_list == true){\n if(edge){\n return edge;\n }\n else{\n vertex_adjacency_list.get(a).addAdjacentVertex(vertex_adjacency_list.get(b));\n vertex_adjacency_list.get(b).addAdjacentVertex(vertex_adjacency_list.get(a));\n edge = true;\n }\n }\n return edge;\n \n }",
"void addEdge(int vertex1, int vertex2){\n adjList[vertex1].add(vertex2);\n adjList[vertex2].add(vertex1);\n }",
"private void createEdges() throws IOException {\r\n\t\tString line;\r\n\t\tString fromVertex=null;\r\n\t\tString toVertex=null;\r\n\t\twhile((line=next(1))!=null) {\r\n\t\t\tif(line.startsWith(\"[\"))\r\n\t\t\t\t{\r\n\t\t\t\tthis.buffer=line;\r\n\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\tint colon=line.indexOf(':');\r\n\t\t\tif(colon==-1) continue;\r\n\t\t\tif(line.startsWith(\"id:\"))\r\n\t\t\t\t{\r\n\t\t\t\ttoVertex= line.substring(colon+1).trim();\r\n\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\tif(line.startsWith(\"is_a:\"))\r\n\t\t\t\t{\r\n\t\t\t\tfromVertex = nocomment(line.substring(colon+1));\r\n\t\t\t\t//System.out.println(fromVertex+\" to be connected to: \"+toVertex);\r\n\t\t\t\tTerm fromNode = terms.get(fromVertex);\r\n\t\t\t\tTerm toNode = terms.get(toVertex);\r\n\t\t\t\tif (fromNode.namespace.equals(\"molecular_function\") && toNode.namespace.equals(\"molecular_function\")){\r\n\t\t\t\t\tdagMF.addEdge(fromNode, toNode);\r\n\t\t\t\t}\r\n\t\t\t\telse if (fromNode.namespace.equals(\"biological_process\") && toNode.namespace.equals(\"biological_process\")){\r\n\t\t\t\t\tdagBP.addEdge(fromNode, toNode);\r\n\t\t\t\t} \r\n\t\t\t\telse if (fromNode.namespace.equals(\"cellular_component\") && toNode.namespace.equals(\"cellular_component\")){\r\n\t\t\t\t\tdagCC.addEdge(fromNode, toNode);\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tSystem.out.println(\"FAILED TO ADD TO DAG, not belonging to the same NAMESPACE\");\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t}\r\n\t}",
"private void addEdgeWithInst(NasmInst source, NasmInst destination) {\n if (source == null || destination == null)\n throw new FgException(\"ERROR: Can't create an edge without a source and a destination\");\n Node from = inst2Node.get(source);\n Node to = inst2Node.get(destination);\n if (from == null || to == null)\n throw new FgException(\"ERROR: No nodes matching with given Source or destination \");\n graph.addEdge(from, to);\n }",
"public IEdge addEdge(String from, String to, Double cost);",
"public void addEdge(int v1, int v2) {\r\n addEdge(v1, v2, null);\r\n }",
"public void addEdge(int start, int end);",
"Edge createEdge(Vertex src, Vertex tgt, boolean directed);",
"public abstract boolean putEdge(Edge incomingEdge);",
"public boolean hasEdge(int node1, int node2)\n{\n\tNode s=(Node)this.getNodes().get(node1);\n return s.hasNi(node2);\n\t\n}",
"public void addEdge(int start, int end, double weight);",
"public void addEdge(int v1, int v2) {\n addEdge(v1, v2, null);\n }",
"public void addEdge(int v1, int v2) {\n addEdge(v1, v2, null);\n }",
"public boolean addEdge(T begin, T end, int weight);",
"@Test\n\tvoid testAddEdge() {\n\t\tgeo_location ge = new GeoLoc(0,1,2);\n\t\tnode_data n0 =new NodeData(0,ge);\n\t\tgeo_location ge1 = new GeoLoc(0,6,2);\n\t\tnode_data n1 =new NodeData(2,ge1);\n\t\tgraph.addNode(n0);\n\t\tgraph.addNode(n1);\n\t\tedge_data e = new EdgeData(0, 2, 20);\n\t\tgraph.connect(0, 2, 20);\n\t\tedge_data actual = graph.getEdge(0, 2);\n\t\tedge_data expected = e;\n\t\tassertEquals(expected.getSrc(), actual.getSrc());\n\t\tassertEquals(expected.getDest(), actual.getDest());\n\t\tassertEquals(expected.getWeight(), actual.getWeight());\n\t}",
"public Edge(T node_1, T node_2,S label) {\n\t\tparent = node_1;\n\t\tchild = node_2;\n\t\tl = label;\n\t\tcheckRep();\n\t}",
"@DisplayName(\"Has edge\")\n @Test\n public void testHasEdge() {\n boolean directed1 = true;\n graph = new Graph(edges, directed1, 0, 5, GraphType.RANDOM);\n Assertions.assertTrue(graph.hasEdge(new Edge(0, 1)));\n }",
"public void addEdge (E vertex1, E vertex2, int edgeWeight) throws IllegalArgumentException\n {\n if(vertex1 == vertex2)\n return;\n \n int index1 = this.indexOf (vertex1);\n if (index1 < 0)\n throw new IllegalArgumentException (vertex1 + \" was not found!\");\n \n int index2 = this.indexOf (vertex2);\n if (index2 < 0)\n throw new IllegalArgumentException (vertex2 + \" was not found!\");\n\n\n if (this.hasEdge (vertex1, vertex2))\n {\n this.removeNode (index1, index2);\n this.removeNode (index2, index1);\n }\n \n Node node = new Node(index2, edgeWeight);\n this.addNode(node, index1);\n node = new Node(index1, edgeWeight);\n this.addNode(node, index2);\n }",
"public void addEdge(int v1, int v2, Object edgeInfo) {\n //your code here\n \tfor (Edge e : myAdjLists[v1]) {\n \t\tif (e.to() == v2) {\n \t\t\te.setObjectInfo(edgeInfo);\n \t\t\treturn;\n \t\t}\n \t}\n \tEdge toAdd = new Edge(v1, v2, edgeInfo);\n \tmyAdjLists[v1].add(toAdd);\t\n }",
"public void testContainsEdgeEdge( ) {\n init( );\n\n //TODO Implement containsEdge().\n }",
"public void addUndirectedEdge(int v1, int v2, Object edgeInfo) {\n //your code here\n \taddEdge(v1, v2, edgeInfo);\n \taddEdge(v2, v1, edgeInfo);\n \t\n }",
"public void testAddEdge() {\n System.out.println(\"addEdge\");\n\n Graph<Integer, Edge<Integer>> graph = newGraph();\n\n for (int i = 0; i < 25; i++) {\n graph.addVertex(new Integer(i));\n }\n\n for (int i = 0; i < 25; i++) {\n for (int j = 0; j < 25; j++) {\n Assert\n .assertTrue(graph.addEdge(new UnweightedEdge(new Integer(i), new Integer(j))));\n }\n }\n\n for (int i = 0; i < 25; i++) {\n for (int j = 0; j < 25; j++) {\n Assert\n .assertFalse(graph.addEdge(new UnweightedEdge(new Integer(i), new Integer(j))));\n }\n }\n }",
"@Test\r\n void add_remove_add() {\r\n graph.addEdge(\"A\", \"B\");\r\n graph.addEdge(\"A\", \"C\");\r\n graph.addEdge(\"B\",\"D\");\r\n graph.addEdge(\"C\",\"D\");\r\n graph.addEdge(\"D\", \"E\"); \r\n // Check that E is in graph with correct edges\r\n List<String> adjacent = graph.getAdjacentVerticesOf(\"D\");\r\n vertices = graph.getAllVertices(); \r\n if(!vertices.contains(\"E\") | !adjacent.contains(\"E\")) {\r\n fail();\r\n }\r\n //Remove E\r\n graph.removeVertex(\"E\");\r\n if(vertices.contains(\"E\") | adjacent.contains(\"E\")) {\r\n fail();\r\n }\r\n \r\n //Add E back into graph with different edge\r\n graph.addEdge(\"B\", \"E\");\r\n adjacent = graph.getAdjacentVerticesOf(\"B\");\r\n if(!vertices.contains(\"E\") | !adjacent.contains(\"E\")) {\r\n fail();\r\n }\r\n }",
"public boolean hasEdge(String id1, String id2)\n\t{\n\t\treturn nodes.containsKey(id1) && getNode(id1).hasEdge(id2);\n\t}",
"void addEdges(Collection<ExpLineageEdge> edges);",
"void addEdge(int s1,int c,int s2)\r\n\t{\r\n\t\tg[s1][c][s2]=true;\r\n\t}",
"public boolean addVertex(String label)\n\t{\n\t\tif(!hasVertex(label)) //if edge does not already exist add it\n\t\t{\n\t\t\tDSAGraphVertex v = new DSAGraphVertex(label, null);\n\t\t\tvertices.insertLast(v); //inserts into vertices list at end\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}",
"@Test\n public void testAddExistingEdge() throws Exception {\n\n final ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();\n\n Graph<Long, Long, Long> graph =\n Graph.fromDataSet(\n TestGraphUtils.getLongLongVertexData(env),\n TestGraphUtils.getLongLongEdgeData(env),\n env);\n graph = graph.addEdge(new Vertex<>(1L, 1L), new Vertex<>(2L, 2L), 12L);\n\n DataSet<Edge<Long, Long>> data = graph.getEdges();\n List<Edge<Long, Long>> result = data.collect();\n\n expectedResult =\n \"1,2,12\\n\"\n + \"1,2,12\\n\"\n + \"1,3,13\\n\"\n + \"2,3,23\\n\"\n + \"3,4,34\\n\"\n + \"3,5,35\\n\"\n + \"4,5,45\\n\"\n + \"5,1,51\\n\";\n\n compareResultAsTuples(result, expectedResult);\n }",
"public void edgeMake(int vertex1, int vertex2) {\n addVertex(vertex1); // both vertices added to the set\n addVertex(vertex2);\n adjacencyMap.get(vertex1).add(vertex2); // both vertices receive the edge\n adjacencyMap.get(vertex2).add(vertex1);\n }",
"public void addEdge(String v1, String v2) {\n if (v1.equals(v2))\n throw new IllegalArgumentException(\"Vertexes are same\");\n\n // get the indexes of v1 and v2\n int index1 = -1;\n int index2 = -1;\n for (int i = 0; i < vertexes.length; i++) {\n if (v1.equals(vertexes[i])) index1 = i;\n if (v2.equals(vertexes[i])) index2 = i;\n }\n\n if (index1 == -1 || index2 == -1)\n throw new IllegalArgumentException(\"Vertexes are not exist.\");\n\n // add to the linked lists\n heads[index1].add(index2);\n heads[index2].add(index1);\n }",
"private void addEdge(int node1, int node2, int cost, int bandwidth) throws IllegalArgumentException {\n // We can't add edges between non-existent nodes\n int nodeCount = mGraph.getNodeCount();\n if (node1 >= nodeCount || node2 >= nodeCount) {\n throw new IllegalArgumentException();\n }\n\n // Add forward edge\n int edgeCount = mGraph.getEdgeCount() / 2;\n\n Edge forward = mGraph.addEdge(String.valueOf(edgeCount + \"f\"), node1, node2, true);\n forward.addAttribute(\"ui.label\", String.valueOf(edgeCount));\n forward.addAttribute(\"edge.cluster\", String.valueOf(edgeCount));\n forward.addAttribute(\"cost\", cost);\n\n // Add backward edge\n Edge backward = mGraph.addEdge(String.valueOf(edgeCount + \"b\"), node2, node1, true);\n backward.addAttribute(\"edge.cluster\", String.valueOf(edgeCount));\n backward.addAttribute(\"cost\", cost);\n\n // Add edge to the SimpleEdge list\n mEdgeList.add(new SimpleEdge(node1, node2, cost, bandwidth));\n }",
"public void addEdge(Integer x1, Integer y1, Integer x2, Integer y2, boolean added){\n\t\tif(!added){\n\t\t\toutput += \"<line x1=\\\"\" + x1*scale + \"\\\" y1=\\\"\" + y1*scale + \"\\\" x2=\\\"\" \n\t\t\t\t\t\t+ x2*scale + \"\\\" y2=\\\"\" + y2*scale + \"\\\" style=\\\"stroke:black; stroke-width:1;\\\"/>\\n\";\n\t\t}else{\n\t\t\toutput += \"<line x1=\\\"\" + x1*scale + \"\\\" y1=\\\"\" + y1*scale + \"\\\" x2=\\\"\" \n\t\t\t\t\t\t+ x2*scale + \"\\\" y2=\\\"\" + y2*scale + \"\\\" style=\\\"stroke:#d7d7d7; stroke-width:1;\\\"/>\\n\";\n\t\t}\n\t}",
"public boolean addEdge(Vertex one,Vertex two,int weight)\n\t{\n\t\tif (one.equals(two)) { return false; }\n\t\t\n\t\t//check that edge is not in graph\n\t\tEdge e = new Edge(one,two,weight);\n\t\t//future location to increment trips along\n\t\t//the same path\n\t\tif (edges.containsKey(e.hashCode()))\n\t\t{\n\t\t\te.addTrip();//does not work\n\t\t\treturn false;\n\t\t}\n\t\t//check that edge is not incident to either vertex\n\t\telse if (one.containsNeighbor(e) || two.containsNeighbor(e))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tedges.put(e.hashCode(), e);\n\t\tone.addNeighbor(e);\n\t\ttwo.addNeighbor(e);\n\t\treturn true;\n\t}",
"public boolean addEdge(Edge e) {\n return g.addNode(e.getSrc())&&g.addNode(e.getDst())&&g.addEdge(e.getSrc(),e.getDst());\n }",
"public void addEdge(String n1, String n2) {\n if (!this.graph.containsKey(n1)) {\n addNode(n1);\n }\n if (!this.graph.containsKey(n2)) {\n addNode(n2);\n }\n Edgeq edge = new Edgeq(n1, n2);\n this.graph.get(n1).add(edge);\n\n edge = new Edgeq(n2, n1);\n this.graph.get(n2).add(edge);\n }",
"void addDirectedEdge(final Node first, final Node second)\n {\n if ( first == second )\n {\n return;\n }\n else if (first.connectedNodes.contains(second))\n return;\n else\n first.connectedNodes.add(second);\n }",
"public boolean removeEdge(String label1, String label2)\n\t{\n\t\tif(isAdjacent(label1, label2)) //if edge exists remove it\n\t\t{\n\t\t\tDSAGraphVertex vx1 = getVertex(label1), vx2 = getVertex(label2);\n\t\t\tvx1.removeEdge(vx2);\n\t\t\tvx2.removeEdge(vx1);\n\t\t\tedgeCount--;\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}",
"private void addEdge(Vertex v1, Vertex v2) {\n LinkedList<Vertex> v1AdjacentVertices = verticesAndTheirEdges.get(v1);\n if (!v1AdjacentVertices.contains(v2)) {\n v1AdjacentVertices.add(v2);\n }\n }",
"public boolean addEdge(NodeType nodeA, NodeType nodeB, WeightType weight) {\n\n\t\tif ( nodeA == null || nodeB == null )\n\t\t\treturn false;\n\n\t\tif ( !partitionMap.containsKey( nodeA ) ) { \n\t\t\tSystem.out.println(\"partA doesn't contain nodeA \" + nodeA);\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( !partitionMap.containsKey( nodeB ) ) {\n\t\t\tSystem.out.println(\"partB doesn't contain nodeB \" + nodeB);\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( partitionMap.get(nodeA).equals( partitionMap.get(nodeB) ) ){\n\t\t\tSystem.out.println(\"nodeA equals nodeB\");\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\treturn super.addEdge( nodeA, nodeB, weight );\n\t}",
"@DisplayName(\"Add edges\")\n @Test\n public void testAddEdges() {\n boolean directed1 = true;\n graph = new Graph(new Edge[0], directed1, 0, 5, GraphType.RANDOM);\n graph.addEdges(edges);\n List<Integer> l0 = new ArrayList<>();\n List<Integer> l1 = new ArrayList<>();\n List<Integer> l2 = new ArrayList<>();\n List<Integer> l4 = new ArrayList<>();\n l0.add(1);\n l1.add(2);\n l2.add(3);\n l4.add(0);\n\n Assertions.assertEquals(l0.get(0), graph.getNeighbours(0).get(0));\n Assertions.assertEquals(l1.get(0), graph.getNeighbours(1).get(0));\n Assertions.assertEquals(l2.get(0), graph.getNeighbours(2).get(0));\n Assertions.assertEquals(l4.get(0), graph.getNeighbours(4).get(0));\n }",
"@Test\n\tpublic void edgesTest() {\n\t\tList<Vertex> vertices = new ArrayList<>();\n\t\tvertices.add(C);\n\t\tvertices.add(D);\n\t\tedge_0.addVertices(vertices);\n\t\tList<Vertex> vertices1 = new ArrayList<>();\n\t\tvertices.add(A);\n\t\tvertices.add(B);\n\t\tedge_1.addVertices(vertices1);\n\t\tgraph.addEdge(edge_0);\n\t\tgraph.addEdge(edge_1);\n\t\tassertEquals(2, graph.edges().size());\n\t\tassertTrue(graph.edges().contains(edge_0));\n\t\tassertTrue(graph.edges().contains(edge_1));\n\t}",
"public Edge<V> addEdge(V source, V target);",
"void addEdge(SimpleVertex vertexOne, SimpleVertex vertexTwo, int weight) {\n\n\t\tSimpleEdge edge = new SimpleEdge(vertexOne, vertexTwo);\n\t\tedge.weight = weight;\n\t\t// edgeList.add(edge);\n\t\t// System.out.println(edge);\n\t\tvertexOne.neighborhood.add(edge);\n\n\t}",
"public void addEdge(int v1, int v2) {\n\t\tedges[v1][v2] = 1;\n\t\tedges[v2][v1] = 1;\n\t\tsize++;\n\t}",
"public boolean addEdge(Edge edge) {\r\n\t\treturn true;\r\n\t}",
"boolean addEdge(V v, V w);",
"public boolean addEdge(T beg, T end);",
"public void Add( TopoDS_Edge aFirst, TopoDS_Edge aSecond) {\n OCCwrapJavaJNI.ShapeFix_EdgeConnect_Add__SWIG_0(swigCPtr, this, TopoDS_Edge.getCPtr(aFirst), aFirst, TopoDS_Edge.getCPtr(aSecond), aSecond);\n }",
"@Test\r\n void create_edge_between_null_vertexes() {\r\n graph.addEdge(null, \"B\");\r\n graph.addEdge(\"A\", null);\r\n graph.addEdge(null, null);\r\n vertices = graph.getAllVertices();\r\n List<String> adjacentA = graph.getAdjacentVerticesOf(\"A\");\r\n List<String> adjacentB = graph.getAdjacentVerticesOf(\"B\");\r\n if(!vertices.isEmpty() | !adjacentA.isEmpty() | !adjacentB.isEmpty()) {\r\n fail();\r\n } \r\n }",
"boolean addEdge(V v, V w, double weight);",
"private static void helperAdd(DiGraph graph,Scanner reader){\n System.out.print(\"Enter the 'from' and 'to' vertices of the edge to add: \");\n\n int from = reader.nextInt();\n int to = reader.nextInt();\n\n if(graph.addEdge(from,to))\n System.out.println(\"Edge (\" + from + \", \" + to + \") was added\\n\");\n else {\n System.out.println(\"Edge has already been added to the graph\\n\");\n }\n }",
"@Test\r\n void test_insert_two_vertice_with_one_edge_remove_edge() {\r\n // Add two vertices with one edge\r\n graph.addEdge(\"A\", \"B\");\r\n vertices = graph.getAllVertices();\r\n // B should be an adjacent vertex of A\r\n if(!graph.getAdjacentVerticesOf(\"A\").contains(\"B\")){\r\n fail();\r\n }\r\n //Check that A and B are in the graph\r\n if(!vertices.contains(\"A\") |!vertices.contains(\"B\")) {\r\n fail();\r\n }\r\n //There's one edge in the graph\r\n if(graph.size() != 1) {\r\n fail();\r\n }\r\n //Remove edge from A to B\r\n graph.removeEdge(\"A\", \"B\");\r\n // Check that A and B are still in the graph\r\n if(!vertices.contains(\"A\") |!vertices.contains(\"B\")) {\r\n fail();\r\n }\r\n // B should not be an adjacent vertex of \r\n if(graph.getAdjacentVerticesOf(\"A\").contains(\"B\")){\r\n fail();\r\n }\r\n // There are no more edges in the graph\r\n if(graph.size() != 0) {\r\n fail();\r\n }\r\n }",
"void removeEdge(Vertex v1, Vertex v2) throws GraphException;",
"public abstract boolean getEdge(Point a, Point b);",
"private final void addEdge(int v1, int v2, float weight) {\n if (nEdges >= edgeWeights.length) {\n edgeWeights = Arrays.copyOf(edgeWeights, edgeWeights.length*2);\n }\n int edgeIndex = nEdges;\n\n // add edge to v1\n int v1Index;\n {\n v1Index = nOutgoingEdgess[v1];\n if (v1Index >= outgoingEdgess[v1].length) {\n int newLength = outgoingEdgess[v1].length*2;\n outgoingEdgess[v1] = Arrays.copyOf(outgoingEdgess[v1], newLength);\n outgoingEdgeIndexess[v1] = Arrays.copyOf(outgoingEdgeIndexess[v1], newLength);\n outgoingEdgeIsMarkeds[v1] = Arrays.copyOf(outgoingEdgeIsMarkeds[v1], newLength);\n outgoingEdgeOppositeIndexess[v1] = Arrays.copyOf(outgoingEdgeOppositeIndexess[v1], newLength);\n }\n outgoingEdgess[v1][v1Index] = v2;\n outgoingEdgeIndexess[v1][v1Index] = edgeIndex;\n nOutgoingEdgess[v1]++;\n }\n\n // add edge to v2\n int v2Index;\n {\n v2Index = nOutgoingEdgess[v2];\n if (v2Index >= outgoingEdgess[v2].length) {\n int newLength = outgoingEdgess[v2].length*2;\n outgoingEdgess[v2] = Arrays.copyOf(outgoingEdgess[v2], newLength);\n outgoingEdgeIndexess[v2] = Arrays.copyOf(outgoingEdgeIndexess[v2], newLength);\n outgoingEdgeIsMarkeds[v2] = Arrays.copyOf(outgoingEdgeIsMarkeds[v2], newLength);\n outgoingEdgeOppositeIndexess[v2] = Arrays.copyOf(outgoingEdgeOppositeIndexess[v2], newLength);\n }\n outgoingEdgess[v2][v2Index] = v1;\n outgoingEdgeIndexess[v2][v2Index] = edgeIndex;\n nOutgoingEdgess[v2]++;\n }\n\n outgoingEdgeOppositeIndexess[v1][v1Index] = v2Index;\n outgoingEdgeOppositeIndexess[v2][v2Index] = v1Index;\n \n edgeWeights[nEdges] = weight;\n ++nEdges;\n }",
"public void addEdge(StubEdge e) {\n }",
"public abstract boolean hasEdge(int from, int to);",
"public void addEdge(int v1, int v2) {\r\n\t\tadjList[v1].add(v2);\r\n\t}",
"public static void generateAndSaveExampleGraph() {\n EuclidDirectedGraph graph1 = new EuclidDirectedGraph();\n //vertexes added and created edge\n BoundsGraphVertex ver1 = new BoundsGraphVertex(10, 10, \"source\");\n BoundsGraphVertex ver2 = new BoundsGraphVertex(10, 30, \"secondNode\");\n BoundsGraphVertex ver3 = new BoundsGraphVertex(10, 40, \"thirdNode\");\n BoundsGraphVertex ver4 = new BoundsGraphVertex(10, 50, \"sink\");\n BoundsGraphVertex ver5 = new BoundsGraphVertex(10, 60, \"fiveNode - loop from second\");\n BoundsGraphVertex ver6 = new BoundsGraphVertex(10, 70, \"sixNode - loop from five\");\n BoundsGraphVertex ver7 = new BoundsGraphVertex(10, 80, \"sevenNode - loop from six to third\");\n\n graph1.addNode(ver1);\n graph1.addNode(ver2);\n graph1.addNode(ver3);\n graph1.addNode(ver4);\n graph1.addNode(ver5);\n graph1.addNode(ver6);\n graph1.addNode(ver7);\n //use .addEuclidEdge to compute edge's length automatically\n graph1.addEuclidEdge(ver1, ver2);\n graph1.addEuclidEdge(ver2, ver3);\n graph1.addEuclidEdge(ver3, ver4);\n graph1.addEuclidEdge(ver2, ver5);\n graph1.addEuclidEdge(ver5, ver6);\n graph1.addEuclidEdge(ver6, ver7);\n graph1.addEuclidEdge(ver7, ver3);\n //created graph #2\n EuclidDirectedGraph graph2 = new EuclidDirectedGraph();\n try {\n //save into file from graph #1\n XMLSerializer.write(graph1, \"input.xml\", false);\n //read from file into graph #2\n graph2 = (EuclidDirectedGraph) XMLSerializer.read(\"input.xml\");\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"@Test\r\n void test_insert_same_edge_twice() {\r\n // Add two vertices with one edge\r\n graph.addEdge(\"A\", \"B\");\r\n graph.addEdge(\"A\", \"B\");\r\n if (graph.size() != 1) {\r\n fail();\r\n }\r\n if (!graph.getAdjacentVerticesOf(\"A\").contains(\"B\")) {\r\n fail();\r\n }\r\n\r\n }",
"public Graph createGraph() {\n String fileName;\n// fileName =\"./428333.edges\";\n String line;\n Graph g = new Graph();\n// List<String> vertexNames = new ArrayList<>();\n// try\n// {\n// BufferedReader in=new BufferedReader(new FileReader(fileName));\n// line=in.readLine();\n// while (line!=null) {\n////\t\t\t\tSystem.out.println(line);\n// String src = line.split(\" \")[0];\n// String dst = line.split(\" \")[1];\n//// vertexNames.add(src);\n//// vertexNames.add(dst);\n//// System.out.println(src+\" \"+dst);\n// g.addEdge(src, dst, 1);\n// line=in.readLine();\n// }\n// in.close();\n// } catch (Exception e) {\n//\t\t\te.printStackTrace();\n// }\n\n fileName=\"./788813.edges\";\n// List<String> vertexNames = new ArrayList<>();\n try\n {\n BufferedReader in=new BufferedReader(new FileReader(fileName));\n line=in.readLine();\n while (line!=null) {\n//\t\t\t\tSystem.out.println(line);\n String src = line.split(\" \")[0];\n String dst = line.split(\" \")[1];\n g.addEdge(src, dst, 1);\n line=in.readLine();\n }\n in.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n// Graph g = new Graph(new String[]{\"v0\", \"v1\", \"v2\", \"v3\", \"v4\", \"v5\", \"v6\", \"v7\", \"v8\"});\n// // Add the required edges.\n// g.addEdge(\"v0\", \"v1\", 4); g.addEdge(\"v0\", \"v7\", 8);\n// g.addEdge(\"v1\", \"v2\", 8); g.addEdge(\"v1\", \"v7\", 11); g.addEdge(\"v2\", \"v1\", 8);\n// g.addEdge(\"v2\", \"v8\", 2); g.addEdge(\"v2\", \"v5\", 4); g.addEdge(\"v2\", \"v3\", 7);\n// g.addEdge(\"v3\", \"v2\", 7); g.addEdge(\"v3\", \"v5\", 14); g.addEdge(\"v3\", \"v4\", 9);\n// g.addEdge(\"v4\", \"v3\", 9); g.addEdge(\"v4\", \"v5\", 10);\n// g.addEdge(\"v5\", \"v4\", 10); g.addEdge(\"v5\", \"v3\", 9); g.addEdge(\"v5\", \"v2\", 4);\n// g.addEdge(\"v5\", \"v6\", 2);\n// g.addEdge(\"v6\", \"v7\", 1); g.addEdge(\"v6\", \"v8\", 6); g.addEdge(\"v6\", \"v5\", 2);\n// g.addEdge(\"v7\", \"v0\", 8); g.addEdge(\"v7\", \"v8\", 7); g.addEdge(\"v7\", \"v1\", 11);\n// g.addEdge(\"v7\", \"v6\", 1);\n// g.addEdge(\"v8\", \"v2\", 2); g.addEdge(\"v8\", \"v7\", 7); g.addEdge(\"v8\", \"v6\", 6);\n\n//\n return g;\n }",
"@Test\r\n void test_insert_two_vertice_with_one_edge_remove_non_existent_edge() {\r\n // Add three vertices with two edges\r\n graph.addEdge(\"A\", \"B\");\r\n graph.addEdge(\"B\", \"C\");\r\n vertices = graph.getAllVertices();\r\n // B should be an adjacent vertex of A\r\n if(!graph.getAdjacentVerticesOf(\"A\").contains(\"B\")){\r\n fail();\r\n }\r\n // C should be an adjacent vertex of B\r\n if(!graph.getAdjacentVerticesOf(\"B\").contains(\"C\")){\r\n fail();\r\n }\r\n //Check that A,B and C are in the graph\r\n if(!vertices.contains(\"A\") |!vertices.contains(\"B\")\r\n | !vertices.contains(\"C\")) {\r\n fail();\r\n }\r\n // There are two edges in the graph\r\n if(graph.size() != 2) {\r\n fail();\r\n }\r\n // Try are remove edge from A to C\r\n graph.removeEdge(\"A\", \"C\");\r\n graph.removeEdge(\"A\", \"D\");\r\n graph.removeEdge(\"E\", \"F\");\r\n graph.removeEdge(null, \"A\");\r\n graph.removeEdge(\"A\", null);\r\n //Graph should maintain its original shape\r\n if(!graph.getAdjacentVerticesOf(\"A\").contains(\"B\")){\r\n fail();\r\n }\r\n // C should be an adjacent vertex of B\r\n if(!graph.getAdjacentVerticesOf(\"B\").contains(\"C\")){\r\n fail();\r\n }\r\n //Check that A,B and C are in the graph\r\n if(!vertices.contains(\"A\") |!vertices.contains(\"B\")\r\n | !vertices.contains(\"C\")) {\r\n fail();\r\n }\r\n // There are two edges in the graph\r\n if(graph.size() != 2) {\r\n fail();\r\n }\r\n }",
"public void addEdge(final Instruction beginInstruction, final Instruction endInstruction) {\n if (beginInstruction == null || endInstruction == null) {\n return;\n }\n if (!beginInstruction.allSucc().contains(endInstruction)) {\n beginInstruction.allSucc().add(endInstruction);\n }\n\n if (!endInstruction.allPred().contains(beginInstruction)) {\n endInstruction.allPred().add(beginInstruction);\n }\n }",
"public void addEdge(Edge edge){\n \n synchronized(vertexes){\n Long start = edge.getStart();\n Vertex sVertex = vertexes.get(start);\n if(sVertex != null){\n sVertex.addEdge(edge, true);\n }\n// if undirected graph then adds edge to the finish vertex too \n if(!edge.isDirected()){\n Long finish = edge.getFinish();\n Vertex fVertex = vertexes.get(finish);\n if(fVertex != null){\n fVertex.addEdge(edge, false);\n }\n }\n }\n \n }",
"public abstract void addEdge(Point p, Direction dir);",
"void addEdge(int one, int two, boolean redundant) {\n\t\tif (redundant == true) {\n\t\t\tadjacencyList[one].add(two);\n\t\t\tadjacencyList[two].add(one);\n\t\t}\n\t\telse if (one < two) {\n\t\t\tadjacencyList[one].add(two);\n\t\t}\n\t\telse {\n\t\t\tadjacencyList[two].add(one);\n\t\t}\n\t}",
"public void createEdge(Integer idVertex1, Integer idVertex2) throws Exception {\r\n\t\tmatrix.createEdge(idVertex1, idVertex2);\r\n\t}",
"public void addEdge( EdgeIntf edge ) throws Exception {\r\n DirectedEdge dEdge = ( DirectedEdge ) edge;\r\n Vertex fromVertex = dEdge.getSource();\r\n Vertex toVertex = dEdge.getSink();\r\n\r\n if( !isPath( toVertex, fromVertex ))\r\n super.addEdge( dEdge );\r\n else\r\n throw new CycleException();\r\n }",
"public void addEdge(Entity entityFirst, Entity entitySecond) {\n\t\tIterator<Entity> iteratorObj1 = Processing.nodeSet.iterator();\t//Iterating list of questions\n\t\twhile (iteratorObj1.hasNext()) {\n\t\t\tif(iteratorObj1.next().getEmail().equals(entitySecond.getEmail())){\n\t\t\t\tif(Processing.friendMap.containsKey(entityFirst.getEmail())) {\n\t\t\t\t\tif(!Processing.friendMap.get(entityFirst.getEmail()).contains(entitySecond.getEmail())) {\n\t\t\t\t\t\tProcessing.friendMap.get(entityFirst.getEmail()).add(entitySecond.getEmail());\n\t\t\t\t\t\tSystem.out.println(entitySecond.getEmail()+\" is now friend of you\");\n\t\t\t\t\t}else if(Processing.friendMap.get(entityFirst.getEmail()).contains(entitySecond.getEmail())){\n\t\t\t\t\t\tSystem.out.println(entitySecond.getEmail()+\" is already friend of you\");\n\t\t\t\t\t}else {\n\t\t\t\t\t\tSystem.out.println(entitySecond.getEmail()+\" does not exist\");\n\t\t\t\t\t}\n\t\t\t\t} else{\n\t\t\t\t\tIterator<Entity> iteratorObj2 = Processing.nodeSet.iterator();\t//Iterating list of questions\n\t\t\t\t\twhile (iteratorObj2.hasNext()) {\n\t\t\t\t\t\tif(iteratorObj2.next().getEmail().equals(entityFirst.getEmail())){\n\t\t\t\t\t\t\tSet<String> set=new HashSet<String>();\n\t\t\t\t\t\t\tset.add(entitySecond.getEmail());\n\t\t\t\t\t\t\tProcessing.friendMap.put(entityFirst.getEmail(),set);\n\t\t\t\t\t\t\tSystem.out.println(entitySecond.getEmail()+\" is now friend of you\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"@Override\n public void appendEdge(Integer first, Integer second) {\n if (col.containsKey(first) && col.containsKey(second)) {\n col.get(first).add(second);\n col.get(second).add(first); \n }\n }",
"void addEdge(int a, int b) {\n Edge e = new Edge(V[a], V[b]);\n V[a].Adj.add(e);\n V[b].Adj.add(e);\n }",
"public boolean addVertex(String label, Object value)\n\t{\n\t\tif(!hasVertex(label)) //if edge does not already exist add it\n\t\t{\n\t\t\tDSAGraphVertex v = new DSAGraphVertex(label, value);\n\t\t\tvertices.insertLast(v); //inserts into vertices list at end\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}",
"@Test\r\n public void testEdges() {\r\n System.out.println(\"edges\");\r\n MyDigraph instance = new MyDigraph();\r\n\r\n Object v1Element = 1;\r\n Object v2Element = 2;\r\n\r\n Vertex v1 = instance.insertVertex(v1Element);\r\n Vertex v2 = instance.insertVertex(v2Element);\r\n\r\n Object edgeElement = \"A\";\r\n Edge e = instance.insertEdge(v1Element, v2Element, edgeElement);\r\n\r\n Collection colection = instance.edges();\r\n boolean result = colection.contains(e);\r\n boolean expectedResult = true;\r\n assertEquals(expectedResult, result);\r\n\r\n instance.removeEdge(e);\r\n result = colection.contains(e);\r\n expectedResult = false;\r\n assertEquals(expectedResult, result);\r\n }",
"public void addEdge(edge_type edge) {\n //first make sure the from and to nodes exist within the graph\n assert (edge.getFrom() < nextNodeIndex) && (edge.getTo() < nextNodeIndex) :\n \"<SparseGraph::AddEdge>: invalid node index\";\n\n //make sure both nodes are active before adding the edge\n if ((nodeVector.get(edge.getTo()).getIndex() != invalid_node_index)\n && (nodeVector.get(edge.getFrom()).getIndex() != invalid_node_index)) {\n //add the edge, first making sure it is unique\n if (isEdgeNew(edge.getFrom(), edge.getTo())) {\n edgeListVector.get(edge.getFrom()).add(edge);\n }\n\n //if the graph is undirected we must add another connection in the opposite\n //direction\n if (!isDirectedGraph) {\n //check to make sure the edge is unique before adding\n if (isEdgeNew(edge.getTo(), edge.getFrom())) {\n GraphEdge reversedEdge = new GraphEdge(edge.getTo(),edge.getFrom(),edge.getCost());\n edgeListVector.get(edge.getTo()).add(reversedEdge);\n }\n }\n }\n }",
"@Override\r\n public void addEdge(Vertex v1, Vertex v2) {\r\n adjacencyList.get(v1).add(v2); //put v2 into the LinkedList of key v1.\r\n adjacencyList.get(v2).add(v1); //put v1 into the LinkedList of key v2.\r\n }",
"void addEdge(Edge e) {\n edges.add(e);\n addVerticle(e.v1);\n addVerticle(e.v2);\n }"
] | [
"0.7175351",
"0.68558735",
"0.6708892",
"0.6675151",
"0.6656216",
"0.66299576",
"0.65512234",
"0.65329933",
"0.65240735",
"0.6478271",
"0.645009",
"0.64494824",
"0.6410623",
"0.6409236",
"0.6405603",
"0.63821304",
"0.63718677",
"0.6363411",
"0.63607293",
"0.63422793",
"0.63370633",
"0.63237333",
"0.6312706",
"0.62863964",
"0.6279822",
"0.62669337",
"0.62618613",
"0.62429667",
"0.62400585",
"0.62313586",
"0.62253463",
"0.62217873",
"0.6207794",
"0.62020785",
"0.6193755",
"0.61847955",
"0.61847955",
"0.617992",
"0.6163055",
"0.6156749",
"0.6151765",
"0.6148438",
"0.6140854",
"0.6131287",
"0.61130995",
"0.61018276",
"0.60874265",
"0.60754603",
"0.6060132",
"0.60529774",
"0.6052641",
"0.60415614",
"0.6028563",
"0.6021832",
"0.60184026",
"0.60122395",
"0.6011363",
"0.60100424",
"0.5994886",
"0.5993794",
"0.5993639",
"0.5976137",
"0.5974819",
"0.5963785",
"0.59627897",
"0.5959557",
"0.59367245",
"0.593467",
"0.59266365",
"0.5923004",
"0.5922836",
"0.59215903",
"0.59184957",
"0.5915001",
"0.5912952",
"0.5912262",
"0.5898457",
"0.5896437",
"0.5892047",
"0.5890294",
"0.5889263",
"0.58801866",
"0.5871727",
"0.5868569",
"0.586843",
"0.58654624",
"0.5850491",
"0.5829888",
"0.58276814",
"0.58135945",
"0.5811687",
"0.5808578",
"0.5798104",
"0.57962763",
"0.57955563",
"0.57919836",
"0.5789036",
"0.57512337",
"0.5749239",
"0.5733348"
] | 0.7341294 | 0 |
IMPORT: label (String) EXPORT: none ASSERTION: checks if a vetex exists by label then deletes it | public boolean removeVertex(String label)
{
if(hasVertex(label)) //if vertex in in list
{
vertices.removeAt(getVertex(label));
//System.out.println("Deleted: " + label); //debug
return true;
}
else
{
return false;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void remove(String label) throws IOException;",
"net.zyuiop.ovhapi.api.objects.license.Task deleteServiceNameOptionLabel(java.lang.String serviceName, java.lang.String label) throws java.io.IOException;",
"void deleteLabel(@Nonnull final Label label, @Nonnull final Telegraf telegraf);",
"void removeLabel(Object oldLabel);",
"void removeLabel(Object oldLabel);",
"public void deleteClass(String label);",
"@Override\n\t\tpublic void removeLabel(Label label) {\n\n\t\t}",
"String removeLabel(String label);",
"public void \n\t\tremove_model\n\t\t( VirtualModelFileInput model ) \n\t\t{\n\t\t\tString full_path\n\t\t\t\t= model.getAbsolutePath();\n\t\t\tSystem.out.println(full_path);\n\t\t\tif( this.snapshot_models.containsKey( full_path )){\n\t\t\t\tSystem.out.println(\"Contained.\");\n\t\t\t\tSet<File> models\n\t\t\t\t\t= this.snapshot_models.get( full_path );\n\t\t\t\tmodels.remove(model);\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"That is not contained.\");\n\t\t\t}\n\t\t}",
"void deleteLabel(@Nonnull final String labelID, @Nonnull final String telegrafID);",
"int deleteByExample(UTbInvCategoryExample example);",
"boolean exists(String label) throws IOException;",
"public void removeConceptLabel(ConceptLabel lbl) {\n\t\tSystem.out.println(\"removing \"+lbl+\" ..\");\n\t\t\n\t\tlbl.setDeleted(true);\n\t\t// tokens.remove(lbl);\n\t\t// System.out.println(\"- \"+tokens);\n\t}",
"void unsetLabel();",
"@Override\n public void deleteEntity(String guid, Object version) {\n GraphTraversalSource g = graphFactory.getGraphTraversalSource();\n Iterator<Vertex> vertex = g.V().has(PROPERTY_KEY_ENTITY_GUID, guid);\n\n //TODO add check when we will have classifications to delete classifications first\n if (!vertex.hasNext()) {\n rollbackTransaction(g);\n log.debug(VERTEX_WITH_GUID_IS_NOT_PRESENT, guid);\n return;\n }\n\n g.V().has(PROPERTY_KEY_ENTITY_GUID, guid).drop().iterate();\n commitTransaction(g);\n log.debug(VERTEX_WITH_GUID_DELETED, guid);\n }",
"@Test\n public void testWithUnknownLabel() throws Exception {\n LogicalGraph socialGraph = getSocialNetworkLoader().getLogicalGraph();\n LogicalGraph result = socialGraph\n .callForGraph(new VertexDeduplication<>(\"NotInTheGraph\", Arrays.asList(\"a\", \"b\")));\n collectAndAssertTrue(socialGraph.equalsByData(result));\n }",
"public boolean deletePalvelupisteet();",
"public void removeVertex(String vertLabel) {\n\n // Implement me!\n if (indexOf(vertLabel, vertices) <0) {\n return;\n }\n vertices.remove(vertLabel);\n Iterator<String> iterator = edges.keySet().iterator();\n while (iterator.hasNext()) {\n String k = iterator.next();\n if (k.contains(vertLabel)) {\n iterator.remove();\n edges.remove(k);\n }\n }\n }",
"int deleteByExample(RepStuLearningExample example);",
"int deleteByExample(LtsprojectpoExample example);",
"@Override\n\tpublic boolean deleteVeiculo(int indice) {\n\t\treturn false;\n\t}",
"int deleteByExample(ProcurementSourceExample example);",
"@Override\n\tpublic boolean delete(Etape obj) {\n\t\treturn false;\n\t}",
"int deleteByExample(XdSpxxExample example);",
"public boolean changeVxLabel(String oldLabel, String newLabel)\n\t{\n\t\tboolean sucess = false;\n\t\ttry {\n\t\t\tDSAGraphVertex vx = getVertex(oldLabel);\n\t\t\tif(!hasVertex(newLabel)) //replace only if new label isn't already taken\n\t\t\t{\n\t\t\t\tvx.label = newLabel;\n\t\t\t\tsucess = true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthrow new IllegalArgumentException(\"|\" + newLabel + \"| already exists\");\n\t\t\t}\n\n\t\t} catch (NoSuchElementException e) {\n\t\t\tthrow new IllegalArgumentException(e.getMessage()); //vx doesn't exist\n\t\t}\n\t\treturn sucess;\n\t}",
"int deleteByExample(GrpTagExample example);",
"int deleteByExample(AvwFileprocessExample example);",
"int deleteByExample(TagDataExample example);",
"int deleteByExample(TbExpressTraceExample example);",
"public void markVlanTag1Delete() throws JNCException {\n markLeafDelete(\"vlanTag1\");\n }",
"void deleteExam(Module module, Exam target);",
"int deleteByExample(ProcdefExample example);",
"@Override\n\tpublic boolean delete(Langues obj) {\n\t\treturn false;\n\t}",
"int deleteByExample(ResumeKpiPOExample example);",
"@Override\n public boolean delete(Revue objet) {\n return false;\n }",
"int deleteByExample(CfgPrintTemplateAttrExample example);",
"public void removeFromLab(String lid) throws SQLException {\r\n\t\t\tthis.stmt=this.conn.createStatement();\r\n\t\t\t\r\n\t\t\tString deleteQuery=\"delete from \"+Subject.LAB_INFO_TABLE_NAME+\" where \"+Subject.LAB_ID+\"='\"+lid+\"'\";\r\n\t\t\tint i=stmt.executeUpdate(deleteQuery);\r\n\t\t\t/*if(i>0)\r\n\t\t\t\tSystem.out.println(\"Removed-> \"+lid);\r\n\t\t\telse\r\n\t\t\t\tSystem.out.println(\"NotAvailabel-> \"+lid);*/\r\n\t\t\t\r\n\t\t\tstmt.close();\r\n\t\t}",
"public boolean findInEdge(String label){\n\t\tfor(Entry<String, LinkedList<Edge>> s: vertices.entrySet()){\n\t\t\tfor(int i=0; i < vertices.get(s.getKey()).size();i++){\n\t\t\t\tif(vertices.get(s.getKey()).get(i).getDLabel().equals(label)){\n\t\t\t\t\tdelEdge(s.getKey(),label);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}",
"public boolean DelVeh() {\n\t\ttry\n\t\t{\n\t\t\n\t\t\tString filename=\"src/FilesTXT/vehicule.txt\";\n\t\t\tFileInputStream is = new FileInputStream(filename);\n\t\t InputStreamReader isr = new InputStreamReader(is);\n\t\t BufferedReader buffer = new BufferedReader(isr);\n\t\t \n\t\t String line = buffer.readLine();\n\t \tString[] split;\n\t \tString Contenu=\"\";\n\n\t\t while(line != null){\n\t\t \tsplit = line.split(\" \");\n\t\t\t if(this.getId_vehi()!=Integer.parseInt(split[0])) {\n\t\t\t \tContenu+=line+\"\\n\";\n\t\t\t }\n\t\t \tline = buffer.readLine();\n\t\t }\n\t\t \n\t\t buffer.close();\n\t\t \n\t\t filename=\"src/FilesTXT/vehicule.txt\";\n\t\t\t FileWriter fw = new FileWriter(filename);\n\t\t\t fw.write(Contenu);\n\t\t\t fw.close();\n\t\t \n\t\t return true;\n\t\t}\n\t\tcatch(IOException ioe)\n\t\t{\n\t\t System.err.println(\"IOException: \"+ ioe.getMessage());\n\t\t}\n\t\treturn false;\n\t}",
"public void deleteLUC() {\r\n/* 135 */ this._has_LUC = false;\r\n/* */ }",
"@Test\n public void deleteVfCheckedoutTestApi() throws Exception {\n ResourceReqDetails vfMetaData = createVFviaAPI();\n\n //Go to Catalog and find the created VF\n CatalogUIUtilitis.clickTopMenuButton(TopMenuButtonsEnum.CATALOG);\n GeneralUIUtils.findComponentAndClick(vfMetaData.getName());\n\n GeneralPageElements.clickTrashButtonAndConfirm();\n\n vfMetaData.setVersion(\"0.1\");\n VfVerificator.verifyVfDeleted(vfMetaData, getUser());\n }",
"@Test\n @Ignore\n public void testDelete_Identifier() throws Exception {\n System.out.println(\"delete\");\n Index entity = TestUtils.getTestIndex();\n Identifier identifier = entity.getId();\n instance.create(entity);\n assertTrue(instance.exists(identifier));\n instance.delete(identifier);\n assertFalse(instance.exists(identifier));\n }",
"int deleteByExample(InternalTradeEpa022016Example example);",
"public int deleteFile(String datastore, String filename) throws HyperVException;",
"int deleteByExample(WfCfgModuleCatalogExample example);",
"int deleteByExample(TVideoExample example);",
"@FXML void Removebtnpushed1(ActionEvent event8) throws FileNotFoundException, IOException {\n\t try {\n\t Pane annunci[] = { Annuncio1, Annuncio2, Annuncio3};\n\t offerService.deleteOffer(TitleLabel.getText().toString(), eoEmail.getText().toString());\n\t annunci[0].setVisible(false);\n\t } catch (Exception e) {\n\t e.printStackTrace(); }\n\t}",
"@Test\n\tpublic void testDeleteLabel() {\n\n\t\tList<Label> label1 = null;\n\t\tString labelId = \"5dba69b03f43761e31622cbe\";\n\t\tString emailId = \"pratikshatamadalge21@gmail.com\";\n\t\twhen(labelRepository.findByEmailId(emailId)).thenReturn(label1);\n\t\tlabelRepository.deleteById(labelId);\n\t\tassertEquals(label.getEmailId(), emailId);\n\n\t}",
"@Override\r\n\tpublic void eliminar(IndicadorActividadEscala iae) {\n\r\n\t}",
"public void removeModelWithThisSound(String sound) {\n ArrayList<String> modelsToDelete = new ArrayList<>();\n\n for (SVMmodel mod : svmModels.values()) {\n boolean delete = mod.containsSound(sound);\n\n if (delete) {\n modelsToDelete.add(mod.getName());\n boolean a = svmModels.remove(mod.getName(), mod);\n\n String filePath = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS).getPath() + \"/A-Cube/Models/\" + mod.getName();\n File fileToDelete = new File(filePath);\n if (fileToDelete.exists()) {\n fileToDelete.delete();\n }\n\n Log.d(TAG, \"SVMmodel removed: \"+mod.getName()+\" \"+a);\n\n for (Configuration conf : configurations) {\n if (conf.hasModel() && conf.getModel().equals(mod)) {\n conf.setModel(null);\n }\n }\n }\n }\n }",
"public abstract boolean exists() throws VlException;",
"public void removeCaseFromLabel(CaseUUID aCaseUUID, LabelUUID aCurrentlyDisplayedLabel);",
"@FXML\n private void btnSlett() {\n int valgtIndex = tblData.getSelectionModel().getSelectedIndex();\n if (valgtIndex >=0) {\n System.out.println(tblData.getSelectionModel().getSelectedIndex());\n dRegister.removeInded(valgtIndex);\n } else {\n dialogs.showNoSelectDialog(\"Vennligst velg en komponent i tabellen\");\n }\n }",
"private void deleteModelData(boolean verbose) {\n File initialPath = getDir(MODEL_PATH, MODE_PRIVATE);\n File decompressedPath = new File(initialPath, modelName);\n\n if( decompressedPath.exists() ) {\n if( verbose )\n runOnUiThread(() -> Toast.makeText(ImageClassificationActivity.this,\n \"Deleting \"+modelName,Toast.LENGTH_SHORT).show());\n\n deleteDir(decompressedPath);\n } else {\n if( verbose )\n runOnUiThread(() -> Toast.makeText(ImageClassificationActivity.this,\n \"Nothing to delete\",Toast.LENGTH_SHORT).show());\n }\n }",
"abstract public boolean exists() throws VlException;",
"@Test\n\tpublic void testDeleteSymbolFromCatalog() throws Exception {\n\n\t\t// Delete the selected symbol\n\t\tString selectedSymbol = mathEditSymbolsDlgSymbol.getText();\n\t\tmathEditSymbolsDlgDelete.click();\n\t\tmathEditSymbolsDlg.ok();\n\t\t// Verify if the selected symbol is deleted successfully\n\t\tmathSymbolsDlgEditButton.click();\n\t\tboolean isDeleted = true;\n\t\tfor (int i = 0; i < mathEditSymbolsDlgSymbol.getItemCount(); i++) {\n\t\t\tif (selectedSymbol.equals(mathEditSymbolsDlgSymbol.getItemText(i))) {\n\t\t\t\tisDeleted = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tassertTrue(\"Symbol is not deleted successfully\", isDeleted);\n\t}",
"int deleteByExample(ReleaseSystemExample example);",
"boolean deleteType(String indexName, String typeName);",
"int deleteByExample(StorageExample example);",
"int deleteByExample(GoodexistsingleExample example);",
"int deleteByExample(CfgSearchRecommendExample example);",
"int deleteByExample(CmsVoteTitleExample example);",
"public deleteVertice_result(deleteVertice_result other) {\n __isset_bitfield = other.__isset_bitfield;\n this.success = other.success;\n if (other.isSetKnf()) {\n this.knf = new KeyNotFound(other.knf);\n }\n if (other.isSetRiu()) {\n this.riu = new ResourceInUse(other.riu);\n }\n }",
"void removeVersion(Workspace workspace, String absPath, String label)\n throws RepositoryException;",
"int deleteByExample(CptDataStoreExample example);",
"public void delete(String namespace, String id, long version) throws StageException;",
"int deleteByExample(OnlineExample example);",
"int deleteByExample(IymDefAssignmentExample example);",
"@Override\r\n\tpublic void DeletePackage(PackageJour pj) {\n\t\tem.remove(em.contains(pj) ? pj : em.merge(pj));\r\n\t}",
"public void markVersionDelete() throws JNCException {\n markLeafDelete(\"version\");\n }",
"protected String getIgnoreIfExistsLabel()\n {\n return this.bundle.getString(\"CHK_IGNORE_HEADER_IF_EXISTS\" /* NOI18N */);\n }",
"public void deleteInst() {\n\t\tlogger.debug(\"DeviceNameTableTester has been stopped\");\n\t}",
"@Override\r\n\tpublic boolean deleteActor(String v)\r\n\t\r\n\t{\r\n\t\tActor actor = new Actor(v);\r\n\r\n\t\tif(graph.containsVertex(actor))\r\n\t\t{\r\n\t\t\tgraph.removeVertex(actor);\r\n\t\t\tactorNames.remove(v);\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"int deleteByExample(SpecValuePOExample example);",
"int deleteByExample(DictDoseUnitExample example);",
"int deleteByExample(ExamineApproveResultExample example);",
"public boolean deleteFile(String inKey) throws NuxeoException;",
"@Override\n public void onOkclick() {\n FragmentManager fm = getSupportFragmentManager();\n FragmentTransaction ft = fm.beginTransaction();\n Fragment reg = fm.findFragmentByTag(TAG_FRG_REG_12);\n ft.remove(reg);\n ft.commit();\n\n }",
"int deleteByExample(VisituserExample example);",
"@Test\n @Ignore\n public void testDelete_Index() throws Exception {\n System.out.println(\"delete\");\n Index entity = TestUtils.getTestIndex();\n Identifier identifier = entity.getId();\n instance.create(entity);\n assertTrue(instance.exists(identifier));\n instance.delete(entity);\n assertFalse(instance.exists(identifier));\n }",
"private void saveAsConfirmButton(){\n //Check if the input is valid (lcase and no spaces)\n String input = SaveAsLabNameTextField.getText();\n \n if(input.contains(\" \") || !input.equals(input.toLowerCase())){ \n SaveAsErrorLabel.setText(\"Lab name must be lowercase and contain no spaces!\");\n SaveAsErrorLabel.setVisible(true);\n }\n //Check if lab already exists\n else if(Arrays.asList(labsPath.list()).contains(input)){ \n SaveAsErrorLabel.setText(\"Lab already exists!\");\n SaveAsErrorLabel.setVisible(true);\n }\n else{\n SaveAsErrorLabel.setVisible(false);\n saveAs(input);\n SaveAsDialog.setVisible(false);\n } \n }",
"int deleteByExample(Lbt72TesuryoSumDPkeyExample example);",
"int deleteByExample(BpmInstanciaHistoricaExample example);",
"public void deleteExempleDirect(ExempleDirect exempleDirect) throws DaoException;",
"int deleteByExample(RegisterExample example);",
"private void delete() {\n\n\t}",
"int deleteByExample(AbumExample example);",
"public void remove()\n { \n throw new OARowValException(OARowValException.TYP_ENTITY_OBJECT,\n getEntityDef().getFullName(),\n getPrimaryKey(),\n \"AK\", // Message product short name\n \"FWK_TBX_T_SUP_NO_DELETE\"); // Message name\n \n }",
"public void deleteData(String filename, SaveType type);",
"public boolean remover(Veterinario obj) throws ClassNotFoundException, SQLException{\n VeterinarioDAO dao = new VeterinarioDAO();\n return dao.remover(obj);\n }",
"int deleteByExample(BasicInfoPrecursorProcessTypeExample example);",
"int deleteByExample(TLinkmanExample example);",
"int deleteByExample(AdExample example);",
"int logicalDeleteByExample(@Param(\"example\") ZhuangbeiInfoExample example);",
"int deleteByExample(IntegralBookExample example);",
"public String deleteProductionBlock(ProductionBlock pb);",
"int deleteByExample(TbSnapshotExample example);",
"int deleteByExample(DiseaseExample example);",
"public void deleteExample(String classKey, int index, String type);",
"int deleteByExample(TdxNoticeCertificateExample example);"
] | [
"0.59890836",
"0.56515914",
"0.5624385",
"0.55802774",
"0.55802774",
"0.55668914",
"0.5447168",
"0.53951657",
"0.52641785",
"0.52411664",
"0.5228486",
"0.52168393",
"0.51510584",
"0.51434916",
"0.5125461",
"0.5112416",
"0.5109065",
"0.5107094",
"0.50848436",
"0.50689435",
"0.5059137",
"0.50482166",
"0.503561",
"0.50103426",
"0.500614",
"0.500515",
"0.4989751",
"0.49887687",
"0.49802798",
"0.49703434",
"0.49687028",
"0.49428004",
"0.4938236",
"0.49329093",
"0.4930183",
"0.4926341",
"0.49195284",
"0.49146444",
"0.49077767",
"0.4901258",
"0.49007937",
"0.48890918",
"0.48826888",
"0.48813903",
"0.4881266",
"0.4861697",
"0.4859207",
"0.48539892",
"0.48502785",
"0.4846972",
"0.4840234",
"0.48368087",
"0.48269358",
"0.4816685",
"0.48141477",
"0.48118922",
"0.4798294",
"0.47982627",
"0.4798237",
"0.47918355",
"0.47899526",
"0.47726387",
"0.47721353",
"0.47714823",
"0.47685128",
"0.47662356",
"0.47655818",
"0.47534254",
"0.47420627",
"0.4732253",
"0.47275436",
"0.47262567",
"0.47253218",
"0.47092956",
"0.47077087",
"0.4704819",
"0.46998888",
"0.46983474",
"0.4695817",
"0.46932414",
"0.46876028",
"0.4687318",
"0.46858883",
"0.46851835",
"0.46753642",
"0.46751696",
"0.46743438",
"0.46695003",
"0.46693364",
"0.46678036",
"0.4663005",
"0.46586683",
"0.46562287",
"0.46552846",
"0.46521053",
"0.4647703",
"0.46454045",
"0.46340868",
"0.46326858",
"0.46287972"
] | 0.5721844 | 1 |
IMPORT: label1 (String), label2 (String) EXPORT: boolean (true if edge was removed, false if not) ASSERTION: Checks if an edge exists and then removes edge between 2 parameter nodes | public boolean removeEdge(String label1, String label2)
{
if(isAdjacent(label1, label2)) //if edge exists remove it
{
DSAGraphVertex vx1 = getVertex(label1), vx2 = getVertex(label2);
vx1.removeEdge(vx2);
vx2.removeEdge(vx1);
edgeCount--;
return true;
}
else
{
return false;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void removeEdge(Vertex v1, Vertex v2) throws GraphException;",
"@Test\n\tpublic void removeEdgeTest() {\n\t\tList<Vertex> vertices = new ArrayList<>();\n\t\tvertices.add(C);\n\t\tvertices.add(D);\n\t\tedge_0.addVertices(vertices);\n\t\tList<Vertex> vertices1 = new ArrayList<>();\n\t\tvertices.add(A);\n\t\tvertices.add(B);\n\t\tedge_1.addVertices(vertices1);\n\t\tgraph.addEdge(edge_0);\n\t\tgraph.addEdge(edge_1);\n\t\tassertTrue(graph.removeEdge(edge_0));\n\t\tassertFalse(graph.edges().contains(edge_0));\n\t\tassertTrue(graph.edges().size() == 1);\n\t}",
"public void removeEdge(int node1, int node2)\n{\n\tif(getNodes().containsKey(node1) && getNodes().containsKey(node2))\n\t{\n\t\tNode n1 = (Node) getNodes().get(node1);\n\t\tNode n2 = (Node) getNodes().get(node2);\n\n\t\tif(n1.getEdgesOf().containsKey(node2))\n\t\t{\n\t\t\tedge_size--;\n\t\t\tmc++;\n\t\t\tn1.getEdgesOf().remove(node2);\n\n\t\t}\n\t\tif(n2.getEdgesOf().containsKey(node1))\n\t\t{\n\t\t\tedge_size--;\n\t\t\tmc++;\n\t\t\tn2.getEdgesOf().remove(node1);\n\n\t\t}\n\t\t\n\t\telse {\n\t\t\t\n\t\t\t//System.out.println(\"Edge doesnt exist\");\n\t\t}\n\t}\n\telse {\n\t\treturn;\n\t\t//System.out.println(\"src or dest doesnt exist\");\n\t}\n}",
"void removeEdge(int x, int y);",
"@Test\r\n void test_insert_two_vertice_with_one_edge_remove_non_existent_edge() {\r\n // Add three vertices with two edges\r\n graph.addEdge(\"A\", \"B\");\r\n graph.addEdge(\"B\", \"C\");\r\n vertices = graph.getAllVertices();\r\n // B should be an adjacent vertex of A\r\n if(!graph.getAdjacentVerticesOf(\"A\").contains(\"B\")){\r\n fail();\r\n }\r\n // C should be an adjacent vertex of B\r\n if(!graph.getAdjacentVerticesOf(\"B\").contains(\"C\")){\r\n fail();\r\n }\r\n //Check that A,B and C are in the graph\r\n if(!vertices.contains(\"A\") |!vertices.contains(\"B\")\r\n | !vertices.contains(\"C\")) {\r\n fail();\r\n }\r\n // There are two edges in the graph\r\n if(graph.size() != 2) {\r\n fail();\r\n }\r\n // Try are remove edge from A to C\r\n graph.removeEdge(\"A\", \"C\");\r\n graph.removeEdge(\"A\", \"D\");\r\n graph.removeEdge(\"E\", \"F\");\r\n graph.removeEdge(null, \"A\");\r\n graph.removeEdge(\"A\", null);\r\n //Graph should maintain its original shape\r\n if(!graph.getAdjacentVerticesOf(\"A\").contains(\"B\")){\r\n fail();\r\n }\r\n // C should be an adjacent vertex of B\r\n if(!graph.getAdjacentVerticesOf(\"B\").contains(\"C\")){\r\n fail();\r\n }\r\n //Check that A,B and C are in the graph\r\n if(!vertices.contains(\"A\") |!vertices.contains(\"B\")\r\n | !vertices.contains(\"C\")) {\r\n fail();\r\n }\r\n // There are two edges in the graph\r\n if(graph.size() != 2) {\r\n fail();\r\n }\r\n }",
"public abstract void removeEdge(int from, int to);",
"void remove(Edge edge);",
"public void drawUndirectedEdge(String label1, String label2) {\n }",
"public boolean removeEdge(V source, V target);",
"@Test\r\n void test_insert_two_vertice_with_one_edge_remove_edge() {\r\n // Add two vertices with one edge\r\n graph.addEdge(\"A\", \"B\");\r\n vertices = graph.getAllVertices();\r\n // B should be an adjacent vertex of A\r\n if(!graph.getAdjacentVerticesOf(\"A\").contains(\"B\")){\r\n fail();\r\n }\r\n //Check that A and B are in the graph\r\n if(!vertices.contains(\"A\") |!vertices.contains(\"B\")) {\r\n fail();\r\n }\r\n //There's one edge in the graph\r\n if(graph.size() != 1) {\r\n fail();\r\n }\r\n //Remove edge from A to B\r\n graph.removeEdge(\"A\", \"B\");\r\n // Check that A and B are still in the graph\r\n if(!vertices.contains(\"A\") |!vertices.contains(\"B\")) {\r\n fail();\r\n }\r\n // B should not be an adjacent vertex of \r\n if(graph.getAdjacentVerticesOf(\"A\").contains(\"B\")){\r\n fail();\r\n }\r\n // There are no more edges in the graph\r\n if(graph.size() != 0) {\r\n fail();\r\n }\r\n }",
"public void testRemoveEdgeEdge( ) {\n init( );\n\n assertEquals( m_g4.edgeSet( ).size( ), 4 );\n m_g4.removeEdge( m_v1, m_v2 );\n assertEquals( m_g4.edgeSet( ).size( ), 3 );\n assertFalse( m_g4.removeEdge( m_eLoop ) );\n assertTrue( m_g4.removeEdge( m_g4.getEdge( m_v2, m_v3 ) ) );\n assertEquals( m_g4.edgeSet( ).size( ), 2 );\n }",
"boolean removeEdge(E edge);",
"public boolean removeEdge(E edge);",
"public void removeEdge(int start, int end);",
"@DisplayName(\"Delete directed edges\")\n @Test\n public void testDeleteEdgeDirected() {\n boolean directed1 = true;\n graph = new Graph(edges, directed1, 0, 5, GraphType.RANDOM);\n graph.deleteEdge(new Edge(0, 1));\n Assertions.assertTrue(graph.getNeighbours(0).isEmpty());\n }",
"@Test\r\n public void testRemoveEdge() {\r\n System.out.println(\"removeEdge\");\r\n MyDigraph instance = new MyDigraph();\r\n\r\n int expectedResult = 0;\r\n int result = instance.numEdges();\r\n\r\n assertEquals(expectedResult, result);\r\n\r\n Object v1Element = 1;\r\n Object v2Element = 2;\r\n\r\n Vertex v1 = instance.insertVertex(v1Element);\r\n Vertex v2 = instance.insertVertex(v2Element);\r\n\r\n Object edgeElement = \"A\";\r\n Edge e = instance.insertEdge(v1Element, v2Element, edgeElement);\r\n\r\n expectedResult = 1;\r\n result = instance.numEdges();\r\n\r\n assertEquals(expectedResult, result);\r\n\r\n instance.removeEdge(e);\r\n\r\n expectedResult = 0;\r\n result = instance.numEdges();\r\n\r\n assertEquals(expectedResult, result);\r\n }",
"@Test\r\n void test_remove_same_edge_twice() {\r\n // Add two vertices with one edge\r\n graph.addEdge(\"A\", \"B\");\r\n graph.addEdge(\"A\", \"C\");\r\n graph.removeEdge(\"A\", \"B\");\r\n graph.removeEdge(\"A\", \"B\");\r\n if (graph.size() != 1) {\r\n fail();\r\n }\r\n if (graph.getAdjacentVerticesOf(\"A\").contains(\"B\")) {\r\n fail();\r\n } \r\n }",
"public void testRemoveEdge_edge() {\n System.out.println(\"removeEdge\");\n\n Graph<Integer, Edge<Integer>> graph = generateGraph();\n\n for (int i = 0; i < 25; i++) {\n for (int j = 0; j < 25; j++) {\n if ((i + j) % 2 != 0) {\n continue;\n }\n\n Assert.assertNotNull(\n graph.removeEdge(new UnweightedEdge(new Integer(i), new Integer(j))));\n Assert.assertFalse(graph.containsEdge(new Integer(i), new Integer(j)));\n }\n }\n }",
"@Test\n void test07_tryToRemoveNonExistentEdge() {\n graph.addVertex(\"a\");\n graph.addVertex(\"b\");\n graph.addVertex(\"c\");\n graph.addEdge(\"a\", \"b\");\n graph.addEdge(\"b\", \"c\"); // adds two edges\n try {\n graph.removeEdge(\"e\", \"f\"); // remove non existent edge\n } catch (Exception e) {\n fail(\"Shouldn't have thrown exception\");\n }\n\n Set<String> vertices = new LinkedHashSet<>();\n vertices.add(\"a\");\n vertices.add(\"b\");\n vertices.add(\"c\"); // creates mock up vertex list\n\n if (!graph.getAllVertices().equals(vertices)) { // checks if vertices weren't added or removed\n fail(\"wrong vertices are inserted into the graph\");\n }\n if (graph.size() != 2) {\n fail(\"wrong number of edges in the graph\");\n }\n\n }",
"void removeDirectedEdge(final Node first, final Node second)\n {\n if (first.connectedNodes.contains(second))\n first.connectedNodes.remove(second);\n\n }",
"@Override\n public boolean removeEdge(E vertex1, E vertex2) {\n if (vertex1 != null\n && vertex2 != null\n && vertex1 != vertex2\n && dictionary.containsKey(vertex1)\n && dictionary.containsKey(vertex2)\n && dictionary.get(vertex1).contains(vertex2)\n && dictionary.get(vertex2).contains(vertex1)) {\n dictionary.get(vertex1).remove(vertex2);\n dictionary.get(vertex2).remove(vertex1);\n return true;\n } else {\n return false;\n }\n\n }",
"int removeEdges(ExpLineageEdge.FilterOptions options);",
"public void removeEdge (E vertex1, E vertex2) throws IllegalArgumentException\n {\n int index1 = this.indexOf (vertex1);\n if (index1 < 0)\n throw new IllegalArgumentException (vertex1 + \" was not found!\");\n \n int index2 = this.indexOf (vertex2);\n if (index2 < 0)\n throw new IllegalArgumentException (vertex2 + \" was not found!\");\n\n\tthis.removeNode (index1, index2);\n this.removeNode (index2, index1);\n }",
"@Override\n public boolean deleteEdge(Edge edge) {\n return false;\n }",
"public void testRemoveEdge_betweenVertices() {\n System.out.println(\"removeEdge\");\n\n Graph<Integer, Edge<Integer>> graph = generateGraph();\n\n for (int i = 0; i < 25; i++) {\n for (int j = 0; j < 25; j++) {\n if ((i + j) % 2 != 0) {\n continue;\n }\n\n Assert.assertNotNull(graph.removeEdge(new Integer(i), new Integer(j)));\n Assert.assertFalse(graph.containsEdge(new Integer(i), new Integer(j)));\n }\n }\n }",
"@Test\r\n void add_remove_add() {\r\n graph.addEdge(\"A\", \"B\");\r\n graph.addEdge(\"A\", \"C\");\r\n graph.addEdge(\"B\",\"D\");\r\n graph.addEdge(\"C\",\"D\");\r\n graph.addEdge(\"D\", \"E\"); \r\n // Check that E is in graph with correct edges\r\n List<String> adjacent = graph.getAdjacentVerticesOf(\"D\");\r\n vertices = graph.getAllVertices(); \r\n if(!vertices.contains(\"E\") | !adjacent.contains(\"E\")) {\r\n fail();\r\n }\r\n //Remove E\r\n graph.removeVertex(\"E\");\r\n if(vertices.contains(\"E\") | adjacent.contains(\"E\")) {\r\n fail();\r\n }\r\n \r\n //Add E back into graph with different edge\r\n graph.addEdge(\"B\", \"E\");\r\n adjacent = graph.getAdjacentVerticesOf(\"B\");\r\n if(!vertices.contains(\"E\") | !adjacent.contains(\"E\")) {\r\n fail();\r\n }\r\n }",
"@DisplayName(\"Delete undirected edges\")\n @Test\n public void testDeleteEdgeUndirected() {\n graph.deleteEdge(new Edge(0, 1));\n Assertions.assertEquals(1, graph.getNeighbours(0).size());\n Assertions.assertEquals(1, graph.getNeighbours(1).size());\n }",
"private static void RemoveEdge(Point a, Point b)\n {\n //Here we use a lambda expression/predicate to express that we're looking for a match in list\n //Either if (n.A == a && n.B == b) or if (n.A == b && n.B == a)\n edges.removeIf(n -> n.A == a && n.B == b || n.B == a && n.A == b);\n }",
"public void removeEdge(Entity entityFirst, Entity entitySecond) {\n\t\tif(Processing.friendMap.containsKey(entityFirst.getEmail())) {\n\t\t\tif(Processing.friendMap.get(entityFirst.getEmail()).contains(entitySecond.getEmail())) {\n\t\t\t\tProcessing.friendMap.get(entityFirst.getEmail()).remove(entitySecond.getEmail());\n\t\t\t\tSystem.out.println(entitySecond.getEmail()+\" is removed from your Friend list\");\n\t\t\t}\n\t\t\telse{\n\t\t\t\tSystem.out.println(entitySecond.getEmail()+\" is not friend of you\");\n\t\t\t}\n\t\t\t\n\t\t}else {\n\t\t\tSystem.out.println(entityFirst.getEmail()+\" does not exist\");\n\t\t}\n\t}",
"public abstract void removeEdge(Point p, Direction dir);",
"public void removeEdge(N startNode, N endNode)\r\n/* 80: */ {\r\n/* 81:151 */ assert (checkRep());\r\n/* 82:152 */ if ((contains(startNode)) && (((Map)this.map.get(startNode)).containsKey(endNode)))\r\n/* 83: */ {\r\n/* 84:153 */ ((Map)this.map.get(startNode)).remove(endNode);\r\n/* 85:154 */ ((Map)this.map.get(endNode)).remove(startNode);\r\n/* 86: */ }\r\n/* 87: */ }",
"public Boolean removeEdge( AnyType vertex_value_A, AnyType vertex_value_B ) throws VertexException {\n \n // ------------------------------------\n // Basic steps:\n // ------------------------------------\n // 1) For each vertex, check to see if the vertex exists in \n // the vertex_adjacency_list. If not, return false indicated \n // the edge does not exist. Otherwise goto step 2.\n // 2) In Vertex class, check to see if Vertex B is in Vertex A's\n // adjacent_vertex_list and vice versa (i.e. an edge exists). \n // If the edge does not exist return false, otherwise goto \n // step 3.\n // 3) In the Vertex class, remove Vertex B from Vertex A's \n // adjacent_vertex_list and vice versa, and then goto step 4. \n // Does not exist and return false, otherwise proceed to step 4.\n // 4) If number of adjacent vertices for Vertex A is zero, then \n // remove from the vertex_adjacency_list. Likewise, if the \n // number of adjacent vertices for Vertex B is zero, then \n // remove from _adjacency_list. Lastly, return true indicating \n // the edge was successfully removed.\n \n // ----------------------------\n // TODO: Add your code here\n // ----------------------------\n boolean a_in_list = false;\n boolean b_in_list = false;\n boolean edge = false;\n int size = vertex_adjacency_list.size();\n int a = -1;\n int b = -1;\n //Make new vertices with values passed in the parameters\n Vertex<AnyType> A = new Vertex<AnyType>(vertex_value_A);\n Vertex<AnyType> B = new Vertex<AnyType>(vertex_value_B);\n //go through to each vertex and find if the vertices exist\n for(int i = 0; i< size-1; i++){\n if( vertex_adjacency_list.get(i).compareTo(A) == 0){\n a_in_list = true;\n a = i;\n }\n if( vertex_adjacency_list.get(i).compareTo(B) == 0){\n b_in_list = true;\n b = i;\n }\n }\n //if doesn't exist, return false\n if( a_in_list == false || b_in_list == false){\n return false;\n }\n //checks if they're is an edge between vertices\n edge = vertex_adjacency_list.get(a).hasAdjacentVertex(vertex_adjacency_list.get(b));\n if(edge == false){\n return false;\n }\n //if edge exists then remove it from both a's and b's adjacency list\n if(edge){\n vertex_adjacency_list.get(a).removeAdjacentVertex(vertex_adjacency_list.get(b));\n vertex_adjacency_list.get(b).removeAdjacentVertex(vertex_adjacency_list.get(a));\n }\n //checking if no adjacecnt vertices then remove the node\n //bc there is no edge pointing to it\n if(vertex_adjacency_list.get(a).numberOfAdjacentVertices() == 0){\n vertex_adjacency_list.remove(a);\n }\n if(vertex_adjacency_list.get(b).numberOfAdjacentVertices() == 0){\n vertex_adjacency_list.remove(b);\n }\n \n \n return true;\n \n }",
"void removeEdges(List<CyEdge> edges);",
"@Test\n public void testRemoveEdge() throws Exception {\n\n final ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();\n\n Graph<Long, Long, Long> graph =\n Graph.fromDataSet(\n TestGraphUtils.getLongLongVertexData(env),\n TestGraphUtils.getLongLongEdgeData(env),\n env);\n\n // duplicate edge should be preserved in output\n graph = graph.addEdge(new Vertex<>(1L, 1L), new Vertex<>(2L, 2L), 12L);\n\n graph = graph.removeEdge(new Edge<>(5L, 1L, 51L));\n\n DataSet<Edge<Long, Long>> data = graph.getEdges();\n List<Edge<Long, Long>> result = data.collect();\n\n expectedResult =\n \"1,2,12\\n\"\n + \"1,2,12\\n\"\n + \"1,3,13\\n\"\n + \"2,3,23\\n\"\n + \"3,4,34\\n\"\n + \"3,5,35\\n\"\n + \"4,5,45\\n\";\n\n compareResultAsTuples(result, expectedResult);\n }",
"@Test\n void test06_removeEdge_checkSize() {\n graph.addVertex(\"c\");\n graph.addEdge(\"a\", \"b\");\n graph.addEdge(\"b\", \"c\"); // adds two edges\n graph.removeEdge(\"a\", \"b\"); // removes one of the edges\n if (graph.size() != 1) {\n fail(\"graph has counted incorrect number of edges\");\n }\n }",
"@Test\r\n void insert_multiple_vertexes_and_edges_remove_vertex() {\r\n graph.addEdge(\"A\", \"B\");\r\n graph.addEdge(\"B\", \"C\");\r\n graph.addEdge(\"A\", \"C\");\r\n graph.addEdge(\"B\", \"D\");\r\n \r\n List<String> adjacent;\r\n vertices = graph.getAllVertices(); \r\n int numberOfEdges = graph.size();\r\n int numberOfVertices = graph.order();\r\n if(numberOfEdges != 4) {\r\n fail();\r\n }\r\n if(numberOfVertices != 4) {\r\n fail();\r\n }\r\n \r\n // Check that graph has all added vertexes\r\n if(!vertices.contains(\"A\")| !vertices.contains(\"B\")|\r\n !vertices.contains(\"C\")|!vertices.contains(\"D\")) {\r\n fail();\r\n }\r\n \r\n // Check that A's outgoing edges are correct\r\n adjacent = graph.getAdjacentVerticesOf(\"A\");\r\n if (!adjacent.contains(\"B\") || !adjacent.contains(\"C\"))\r\n fail();\r\n // Check that B's outgoing edges are correct\r\n adjacent = graph.getAdjacentVerticesOf(\"B\");\r\n if (!adjacent.contains(\"C\") | !adjacent.contains(\"D\"))\r\n fail(); \r\n // C and D have no out going edges \r\n adjacent = graph.getAdjacentVerticesOf(\"C\");\r\n if (!adjacent.isEmpty())\r\n fail(); \r\n adjacent = graph.getAdjacentVerticesOf(\"D\");\r\n if (!adjacent.isEmpty())\r\n fail(); \r\n // Remove B from the graph \r\n graph.removeVertex(\"B\");\r\n // Check that A's outgoing edges are correct\r\n // An edge to B should no exist any more \r\n adjacent = graph.getAdjacentVerticesOf(\"A\");\r\n if (adjacent.contains(\"B\") || !adjacent.contains(\"C\"))\r\n fail();\r\n // There should be no elements in the list of successors\r\n // of B since its deleted form the graph\r\n adjacent = graph.getAdjacentVerticesOf(\"B\");\r\n if (!adjacent.isEmpty())\r\n fail(); \r\n // Check that graph has still has all vertexes not removed\r\n if(!vertices.contains(\"A\")| !vertices.contains(\"C\")|\r\n !vertices.contains(\"D\")) {\r\n fail();\r\n }\r\n //Check that vertex B was removed from graph \r\n if(vertices.contains(\"B\")) {\r\n fail();\r\n }\r\n numberOfEdges = graph.size();\r\n numberOfVertices = graph.order();\r\n if(numberOfEdges != 1) {\r\n fail();\r\n }\r\n if(numberOfVertices != 3) {\r\n fail();\r\n }\r\n }",
"@Test\n\tpublic void deleteA_useAwithB_danglingEdgeTest() {\n\t\tHenshinResourceSet resourceSet = new HenshinResourceSet(PATH);\n\n\t\t// Load the module:\n\t\tModule module = resourceSet.getModule(\"simpleTgRules.henshin\", false);\n\n\t\tUnit deleteAUnit = module.getUnit(\"deleteA\");\n\t\tRule deleteARule = (Rule) deleteAUnit;\n\n\t\tUnit useAwithBUnit = module.getUnit(\"useAwithB\");\n\t\tRule useAwithBRule = (Rule) useAwithBUnit;\n\n\t\tConflictAnalysis atomicCoreCPA = new ConflictAnalysis(deleteARule, useAwithBRule);\n\t\tList<ConflictAtom> computedConflictAtoms = atomicCoreCPA.computeConflictAtoms();\n\t\t// should be 0 due to dangling edge condition. First rule deletes a node\n\t\t// and second rule requires to have an edge on that node!\n\t\tAssert.assertEquals(0, computedConflictAtoms.size());\n\t\t// System.out.println(\"number of conflict atoms:\n\t\t// \"+computedConflictAtoms.size());\n\t\t// for(ConflictAtom conflictAtom : computedConflictAtoms){\n\t\t// System.out.println(conflictAtom);\n\t\t// }\n\n\t\tAtomCandidateComputation candComp = new AtomCandidateComputation(deleteARule, useAwithBRule);\n\t\tList<Span> conflictAtomCandidates = candComp.computeAtomCandidates();\n\n\t\tSet<MinimalConflictReason> reasons = new HashSet<>();//\n\t\tfor (Span candidate : conflictAtomCandidates) {\n\t\t\tnew MinimalReasonComputation(deleteARule, useAwithBRule).computeMinimalConflictReasons(candidate, reasons);\n\t\t}\n\t\t// should be 0 due to dangling edge condition. First rule deletes a node\n\t\t// and second rule requires to have an edge on that node!\n\t\tAssert.assertEquals(0, reasons.size());\n\n\t\t// Set<Span> minimalConflictReasons = reasons;\n\t\t// System.out.println(\"number of minimal conflict reasons:\n\t\t// \"+minimalConflictReasons.size());\n\t\t// for(Span minimalConflictReason : minimalConflictReasons){\n\t\t// System.out.println(minimalConflictReason);\n\t\t// }\n\t}",
"@Test \r\n void create_edge_between_to_nonexisted_vertexes() {\r\n graph.addEdge(\"A\", \"B\");\r\n List<String> adjacentA = graph.getAdjacentVerticesOf(\"A\");\r\n List<String> adjacentB = graph.getAdjacentVerticesOf(\"B\");\r\n if(!adjacentA.contains(\"B\")) { \r\n fail();\r\n }\r\n if(adjacentB.contains(\"A\")) { \r\n fail();\r\n }\r\n }",
"public boolean findInEdge(String label){\n\t\tfor(Entry<String, LinkedList<Edge>> s: vertices.entrySet()){\n\t\t\tfor(int i=0; i < vertices.get(s.getKey()).size();i++){\n\t\t\t\tif(vertices.get(s.getKey()).get(i).getDLabel().equals(label)){\n\t\t\t\t\tdelEdge(s.getKey(),label);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}",
"@Override\n \t\t\t\tpublic void deleteGraph() throws TransformedGraphException {\n \n \t\t\t\t}",
"@Override\r\n\tpublic boolean unlink(E src, E dst) {\r\n\t\tVertex<E> s = vertices.get(src);\r\n\t\tVertex<E> d = vertices.get(dst);\r\n\t\tif(s != null && d != null) {\r\n\t\t\tadjacencyLists.get(src).remove(new Edge<E>(s.getElement(), d.getElement(), 1)); //remove edge (s,d)\r\n\t\t\tif(!isDirected) { //Remove the other edge if this graph is undirected\r\n\t\t\t\tadjacencyLists.get(dst).remove(new Edge<E>(d.getElement(), s.getElement(), 1));\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"public void removeEdge(Node p_a, Node p_b) {\n\t\tEdge edge = makeEdge(p_a, p_b);\n\t\tedges.remove(edge);\n\t}",
"public boolean removeEdge(final LazyRelationship2 edge) {\n Relationship rel = neo.getRelationshipById(edge.getId());\n if (rel != null){\n removeEdge(rel);\n }\n else\n return false;\n return true;\n }",
"public void deleteEdge(Integer idVertex1, Integer idVertex2) throws Exception {\r\n\t\tmatrix.deleteEdge(idVertex1, idVertex2);\r\n\t}",
"private static void helperDelete(DiGraph graph,Scanner reader){\n System.out.print(\"Enter the 'from' and 'to' vertices of the edge to delete: \");\n\n int from = reader.nextInt();\n int to = reader.nextInt();\n\n if(graph.deleteEdge(from,to))\n System.out.println(\"Edge (\" + from + \", \" + to + \") was deleted\\n\");\n else {\n System.out.println(\"Edge does not already exist in the graph\\n\");\n }\n }",
"public void addUndirectedEdge(int v1, int v2, Object edgeInfo) {\n//your code here\n Edge edge1 = new Edge(v1, v2, edgeInfo);\n Edge edge2 = new Edge(v2, v1, edgeInfo);\n if(!adjLists[v1].contains(edge1)){\n adjLists[v1].addLast(edge1);\n }\n if(!adjLists[v2].contains(edge2)){\n adjLists[v2].addLast(edge2);\n }\n }",
"@Test\r\n public void testEdges() {\r\n System.out.println(\"edges\");\r\n MyDigraph instance = new MyDigraph();\r\n\r\n Object v1Element = 1;\r\n Object v2Element = 2;\r\n\r\n Vertex v1 = instance.insertVertex(v1Element);\r\n Vertex v2 = instance.insertVertex(v2Element);\r\n\r\n Object edgeElement = \"A\";\r\n Edge e = instance.insertEdge(v1Element, v2Element, edgeElement);\r\n\r\n Collection colection = instance.edges();\r\n boolean result = colection.contains(e);\r\n boolean expectedResult = true;\r\n assertEquals(expectedResult, result);\r\n\r\n instance.removeEdge(e);\r\n result = colection.contains(e);\r\n expectedResult = false;\r\n assertEquals(expectedResult, result);\r\n }",
"private void deleteEdge(String source, String dest) {\r\n\t\tVertex v = vertexMap.get(source);\r\n\t\tfor (Iterator i = v.adjacent.iterator(); i.hasNext();) {\r\n\t\t\tEdge edge = (Edge) i.next();\r\n\t\t\tif (edge.getDestination().equals(dest)) {\r\n\t\t\t\tv.adjacent.remove(edge);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"@Test\n public void testGraphElements(){\n Vertex v1 = new Vertex(1, \"A\");\n Vertex v2 = new Vertex(2, \"B\");\n Vertex v3 = new Vertex(3, \"C\");\n Vertex v4 = new Vertex(4, \"D\");\n Vertex v5 = new Vertex(5, \"E\");\n Vertex v6 = new Vertex(6, \"F\");\n Vertex v7 = new Vertex(7, \"G\");\n Vertex v8 = new Vertex(8, \"H\");\n\n Vertex fakeVertex = new Vertex(100, \"fake vertex\");\n\n Edge<Vertex> e1 = new Edge<>(v1, v2, 1);\n Edge<Vertex> e2 = new Edge<>(v2, v3, 1);\n Edge<Vertex> e3 = new Edge<>(v3, v4, 1);\n Edge<Vertex> e4 = new Edge<>(v2, v4, 1);\n Edge<Vertex> e5 = new Edge<>(v2, v6, 1);\n Edge<Vertex> e6 = new Edge<>(v2, v5, 10);\n Edge<Vertex> e7 = new Edge<>(v5, v6, 10);\n Edge<Vertex> e8 = new Edge<>(v4, v6, 10);\n Edge<Vertex> e9 = new Edge<>(v6, v7, 10);\n Edge<Vertex> e10 = new Edge<>(v7, v8, 10);\n\n Edge<Vertex> fakeEdge = new Edge<>(fakeVertex, v1);\n Edge<Vertex> edgeToRemove = new Edge<>(v2, v7, 200);\n\n Graph<Vertex, Edge<Vertex>> g = new Graph<>();\n g.addVertex(v1);\n g.addVertex(v2);\n g.addVertex(v3);\n g.addVertex(v4);\n g.addVertex(v5);\n g.addVertex(v6);\n g.addVertex(v7);\n g.addVertex(v8);\n g.addEdge(e1);\n g.addEdge(e2);\n g.addEdge(e3);\n g.addEdge(e4);\n g.addEdge(e5);\n g.addEdge(e6);\n g.addEdge(e7);\n g.addEdge(e8);\n g.addEdge(e9);\n g.addEdge(edgeToRemove);\n\n Assert.assertTrue(g.addEdge(e10));\n\n //adding null edge or vertex to graph returns false\n Assert.assertFalse(g.addEdge(null));\n Assert.assertFalse(g.addVertex(null));\n\n //adding edge with a vertex that does not exist in graph g returns false\n Assert.assertFalse(g.addEdge(fakeEdge));\n\n //get an edge that does not exit in graph returns false\n Assert.assertFalse(g.edge(v1, fakeVertex));\n\n //getting length of edge from vertex not in graph g returns false\n Assert.assertEquals(0, g.edgeLength(fakeVertex, v2));\n\n //Remove an edge in graph g returns true\n Assert.assertTrue(g.remove(edgeToRemove));\n\n //Removing edge not in graph g returns false\n Assert.assertFalse(g.remove(fakeEdge));\n\n //Removing vertex not in graph g returns false\n Assert.assertFalse(g.remove(fakeVertex));\n\n //Finding an edge with an endpoint not in graph g returns null\n assertNull(g.getEdge(v1, fakeVertex));\n }",
"public boolean addEdge(String label1, String label2)\n\t{\n\t\tif(!isAdjacent(label1, label2)) //if edge does not already exist add it\n\t\t{\n\t\t\tDSAGraphVertex vx1 = getVertex(label1), vx2 = getVertex(label2);\n\t\t\tvx1.addEdge(vx2);\n\t\t\tvx2.addEdge(vx1);\n\t\t\tedgeCount++;\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}",
"public void deleteEdge( String sourceName, String destName)\n {\n \tVertex v = vertexMap.get( sourceName );\n Vertex w = vertexMap.get( destName );\n if(v!=null && w!=null)\n \tv.adjEdge.remove(w.name);\n \n // v.weightnext.put(w.name,(Double) distance);\n }",
"public boolean resetEdges();",
"public void removeAllEdges() {\n }",
"@Test\r\n void remove_nonexistent_vertex() {\r\n graph.addEdge(\"A\", \"B\");\r\n graph.addEdge(\"B\", \"C\");\r\n graph.removeVertex(\"D\");\r\n List<String> adjacent;\r\n vertices = graph.getAllVertices(); \r\n // Check that graph has all added vertexes\r\n if(!vertices.contains(\"A\")| !vertices.contains(\"B\")|\r\n !vertices.contains(\"C\")) {\r\n fail();\r\n }\r\n adjacent = graph.getAdjacentVerticesOf(\"A\");\r\n if (!adjacent.contains(\"B\"))\r\n fail();\r\n adjacent = graph.getAdjacentVerticesOf(\"B\");\r\n if (!adjacent.contains(\"C\"))\r\n fail();\r\n \r\n }",
"public void removeEdge(Position ep) throws InvalidPositionException;",
"protected void removeEdgeAndVertices(TestbedEdge edge) {\n java.util.Collection<Agent> agents = getIncidentVertices(edge);\n removeEdge(edge);\n for (Agent v : agents) {\n if (getIncidentEdges(v).isEmpty()) {\n removeVertex(v);\n }\n }\n }",
"@Test\n public void testWithUnknownLabel() throws Exception {\n LogicalGraph socialGraph = getSocialNetworkLoader().getLogicalGraph();\n LogicalGraph result = socialGraph\n .callForGraph(new VertexDeduplication<>(\"NotInTheGraph\", Arrays.asList(\"a\", \"b\")));\n collectAndAssertTrue(socialGraph.equalsByData(result));\n }",
"private GraphRemovalUndo removeAxiomEdgesOf(Graph<String, DefaultEdge> g,\n\t\t\tMap<DefaultEdge, Set<OWLAxiom>> createdByAxioms, Map<DefaultEdge, Set<OWLAxiom>> labels, DefaultEdge edge) {\n\n\t\tMap<OWLAxiom, Set<DefaultEdge>> axiomToEdges = getAxiomToEdges(createdByAxioms);\n\n\t\t// Instantiate a graphremoval class (which allows to undo the removal9\n\t\tGraphRemovalUndo remover = new GraphRemovalUndo(g);\n\n\t\t// For each axiom of the edge\n\t\tfor (OWLAxiom ax : createdByAxioms.get(edge)) {\n\t\t\t// For each edge that was created by this axiom\n\t\t\tfor (DefaultEdge e : axiomToEdges.get(ax)) {\n\t\t\t\t// remove the axiom from the label\n\t\t\t\tif (labels.containsKey(e)) {\n\t\t\t\t\tlabels.get(e).remove(ax);\n\t\t\t\t}\n\t\t\t\t// If this was the last axiom of the edge, remove it\n\t\t\t\tif (createdByAxioms.get(e).size() < 1) {\n\t\t\t\t\tcreatedByAxioms.remove(e);\n\t\t\t\t\tremover.removeEdge(e);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Remove all nested class expressions of the axiom\n\t\t\tax.nestedClassExpressions().forEach(nested -> {\n\t\t\t\tremover.removeVertex(OntologyDescriptor.getCleanNameOWLObj(nested));\n\t\t\t});\n\n\t\t\t// Remember which axioms where removed\n\t\t\tremover.saveAxiom(ax);\n\t\t}\n\n\t\treturn remover;\n\n\t}",
"@Test\n public void testRemoveEdges() throws Exception {\n\n final ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();\n\n Graph<Long, Long, Long> graph =\n Graph.fromDataSet(\n TestGraphUtils.getLongLongVertexData(env),\n TestGraphUtils.getLongLongEdgeData(env),\n env);\n List<Edge<Long, Long>> edgesToBeRemoved = new ArrayList<>();\n edgesToBeRemoved.add(new Edge<>(5L, 1L, 51L));\n edgesToBeRemoved.add(new Edge<>(2L, 3L, 23L));\n\n // duplicate edge should be preserved in output\n graph = graph.addEdge(new Vertex<>(1L, 1L), new Vertex<>(2L, 2L), 12L);\n\n graph = graph.removeEdges(edgesToBeRemoved);\n\n DataSet<Edge<Long, Long>> data = graph.getEdges();\n List<Edge<Long, Long>> result = data.collect();\n\n expectedResult =\n \"1,2,12\\n\" + \"1,2,12\\n\" + \"1,3,13\\n\" + \"3,4,34\\n\" + \"3,5,35\\n\" + \"4,5,45\\n\";\n\n compareResultAsTuples(result, expectedResult);\n }",
"private Edge removeEdge(Node source, Node dest)\r\n\t{\r\n\t final Edge e = source.removeEdge(edgeType.getName(), dest);\r\n\t if (!eSet.remove(e))\r\n\t\tthrow new RuntimeException(\"No Edge from Node <\"+source.getName()\r\n\t\t\t\t\t +\"> to Node <\"+dest.getName()+\">\");\r\n\t return e;\r\n\t}",
"protected GraphSubEdge (Object label)\n {\n this.label = label;\n mark = false;\n }",
"public boolean removeEdge(V tail);",
"public void removeVertex();",
"@Test\n void test02_removeVertex() {\n graph.addVertex(\"a\");\n graph.addVertex(\"b\"); // adds two\n graph.removeVertex(\"a\"); // remove\n\n Set<String> vertices = new LinkedHashSet<>();\n vertices.add(\"a\");\n vertices.add(\"b\");\n vertices.remove(\"a\"); // creates a mock up vertex list\n\n if (!graph.getAllVertices().equals(vertices)) {\n fail(\"Graph didn't remove the vertices correctly\");\n }\n }",
"public abstract boolean addEdge(Node node1, Node node2, int weight);",
"public static void deleteEdge(Edge edge,Context context) {\n DatabaseContext dbContext = new DatabaseContext(context);\n SQLiteHelper helper = new SQLiteHelper(dbContext,\"BLEdevice.db\");\n helper.deleteEdge(edge);\n // Log.w(\"deleteEdge\", \"edge cout = \" + coutEdge(context));\n }",
"private void edgeDown(String source, String dest) {\r\n\t\tVertex v = vertexMap.get(source);\r\n\t\tfor (Iterator i = v.adjacent.iterator(); i.hasNext();) {\r\n\t\t\tEdge edge = (Edge) i.next();\r\n\t\t\tif (edge.getDestination().equals(dest))\r\n\t\t\t\tedge.setStatus(false);\r\n\t\t}\r\n\t}",
"@Test \r\n void insert_two_vertexs_then_create_edge(){\r\n graph.addVertex(\"A\");\r\n graph.addVertex(\"B\");\r\n graph.addEdge(\"A\", \"B\");\r\n List<String> adjacentA = graph.getAdjacentVerticesOf(\"A\");\r\n List<String> adjacentB = graph.getAdjacentVerticesOf(\"B\");\r\n if(!adjacentA.contains(\"B\")) { \r\n fail();\r\n }\r\n if(adjacentB.contains(\"A\")) { \r\n fail();\r\n }\r\n }",
"public boolean hasEdge(int node1, int node2)\n{\n\tNode s=(Node)this.getNodes().get(node1);\n return s.hasNi(node2);\n\t\n}",
"@Test \n\tpublic void removeVertexTest() {\n\t\tList<Vertex> vertices = new ArrayList<>();\n\t\tvertices.add(C);\n\t\tvertices.add(D);\n\t\tedge_0.addVertices(vertices);\n\t\tgraph.addVertex(D);\n\t\tassertFalse(graph.removeVertex(C));\n\t\tgraph.addVertex(C);\n\t\tgraph.addEdge(edge_0);\n\t\tassertTrue(graph.removeVertex(D));\n\t\tassertFalse(graph.vertices().contains(D));\n\t\tassertFalse(graph.edges().contains(edge_0));\n\t\tassertTrue(graph.addVertex(D));\n\t}",
"public void crossEdge(Edge e) {}",
"@Test\r\n void remove_null() {\r\n graph.addEdge(\"A\", \"B\");\r\n graph.addEdge(\"B\", \"C\");\r\n graph.removeVertex(null);\r\n List<String> adjacent;\r\n vertices = graph.getAllVertices(); \r\n // Check that graph has all added vertexes\r\n if(!vertices.contains(\"A\")| !vertices.contains(\"B\")|\r\n !vertices.contains(\"C\")) {\r\n fail();\r\n }\r\n adjacent = graph.getAdjacentVerticesOf(\"A\");\r\n if (!adjacent.contains(\"B\"))\r\n fail();\r\n adjacent = graph.getAdjacentVerticesOf(\"B\");\r\n if (!adjacent.contains(\"C\"))\r\n fail();\r\n \r\n }",
"@Override\r\n\tpublic boolean deleteMovieConnection(String actor1, String actor2, String movieName)\r\n\t{\r\n\t\tActor act1 = new Actor(actor1);\r\n\t\tActor act2 = new Actor(actor2);\r\n\t\t\r\n\t\tif(graph.containsEdge(act1,act2 ) == true)\r\n\t\t{\r\n\t\t\tgraph.removeEdge(act1, act2, 1, movieName);\r\n\t\t\t\r\n\t\t\treturn true;\t\t\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"private void addEdgeWithLabel(NasmInst source, NasmLabel destination) {\n if (source == null || destination == null)\n throw new FgException(\"ERROR: Can't create an edge without a source and a destination\");\n\n if (systemCalls.contains(destination.toString()))\n return; // System call: iprintLF, readline or atoi. No edge needed\n\n NasmInst destinationInst = label2Inst.get(destination.toString());\n if (destinationInst == null)\n throw new FgException(\"ERROR: No instruction matching with the given label\");\n addEdgeWithInst(source, destinationInst);\n }",
"public boolean removeEdge(V tail, V head);",
"void removeIsVertexOf(Subdomain_group oldIsVertexOf);",
"public void removeEdge(int indexOne, int indexTwo)\n\t{\n\t\tadjacencyMatrix[indexOne][indexTwo] = false;\n\t\tadjacencyMatrix[indexTwo][indexOne] = false;\n\t}",
"public void removeEdge(String edgeTypeName, Node source, Node dest)\r\n {\r\n\tfinal EdgeTypeHolder eth = ethMap.get(edgeTypeName);\r\n\tif(eth!=null) eth.removeEdge(source, dest);\r\n\t// Invalidate the Edge array cache.\r\n\tedges = null;\r\n }",
"public void removeEdge(V from, V to){\n if (from.equals(null) || to.equals(null)){\n throw new IllegalArgumentException();\n }\n if (hasEdge(from, to)){\n ArrayList<V> edges = (ArrayList<V>)getEdges(from);\n int i = 1;\n V vertex = edges.get(0);\n while (i < edges.size() && !vertex.equals(to)){\n i++;\n vertex = edges.get(i);\n }\n edges.remove(vertex);\n graph.put(from, edges);\n }\n\n }",
"public void testContainsEdgeEdge( ) {\n init( );\n\n //TODO Implement containsEdge().\n }",
"public void testRemoveEdgeObjectObject( ) {\n init( ); //TODO Implement removeEdge().\n }",
"public static void generateAndSaveExampleGraph() {\n EuclidDirectedGraph graph1 = new EuclidDirectedGraph();\n //vertexes added and created edge\n BoundsGraphVertex ver1 = new BoundsGraphVertex(10, 10, \"source\");\n BoundsGraphVertex ver2 = new BoundsGraphVertex(10, 30, \"secondNode\");\n BoundsGraphVertex ver3 = new BoundsGraphVertex(10, 40, \"thirdNode\");\n BoundsGraphVertex ver4 = new BoundsGraphVertex(10, 50, \"sink\");\n BoundsGraphVertex ver5 = new BoundsGraphVertex(10, 60, \"fiveNode - loop from second\");\n BoundsGraphVertex ver6 = new BoundsGraphVertex(10, 70, \"sixNode - loop from five\");\n BoundsGraphVertex ver7 = new BoundsGraphVertex(10, 80, \"sevenNode - loop from six to third\");\n\n graph1.addNode(ver1);\n graph1.addNode(ver2);\n graph1.addNode(ver3);\n graph1.addNode(ver4);\n graph1.addNode(ver5);\n graph1.addNode(ver6);\n graph1.addNode(ver7);\n //use .addEuclidEdge to compute edge's length automatically\n graph1.addEuclidEdge(ver1, ver2);\n graph1.addEuclidEdge(ver2, ver3);\n graph1.addEuclidEdge(ver3, ver4);\n graph1.addEuclidEdge(ver2, ver5);\n graph1.addEuclidEdge(ver5, ver6);\n graph1.addEuclidEdge(ver6, ver7);\n graph1.addEuclidEdge(ver7, ver3);\n //created graph #2\n EuclidDirectedGraph graph2 = new EuclidDirectedGraph();\n try {\n //save into file from graph #1\n XMLSerializer.write(graph1, \"input.xml\", false);\n //read from file into graph #2\n graph2 = (EuclidDirectedGraph) XMLSerializer.read(\"input.xml\");\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"boolean addEdge(E edge);",
"public boolean removeEdge(Edge edge) {\r\n\t\treturn false;\r\n\t}",
"public void removeEdge(Edge e){\n edgeList.remove(e);\n }",
"@Override\n public void remove() {\n deleteFromModel();\n deleteEdgeEndpoints();\n\n setDeleted(true);\n if (!isCached()) {\n HBaseEdge cachedEdge = (HBaseEdge) graph.findEdge(id, false);\n if (cachedEdge != null) cachedEdge.setDeleted(true);\n }\n }",
"@Test\n public void testRemoveInvalidEdge() throws Exception {\n\n final ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();\n\n Graph<Long, Long, Long> graph =\n Graph.fromDataSet(\n TestGraphUtils.getLongLongVertexData(env),\n TestGraphUtils.getLongLongEdgeData(env),\n env);\n graph = graph.removeEdge(new Edge<>(6L, 1L, 61L));\n\n DataSet<Edge<Long, Long>> data = graph.getEdges();\n List<Edge<Long, Long>> result = data.collect();\n\n expectedResult =\n \"1,2,12\\n\"\n + \"1,3,13\\n\"\n + \"2,3,23\\n\"\n + \"3,4,34\\n\"\n + \"3,5,35\\n\"\n + \"4,5,45\\n\"\n + \"5,1,51\\n\";\n\n compareResultAsTuples(result, expectedResult);\n }",
"public boolean removeVertex(String label)\n\t{\n\t\tif(hasVertex(label)) //if vertex in in list\n\t\t{\n\t\t\tvertices.removeAt(getVertex(label));\n\t\t\t//System.out.println(\"Deleted: \" + label); //debug\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}",
"public abstract boolean putEdge(Edge incomingEdge);",
"public Edge(T node_1, T node_2,S label) {\n\t\tparent = node_1;\n\t\tchild = node_2;\n\t\tl = label;\n\t\tcheckRep();\n\t}",
"private void removeEdge(Edge edge) {\n\t\tshapes.remove(edge);\n\t\tshapes.remove(edge.getEdgeLabel());\n\t\tremove(edge.getEdgeLabel());\n\t}",
"Edge createEdge(Vertex src, Vertex tgt, boolean directed);",
"protected void processEdge(Edge e) {\n\t}",
"public boolean addEdge(String id1, String id2)\n\t{\n\t\treturn addEdge(id1, id2, null);\n\t}",
"public abstract boolean hasEdge(int from, int to);",
"@DisplayName(\"Has edge\")\n @Test\n public void testHasEdge() {\n boolean directed1 = true;\n graph = new Graph(edges, directed1, 0, 5, GraphType.RANDOM);\n Assertions.assertTrue(graph.hasEdge(new Edge(0, 1)));\n }",
"private static <N, E extends Edge<N>> ImmutableAdjacencyGraph<N, Edge<N>> deleteFromGraph(final Graph<N, E> graph, final Set<N> deleteNodes, final Set<E> deleteEdges)\n\t{\n\t\t// remove the deleteNodes\n\t\tfinal Set<N> cutNodes = graph.getNodes();\n\t\tcutNodes.removeAll(deleteNodes);\n\t\t// remove the deleteEdges\n\t\tfinal Set<Edge<N>> cutEdges = new HashSet<Edge<N>>(deleteEdges);\n\t\tfor (final E edge : deleteEdges)\n\t\t\tcutEdges.remove(edge);\n\t\t// remove any remaining deleteEdges which connect to removed deleteNodes\n\t\t// also replace deleteEdges that have one removed node but still have\n\t\t// 2 or more remaining deleteNodes with a new edge.\n\t\tfinal Set<Edge<N>> removeEdges = new HashSet<Edge<N>>();\n\t\tfinal Set<Edge<N>> addEdges = new HashSet<Edge<N>>();\n\t\tfor(final Edge<N> cutEdge : cutEdges)\n\t\t{\n\t\t\tfinal List<N> cutEdgeNeighbors = cutEdge.getNodes();\n\t\t\tcutEdgeNeighbors.removeAll(cutNodes);\n\t\t\tif( cutEdgeNeighbors.size() != cutEdge.getNodes().size() )\n\t\t\t\tremoveEdges.add(cutEdge);\n\t\t\tif( cutEdgeNeighbors.size() > 1 )\n\t\t\t\t// TODO instead of ImmutableHyperEdge implement clone or something\n\t\t\t\taddEdges.add(new ImmutableHyperEdge<N>(cutEdgeNeighbors));\n\t\t}\n\t\tfor(final Edge<N> removeEdge : removeEdges)\n\t\t\tcutEdges.remove(removeEdge);\n\t\tcutEdges.addAll(addEdges);\n\t\t// check if a graph from the new set of deleteEdges and deleteNodes is\n\t\t// still connected\n\t\treturn new ImmutableAdjacencyGraph<N, Edge<N>>(cutNodes, cutEdges);\n\t}",
"@Override public boolean remove(L vertex) {\r\n if(!vertices.contains(vertex)) return false;\r\n vertices.remove(vertex);\r\n Iterator<Edge<L>> iter=edges.iterator();\r\n while(iter.hasNext()) {\r\n \t Edge<L> tmp=iter.next();\r\n \t //改了\r\n \t if(tmp.getSource().equals(vertex) || tmp.getTarget().equals(vertex))\r\n \t // if(tmp.getSource()==vertex|| tmp.getTarget()==vertex) \r\n \t\t iter.remove();\r\n \t}\r\n checkRep();\r\n return true;\r\n \r\n \r\n }",
"public void testRemoveAllEdges() {\n System.out.println(\"removeAllEdges\");\n\n Graph<Integer, Edge<Integer>> graph = generateGraph();\n Assert.assertTrue(graph.removeAllEdges());\n Assert.assertEquals(graph.edgesSet().size(), 0);\n }",
"@Test\n void test03_addEdgeBetweenVerticesWhichDontExist() {\n graph.addEdge(\"a\", \"b\");\n Set<String> vertices = new LinkedHashSet<>();\n vertices.add(\"a\");\n vertices.add(\"b\"); // creates mock up vertex list\n if (!graph.getAllVertices().equals(vertices)) { // compares vertices list\n fail(\"Graph didn't add the vertices correctly\");\n }\n List<String> adjOfA = new ArrayList<>();\n adjOfA.add(\"b\"); // creates mock up adjacent list\n if (!graph.getAdjacentVerticesOf(\"a\").equals(adjOfA)) { // compares adjacent lists\n fail(\"Graph didn't correctly place adjacent vertices\");\n }\n }"
] | [
"0.7161236",
"0.6653791",
"0.6635958",
"0.66012055",
"0.65358126",
"0.6463278",
"0.64625776",
"0.6462574",
"0.6458258",
"0.64409345",
"0.6428062",
"0.641917",
"0.6376916",
"0.63403195",
"0.6302246",
"0.62964743",
"0.6286982",
"0.62858415",
"0.6244306",
"0.6224615",
"0.62066793",
"0.6187532",
"0.6179158",
"0.6168049",
"0.61117226",
"0.6088663",
"0.6087474",
"0.60759896",
"0.60636216",
"0.6032017",
"0.602289",
"0.6003607",
"0.5997135",
"0.59810936",
"0.59424275",
"0.5927995",
"0.59211504",
"0.59185517",
"0.59143686",
"0.58985895",
"0.5894756",
"0.5889202",
"0.58606946",
"0.58504874",
"0.58475167",
"0.58299756",
"0.58205914",
"0.58120644",
"0.57994705",
"0.57867867",
"0.57786787",
"0.577062",
"0.5767572",
"0.5759202",
"0.5753568",
"0.5741276",
"0.5737694",
"0.57340497",
"0.5716375",
"0.5699496",
"0.5678812",
"0.56502694",
"0.56387204",
"0.56377983",
"0.5637777",
"0.5611924",
"0.55792534",
"0.5555999",
"0.5551433",
"0.5551152",
"0.5542806",
"0.55347884",
"0.5526571",
"0.55262935",
"0.55234325",
"0.5515758",
"0.55147076",
"0.5504218",
"0.5490714",
"0.5490367",
"0.547818",
"0.5473148",
"0.54607046",
"0.54569775",
"0.54565513",
"0.545603",
"0.5451528",
"0.5437024",
"0.5433832",
"0.5430735",
"0.5422795",
"0.5421266",
"0.5419796",
"0.54109526",
"0.54082817",
"0.54059833",
"0.540463",
"0.54016006",
"0.53963184",
"0.53920996"
] | 0.7155972 | 1 |
VALIDATORS IMPORT: label (String) EXPORT: boolean ASSERTION: check if vertices list has the node from label | public boolean hasVertex(String label)
{
boolean sucess = false;
try {
getVertex(label);
sucess = true;
} catch (NoSuchElementException e) {
sucess = false;
}
return sucess;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean findInEdge(String label){\n\t\tfor(Entry<String, LinkedList<Edge>> s: vertices.entrySet()){\n\t\t\tfor(int i=0; i < vertices.get(s.getKey()).size();i++){\n\t\t\t\tif(vertices.get(s.getKey()).get(i).getDLabel().equals(label)){\n\t\t\t\t\tdelEdge(s.getKey(),label);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}",
"public boolean removeVertex(String label)\n\t{\n\t\tif(hasVertex(label)) //if vertex in in list\n\t\t{\n\t\t\tvertices.removeAt(getVertex(label));\n\t\t\t//System.out.println(\"Deleted: \" + label); //debug\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}",
"public boolean addVertex(T vertexLabel);",
"public boolean addVertex(String label)\n\t{\n\t\tif(!hasVertex(label)) //if edge does not already exist add it\n\t\t{\n\t\t\tDSAGraphVertex v = new DSAGraphVertex(label, null);\n\t\t\tvertices.insertLast(v); //inserts into vertices list at end\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}",
"boolean hasIsVertexOf();",
"boolean hasLabel();",
"boolean hasLabel();",
"boolean hasLabel();",
"public boolean canBeFrom(String label);",
"public Vertex(int label) {\r\n isVisited = false;\r\n this.label = label;\r\n }",
"@Override\n\tpublic boolean add(L vertex) {\n\t\tIterator<Vertex<L>> vertexiter = verticelist.iterator();\n\t\twhile (vertexiter.hasNext()) {\n\t\t\tVertex<L> v = vertexiter.next();\n\t\t\tL lab = v.getlabel();\n\t\t\tif (lab.equals(vertex))\n\t\t\t\treturn false;\n\t\t}\n\t\tVertex<L> v = new Vertex<L>(vertex);\n\t\tverticelist.add(v);\n\t\treturn true;\n\t}",
"public boolean isAdjacent(String label1, String label2)\n\t{\n\t\tboolean found = false;\n\t\ttry {\n\t\t\tDSAGraphVertex temp, vx1 = getVertex(label1);\n\t\t\tDSALinkedList adjList = vx1.getAdjacent();\n\t\t\tIterator<DSAGraphVertex> itr = adjList.iterator(); // - Maybe needs to check instance?\n\t\t\tif(!adjList.isEmpty()) // if list is not empty\n\t\t\t{\n\t\t\t\twhile(itr.hasNext()) //iterates until target is found\n\t\t\t\t{\n\t\t\t\t\ttemp = itr.next();\n\t\t\t\t\tif(temp.getLabel().equals(label2))\n\t\t\t\t\t{\n\t\t\t\t\t\tfound = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (NoSuchElementException e) {\n\t\t\t//Handles exception thrown by getVertex()\n\t\t\tfound = false;\n\t\t}\n\t\treturn found;\n\t}",
"public boolean addVertex(String label, Object value)\n\t{\n\t\tif(!hasVertex(label)) //if edge does not already exist add it\n\t\t{\n\t\t\tDSAGraphVertex v = new DSAGraphVertex(label, value);\n\t\t\tvertices.insertLast(v); //inserts into vertices list at end\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}",
"boolean containsVertex(V v);",
"@Override\n\t\tpublic boolean hasLabel(Label label) {\n\t\t\treturn false;\n\t\t}",
"public boolean labelOnOlemassa(String label);",
"boolean contains(Vertex vertex);",
"public boolean contains(N startNode, N endNode, E label)\r\n/* 62: */ {\r\n/* 63:121 */ assert (checkRep());\r\n/* 64:122 */ if ((this.map.containsKey(startNode)) && (this.map.containsKey(endNode))) {\r\n/* 65:123 */ return ((Map)this.map.get(startNode)).get(endNode).equals(label);\r\n/* 66: */ }\r\n/* 67:125 */ return false;\r\n/* 68: */ }",
"public void testContainsVertex() {\n System.out.println(\"containsVertex\");\n\n Graph<Integer, Edge<Integer>> graph = generateGraph();\n\n for (int i = 0; i < 25; i++) {\n Assert.assertTrue(graph.containsVertex(new Integer(i)));\n }\n }",
"boolean contains(int vertex);",
"public boolean pathExists(int startVertex, int stopVertex) {\n// your code here\n ArrayList<Integer> fetch_result = visitAll(startVertex);\n if(fetch_result.contains(stopVertex)){\n return true;\n }\n return false;\n }",
"@Override\r\n public boolean contains(V label) {\r\n return map.containsKey(label);\r\n }",
"boolean exists(String label) throws IOException;",
"boolean addNode(long idNum, String label);",
"public DSAGraphVertex getVertex(String label)\n\t{\n\t\tDSAGraphVertex temp, target = null;\n\t\tIterator<DSAGraphVertex> itr = vertices.iterator();\n\t\tif(vertices.isEmpty()) // case: list is empty\n\t\t{\n\t\t\tthrow new NoSuchElementException(\"Vertices list is empty.\");\n\t\t}\n\t\telse //searches for target\n\t\t{\n\t\t\twhile(itr.hasNext()) //iterates until target is found\n\t\t\t{\n\t\t\t\ttemp = itr.next();\n\t\t\t\tif(temp.getLabel().equals(label))\n\t\t\t\t{\n\t\t\t\t\ttarget = temp;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(target == null) // case: not found\n\t\t{\n\t\t\tthrow new NoSuchElementException(\"Label |\" + label + \"| not found\");\n\t\t}\n\n\t\treturn target;\n\t}",
"public boolean hasEdgeFrom(char v) {\r\n\t\tfor (int i = 0; i < currentVertex.inList.size(); i++) {\r\n\t\t\tNeighbor neighbor = currentVertex.inList.get(i);\r\n\t\t\tif (neighbor.vertex.label == v)\r\n\t\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"@Test\n public void testWithUnknownLabel() throws Exception {\n LogicalGraph socialGraph = getSocialNetworkLoader().getLogicalGraph();\n LogicalGraph result = socialGraph\n .callForGraph(new VertexDeduplication<>(\"NotInTheGraph\", Arrays.asList(\"a\", \"b\")));\n collectAndAssertTrue(socialGraph.equalsByData(result));\n }",
"public boolean hasVertex(T vert);",
"@Test(expected = IllegalLabelException.class)\n\tpublic void testIllegalLabelException() throws Exception {\n\t\tnew GraphPoetFactory().parse(\"Edge=<ab!,WordNeighborhood,1,a,b,Yes>\");\n\t}",
"public boolean isCanonicallyLabelled() {\n this.generateVertexSignatures();\n \n // Sort a copy of the vertex signatures thus keeping the original order. \n List<String> sortedVertexSignatures = new ArrayList<String>();\n sortedVertexSignatures.addAll(this.vertexSignatures);\n Collections.sort(sortedVertexSignatures);\n \n // It has to be the first vertexSignature that corresponds to the graphSignature,\n // otherwise it is impossible that it is the canonical labeling according to our deifinition,\n // ie that the canonical labeling is an icreasing order of vertex ID:s when looking at the graph signature.\n // Check if the vertex ID:s are in increasing order.\n this.graphSignature = sortedVertexSignatures.get(0);\n String vertexSignature = this.vertexSignatures.get(0);\n List<Integer> labels = this.canonicalLabelMapping.get(0);\n boolean canonical = this.graphSignature.equals(vertexSignature);\n if (canonical && isInIncreasingOrder(labels)) {\n \treturn true;\n }\t\n return false;\n \n }",
"@Test\r\n void test_insert_1_vertex_check() {\r\n graph.addVertex(\"1\");\r\n vertices = graph.getAllVertices();\r\n if (!vertices.contains(\"1\"))\r\n fail(\"Insert not working!!\");\r\n }",
"public boolean containsVertex(V vertex);",
"public boolean containsVertex(V vertex);",
"public boolean changeVxLabel(String oldLabel, String newLabel)\n\t{\n\t\tboolean sucess = false;\n\t\ttry {\n\t\t\tDSAGraphVertex vx = getVertex(oldLabel);\n\t\t\tif(!hasVertex(newLabel)) //replace only if new label isn't already taken\n\t\t\t{\n\t\t\t\tvx.label = newLabel;\n\t\t\t\tsucess = true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthrow new IllegalArgumentException(\"|\" + newLabel + \"| already exists\");\n\t\t\t}\n\n\t\t} catch (NoSuchElementException e) {\n\t\t\tthrow new IllegalArgumentException(e.getMessage()); //vx doesn't exist\n\t\t}\n\t\treturn sucess;\n\t}",
"public boolean\nhasNucLabel()\n{\n\tVector labelList = this.getLabelList();\n\tif (labelList == null)\n\t\treturn (false);\n\tif ((labelList.size() <= 0) || (labelList.size() > 2))\n\t\treturn (false);\n\tDrawObject drwObj0 = null;\n\tDrawObject drwObj1 = null;\n\tdrwObj0 = (DrawObject)labelList.elementAt(0);\n\tif (labelList.size() == 2)\n\t\tdrwObj1 = (DrawObject)labelList.elementAt(1);\n\tif ((drwObj1 == null) && (drwObj0 instanceof DrawLineObject))\n\t\treturn (true);\n\tif (drwObj1 == null)\n\t\treturn (false);\n\tif ((drwObj0 instanceof DrawLineObject) && (drwObj1 instanceof DrawStringObject))\n\t{\n\t\ttry\n\t\t{\n\t\t\tint val = Integer.parseInt(((DrawStringObject)drwObj1).getDrawString());\n\t\t}\n\t\tcatch (NumberFormatException e)\n\t\t{\n\t\t\treturn (false);\n\t\t}\n\t\treturn (true);\n\t}\n\tif ((drwObj1 instanceof DrawLineObject) && (drwObj0 instanceof DrawStringObject))\n\t{\n\t\ttry\n\t\t{\n\t\t\tint val = Integer.parseInt(((DrawStringObject)drwObj0).getDrawString());\n\t\t}\n\t\tcatch (NumberFormatException e)\n\t\t{\n\t\t\treturn (false);\n\t\t}\n\t\treturn (true);\n\t}\n\treturn (false);\n}",
"public Vertex(L l) {\n\t\tlabel = l;\n\t}",
"@Test \r\n void create_edge_between_to_nonexisted_vertexes() {\r\n graph.addEdge(\"A\", \"B\");\r\n List<String> adjacentA = graph.getAdjacentVerticesOf(\"A\");\r\n List<String> adjacentB = graph.getAdjacentVerticesOf(\"B\");\r\n if(!adjacentA.contains(\"B\")) { \r\n fail();\r\n }\r\n if(adjacentB.contains(\"A\")) { \r\n fail();\r\n }\r\n }",
"@Override\n public boolean contains(V vertex)\n {\n if (vertex.equals(null)){\n throw new IllegalArgumentException();\n }\n return graph.containsKey(vertex);\n }",
"public boolean hasEdgeTo(char v) {\r\n\t\tfor (int i = 0; i < currentVertex.outList.size(); i++) {\r\n\t\t\tNeighbor neighbor = currentVertex.outList.get(i);\r\n\t\t\tif (neighbor.vertex.label == v)\r\n\t\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"public boolean isVertex( VKeyT key );",
"public static void main(String[] args) {\n graph.addEdge(\"Mumbai\",\"Warangal\");\n graph.addEdge(\"Warangal\",\"Pennsylvania\");\n graph.addEdge(\"Pennsylvania\",\"California\");\n //graph.addEdge(\"Montevideo\",\"Jameka\");\n\n\n String sourceNode = \"Pennsylvania\";\n\n if(graph.isGraphConnected(sourceNode)){\n System.out.println(\"Yes\");\n } else {\n System.out.println(\"No\");\n }\n }",
"private boolean hasLabel(String labelText, String label) {\n boolean result = false;\n if (labelText == null) {\n result = false;\n } else {\n if (labelText.trim().toUpperCase().equals(label)) {\n result = true;\n }\n }\n return result;\n }",
"public Vertex(String label, int index){\n this.label = label;\n this.index = index;\n this.previous = null;\n visited = false;\n }",
"public boolean containsVertex(String node) {\n\t\treturn adj_list.containsKey(node);\n\t}",
"@Test\n public void testConstructTaintFromObjectLabel() {\n Integer label = 5;\n Taint t = Taint.withLabel(label);\n assertTrue(t.containsOnlyLabels(new Object[]{label}));\n }",
"@Test\r\n void test_insert_50_vertex_check() {\r\n String str;\r\n for(int i = 0; i < 50; i++) {\r\n str = \"\" + i;\r\n graph.addVertex(str);\r\n }\r\n vertices = graph.getAllVertices();\r\n for(int j = 0; j < 50; j++) {\r\n str = \"\" + j;\r\n if (!vertices.contains(str))\r\n fail(\"Insert not working!!\");\r\n }\r\n }",
"boolean isNilLabel();",
"public boolean hasLabel()\n {\n return _label.isNotNull();\n }",
"@Test\n public void labelIsValidWithValidPattern() {\n BRole r;\n String[] validLabels = StringUtil.VALID_USERNAME;\n for (String label : validLabels) {\n r = new BRole(label);\n assertTrue(\"Role is not valid with a valid label: \" + label, PersistenceValidation.validate(r).isEmpty());\n }\n }",
"public void addVertex(T vertLabel) {\n\t\tvertCount++;\n\t\tLinkedList[] tempList = new LinkedList[vertCount];\n\t\tLinkedList newVert = new LinkedList((String)vertLabel);\n\t\t\n\t\tif(verts.length==0){\n\t\t\ttempList[0] = newVert;\n\t\t}\n\t\t\n\t\telse{\n\t\t\tfor(int x=0; x<verts.length; x++){\n\t\t\t\t\ttempList[x] = verts[x];\n\t\t\t}\n\t\t\ttempList[verts.length] = newVert;\n\t\t}\n\tverts = tempList;\n }",
"public abstract ArrayList<String> neighbours(String vertLabel);",
"public boolean containsVertex (E vertex)\n {\n return this.indexOf(vertex) != -1;\n }",
"boolean isSetLabel();",
"@Test\n void test01_addVertex() {\n graph.addVertex(\"a\");\n graph.addVertex(\"b\"); // adds two vertices\n\n Set<String> vertices = new LinkedHashSet<>();\n vertices.add(\"a\");\n vertices.add(\"b\"); // creates a check list to compare with\n\n if (!graph.getAllVertices().equals(vertices)) {\n fail(\"Graph didn't add the vertices correctly\");\n }\n }",
"public boolean hasVertex(String name) {\n return mVertices.containsKey(name);\n }",
"void addIsVertexOf(Subdomain_group newIsVertexOf);",
"public TransactionBuilder checkInternalVertexExistence();",
"@Test\r\n void remove_nonexistent_vertex() {\r\n graph.addEdge(\"A\", \"B\");\r\n graph.addEdge(\"B\", \"C\");\r\n graph.removeVertex(\"D\");\r\n List<String> adjacent;\r\n vertices = graph.getAllVertices(); \r\n // Check that graph has all added vertexes\r\n if(!vertices.contains(\"A\")| !vertices.contains(\"B\")|\r\n !vertices.contains(\"C\")) {\r\n fail();\r\n }\r\n adjacent = graph.getAdjacentVerticesOf(\"A\");\r\n if (!adjacent.contains(\"B\"))\r\n fail();\r\n adjacent = graph.getAdjacentVerticesOf(\"B\");\r\n if (!adjacent.contains(\"C\"))\r\n fail();\r\n \r\n }",
"boolean hasNodeId();",
"@Override\n\tpublic boolean contains(Object vertex) {\n\t\treturn vertices.contains(vertex);\n\t}",
"public boolean containsVertex(Vertex vertex)\n\t{\n\t\treturn this.vertices.get(vertex.getLabel()) != null;\n\t}",
"@Override\n\tpublic boolean containsVertex(Object value) \n\t{\n\t\treturn (this.map.containsKey(value));\n\t}",
"@Override\r\n\tpublic boolean containsActor(String v)\r\n\t{\r\n\t\tActor actor = new Actor(v);\r\n\r\n\t\tif(graph.containsVertex(actor))\r\n\t\t{\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"public boolean validate(Graph<V,E> graph) {\n\t\treturn (pos != null);\n\t}",
"boolean contains(Edge edge);",
"private boolean checkLabelSymbols(String label) {\n return label.indexOf(',') == -1 &&\n label.indexOf(' ') == -1 && \n label.indexOf('(') == -1 &&\n label.indexOf(')') == -1;\n }",
"public boolean isAdjacent(int from, int to) {\n//your code here\n// LinkedList<Edge> list = adjLists[from];\n// for (Edge a : list) {\n// if(a.from()==from&&a.to()==to){\n// return true;\n// }\n// };\n// return false;\n return pathExists(from, to);\n }",
"public boolean containsEdge(V head, V tail);",
"public boolean foiChecado(Vertice v){\n int i = v.label;\n return vertices[i];\n }",
"boolean hasIsNodeOf();",
"@Test\r\n public void testVertices() {\r\n System.out.println(\"vertices\");\r\n MyDigraph instance = new MyDigraph();\r\n\r\n Object v1Element = 1;\r\n Vertex v1 = instance.insertVertex(v1Element);\r\n\r\n Collection colection = instance.vertices();\r\n boolean result = colection.contains(v1);\r\n boolean expectedResult = true;\r\n assertEquals(expectedResult, result);\r\n\r\n instance.removeVertex(v1);\r\n result = colection.contains(v1);\r\n expectedResult = false;\r\n assertEquals(expectedResult, result);\r\n }",
"boolean hasCustomerLabel();",
"@Test\n\tvoid testIfAdjacentNodeExists() {\n\t\tMap<String, LinkedHashSet<String>> map = new HashMap<String, LinkedHashSet<String>>();\n\t\tLinkedHashSet<String> edges = new LinkedHashSet<String>();\n\t\tedges.add(\"New York\");\n\t\tmap.put(\"Boston\", edges);\n\t\tOptional<LinkedHashSet<String>> vertexOptional = Optional.of(map.get(\"Boston\"));\n\t\tif (vertexOptional.isPresent()) {\n\t\t\tAssertions.assertNotNull(map.get(\"Boston\"));\n\t\t\tAssertions.assertEquals(1, map.get(\"Boston\").size());\n\t\t\tString[] edgesArray = new String[edges.size()];\n\t\t\tedgesArray = edges.toArray(edgesArray);\n\t\t\tAssertions.assertTrue(map.get(\"Boston\").contains(\"New York\"));\n\t\t\tAssertions.assertEquals(\"New York\", edgesArray[0]);\n\t\t}\n\n\t}",
"public void removeVertex(String vertLabel) {\n\n // Implement me!\n if (indexOf(vertLabel, vertices) <0) {\n return;\n }\n vertices.remove(vertLabel);\n Iterator<String> iterator = edges.keySet().iterator();\n while (iterator.hasNext()) {\n String k = iterator.next();\n if (k.contains(vertLabel)) {\n iterator.remove();\n edges.remove(k);\n }\n }\n }",
"public static boolean verifyGraph(Graph<V, DefaultEdge> g)\n {\n V start = g.vertexSet().stream().filter(V -> V.getID().equals(\"0\")).findAny().orElse(null);\n Iterator<V> iterator = new DepthFirstIterator<>(g, start);\n while (iterator.hasNext()) {\n V v = iterator.next();\n if (v.color == -1)\n {\n System.out.println(\"Did not color vertex \" + v.getID());\n System.out.println(\"check neighbors of \" + v.getID());\n List<V> neighbors = Graphs.neighborListOf(g, v);\n System.out.println(\"Vertex \" + v.getID() + \" color: \" + v.color);\n for (V neighbor : neighbors)\n {\n System.out.println(\"neighbor \" + neighbor.getID() + \" color: \" + neighbor.color);\n }\n return false;\n }\n if (!verifyColor(g, v))\n {\n System.out.println(\"check neighbors of \" + v.getID());\n List<V> neighbors = Graphs.neighborListOf(g, v);\n for (V neighbor : neighbors)\n {\n if (v.color == neighbor.color)\n {\n System.out.println(\"Vertex \" + v.getID() + \" color: \" + v.color);\n System.out.println(\"neighbor \" + neighbor.getID() + \" color: \" + neighbor.color);\n }\n }\n return false;\n }\n }\n return true;\n }",
"boolean addVertex(V v);",
"@Test\n void testAddVertexGraph() {\n Assertions.assertTrue(graph.addVertex(v1));\n Assertions.assertTrue(graph.containsVertex(v1));\n Assertions.assertTrue(checkInv());\n }",
"public void addVertex(String vertLabel) {\n\n // Implement me!\n if (indexOf(vertLabel, vertices) != -1) {\n return;\n }\n vertices.put(vertLabel, vertices.size());\n if (weights.length == 0) {\n weights = new int[1][0];\n } else {\n weights = addOneRow(weights);\n }\n\n\n }",
"boolean ignoreExistingVertices();",
"private int findVertIndex(T vertLabel) {\n ArrayList<T> labelRow = matrix.get(0);\n int vertIndex;\n if ((vertIndex = labelRow.indexOf(vertLabel)) == -1) {\n // System.out.println(\"Error: Vertex '\" + vertLabel + \"' does not exist in the matrix\");\n return -1;\n }\n vertIndex += 1; //Add 1 to account for the label cell\n return vertIndex;\n }",
"public boolean pathExists(int startVertex, int stopVertex) {\n // your code here\n \tIterator iter = new DFSIterator(startVertex);\n \tInteger i = stopVertex;\n \twhile (iter.hasNext()) {\n \t\tif (iter.next().equals(i)) {\n \t\t\treturn true;\n \t\t}\n \t}\n return false;\n }",
"protected GraphSubEdge (Object label)\n {\n this.label = label;\n mark = false;\n }",
"private boolean checkNextField () {\n lineHasLabel = false;\n if (! endOfText()) {\n labelEnd = blockIn.indexOf (LABEL_SUFFIX, lineStart);\n if (labelEnd >= 0) {\n label = blockIn.substring (lineStart, labelEnd).trim();\n labelStart = labels.indexOf (label);\n if (labelStart >= 0) {\n lineHasLabel = true;\n }\n }\n }\n return lineHasLabel;\n }",
"@Test\n void test03_addEdgeBetweenVerticesWhichDontExist() {\n graph.addEdge(\"a\", \"b\");\n Set<String> vertices = new LinkedHashSet<>();\n vertices.add(\"a\");\n vertices.add(\"b\"); // creates mock up vertex list\n if (!graph.getAllVertices().equals(vertices)) { // compares vertices list\n fail(\"Graph didn't add the vertices correctly\");\n }\n List<String> adjOfA = new ArrayList<>();\n adjOfA.add(\"b\"); // creates mock up adjacent list\n if (!graph.getAdjacentVerticesOf(\"a\").equals(adjOfA)) { // compares adjacent lists\n fail(\"Graph didn't correctly place adjacent vertices\");\n }\n }",
"@Test\n public void getlabelTest() {\n \tVertex<String> v=new Vertex<String>(\"v\");\n \tassertEquals(\"v\", v.getlabel());\n }",
"public DSAGraphVertex(String inLabel, Object inValue)\n\t\t{\n\t\t\tlabel = inLabel;\n\t\t\tvalue = inValue;\n\t\t\tlinks = new DSALinkedList();\n\t\t\tvisited = false;\n\t\t}",
"@Test\n public void testConstructTaintFromIntLabel() {\n int label = 5;\n Taint t = Taint.withLabel(label);\n assertTrue(t.containsOnlyLabels(new Object[]{label}));\n }",
"boolean containsLabels(java.lang.String key);",
"boolean containsLabels(java.lang.String key);",
"boolean containsLabels(java.lang.String key);",
"boolean containsLabels(java.lang.String key);",
"@Test \r\n void insert_two_vertexs_then_create_edge(){\r\n graph.addVertex(\"A\");\r\n graph.addVertex(\"B\");\r\n graph.addEdge(\"A\", \"B\");\r\n List<String> adjacentA = graph.getAdjacentVerticesOf(\"A\");\r\n List<String> adjacentB = graph.getAdjacentVerticesOf(\"B\");\r\n if(!adjacentA.contains(\"B\")) { \r\n fail();\r\n }\r\n if(adjacentB.contains(\"A\")) { \r\n fail();\r\n }\r\n }",
"public boolean containsEdge(V source, V target);",
"boolean containsKey(String keyLabel);",
"public boolean isLabelProperty(Object arg0, String arg1) {\n\t\t\t\treturn false;\r\n\t\t\t\t\r\n\t\t\t}",
"public boolean containsObjectLabel(ObjectLabel objlabel) {\n return (object_labels != null && object_labels.contains(objlabel)) ||\n (getters != null && getters.contains(objlabel)) ||\n (setters != null && setters.contains(objlabel));\n }",
"@Override public boolean add(L vertex) {\r\n \r\n \tif(vertices.contains(vertex)==false)\r\n \t{\r\n \tvertices.add(vertex);\r\n \tcheckRep();\r\n \treturn true;\r\n }\r\n else {\r\n \t\r\n \treturn false;\r\n }\r\n \t\r\n }",
"@Override\n public boolean hasEdge(V from, V to)\n {\n if (from.equals(null) || to.equals(null)){\n throw new IllegalArgumentException();\n }\n if (!contains(from)){\n return false;\n }\n else{\n Iterator graphIterator = graph.entrySet().iterator();\n Map.Entry graphElement = (Map.Entry) graphIterator.next();\n V vert = (V) graphElement.getKey();\n while (graphIterator.hasNext() && vert != from){\n graphElement = (Map.Entry) graphIterator.next();\n vert = (V)graphElement.getKey();\n }\n\t ArrayList <V> edges = graph.get(vert);\n\t return edges.contains(to);\n\t }\n }",
"@Override\n\tpublic boolean isLabelProperty(Object arg0, String arg1) {\n\t\treturn false;\n\t}",
"@Test(timeout = 5000)\n public void testAddlabelWithExclusivity() throws Exception {\n mgr.addToCluserNodeLabels(Arrays.asList(NodeLabel.newInstance(\"a\", false), NodeLabel.newInstance(\"b\", true)));\n Assert.assertFalse(isExclusiveNodeLabel(\"a\"));\n Assert.assertTrue(isExclusiveNodeLabel(\"b\"));\n }"
] | [
"0.68062735",
"0.66939074",
"0.66790336",
"0.63765895",
"0.62865645",
"0.6283735",
"0.6283735",
"0.6283735",
"0.61667013",
"0.6120259",
"0.61003613",
"0.6043857",
"0.601766",
"0.59931374",
"0.59671915",
"0.5910832",
"0.5892385",
"0.5837704",
"0.5823405",
"0.5770058",
"0.5765577",
"0.57496846",
"0.5748306",
"0.5715423",
"0.5707191",
"0.5685767",
"0.5658677",
"0.56212646",
"0.56046927",
"0.55892485",
"0.5581443",
"0.5571129",
"0.5571129",
"0.55397683",
"0.5539705",
"0.55021524",
"0.5497293",
"0.5472584",
"0.5464283",
"0.54618686",
"0.5451428",
"0.54514134",
"0.54234624",
"0.5422594",
"0.54164654",
"0.5398624",
"0.5395756",
"0.53882813",
"0.5382438",
"0.5363801",
"0.535407",
"0.5345341",
"0.53209877",
"0.53127676",
"0.53086704",
"0.5289698",
"0.5286086",
"0.527035",
"0.52365583",
"0.5230247",
"0.5229544",
"0.52037245",
"0.5188669",
"0.51839256",
"0.5173652",
"0.5168969",
"0.5162349",
"0.51576453",
"0.5156597",
"0.5155925",
"0.51406103",
"0.513802",
"0.51322293",
"0.51279825",
"0.5127678",
"0.5126441",
"0.51194227",
"0.51163083",
"0.511405",
"0.5096511",
"0.50851274",
"0.50795764",
"0.5079189",
"0.50762475",
"0.5076178",
"0.50744027",
"0.50719213",
"0.50662905",
"0.50662905",
"0.50662905",
"0.50662905",
"0.50491446",
"0.5047651",
"0.50442415",
"0.5036268",
"0.50323296",
"0.5031674",
"0.50300103",
"0.5020311",
"0.5018798"
] | 0.7424968 | 0 |
IMPORT: label (String) EXPORT: bool (DSALinkedList) ASSERTION: checks if two nodes are adjacent (if an edge exists) returns true if it does | public boolean isAdjacent(String label1, String label2)
{
boolean found = false;
try {
DSAGraphVertex temp, vx1 = getVertex(label1);
DSALinkedList adjList = vx1.getAdjacent();
Iterator<DSAGraphVertex> itr = adjList.iterator(); // - Maybe needs to check instance?
if(!adjList.isEmpty()) // if list is not empty
{
while(itr.hasNext()) //iterates until target is found
{
temp = itr.next();
if(temp.getLabel().equals(label2))
{
found = true;
}
}
}
} catch (NoSuchElementException e) {
//Handles exception thrown by getVertex()
found = false;
}
return found;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean isAdjacent(int from, int to) {\n//your code here\n// LinkedList<Edge> list = adjLists[from];\n// for (Edge a : list) {\n// if(a.from()==from&&a.to()==to){\n// return true;\n// }\n// };\n// return false;\n return pathExists(from, to);\n }",
"@Test \r\n void create_edge_between_to_nonexisted_vertexes() {\r\n graph.addEdge(\"A\", \"B\");\r\n List<String> adjacentA = graph.getAdjacentVerticesOf(\"A\");\r\n List<String> adjacentB = graph.getAdjacentVerticesOf(\"B\");\r\n if(!adjacentA.contains(\"B\")) { \r\n fail();\r\n }\r\n if(adjacentB.contains(\"A\")) { \r\n fail();\r\n }\r\n }",
"public boolean isAdjacentTo(final Vertex other){\n\t\tboolean result = false;\n\t\tif(getNeighbours().contains(other))\n\t\t\tresult = true;\n\t\treturn result;\n\t}",
"public abstract boolean isConnectedInDirection(N n1, E edgeValue, N n2);",
"private boolean adjacent(Location a, Location b)\n {\n for (Location loc: getAdjacentLocations(a))\n {\n if (loc.equals(b))\n return true;\n }\n return false;\n }",
"@Test\n void test08_getAllAdjacentVertices() {\n graph.addEdge(\"a\", \"b\");\n graph.addEdge(\"a\", \"c\"); // add two edges\n\n List<String> check = new ArrayList<>();\n check.add(\"b\");\n check.add(\"c\"); // create mock up adjacent list\n\n if (!check.equals(graph.getAdjacentVerticesOf(\"a\"))) { // checks if both are same\n fail(\"graph didn't record adjacent vertices correctly\");\n }\n }",
"boolean isDirected();",
"@Test\r\n public void testAreAdjacent() {\r\n System.out.println(\"areAdjacent\");\r\n MyDigraph instance = new MyDigraph();\r\n\r\n Object v1Element = 1;\r\n Object v2Element = 2;\r\n\r\n Vertex v1 = instance.insertVertex(v1Element);\r\n Vertex v2 = instance.insertVertex(v2Element);\r\n\r\n Object edgeElement = \"A\";\r\n Edge e = instance.insertEdge(v1, v2, edgeElement);\r\n\r\n Object result = instance.areAdjacent(v1, v2);\r\n Object expectedResult = true;\r\n assertEquals(expectedResult, result);\r\n }",
"@Test \r\n void insert_two_vertexs_then_create_edge(){\r\n graph.addVertex(\"A\");\r\n graph.addVertex(\"B\");\r\n graph.addEdge(\"A\", \"B\");\r\n List<String> adjacentA = graph.getAdjacentVerticesOf(\"A\");\r\n List<String> adjacentB = graph.getAdjacentVerticesOf(\"B\");\r\n if(!adjacentA.contains(\"B\")) { \r\n fail();\r\n }\r\n if(adjacentB.contains(\"A\")) { \r\n fail();\r\n }\r\n }",
"public abstract boolean hasEdge(int from, int to);",
"public boolean isDirected();",
"public boolean isDirected();",
"public boolean addEdge(String label1, String label2)\n\t{\n\t\tif(!isAdjacent(label1, label2)) //if edge does not already exist add it\n\t\t{\n\t\t\tDSAGraphVertex vx1 = getVertex(label1), vx2 = getVertex(label2);\n\t\t\tvx1.addEdge(vx2);\n\t\t\tvx2.addEdge(vx1);\n\t\t\tedgeCount++;\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}",
"public abstract boolean isConnectedInDirection(N n1, N n2);",
"public boolean areAdjacent(Node u, Node v) throws GraphException\n\t{\n\t\tif (u.getName() >= nodeList.length || v.getName() >= nodeList.length ||\n\t\t\t\tnodeList[u.getName()] == null || nodeList[v.getName()] == null)\n\t\t\tthrow new GraphException(\"Node not found.\");\n\t\t\n\t\tif (adjMatrix[u.getName()][v.getName()] == null)\n\t\t\treturn false;\n\t\telse\n\t\t\treturn true;\n\t}",
"public boolean isAdjacent(int from, int to) {\r\n LinkedList<Edge> testList = myAdjLists[from];\r\n int counter = 0;\r\n while (counter < testList.size()) {\r\n \tif (testList.get(counter).myTo == to) {\r\n \t\treturn true;\r\n \t}\r\n \tcounter++;\r\n }\r\n return false;\r\n }",
"public boolean isAdjacent(int from, int to) {\n //your code here\n \tfor (Edge e : myAdjLists[from]) {\n \t\tif (e.to() == to) {\n \t\t\treturn true;\n \t\t}\n \t}\n return false;\n }",
"public boolean areAdjacent() {\n return areAdjacent;\n }",
"@Override\n public boolean isAdjacent(E vertex1, E vertex2) {\n if (vertex1 != null\n && vertex2 != null\n && vertex1 != vertex2\n && dictionary.containsKey(vertex1)\n && dictionary.containsKey(vertex2)) {\n return dictionary.get(vertex1).contains(vertex2) && dictionary.get(vertex2).contains(vertex1);\n } else {\n return false;\n }\n }",
"public static void main(String[] args) {\n graph.addEdge(\"Mumbai\",\"Warangal\");\n graph.addEdge(\"Warangal\",\"Pennsylvania\");\n graph.addEdge(\"Pennsylvania\",\"California\");\n //graph.addEdge(\"Montevideo\",\"Jameka\");\n\n\n String sourceNode = \"Pennsylvania\";\n\n if(graph.isGraphConnected(sourceNode)){\n System.out.println(\"Yes\");\n } else {\n System.out.println(\"No\");\n }\n }",
"@Test\n void test03_addEdgeBetweenVerticesWhichDontExist() {\n graph.addEdge(\"a\", \"b\");\n Set<String> vertices = new LinkedHashSet<>();\n vertices.add(\"a\");\n vertices.add(\"b\"); // creates mock up vertex list\n if (!graph.getAllVertices().equals(vertices)) { // compares vertices list\n fail(\"Graph didn't add the vertices correctly\");\n }\n List<String> adjOfA = new ArrayList<>();\n adjOfA.add(\"b\"); // creates mock up adjacent list\n if (!graph.getAdjacentVerticesOf(\"a\").equals(adjOfA)) { // compares adjacent lists\n fail(\"Graph didn't correctly place adjacent vertices\");\n }\n }",
"@Override\n\tpublic boolean isConnected() {\n\t\tif(this.GA.nodeSize() ==1 || this.GA.nodeSize()==0) return true;\n\t\tgraph copied = this.copy();\n\t\ttagZero(copied);\n\t\tCollection<node_data> s = copied.getV();\n\t\tIterator it = s.iterator();\n\t\tnode_data temp = (node_data) it.next();\n\t\tDFSUtil(copied,temp);\n\t\tfor (node_data node : s) {\n\t\t\tif (node.getTag() == 0) return false;\n\t\t}\n\t\ttransPose(copied);\n\t\ttagZero(copied);\n\t Collection<node_data> s1 = copied.getV();\n\t\tIterator it1 = s1.iterator();\n\t\tnode_data temp1 = (node_data) it1.next();\n\t\tDFSUtil(copied,temp1);\n\t\tfor (node_data node1 : s1) {\n\t\t\tif (node1.getTag() == 0) return false;\n\t\t}\n\n\t\treturn true;\n\t}",
"public abstract boolean getEdge(Point a, Point b);",
"@Test\r\n void create_edge_between_null_vertexes() {\r\n graph.addEdge(null, \"B\");\r\n graph.addEdge(\"A\", null);\r\n graph.addEdge(null, null);\r\n vertices = graph.getAllVertices();\r\n List<String> adjacentA = graph.getAdjacentVerticesOf(\"A\");\r\n List<String> adjacentB = graph.getAdjacentVerticesOf(\"B\");\r\n if(!vertices.isEmpty() | !adjacentA.isEmpty() | !adjacentB.isEmpty()) {\r\n fail();\r\n } \r\n }",
"public abstract boolean isConnected(N n1, E e, N n2);",
"public abstract boolean isUsing(Edge graphEdge);",
"public boolean areAdjacent(Node n1, Node n2, Direction direction) {\n return areAdjacent(n1, n2);\n }",
"@Test\r\n void test_insert_same_edge_twice() {\r\n // Add two vertices with one edge\r\n graph.addEdge(\"A\", \"B\");\r\n graph.addEdge(\"A\", \"B\");\r\n if (graph.size() != 1) {\r\n fail();\r\n }\r\n if (!graph.getAdjacentVerticesOf(\"A\").contains(\"B\")) {\r\n fail();\r\n }\r\n\r\n }",
"@Override\n\tpublic boolean isConnected() {\n\t\tif(dwg.getV().size()==0) return true;\n\n\t\tIterator<node_data> temp = dwg.getV().iterator();\n\t\twhile(temp.hasNext()) {\n\t\t\tfor(node_data w : dwg.getV()) {\n\t\t\t\tw.setTag(0);\n\t\t\t}\n\t\t\tnode_data n = temp.next();\n\t\t\tQueue<node_data> q = new LinkedBlockingQueue<node_data>();\n\t\t\tn.setTag(1);\n\t\t\tq.add(n);\n\t\t\twhile(!q.isEmpty()) {\n\t\t\t\tnode_data v = q.poll();\n\t\t\t\tCollection<edge_data> arrE = dwg.getE(v.getKey());\n\t\t\t\tfor(edge_data e : arrE) {\n\t\t\t\t\tint keyU = e.getDest();\n\t\t\t\t\tnode_data u = dwg.getNode(keyU);\n\t\t\t\t\tif(u.getTag() == 0) {\n\t\t\t\t\t\tu.setTag(1);\n\t\t\t\t\t\tq.add(u);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tv.setTag(2);\n\t\t\t}\n\t\t\tCollection<node_data> col = dwg.getV();\n\t\t\tfor(node_data n1 : col) {\n\t\t\t\tif(n1.getTag() != 2) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}",
"public DSALinkedList getAdjacent(String label)\n\t{\n\t\tDSAGraphVertex vx = getVertex(label);\n\t\treturn vx.getAdjacent();\n\t}",
"public boolean isDirected(Position ep) throws InvalidPositionException;",
"public boolean hasEdge(int node1, int node2)\n{\n\tNode s=(Node)this.getNodes().get(node1);\n return s.hasNi(node2);\n\t\n}",
"public abstract boolean isConnected(N n1, N n2);",
"@Override\n public boolean isConnected() { //i got help from the site https://www.geeksforgeeks.org/shortest-path-unweighted-graph/\n if(this.ga.edgeSize()<this.ga.nodeSize()-1) return false;\n initializeInfo();//initialize all the info fields to be null for the algorithm to work\n if(this.ga.nodeSize()==0||this.ga.nodeSize()==1) return true;//if there is not node or one its connected\n WGraph_DS copy = (WGraph_DS) (copy());//create a copy graph that the algorithm will on it\n LinkedList<node_info> qValues = new LinkedList<>();//create linked list that will storage all nodes that we didn't visit yet\n int firstNodeKey = copy.getV().iterator().next().getKey();//first key for get the first node(its doesnt matter which node\n node_info first = copy.getNode(firstNodeKey);//get the node\n qValues.add(first);//without limiting generality taking the last node added to graph\n int counterVisitedNodes = 0;//counter the times we change info of node to \"visited\"\n while (qValues.size() != 0) {\n node_info current = qValues.removeFirst();\n if (current.getInfo() != null) continue;//if we visit we can skip to the next loop because we have already marked\n current.setInfo(\"visited\");//remark the info\n counterVisitedNodes++;\n\n Collection<node_info> listNeighbors = copy.getV(current.getKey());//create a collection for the neighbors list\n LinkedList<node_info> Neighbors = new LinkedList<>(listNeighbors);//create the neighbors list\n if (Neighbors == null) continue;\n for (node_info n : Neighbors) {\n if (n.getInfo() == null) {//if there is a node we didn't visited it yet, we will insert it to the linkedList\n qValues.add(n);\n }\n }\n }\n if (this.ga.nodeSize() != counterVisitedNodes) return false;//check that we visited all of the nodes\n\n return true;\n }",
"public boolean isConnected(String node1, String node2) {\r\n\r\n Set<String> adjacent = map.get(node1);\r\n if (adjacent == null) {\r\n return false; // boolean method should return a value; if adjacent node is null then the method return false\r\n }\r\n return adjacent.contains(node2); // if there exist adjacent node then returns adjacency list contains node2 \r\n }",
"public boolean addConnection(GraphNode nodeA, GraphNode nodeB){\n nodeA.addAdjacent(nodeB);\n nodeB.addAdjacent(nodeA);\n if(nodeA.getAdjacent().contains(nodeB) && nodeB.getAdjacent().contains(nodeA))\n return true;\n else\n return false;\n }",
"@Override\r\n public boolean isConnected(V start, V destination) {\r\n return !shortestPath(start, destination).isEmpty();\r\n }",
"public boolean containsEdge(V source, V target);",
"public boolean hasEdge(T beg, T end);",
"public int checkEdgeDirection(Object src, Object dest)\n\t{\t\t\n\t\tif(this.map.get(src).contains(dest) && !this.map.get(dest).contains(src))\n\t\t\treturn 1;\n\t\telse if(this.map.get(src).contains(dest) && this.map.get(dest).contains(src))\n\t\t\treturn 2;\n\t\treturn 0;\n\t}",
"@Test\n\tvoid testIfAdjacentNodeExists() {\n\t\tMap<String, LinkedHashSet<String>> map = new HashMap<String, LinkedHashSet<String>>();\n\t\tLinkedHashSet<String> edges = new LinkedHashSet<String>();\n\t\tedges.add(\"New York\");\n\t\tmap.put(\"Boston\", edges);\n\t\tOptional<LinkedHashSet<String>> vertexOptional = Optional.of(map.get(\"Boston\"));\n\t\tif (vertexOptional.isPresent()) {\n\t\t\tAssertions.assertNotNull(map.get(\"Boston\"));\n\t\t\tAssertions.assertEquals(1, map.get(\"Boston\").size());\n\t\t\tString[] edgesArray = new String[edges.size()];\n\t\t\tedgesArray = edges.toArray(edgesArray);\n\t\t\tAssertions.assertTrue(map.get(\"Boston\").contains(\"New York\"));\n\t\t\tAssertions.assertEquals(\"New York\", edgesArray[0]);\n\t\t}\n\n\t}",
"private boolean isEdge(Node node) {\n for (Node n: nodes){\n if(!node.equals(n)) {\n for(Edge e:n.getEdges()){\n if(e.getDestination().equals(node)) {\n return true;\n }\n }\n }\n }\n return false;\n }",
"public boolean findInEdge(String label){\n\t\tfor(Entry<String, LinkedList<Edge>> s: vertices.entrySet()){\n\t\t\tfor(int i=0; i < vertices.get(s.getKey()).size();i++){\n\t\t\t\tif(vertices.get(s.getKey()).get(i).getDLabel().equals(label)){\n\t\t\t\t\tdelEdge(s.getKey(),label);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}",
"public boolean isAdjacent(Country country){\n return adjList.contains(country);\n }",
"@Override\r\n\tpublic boolean connect(VertexInterface<T> endVertex) {\n\t\treturn false;\r\n\t}",
"public static boolean areAdjacent(HantoCoordinate from, HantoCoordinate to){\n\n\t\treturn HantoUtil.getAllNeighbors(from).contains(to);\n\t}",
"void addDirectedEdge(final Node first, final Node second)\n {\n if ( first == second )\n {\n return;\n }\n else if (first.connectedNodes.contains(second))\n return;\n else\n first.connectedNodes.add(second);\n }",
"public boolean addEdge(Edge e) {\n return g.addNode(e.getSrc())&&g.addNode(e.getDst())&&g.addEdge(e.getSrc(),e.getDst());\n }",
"public boolean hasEdge(T begin, T end);",
"public void testContainsEdge() {\n System.out.println(\"containsEdge\");\n\n Graph<Integer, Edge<Integer>> graph = generateGraph();\n\n for (int i = 0; i < 25; i++) {\n for (int j = 0; j < 25; j++) {\n if ((i + j) % 2 != 0) {\n Assert.assertFalse(graph.containsEdge(new Integer(i), new Integer(j)));\n } else {\n Assert.assertTrue(graph.containsEdge(new Integer(i), new Integer(j)));\n }\n }\n }\n\n }",
"@Override\r\n public boolean edgeExists(Vertex v1, Vertex v2) {\r\n return adjacencyList.get(v1).contains(v2); //checking if the list of adjacent vertices contains v2\r\n }",
"public boolean isAdjacent(int firstID, int secondID) {\n\t\tfor( int i : Constants.ADJACENT[firstID]) {\n\t\t\tif(i == secondID)\n\t\t\t\treturn true;\n\t\t}\t\n\t\treturn false;\n\t}",
"public boolean reachable(Vertex start, Vertex end){\n\t\tSet<Vertex> reach = this.post(start); \n\t\treturn reach.contains(end);\n\t}",
"public boolean inSamePseudoNode(Edge e) {\n\t\tthrow new RuntimeException(\"Unimplemented\");\r\n\t}",
"public boolean removeEdge(String label1, String label2)\n\t{\n\t\tif(isAdjacent(label1, label2)) //if edge exists remove it\n\t\t{\n\t\t\tDSAGraphVertex vx1 = getVertex(label1), vx2 = getVertex(label2);\n\t\t\tvx1.removeEdge(vx2);\n\t\t\tvx2.removeEdge(vx1);\n\t\t\tedgeCount--;\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}",
"public boolean containsEdge(V head, V tail);",
"@Test\r\n void test_remove_same_edge_twice() {\r\n // Add two vertices with one edge\r\n graph.addEdge(\"A\", \"B\");\r\n graph.addEdge(\"A\", \"C\");\r\n graph.removeEdge(\"A\", \"B\");\r\n graph.removeEdge(\"A\", \"B\");\r\n if (graph.size() != 1) {\r\n fail();\r\n }\r\n if (graph.getAdjacentVerticesOf(\"A\").contains(\"B\")) {\r\n fail();\r\n } \r\n }",
"public boolean isAdjacentTo(StandardCoordinate where) {\n\t\treturn where.getAdjacencyList().contains(this);\n\t}",
"@Override\r\n\tpublic boolean isConnected(GraphStructure graph) {\r\n\t\tgetDepthFirstSearchTraversal(graph);\r\n\t\tif(pathList.size()==graph.getNumberOfVertices()) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"@Test\n public void tr2()\n {\n Graph graph = new Graph(2);\n Set<Integer> sources = new TreeSet<Integer>();\n Set<Integer> targets = new TreeSet<Integer>();\n sources.add(0);\n targets.add(1);\n graph.addEdge(0,1);\n assertTrue(graph.reachable(sources, targets));\n\n\n }",
"default boolean isEdge(int x, int y) {\n return getNeighbors(x).contains(y);\n }",
"public abstract boolean isNextVisited();",
"public Boolean addEdge( AnyType vertex_value_A, AnyType vertex_value_B ) throws VertexException {\n \n // ------------------------------------\n // Basic steps:\n // ------------------------------------\n // 1) For Vertex A and B, check to see if the vertex exits in the \n // vertex_adjacency_list. If not, then add new vertex (with given \n // value) to the vertex_adjacency_list.\n // 2) In Vertex class, check if Vertex B is in Vertex A's \n // adjacent_vertex_list and vice versa (i.e. an edge exists). If \n // edge already exists, then return false, otherwise goto step 3.\n // 3) Add Vertex B to Vertex A's adjacent_vertex_list and vice versa.\n // Lastly, return true indicating the edge was successfully added.\n \n // ----------------------------\n // TODO: Add your code here\n // ----------------------------\n boolean a_in_list = false;\n boolean b_in_list = false;\n boolean edge = false;\n int size = vertex_adjacency_list.size();\n int a = -1;\n int b = -1;\n \n //make new vertices with values passed in\n Vertex<AnyType> A = new Vertex<AnyType>(vertex_value_A);\n Vertex<AnyType> B = new Vertex<AnyType>(vertex_value_B);\n //check if they are in the list\n for(int i = 0; i<= size-1; i++){\n if( vertex_adjacency_list.get(i).compareTo( A) == 0){\n a_in_list = true;\n a = i;\n \n }\n if( vertex_adjacency_list.get(i).compareTo(B) == 0){\n b_in_list = true;\n b = i;\n \n }\n }\n //if not in list, add\n if( a_in_list == false){\n vertex_adjacency_list.add(A);\n a_in_list = true;\n a = vertex_adjacency_list.size()-1;\n }\n if( b_in_list == false){\n vertex_adjacency_list.add(B);\n b_in_list =true;\n b = vertex_adjacency_list.size()-1;\n }\n //check if edge\n edge = vertex_adjacency_list.get(a).hasAdjacentVertex(vertex_adjacency_list.get(b));\n //if edge then add to list \n if( a_in_list == true && b_in_list == true){\n if(edge){\n return edge;\n }\n else{\n vertex_adjacency_list.get(a).addAdjacentVertex(vertex_adjacency_list.get(b));\n vertex_adjacency_list.get(b).addAdjacentVertex(vertex_adjacency_list.get(a));\n edge = true;\n }\n }\n return edge;\n \n }",
"public boolean hasEdge(Node source, Node destination) {\n LinkedList<Edge> edges = source.getEdges();\n for (Edge edge : edges) {\n if (edge.getDestination() == destination) {\n return true;\n }\n }\n return false;\n }",
"public boolean leadsToDestination(int n, int[][] edges, int source, int destination) {\n List<Integer>[] G = (List<Integer>[]) new List[n];\n for (int i = 0; i < n; i++) G[i] = new ArrayList();\n for (int[] edge : edges) {\n int s = edge[0], t = edge[1];\n G[s].add(t);\n }\n\n // use dfs to check condition\n Set<Integer> visited = new HashSet();\n if (G[source].size() == 0) return false;\n for (Integer next : G[source]) {\n if (!dfs(next, destination, G, visited, new HashSet()))\n return false;\n }\n return true;\n }",
"@Override\n public boolean link(T dataX, T dataY) throws NodeNotFoundException { return link(dataX, dataY, 1.0); }",
"public boolean hasEdge(String id1, String id2)\n\t{\n\t\treturn nodes.containsKey(id1) && getNode(id1).hasEdge(id2);\n\t}",
"private boolean hasAdjacent(int node) {\n for (int i = 0; i < this.matrix[node].length; i++) {\n if (this.matrix[node][i]) {\n return true;\n }\n\n }\n return false;\n }",
"@DisplayName(\"Add directed edge\")\n @Test\n public void testAddEdgeDirected() {\n graph.addEdge(new Edge(3, 4));\n List<Integer> l = new ArrayList<>();\n l.add(2);\n l.add(4);\n Assertions.assertArrayEquals(l.toArray(), graph.getNeighbours(3).toArray());\n }",
"@DisplayName(\"Has edge\")\n @Test\n public void testHasEdge() {\n boolean directed1 = true;\n graph = new Graph(edges, directed1, 0, 5, GraphType.RANDOM);\n Assertions.assertTrue(graph.hasEdge(new Edge(0, 1)));\n }",
"public boolean hasEdge (E vertex1, E vertex2) throws IllegalArgumentException\n {\n int index1 = this.indexOf (vertex1);\n if (index1 < 0)\n throw new IllegalArgumentException (vertex1 + \" was not found!\");\n int index2 = this.indexOf (vertex2);\n if (index2 < 0)\n throw new IllegalArgumentException (vertex2 + \" was not found!\");\n \n Node node = adjacencySequences[index1];\n boolean hasEdge = false;\n while (!hasEdge && node != null)\n {\n if (node.neighbourIndex == index2)\n hasEdge = true;\n else\n node = node.nextNode;\n }\n\n return hasEdge;\n }",
"@Test\r\n void add_remove_add() {\r\n graph.addEdge(\"A\", \"B\");\r\n graph.addEdge(\"A\", \"C\");\r\n graph.addEdge(\"B\",\"D\");\r\n graph.addEdge(\"C\",\"D\");\r\n graph.addEdge(\"D\", \"E\"); \r\n // Check that E is in graph with correct edges\r\n List<String> adjacent = graph.getAdjacentVerticesOf(\"D\");\r\n vertices = graph.getAllVertices(); \r\n if(!vertices.contains(\"E\") | !adjacent.contains(\"E\")) {\r\n fail();\r\n }\r\n //Remove E\r\n graph.removeVertex(\"E\");\r\n if(vertices.contains(\"E\") | adjacent.contains(\"E\")) {\r\n fail();\r\n }\r\n \r\n //Add E back into graph with different edge\r\n graph.addEdge(\"B\", \"E\");\r\n adjacent = graph.getAdjacentVerticesOf(\"B\");\r\n if(!vertices.contains(\"E\") | !adjacent.contains(\"E\")) {\r\n fail();\r\n }\r\n }",
"public boolean isAdjacent(NodeTree location){\n return isAdjacent(this.head, location);\n }",
"@Override\n public boolean isConnected() {\n for (node_data n : G.getV()) {\n bfs(n.getKey());\n for (node_data node : G.getV()) {\n if (node.getTag() == 0)\n return false;\n }\n }\n return true;\n }",
"protected boolean connects(R r1, R r2) {\n\t\t\treturn getPreviousOrSame(getLower(r1)).compareTo(getUpper(r2)) <= 0 ||\n\t\t\t\tgetPreviousOrSame(getLower(r2)).compareTo(getUpper(r1)) <= 0;\n\t\t}",
"public boolean isConnected() {\n if (this.isEmpty()) return true;\n\n if (this.directed) {\n Deque<Node> toVisit = new LinkedList<>();\n for (Node s : this.nodes.values()) {\n Node current;\n toVisit.addLast(s);\n while (!toVisit.isEmpty()) {\n current = toVisit.removeLast();\n current.setFlag(\"_visited\");\n for (Edge edge : current.getNeighbours()) {\n Node n = edge.getEnd();\n if (!n.getFlag(\"_visited\")) toVisit.addLast(n);\n }\n }\n\n //Check if all nodes have been visited and remove flags\n boolean allVisited = true;\n for (Node n : nodes.values()) {\n allVisited = allVisited && n.getFlag(\"_visited\");\n n.unsetFlag(\"_visited\");\n }\n if (!allVisited) return false;\n }\n return true;\n }\n else {\n //Perform a DFS from a random start node marking nodes as visited\n Node current;\n Deque<Node> toVisit = new LinkedList<>();\n toVisit.addLast(this.nodes.values().iterator().next());\n while (!toVisit.isEmpty()) {\n current = toVisit.removeLast();\n current.setFlag(\"_visited\");\n for (Edge edge : current.getNeighbours()) {\n Node n = edge.getEnd();\n if (!n.getFlag(\"_visited\")) toVisit.addLast(n);\n }\n }\n\n //Check if all nodes have been visited and remove flags\n boolean allVisited = true;\n for (Node n : nodes.values()) {\n allVisited = allVisited && n.getFlag(\"_visited\");\n n.unsetFlag(\"_visited\");\n }\n\n return allVisited;\n }\n }",
"@Override\n public boolean connected(Station station1, Station station2) {\n if (station1.id() >= links.length || station2.id() >= links.length) {\n return station1.id() == station2.id();\n }\n return links[station1.id()] == links[station2.id()];\n }",
"@Override\r\n\tpublic boolean isSymmetricLink(Entity source, Entity target)\r\n\t{\r\n\t\treturn (directedGraph.findEdge(source, target) != null)\r\n\t\t\t\t&& (directedGraph.findEdge(target, source) != null);\r\n\t}",
"@Test\n\tvoid testAdjacentNodes() {\n\t\tLinkedHashSet<String> edges = null;\n\t\tmap.put(\"Boston\", edges);\n\t\tOptional<LinkedHashSet<String>> vertexOptional = Optional.ofNullable(map.get(\"Boston\"));\n\t\t// Boston does not have any adjacent nodes\n\t\tAssertions.assertTrue(vertexOptional.isEmpty());\n\t\t// if connected vertex is null new vertex is created. Now Adjacent nodes will\n\t\t// not have any nodes inside it.\n\t\tif (vertexOptional.isEmpty()) {\n\t\t\tedges = new LinkedHashSet<String>();\n\t\t\tmap.put(\"Boston\", edges);\n\t\t\tAssertions.assertNotNull(map.get(\"Boston\"));\n\t\t\tAssertions.assertEquals(0, map.get(\"Boston\").size());\n\n\t\t}\n\n\t}",
"public boolean isConnectedTo(A e) {\n\t\n\t\tif (g == null) return false;\n\t\t\n\t\tfor (Object o: g.getEdges()) {\n\t\t\t\n\t\t\tif (((Edge<?>)o).getFrom().equals(this) && ((Edge<?>)o).getTo().getValue().equals(e)) {\n\t\t\t\treturn true;\n\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}",
"@Override\r\n\tpublic boolean connect(VertexInterface<T> endVertex, double edgeWeight) {\n\t\treturn false;\r\n\t}",
"public boolean hasNeighbours() {\n\t\tif (this.eltZero != null || this.eltOne != null || this.eltTwo != null)\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}",
"public boolean equals(Object obj){\r\n\t\tDirectedEdge edge=(DirectedEdge)obj;\r\n\t\tif (source.equals(edge.getSouceNode() )&& \r\n\t\t\ttarget.equals(edge.getTargetNode()))\r\n\t\t\treturn true;\r\n\t\telse\r\n\t\t\treturn false;\r\n\t}",
"@Test\n public void tr1()\n {\n Graph graph = new Graph(2);\n Set<Integer> sources = new TreeSet<Integer>();\n Set<Integer> targets = new TreeSet<Integer>();\n sources.add(0);\n targets.add(1);\n assertFalse(graph.reachable(sources, targets));\n }",
"public static <T> boolean routeBetween2NodesBFS(MyGraph<T> graph, MyNode<T> start, MyNode<T> end) {\n if (start == end) return true;\n LinkedList<MyNode<T>> queue = new LinkedList<>();\n queue.add(start);\n while (!queue.isEmpty()) {\n MyNode<T> u = queue.removeFirst();\n if (u != null) {\n for (MyNode<T> node : u.getAdjacent()) {\n if (node.getState() == State.Unvisited) {\n if (node == end) {\n return true;\n } else {\n node.setState(State.Visiting);\n queue.add(node);\n }\n }\n }\n\n }\n }\n return false;\n }",
"default boolean isAdjacent(Interval other) {\n return getStart() == other.getEnd() || getEnd() == other.getStart();\n }",
"@Test \r\n void add_mutiple_edges_check_size(){\r\n for(int i = 0; i < 20; i++) {\r\n graph.addEdge(\"\" + i, \"\" + (i + 1));\r\n } \r\n List<String> adjacent;\r\n for(int i = 0; i < 20; i++) {\r\n adjacent = graph.getAdjacentVerticesOf(\"\"+i);\r\n if(!adjacent.contains(\"\" + (i+1))) {\r\n fail();\r\n }\r\n }\r\n if(graph.size() != 20 | graph.order() != 21) {\r\n fail();\r\n }\r\n \r\n }",
"public boolean isEqual(Edge e){\n if(v1.equals(e.v1) && v2.equals(e.v2)){\n return true;\n }\n else if(v1.equals(e.v2) && v2.equals(e.v1)){\n return true;\n }\n else{\n return false;\n }\n }",
"ArrayList<Edge> getAdjacencies();",
"public boolean DijkstraHelp(int src, int dest) {\n PriorityQueue<Entry>queue=new PriorityQueue();//queue storages the nodes that we will visit by the minimum tag\n //WGraph_DS copy = (WGraph_DS) (copy());//create a copy graph that the algorithm will on it\n initializeTag();\n initializeInfo();\n node_info first=this.ga.getNode(src);\n first.setTag(0);//distance from itself=0\n queue.add(new Entry(first,first.getTag()));\n while(!queue.isEmpty()) {\n Entry pair=queue.poll();\n node_info current= pair.node;\n if (current.getInfo() != null) continue;//if we visit we can skip to the next loop because we have already marked\n current.setInfo(\"visited\");//remark the info\n Collection<node_info> listNeighbors = this.ga.getV(current.getKey());//create a collection for the neighbors list\n LinkedList<node_info> Neighbors = new LinkedList<>(listNeighbors);//create the neighbors list\n if (Neighbors == null) continue;\n for(node_info n:Neighbors) {\n\n if(n.getTag()>ga.getEdge(n.getKey(),current.getKey())+current.getTag())\n {\n n.setTag(current.getTag() + ga.getEdge(n.getKey(), current.getKey()));//compute the new tag\n }\n queue.add(new Entry(n,n.getTag()));\n }\n }\n Iterator<node_info> it=this.ga.getV().iterator();\n while(it.hasNext()){\n if(it.next().getInfo()==null) return false;\n }\n return true;\n }",
"public abstract boolean addEdge(Node node1, Node node2, int weight);",
"public boolean IsConnected() {\r\n\t\tHashMap<String, Boolean> processed = new HashMap<>();\r\n\t\tLinkedList<Pair> queue = new LinkedList<>();\r\n\t\tint counter = 0;\r\n\r\n\t\tArrayList<String> vnames = new ArrayList<>(vces.keySet());\r\n\t\tfor (String vname : vnames) {\r\n\t\t\tif (processed.containsKey(vname)) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tcounter++;\r\n\t\t\tPair rootpair = new Pair(vname, vname);\r\n\t\t\tqueue.addLast(rootpair);\r\n\t\t\twhile (queue.size() != 0) {\r\n\t\t\t\t// 1. removeFirst\r\n\t\t\t\tPair rp = queue.removeFirst();\r\n\r\n\t\t\t\t// 2. check if processed, mark if not\r\n\t\t\t\tif (processed.containsKey(rp.vname)) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tprocessed.put(rp.vname, true);\r\n\r\n\t\t\t\t// 3. Check, if an edge is found\r\n\t\t\t\tSystem.out.println(rp.vname + \" via \" + rp.psf);\r\n\r\n\t\t\t\t// 4. Add the unprocessed nbrs back\r\n\t\t\t\tArrayList<String> nbrnames = new ArrayList<>(rp.vtx.nbrs.keySet());\r\n\t\t\t\tfor (String nbrname : nbrnames) {\r\n\t\t\t\t\tif (!processed.containsKey(nbrname)) {\r\n\t\t\t\t\t\tPair np = new Pair(nbrname, rp.psf + nbrname);\r\n\t\t\t\t\t\tqueue.addLast(np);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn counter == 1;\r\n\t}",
"@Override\n\tpublic boolean containsEdge(Object src, Object dest)\n\t{\n\t\tif(this.map.containsKey(src))\n\t\t\tif(this.map.get(src).contains(dest))\n\t\t\t\treturn true;\t\t\n\t\treturn false;\n\t}",
"@Override\r\n\tpublic boolean containsEdge(E src, E dst) {\r\n\t\tif(containsVertex(src) && containsVertex(dst)) {\r\n\t\t\treturn adjacencyLists.get(src).contains(new Edge<E>(src, dst, Integer.MAX_VALUE));\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"private boolean hasPath(GraphNode origin, GraphNode destination) {\n if (origin.node.getName().equals(outputNode.getName()) || destination.node.getName().equals(inputNode.getName()))\n return false;\n\n Queue<GraphNode> queue = new LinkedList<GraphNode>();\n queue.offer(origin);\n\n while(!queue.isEmpty()) {\n GraphNode current = queue.poll();\n if (current == destination) {\n return true;\n }\n else {\n for (GraphEdge e : current.to) {\n queue.offer(e.to);\n }\n }\n }\n return false;\n }",
"public boolean isConnectedTo(Node<A> n) {\n\t\t\n\t\tif (g == null) return false;\n\t\t\n\t\tif (g.contains(n)){\n\t\t\t\n\t\t\tfor (Object o: g.getEdges()) {\n\t\t\t\t\n\t\t\t\tif (((Edge<?>)o).getFrom().equals(this) && ((Edge<?>)o).getTo().equals(n)) {\n\t\t\t\t\treturn true;\n\n\t\t\t\t}\n\t\t\t\n\t\t\t}\n\n\t\t}\n\t\treturn false;\n\t}",
"public DSALinkedList<DSAGraphNode<E>> getAdjacent()\n {\n return links;\n }",
"boolean isConnected(int a, int b) {\n\t\tint nodea = getRoot(a); //logN\r\n\t\tint nodeb = getRoot(b); //logN\r\n\t\tSystem.out\r\n\t\t\t\t.println(a + \" and \" + b + \" CONNECTED?: \" + (nodea == nodeb));\r\n\t\treturn nodea == nodeb;\r\n\t}",
"public boolean isLinked(int vertexA, int vertexB) {\n\t\tboolean result = false;\n\t\ttry {\n\t\t\tresult = this.reachabilityMatrix[vertexA][vertexB];\n\t\t} catch (ArrayIndexOutOfBoundsException e) {\n\t\t\tSystem.out.println(\"Vertices are out of range. It should be < \" + this.maxNumVertices);\n\t\t}\n\t\treturn result;\n\t}",
"public static <T> boolean routeBetween2NodesDFS(MyGraph<T> graph, MyNode<T> start, MyNode<T> end) {\n if (start == end) return true;\n\n return dfs(start, new Predicate<MyNode<T>>() {\n @Override\n public boolean test(MyNode<T> t) {\n return t == end;\n }\n });\n }"
] | [
"0.74384725",
"0.7076994",
"0.693738",
"0.6904777",
"0.69044065",
"0.690415",
"0.68499684",
"0.6831772",
"0.68004036",
"0.6784446",
"0.6729177",
"0.6729177",
"0.66730505",
"0.6665971",
"0.65437883",
"0.6542292",
"0.6531887",
"0.65183187",
"0.64621186",
"0.6428069",
"0.6420183",
"0.63981646",
"0.6395093",
"0.6365027",
"0.63557386",
"0.6353532",
"0.6353184",
"0.6341156",
"0.6339279",
"0.63028467",
"0.6285713",
"0.62647605",
"0.625119",
"0.6240947",
"0.6236991",
"0.62187505",
"0.6204864",
"0.61938506",
"0.6172124",
"0.6166776",
"0.6153617",
"0.6143091",
"0.61380416",
"0.6135134",
"0.61158764",
"0.6110443",
"0.61032134",
"0.61031115",
"0.6090514",
"0.6077644",
"0.60733306",
"0.6070157",
"0.6053531",
"0.6023224",
"0.6005442",
"0.60029536",
"0.599293",
"0.5987954",
"0.5982851",
"0.598282",
"0.59693515",
"0.5962696",
"0.59501225",
"0.5941769",
"0.59409183",
"0.593089",
"0.59258485",
"0.5916274",
"0.59128225",
"0.59086984",
"0.59063053",
"0.5895538",
"0.58904105",
"0.58878875",
"0.5886693",
"0.5885389",
"0.5869619",
"0.5867655",
"0.5867007",
"0.58620673",
"0.58613896",
"0.585826",
"0.5848618",
"0.5840926",
"0.5838096",
"0.5835458",
"0.58354217",
"0.583121",
"0.58298343",
"0.5828133",
"0.5823599",
"0.58150655",
"0.58149785",
"0.57920045",
"0.57877034",
"0.5784296",
"0.5782143",
"0.57675904",
"0.57650673",
"0.57622206"
] | 0.7823638 | 0 |
IMPORT: oldLabel (String), newLabel (String) EXPORT: boolean ASSERTION: rename label if vertices list has the label given Throws: IllegalArgumentException | public boolean changeVxLabel(String oldLabel, String newLabel)
{
boolean sucess = false;
try {
DSAGraphVertex vx = getVertex(oldLabel);
if(!hasVertex(newLabel)) //replace only if new label isn't already taken
{
vx.label = newLabel;
sucess = true;
}
else
{
throw new IllegalArgumentException("|" + newLabel + "| already exists");
}
} catch (NoSuchElementException e) {
throw new IllegalArgumentException(e.getMessage()); //vx doesn't exist
}
return sucess;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"String updateLabel(String oldLabel, String newLabel);",
"void addLabel(Object newLabel);",
"void addLabel(Object newLabel);",
"public boolean addVertex(T vertexLabel);",
"void removeLabel(Object oldLabel);",
"void removeLabel(Object oldLabel);",
"com.microsoft.schemas.xrm._2011.contracts.Label addNewLabel();",
"public Label newLabel(Label oldLabel) {\r\n NegraLabel result;\r\n if(oldLabel instanceof NegraLabel) {\r\n NegraLabel l = (NegraLabel) oldLabel;\r\n result = new NegraLabel(l.value(), l.getEdge(), new HashMap<String,String>());\r\n for (Map.Entry<String,String> e : l.features.entrySet()) {\r\n result.features.put(e.getKey(), e.getValue());\r\n }\r\n } else {\r\n result = new NegraLabel(oldLabel.value());\r\n }\r\n return result;\r\n }",
"public abstract Code addLabel(String label);",
"void setGraphLabel(String label);",
"public void renameLabel(LabelModel aLabel, String aNewName, AsyncHandler<Void> aHandler);",
"private void relabelGraphs2MultisetLabels(List<DirectedMultigraphWithRoot<Vertex<String>, Edge<String>>> graphs, int startLabel, int currentLabel) {\r\n\t\tMap<String, Bucket<Vertex<String>>> bucketsV = new HashMap<String, Bucket<Vertex<String>>>();\r\n\t\tMap<String, Bucket<Edge<String>>> bucketsE = new HashMap<String, Bucket<Edge<String>>>();\r\n\r\n\t\t// Initialize buckets\r\n\t\tfor (int i = startLabel; i < currentLabel; i++) {\r\n\t\t\tbucketsV.put(Integer.toString(i), new Bucket<Vertex<String>>(Integer.toString(i)));\r\n\t\t\tbucketsE.put(Integer.toString(i), new Bucket<Edge<String>>(Integer.toString(i)));\r\n\t\t}\r\n\r\n\t\t// 1. Fill buckets \r\n\r\n\t\t\t\tfor (DirectedMultigraphWithRoot<Vertex<String>, Edge<String>> graph : graphs) {\r\n\t\t\t\t// Add each edge source (i.e.) start vertex to the bucket of the edge label\r\n\t\t\t\tfor (Edge<String> edge : graph.getEdges()) {\r\n\t\t\t\t\tbucketsV.get(edge.getLabel().toString()).getContents().add(graph.getDest(edge));\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Add each incident edge to the bucket of the node label\r\n\t\t\t\tfor (Vertex<String> vertex : graph.getVertices()) {\t\t\t\r\n\t\t\t\t\tCollection<Edge<String>> v2 = graph.getOutEdges(vertex);\t\r\n\t\t\t\t\tbucketsE.get(vertex.getLabel().toString()).getContents().addAll(v2);\r\n\t\t\t\t}\t\r\n\t\t\t}\r\n\r\n\t\t// 2. add bucket labels to existing labels\r\n\t\t// Change the original label to a prefix label\r\n\t\tfor (DirectedMultigraphWithRoot<Vertex<String>, Edge<String>> graph : graphs) {\r\n\t\t\tfor (Edge<String> edge : graph.getEdges()) {\r\n\t\t\t\tedge.setLabel(edge.getLabel() + \"_\");\r\n\t\t\t}\r\n\t\t\tfor (Vertex<String> vertex : graph.getVertices()) {\r\n\t\t\t\tvertex.setLabel(vertex.getLabel() + \"_\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// 3. Relabel to the labels in the buckets\r\n\t\tfor (int i = startLabel; i < currentLabel; i++) {\r\n\t\t\t// Process vertices\r\n\t\t\tBucket<Vertex<String>> bucketV = bucketsV.get(Integer.toString(i));\t\t\t\r\n\t\t\tfor (Vertex<String> vertex : bucketV.getContents()) {\r\n\t\t\t\tvertex.setLabel(vertex.getLabel() + bucketV.getLabel() ); // + \"_\"\r\n\t\t\t}\r\n\t\t\t// Process edges\r\n\t\t\tBucket<Edge<String>> bucketE = bucketsE.get(Integer.toString(i));\t\t\t\r\n\t\t\tfor (Edge<String> edge : bucketE.getContents()) {\r\n\t\t\t\tedge.setLabel(edge.getLabel() + bucketE.getLabel() ); // + \"_\"\r\n\t\t\t}\r\n\t\t}\r\n\r\n\r\n\r\n\t}",
"public Vertex(int label) {\r\n isVisited = false;\r\n this.label = label;\r\n }",
"@Override\n\tpublic void setLabel(String label) {\n\t\t\n\t}",
"@Test(expected = IllegalLabelException.class)\n\tpublic void testIllegalLabelException() throws Exception {\n\t\tnew GraphPoetFactory().parse(\"Edge=<ab!,WordNeighborhood,1,a,b,Yes>\");\n\t}",
"void setLabel(com.microsoft.schemas.xrm._2011.contracts.Label label);",
"public void setVertexName(String newName)\n\t{\n\t\tvertexName = newName ;\n\t}",
"@Override\n public void changeGenusTo(String genusName, boolean preserveLabel) {\n //return null;\n }",
"void setEdgeLabel(int edge, String label);",
"public boolean removeVertex(String label)\n\t{\n\t\tif(hasVertex(label)) //if vertex in in list\n\t\t{\n\t\t\tvertices.removeAt(getVertex(label));\n\t\t\t//System.out.println(\"Deleted: \" + label); //debug\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}",
"@Override\n\t\tpublic void addLabel(Label label) {\n\n\t\t}",
"void setLabel(String label);",
"public void setLabel(String label)\n {\n if (StringUtils.isBlank(label))\n throw new IllegalArgumentException(\"label cannot be null or empty\");\n \n this.label = label;\n }",
"void setLabel(Label label);",
"public void\nsetNewLabel()\nthrows Exception\n{\n\tdouble lineLength = this.getNucLabelLineLength();\n\tif (lineLength <= 0.0)\n\t\tlineLength = ComplexDefines.NUCLABEL_LINE_LENGTH;\n\tthis.setNewLabel(\n\t\tnew Font(\"Helvetica\", Font.PLAIN, 12),\n\t\tthis.getParentSSData2D().getNucLabelLineWidth(),\n\t\tlineLength, Color.black, this.getID());\n}",
"public void setLabel(String label) {\n this.label = label;\n }",
"ILinkDeleterActionBuilder<SOURCE_BEAN_TYPE, LINKED_BEAN_TYPE> setLinkedEntityLabelSingular(String label);",
"@Override\n\tpublic void updateLabels() {\n\n\t}",
"public Value replaceObjectLabel(ObjectLabel oldlabel, ObjectLabel newlabel) {\n if (oldlabel.equals(newlabel))\n throw new AnalysisException(\"Equal object labels not expected\");\n if ((object_labels == null || !object_labels.contains(oldlabel)) &&\n (getters == null || !getters.contains(oldlabel)) &&\n (setters == null || !setters.contains(oldlabel)))\n return this;\n Value r = new Value(this);\n if (object_labels != null) {\n Set<ObjectLabel> newobjlabels = newSet(object_labels);\n newobjlabels.remove(oldlabel);\n newobjlabels.add(newlabel);\n r.object_labels = newobjlabels;\n }\n if (getters != null) {\n Set<ObjectLabel> newgetters = newSet(getters);\n newgetters.remove(oldlabel);\n newgetters.add(newlabel);\n r.getters = newgetters;\n }\n if (setters != null) {\n Set<ObjectLabel> newsetters = newSet(setters);\n newsetters.remove(oldlabel);\n newsetters.add(newlabel);\n r.setters = newsetters;\n }\n return canonicalize(r);\n }",
"public void addVertex(T vertLabel) {\n\t\tvertCount++;\n\t\tLinkedList[] tempList = new LinkedList[vertCount];\n\t\tLinkedList newVert = new LinkedList((String)vertLabel);\n\t\t\n\t\tif(verts.length==0){\n\t\t\ttempList[0] = newVert;\n\t\t}\n\t\t\n\t\telse{\n\t\t\tfor(int x=0; x<verts.length; x++){\n\t\t\t\t\ttempList[x] = verts[x];\n\t\t\t}\n\t\t\ttempList[verts.length] = newVert;\n\t\t}\n\tverts = tempList;\n }",
"public void testFeatureLabelModelFacet() throws Exception {\n\t\tURI genmodelFileName = createURI(\"testFeatureLabelModelFacet.gmfgen\"); //$NON-NLS-1$\n\t\t\n\t\tException caughtGenException = assertOrdinaryLoadModelProblems(genmodelFileName);\n\t\tassertTrue(\"expected diagnostic exception\", caughtGenException != null); //$NON-NLS-1$\t\t\t\t\n\n\t\tassertOnLoadModelMigrationSuccess(genmodelFileName);\n\t\tcheckFeatureLabelModelFacetsMigrated(genmodelFileName);\n\n\t\tURI newUri = temporarySaveMigratedModel(genmodelFileName, \"testFeatureLabelModelFacet\", \"gmfgen\");\n\t\tchangeNsUriToOldOne(newUri, \"gmfgen\", \"http://www.eclipse.org/gmf/2005/GenModel/2.0\");\n\t\t\n\t\tassertOnLoadModelMigrationDidNothing(newUri);\n\t\tcheckFeatureLabelModelFacetsMigrated(newUri);\n\t}",
"String addLabel(String label);",
"@Test\n public void testWithUnknownLabel() throws Exception {\n LogicalGraph socialGraph = getSocialNetworkLoader().getLogicalGraph();\n LogicalGraph result = socialGraph\n .callForGraph(new VertexDeduplication<>(\"NotInTheGraph\", Arrays.asList(\"a\", \"b\")));\n collectAndAssertTrue(socialGraph.equalsByData(result));\n }",
"public boolean labelOnOlemassa(String label);",
"@Override\n public void setLabel(String arg0)\n {\n \n }",
"public void setLabel(Object v) \n {\n this.label = v;\n }",
"public void setLabel(String label) {\r\n this.label = label;\r\n }",
"public void addVertex(String vertLabel) {\n\n // Implement me!\n if (indexOf(vertLabel, vertices) != -1) {\n return;\n }\n vertices.put(vertLabel, vertices.size());\n if (weights.length == 0) {\n weights = new int[1][0];\n } else {\n weights = addOneRow(weights);\n }\n\n\n }",
"public abstract void addLabel(String str);",
"void setlabel (String label){\r\n\t\tthis.label = label;\r\n\t}",
"protected GraphSubEdge (Object label)\n {\n this.label = label;\n mark = false;\n }",
"private void attachLabel(Vertex v, String string) throws IOException\n {\n if (string == null || string.length() == 0)\n return;\n String label = string.trim();\n// String label = trimQuotes(string).trim();\n// if (label.length() == 0)\n// return;\n if (unique_labels)\n {\n try\n {\n StringLabeller sl = StringLabeller.getLabeller((Graph)v.getGraph(), LABEL);\n sl.setLabel(v, label);\n }\n catch (StringLabeller.UniqueLabelException slule)\n {\n throw new FatalException(\"Non-unique label found: \" + slule);\n }\n }\n else\n {\n v.addUserDatum(LABEL, label, UserData.SHARED);\n }\n }",
"public Vertex(String label, int index){\n this.label = label;\n this.index = index;\n this.previous = null;\n visited = false;\n }",
"public abstract void updateLabels();",
"@Override\n\tpublic void setComponentLabel(String label) {\n\t\t\n\t}",
"public boolean addVertex(String label)\n\t{\n\t\tif(!hasVertex(label)) //if edge does not already exist add it\n\t\t{\n\t\t\tDSAGraphVertex v = new DSAGraphVertex(label, null);\n\t\t\tvertices.insertLast(v); //inserts into vertices list at end\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}",
"public Vertex(L l) {\n\t\tlabel = l;\n\t}",
"public void setLabel(String label)\n\t{\n\t\tthis.label = label;\n\t}",
"public boolean modifyTopicLabel(String collectionId, String topicId, String newLabel) {\r\n final int labelSizeLimit = 100;\r\n String charsNotAllowed = \"<>\\\\|'\\\"\" + ITEM_DELIMITER + VALUE_DELIMITER + FREQ_DELIMITER + WEIGHT_DELIMITER;\r\n\r\n boolean toReturn = false;\r\n if (null == collectionId || null == topicId || null == newLabel || 0 == collectionId.length() || 0 == topicId.length()\r\n || 0 == newLabel.length()) {\r\n setError(\"APIL_0100\", \"argument's not valid.\");\r\n return toReturn;\r\n }\r\n\r\n if (newLabel.length() > labelSizeLimit) {\r\n setError(\"APIL_0532\", \"label size cannot exceed \" + labelSizeLimit + \" characters\");\r\n return toReturn;\r\n }\r\n\r\n //prohibit most special characters\r\n for (int i = 0; i < newLabel.length(); i++) {\r\n if (charsNotAllowed.indexOf(newLabel.charAt(i)) >= 0) {\r\n setError(\"APIL_0533\", \"label contains character which is not allowed: \" + newLabel.charAt(i));\r\n return toReturn;\r\n }\r\n }\r\n\r\n String[] paramFields = {\"collection_id\", \"topic_id\", \"new_topic\"};\r\n SocketMessage request = new SocketMessage(\"roaster\", \"modify_topic_label\", SocketMessage.PriorityType.EMERGENCY, SocketMessage.TransferType.BI_WAY,\r\n \"\", paramFields);\r\n request.setValue(\"collection_id\", collectionId);\r\n request.setValue(\"topic_id\", topicId);\r\n request.setValue(\"new_topic\", newLabel);\r\n\r\n\t\t/* \r\n\t\t�߸�� topic_id �� ���� ����\r\n\t\t<error>\r\n\t\t\t<code>TEAL_8453</code>\r\n\t\t\t<message>[request_id=201203082] Failed to create a process module by wrong value of a parameter(=topic_id)</message>\r\n\t\t</error>\r\n\t\t\r\n\t\t�������� �ʴ� topic_id �� ���� ����\r\n\t\t<error>\r\n\t\t\t<code>TEAL_4410</code>\r\n\t\t\t<message>Topic ID <1000> does not exist.</message>\r\n\t\t</error> \r\n\t\t*/\r\n\r\n SocketMessage response = handleMessage(request);\r\n if (!isSuccessful(response)) {\r\n // TEAL_8164: topic ID range\r\n // TEAL_8453: topic ID's illegal\r\n if (\"\".equals(response.getErrorCode())) {\r\n setError(\"APIL_0531\", \"failed in modifying topic label: coll_id=\" + collectionId + \"/topic_id=\" + topicId\r\n + \"/label=\" + newLabel);\r\n } else if (\"TEAL_8164\".equals(response.getErrorCode()) || \"TEAL_8453\".equals(response.getErrorCode())) {\r\n setError(\"APIL_0535\", \"failed in modifying topic label (wrong topic ID): coll_id=\" + collectionId + \"/topic_id=\"\r\n + topicId + \"/label=\" + newLabel);\r\n } else {\r\n wrapError(\"APIL_0531\", \"failed in modifying topic label: coll_id=\" + collectionId + \"/topic_id=\" + topicId\r\n + \"/label=\" + newLabel);\r\n }\r\n } else {\r\n toReturn = true;\r\n }\r\n\r\n return toReturn;\r\n }",
"public void setLabel(final String label) {\n this.label = label;\n }",
"@Override\n\t\tpublic void removeLabel(Label label) {\n\n\t\t}",
"public void setLabel(String label) {\r\n\t\tthis.label = label;\r\n\t}",
"public void setLabel(String label) {\r\n\t\tthis.label = label;\r\n\t}",
"void checkRename(Object oldId, Object newId) throws UPAException;",
"public void setLabel(String label) {\n\t\t_label = label;\n\t}",
"@Override\r\n\tpublic void loadWithLabel(String label) throws LoadException {\n\t\t\r\n\t}",
"public void setLabel(String label) {\n\t\tthis.label = label;\n\t}",
"protected void addLabel(AeIconLabel aLabel) {\r\n }",
"void registerLabel(SNode inputNode, Iterable<SNode> outputNodes, String mappingLabel);",
"public void setLabel(final String _label)\n {\n this.label = _label;\n }",
"@Test\n public void getlabelTest() {\n \tVertex<String> v=new Vertex<String>(\"v\");\n \tassertEquals(\"v\", v.getlabel());\n }",
"ILinkDeleterActionBuilder<SOURCE_BEAN_TYPE, LINKED_BEAN_TYPE> setLinkedEntityLabelPlural(String label);",
"public void setLogLabel(String newLabel)\n\t{\n\t\t_logLabel = newLabel;\n\t}",
"public void setLabel(final String label) {\n this.label = label;\n }",
"private void addEdgeWithLabel(NasmInst source, NasmLabel destination) {\n if (source == null || destination == null)\n throw new FgException(\"ERROR: Can't create an edge without a source and a destination\");\n\n if (systemCalls.contains(destination.toString()))\n return; // System call: iprintLF, readline or atoi. No edge needed\n\n NasmInst destinationInst = label2Inst.get(destination.toString());\n if (destinationInst == null)\n throw new FgException(\"ERROR: No instruction matching with the given label\");\n addEdgeWithInst(source, destinationInst);\n }",
"public void setLabel( String label ) {\r\n lbl = label;\r\n }",
"public void setLabel(T2 eLabel) {\r\n\t\tthis.label = eLabel;\r\n\t\tcheckRep();\r\n\t}",
"void remove(String label) throws IOException;",
"private Label addNewLabel() {\n getElement().getChildren().forEach(e -> getElement().removeChild(e));\n // Create and add a new slotted label\n Label label = new Label();\n label.getElement().setAttribute(\"slot\", \"label\");\n this.getElement().appendChild(label.getElement());\n return label;\n }",
"public void setUniqueLinkInTo(VertexFrame vertex, String... labels) {\n\t\t// Unlink all edges between both objects with the given label\n\t\tunlinkIn(vertex, labels);\n\t\t// Create a new edge with the given label\n\t\tlinkIn(vertex, labels);\n\t}",
"public void setLabelFor(View labeled) {\n/* 1581 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"@Test(timeout = 5000)\n public void testAddlabelWithCase() throws Exception {\n addToCluserNodeLabelsWithDefaultExclusivity(ImmutableSet.of(\"HeLlO\"));\n verifyNodeLabelAdded(Sets.newHashSet(\"HeLlO\"), mgr.lastAddedlabels);\n Assert.assertFalse(getClusterNodeLabelNames().containsAll(Arrays.asList(\"hello\")));\n }",
"public static String translateVersionLabel(String label) {\r\n\t\tif(label == null) {\r\n\t\t\treturn NodeConstants.DEFAULT_VERSION_LABEL;\r\n\t\t}\r\n\t\treturn label;\r\n\t}",
"public boolean findInEdge(String label){\n\t\tfor(Entry<String, LinkedList<Edge>> s: vertices.entrySet()){\n\t\t\tfor(int i=0; i < vertices.get(s.getKey()).size();i++){\n\t\t\t\tif(vertices.get(s.getKey()).get(i).getDLabel().equals(label)){\n\t\t\t\t\tdelEdge(s.getKey(),label);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}",
"public void setLabel(int label) {\n\t\tthis.label = label;\n\t}",
"public void setLabelName(String labelName){\n m_labelName = labelName;\n }",
"public boolean setLabel(String labelIn)\r\n {\r\n if (labelIn == null)\r\n {\r\n return false;\r\n }\r\n else\r\n {\r\n label = labelIn.trim();\r\n return true;\r\n }\r\n }",
"public void\nsetNewLabel(Font font)\nthrows Exception\n{\n\tdouble lineLength = this.getNucLabelLineLength();\n\tif (lineLength <= 0.0)\n\t\tlineLength = ComplexDefines.NUCLABEL_LINE_LENGTH;\n\tthis.setNewLabel(font,\n\t\tthis.getParentSSData2D().getNucLabelLineWidth(), lineLength,\n\t\tColor.black, this.getID());\n}",
"public final void setLabel(final String label) {\r\n this.label = label;\r\n }",
"public void removeVertex(String vertLabel) {\n\n // Implement me!\n if (indexOf(vertLabel, vertices) <0) {\n return;\n }\n vertices.remove(vertLabel);\n Iterator<String> iterator = edges.keySet().iterator();\n while (iterator.hasNext()) {\n String k = iterator.next();\n if (k.contains(vertLabel)) {\n iterator.remove();\n edges.remove(k);\n }\n }\n }",
"public void setGraphLabel(String label) {\n label = DotGraphUtility.replaceQuotes(label);\n label = DotGraphUtility.replaceReturns(label);\n this.setGraphAttribute(\"label\", \"\\\"\" + label + \"\\\"\");\n }",
"@Override\n\tpublic void setUniqueLinkOutTo(VertexFrame vertex, String... labels) {\n\t\tunlinkOut(vertex, labels);\n\t\t// Create a new edge with the given label\n\t\tlinkOut(vertex, labels);\n\t}",
"void setShapeLabel(String Label);",
"String removeLabel(String label);",
"DatasetLabel getLabel();",
"@Override\n\tpublic void setLabelText(String label) {\n\t}",
"public boolean addVertex(String label, Object value)\n\t{\n\t\tif(!hasVertex(label)) //if edge does not already exist add it\n\t\t{\n\t\t\tDSAGraphVertex v = new DSAGraphVertex(label, value);\n\t\t\tvertices.insertLast(v); //inserts into vertices list at end\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}",
"public static void setLabel(Label labelName) {\n emitf(\"%s:\\n\", labelName.toString());\n }",
"Nda<V> withLabels( Map<Object, List<Object>> labels );",
"public ArangoDBVertex(String key, String label, ArangoDBGraph graph) {\n\t\tsuper(key, label, graph);\n\t}",
"public void label() {\n\n /**Iterate through all voxels in the specified volume - This should be done\n * once for making sure all voxels become labelled */\n for (int iX = bX; iX < tX; iX++) {\n for (int iY = bY; iY < tY; iY++) {\n for (int iZ = bZ; iZ < tZ; iZ++) {\n\n // Index3D tempIndex3D = new Index3D(iX, iY, iZ);\n\n /**If an unlabelled voxel is found add it onto the stack */\n if (imageMask.isTrue(iX, iY, iZ) && labelledVolume.intValue(iX, iY, iZ) < startingLabel) {\n voxelStack.push(new Index3D(iX, iY, iZ));\n\n /**Continue to recurse through sub-volumes for label voxels\n * until the queue is empty */\n while (!voxelStack.isEmpty()) {\n Index3D center = voxelStack.pop();\n labelRecursive(center, center);\n }\n\n //Increment the label for the next unlabelled component\n currentLabel = currentLabel + 10;\n diffLabels++;\n }\n }\n }\n }\n\n }",
"@Override\n\tpublic boolean add(L vertex) {\n\t\tIterator<Vertex<L>> vertexiter = verticelist.iterator();\n\t\twhile (vertexiter.hasNext()) {\n\t\t\tVertex<L> v = vertexiter.next();\n\t\t\tL lab = v.getlabel();\n\t\t\tif (lab.equals(vertex))\n\t\t\t\treturn false;\n\t\t}\n\t\tVertex<L> v = new Vertex<L>(vertex);\n\t\tverticelist.add(v);\n\t\treturn true;\n\t}",
"public void setLabel(String label) {\n this.label = label == null ? null : label.trim();\n }",
"@JsonProperty(\"label\")\n public void setLabel(String label) {\n this.label = label;\n }",
"public void setLabels(Labels labels) {\r\n\t\tsetTitle(labels.get(\"mapeditor.import_title\"));\r\n\t\tbtnOk.setText(labels.get(\"mapeditor.import_import\"));\r\n\t\tbtnCancel.setText(labels.get(\"mapeditor.cancel\"));\r\n\t\tcbReplaceSurface.setText(labels.get(\"mapeditor.import_replace_surface\"));\r\n\t\tcbReplaceBuildings.setText(labels.get(\"mapeditor.import_replace_buildings\"));\r\n\t\tcbWithSurface.setText(labels.get(\"mapeditor.import_replace_both\"));\r\n\t\toriginalMapLabel.setText(labels.get(\"mapeditor.import_original_map\"));\r\n\t\tshiftXLabel.setText(labels.get(\"mapeditor.import_shift_x\"));\r\n\t\tshiftYLabel.setText(labels.get(\"mapeditor.import_shift_y\"));\r\n\t\toriginalPlanetsLabel.setText(labels.get(\"mapeditor.import_original_planet\"));\r\n\t\tint idx = cbOriginalMap.getSelectedIndex();\r\n\t\tcbOriginalMap.removeItemAt(0);\r\n\t\tcbOriginalMap.insertItemAt(labels.get(\"mapeditor.import_nothing\"), 0);\r\n\t\tcbOriginalMap.setSelectedIndex(idx);\r\n\t\t\r\n\t\tidx = cbOriginalPlanets.getSelectedIndex();\r\n\t\tcbOriginalPlanets.removeItemAt(0);\r\n\t\tcbOriginalPlanets.insertItemAt(labels.get(\"mapeditor.import_nothing\"), 0);\r\n\t\tcbOriginalPlanets.setSelectedIndex(idx);\r\n\t}",
"public void addLabel(int index)\r\n {\r\n if (index >= this.labels.size())\r\n {\r\n throw new IllegalArgumentException(\r\n \"UMLFragmentLabelFigure: No such index.\");\r\n }\r\n\r\n LabelFigure label = new LabelFigure();\r\n this.labels.add(index, label);\r\n add(label, index);\r\n }",
"private void checkAndCorrectLabelReferences() {\n\t\t\n\t\tboolean madeChange;\n\t\tCodeItem codeItem = getCodeItem();\n\t\tList<Label> labels = codeItem.getLabels();\n\n\t\t// Parses all the Labels, and all the OffsetInstructions inside the Labels.\n\t\t// We stop the parsing whenever a change of instruction has been made, to restart the parsing\n\t\t// once again till everything is valid.\n\t\tdo {\n\t\t\tmadeChange = false;\n\t\t\tIterator<Label> labelIterator = labels.iterator();\n\t\t\twhile (!madeChange && labelIterator.hasNext()) {\n\t\t\t\tLabel label = labelIterator.next();\n\t\t\t\tArrayList<Instruction> instructions = label.getReferringInstructions();\n\t\n\t\t\t\tint insnIndex = 0;\n\t\t\t\tint nbInsn = instructions.size();\n\t\t\t\twhile (!madeChange && (insnIndex < nbInsn)) {\n\t\t\t\t\tInstruction insn = instructions.get(insnIndex);\n\t\t\t\t\t\n\t\t\t\t\tIOffsetInstruction offsetInsn = (IOffsetInstruction)insn;\n\t\t\t\t\tint instructionOffset = offsetInsn.getInstructionOffset();\n\t\t\t\t\t// The offset have to be divided by two, because the encoded offset is word based.\n\t\t\t\t\t// The relativeOffset is the offset for the Instruction to reach the Label.\n\t\t\t\t\t// It is negative if the Label is before the Instruction.\n\t\t\t\t\tint relativeOffset = (label.getOffset() - instructionOffset) / 2;\n\t\t\t\t\t\n\t\t\t\t\tint opcode = insn.getOpcodeByte();\n\t\t\t\t\tint maximumOffset = 0;\n\t\t\t\t\t// Check if the relative offset is valid for the instruction range. \n\t\t\t\t\tswitch (opcode) {\n\t\t\t\t\tcase 0x28: // Goto 8 bits.\n\t\t\t\t\t\tmaximumOffset = MAXIMUM_SIGNED_VALUE_8_BITS;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 0x29: // Goto 16 bits.\n\t\t\t\t\tcase 0x32: // If-test.\n\t\t\t\t\tcase 0x33:\n\t\t\t\t\tcase 0x34:\n\t\t\t\t\tcase 0x35:\n\t\t\t\t\tcase 0x36:\n\t\t\t\t\tcase 0x37:\n\t\t\t\t\tcase 0x38: // If-testz.\n\t\t\t\t\tcase 0x39:\n\t\t\t\t\tcase 0x3a:\n\t\t\t\t\tcase 0x3b:\n\t\t\t\t\tcase 0x3c:\n\t\t\t\t\tcase 0x3d:\n\t\t\t\t\t\tmaximumOffset = MAXIMUM_SIGNED_VALUE_16_BITS;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 0x2a: // Goto 32 bits.\n\t\t\t\t\tcase 0x2b: // Packed Switch.\n\t\t\t\t\tcase 0x2c: // Sparse Switch.\n\t\t\t\t\t\tmaximumOffset = MAXIMUM_SIGNED_VALUE_32_BITS;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\ttry { throw new Exception(\"Opcode error : 0x\" + Integer.toHexString(opcode)); } catch (Exception e) { e.printStackTrace(); }\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tint minimumOffset = -maximumOffset - 1;\n\t\t\t\t\t\n\t\t\t\t\tif ((relativeOffset < minimumOffset) || (relativeOffset > maximumOffset)) {\n\t\t\t\t\t\t// Must change to an Instruction with a bigger range. This is only possible for\n\t\t\t\t\t\t// the GOTO 8/16 bits.\n\t\t\t\t\t\tif ((opcode == Opcodes.INSN_GOTO) || (opcode == Opcodes.INSN_GOTO_16)) {\n\t\t\t\t\t\t\tInstruction newInsn;\n\t\t\t\t\t\t\t// Change to 16 or 32 bits ?\n\t\t\t\t\t\t\tif ((relativeOffset > MAXIMUM_SIGNED_VALUE_16_BITS) || (relativeOffset < MINIMUM_SIGNED_VALUE_16_BITS)) {\n\t\t\t\t\t\t\t\t// 32 bits.\n\t\t\t\t\t\t\t\tnewInsn = new InstructionFormat30T(Opcodes.INSN_GOTO_32, label, instructionOffset);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t// 16 bits.\n\t\t\t\t\t\t\t\tnewInsn = new InstructionFormat20T(Opcodes.INSN_GOTO_16, label, instructionOffset);\n\t\t\t\t\t\t\t}\n\t\n\t\t\t\t\t\t\t// Removes the instruction from the codeItem and replaces it with the new one.\n\t\t\t\t\t\t\tcodeItem.replaceInstructions(insn, newInsn);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Replaces the old instruction with the new one in the Label Instructions list.\n\t\t\t\t\t\t\tinstructions.remove(insnIndex);\n\t\t\t\t\t\t\tinstructions.add(insnIndex, newInsn);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Shifts all the Jump related instructions and the labels AFTER this instruction.\n\t\t\t\t\t\t\tshiftOffsetInstructionsAndLabels(instructionOffset, newInsn.getSize() - insn.getSize());\n\t\t\t\t\t\t\tmadeChange = true;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ttry { throw new IllegalArgumentException(\"Instruction Range extension unhandled. Opcode : 0x\" + Integer.toHexString(opcode)); } catch (Exception e) { e.printStackTrace(); }\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tinsnIndex++;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t} while (madeChange);\n\t}",
"@Test\n\tpublic void testAutoLabelDoesntOverwriteUserLabel() throws Exception {\n\n\t\tStringTableProvider provider = performSearch();\n\t\tStringTableModel model = (StringTableModel) getInstanceField(\"stringModel\", provider);\n\t\tGhidraTable table = (GhidraTable) getInstanceField(\"table\", provider);\n\t\ttoggleDefinedStateButtons(provider, false, true, false, false);\n\t\twaitForTableModel(model);\n\t\tsetAutoLabelCheckbox(provider, true);\n\n\t\t// select row (Address 40503c - String2)\n\t\tselectRows(table, addr(0x40503c));\n\t\tassertEquals(\"0040503c\",\n\t\t\tgetModelValue(model, table.getSelectedRow(), addressColumnIndex).toString());\n\n\t\t// make a user-defined label\n\t\tSymbol sym = program.getSymbolTable().getPrimarySymbol(addr(0x40503c));\n\t\tassertEquals(null, sym);\n\t\tint txId = program.startTransaction(\"Create Label\");\n\t\tboolean commit;\n\t\ttry {\n\t\t\tprogram.getSymbolTable().createLabel(addr(0x40503c), \"testLabel\",\n\t\t\t\tSourceType.USER_DEFINED);\n\t\t\tcommit = true;\n\t\t}\n\t\tcatch (InvalidInputException exc) {\n\t\t\tcommit = false;\n\t\t}\n\t\tprogram.endTransaction(txId, commit);\n\n\t\t// the createSymbol call will trigger notifications in the Swing thread that we need\n\t\t// to finish before we can move on\n\t\twaitForSwing();\n\t\t// make string with auto label selected\n\t\tDockingAction makeStringAction =\n\t\t\t(DockingAction) getInstanceField(\"makeStringAction\", provider);\n\t\tperformAction(makeStringAction, model);\n\n\t\t// make sure new label is made primary and second label is still there as secondary one\n\t\tsym = program.getSymbolTable().getPrimarySymbol(addr(0x40503c));\n\t\tassertEquals(\"s_String2\", sym.getName());\n\t\tSymbol symArray[] = program.getSymbolTable().getSymbols(addr(0x40503c));\n\t\tassertEquals(2, symArray.length);\n\t\tassertEquals(\"s_String2\", symArray[0].getName());\n\t\tassertEquals(\"testLabel\", symArray[1].getName());\n\n\t\tData d = listing.getDataAt(addr(0x40503c));\n\t\tDataType dt = d.getBaseDataType();\n\t\tassertTrue(dt instanceof StringDataType);\n\t\tassertEquals(\"String2\", d.getValue());\n\t}",
"public void setLabels(Object labels) {\r\n this.labels = labels;\r\n }",
"void setNilLabel();"
] | [
"0.63171047",
"0.6292264",
"0.6292264",
"0.62400097",
"0.6225273",
"0.6225273",
"0.6206573",
"0.6171083",
"0.59285426",
"0.5920515",
"0.5842948",
"0.583022",
"0.58274907",
"0.58189964",
"0.58153677",
"0.5810827",
"0.57857955",
"0.57769847",
"0.57716274",
"0.5717518",
"0.5717168",
"0.5694988",
"0.5688251",
"0.5686148",
"0.56639916",
"0.56139654",
"0.5604963",
"0.5577862",
"0.55778223",
"0.5549074",
"0.55488384",
"0.5546321",
"0.5544107",
"0.55152285",
"0.55138427",
"0.551169",
"0.5478441",
"0.5477567",
"0.54627657",
"0.54557437",
"0.5449755",
"0.5442187",
"0.54397696",
"0.54237145",
"0.5422439",
"0.53933746",
"0.539069",
"0.53875595",
"0.53827095",
"0.53636503",
"0.53621805",
"0.5354322",
"0.5354322",
"0.53327173",
"0.5321929",
"0.53180563",
"0.5316757",
"0.528896",
"0.52847654",
"0.52754587",
"0.52726024",
"0.5267605",
"0.52470666",
"0.52320695",
"0.522749",
"0.5220189",
"0.5217597",
"0.5209816",
"0.52094424",
"0.5205157",
"0.51873755",
"0.51869303",
"0.51866615",
"0.51793617",
"0.5177289",
"0.51738626",
"0.51633877",
"0.51623935",
"0.516156",
"0.51585895",
"0.5140514",
"0.51354915",
"0.51343876",
"0.5133695",
"0.5122934",
"0.5119249",
"0.51067454",
"0.5105563",
"0.50982225",
"0.5094332",
"0.5093461",
"0.50855917",
"0.5082256",
"0.50704116",
"0.5065823",
"0.5061912",
"0.5049483",
"0.50259084",
"0.5023733",
"0.50222176"
] | 0.72636086 | 0 |
IMPORT: none EXPORT: boolean ASSERTION: returns empty if there are no vertices | public boolean isEmpty()
{
return vertices.isEmpty();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic boolean isEmpty() {\r\n\t\treturn vertices.isEmpty();\r\n\t}",
"boolean hasIsVertexOf();",
"public boolean hasVertices() {\n if (vertices != null) {\n return vertices.length > 0;\n }\n return false;\n }",
"boolean ignoreExistingVertices();",
"@Test\n\tpublic void verticesTest() {\n\t\tgraph.addVertex(A);\n\t\tgraph.addVertex(B);\n\t\tgraph.addVertex(C);\n\t\tgraph.addVertex(D);\n\t\tassertEquals(4, graph.vertices().size());\n\t\tassertTrue(graph.vertices().contains(A));\n\t\tassertTrue(graph.vertices().contains(D));\n\t}",
"public boolean hasVertices() {\n return mFactoryVertices != null && mFactoryVertices.size() > 0;\n }",
"public boolean isEmpty() {\n return vertexLayer.isEmpty();\n }",
"@Override\r\n public int size() {\r\n return vertices.size();\r\n }",
"public void testVerticesSet() {\n System.out.println(\"verticesSet\");\n\n Assert.assertTrue(generateGraph().verticesSet().size() == 25);\n }",
"public int size() {\n\t\treturn vertices.size();\n\t}",
"@Override\n public void clearVertices()\n {\n // Shouldn't clear vertices\n }",
"public TransactionBuilder checkInternalVertexExistence();",
"public int getVertexCount();",
"@Test\r\n public void testVertices() {\r\n System.out.println(\"vertices\");\r\n MyDigraph instance = new MyDigraph();\r\n\r\n Object v1Element = 1;\r\n Vertex v1 = instance.insertVertex(v1Element);\r\n\r\n Collection colection = instance.vertices();\r\n boolean result = colection.contains(v1);\r\n boolean expectedResult = true;\r\n assertEquals(expectedResult, result);\r\n\r\n instance.removeVertex(v1);\r\n result = colection.contains(v1);\r\n expectedResult = false;\r\n assertEquals(expectedResult, result);\r\n }",
"@Test\n public void getVertexes() {\n\n for (int i = 0; i < 6; i++) {\n\n Vertex temp = new Vertex(i + \"\", \"Location number \" + i);\n assertTrue(temp.equals(testGraph.getVertices ().get(i)));\n\n }\n }",
"public int numVertices();",
"public int numVertices();",
"public int getNumVertices();",
"@Test\r\n void test_insert_null_vertex() {\r\n graph.addVertex(null);\r\n vertices = graph.getAllVertices();\r\n \r\n if(vertices.contains(null))\r\n fail();\r\n if(vertices.size() != 0 ||graph.order() != 0) {\r\n fail();\r\n }\r\n\r\n }",
"int getVertices();",
"public int getNumVertices() {\n\t\treturn vertices.size();\n\t}",
"@Override public Set<L> vertices() {\r\n return new HashSet<L>(vertices);//防御式拷贝\r\n }",
"@Test\r\n void test_insert_1_vertex_check() {\r\n graph.addVertex(\"1\");\r\n vertices = graph.getAllVertices();\r\n if (!vertices.contains(\"1\"))\r\n fail(\"Insert not working!!\");\r\n }",
"@Test\r\n public void testGetVertices() {\r\n System.out.println(\"getVertices\");\r\n Polygon instance = new Polygon();\r\n int expResult = 0;\r\n int result = instance.getVertices().size();\r\n assertEquals(expResult, result);\r\n }",
"Iterable<Long> vertices() {\n //YOUR CODE HERE, this currently returns only an empty list.\n return world.keySet();\n }",
"public void testRemoveAllVertices() {\n System.out.println(\"removeAllVertices\");\n\n Graph<Integer, Edge<Integer>> graph = generateGraph();\n Assert.assertTrue(graph.removeAllVertices());\n Assert.assertEquals(graph.verticesSet().size(), 0);\n }",
"@Test\n void test01_addVertex() {\n graph.addVertex(\"a\");\n graph.addVertex(\"b\"); // adds two vertices\n\n Set<String> vertices = new LinkedHashSet<>();\n vertices.add(\"a\");\n vertices.add(\"b\"); // creates a check list to compare with\n\n if (!graph.getAllVertices().equals(vertices)) {\n fail(\"Graph didn't add the vertices correctly\");\n }\n }",
"public int numVertices() { return numV; }",
"@Test\r\n void remove_nonexistent_vertex() {\r\n graph.addEdge(\"A\", \"B\");\r\n graph.addEdge(\"B\", \"C\");\r\n graph.removeVertex(\"D\");\r\n List<String> adjacent;\r\n vertices = graph.getAllVertices(); \r\n // Check that graph has all added vertexes\r\n if(!vertices.contains(\"A\")| !vertices.contains(\"B\")|\r\n !vertices.contains(\"C\")) {\r\n fail();\r\n }\r\n adjacent = graph.getAdjacentVerticesOf(\"A\");\r\n if (!adjacent.contains(\"B\"))\r\n fail();\r\n adjacent = graph.getAdjacentVerticesOf(\"B\");\r\n if (!adjacent.contains(\"C\"))\r\n fail();\r\n \r\n }",
"int getNumberOfVertexes();",
"Set<Vertex> getVertices();",
"public Set<V> getVertices();",
"public Set<V> getVertices();",
"public int getNumberOfVertices();",
"@Override\n public boolean isVertex()\n {\n return getAngle() > Math.PI && getAngle() < 2 * Math.PI;\n }",
"@Test\n public void testVertices() {\n Vertex v1 = new Vertex(1, \"A\");\n Vertex v2 = new Vertex(2, \"B\");\n Vertex v3 = new Vertex(3, \"C\");\n Vertex v4 = new Vertex(4, \"D\");\n Vertex v4id = new Vertex (4, \"E\");\n\n Edge<Vertex> e1 = new Edge<>(v1, v2, 5);\n Edge<Vertex> e2 = new Edge<>(v2, v3, 7);\n Edge<Vertex> e3 = new Edge<>(v1, v4, 9);\n\n Graph<Vertex, Edge<Vertex>> g = new Graph<>();\n g.addVertex(v1);\n g.addVertex(v2);\n g.addVertex(v3);\n g.addVertex(v4);\n g.addEdge(e1);\n g.addEdge(e2);\n g.addEdge(e3);\n\n assertFalse(g.addVertex(v4id));\n\n Set<Vertex> expectedVertices = new HashSet<>();\n expectedVertices.add(v1);\n expectedVertices.add(v2);\n expectedVertices.add(v3);\n expectedVertices.add(v4);\n\n assertEquals(expectedVertices, g.allVertices());\n\n Assert.assertTrue(g.remove(v1));\n\n }",
"public abstract int getVertexCount();",
"public Collection<V> getVertices();",
"public void testContainsVertex() {\n System.out.println(\"containsVertex\");\n\n Graph<Integer, Edge<Integer>> graph = generateGraph();\n\n for (int i = 0; i < 25; i++) {\n Assert.assertTrue(graph.containsVertex(new Integer(i)));\n }\n }",
"public boolean hasVertex(String name) {\n return mVertices.containsKey(name);\n }",
"@Override\r\n\tpublic Vector2f[] getVertices() {\n\t\treturn null;\r\n\t}",
"public boolean hasVertex(T vert);",
"public Vertex[] getVertices() {\n return arrayOfVertices;\n }",
"public int getNumVertices()\n\t{\n\t\t//TODO: Implement this method in WEEK 3\n\t\treturn numVertices;\n\t}",
"public int getNumVertices() {\n return num_vertices;\n }",
"public Collection< VDataT > vertexData();",
"public float[] getVertices() {\n/* 793 */ COSBase base = getCOSObject().getDictionaryObject(COSName.VERTICES);\n/* 794 */ if (base instanceof COSArray)\n/* */ {\n/* 796 */ return ((COSArray)base).toFloatArray();\n/* */ }\n/* 798 */ return null;\n/* */ }",
"@Test\r\n void create_edge_between_null_vertexes() {\r\n graph.addEdge(null, \"B\");\r\n graph.addEdge(\"A\", null);\r\n graph.addEdge(null, null);\r\n vertices = graph.getAllVertices();\r\n List<String> adjacentA = graph.getAdjacentVerticesOf(\"A\");\r\n List<String> adjacentB = graph.getAdjacentVerticesOf(\"B\");\r\n if(!vertices.isEmpty() | !adjacentA.isEmpty() | !adjacentB.isEmpty()) {\r\n fail();\r\n } \r\n }",
"@Test\n void test02_removeVertex() {\n graph.addVertex(\"a\");\n graph.addVertex(\"b\"); // adds two\n graph.removeVertex(\"a\"); // remove\n\n Set<String> vertices = new LinkedHashSet<>();\n vertices.add(\"a\");\n vertices.add(\"b\");\n vertices.remove(\"a\"); // creates a mock up vertex list\n\n if (!graph.getAllVertices().equals(vertices)) {\n fail(\"Graph didn't remove the vertices correctly\");\n }\n }",
"public ArrayList<Triangle> getOccluderVertexData();",
"@Override\r\n\tpublic boolean containsVertex(E key) {\r\n\t\treturn vertices.containsKey(key);\r\n\t}",
"public java.util.List<V> getVertices();",
"@Override\n public VertexCollection getVertexCollection() {\n return this.vertices.copy();\n }",
"public int getVertexCount() {\n\t\treturn this._vertices.size();\n\t}",
"public Enumeration vertices();",
"public List<Vertex> vertices() {\n return Collections.unmodifiableList(this.vertices);\n }",
"public abstract int getNumberOfVertices();",
"Collection<? extends Subdomain_group> getIsVertexOf();",
"@Test\n\tpublic void addVertexTest() {\n\t\tgraph.addVertex(A);\n\t\tgraph.addVertex(B);\n\t\tgraph.addVertex(C);\n\t\tgraph.addVertex(D);\n\t\tassertEquals(4, graph.vertices().size());\n\t\tassertTrue(graph.vertices().contains(A));\n\t\tassertTrue(graph.vertices().contains(B));\n\t\tassertTrue(graph.vertices().contains(D));\n\t\tassertFalse(graph.addVertex(B)); // the graph has already have the vertex B, so assert false here.\n\t}",
"public boolean isEmpty()\n {\n return graph.isEmpty();\n }",
"@Test\n\tvoid testVerticesExist() {\n\t\tLinkedHashSet<String> edges = new LinkedHashSet<String>();\n\n\t\tedges.add(\"Newark\");\n\t\tedges.add(\"New York\");\n\t\tmap.put(\"Boston\", edges);\n\t\tedges = map.get(\"Boston\");\n\t\tString[] edgesArray = new String[edges.size()];\n\t\tedgesArray = edges.toArray(edgesArray);\n\t\tAssertions.assertTrue(map.containsKey(\"Boston\"));\n\n\t\tedges = new LinkedHashSet<String>();\n\t\tedges.add(\"Philadelphia\");\n\t\tmap.put(\"Newark\", edges);\n\t\tedgesArray = new String[edges.size()];\n\t\tedgesArray = edges.toArray(edgesArray);\n\t\tAssertions.assertTrue(map.containsKey(\"Newark\"));\n\n\t\tedges = new LinkedHashSet<String>();\n\t\tedges.add(\"Albany\");\n\t\tmap.put(\"Trenton\", edges);\n\t\tedgesArray = new String[edges.size()];\n\t\tedgesArray = edges.toArray(edgesArray);\n\t\tAssertions.assertTrue(map.containsKey(\"Trenton\"));\n\t}",
"@Test\n void test03_addEdgeBetweenVerticesWhichDontExist() {\n graph.addEdge(\"a\", \"b\");\n Set<String> vertices = new LinkedHashSet<>();\n vertices.add(\"a\");\n vertices.add(\"b\"); // creates mock up vertex list\n if (!graph.getAllVertices().equals(vertices)) { // compares vertices list\n fail(\"Graph didn't add the vertices correctly\");\n }\n List<String> adjOfA = new ArrayList<>();\n adjOfA.add(\"b\"); // creates mock up adjacent list\n if (!graph.getAdjacentVerticesOf(\"a\").equals(adjOfA)) { // compares adjacent lists\n fail(\"Graph didn't correctly place adjacent vertices\");\n }\n }",
"public boolean isSetVertexOrigin() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __VERTEXORIGIN_ISSET_ID);\n }",
"@Test\r\n void remove_null() {\r\n graph.addEdge(\"A\", \"B\");\r\n graph.addEdge(\"B\", \"C\");\r\n graph.removeVertex(null);\r\n List<String> adjacent;\r\n vertices = graph.getAllVertices(); \r\n // Check that graph has all added vertexes\r\n if(!vertices.contains(\"A\")| !vertices.contains(\"B\")|\r\n !vertices.contains(\"C\")) {\r\n fail();\r\n }\r\n adjacent = graph.getAdjacentVerticesOf(\"A\");\r\n if (!adjacent.contains(\"B\"))\r\n fail();\r\n adjacent = graph.getAdjacentVerticesOf(\"B\");\r\n if (!adjacent.contains(\"C\"))\r\n fail();\r\n \r\n }",
"public boolean isVertex( VKeyT key );",
"public int getVertices() {\n return verticesNumber;\n }",
"public native VertexList clear();",
"public float[] getVertices() {\r\n\t\treturn vertices;\r\n\t}",
"@Test\n void test04_checkOrder() {\n graph.addVertex(\"a\");\n graph.addVertex(\"b\");\n graph.addVertex(\"c\");\n graph.addVertex(\"d\");\n graph.addVertex(\"e\");\n graph.addVertex(\"f\"); // added 6 items\n if (graph.order() != 6) {\n fail(\"graph has counted incorrect number of vertices\");\n }\n }",
"@Override\n public boolean isEmpty(){\n return points.isEmpty();\n }",
"public List<wVertex> getVertices(){\r\n return vertices;\r\n }",
"public Set<String> getVertices() {\n\t\treturn vertices;\n\t}",
"@Test\r\n void test_insert_50_vertex_check() {\r\n String str;\r\n for(int i = 0; i < 50; i++) {\r\n str = \"\" + i;\r\n graph.addVertex(str);\r\n }\r\n vertices = graph.getAllVertices();\r\n for(int j = 0; j < 50; j++) {\r\n str = \"\" + j;\r\n if (!vertices.contains(str))\r\n fail(\"Insert not working!!\");\r\n }\r\n }",
"List<V> getVertexList();",
"public int getNumVertices(){\n return numVertices;\n }",
"public Integer numUnknownVerts()\n\t{\n\t\tif (total_verts == null) return null;\n\t\treturn total_verts - nodes.size();\n\t}",
"public Vertex[] getVertices() {\n\t\treturn this._vertices.toArray(new Vertex[0]);\n\t}",
"public HashSet<Town> getVertices() {\r\n\t\treturn (HashSet<Town>) vertices;\r\n\t}",
"public void finish(){\n //check start vertex is valid for given algorithm\n }",
"@Override\n\t\tpublic int getRowCount() {\n\t\t\treturn app.graph.verticesCount;\n\t\t}",
"boolean contains(int vertex);",
"public int getVertexCount() {\n return vertexCount;\n }",
"public long getVertexCount(){\n return vertexCount;\n }",
"boolean containsVertex(V v);",
"public void testEdgesSet_ofVertices() {\n System.out.println(\"edgesSet\");\n\n Graph<Integer, Edge<Integer>> graph = generateGraph();\n\n for (int i = 0; i < 25; i++) {\n for (int j = 0; j < 25; j++) {\n Set<Edge<Integer>> set = graph.edgesSet(new Integer(i), new Integer(j));\n\n if ((i + j) % 2 == 0) {\n Assert.assertEquals(set.size(), 1);\n } else {\n Assert.assertEquals(set.size(), 0);\n }\n }\n }\n }",
"@Override\n\tpublic boolean contains(Object vertex) {\n\t\treturn vertices.contains(vertex);\n\t}",
"public int getVertexCount() {\n if (hasIndices())\n return indices.length;\n if (hasVertices())\n return vertices.length / 3;\n logger.warn(\"No indices or vertices set, vertex count returning 0!\");\n return 0;\n }",
"public void testCreateAndSetOnSameVertexShouldCreateOnlyVertexOnly() {\n }",
"@Test\n @org.junit.Ignore\n public void shouldConstructDetachedVertex() {\n }",
"@Test\n void testAddVertexGraph() {\n Assertions.assertTrue(graph.addVertex(v1));\n Assertions.assertTrue(graph.containsVertex(v1));\n Assertions.assertTrue(checkInv());\n }",
"public boolean pathExists(int startVertex, int stopVertex) {\n// your code here\n ArrayList<Integer> fetch_result = visitAll(startVertex);\n if(fetch_result.contains(stopVertex)){\n return true;\n }\n return false;\n }",
"public Vector3f[] getVertices() {\n return vertices;\n }",
"@Test\n void test05_checkSize() {\n graph.addVertex(\"a\");\n graph.addVertex(\"b\");\n graph.addVertex(\"c\"); // adds three vertices\n graph.addEdge(\"a\", \"b\");\n graph.addEdge(\"b\", \"c\");\n graph.addEdge(\"c\", \"b\"); // add three edges\n if (graph.size() != 3) {\n fail(\"graph has counted incorrect number of edges\");\n }\n }",
"@Test(expected = NoVertexException.class)\n\tpublic void testNoVertexException() throws Exception {\n\t\tGraphPoetFactory graph = new GraphPoetFactory();\n\t\tgraph.parse(\"GraphName=PoetGraph\");\n\t\tgraph.parse(\"EdgeType=WordNeighborhood\");\n\t\tgraph.parse(\"GraphType=GraphPoet\");\n\t\tgraph.parse(\"VertexType=Word\");\n\t\tgraph.parse(\"Vertex=<a,Word>\");\n\t\tgraph.parse(\"Vertex=<b,Word>\");\n\t\tgraph.parse(\"Edge=<ab,WordNeighborhood,1,a,b,Yes>\");\n\t\tgraph.parse(\"Edge=<ac,WordNeighborhood,1,a,c,Yes>\");\n\t}",
"@Override\n public Set<Vertex> getVertices() {\n Set<Vertex> vertices = new HashSet<Vertex>();\n vertices.add(sourceVertex);\n vertices.add(targetVertex);\n return vertices;\n }",
"public E[] verticesView ()\n {\n E[] allVertices = (E[]) new Object[lastIndex + 1];\n for (int index = 0; index < allVertices.length; index++)\n allVertices[index] = this.vertices[index];\n\n return allVertices;\n }",
"public int getMinimumVertexCount()\r\n {\r\n return theMinimumVertexCount;\r\n }",
"@Override\r\n\tpublic int getOrder() {\r\n\t\treturn vertices.size();\r\n\t}",
"public boolean isEmpty() {\n return points.isEmpty();\n }",
"public boolean isEmpty() {\n return mPoints.isEmpty();\n }"
] | [
"0.8082728",
"0.76752806",
"0.7631434",
"0.75906336",
"0.7156694",
"0.71431196",
"0.71104485",
"0.7083014",
"0.68529046",
"0.6727092",
"0.66249883",
"0.66140527",
"0.65514934",
"0.65514785",
"0.65050477",
"0.6492011",
"0.6492011",
"0.64655226",
"0.64595044",
"0.64453703",
"0.6424495",
"0.6417537",
"0.64164335",
"0.64070404",
"0.64044166",
"0.63904667",
"0.63623786",
"0.634814",
"0.6345396",
"0.63327736",
"0.6311837",
"0.6295715",
"0.6295715",
"0.6292737",
"0.62891126",
"0.62842405",
"0.6267457",
"0.62596494",
"0.6251712",
"0.6237523",
"0.6187566",
"0.6165242",
"0.61478305",
"0.6140525",
"0.61165935",
"0.61165774",
"0.61095965",
"0.61092365",
"0.6108333",
"0.61081594",
"0.60943025",
"0.60837615",
"0.6082003",
"0.6081617",
"0.6079983",
"0.6070233",
"0.6068289",
"0.6058822",
"0.6053264",
"0.60478616",
"0.6047274",
"0.60386086",
"0.6030134",
"0.60225654",
"0.6022166",
"0.6020401",
"0.60079885",
"0.5994378",
"0.5981684",
"0.5977896",
"0.5974014",
"0.59710276",
"0.5965592",
"0.5946747",
"0.59466594",
"0.59427786",
"0.5927469",
"0.5927042",
"0.59249717",
"0.59107244",
"0.59065574",
"0.59036815",
"0.59030527",
"0.5898107",
"0.5884897",
"0.58825934",
"0.5877785",
"0.5866302",
"0.5862582",
"0.5817599",
"0.5793439",
"0.57929146",
"0.57876694",
"0.57815975",
"0.5780785",
"0.5766391",
"0.57645917",
"0.5763991",
"0.5763961",
"0.575125"
] | 0.7713333 | 1 |
TRAVERSAL IMPORT: label (String) EXPORT: queue (DSAQueue) ASSERTION: Wrapper for DEPTH FIRST SEARCH Imports start point, Exports queue of objs in traversal order Throws: NoSuchElementException | public DSAQueue depthFirstSearch(String start)
{
if(!vertices.isEmpty())
{
DSAQueue queue = new DSAQueue();
DSAGraphVertex vx = getVertex(start); //vertex to start on (root)
DSAStack visited = new DSAStack(); //creates empty stack
clear(); //sets all vertices as not visited
vx.setVisited(); // Marks root as visited
queue.enqueue(vx); //start point
dfs(vx, visited, queue); //begin recursion
return queue;
}
else
{
throw new NoSuchElementException("List is empty");
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String breadthFirstSearch( AnyType start_vertex ) throws VertexException {\n \n StringBuffer buffer = new StringBuffer();\n \n // ----------------------------\n // TODO: Add your code here\n // ----------------------------\n boolean exists = false;\n Vertex<AnyType> S = new Vertex<AnyType>(start_vertex);\n int counter = 1;\n //make new vertex to check if its in list\n //make queue to hold vertices\n SemiConstantTimeQueue<Vertex<AnyType>> queue = new SemiConstantTimeQueue<Vertex<AnyType>>();\n //loop through and set not visited\n for( int i = 0; i < vertex_adjacency_list.size(); i++){\n vertex_adjacency_list.get(i).setVisited(-1);\n //if it's in list then set exists to true\n //and set visited \n if(vertex_adjacency_list.get(i).compareTo(S) == 0){\n exists = true;\n vertex_adjacency_list.get(i).setVisited(counter);\n counter = i;\n }\n } \n //if doesn't exist then throw the exception\n if(exists == false){\n throw new VertexException(\"Start Vertex does not exist\");\n }\n //make new queue\n queue.add(vertex_adjacency_list.get(counter));\n vertex_adjacency_list.get(counter).setVisited(1);\n counter = 1;\n int k=0;\n Vertex<AnyType>e;\n //while the queue isn't empty\n while(queue.peek() !=null){\n //make e the top of the queue \n e = queue.peek(); \n //go through the list and if you reach the begining it exits loop\n for( k = 0; k < vertex_adjacency_list.size()-1; k++){\n if(vertex_adjacency_list.get(k).compareTo(e)==0){\n break;\n }\n } \n //go through loop and check if visited, if not then add it to queue, set visited\n for( int j = 0; j< vertex_adjacency_list.get(k).numberOfAdjacentVertices(); j++){\n if(vertex_adjacency_list.get(k).getAdjacentVertex(j).hasBeenVisited()==false){\n counter++;\n queue.add(vertex_adjacency_list.get(k).getAdjacentVertex(j));\n vertex_adjacency_list.get(k).getAdjacentVertex(j).setVisited(counter);\n }\n }\n //remove from queue when through loop once\n k++;\n queue.remove();\n }\n //loop through list and print vertex and when it was visited\n for(int o = 0; o< vertex_adjacency_list.size(); o++){\n buffer.append(vertex_adjacency_list.get(o) + \":\" + vertex_adjacency_list.get(o).getVisited()+ \"\\n\");\n }\n return buffer.toString();\n }",
"public DSAQueue breadthFirstSearch(String start, String target)\n\t{\n\t\tif(!vertices.isEmpty())\n\t\t{\n\t\t\tDSAQueue queue = new DSAQueue();\n\t\t\tDSAStack visited = new DSAStack();\t//creates empty stack\n\t\t\tDSAGraphVertex vx = getVertex(start); //vertex to start on (root)\n\t\t\tDSAGraphVertex dest = getVertex(target); //vertex to start on (dest)\n\n\t\t\tclear(); //sets all visited on all vertices == false\n\t\t\tvx.setVisited(); // Marks root as visited\n\t\t\tqueue.enqueue(vx); //adds start point to queue\n\n\t\t\tbfs(vx, visited, queue, dest); //begin recursion\n\n\t\t\tqueue.enqueue(dest); //if successful adds destination to queue\n\n\t\t\treturn queue;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthrow new NoSuchElementException(\"List is empty or start or end elements don't exist\");\n\t\t}\n\t}",
"private Queue<Integer> breadthSearch(int i, int j, Queue<Integer> queue, Queue<Integer> path) {\n while(queue.size() != 0) {\n queue.poll();\n }//while\n return new LinkedList();\n }",
"public interface WorkAheadQueueADT<T> extends QueueADT<T> {\n \n /**\n * Removes and returns the element that is at place x in the queue.\n * Precondition: x must be less than 3, x must be less than size\n * Note: indexing from 0: 0 == front element, 1 == second element, etc.\n * @param x the passed in index of the element to be removed\n * @return the element removed from the queue\n * @throws EmptyCollectionException if the queue is empty\n * @throws InvalidArgumentException if x > 2, or x > size of collection\n * \n */\n public T dequeue(int x) throws EmptyCollectionException, \n InvalidArgumentException;\n \n /**\n * Returns (without removing) the element that is at place x in the queue.\n * Precondition: x must be less than 3, x must be less than size\n * Note: indexing from 0: 0 == front element, 1 == second element, etc.\n * @return the element at the front of the queue\n * @throws EmptyCollectionException if the queue is empty\n * @throws InvalidArgumentException if x > 2, or x > size of collection\n * @param x the specified index of the element to return\n */\n public T first(int x)throws EmptyCollectionException, \n InvalidArgumentException;\n \n /**\n * Returns an ArrayList of the first three nodes in the queue.\n * @return ArrayList<LinearNode<T>> array list of nodes\n * @throws EmptyCollectionException if the queue is empty\n */\n public ArrayList<LinearNode<T>> firstThreeNodes() throws \n EmptyCollectionException;\n \n /**\n * Returns an ArrayList of the first three elements in the queue.\n * @return ArrayList<T> array list of elements\n * @throws EmptyCollectionException if the queue is empty\n */\n public ArrayList<T> firstThreeElements() throws EmptyCollectionException;\n}",
"public List<Graph> search() {\n\n long start = System.currentTimeMillis();\n TetradLogger.getInstance().log(\"info\", \"Starting ION Search.\");\n logGraphs(\"\\nInitial Pags: \", this.input);\n TetradLogger.getInstance().log(\"info\", \"Transfering local information.\");\n long steps = System.currentTimeMillis();\n\n /*\n * Step 1 - Create the empty graph\n */\n List<Node> varNodes = new ArrayList<>();\n for (String varName : variables) {\n varNodes.add(new GraphNode(varName));\n }\n Graph graph = new EdgeListGraph(varNodes);\n\n /*\n * Step 2 - Transfer local information from the PAGs (adjacencies\n * and edge orientations)\n */\n // transfers edges from each graph and finds definite noncolliders\n transferLocal(graph);\n // adds edges for variables never jointly measured\n for (NodePair pair : nonIntersection(graph)) {\n graph.addEdge(new Edge(pair.getFirst(), pair.getSecond(), Endpoint.CIRCLE, Endpoint.CIRCLE));\n }\n TetradLogger.getInstance().log(\"info\", \"Steps 1-2: \" + (System.currentTimeMillis() - steps) / 1000. + \"s\");\n System.out.println(\"step2\");\n System.out.println(graph);\n\n /*\n * Step 3\n *\n * Branch and prune step that blocks problematic undirectedPaths, possibly d-connecting undirectedPaths\n */\n steps = System.currentTimeMillis();\n Queue<Graph> searchPags = new LinkedList<>();\n // place graph constructed in step 2 into the queue\n searchPags.offer(graph);\n // get d-separations and d-connections\n List<Set<IonIndependenceFacts>> sepAndAssoc = findSepAndAssoc(graph);\n this.separations = sepAndAssoc.get(0);\n this.associations = sepAndAssoc.get(1);\n Map<Collection<Node>, List<PossibleDConnectingPath>> paths;\n// Queue<Graph> step3PagsSet = new LinkedList<Graph>();\n HashSet<Graph> step3PagsSet = new HashSet<>();\n Set<Graph> reject = new HashSet<>();\n // if no d-separations, nothing left to search\n if (separations.isEmpty()) {\n // makes orientations preventing definite noncolliders from becoming colliders\n // do final orientations\n// doFinalOrientation(graph);\n step3PagsSet.add(graph);\n }\n // sets length to iterate once if search over path lengths not enabled, otherwise set to 2\n int numNodes = graph.getNumNodes();\n int pl = numNodes - 1;\n if (pathLengthSearch) {\n pl = 2;\n }\n // iterates over path length, then adjacencies\n for (int l = pl; l < numNodes; l++) {\n if (pathLengthSearch) {\n TetradLogger.getInstance().log(\"info\", \"Braching over path lengths: \" + l + \" of \" + (numNodes - 1));\n }\n int seps = separations.size();\n int currentSep = 1;\n int numAdjacencies = separations.size();\n for (IonIndependenceFacts fact : separations) {\n if (adjacencySearch) {\n TetradLogger.getInstance().log(\"info\", \"Braching over path nonadjacencies: \" + currentSep + \" of \" + numAdjacencies);\n }\n seps--;\n // uses two queues to keep up with which PAGs are being iterated and which have been\n // accepted to be iterated over in the next iteration of the above for loop\n searchPags.addAll(step3PagsSet);\n recGraphs.add(searchPags.size());\n step3PagsSet.clear();\n while (!searchPags.isEmpty()) {\n System.out.println(\"ION Step 3 size: \" + searchPags.size());\n double currentUsage = Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory();\n if (currentUsage > maxMemory) maxMemory = currentUsage;\n // deques first PAG from searchPags\n Graph pag = searchPags.poll();\n // Part 3.a - finds possibly d-connecting undirectedPaths between each pair of nodes\n // known to be d-separated\n List<PossibleDConnectingPath> dConnections = new ArrayList<>();\n // checks to see if looping over adjacencies\n if (adjacencySearch) {\n for (Collection<Node> conditions : fact.getZ()) {\n // checks to see if looping over path lengths\n if (pathLengthSearch) {\n dConnections.addAll(PossibleDConnectingPath.findDConnectingPathsOfLength\n (pag, fact.getX(), fact.getY(), conditions, l));\n } else {\n dConnections.addAll(PossibleDConnectingPath.findDConnectingPaths\n (pag, fact.getX(), fact.getY(), conditions));\n }\n }\n } else {\n for (IonIndependenceFacts allfact : separations) {\n for (Collection<Node> conditions : allfact.getZ()) {\n // checks to see if looping over path lengths\n if (pathLengthSearch) {\n dConnections.addAll(PossibleDConnectingPath.findDConnectingPathsOfLength\n (pag, allfact.getX(), allfact.getY(), conditions, l));\n } else {\n dConnections.addAll(PossibleDConnectingPath.findDConnectingPaths\n (pag, allfact.getX(), allfact.getY(), conditions));\n }\n }\n }\n }\n // accept PAG go to next PAG if no possibly d-connecting undirectedPaths\n if (dConnections.isEmpty()) {\n// doFinalOrientation(pag);\n// Graph p = screenForKnowledge(pag);\n// if (p != null) step3PagsSet.add(p);\n step3PagsSet.add(pag);\n continue;\n }\n // maps conditioning sets to list of possibly d-connecting undirectedPaths\n paths = new HashMap<>();\n for (PossibleDConnectingPath path : dConnections) {\n List<PossibleDConnectingPath> p = paths.get(path.getConditions());\n if (p == null) {\n p = new LinkedList<>();\n }\n p.add(path);\n paths.put(path.getConditions(), p);\n }\n // Part 3.b - finds minimal graphical changes to block possibly d-connecting undirectedPaths\n List<Set<GraphChange>> possibleChanges = new ArrayList<>();\n for (Set<GraphChange> changes : findChanges(paths)) {\n Set<GraphChange> newChanges = new HashSet<>();\n for (GraphChange gc : changes) {\n boolean okay = true;\n for (Triple collider : gc.getColliders()) {\n\n if (pag.isUnderlineTriple(collider.getX(), collider.getY(), collider.getZ())) {\n okay = false;\n break;\n }\n\n }\n if (!okay) {\n continue;\n }\n for (Triple collider : gc.getNoncolliders()) {\n if (pag.isDefCollider(collider.getX(), collider.getY(), collider.getZ())) {\n okay = false;\n break;\n }\n }\n if (okay) {\n newChanges.add(gc);\n }\n }\n if (!newChanges.isEmpty()) {\n possibleChanges.add(newChanges);\n } else {\n possibleChanges.clear();\n break;\n }\n }\n float starthitset = System.currentTimeMillis();\n Collection<GraphChange> hittingSets = IonHittingSet.findHittingSet(possibleChanges);\n recHitTimes.add((System.currentTimeMillis() - starthitset) / 1000.);\n // Part 3.c - checks the newly constructed graphs from 3.b and rejects those that\n // cycles or produce independencies known not to occur from the input PAGs or\n // include undirectedPaths from definite nonancestors\n for (GraphChange gc : hittingSets) {\n boolean badhittingset = false;\n for (Edge edge : gc.getRemoves()) {\n Node node1 = edge.getNode1();\n Node node2 = edge.getNode2();\n Set<Triple> triples = new HashSet<>();\n triples.addAll(gc.getColliders());\n triples.addAll(gc.getNoncolliders());\n if (triples.size() != (gc.getColliders().size() + gc.getNoncolliders().size())) {\n badhittingset = true;\n break;\n }\n for (Triple triple : triples) {\n if (node1.equals(triple.getY())) {\n if (node2.equals(triple.getX()) ||\n node2.equals(triple.getZ())) {\n badhittingset = true;\n break;\n }\n }\n if (node2.equals(triple.getY())) {\n if (node1.equals(triple.getX()) ||\n node1.equals(triple.getZ())) {\n badhittingset = true;\n break;\n }\n }\n }\n if (badhittingset) {\n break;\n }\n for (NodePair pair : gc.getOrients()) {\n if ((node1.equals(pair.getFirst()) && node2.equals(pair.getSecond())) ||\n (node2.equals(pair.getFirst()) && node1.equals(pair.getSecond()))) {\n badhittingset = true;\n break;\n }\n }\n if (badhittingset) {\n break;\n }\n }\n if (!badhittingset) {\n for (NodePair pair : gc.getOrients()) {\n for (Triple triple : gc.getNoncolliders()) {\n if (pair.getSecond().equals(triple.getY())) {\n if (pair.getFirst().equals(triple.getX()) &&\n pag.getEndpoint(triple.getZ(), triple.getY()).equals(Endpoint.ARROW)) {\n badhittingset = true;\n break;\n\n }\n if (pair.getFirst().equals(triple.getZ()) &&\n pag.getEndpoint(triple.getX(), triple.getY()).equals(Endpoint.ARROW)) {\n badhittingset = true;\n break;\n }\n }\n if (badhittingset) {\n break;\n }\n }\n if (badhittingset) {\n break;\n }\n }\n }\n if (badhittingset) {\n continue;\n }\n Graph changed = gc.applyTo(pag);\n // if graph change has already been rejected move on to next graph\n if (reject.contains(changed)) {\n continue;\n }\n // if graph change has already been accepted move on to next graph\n if (step3PagsSet.contains(changed)) {\n continue;\n }\n // reject if null, predicts false independencies or has cycle\n if (predictsFalseIndependence(associations, changed)\n || changed.existsDirectedCycle()) {\n reject.add(changed);\n }\n // makes orientations preventing definite noncolliders from becoming colliders\n // do final orientations\n// doFinalOrientation(changed);\n // now add graph to queue\n\n// Graph p = screenForKnowledge(changed);\n// if (p != null) step3PagsSet.add(p);\n step3PagsSet.add(changed);\n }\n }\n // exits loop if not looping over adjacencies\n if (!adjacencySearch) {\n break;\n }\n }\n }\n TetradLogger.getInstance().log(\"info\", \"Step 3: \" + (System.currentTimeMillis() - steps) / 1000. + \"s\");\n Queue<Graph> step3Pags = new LinkedList<>(step3PagsSet);\n\n /*\n * Step 4\n *\n * Finds redundant undirectedPaths and uses this information to expand the list\n * of possible graphs\n */\n steps = System.currentTimeMillis();\n Map<Edge, Boolean> necEdges;\n Set<Graph> outputPags = new HashSet<>();\n\n while (!step3Pags.isEmpty()) {\n Graph pag = step3Pags.poll();\n necEdges = new HashMap<>();\n // Step 4.a - if x and y are known to be unconditionally associated and there is\n // exactly one trek between them, mark each edge on that trek as necessary and\n // make the tiples on the trek definite noncolliders\n // initially mark each edge as not necessary\n for (Edge edge : pag.getEdges()) {\n necEdges.put(edge, false);\n }\n // look for unconditional associations\n for (IonIndependenceFacts fact : associations) {\n for (List<Node> nodes : fact.getZ()) {\n if (nodes.isEmpty()) {\n List<List<Node>> treks = treks(pag, fact.x, fact.y);\n if (treks.size() == 1) {\n List<Node> trek = treks.get(0);\n List<Triple> triples = new ArrayList<>();\n for (int i = 1; i < trek.size(); i++) {\n // marks each edge in trek as necessary\n necEdges.put(pag.getEdge(trek.get(i - 1), trek.get(i)), true);\n if (i == 1) {\n continue;\n }\n // makes each triple a noncollider\n pag.addUnderlineTriple(trek.get(i - 2), trek.get(i - 1), trek.get(i));\n }\n }\n // stop looping once the empty set is found\n break;\n }\n }\n }\n // Part 4.b - branches by generating graphs for every combination of removing\n // redundant undirectedPaths\n boolean elimTreks;\n // checks to see if removing redundant undirectedPaths eliminates every trek between\n // two variables known to be nconditionally assoicated\n List<Graph> possRemovePags = possRemove(pag, necEdges);\n double currentUsage = Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory();\n if (currentUsage > maxMemory) maxMemory = currentUsage;\n for (Graph newPag : possRemovePags) {\n elimTreks = false;\n // looks for unconditional associations\n for (IonIndependenceFacts fact : associations) {\n for (List<Node> nodes : fact.getZ()) {\n if (nodes.isEmpty()) {\n if (treks(newPag, fact.x, fact.y).isEmpty()) {\n elimTreks = true;\n }\n // stop looping once the empty set is found\n break;\n }\n }\n }\n // add new PAG to output unless a necessary trek has been eliminated\n if (!elimTreks) {\n outputPags.add(newPag);\n }\n }\n }\n outputPags = removeMoreSpecific(outputPags);\n// outputPags = applyKnowledge(outputPags);\n\n TetradLogger.getInstance().log(\"info\", \"Step 4: \" + (System.currentTimeMillis() - steps) / 1000. + \"s\");\n\n /*\n * Step 5\n *\n * Generate the Markov equivalence classes for graphs and accept only\n * those that do not predict false d-separations\n */\n steps = System.currentTimeMillis();\n Set<Graph> outputSet = new HashSet<>();\n for (Graph pag : outputPags) {\n Set<Triple> unshieldedPossibleColliders = new HashSet<>();\n for (Triple triple : getPossibleTriples(pag)) {\n if (!pag.isAdjacentTo(triple.getX(), triple.getZ())) {\n unshieldedPossibleColliders.add(triple);\n }\n }\n\n PowerSet<Triple> pset = new PowerSet<>(unshieldedPossibleColliders);\n for (Set<Triple> set : pset) {\n Graph newGraph = new EdgeListGraph(pag);\n for (Triple triple : set) {\n newGraph.setEndpoint(triple.getX(), triple.getY(), Endpoint.ARROW);\n newGraph.setEndpoint(triple.getZ(), triple.getY(), Endpoint.ARROW);\n }\n doFinalOrientation(newGraph);\n }\n for (Graph outputPag : finalResult) {\n if (!predictsFalseIndependence(associations, outputPag)) {\n Set<Triple> underlineTriples = new HashSet<>(outputPag.getUnderLines());\n for (Triple triple : underlineTriples) {\n outputPag.removeUnderlineTriple(triple.getX(), triple.getY(), triple.getZ());\n }\n outputSet.add(outputPag);\n }\n }\n }\n\n// outputSet = applyKnowledge(outputSet);\n outputSet = checkPaths(outputSet);\n\n output.addAll(outputSet);\n TetradLogger.getInstance().log(\"info\", \"Step 5: \" + (System.currentTimeMillis() - steps) / 1000. + \"s\");\n runtime = ((System.currentTimeMillis() - start) / 1000.);\n logGraphs(\"\\nReturning output (\" + output.size() + \" Graphs):\", output);\n double currentUsage = Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory();\n if (currentUsage > maxMemory) maxMemory = currentUsage;\n return output;\n }",
"private void loadNext() {\n\n String\tsql\t= \"SELECT * FROM MPC_Order_NodeNext WHERE MPC_Order_Node_ID=? AND IsActive='Y' ORDER BY SeqNo\";\n boolean\tsplitAnd\t= SPLITELEMENT_AND.equals(getSplitElement());\n\n try {\n\n PreparedStatement\tpstmt\t= DB.prepareStatement(sql);\n\n pstmt.setInt(1, getID());\n\n ResultSet\trs\t= pstmt.executeQuery();\n\n while (rs.next()) {\n\n MMPCOrderNodeNext\tnext\t= new MMPCOrderNodeNext(getCtx(), rs, \"MPC_Order_NodeNext\");\n\n next.setFromSplitAnd(splitAnd);\n m_next.add(next);\n }\n\n rs.close();\n pstmt.close();\n\n } catch (SQLException e) {\n log.log(Level.SEVERE, \"loadNext\", e);\n }\n\n log.info(\"loadNext #\" + m_next.size());\n\n }",
"public interface BdObjectGraph\r\n{\r\n // Object Graph is a tree representation of BD object.\r\n // From root node to sub child node to finally leaf object graph shows the location of object.\r\n // for example \r\n //root=station,\r\n //station has 3 clusters=Nodes\r\n // Clusters has many objects for example file objects,schedule objects \r\n // then sub-node=file object,schedule object \r\n //Each node has resource description allocator,for example if i want to get file object in clsuter1\r\n //in station1 then resource description allocator of Big Dinosaur gives me \r\n //stationname,clustername,filename as a query \r\n //the syntax for query has to be decided in what format\r\n // may be station:cluster:where:filename=\"big dinosaur u will rule \"\r\n //Challenges:On what interval of time the BdObjectGraph has to be persist or it is stored in file system or create object\r\n //in runtime \r\n//////////////////////////////////\r\n //May be representing tree in file system or in object \r\n \r\n //for Example Example 1\r\n // Bd has different types of object graph on the basis of object type\r\n // which tree as object graph to search is determined on the basis of query syntax\r\n // for example\r\n // Station:Abcbankclientstation(in sense it represent one machine virtually but is a collection of many physical clusters or virtual clusters)\r\n // this will search station tree object with key as Abcbankclientstation.It goes on traversing on tree until it gets Abcbankclientstation and gets space object allcoated for this client in sense of cluster \r\n\r\n //for Example Example 2\r\n //Now after transversing cluster object with allocated space is retirved then again i need to retirve file object from that cluster\r\n //then again the query is \r\n //Station:Abcbankclientstation:insurancestore:abishkar.txt\r\n //now again file object graph tree is traversed until i get abishkar.txt and goes on recusrsively\r\n //or \r\n //Station:Abcbankclientstation:insurancestore:insuranceObject\r\n //insurancestore has large no of insuranceObject kept as tree,so again insurancestore is traversed until\r\n //insuranceObject is retirved and goes on recusrsively \r\n \r\n \r\n //Object graph is continuously updated ot inserted by another program in continuous basis on the basis of tree type object\r\n \r\n}",
"private void breadthFirstSearch (int start, int[] visited, int[] parent){\r\n Queue< Integer > theQueue = new LinkedList< Integer >();\r\n boolean[] identified = new boolean[getNumV()];\r\n identified[start] = true;\r\n theQueue.offer(start);\r\n while (!theQueue.isEmpty()) {\r\n int current = theQueue.remove();\r\n visited[current] = 1; //ziyaret edilmis vertexler queuedan cikarilan vertexlerdir\r\n Iterator < Edge > itr = edgeIterator(current);\r\n while (itr.hasNext()) {\r\n Edge edge = itr.next();\r\n int neighbor = edge.getDest();\r\n if (!identified[neighbor]) {\r\n identified[neighbor] = true;\r\n theQueue.offer(neighbor);\r\n parent[neighbor] = current;\r\n }\r\n }\r\n }\r\n }",
"void processImports() {\n FamixImport foundImport;\n\t\tArrayList<FamixImport> foundImportsList;\n\t\tArrayList<FamixImport> alreadyIncludedImportsList;\n\t\timportsPerEntity = new HashMap<String, ArrayList<FamixImport>>();\n\t \n\t\ttry{\n\t for (FamixAssociation association : theModel.associations) {\n \tString uniqueNameFrom = association.from;\n\t \tfoundImport = null;\n\t if (association instanceof FamixImport) {\n\t \tfoundImport = (FamixImport) association;\n\t // Fill HashMap importsPerEntity \n\t \talreadyIncludedImportsList = null;\n\t \tif (importsPerEntity.containsKey(uniqueNameFrom)){\n\t \t\talreadyIncludedImportsList = importsPerEntity.get(uniqueNameFrom);\n\t \t\talreadyIncludedImportsList.add(foundImport);\n\t \t\timportsPerEntity.put(uniqueNameFrom, alreadyIncludedImportsList);\n\t \t}\n\t \telse{\n\t\t\t \tfoundImportsList = new ArrayList<FamixImport>();\n\t\t \tfoundImportsList.add(foundImport);\n\t\t \timportsPerEntity.put(uniqueNameFrom, foundImportsList);\n\t \t}\n\t }\n\t }\n\t\t} catch(Exception e) {\n\t this.logger.warn(new Date().toString() + \"Exception may result in incomplete dependency list. Exception: \" + e);\n\t //e.printStackTrace();\n\t\t}\n }",
"@Override\n public void nextTuple() {\n \tint fileCount = XPathCrawler.getInstance().getFileCount().get();\n \tif(XPathCrawler.getInstance().getFrontier().isEmpty()) { //refill from disk\n \t\tURLSpout.activeThreads.getAndIncrement();\n \t\t//System.out.println(\"refill time\");\n \t\tString url;\n\t\t\ttry {\n\t\t\t\twhile(!reader.ready()) {\n\t\t\t\t\t//System.out.println(\"busy\");\n\t\t\t\t}\n\t\t\t\turl = reader.readLine();\n\t\t\t\tif(url != null) {\n\t\t\t\t\t//System.out.println(\"enqueue: \" + url);\n\t \t\t\tXPathCrawler.getInstance().getFrontier().enqueue(url);\n\t \t\t\twhile(url != null) {\n\t \t\t\t\t//System.out.println(\"reading from file. Size is: \" + XPathCrawler.getInstance().getFrontier().getSize());\n\t \t\t\t\turl = reader.readLine();\n\t \t\t\t\tif(url == null) {\n\t \t\t\t\t\tbreak;\n\t \t\t\t\t}\n\t \t\t\t\t//System.out.println(\"enqueue2: \" + url);\n\t \t\t\t\tXPathCrawler.getInstance().getFrontier().enqueue(url);\n\t \t\t\t\tif(XPathCrawler.getInstance().getFrontier().getSize() >= XPathCrawler.FRONTIER_BUFFER_SIZE) { //buffe\n\t \t\t\t\t\tbreak;\n\t \t\t\t\t}\n\t \t\t\t}\n\t \t\t}\n\t\t\t} catch (IOException e) {\t\t\t\t\n\t\t\t\tSystem.out.println(\"unable to read from URLDisk file\");\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tfinally {\n\t\t\t\tURLSpout.activeThreads.getAndDecrement();\n\t\t\t}\t\t\t\n \t}\n \t\n \tif(XPathCrawler.getInstance().getFrontier().isEmpty() || fileCount >= XPathCrawler.getInstance().getMaxFileNum()) { // Handle Shutdown\n \t\tif(URLSpout.getActiveThreads() <= 0 && CrawlerBolt.getActiveThreads() <= 0 && DocumentParserBolt.getActiveThreads() <= 0 && URLFilterBolt.getActiveThreads() <= 0 && \n \t\t\tXPathCrawler.getInstance().getInFlightMessages() <= 0) {\n \t\t\tXPathCrawler.getInstance().shutdown(); //call shutdown\n \t\t\t//System.out.println(\"Spout Called Shutdown\");\n \t\t\treturn;\n \t\t} else {\n \t\t\treturn; //just return and don't emit anything\n \t\t}\n \t\t\n \t} else {\n \t\tURLSpout.activeThreads.getAndIncrement(); //isIdle is now 1, hence this thread is not idle\n \tString url = XPathCrawler.getInstance().getFrontier().dequeue();\n \tif(url.startsWith(\"http://\")) {\n \t\tURLInfo urlInfo = new URLInfo(url);\t\n \t\tif(urlInfo.getHostName() == null) {\n \t\t\tURLSpout.activeThreads.decrementAndGet();\n \t\t\treturn;\n \t\t}\n \t\tString portString = \":\" + Integer.toString(urlInfo.getPortNo());\n \t\t\t if(!url.contains(portString)) { //make sure URL is in the form http://xyz.com:80/\n \t\t\t\t StringBuilder newURL = new StringBuilder(url);\n \t \t\t\t int index = 7 + urlInfo.getHostName().length();\n \t \t\t\t newURL.insert(index, portString);\n \t\t\t\t url = newURL.toString();\n \t\t\t }\n \t\t\t \n \t//log.debug(getExecutorId() + \" emitting \" + url);\n \t this.collector.emit(new Values<Object>(urlInfo.getHostName(), url, \"http\"));\n \t \n \t XPathCrawler.getInstance().incrementInflightMessages(); //signals a message is currently being routed\n \t}else {\n \t\ttry {\n\t\t\t\t\tURL httpsUrl = new URL(url); //emit https url\n\t\t\t\t\tint port = httpsUrl.getPort() == -1 ? 443 : httpsUrl.getPort();\n\t\t\t\t\tString portString = \":\" + Integer.toString(port);\n\t\t\t\t\tif(!url.contains(portString)) { //make sure URL is in the form http://xyz.com:443/\n\t \t\t\t\t StringBuilder newURL = new StringBuilder(url);\n\t \t \t\t\t int index = 8 + httpsUrl.getHost().length();\n\t \t \t\t\t newURL.insert(index, portString);\n\t \t\t\t\t url = newURL.toString();\n\t \t\t\t }\n\t\t\t\t\t//log.debug(getExecutorId() + \" emitting \" + url);\n\t \t this.collector.emit(new Values<Object>(httpsUrl.getHost(), url, \"https\"));\n\t \t XPathCrawler.getInstance().incrementInflightMessages(); //signals a message is currently being routed\n\t\t\t\t} catch (MalformedURLException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} finally {\n\t\t\t\t\tURLSpout.activeThreads.decrementAndGet();\n\t\t\t\t}\n \t\treturn;\n \t}\n \t\n \tURLSpout.activeThreads.decrementAndGet(); //isIdle is now 0 hence this thread is idle\n \t} \t\n Thread.yield();\n }",
"void testSearches(Tester t) {\n Vertex v1 = new Vertex(10, 10);\n Vertex v2 = new Vertex(10, 11);\n Vertex v3 = new Vertex(10, 12);\n\n Edge e1 = new Edge(v1, v2, 1);\n Edge e2 = new Edge(v2, v3, 1);\n\n IList<Vertex> map = new Cons<Vertex>(v1, new Cons<Vertex>(v2, new Cons<Vertex>(\n v3, new Empty<Vertex>())));\n\n Player player = new Player(map);\n DepthFirst dp = new DepthFirst(map);\n BreadthFirst bp = new BreadthFirst(map);\n\n t.checkExpect(player.current, v1);\n t.checkExpect(player.finished, false);\n\n t.checkExpect(bp.hasNext(), true);\n t.checkExpect(bp.next(), new Queue<Vertex>());\n\n t.checkExpect(dp.hasNext(), true);\n t.checkExpect(dp.next(), new Stack<Vertex>());\n\n t.checkExpect(player.move(true, e1), v2);\n\n t.checkExpect(player.current, v2);\n t.checkExpect(player.finished, false);\n\n t.checkExpect(bp.hasNext(), false);\n t.checkExpect(bp.next(), v3);\n\n t.checkExpect(dp.hasNext(), false);\n t.checkExpect(dp.next(), v3);\n\n t.checkExpect(player.move(true, e2), v3);\n\n player.finished = true;\n\n t.checkExpect(player.current, v3);\n t.checkExpect(player.finished, true);\n\n Queue<Vertex> q = new Queue<Vertex>(map);\n\n q.enqueue(new Vertex(5, 5));\n\n Deque<Vertex> dq = new Deque<Vertex>();\n dq.addAtHead(v1);\n dq.addAtTail(v2);\n dq.addAtTail(new Vertex(5, 5));\n\n\n t.checkExpect(q.isEmpty(), false);\n t.checkExpect(q.contents, dq);\n\n Stack<Vertex> stack = new Stack<Vertex>(map);\n\n t.checkExpect(stack.isEmpty(), false);\n dq.removeFromHead();\n t.checkExpect(stack.pop(), dq);\n\n t.checkExpect(dp.next(), v2);\n t.checkExpect(bp.hasNext(), true);\n\n }",
"private DependencyRecorder recordNonSplitDependencies(OutputStream out) {\n\t\tDependencyRecorder deps;\n\t\tif (options.isSoycEnabled() && options.isJsonSoycEnabled()) {\n\t\t\tdeps = new DependencyGraphRecorder(out, jprogram);\n\t\t} else if (options.isSoycEnabled()) {\n\t\t\tdeps = new DependencyRecorder(out);\n\t\t} else if (options.isJsonSoycEnabled()) {\n\t\t\tdeps = new DependencyGraphRecorder(out, jprogram);\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t\tdeps.open();\n\t\tdeps.startDependencyGraph(\"initial\", null);\n\t\tControlFlowAnalyzer cfa = new ControlFlowAnalyzer(jprogram);\n\t\tcfa.setDependencyRecorder(deps);\n\t\tcfa.traverseEntryMethods();\n\t\tdeps.endDependencyGraph();\n\t\tdeps.close();\n\t\treturn deps;\n\t}",
"public static void main(String[] args) {\n\n BDNode a = new BDNode(\"A\");\n BDNode b = new BDNode(\"B\");\n BDNode c = new BDNode(\"C\");\n BDNode d = new BDNode(\"D\");\n BDNode e = new BDNode(\"E\");\n\n a.link(b);\n a.link(d);\n b.link(a);\n b.link(c);\n b.link(e);\n c.link(b);\n c.link(d);\n d.link(a);\n d.link(c);\n d.link(e);\n e.link(b);\n e.link(d);\n\n BDNode target = e;\n\n/*\n // BFS\n Queue<BDNode> queue = new LinkedList<>();\n queue.offer(a);\n\n while(!queue.isEmpty()) {\n BDNode n = queue.poll();\n n.visit();\n System.out.println(n); // 찾는 여정 출력\n\n if(n.equals(target)) {\n System.out.println(\"BFS Found! \" + n);\n break;\n }\n\n for (BDNode l : n.links) {\n if(l.isVisited()) continue;\n if (queue.contains(l)) continue;\n queue.offer(l);\n }\n\n // 위랑 같은 표현\n// n.links.stream()\n// .filter(l -> !queue.contains(l))\n// .forEach(queue::offer);\n }\n*/\n\n // DFS\n Stack<BDNode> stack = new Stack<>();\n stack.push(a);\n\n while(!stack.isEmpty()) {\n BDNode n = stack.pop();\n n.visit();\n System.out.println(n); // 찾는 여정 출력\n\n if (n.equals(target)) {\n System.out.println(\"DFS Found! \" + n);\n break;\n }\n\n for (BDNode l : n.links) {\n if (l.isVisited()) continue;\n if (stack.contains(l)) continue;\n\n stack.push(l);\n }\n }\n\n\n }",
"public int breadthFirstSearch(T srcId, T destId)\n {\n if (nodeList.isEmpty())\n {\n System.out.println(\"Empty graph\");\n return -1;\n }\n \n // queue used during the traversal\n LinkedList<QueueNode> queue = new LinkedList();\n \n // keeps track of node which are visited and added into the queue\n HashMap<T, Integer> visited = new HashMap();\n \n // find srcNode with id = srcId in graph\n GraphNode srcNode = nodeList.get(srcId);\n \n // if srcNode is not there in graph, breadth first traversal which starts at srcNode cannot be done \n if (srcNode == null)\n {\n System.out.println(\"Source vertex not found\");\n return -1;\n }\n \n int minNumberTrials = -1;\n \n // add srcNode in queue, mark it as visited\n queue.add(new QueueNode(srcNode, 0));\n visited.put(srcNode.nodeId, 1);\n \n while (!queue.isEmpty())\n {\n QueueNode currentNode = queue.remove();\n \n // if destination node found\n if (currentNode.graphNode.nodeId == destId)\n {\n minNumberTrials = currentNode.level;\n break;\n }\n \n // first neighbor of current graph node\n GraphNode neighbor = currentNode.graphNode.next;\n \n // add all neighbors of current graph node into the queue\n while (neighbor != null)\n {\n // if this neighbor is not visited earlier, mark it as visited\n // add it to the queue at appropriate level\n if (visited.get(neighbor.nodeId) == null)\n {\n visited.put(neighbor.nodeId, 1);\n queue.add(new QueueNode(findGraphNode(neighbor.nodeId), currentNode.level + 1));\n }\n neighbor = neighbor.next; \n }\n }\n \n return minNumberTrials;\n }",
"public static void main(String[] args) throws IOException {\n\n // check for correct number of arguments\n if (args.length > constants.TREEQUERY_MAX_ARG_COUNT || args.length < constants.TREEQUERY_MIN_ARG_COUNT) {\n System.out.println(\"Error: Incorrect number of arguments were input\");\n return;\n }\n\n int pageSize;\n String start_index = args[0].replace('_',' ');\n // allowing range query with arguments length\n Key start_key = new Key(start_index), end_key = null;\n if(args.length == constants.TREEQUERY_MAX_ARG_COUNT) {\n String end_index = args[1].replace('_', ' ');\n end_key = new Key(end_index);\n pageSize = Integer.parseInt(args[constants.TREEQUERY_MAX_PAGE_SIZE_ARG]);\n }else\n pageSize = Integer.parseInt(args[constants.TREEQUERY_MIN_PAGE_SIZE_ARG]);\n\n String datafile = \"heap.\" + pageSize;\n String treefile = String.format(\"bptree.%d\", pageSize);\n\n long startTime = 0;\n long finishTime = 0;\n long tree_start = 0, tree_end = 0;\n\n int numBytesIntField = Integer.BYTES;\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"MM/dd/yyyy hh:mm:ss a\");\n\n FileInputStream inStream = null;\n FileInputStream inStream_tree = null;\n try{\n File file = new File(datafile);\n inStream = new FileInputStream(file);\n inStream_tree = new FileInputStream(treefile);\n\n // calculate tree degree\n int degree = (int) Math.sqrt((double) file.length()/pageSize);\n tree_start = System.nanoTime();\n BPlusTree tree = new BPlusTree(degree, pageSize);\n // construct tree from tree file\n tree.construct(inStream_tree);\n tree_end = System.nanoTime();\n\n // start query\n startTime = System.nanoTime();\n\n byte[] sdtnameBytes = new byte[constants.STD_NAME_SIZE];\n byte[] idBytes = new byte[constants.ID_SIZE];\n byte[] dateBytes = new byte[constants.DATE_SIZE];\n byte[] yearBytes = new byte[constants.YEAR_SIZE];\n byte[] monthBytes = new byte[constants.MONTH_SIZE];\n byte[] mdateBytes = new byte[constants.MDATE_SIZE];\n byte[] dayBytes = new byte[constants.DAY_SIZE];\n byte[] timeBytes = new byte[constants.TIME_SIZE];\n byte[] sensorIdBytes = new byte[constants.SENSORID_SIZE];\n byte[] sensorNameBytes = new byte[constants.SENSORNAME_SIZE];\n byte[] countsBytes = new byte[constants.COUNTS_SIZE];\n RandomAccessFile raf = new RandomAccessFile(datafile, \"r\");\n // range query\n if(end_key!=null) {\n // Range query can have more than one results, using ArrayList to save\n ArrayList<Integer> result = tree.query(start_key, end_key);\n if (!result.isEmpty()){\n result.forEach(p -> {\n try {\n // random access file seek to the point we want\n raf.seek(p);\n // retrieve the whole data from this point\n byte[] data = new byte[constants.TOTAL_SIZE];\n raf.read(data);\n /*\n * Fixed Length Records (total size = 112 bytes):\n * SDT_NAME field = 24 bytes, offset = 0\n * id field = 4 bytes, offset = 24\n * date field = 8 bytes, offset = 28\n * year field = 4 bytes, offset = 36\n * month field = 9 bytes, offset = 40\n * mdate field = 4 bytes, offset = 49\n * day field = 9 bytes, offset = 53\n * time field = 4 bytes, offset = 62\n * sensorid field = 4 bytes, offset = 66\n * sensorname field = 38 bytes, offset = 70\n * counts field = 4 bytes, offset = 108\n *\n * Copy the corresponding sections of \"page\" to the individual field byte arrays\n */\n System.arraycopy(data, 0, sdtnameBytes, 0, constants.STD_NAME_SIZE);\n System.arraycopy(data, constants.STD_NAME_SIZE, idBytes, 0, numBytesIntField);\n System.arraycopy(data, constants.DATE_OFFSET, dateBytes, 0, constants.DATE_SIZE);\n System.arraycopy(data, constants.YEAR_OFFSET, yearBytes, 0, numBytesIntField);\n System.arraycopy(data, constants.MONTH_OFFSET, monthBytes, 0, constants.MONTH_SIZE);\n System.arraycopy(data, constants.MDATE_OFFSET, mdateBytes, 0, numBytesIntField);\n System.arraycopy(data, constants.DAY_OFFSET, dayBytes, 0, constants.DAY_SIZE);\n System.arraycopy(data, constants.TIME_OFFSET, timeBytes, 0, numBytesIntField);\n System.arraycopy(data, constants.SENSORID_OFFSET, sensorIdBytes, 0, numBytesIntField);\n System.arraycopy(data, constants.SENSORNAME_OFFSET, sensorNameBytes, 0, constants.SENSORNAME_SIZE);\n System.arraycopy(data, constants.COUNTS_OFFSET, countsBytes, 0, numBytesIntField);\n\n // Convert long data into Date object\n Date date = new Date(ByteBuffer.wrap(dateBytes).getLong());\n String sdtNameString = new String(sdtnameBytes);\n\n // Get a string representation of the record for printing to stdout\n String record = sdtNameString.trim() + \",\" + ByteBuffer.wrap(idBytes).getInt()\n + \",\" + dateFormat.format(date) + \",\" + ByteBuffer.wrap(yearBytes).getInt() +\n \",\" + new String(monthBytes).trim() + \",\" + ByteBuffer.wrap(mdateBytes).getInt()\n + \",\" + new String(dayBytes).trim() + \",\" + ByteBuffer.wrap(timeBytes).getInt()\n + \",\" + ByteBuffer.wrap(sensorIdBytes).getInt() + \",\" +\n new String(sensorNameBytes).trim() + \",\" + ByteBuffer.wrap(countsBytes).getInt();\n System.out.println(record);\n } catch (IOException e) {\n e.printStackTrace();\n }\n });\n System.out.printf(\"\\nRange query result: %d records found.\\n\", result.size());\n }\n }else {\n // equal query\n int result = tree.query(start_key);\n if (result!=-1) {\n try {\n // same as Range query\n raf.seek(result);\n byte[] data = new byte[constants.TOTAL_SIZE];\n raf.read(data);\n /*\n * Fixed Length Records (total size = 112 bytes):\n * SDT_NAME field = 24 bytes, offset = 0\n * id field = 4 bytes, offset = 24\n * date field = 8 bytes, offset = 28\n * year field = 4 bytes, offset = 36\n * month field = 9 bytes, offset = 40\n * mdate field = 4 bytes, offset = 49\n * day field = 9 bytes, offset = 53\n * time field = 4 bytes, offset = 62\n * sensorid field = 4 bytes, offset = 66\n * sensorname field = 38 bytes, offset = 70\n * counts field = 4 bytes, offset = 108\n *\n * Copy the corresponding sections of \"page\" to the individual field byte arrays\n */\n System.arraycopy(data, 0, sdtnameBytes, 0, constants.STD_NAME_SIZE);\n System.arraycopy(data, constants.STD_NAME_SIZE, idBytes, 0, numBytesIntField);\n System.arraycopy(data, constants.DATE_OFFSET, dateBytes, 0, constants.DATE_SIZE);\n System.arraycopy(data, constants.YEAR_OFFSET, yearBytes, 0, numBytesIntField);\n System.arraycopy(data, constants.MONTH_OFFSET, monthBytes, 0, constants.MONTH_SIZE);\n System.arraycopy(data, constants.MDATE_OFFSET, mdateBytes, 0, numBytesIntField);\n System.arraycopy(data, constants.DAY_OFFSET, dayBytes, 0, constants.DAY_SIZE);\n System.arraycopy(data, constants.TIME_OFFSET, timeBytes, 0, numBytesIntField);\n System.arraycopy(data, constants.SENSORID_OFFSET, sensorIdBytes, 0, numBytesIntField);\n System.arraycopy(data, constants.SENSORNAME_OFFSET, sensorNameBytes, 0, constants.SENSORNAME_SIZE);\n System.arraycopy(data, constants.COUNTS_OFFSET, countsBytes, 0, numBytesIntField);\n\n // Convert long data into Date object\n Date date = new Date(ByteBuffer.wrap(dateBytes).getLong());\n String sdtNameString = new String(sdtnameBytes);\n\n // Get a string representation of the record for printing to stdout\n String record = sdtNameString.trim() + \",\" + ByteBuffer.wrap(idBytes).getInt()\n + \",\" + dateFormat.format(date) + \",\" + ByteBuffer.wrap(yearBytes).getInt() +\n \",\" + new String(monthBytes).trim() + \",\" + ByteBuffer.wrap(mdateBytes).getInt()\n + \",\" + new String(dayBytes).trim() + \",\" + ByteBuffer.wrap(timeBytes).getInt()\n + \",\" + ByteBuffer.wrap(sensorIdBytes).getInt() + \",\" +\n new String(sensorNameBytes).trim() + \",\" + ByteBuffer.wrap(countsBytes).getInt();\n System.out.println(record);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n System.out.println();\n }\n\n finishTime = System.nanoTime();\n }catch (FileNotFoundException e) {\n System.err.println(\"File not found \" + e.getMessage());\n }\n finally {\n\n if (inStream != null) {\n inStream.close();\n }\n if (inStream_tree != null){\n inStream_tree.close();\n }\n }\n\n long treeInMilliseconds = (tree_end - tree_start)/constants.MILLISECONDS_PER_SECOND;\n System.out.println(\"Time taken for constructing B+Tree: \" + treeInMilliseconds + \" ms\");\n long timeInMilliseconds = (finishTime - startTime)/constants.MILLISECONDS_PER_SECOND;\n System.out.println(\"Time taken for query: \" + timeInMilliseconds + \" ms\");\n System.out.println(\"Total Time taken: \" + (treeInMilliseconds + timeInMilliseconds) + \" ms\");\n }",
"void dijkstra(Coordinate startName) {\n if (!graph.containsKey(startName)) {\n //test use print statement\n //System.out.printf(\"Graph doesn't contain start vertex \\\"%s\\\"\\n\", startName);\n return;\n }\n final Node source = graph.get(startName);\n NavigableSet<Node> queue = new TreeSet<>();\n\n // set-up vertices\n for (Node node : graph.values()) {\n node.previous = node == source ? source : null;\n node.dist = node == source ? 0 : Integer.MAX_VALUE;\n queue.add(node);\n }\n dijkstra(queue);\n }",
"public static void main(String[] args) throws Exception {\n var env = StreamExecutionEnvironment.getExecutionEnvironment();\n\n // Set to 1 for now\n //env.setParallelism(1);\n env.setStreamTimeCharacteristic(TimeCharacteristic.EventTime);\n Properties props = new PropReader().getProps();\n props.setProperty(\"bootstrap.servers\", KAFKA_ADDRESS);\n props.setProperty(\"group.id\", KAFKA_GROUP);\n //env.enableCheckpointing(50000);\n //env.getConfig().setLatencyTrackingInterval(1000);\n env.getConfig().setLatencyTrackingInterval(5L);\n\n\n // Create tbe Kafka Consumer here\n FlinkKafkaConsumer010<Order> consumer = new FlinkKafkaConsumer010<Order>(IN_TOPIC,\n new OrderDeserializationSchema()\n , props);\n // uid - Grafana , name - flink.\n DataStream<Order> orderStream = env.addSource(consumer).name(\"Subscribe Trades/Orders\").uid(\"Subscribe_Trades_Orders\");// .setParallelism(1)\n // printOrTest(orderStream);\n // create a Producer for positionsByAct\n FlinkKafkaProducer010<FlatOrder> producer =\n new FlinkKafkaProducer010<FlatOrder>\n (KAFKA_ADDRESS,\n OUT_TOPIC,\n new FlatOrderSerializationSchema());\n producer.setWriteTimestampToKafka(true);\n\n //// create a Producer for positionsBySymbol\n FlinkKafkaProducer010<FlatOrder> producer2 =\n new FlinkKafkaProducer010<FlatOrder>\n (KAFKA_ADDRESS,\n OUT_TOPIC_1,\n new FlatOrderSerializationSchema());\n producer2.setWriteTimestampToKafka(true);\n\n // Allocations are by Cusip, so keyBy Cusip.\n // flatten the structure by extracting allocations for account, sub account,cusip and quantity .\n // Convert to RichFlatMap and add a guage maetric.\n DataStream<FlatOrder> flatmapStream = orderStream\n .keyBy(order -> order.getOrderId())\n .flatMap(new MyGuage())\n .name(\"flatten the orders\").uid(\"flatten the orders\").assignTimestampsAndWatermarks(new BoundedOutOfOrdernessGenerator())\n .keyBy(flatOrder -> flatOrder.getCusip())\n .window(TumblingEventTimeWindows.of(Time.minutes(1)))\n .allowedLateness(Time.seconds(10))\n .sum(\"quantity\").name(\" Aggregate Quantity By Cusip/Symbol\").uid(\"Aggregate Quantity By Cusip/Symbol\");\n // .setParallelism(4)\n //.process(new AddQty()).name(\" Aggregate Quantity By Cusip/Symbol\").uid(\"Aggregate Quantity By Cusip/Symbol\");\n flatmapStream.addSink(producer2).name(\" Publish to positionsBySymbol\").uid(\"Publish to positionsBySymbol\");// publish to positionsBySymbol.\n printOrTest(flatmapStream);\n\n // Task # 2 : PositionByAccount\n DataStream<FlatOrder> flatCompositeMapStream = orderStream.keyBy(order -> order.getOrderId())\n .flatMap(new MyGuage()).assignTimestampsAndWatermarks(new BoundedOutOfOrdernessGenerator()).name(\"Assign Watermarks\").uid(\"Assign Watermarks\")\n .keyBy(flatOrder -> new CompositeKey( flatOrder.getCusip(),flatOrder.getAccount(),flatOrder.getSubAccount()))\n .window(TumblingEventTimeWindows.of(Time.minutes(3)))\n .allowedLateness(Time.seconds(10))\n .sum(\"quantity\").name(\"Aggregate Qty by Cusip/Acct/Subacct Composite key\").uid(\"Aggregate Qty by Cusip/Acct/Subacct Composite key\");\n printOrTest(flatCompositeMapStream);\n flatCompositeMapStream.addSink(producer).name(\"Publish to positionsByAct\").uid(\"Publish to positionsByAct\");\n\n env.execute(\"Order Processor \");\n }",
"private void BFS(Vertex start, Set<Vertex> visited, Queue<Vertex> queue) {\r\n\t\t// if(visited.contains(start)) return;\r\n\r\n\t\t// Mark the current node as visited and enqueue it\r\n\t\tvisited.add(start);\r\n\t\tqueue.offer(start);\r\n\r\n\t\tVertex currentNode;\r\n\t\tSet<Vertex> neighbors;\r\n\r\n\t\twhile (queue.size() != 0) { // or !queue.isEmpty()\r\n\t\t\t// Dequeue a vertex from queue and print it\r\n\t\t\tcurrentNode = queue.poll();\r\n\t\t\tSystem.out.print(currentNode + \" \");\r\n\r\n\t\t\t// Get all adjacent vertices of the dequeued vertex s\r\n\t\t\t// If a adjacent has not been visited, then mark it\r\n\t\t\t// visited and enqueue it\r\n\t\t\tneighbors = currentNode.getNeighbors();\r\n\r\n\t\t\tfor (Vertex n : neighbors) {\r\n\t\t\t\tif (!visited.contains(n)) {\r\n\t\t\t\t\tvisited.add(n);\r\n\t\t\t\t\tqueue.offer(n);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t/*\r\n\t\t\t * neighbors.forEach(n -> { if (!visited.contains(n)){\r\n\t\t\t * visited.add(n); queue.offer(n); } });\r\n\t\t\t */\r\n\t\t}\r\n\t}",
"public static void main(String[] args) throws CorruptIndexException, LockObtainFailedException, IOException, ParseException{\n\t\tboolean lucene_im_mem = false;\n\t\t//1. Build the Index with varying \"database size\"\n\t\tString dirName =\"/data/home/duy113/SupSearchExp/AIDSNew/\";\n//\t\tString dirName = \"/Users/dayuyuan/Documents/workspace/Experiment/\";\n\t\tString dbFileName = dirName + \"DBFile\";\n\t\tString trainQueryName= dirName + \"TrainQuery\";\n//\t\tString testQuery15 = dirName + \"TestQuery15\";\n\t\tString testQuery25 = dirName + \"TestQuery25\";\n//\t\tString testQuery35 = dirName + \"TestQuery35\";\n\t\tGraphDatabase query = new GraphDatabase_OnDisk(testQuery25, MyFactory.getSmilesParser());\n\t\tdouble[] minSupts = new double[4];\n\t\tminSupts[0] = 0.05; minSupts[1] = 0.03; minSupts[2] =0.02; minSupts[3] = 0.01;\n \t\tint lwIndexCount[] = new int[1];\n\t\tlwIndexCount[0] = 479;\t\n//\t\tSystem.out.println(\"Build CIndexFlat Left-over: \");\n//\t\tfor(int j = 3; j< 4; j++){\n//\t\t\tdouble minSupt = minSupts[j];\n//\t\t\tfor(int i = 4; i<=10; i = i+2){\n//\t\t\t\tString baseName = dirName + \"G_\" + i + \"MinSup_\" + minSupt + \"/\";\n//\t\t\t\tGraphDatabase trainingDB = new GraphDatabase_OnDisk(dbFileName + i, MyFactory.getDFSCoder());\n//\t\t\t\tGraphDatabase trainQuery = new GraphDatabase_OnDisk(trainQueryName, MyFactory.getSmilesParser());\t\t\n//\t\t\t\tif(i == 2){\n//\t\t\t\t\tSystem.out.println(baseName + \"CIndexFlat\");\n//\t\t\t\t\tCIndexExp.buildIndex(trainingDB, trainQuery, trainingDB, baseName, minSupt, lwIndexCount[0]);\n//\t\t\t\t}\n//\t\t\t\telse{\n//\t\t\t\t\tString featureBaseName = dirName + \"G_2\" + \"MinSup_\" + minSupt + \"/\";\n//\t\t\t\t\tSystem.out.println(baseName + \"CIndexFlat with Features \" + featureBaseName);\n//\t\t\t\t\tCIndexExp.buildIndex(featureBaseName, trainingDB, baseName, minSupt);\n//\t\t\t\t}\n//\t\t\t\tSystem.gc();\n//\t\t\t}\n//\t\t}\n\t\tSystem.out.println(\"Run Query Processing: \");\n\t\tfor(int j = 0; j< 4; j++){\n\t\t\tdouble minSupt = minSupts[j];\n\t\t\tfor(int i = 2; i<=10; i = i+2){\n\t\t\t\tString baseName = dirName + \"G_\" + i + \"MinSup_\" + minSupt + \"/\";\n\t\t\t\tGraphDatabase trainingDB = new GraphDatabase_OnDisk(dbFileName + i, MyFactory.getDFSCoder());\n\t\t\t\tGraphDatabase trainQuery = new GraphDatabase_OnDisk(trainQueryName, MyFactory.getSmilesParser());\t\t\n\t\t\t\tif(j!=0 || i!=2){\n\t\t\t\t\tSystem.out.println(baseName + \"LWindex\");\n\t\t\t\t\t//LWIndexExp.buildIndex(trainingDB, trainQuery, trainingDB, trainQuery.getParser(),baseName, minSupt, lwIndexCount);\n\t\t\t\t\t//System.gc();\n\t\t\t\t\tLWIndexExp.runIndex(trainingDB, trainQuery, baseName, lucene_im_mem);\n\t\t\t\t\tLWIndexExp.runIndex(trainingDB, query, baseName, lucene_im_mem);\n\t\t\t\t\tSystem.gc();\t\t\n\t\t\t\t\tSystem.out.println(baseName + \"PrefixIndex\");\n\t\t\t\t\t//PrefixIndexExp.buildIndex(trainingDB, trainingDB, baseName, minSupt);\n\t\t\t\t\t//System.gc();\n\t\t\t\t\tPrefixIndexExp.runIndex(trainingDB, trainQuery, baseName, lucene_im_mem);\n\t\t\t\t\tPrefixIndexExp.runIndex(trainingDB, query, baseName, lucene_im_mem);\n\t\t\t\t\tSystem.gc();\t\t\n\t\t\t\t\tSystem.out.println(baseName + \"PrefixIndexHi\");\n\t\t\t\t\t//PrefixIndexExp.buildHiIndex(trainingDB, trainingDB, 2, baseName, minSupt);\n\t\t\t\t\t//System.gc();\n\t\t\t\t\tPrefixIndexExp.runHiIndex(trainingDB, trainQuery, baseName, lucene_im_mem);\n\t\t\t\t\tPrefixIndexExp.runHiIndex(trainingDB, query, baseName, lucene_im_mem);\n\t\t\t\t\tSystem.gc();\n\t\t\t\t\tSystem.out.println(baseName + \"GPTree\");\n\t\t\t\t\t//GPTreeExp.buildIndex(trainingDB, trainingDB, baseName, minSupt);\n\t\t\t\t\t//System.gc();\n\t\t\t\t\tGPTreeExp.runIndex(trainingDB, trainQuery, baseName, lucene_im_mem);\n\t\t\t\t\tGPTreeExp.runIndex(trainingDB, query, baseName, lucene_im_mem);\n\t\t\t\t\tSystem.gc();\n\t\t\t\t\tSystem.out.println(baseName + \"CIndexFlat\");\n\t\t\t\t\t//CIndexExp.buildIndex(trainingDB, trainQuery, trainingDB, baseName, minSupt, lwIndexCount[0]);\n\t\t\t\t\t//System.gc();\n\t\t\t\t\tCIndexExp.runIndex(trainingDB, trainQuery, baseName, lucene_im_mem);\n\t\t\t\t\tCIndexExp.runIndex(trainingDB, query, baseName, lucene_im_mem);\n\t\t\t\t\tSystem.gc();\n\t\t\t\t}\n\t\t\t\tif(j==0&&i==2){\n\t\t\t\t\tSystem.out.println(baseName + \"CIndexTopDown: \" + lwIndexCount[0]);\n\t\t\t\t\tCIndexExp.buildIndexTopDown(trainingDB, trainQuery, trainingDB,MyFactory.getUnCanDFS(), baseName, minSupt, 2*trainQuery.getTotalNum()/lwIndexCount[0] ); // 8000 test queries\n\t\t\t\t\t//System.gc();\n\t\t\t\t}\n\t\t\t\tSystem.out.println(baseName + \"CIndexTopDown: \" + lwIndexCount[0]);\n\t\t\t\tCIndexExp.runIndexTopDown(trainingDB, trainQuery, baseName, lucene_im_mem);\n\t\t\t\tCIndexExp.runIndexTopDown(trainingDB, query, baseName, lucene_im_mem);\n\t\t\t\tSystem.gc();\n\t\t\t}\n\t\t}\n\t\tAIDSLargeExp.main(args);\n\t}",
"void loadNext();",
"public void run() {\n Gson gson = new Gson();\n try {\n InputStream is = new FileInputStream(new File(filename));\n JsonReader reader = new JsonReader(new InputStreamReader(is));\n reader.setLenient(true);\n // Leggo la parentesi quadra aperta \"[\".\n reader.beginArray();\n while (reader.hasNext()) {\n String owner = null;\n List<Record> records = null;\n // Leggo la parentesi graffa aperta \"{\".\n reader.beginObject();\n while (reader.hasNext()) {\n String name = reader.nextName();\n if (name.equals(\"owner\")) {\n owner = reader.nextString();\n } else if (name.equals(\"records\")) {\n records = readRecords(reader);\n } else {reader.skipValue();}\n }\n // Leggo la parentesi graffa aperta \"}\".\n reader.endObject();\n // Inserisco nella coda condivisa il conto appena letto.\n queue.put(new Account(owner, records));\n }\n // Leggo la parentesi quadra chiusa \"]\".\n reader.endArray();\n reader.close();\n // Inserisco in coda gli oggetti poison per far terminare\n // i consumer.\n for (int i = 0; i < poison; i++) queue.put(new Account(null));\n } catch (Exception e) {\n System.err.println(\"Errore nel Producer: \" + e.getMessage());\n }\n finally {\n System.err.println(\"Producer terminato!\");\n }\n }",
"@Test\n public void test4() throws Exception {\n String query = \"A =LOAD 'file.txt' AS (a:(u,v), b, c);\" +\n \"B = FOREACH A GENERATE $0, b, flatten(1);\" +\n \"C = FILTER B BY \" + SIZE.class.getName() +\"(TOTUPLE(*)) > 5;\" +\n \"STORE C INTO 'empty';\"; \n LogicalPlan newLogicalPlan = buildPlan( query );\n\n Operator load = newLogicalPlan.getSources().get( 0 );\n Assert.assertTrue( load instanceof LOLoad );\n Operator fe1 = newLogicalPlan.getSuccessors( load ).get( 0 );\n Assert.assertTrue( fe1 instanceof LOForEach );\n Operator fe2 = newLogicalPlan.getSuccessors( fe1 ).get( 0 );\n Assert.assertTrue( fe2 instanceof LOForEach );\n Operator filter = newLogicalPlan.getSuccessors( fe2 ).get( 0 );\n Assert.assertTrue( filter instanceof LOFilter );\n }",
"public void breadthFirstTraverse() {\n\t\t// track whether vertex was visited\n\t\tHashMap<Integer, Boolean> visited = buildVisited();\n\t\t// store neighbors\n\t\tQueue<Integer> queue = new LinkedList<Integer>();\n\n\t\t// arbitrarily add first element\n\t\tInteger current = (Integer) edges.keySet().toArray()[0];\n\t\tqueue.add(current);\n\n\t\twhile (queue.peek() != null) {\n\n\t\t\tcurrent = queue.remove();\n\t\t\tSystem.out.println(\"current: \" + current);\n\t\t\tvisited.put(current, true);\n\n\t\t\tfor (Integer neighbor: edges.get(current)) {\n\t\t\t\tif (!visited.get(neighbor)) {\n\t\t\t\t\tqueue.add(neighbor);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public ProcessingTarget buildGraph(){\n \t\tgetTibbrGraph();\n \n \t\t//Init a project - and therefore a workspace\n \t\tProjectController pc = Lookup.getDefault().lookup(ProjectController.class);\n \t\tpc.newProject();\n \t\tWorkspace workspace = pc.getCurrentWorkspace();\n \n \t\t//Get a graph model - it exists because we have a workspace\n \t\tGraphModel graphModel = Lookup.getDefault().lookup(GraphController.class).getModel();\n \t\tAttributeModel attributeModel = Lookup.getDefault().lookup(AttributeController.class).getModel();\n \t\tImportController importController = Lookup.getDefault().lookup(ImportController.class);\n \n \t\t//Import file \n \t\tContainer container;\n \t\ttry {\n \t\t\tFile f = new File(this.filename);\n \t\t\tcontainer = importController.importFile(f);\n \t\t\tcontainer.getLoader().setEdgeDefault(EdgeDefault.DIRECTED); //Force DIRECTED\n \t\t container.setAllowAutoNode(false); //Don't create missing nodes\n \t\t} catch (Exception ex) {\n \t\t\tex.printStackTrace();\n \t\t\treturn null;\n \t\t}\n \n \t\t//Append imported data to GraphAPI\n \t\timportController.process(container, new DefaultProcessor(), workspace);\n \n \t\t//See if graph is well imported\n \t\t//DirectedGraph graph = graphModel.getDirectedGraph();\n \t\t//---------------------------\n \n \t\t//Layout for 1 minute\n \t\tAutoLayout autoLayout = new AutoLayout(5, TimeUnit.SECONDS);\n \t\tautoLayout.setGraphModel(graphModel);\n \t\t//YifanHuLayout firstLayout = new YifanHuLayout(null, new StepDisplacement(1f));\n \t\tForceAtlasLayout secondLayout = new ForceAtlasLayout(null);\n \t\tAutoLayout.DynamicProperty adjustBySizeProperty = AutoLayout.createDynamicProperty(\"forceAtlas.adjustSizes.name\", Boolean.TRUE, 0.1f);//True after 10% of layout time\n \t\tAutoLayout.DynamicProperty repulsionProperty = AutoLayout.createDynamicProperty(\"forceAtlas.repulsionStrength.name\", new Double(10000.), 0f);//500 for the complete period\n \t\t//autoLayout.addLayout( firstLayout, 0.5f );\n \t\tautoLayout.addLayout(secondLayout, 1f, new AutoLayout.DynamicProperty[]{adjustBySizeProperty, repulsionProperty});\n \t\tautoLayout.execute();\n \n \n \n \n \n \t\t//Rank color by Degree\n \t\tRankingController rankingController = Lookup.getDefault().lookup(RankingController.class);\n\t\tRanking<?> degreeRanking = rankingController.getModel().getRanking(Ranking.NODE_ELEMENT, Ranking.DEGREE_RANKING);\n\t\tAbstractColorTransformer<?> colorTransformer = (AbstractColorTransformer<?>) rankingController.getModel().getTransformer(Ranking.NODE_ELEMENT, Transformer.RENDERABLE_COLOR);\n \n \t\tcolorTransformer.setColors(new Color[]{new Color(0xFEF0D9), new Color(0xB30000)});\n \t\trankingController.transform(degreeRanking,colorTransformer);\n \n \t\t//Get Centrality\n \t\tGraphDistance distance = new GraphDistance();\n \t\tdistance.setDirected(true);\n \t\tdistance.execute(graphModel, attributeModel);\n \n \t\t//Rank size by centrality\n \t\tAttributeColumn centralityColumn = attributeModel.getNodeTable().getColumn(GraphDistance.BETWEENNESS);\n\t\tRanking<?> centralityRanking = rankingController.getModel().getRanking(Ranking.NODE_ELEMENT, centralityColumn.getId());\n\t\tAbstractSizeTransformer<?> sizeTransformer = (AbstractSizeTransformer<?>) rankingController.getModel().getTransformer(Ranking.NODE_ELEMENT, Transformer.RENDERABLE_SIZE);\n \t\tsizeTransformer.setMinSize(3);\n \t\tsizeTransformer.setMaxSize(20);\n \t\trankingController.transform(centralityRanking,sizeTransformer);\n \n \t\t//Rank label size - set a multiplier size\n\t\tRanking<?> centralityRanking2 = rankingController.getModel().getRanking(Ranking.NODE_ELEMENT, centralityColumn.getId());\n\t\tAbstractSizeTransformer<?> labelSizeTransformer = (AbstractSizeTransformer<?>) rankingController.getModel().getTransformer(Ranking.NODE_ELEMENT, Transformer.LABEL_SIZE);\n \t\tlabelSizeTransformer.setMinSize(1);\n \t\tlabelSizeTransformer.setMaxSize(3);\n \t\trankingController.transform(centralityRanking2,labelSizeTransformer);\n \n \t\tfloat[] positions = {0f,0.33f,0.66f,1f};\n \t\tcolorTransformer.setColorPositions(positions);\n \t\tColor[] colors = new Color[]{new Color(0x0000FF), new Color(0xFFFFFF),new Color(0x00FF00),new Color(0xFF0000)};\n \t\tcolorTransformer.setColors(colors);\n \n \t\t\n \t\t//---------------------------------\n \t\t//Preview configuration\n \t\tPreviewController previewController = Lookup.getDefault().lookup(PreviewController.class);\n \t\tPreviewModel previewModel = previewController.getModel();\n \t\tpreviewModel.getProperties().putValue(PreviewProperty.DIRECTED, Boolean.TRUE);\n \t\tpreviewModel.getProperties().putValue(PreviewProperty.BACKGROUND_COLOR, Color.BLACK);\n \t\tpreviewModel.getProperties().putValue(PreviewProperty.SHOW_NODE_LABELS, Boolean.TRUE);\n \t\tpreviewModel.getProperties().putValue(PreviewProperty.NODE_LABEL_COLOR, new DependantOriginalColor(Color.YELLOW));\n \t\t\n \t\t\n \t\t//previewModel.getProperties().putValue(PreviewProperty.EDGE_CURVED, Boolean.TRUE);\n \t\t//previewModel.getProperties().putValue(PreviewProperty.EDGE_OPACITY, 100);\n \t\t//previewModel.getProperties().putValue(PreviewProperty.EDGE_RADIUS, 1f);\n \t\t//previewModel.getProperties().putValue(PreviewProperty.EDGE_THICKNESS,0.2f);\n \t\t//previewModel.getProperties().putValue(PreviewProperty.ARROW_SIZE,0.2f);\n \n \t\tpreviewController.refreshPreview();\n \n \t\t//----------------------------\n \n \t\t//New Processing target, get the PApplet\n \t\tProcessingTarget target = (ProcessingTarget) previewController.getRenderTarget(RenderTarget.PROCESSING_TARGET);\n \t\t\n \t\tPApplet applet = target.getApplet();\n \t\tapplet.init();\n \n \t\t// Add .1 second delay to fix stability issue - per Gephi forums\n try {\n \t\t\t\tThread.sleep(100);\n \t\t\t} catch (InterruptedException e) {\n \t\t\t\t// TODO Auto-generated catch block\n \t\t\t\te.printStackTrace();\n \t\t\t}\n \n \t\t\n \t\t//Refresh the preview and reset the zoom\n \t\tpreviewController.render(target);\n \t\ttarget.refresh();\n \t\ttarget.resetZoom();\n \t\ttarget.zoomMinus();\n \t\ttarget.zoomMinus();\n \t\t\n \t\treturn target;\n \t\t\n \n \t}",
"private static int breadthFirstSearch(Vertex start) throws Queue.UnderflowException, Queue.EmptyException {\n boolean visited[] = new boolean[48];\n //Keep a queue of vertecies and a queue of the depth of the verticies - they will be added to and poped from identically\n ListQueue<Vertex> queue = new ListQueue<Vertex>();\n ListQueue<Integer> numQueue = new ListQueue<Integer>();\n //Set the starting node as visited\n visited[start.index()] = true;\n queue.enqueue(start);\n numQueue.enqueue(new Integer(1));\n\n //Keep last\n int last = -1;\n //While the queue isnt empty\n while (!queue.isEmpty()) {\n //Pop off the top from both queues and mark as visited\n start = queue.dequeue();\n int current = numQueue.dequeue();\n visited[start.index] = true;\n //For all neigbors\n for (Vertex v : start.neighbors) {\n //If we havent visited it make sure to visit it\n if (visited[v.index()] == false) {\n //As we keep adding new nodes to visit keep track of the depth\n queue.enqueue(v);\n numQueue.enqueue(current + 1);\n }\n }\n //Keep track of the most recent depth before we pop it off (queue will be empty when we exit)\n last = current;\n }\n //Return the max of the depth\n return last;\n }",
"public static void breadthFirstSearch (HashMap<String, Zpair> stores,\n HashSet<Zpair> visited,\n List<Integer> sortedQueue) {\n List<String> q = new ArrayList<String>();\n q.add(\"Q\");\n // k=0\n //int k = 0;\n while(q.size() != 0) {\n //if(k == 21) {\n // System.exit(20);\n // }\n List<StringBuffer> path = new ArrayList<StringBuffer>(); // this is the return string\n List<String> q1 = new ArrayList<String>();\n int size = q.size();\n //System.out.println(k);\n for(int i = 0; i < size; i++) {\n //printList(q);\n path.add(ZMethods.stringPop(q));\n execute(path.get(i), stores, visited, q1, sortedQueue);\n }\n copyStringBuffer(q1,q);\n //k++;\n }\n }",
"public static void main (String []args) throws FileNotFoundException {\n\t\tArrayList<Item> priorities = new ArrayList<Item>();\n\t\t\n\t\t// pq.id.100K1.1\n\t\t// pq.id.100K4.1\n\t\t// pq.id.10K1.2\n\t\t// pqsort.100K.3\n\t\t\n\t\t// do this to retrieve large cases via internet.\n\t\t//java.net.URL u;\n\t\t//Scanner s = new Scanner (u.openStream());\n\t\t\n\t\tFile f = new File (\"tests\\\\algs\\\\model\\\\performance\\\\pq_random\\\\pqsort.1K.1\");\n\t\tScanner sc = new Scanner (f);\n\t\twhile (sc.hasNext()) {\n\t\t\tString s = sc.nextLine();\n\t\t\tif (s.startsWith(\"pqh\")) continue;\n\t\t\tif (s.startsWith(\"com\")) continue;\n\t\t\t\n\t\t\tif (s.startsWith(\"dmn\")) {\n\t\t\t\tpriorities.add(sentinel);\n\t\t\t} else {\n\t\t\t\tStringTokenizer st = new StringTokenizer(s, \" \");\n\t\t\t\tst.nextToken();\n\t\t\t\tDouble d = Double.parseDouble(st.nextToken());\n\t\t\t\tInteger i = Integer.parseInt(st.nextToken());\n\t\t\t\tpriorities.add(new Item (i, d));\n\t\t\t}\n\t\t}\n\t\tsc.close();\n\t\t\n\t\t// Now ready to measure PQ.\n\t\tIPQueue ipq = new ArrayPQ();\n\t\t//IPQueue ipq = new BalancedTreePQ();\n\t\t\n\t\tTrialSuite minTS = new TrialSuite ();\n\t\tTrialSuite insTS = new TrialSuite ();\n\t\tlong n0 = System.currentTimeMillis();\n\t\tfor (int i = 0; i < priorities.size(); i++) {\n\t\t\tItem it = priorities.get(i);\n\t\t\tif (it == sentinel) {\n\t\t\t\tlong n1 = System.currentTimeMillis();\n\t\t\t\tipq.minimum();\n\t\t\t\tlong n2 = System.currentTimeMillis();\n\t\t\t\tminTS.addTrial(1, n1, n2);\n\t\t\t} else {\n\t\t\t\tlong n1 = System.currentTimeMillis();\n\t\t\t\tipq.insert(it.priority, it.item);\n\t\t\t\tlong n2 = System.currentTimeMillis();\n\t\t\t\tinsTS.addTrial(1, n1, n2);\n\t\t\t}\n\t\t}\n\t\tlong e0 = System.currentTimeMillis();\n\t\tSystem.out.println ((e0 - n0) + \" milliseconds for completion.\");\n\t\tSystem.out.println (\"min\");\n\t\tSystem.out.println (minTS.computeTable());\n\t\tSystem.out.println (\"insert\");\n\t\tSystem.out.println (insTS.computeTable());\n\t}",
"public static void main(String[] args) throws Exception {\n\t\tlong startTime, stopTime;\n\t\tdouble t_searchCache, t_storeCache;\n//\t\tMap<SmallGraph, SmallGraph> cache = new HashMap<SmallGraph, SmallGraph>(); // the cache\n\t\t// the index on the ploytrees stored in the cache\n\t\tMap<Set<Pair<Integer,Integer>>, Set<SmallGraph>> cacheIndex = new HashMap<Set<Pair<Integer,Integer>>, Set<SmallGraph>>();\n\t\tMap<SmallGraph, Pair<Integer, SmallGraph>> polytree2query = new HashMap<SmallGraph, Pair<Integer, SmallGraph>>();\n\n\t\t// reading the original data graph\n\t\tGraph originalDataGraph = new Graph(args[0]);\n\t\tif(args.length == 6)\toriginalDataGraph.buildParentIndex(args[5]);\n\n\t\t// reading all popular data graphs\n\t\tFile dirG = new File(args[1]);\n\t\tif(!dirG.isDirectory())\n\t\t\tthrow new Exception(\"The specified path for the candidate data graphs is not a valid directory\");\n\t\tFile[] graphFiles = dirG.listFiles();\n\t\tint nPopularGraphs = graphFiles.length;\n\t\tGraph[] graphs = new Graph[nPopularGraphs];\n\t\tfor(int i=0; i < nPopularGraphs; i++)\n\t\t\tgraphs[i] = new Graph(graphFiles[i].getAbsolutePath());\n\t\t\n\t\t// statistical result file\n\t\tFile file = new File(args[2]);\n\t\t// if file does not exists, then create it\n\t\tif (!file.exists()) file.createNewFile();\n\t\tFileWriter fw = new FileWriter(file.getAbsoluteFile());\t\t\t\n\t\tBufferedWriter bw = new BufferedWriter(fw);\t\n\n\t\tbw.write(\"queryNo\\t querySize\\t degree\\t sourceNo\\t isPolytree\\t nHitCandidates\\t t_searchCache\\t isHit\\t hitQueryNo\\t hitQuerySize\\t t_storeCache\\n\");\n\t\tStringBuilder fileContents = new StringBuilder();\n\t\t\n\t\tint nSourceOptions = nPopularGraphs + 1; // number of sources for creating query\n\t\tRandom randSource = new Random();\n\t\tint[] querySizes = {20,22,24,26,28,30,32,34,36,38}; // different available sizes for queries\n\t\tRandom randQuerySize = new Random();\n//\t\tRandom randDegree = new Random();\n\t\tRandom randCenter = new Random();\n\t\t\t\t\n\t\tint requestedQueries = Integer.parseInt(args[4]);\n\t\tfor(int queryNo=0; queryNo < requestedQueries; queryNo++) { // main loop\n\t\t\tSystem.out.print(\"Processing Q\" + queryNo + \":\\t\");\n\t\t\tSmallGraph q;\n\t\t\tint querySize = 25;\n\t\t\tint degree = 5;\n\t\t\tint sourceNo = randSource.nextInt(nSourceOptions);\n\t\t\t// q is created\n\t\t\tif(sourceNo == nSourceOptions - 1) { // from the original data graph\n\t\t\t\tboolean notFound = true;\n\t\t\t\tSmallGraph sg = null;\n\t\t\t\twhile(notFound) {\n\t\t\t\t\tquerySize = querySizes[randQuerySize.nextInt(querySizes.length)];\n\t\t\t\t\t//degree = randDegree.nextInt(querySize/DEGREE_RATIO);\n\t\t\t\t\tdegree = (int)Math.sqrt(querySize);\n\t\t\t\t\tint center = randCenter.nextInt(originalDataGraph.getNumVertices());\n\t\t\t\t\tsg = GraphUtils.subGraphBFS(originalDataGraph, center, degree, querySize);\n\t\t\t\t\tif(sg.getNumVertices() == querySize)\n\t\t\t\t\t\tnotFound = false;\n\t\t\t\t}\n\t\t\t\tq = QueryGenerator.arrangeID(sg);\n\t\t\t} else {\t// from popular data graphs\n\t\t\t\tGraph dataGraph = graphs[sourceNo];\n\t\t\t\tboolean notFound = true;\n\t\t\t\tSmallGraph sg = null;\n\t\t\t\twhile(notFound) {\n\t\t\t\t\tquerySize = querySizes[randQuerySize.nextInt(querySizes.length)];\n\t\t\t\t\tdegree = (int)Math.sqrt(querySize);\n\t\t\t\t\tif(degree == 0) continue;\n\t\t\t\t\tint center = randCenter.nextInt(dataGraph.getNumVertices());\n\t\t\t\t\tsg = GraphUtils.subGraphBFS(dataGraph, center, degree, querySize);\n\t\t\t\t\tif(sg.getNumVertices() == querySize)\n\t\t\t\t\t\tnotFound = false;\n\t\t\t\t}\n\t\t\t\tq = QueryGenerator.arrangeID(sg);\n\t\t\t} //if-else\n\t\t\t\n\t\t\tfileContents.append(queryNo + \"\\t\" + q.getNumVertices() + \"\\t\" + degree + \"\\t\" + sourceNo + \"\\t\");\n\t\t\tSystem.out.print(\"N\" + q.getNumVertices() + \"D\" + degree + \"S\" + sourceNo + \",\\t\");\n\t\t\t\n\t\t\tint queryStatus = q.isPolytree();\n\t\t\tswitch (queryStatus) {\n\t\t\t\tcase -1: System.out.println(\"The query Graph is disconnected\");\n\t\t\t\t\tfileContents.append(\"-1\\t 0\\t 0\\t 0\\t -1\\t 0\\t\");\n\t\t\t\t\tcontinue;\n\t\t\t\tcase 0: System.out.print(\"! polytree, \");\n\t\t\t\t\tfileContents.append(\"0\\t\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase 1: System.out.print(\"a polytree, \");\n\t\t\t\t\tfileContents.append(\"1\\t\");\n\t\t\t\t\tbreak;\n\t\t\t\tdefault: System.out.println(\"Undefined status of the query graph\");\n\t\t\t\t\tfileContents.append(\"2\\t 0\\t 0\\t 0\\t -1\\t 0\\t\");\n\t\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// searching in the cache\n\t\t\tPair<Integer, SmallGraph> hitPair = null;\n\t\t\tstartTime = System.nanoTime();\n\t\t\tboolean notInCache = true;\n\t\t\tSet<SmallGraph> candidateMatchSet = CacheUtils.getCandidateMatchSet(q, cacheIndex);\n\t\t\tint nHitCandidates = candidateMatchSet.size();\n\t\t\tSystem.out.print(\"nHitCandidates=\" + nHitCandidates + \", \");\n\t\t\tfileContents.append(nHitCandidates + \"\\t\");\n\t\t\t\n\t\t\tfor(SmallGraph candidate : candidateMatchSet) {\n\t\t\t\tif(CacheUtils.isDualCoverMatch(q, candidate)) {\n\t\t\t\t\tnotInCache = false;\n\t\t\t\t\tSystem.out.print(\"Hit the cache!, \");\n\n\t\t\t\t\thitPair = polytree2query.get(candidate);\n\t\t\t\t\t// use the cache content to answer the query\n//\t\t\t\t\tlong bTime = System.currentTimeMillis();\n//\t\t\t\t\tSmallGraph inducedSubgraph = cache.get(candidate);\n//\t\t\t\t\tSet<Ball> tightResults_cache = TightSimulation.getTightSimulation(inducedSubgraph, queryGraph);\n//\t\t\t\t\ttightResults_cache = TightSimulation.filterMatchGraphs(tightResults_cache);\n//\t\t\t\t\tlong fTime = System.currentTimeMillis();\n//\t\t\t\t\tSystem.out.println(\"The time for tight simulation from cache: \" + (fTime - bTime) + \" ms\");\n\t\t\t\t\tbreak; // the first match would be enough \n\t\t\t\t} //if\n\t\t\t} //for\n\t\t\tstopTime = System.nanoTime();\n\t\t\tt_searchCache = (double)(stopTime - startTime) / 1000000;\n\t\t\tSystem.out.print(\"search: \" + t_searchCache + \", \");\n\t\t\tfileContents.append(t_searchCache + \"\\t\");\n\t\t\t\n\t\t\tif(! notInCache) { // found in the cache\n\t\t\t\t// hit query\n\t\t\t\tfileContents.append(\"1\\t\");\n\t\t\t\tint hitQueryNo = hitPair.getValue0();\n\t\t\t\tSmallGraph hitQuery = hitPair.getValue1();\n\t\t\t\thitQuery.print2File(args[3] + \"/Q\" + hitQueryNo + \"_N\" + hitQuery.getNumVertices() + \".txt\");\n\t\t\t\tfileContents.append(hitQueryNo + \"\\t\" + hitQuery.getNumVertices() + \"\\t\");\n\t\t\t}\n\n\t\t\tstartTime = System.nanoTime();\n\t\t\tif(notInCache) { // Not found in the cache\n\t\t\t\tSystem.out.print(\"Not the cache!, \");\n\t\t\t\tfileContents.append(\"0\\t\");\n\t\t\t\tfileContents.append(\"-1\\t-1\\t\");\n//\t\t\t\tlong bTime = System.currentTimeMillis();\n//\t\t\t\tSet<Ball> tightResults_cache = TightSimulation.getTightSimulation(dataGraph, queryGraph);\n//\t\t\t\ttightResults_cache = TightSimulation.filterMatchGraphs(tightResults_cache);\n//\t\t\t\tlong fTime = System.currentTimeMillis();\n//\t\t\t\tSystem.out.println(\"The time for tight simulation without cache: \" + (fTime - bTime) + \" ms\");\n\t\t\t\t// store in the cache\n\t\t\t\t// The polytree of the queryGraph is created\n\t\t\t\tint center = q.getSelectedCenter();\n\t\t\t\tSmallGraph polytree = GraphUtils.getPolytree(q, center);\n\t\t\t\t// The dualSimSet of the polytree is found\n\t\t\t\t// The induced subgraph of the dualSimSet is found\n\t\t\t\t// The <polytree, inducedSubgraph> is stored in the cache\n//\t\t\t\tcache.put(polytree, inducedSubgraph);\n\t\t\t\tSet<Pair<Integer, Integer>> sig = polytree.getSignature(); \n\t\t\t\tif (cacheIndex.get(sig) == null) {\n\t\t\t\t\tSet<SmallGraph> pltSet = new HashSet<SmallGraph>();\n\t\t\t\t\tpltSet.add(polytree);\n\t\t\t\t\tcacheIndex.put(sig, pltSet);\n\t\t\t\t} else\n\t\t\t\t\tcacheIndex.get(sig).add(polytree);\n\t\t\t\t\n\t\t\t\tpolytree2query.put(polytree, new Pair<Integer, SmallGraph>(queryNo, q)); // save the queries filling the cache\n\t\t\t} //if\n\t\t\tstopTime = System.nanoTime();\n\t\t\tt_storeCache = (double)(stopTime - startTime) / 1000000;\n\t\t\tSystem.out.println(\"store: \" + t_storeCache);\n\t\t\tfileContents.append(t_storeCache + \"\\n\");\t\t\t\n\t\t\t\n\t\t\tbw.write(fileContents.toString());\n\t\t\tfileContents.delete(0, fileContents.length());\n\t\t} //for\n\t\t\n\t\tbw.close();\n\t\t\n\t\tSystem.out.println(\"Number of signatures stored: \" + cacheIndex.size());\n\t\tSystem.out.println(\"Number of polytrees stored: \" + polytree2query.size());\n\t\tint maxSet = 0;\n\t\tfor(Set<SmallGraph> pt : cacheIndex.values()) {\n\t\t\tint theSize = pt.size();\n\t\t\tif(theSize > maxSet)\n\t\t\t\tmaxSet = theSize;\n\t\t} //for\n\t\tSystem.out.println(\"The maximum number of stored polytrees with the same signature: \" + maxSet);\n\t}",
"public static void main( String[] args ){\n AdjListsGraph<String> a = new AdjListsGraph<String>( \"Sample-Graph.tgf\" );\n System.out.println( a );\n System.out.println( \"Number of vertices (5):\" + a.getNumVertices());\n System.out.println( \"Number of arcs (7):\" + a.getNumArcs());\n System.out.println( \"isEdge A<-->B (TRUE):\" + a.isEdge(\"A\", \"B\"));\n System.out.println( \"isArc A-->C (TRUE):\" + a.isArc( \"A\",\"C\"));\n System.out.println( \"isEdge D<-->E (FALSE):\" + a.isEdge( \"D\",\"E\" ));\n System.out.println( \"isArc D -> E (TRUE):\" + a.isArc( \"D\",\"E\" ));\n System.out.println( \"isArc E -> D (FALSE):\" + a.isArc( \"E\",\"D\" ));\n System.out.println( \"Removing vertex A.\");\n a.removeVertex( \"A\" );\n System.out.println( \"Adding edge B<-->D\");\n a.addEdge( \"B\",\"D\" );\n System.out.println( \"Number of vertices (4):\" + a.getNumVertices());\n System.out.println( \"Number of arcs (5):\" + a.getNumArcs());\n System.out.println( a );\n System.out.println( \"Adj to B ([C,D]):\" + a.getSuccessors( \"B\" ) );\n System.out.println( \"Adj to C ([B]):\" + a.getSuccessors( \"C\" ));\n System.out.println( \"Adding A (at the end of vertices).\" );\n a.addVertex( \"A\" ); \n System.out.println( \"Adding B (should be ignored).\" );\n a.addVertex( \"B\" );\n System.out.println( \"Saving the graph into BCDEA.tgf\" );\n a.saveToTGF( \"BCDEA.tgf\" );\n System.out.println( \"Adding F->G->H->I->J->K->A.\" );\n a.addVertex( \"F\" );\n a.addVertex( \"G\" );\n a.addArc( \"F\", \"G\" );\n a.addVertex( \"H\" );\n a.addArc( \"G\", \"H\" );\n a.addVertex( \"I\" );\n a.addArc( \"H\", \"I\" );\n a.addVertex( \"J\" );\n a.addArc( \"I\", \"J\" );\n a.addVertex( \"K\" );\n a.addArc( \"J\", \"K\" );\n a.addArc( \"K\", \"A\" );\n System.out.println( a );\n System.out.println( \"Saving the graph into A-K.tgf\" );\n a.saveToTGF( \"A-K.tgf\" );\n }",
"public static void main(String[] args) {\n// System.out.println(testQueue.getQueueElement());\n// System.out.println(testQueue.getQueueElement());\n }",
"public DepthFirst(String q) throws Exception\n {\n /* load graph files */\n graph = ImmutableGraph.load(graphFile);\n labeler = GraphLabeler.load(labelerFile);\n \n /* Set depth first parameters */\n \n //start = 13560; // start node\n query = q;\n maxDist = 3000000; // distance to traverse\n n = graph.numNodes(); // total number of nodes\n \n\tdist = new int[ n ]; // distance array\n IntArrays.fill( dist, Integer.MAX_VALUE ); // Initially, all distances are infinity.\n \n\n \n \n // stack = new Stack(); \n }",
"void createGraphForMassiveLoad();",
"public String depthFirstSearch( AnyType start_vertex ) throws VertexException {\n \n StringBuffer buffer = new StringBuffer();\n \n // ----------------------------\n // TODO: Add your code here\n // ----------------------------\n ConstantTimeStack<Vertex<AnyType>> stack = new ConstantTimeStack<Vertex<AnyType>>();\n boolean exists = false;\n Vertex<AnyType> S = new Vertex<AnyType>(start_vertex);\n int counter = 0;\n //loop through to set each vertex to not visited\n for( int i = 0; i < vertex_adjacency_list.size(); i++){\n vertex_adjacency_list.get(i).setVisited(-1);\n //if find the start vertex then set index position to counter\n if(vertex_adjacency_list.get(i).compareTo(S) == 0){\n exists = true;\n vertex_adjacency_list.get(i).setVisited(counter);\n counter = i;\n }\n }\n //if doesn't exist then through exception\n if(exists == false){\n throw new VertexException(\"Start Vertex does not exist\");\n }\n //if it does exist then push start node onto stack, set visited \n else if(exists){\n stack.push(vertex_adjacency_list.get(counter));\n vertex_adjacency_list.get(counter).setVisited(1);\n Vertex <AnyType> e = vertex_adjacency_list.get(counter);\n counter = 2;\n int n = e.numberOfAdjacentVertices();\n try{\n \n while(true){\n //loop through e's adjacent vertices \n for (n = e.numberOfAdjacentVertices()-1; n >=0 ; n--){\n //if the adacent vertex has not been visited\n if(e.getAdjacentVertex(n).hasBeenVisited()==false){\n //change e to adjacent vertex and push onto stack\n e = e.getAdjacentVertex(n);\n stack.push(e);\n //set e as visited at counter\n e.setVisited(counter);\n counter++;\n //reset n to e's num of vertices\n n = e.numberOfAdjacentVertices();\n }\n //if it has been visited and it's the first node in list\n //then pop it off the stack and then set e to new top\n //set n to new num of vertices\n else if(e.getAdjacentVertex(n).hasBeenVisited() && n == 0){\n stack.pop();\n e = stack.peek();\n n = e.numberOfAdjacentVertices();\n }\n }\n }\n }catch(EmptyStackException m){\n }\n }\n //loop through the list and print each with when it was visited\n for(int k = 0; k< vertex_adjacency_list.size(); k++){\n buffer.append(vertex_adjacency_list.get(k) + \":\" + vertex_adjacency_list.get(k).getVisited()+ \"\\n\");\n }\n \n return buffer.toString();\n \n }",
"@Override\n List<NodeData> pathFind() throws NoPathException {\n System.out.println(\"Starting Scenic\");\n\n frontier.add(start);\n\n while(!frontier.isEmpty()) {\n StarNode current = frontier.getLast();\n frontier.removeLast(); // pop the priority queue\n if(current.getXCoord() == goal.getXCoord() && current.getYCoord() == goal.getYCoord()) {\n // If we are at the goal, we need to backtrack through the shortest path\n System.out.println(\"At target!\");\n finalList.add(current); // we have to add the goal to the path before we start backtracking\n while(!(current.getXCoord() == start.getXCoord() && current.getYCoord() == start.getYCoord())) {\n finalList.add(current.getPreviousNode());\n current = current.getPreviousNode();\n System.out.println(current.getNodeID());\n }\n return finalList;\n }\n else {\n // we need to get all the neighbor nodes, identify their costs, and put them into the queue\n LinkedList<StarNode> neighbors = current.getNeighbors();\n // we also need to remove the previous node from the list of neighbors because we do not want to backtrack\n neighbors.remove(current.getPreviousNode());\n\n for (StarNode newnode : neighbors) {\n int nodePlace = this.listContainsId(frontier, newnode);\n if(nodePlace > -1) {\n if (frontier.get(nodePlace).getF() > actionCost(newnode) + distanceToGo(newnode, goal)) {\n System.out.println(\"Here\");\n frontier.remove(frontier.get(nodePlace));\n newnode.setPreviousNode(current);\n frontier.add(newnode);\n newnode.setF(actionCost(newnode) + distanceToGo(newnode, goal));\n }\n }\n else {\n newnode.setPreviousNode(current);\n frontier.add(newnode);\n newnode.setF(actionCost(newnode) + distanceToGo(newnode, goal));\n }\n\n // This fixes the problem with infinitely looping elevators (I hope)\n if(current.getNodeType().equals(\"ELEV\") && newnode.getNodeType().equals(\"ELEV\")) {\n for (Iterator<StarNode> iterator = newnode.neighbors.iterator(); iterator.hasNext();) {\n StarNode newneighbor = iterator.next();\n if (newneighbor.getNodeType().equals(\"ELEV\")) {\n // Remove the current element from the iterator and the list.\n iterator.remove();\n }\n }\n }\n if(current.getNodeType().equals(\"STAI\") && newnode.getNodeType().equals(\"STAI\")) {\n for (Iterator<StarNode> iterator = newnode.neighbors.iterator(); iterator.hasNext();) {\n StarNode newneighbor = iterator.next();\n if (newneighbor.getNodeType().equals(\"STAI\")) {\n // Remove the current element from the iterator and the list.\n iterator.remove();\n }\n }\n }\n // this is where the node is put in the right place in the queue\n Collections.sort(frontier);\n }\n }\n }\n throw new NoPathException(start.getLongName(), goal.getLongName());\n }",
"public DVDQueue() { \n\t\tqueue = new LinkedList<DVDPackage>(); \n\t}",
"@Test\n public void test2() throws Exception {\n String query = \"A =LOAD 'file.txt' AS (a:(u,v), b, c);\" +\n \"B = FOREACH A GENERATE $0, b;\" +\n \"C = FILTER B BY \" + SIZE.class.getName() +\"(TOTUPLE(*)) > 5;\" +\n \"STORE C INTO 'empty';\"; \n LogicalPlan newLogicalPlan = buildPlan( query );\n\n Operator load = newLogicalPlan.getSources().get( 0 );\n Assert.assertTrue( load instanceof LOLoad );\n Operator fe1 = newLogicalPlan.getSuccessors( load ).get( 0 );\n Assert.assertTrue( fe1 instanceof LOForEach );\n Operator filter = newLogicalPlan.getSuccessors( fe1 ).get( 0 );\n Assert.assertTrue( filter instanceof LOFilter );\n Operator fe2 = newLogicalPlan.getSuccessors( filter ).get( 0 );\n Assert.assertTrue( fe2 instanceof LOForEach );\n }",
"static void bfs(String label) {\n\n /* Add a graph node to the queue. */\n queue.addLast(label);\n graphVisited.put(label, true);\n\n while (!queue.isEmpty()) {\n\n /* Take a node out of the queue and add it to the list of visited nodes. */\n if (!graphVisited.containsKey(queue.getFirst()))\n graphVisited.put(queue.getFirst(), true);\n\n String str = queue.removeFirst();\n\n /*\n For each unvisited vertex from the list of the adjacent vertices,\n add the vertex to the queue.\n */\n for (String lab : silhouette.get(str)) {\n if (!graphVisited.containsKey(lab) && lab != null && !queue.contains(lab))\n queue.addLast(lab);\n }\n }\n }",
"public void dft() {\r\n\t\tHashMap<String, Boolean> processed = new HashMap<>();\r\n\t\tLinkedList<Pair> stack = new LinkedList<>();\r\n\r\n\t\tArrayList<String> vnames = new ArrayList<>(vces.keySet());\r\n\t\tfor (String vname : vnames) {\r\n\t\t\tif (processed.containsKey(vname)) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tPair rootpair = new Pair(vname, vname);\r\n\t\t\tstack.addFirst(rootpair);\r\n\t\t\twhile (stack.size() != 0) {\r\n\t\t\t\t// 1. removeFirst\r\n\t\t\t\tPair rp = stack.removeFirst();\r\n\r\n\t\t\t\t// 2. check if processed, mark if not\r\n\t\t\t\tif (processed.containsKey(rp.vname)) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tprocessed.put(rp.vname, true);\r\n\r\n\t\t\t\t// 3. Check, if an edge is found\r\n\t\t\t\tSystem.out.println(rp.vname + \" via \" + rp.psf);\r\n\r\n\t\t\t\t// 4. Add the unprocessed nbrs back\r\n\t\t\t\tArrayList<String> nbrnames = new ArrayList<>(rp.vtx.nbrs.keySet());\r\n\t\t\t\tfor (String nbrname : nbrnames) {\r\n\t\t\t\t\tif (!processed.containsKey(nbrname)) {\r\n\t\t\t\t\t\tPair np = new Pair(nbrname, rp.psf + nbrname);\r\n\t\t\t\t\t\tstack.addFirst(np);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"private void treeBreadthFirstTraversal() {\n Node currNode = root;\n java.util.LinkedList<Node> queue = new java.util.LinkedList<Node>();\n\n // Highlights the first Node.\n queueNodeSelectAnimation(currNode, \"Exploring \" + currNode.key,\n AnimationParameters.ANIM_TIME);\n\n // Explores Nodes until the queue is empty.\n while (true) {\n\n // Marks that this Node's children should be explored.\n for (int i = 0; i < getNumChildren(); ++i) {\n if (currNode.children[i] != null) {\n queue.addLast(currNode.children[i]);\n queueQueueAddAnimation(currNode.children[i],\n \"Queueing \" + currNode.children[i].key,\n AnimationParameters.ANIM_TIME);\n\n }\n }\n\n // Pops the next Node from the queue.\n if (!queue.isEmpty()) {\n currNode = queue.pop();\n queueListPopAnimation(\"Popped \" + currNode.key,\n AnimationParameters.ANIM_TIME);\n queueNodeSelectAnimation(currNode, \"Exploring \" + currNode.key,\n AnimationParameters.ANIM_TIME);\n\n }\n // If the queue is empty, breaks.\n else break;\n\n }\n }",
"public void secondScan(String path) throws Exception {\n\t\tSystem.out.println(\"=======secondScan==========\");\r\n\t\t\r\n\t\tindiv2con.openSearcher(path);\r\n\t\tBufferedReader root = new BufferedReader(new FileReader(path+resultFile)), br;\r\n\t\tnew File(path+GRAPHEDGEPOOL).mkdir();\r\n\t\tPrintWriter pw;\r\n\t\tindivSize = Integer.parseInt(root.readLine());\r\n\t\tpropSize = Integer.parseInt(root.readLine());\r\n\t\tObjectInputStream in = new ObjectInputStream(new FileInputStream(path+conceptCountObj));\r\n\t\tconceptCount = (TreeMap<String, Integer>)in.readObject(); \r\n\t\tin.close();\r\n\t\tcache = new TreeMap<String, Set<String>>();\r\n\t\tString predid;\r\n\t\tint count = 0, hits = 0;\r\n\t\twhile((predid = root.readLine())!=null)\r\n\t\t{\r\n\t\t\tString pred = predid.substring(0, predid.indexOf('\\t'));\r\n\t\t\tString id = predid.substring(predid.indexOf('\\t')+1);\r\n\t\t\tSystem.out.println((++count)+\" \"+pred+\"\\tcache:\"+cache.size()+\"\\thits:\"+hits);\r\n\t\t\t\r\n\t\t\tFile file = new File(path+OBJPROPPOOL+File.separator+id);\r\n\t\t\tif(file.length() > MAX_OBJPROP_FILESIZE) continue;\r\n\t\t\tbr = new BufferedReader(new FileReader(file));\r\n\t\t\t\r\n\t\t\tTreeMap<String, Integer> triples = new TreeMap<String, Integer>();\r\n\t\t\t\r\n\t\t\tString line;\r\n\t\t\twhile((line = br.readLine())!= null)\r\n\t\t\t{\r\n\t\t\t\tString subj = line.substring(0, line.indexOf('\\t'));\r\n\t\t\t\tString obj = line.substring(line.indexOf('\\t')+1);\r\n\t\t\t\tSet<String> subjParent = null, objParent = null;\r\n\t\t\t\tsubjParent = cache.get(subj);\r\n\t\t\t\ttry \r\n\t\t\t\t{\r\n\t\t\t\t\tif(subjParent == null || subjParent.size()==0)\r\n\t\t\t\t\t\tsubjParent = indiv2con.search(subj);\r\n\t\t\t\t\telse hits++;\r\n\t\t\t\t} catch (Exception e) { e.printStackTrace(); continue; }\r\n\t\t\t\t\r\n\t\t\t\tif(subjParent == null || subjParent.size()==0)\r\n\t\t\t\t{\r\n\t\t\t\t\tsubjParent = new TreeSet<String>();\r\n\t\t\t\t\tsubjParent.add(NamedConcept.TOP.getUri());\r\n\t\t\t\t}\r\n\t\t\t\tif(!cache.containsKey(subj))\r\n\t\t\t\t\tcache.put(subj, subjParent);\r\n//\t\t\t\tSystem.out.println(obj);\r\n\t\t\t\tobjParent = cache.get(obj);\r\n\t\t\t\ttry \r\n\t\t\t\t{\r\n\t\t\t\t\tif(objParent == null || objParent.size()==0)\r\n\t\t\t\t\t\tobjParent = indiv2con.search(obj);\r\n\t\t\t\t\telse hits++;\r\n\t\t\t\t} catch (Exception e) { e.printStackTrace(); continue; }\r\n\t\t\t\t\r\n\t\t\t\tif(objParent == null || objParent.size()==0)\r\n\t\t\t\t{\r\n\t\t\t\t\tobjParent = new TreeSet<String>();\r\n\t\t\t\t\tobjParent.add(NamedConcept.TOP.getUri());\r\n\t\t\t\t}\r\n\t\t\t\tif(!cache.containsKey(obj))\r\n\t\t\t\t\tcache.put(obj, objParent);\r\n\t\t\t\t\r\n\t\t\t\twhile(cache.size()>=MAX_CACHE_SIZE) cache.clear();\r\n\t\t\t\t\r\n\t\t\t\tfor(String str: subjParent)\r\n\t\t\t\t{\r\n\t\t\t\t\tfor(String otr: objParent)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tInteger i = triples.get(str+'\\t'+otr);\r\n\t\t\t\t\t\tif(i==null) i = 0;\r\n\t\t\t\t\t\ttriples.put(str+'\\t'+otr, i+1);\r\n\t\t\t\t\t}\t\t\r\n\t\t\t\t}\r\n\t\t\t\tsubjParent = null;\r\n\t\t\t\tobjParent = null;\r\n\t\t\t}\r\n\t\t\tbr.close();\r\n\t\t\tpw = new PrintWriter(new FileWriter(path+GRAPHEDGEPOOL+File.separator+id));\r\n\t\t\tSystem.out.println(\"search finished! size:\"+triples.size());\r\n\t\t\tint order = 0;\r\n\t\t\tfor(String so: triples.keySet())\r\n\t\t\t{\r\n\t\t\t\tString str = so.substring(0, so.indexOf('\\t'));\r\n\t\t\t\tString otr = so.substring(so.indexOf('\\t')+1);\r\n\t\t\t\tString ptr = pred+\"(\"+order+\")\";\r\n\t\t\t\tdouble sscore, oscore, pscore;\r\n\t\t\t\tif(str.equals(NamedConcept.TOP.getUri()))\r\n\t\t\t\t\tsscore = TOP_ELEMENT_SCORE;\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tInteger j = conceptCount.get(str);\r\n\t\t\t\t\tif(j==null) sscore = Double.MAX_VALUE;\r\n\t\t\t\t\telse sscore = j.doubleValue()/indivSize;\r\n\t\t\t\t}\r\n\t\t\t\tif(otr.equals(NamedConcept.TOP.getUri()))\r\n\t\t\t\t\toscore = TOP_ELEMENT_SCORE;\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tInteger j = conceptCount.get(otr);\r\n\t\t\t\t\tif(j==null) oscore = Double.MAX_VALUE;\r\n\t\t\t\t\telse oscore = j.doubleValue()/indivSize;\r\n\t\t\t\t}\r\n\t\t\t\tInteger i = triples.get(so);\r\n\t\t\t\tif(i==null) pscore = Double.MAX_VALUE;\r\n\t\t\t\telse pscore = i.doubleValue()/propSize;\r\n\t\t\t\tpw.println(str+\"\\t\"+sscore+\"\\t\"+ptr+\"\\t\"+pscore+\"\\t\"+otr+\"\\t\"+oscore);\r\n\t\t\t\torder++;\r\n\t\t\t}\r\n\t\t\tpw.close();\r\n\t\t\ttriples.clear();\r\n\t\t\ttriples = null;\r\n\t\t\t\r\n\t\t}\r\n\t\troot.close();\r\n\t\tindiv2con.closeSearcher();\r\n\t}",
"public static void main(String[] args) throws IOException {\n File file = new File(args[0]);\r\n //FileOutputStream f = new FileOutputStream(\"prat_dfs_data2.txt\");\r\n //System.setOut(new PrintStream(f));\r\n BufferedReader reader = new BufferedReader(new FileReader(file));\r\n String line;\r\n line = reader.readLine();\r\n int nodecount = 0;\r\n HashMap <String , Integer> nodeMap = new HashMap <String , Integer>(); \r\n while ((line = reader.readLine()) != null ) {\r\n String data[] = line.split(\",(?=(?:[^\\\"]*\\\"[^\\\"]*\\\")*[^\\\"]*$)\");\r\n if (!nodeMap.containsKey(data[0].replaceAll(\"^\\\"|\\\"$\", \"\"))){\r\n nodeMap.put(data[0].replaceAll(\"^\\\"|\\\"$\", \"\"), nodecount);\r\n nodecount++;\r\n }\r\n }\r\n reader.close();\r\n Vertex adjList[] = new Vertex[nodecount];\r\n Vertex sortVer[] = new Vertex[nodecount];\r\n for(int it = 0; it < nodecount; it++){\r\n adjList[it] = new Vertex(it);\r\n }\r\n nodeMap.forEach((k, v) -> adjList[v].val = k);\r\n File file2 = new File(args[1]);\r\n BufferedReader reader2 = new BufferedReader(new FileReader(file2));\r\n line = reader2.readLine();\r\n while ((line = reader2.readLine()) !=null) {\r\n String data[] = line.split(\",(?=(?:[^\\\"]*\\\"[^\\\"]*\\\")*[^\\\"]*$)\");\r\n String source = data[0].replaceAll(\"^\\\"|\\\"$\", \"\");\r\n String target = data[1].replaceAll(\"^\\\"|\\\"$\", \"\");\r\n\r\n int weight = Integer.parseInt(data[2]);\r\n Vertex current = adjList[nodeMap.get(source)];\r\n Vertex newbie = new Vertex(nodeMap.get(target));\r\n current.countN++;\r\n current.co_occur += weight;\r\n if (adjList[nodeMap.get(source)].next == null){\r\n current.next = newbie;\r\n newbie.prev = current;\r\n }\r\n else{\r\n current.next.prev = newbie;\r\n newbie.next = current.next;\r\n current.next = newbie;\r\n newbie.prev = current;\r\n }\r\n Vertex current1 = adjList[nodeMap.get(target)];\r\n Vertex newbie1 = new Vertex(nodeMap.get(source));\r\n current1.co_occur += weight;\r\n current1.countN++;\r\n if (current1.next == null){\r\n current1.next = newbie1;\r\n newbie1.prev = current1;\r\n }\r\n else{\r\n current1.next.prev = newbie1;\r\n newbie1.next = current1.next;\r\n current1.next = newbie1;\r\n newbie1.prev = current1;\r\n }\r\n }\r\n reader2.close();\r\n \r\n for(int it = 0; it < nodecount; it++){\r\n sortVer[it] = new Vertex(adjList[it].id);\r\n sortVer[it].val = adjList[it].val;\r\n sortVer[it].co_occur = adjList[it].co_occur;\r\n }\r\n if (args[2].equals(\"average\")){\r\n double countdeg = 0;\r\n for(int it = 0; it<nodecount; it++){\r\n countdeg+= (double) adjList[it].countN;\r\n }\r\n countdeg = countdeg / (double) (nodecount);\r\n System.out.printf(\"%.2f\", countdeg);\r\n System.out.println();\r\n //long toc= System.nanoTime();\r\n //System.out.println((toc- startTime)/1000000000.0);\r\n }\r\n \r\n if(args[2].equals(\"rank\")){\r\n Graph.mergesort(sortVer, 0, nodecount-1);\r\n // long toc= System.nanoTime();\r\n // System.out.println((toc- startTime)/1000000000.0);\r\n System.out.print(sortVer[0].val);\r\n for(int kk=1; kk<nodecount; kk++){\r\n System.out.print(\",\" + sortVer[kk].val.toString());\r\n }\r\n System.out.println();\r\n }\r\n if(args[2].equals(\"independent_storylines_dfs\")){\r\n boolean visited[] = new boolean[nodecount];\r\n int ind = 0;\r\n ArrayList<ArrayList<Vertex>> comps = new ArrayList<ArrayList<Vertex>>();\r\n for(int it1 = 0; it1<nodecount; it1++){\r\n visited[it1] = false;\r\n }\r\n for(int it1 = 0; it1<nodecount; it1++){\r\n if (visited[it1] == false){\r\n ArrayList<Vertex> temp = new ArrayList<Vertex>();\r\n Graph.dfs(it1, visited, ind, adjList, temp);\r\n ind++;\r\n Graph.mergesort2(temp, 0, temp.size()-1);\r\n comps.add(temp);\r\n }\r\n }\r\n Graph.mergesort3(comps, 0, comps.size()-1);\r\n // long toc= System.nanoTime();\r\n // System.out.println((toc- startTime)/1000000000.0);\r\n for(int a1 = 0; a1 < ind; a1++){\r\n System.out.print(comps.get(a1).get(0).val);\r\n for(int j1 = 1; j1<comps.get(a1).size(); j1++){\r\n System.out.print(\",\" + comps.get(a1).get(j1).val);\r\n }\r\n System.out.println();\r\n }\r\n }\r\n }",
"public void testLoadOrder() throws Exception {\n }",
"public List<Long> getPath(Long start, Long finish){\n \n \n List<Long> res = new ArrayList<>();\n // auxiliary list\n List<DeixtraObj> serving = new ArrayList<>();\n// nearest vertexes map \n Map<Long,DeixtraObj> optimMap = new HashMap<>();\n// thread save reading \n synchronized (vertexes){ \n // preparation\n for (Map.Entry<Long, Vertex> entry : vertexes.entrySet()) {\n Vertex userVertex = entry.getValue();\n // If it`s start vertex weight = 0 and the nereast vertex is itself \n if(userVertex.getID().equals(start)){\n serving.add(new DeixtraObj(start, 0.0, start));\n }else{\n // For other vertex weight = infinity and the nereast vertex is unknown \n serving.add(new DeixtraObj(userVertex.getID(), Double.MAX_VALUE, null));\n }\n\n } \n // why auxiliary is not empty \n while(serving.size()>0 ){\n // sort auxiliary by weight \n Collections.sort(serving);\n\n \n // remove shortes fom auxiliary and put in to answer \n DeixtraObj minObj = serving.remove(0);\n optimMap.put(minObj.getID(), minObj);\n\n Vertex minVertex = vertexes.get(minObj.getID());\n\n // get all edges from nearest \n for (Map.Entry<Long, Edge> entry : minVertex.allEdges().entrySet()) {\n Long dest = entry.getKey();\n Double wieght = entry.getValue().getWeight();\n // by all remain vertexes \n for(DeixtraObj dx : serving){\n if(dx.getID().equals(dest)){\n // if in checking vertex weight more then nearest vertex weight plus path to cheking \n // then change in checking weight and nearest\n if( (minObj.getWeight()+wieght) < dx.getWeight()){\n dx.setNearest(minVertex.getID());\n dx.setWeight((minObj.getWeight()+wieght));\n }\n }\n }\n }\n\n }\n }\n \n // create output list\n res.add(finish);\n Long point = finish;\n while(!point.equals(start)){\n \n point = ((DeixtraObj)optimMap.get(point)).getNearest();\n res.add(point);\n }\n \n Collections.reverse(res);\n \n \n return res;\n \n }",
"public void search(IndexShort < O > index, short range, short k)\n throws Exception {\n // assertEquals(index.aDB.count(), index.bDB.count());\n // assertEquals(index.aDB.count(), index.bDB.count());\n // index.stats();\n index.resetStats();\n // it is time to Search\n int querySize = 1000; // amount of elements to read from the query\n String re = null;\n logger.info(\"Matching begins...\");\n File query = new File(testProperties.getProperty(\"test.query.input\"));\n File dbFolder = new File(testProperties.getProperty(\"test.db.path\"));\n BufferedReader r = new BufferedReader(new FileReader(query));\n List < OBPriorityQueueShort < O >> result = new LinkedList < OBPriorityQueueShort < O >>();\n re = r.readLine();\n int i = 0;\n long realIndex = index.databaseSize();\n\n while (re != null) {\n String line = parseLine(re);\n if (line != null) {\n OBPriorityQueueShort < O > x = new OBPriorityQueueShort < O >(\n k);\n if (i % 100 == 0) {\n logger.info(\"Matching \" + i);\n }\n\n O s = factory.create(line);\n if (factory.shouldProcess(s)) {\n if(i == 279){\n System.out.println(\"hey\");\n }\n index.searchOB(s, range, x);\n result.add(x);\n i++;\n }\n }\n if (i == querySize) {\n logger.warn(\"Finishing test at i : \" + i);\n break;\n }\n re = r.readLine();\n }\n \n logger.info(index.getStats().toString());\n \n int maxQuery = i;\n // logger.info(\"Matching ends... Stats follow:\");\n // index.stats();\n\n // now we compare the results we got with the sequential search\n Iterator < OBPriorityQueueShort < O >> it = result.iterator();\n r.close();\n r = new BufferedReader(new FileReader(query));\n re = r.readLine();\n i = 0;\n while (re != null) {\n String line = parseLine(re);\n if (line != null) {\n if (i % 300 == 0) {\n logger.info(\"Matching \" + i + \" of \" + maxQuery);\n }\n O s = factory.create(line);\n if (factory.shouldProcess(s)) {\n OBPriorityQueueShort < O > x2 = new OBPriorityQueueShort < O >(\n k);\n searchSequential(realIndex, s, x2, index, range);\n OBPriorityQueueShort < O > x1 = it.next();\n //assertEquals(\"Error in query line: \" + i + \" slice: \"\n // + line, x2, x1); \n \n assertEquals(\"Error in query line: \" + i + \" \" + index.debug(s) + \"\\n slice: \"\n + line + \" \" + debug(x2,index ) + \"\\n\" + debug(x1,index), x2, x1);\n\n i++;\n }\n \n }\n if (i == querySize) {\n logger.warn(\"Finishing test at i : \" + i);\n break;\n }\n re = r.readLine();\n }\n r.close();\n logger.info(\"Finished matching validation.\");\n assertFalse(it.hasNext());\n }",
"@Test\n public void test1() throws Exception {\n String query = \"A =LOAD 'file.txt' AS (a:bag{(u,v)}, b, c);\" +\n \"B = FOREACH A GENERATE $0, b;\" +\n \"C = FILTER B BY \" + COUNT.class.getName() +\"($0) > 5;\" +\n \"STORE C INTO 'empty';\"; \n LogicalPlan newLogicalPlan = buildPlan( query );\n\n Operator load = newLogicalPlan.getSources().get( 0 );\n Assert.assertTrue( load instanceof LOLoad );\n Operator fe1 = newLogicalPlan.getSuccessors( load ).get( 0 );\n Assert.assertTrue( fe1 instanceof LOForEach );\n Operator filter = newLogicalPlan.getSuccessors( fe1 ).get( 0 );\n Assert.assertTrue( filter instanceof LOFilter );\n Operator fe2 = newLogicalPlan.getSuccessors( filter ).get( 0 );\n Assert.assertTrue( fe2 instanceof LOForEach );\n }",
"@Test\n public void Traversal_Test()\n {\n\n ct = new CompoundTransaction(\"compound1\");\n ct1 = new CompoundTransaction(\"compound2\");\n\n acc3 = new Account(3,\"Jacob&Leon3\",2000);\n\n acc_db.addAccount(acc);\n acc_db.addAccount(acc2);\n acc_db.addAccount(acc3);\n\n Transaction atomic = new Transaction(\"atomic1\", acc_db,acc.get_Account_Number(),acc2.get_Account_Number(),100);\n Transaction atomic2 =new Transaction(\"atomic2\", acc_db,acc3.get_Account_Number(),acc2.get_Account_Number(),100);\n Transaction atomic3 = new Transaction(\"atomic3\",acc_db,acc.get_Account_Number(),acc2.get_Account_Number(),200);\n\n ct.addTransaction(atomic);\n ct.addTransaction(atomic2);\n\n ct1.addTransaction(atomic3);\n\n ct.addTransaction(ct1);\n\n //Desired Output\n List<Transaction> desired_output = new ArrayList<Transaction>();\n\n desired_output.add(atomic);\n desired_output.add(atomic2);\n desired_output.add(atomic3);\n\n Iterator my_iter = new Iterator(ct);\n\n Assert.assertEquals(desired_output.size(),my_iter.getTraversal_result().size());\n Assert.assertEquals(true,my_iter.getTraversal_result().contains(atomic));\n Assert.assertEquals(true,my_iter.getTraversal_result().contains(atomic2));\n Assert.assertEquals(true,my_iter.getTraversal_result().contains(atomic3));\n }",
"ExpRun importRun(PipelineJob job, XarSource source) throws SQLException, PipelineJobException, ValidationException;",
"public static void main(String[] args) {\n MyQueue queue = new MyQueue();\n student obj1 = new student();\n obj1.setName(\"shashank\");\n obj1.setRoll(6);\n queue.enqueue(obj1);\n student obj2 = new student();\n obj2.setName(\"prashant\");\n obj2.setRoll(2);\n queue.enqueue(obj2);\n student obj = new student();\n obj.setName(\"maneesh\");\n obj.setRoll(10);\n queue.enqueue(obj);\n student obj4 = new student();\n obj4.setName(\"shreya\");\n obj4.setRoll(4);\n queue.enqueue(obj);\n System.out.println(\"the size queue is = \" + queue.getSize());\n queue.sortList();\n queue.traverse();\n }",
"public static void main(String[] args) throws Exception\r\n {\n if (args.length != 5) {\r\n System.out.println(\"Required arguments: NETWORK_SCHEME ROUTING_SCHEME TOPOLOGY_FILE WORKLOAD_FILE PACKET_RATE\");\r\n return;\r\n }\r\n Request currRequest;\r\n int successfulPackets = 0;\r\n int blockedPackets = 0;\r\n int totPackets = 0;\r\n \r\n // Initialise Network topology and workload based on input files\r\n network_topology = new Network(args[TOPOLOGY_FILE]);\r\n workload = new Workload(args[WORKLOAD_FILE], Integer.parseInt(args[PACKET_RATE]), args[NETWORKING_SCHEME]);\r\n numHops = 0;\r\n cumPropagationDelay = 0;\r\n \r\n // Initialise the Dijkstra's processor and set the routing scheme\r\n router = new RoutingProcessor(network_topology);\r\n router.setMethod(args[ROUTING_SCHEME]);\r\n \r\n // Go through the workload and process each request\r\n while(!workload.isEmpty())\r\n {\r\n // Pop off the top of the list\r\n currRequest = workload.remove();\r\n totPackets+=currRequest.packets;\r\n \r\n\r\n currRequest.path = router.computeBestPath(currRequest.source, currRequest.dest);\r\n\r\n\r\n if(network_topology.createCircuit(currRequest) == 0)\r\n {\r\n // Sum up the number of hops and propagation delay on the path\r\n numHops += (network_topology.numHops(currRequest))*currRequest.packets;\r\n cumPropagationDelay += network_topology.calculateCumPropDelay(currRequest) * currRequest.packets;\r\n successfulPackets+=currRequest.packets;\r\n //System.out.println(\"=======success!=============\");\r\n } else {\r\n blockedPackets+=currRequest.packets;\r\n //System.out.println(\"=======blocked=============\");\r\n }\r\n \r\n }\r\n \r\n\r\n // Print out all analytics\r\n int totVirtualCircuitRequests = workload.vcRequestCount;\r\n double percentageSuccessPackets = (double) (((double) successfulPackets/(double) totPackets) * 100.0);\r\n double perecentageBlockedPackets = (double) (((double) blockedPackets/ (double) totPackets) * 100.0);\r\n double averageNumHops = (double) numHops/ (double) successfulPackets;\r\n double averageCumPropDelay = (double) cumPropagationDelay/ (double) successfulPackets;\r\n \r\n// System.out.println(\"-----------\");\r\n// System.out.println(Arrays.toString(args));\r\n System.out.println(\"total number of virtual circuit requests: \" + totVirtualCircuitRequests);\r\n System.out.println(\"total number of packets: \" + totPackets);\r\n System.out.println(\"number of successfully routed packets: \" + successfulPackets);\r\n System.out.format(\"percentage of successfully routed packets: %.2f\\n\", percentageSuccessPackets);\r\n System.out.println(\"number of blocked packets: \" + blockedPackets);\r\n System.out.format(\"percentage of blocked packets: %.2f\\n\", perecentageBlockedPackets);\r\n System.out.format(\"average number of hops per circuit: %.2f\\n\" , averageNumHops);\r\n System.out.format(\"average cumulative propagation delay per circuit: %.2f\\n\" , averageCumPropDelay);\r\n }",
"public static void main(String[] args) throws ParallelException {\r\n\t\tif (args.length < 2) {\r\n\t\t\tSystem.err.println(\"usage: java -cp <classpath> <graphfile> <k> \"+\r\n\t\t\t\t \"[numinitnodes] [numiterations] \"+\r\n\t\t\t\t \"[do_local_search] [num_dls_threads] \"+\r\n\t\t\t\t \"[max_allowed_time_millis] [use_N2RXP_4_DLS]\");\r\n\t\t\tSystem.exit(-1);\r\n\t\t}\r\n try {\r\n long st = System.currentTimeMillis();\r\n Graph g = DataMgr.readGraphFromFile2(args[0]);\r\n\t\t\tint k = Integer.parseInt(args[1]);\r\n double best = 0;\r\n boolean do_local_search = false;\r\n\t\t\tboolean use_N2RXP_4_ls = false;\r\n int num_threads = 1;\r\n\t\t\tlong max_time_ms = Long.MAX_VALUE; // indicates the max allowed time to run (in millis)\r\n GRASPPacker p = new GRASPPacker(g,k);\r\n Set init=null;\r\n int num_iters = 1;\r\n if (args.length>2) {\r\n int numinit = 0;\r\n try {\r\n numinit = Integer.parseInt(args[2]);\r\n if (numinit<0) numinit=0; // ignore wrong option value and continue\r\n }\r\n catch (ClassCastException e) {\r\n e.printStackTrace(); // ignore wrong option value and continue\r\n }\r\n Graph gp = p._g;\r\n int gsz = gp.getNumNodes();\r\n init = k==2 ? new TreeSet(new NodeComparator2()) : new TreeSet(new NodeComparator4());\r\n\t\t\t\tRandom rnd = RndUtil.getInstance().getRandom();\r\n for (int i=0; i<numinit; i++) {\r\n int nid = rnd.nextInt(gsz);\r\n Node n = gp.getNodeUnsynchronized(nid);\r\n init.add(n);\r\n }\r\n if (args.length>3) {\r\n try {\r\n num_iters = Integer.parseInt(args[3]);\r\n if (num_iters<0) num_iters = 0;\r\n }\r\n catch (ClassCastException e) {\r\n e.printStackTrace(); // ignore wrong option value and continue\r\n }\r\n if (args.length>4) {\r\n do_local_search = \"true\".equals(args[4]);\r\n if (args.length>5) {\r\n try {\r\n num_threads = Integer.parseInt(args[5]);\r\n\t\t\t\t\t\t\t\tif (args.length>6) {\r\n\t\t\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\t\t\tmax_time_ms = Long.parseLong(args[6]);\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\tcatch (Exception e) {\r\n\t\t\t\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\tif (args.length>7)\r\n\t\t\t\t\t\t\t\t\t\tuse_N2RXP_4_ls = \"true\".equals(args[7]);\r\n\t\t\t\t\t\t\t\t}\r\n }\r\n catch (Exception e) {\r\n e.printStackTrace(); // ignore wrong option and continue\r\n }\r\n }\r\n }\r\n }\r\n }\r\n Set best_found = null;\r\n\t\t\tif (max_time_ms<0) // -1 or any negative value indicates +Inf\r\n\t\t\t\tmax_time_ms = Long.MAX_VALUE;\r\n\t\t\tboolean cont = true;\r\n\t\t\tTimerThread t = new TimerThread(max_time_ms, cont);\r\n\t\t\tt.start();\r\n for (int i=0; i<num_iters && t.doContinue(); i++) {\r\n\t\t\t\tSystem.err.println(\"GRASPPacker: starting iteration \"+i);\r\n Set s = p.pack(init); // Set<Node>\r\n if (do_local_search) {\r\n // convert s to Set<Integer>\r\n Set nodeids = new IntSet();\r\n Iterator iter = s.iterator();\r\n while (iter.hasNext()) {\r\n Node n = (Node) iter.next();\r\n Integer nid = new Integer(n.getId());\r\n nodeids.add(nid);\r\n }\r\n // now do the local search\r\n DLS dls = new DLS();\r\n AllChromosomeMakerIntf movesmaker;\r\n\t\t\t\t\tif (use_N2RXP_4_ls) movesmaker = new IntSetN2RXPGraphAllMovesMaker(k);\r\n\t\t\t\t\telse movesmaker = new IntSetN1RXPFirstImprovingGraphAllMovesMakerMT(k);\r\n IntSetNeighborhoodFilterIntf filter = new GRASPPackerIntSetNbrhoodFilter2(k);\r\n //FunctionIntf f = k==2 ? new SetSizeEvalFunction() : new SetWeightEvalFunction(g);\r\n FunctionIntf f;\r\n if (k==2) f = new SetSizeEvalFunction();\r\n else f = new SetWeightEvalFunction(g);\r\n HashMap dlsparams = new HashMap();\r\n dlsparams.put(\"dls.movesmaker\",movesmaker);\r\n dlsparams.put(\"dls.x0\", nodeids);\r\n dlsparams.put(\"dls.numthreads\", new Integer(num_threads));\r\n dlsparams.put(\"dls.maxiters\", new Integer(10)); // itc: HERE rm asap\r\n dlsparams.put(\"dls.graph\", g);\r\n dlsparams.put(\"dls.intsetneighborhoodfilter\", filter);\r\n //dlsparams.put(\"dls.createsetsperlevellimit\", new Integer(100));\r\n dls.setParams(dlsparams);\r\n PairObjDouble pod = dls.minimize(f);\r\n Set sn = (Set) pod.getArg();\r\n if (sn!=null) {\r\n s.clear();\r\n Iterator sniter = sn.iterator();\r\n while (sniter.hasNext()) {\r\n Integer id = (Integer) sniter.next();\r\n Node n = g.getNode(id.intValue());\r\n s.add(n);\r\n }\r\n }\r\n }\r\n int iter_best = s.size();\r\n double iter_w_best = 0.0;\r\n Iterator it = s.iterator();\r\n while (it.hasNext()) {\r\n Node n = (Node) it.next();\r\n Double nwD = n.getWeightValueUnsynchronized(\"value\"); // used to be n.getWeightValue(\"value\");\r\n double nw = nwD==null ? 1.0 : nwD.doubleValue();\r\n iter_w_best += nw;\r\n }\r\n System.err.println(\"GRASPPacker.main(): iter: \"+i+\": soln size found=\"+iter_best+\" soln weight=\"+iter_w_best);\r\n if (iter_w_best > best) {\r\n best_found = s;\r\n best = iter_w_best;\r\n }\r\n }\r\n long tot = System.currentTimeMillis()-st;\r\n System.out.println(\"Final Best soln found=\"+best+\" total time=\"+tot+\" (msecs)\");\r\n if (p.isFeasible(best_found)) {\r\n System.out.println(\"feasible soln: \"+printNodes(best_found));\r\n }\r\n else System.err.println(\"infeasible soln\");\r\n // write solution to file\r\n PrintWriter pw = new PrintWriter(new FileWriter(\"sol.out\"));\r\n pw.println(best);\r\n Iterator it = best_found.iterator();\r\n while (it.hasNext()) {\r\n Node n = (Node) it.next();\r\n pw.println((n.getId()+1));\r\n }\r\n pw.flush();\r\n pw.close();\r\n }\r\n catch (Exception e) {\r\n e.printStackTrace();\r\n System.exit(-1);\r\n }\r\n }",
"@Override\n\t\t\tprotected Void doInBackground() throws Exception {\n\t\t\t\tif (!verifyStartEndVerticesExist(true, false)) {\n\t\t\t\t\tsetRunning(false);\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Queue\n\t\t\t\tQueue<Vertex> q = new LinkedList<Vertex>();\n\t\t\t\t\n\t\t\t\t// set start vertex as visited\n\t\t\t\tpanel.getStartVertex().setVisited(true);\n\t\t\t\tq.add(panel.getStartVertex());\n\t\t\t\twhile (!q.isEmpty()) {\n\t\t\t\t\tVertex v = q.remove();\n\t\t\t\t\tv.setSelected(true);\n\t\t\t\t\tpublish();\n\t\t\t\t\tThread.sleep(panel.getCurrentDelay());\n\t\t\t\t\tfor (Vertex vertex : getNeighbors(v)) {\n\t\t\t\t\t\tvertex.setHighlighted();\n\t\t\t\t\t\tpublish();\n\t\t\t\t\t\tThread.sleep(panel.getCurrentDelay());\n\t\t\t\t\t\tif (!vertex.isVisited()) {\n\t\t\t\t\t\t\tvertex.setVisited(true);\n\t\t\t\t\t\t\tvertex.setParent(v);\n\t\t\t\t\t\t\tq.add(vertex);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tv.setSelected(false);\n\t\t\t\t\tv.setHighlighted();\n\t\t\t\t\tpublish();\n\t\t\t\t\tThread.sleep(panel.getCurrentDelay());\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"BFS Finished!\");\n\t\t\t\tpublish();\n\t\t\t\tsetRunning(false);\n\t\t\t\treturn null;\n\t\t\t}",
"@Test(timeout = 4000)\n public void test04() throws Throwable {\n FileUtil fileUtil0 = new FileUtil();\n ArrayList<Integer> arrayList0 = new ArrayList<Integer>();\n arrayList0.spliterator();\n fileUtil0.getAccessories(\"\", arrayList0);\n fileUtil0.fetchKeywordSearchFile(\"\", \"\", \"\", \"\");\n fileUtil0.downloadThirdPartySearchFile(\"\", \"net.kencochrane.a4j.util.LoadProperties\", \"\", \"T||]%|~ZG.LC(6mb~A\");\n fileUtil0.fetchKeywordSearchFile(\"\", \"T||]%|~ZG.LC(6mb~A\", (String) null, \"\");\n fileUtil0.getBrowseNodeFile(\"net.kencochrane.a4j.util.LoadProperties\", \"@>-=6JQ%t&fx,L\", \"net.kencochrane.a4j.util.LoadProperties\");\n fileUtil0.fetchBlendedSearchFile(\"AGmeJ)4qdg_/\", \"a_\");\n Integer integer0 = new Integer(7);\n arrayList0.add(integer0);\n fileUtil0.downloadAccessoriesFile(\"3rd_\", arrayList0, \"I~-|SH-#r+.Olx\");\n FileInputStream fileInputStream0 = fileUtil0.fetchGenericSearchFile(\"\", \"\", \"]RHe['l4y{\", \"]RHe['l4y{\", \"I~-|SH-#r+.Olx\", \"\\\"-q6AW$MO[2+kQ/Sl.g\");\n assertNull(fileInputStream0);\n }",
"void topQueue(int job, SignedObject accessToken) throws RemoteException, rmi.AuthenticationException;",
"void bfs(SimpleVertex simpleVertex) {\n\t\twhile (true) {\n\t\t\tif (simpleVertex.isVisited == false) {\n\n\t\t\t\tif (simpleVertex.isAdded == false) {\n\t\t\t\t\tqueue.add(simpleVertex);\n\t\t\t\t\tsimpleVertex.isAdded = true;\n\t\t\t\t}\n\t\t\t\tsimpleVertex.isVisited = true;\n\t\t\t\tSystem.out.print(simpleVertex.Vertexname + \" \");\n\n\t\t\t\tfor (int i = 0; i < simpleVertex.neighborhood.size(); i++) {\n\t\t\t\t\tSimpleEdge node = simpleVertex.neighborhood.get(i);\n\n\t\t\t\t\tif (node.two.isAdded == false)\n\t\t\t\t\t\tqueue.add(node.two);\n\t\t\t\t\tnode.two.isAdded = true;\n\n\t\t\t\t}\n\t\t\t\tqueue.poll();\n\t\t\t\tif (!queue.isEmpty())\n\t\t\t\t\tbfs(queue.peek());\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\n\t}",
"public static void main(String[] args) throws Exception {\n\t\tConfiguration conf = new Configuration();\n\t\tSystem.out.println(\"[~programer messege~] Staring step 1 .\");\n\n\t\tJob job = Job.getInstance(conf);\n\t\tjob.setJarByClass(Step1Blessed5Gram.class);\n\t\tjob.setMapperClass(MapperClass5GramAgg.class);\n\t\tjob.setReducerClass(ReducerClass.class);\n\t\t//job.setNumReduceTasks(1);\n\t\tjob.setMapOutputKeyClass(Text.class);\n\t\tjob.setMapOutputValueClass(LongWritable.class);\n\t\tjob.setOutputKeyClass(Text.class);\n\t\tjob.setOutputValueClass(LongWritable.class);\n\t\tjob.setOutputFormatClass(TextOutputFormat.class);\n\t\tjob.setInputFormatClass(TextInputFormat.class);\n\t\tFileInputFormat.addInputPath(job, new Path(args[0]));\n\t\t/* cache */\n\t\tFileSystem fs_s3a = new S3AFileSystem();\n\t\t//args[1] = \"s3n://ass3dsp181resultstamir\"\n\t\tfs_s3a.initialize(URI.create(args[1] ) , conf);\n\t\t// args[2] = \"s3n://ass3dsp181resultstamir/blessed/\"\n\t\tPath path = new Path(args[2]);\n\t\tRemoteIterator<LocatedFileStatus> itr = fs_s3a.listFiles(path, false);\n\t\twhile (itr.hasNext()) {\n\t\t\tLocatedFileStatus f = itr.next();\n\t\t\tif(f.getPath().getName().toString().equals(\"_SUCCESS\")) {\n\t\t\t\tSystem.out.println(\"[Step1] Skiped \\\"_SUCCESS\\\" file\");\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tSystem.out.println(\"[Step1] Adding \"+ f.getPath().toUri()+\" URI to cache File\");\n\t\t\tjob.addCacheFile(f.getPath().toUri());\n\t\t\tSystem.out.println(\"[Step1]\tA file has been added to cache\");\n\t\t}\n\t\tfs_s3a.close();\n\t\tSystem.out.println(\"[Step1] Finished adding files to cache.\");\n\t\tFileOutputFormat.setOutputPath(job, new Path(args[3]));\n\t\tjob.waitForCompletion(true);\n\t\tSystem.out.println(\"finished step1 \");\n\t}",
"void moveFutureTargetsToIterator() {moveStackToIterator(newFutureTargets);}",
"@Override\n public void run() {\n \n amIActive = true;\n String inputFile;\n String outputFile;\n double x, y, z;\n int progress;\n int i, n;\n double[][] vertices = null;\n int pointNum = 0;\n int numPoints = 0;\n int numFeatures;\n int oneHundredthTotal;\n double neighbourhoodRadius;\n ShapeType shapeType, outputShapeType;\n List<KdTree.Entry<Double>> results;\n double[] entry;\n double nodeGapThreshold = 5; //0.65;\n int[] parts = {0};\n \n if (args.length <= 0) {\n showFeedback(\"Plugin parameters have not been set.\");\n return;\n }\n \n inputFile = args[0];\n outputFile = args[1];\n neighbourhoodRadius = Double.parseDouble(args[2]);\n nodeGapThreshold = Integer.parseInt(args[3]);\n \n // check to see that the inputHeader and outputHeader are not null.\n if ((inputFile == null) || (outputFile == null)) {\n showFeedback(\"One or more of the input parameters have not been set properly.\");\n return;\n }\n\n try {\n // set up the input shapefile.\n ShapeFile input = new ShapeFile(inputFile);\n shapeType = input.getShapeType();\n \n // make sure that the shapetype is either a flavour of polyline or polygon.\n if (shapeType.getBaseType() != ShapeType.POLYGON && shapeType.getBaseType() != ShapeType.POLYLINE) {\n showFeedback(\"This tool only works with shapefiles of a polygon or line base shape type.\");\n return;\n }\n \n // set up the output files of the shapefile and the dbf\n outputShapeType = ShapeType.POLYLINE;\n \n //int numOutputFields = input.attributeTable.getFieldCount() + 1;\n //int numInputFields = input.attributeTable.getFieldCount();\n //DBFField[] inputFields = input.attributeTable.getAllFields();\n DBFField[] fields = new DBFField[1];\n \n fields[0] = new DBFField();\n fields[0].setName(\"VALUE\");\n fields[0].setDataType(DBFField.DBFDataType.NUMERIC);\n fields[0].setFieldLength(10);\n fields[0].setDecimalCount(4);\n \n ShapeFile output = new ShapeFile(outputFile, outputShapeType, fields);\n \n \n// DBFField[] fieldsPnts = new DBFField[3];\n// \n// fieldsPnts[0] = new DBFField();\n// fieldsPnts[0].setName(\"VALUE\");\n// fieldsPnts[0].setDataType(DBFField.FIELD_TYPE_N);\n// fieldsPnts[0].setFieldLength(10);\n// fieldsPnts[0].setDecimalCount(4);\n// \n// fieldsPnts[1] = new DBFField();\n// fieldsPnts[1].setName(\"NODE_GAP\");\n// fieldsPnts[1].setDataType(DBFField.FIELD_TYPE_N);\n// fieldsPnts[1].setFieldLength(10);\n// fieldsPnts[1].setDecimalCount(0);\n// \n// fieldsPnts[2] = new DBFField();\n// fieldsPnts[2].setName(\"RANGE\");\n// fieldsPnts[2].setDataType(DBFField.FIELD_TYPE_N);\n// fieldsPnts[2].setFieldLength(10);\n// fieldsPnts[2].setDecimalCount(0);\n// \n// ShapeFile outputPnts = new ShapeFile(outputFile.replace(\".shp\", \"_pnts.shp\"), ShapeType.POINT, fieldsPnts);\n \n numFeatures = input.getNumberOfRecords();\n oneHundredthTotal = numFeatures / 100;\n //featureNum = 0;\n n = 0;\n progress = 0;\n int recordNum;\n \n for (ShapeFileRecord record : input.records) {\n recordNum = record.getRecordNumber();\n// Object[] attData = input.attributeTable.getRecord(recordNum - 1);\n vertices = record.getGeometry().getPoints();\n numPoints = vertices.length;\n KdTree<Double> pointsTree = new KdTree.SqrEuclid(2, new Integer(numPoints));\n for (i = 0; i < numPoints; i++) {\n x = vertices[i][0];\n y = vertices[i][1];\n entry = new double[]{y, x};\n z = i;\n pointsTree.addPoint(entry, z);\n }\n \n ArrayList<ShapefilePoint> pnts = new ArrayList<>();\n int lineLength = 0;\n \n for (i = 0; i < numPoints; i++) {\n x = vertices[i][0];\n y = vertices[i][1];\n entry = new double[]{y, x};\n \n results = pointsTree.neighborsWithinRange(entry, neighbourhoodRadius);\n \n double maxVal = 0;\n double minVal = numPoints;\n double range = 0;\n double j;\n \n double[] values = new double[results.size()];\n int k = 0;\n for (KdTree.Entry entry2 : results) {\n j = (double)entry2.value;\n values[k] = j;\n k++;\n if (j > maxVal) {\n maxVal = j;\n }\n if (j < minVal) {\n minVal = j;\n }\n }\n range = maxVal - minVal;\n \n if (range == numPoints - 1) {\n maxVal = 0;\n minVal = numPoints;\n values = new double[results.size()];\n k = 0;\n for (KdTree.Entry entry2 : results) {\n j = (double) entry2.value;\n if (j < numPoints / 2) {\n j += numPoints;\n }\n if (j > maxVal) {\n maxVal = j;\n }\n if (j < minVal) {\n minVal = j;\n }\n values[k] = j;\n k++;\n }\n range = maxVal - minVal;\n }\n \n // find the largest gap between node indices within the neighbourhood\n Arrays.sort(values);\n double maxGap = 0;\n for (int a = 1; a < k; a++) {\n if (values[a] - values[a - 1] > maxGap) {\n maxGap = values[a] - values[a - 1];\n }\n }\n \n// if (maxGap <= 1) {\n if (maxGap >= nodeGapThreshold) {\n pnts.add(new ShapefilePoint(x, y));\n lineLength++;\n if (i == numPoints - 1) {\n PointsList pl = new PointsList(pnts);\n whitebox.geospatialfiles.shapefile.PolyLine wbPoly = new whitebox.geospatialfiles.shapefile.PolyLine(parts, pl.getPointsArray());\n Object[] rowData = new Object[1];\n rowData[0] = new Double(recordNum);\n output.addRecord(wbPoly, rowData);\n pnts.clear();\n lineLength = 0;\n }\n } else if (lineLength > 1) {\n// k = (int)maxVal - 1;\n// if (k >= numPoints) {\n// k -= numPoints;\n// }\n// pnts.add(new ShapefilePoint(vertices[k][0], vertices[k][1]));\n PointsList pl = new PointsList(pnts);\n whitebox.geospatialfiles.shapefile.PolyLine wbPoly = new whitebox.geospatialfiles.shapefile.PolyLine(parts, pl.getPointsArray());\n Object[] rowData = new Object[1];\n rowData[0] = new Double(recordNum);\n output.addRecord(wbPoly, rowData);\n pnts.clear();\n lineLength = 0;\n// i = (int)maxVal;\n// pnts.add(new ShapefilePoint(vertices[i][0], vertices[i][1]));\n// lineLength++;\n } else {\n pnts.clear();\n lineLength = 0;\n }\n// } else if (lineLength > 1) {\n// PointsList pl = new PointsList(pnts);\n// whitebox.geospatialfiles.shapefile.PolyLine wbPoly = new whitebox.geospatialfiles.shapefile.PolyLine(parts, pl.getPointsArray());\n// Object[] rowData = new Object[1];\n// rowData[0] = new Double(recordNum);\n// output.addRecord(wbPoly, rowData);\n// pnts.clear();\n// lineLength = 0;\n// } else if (lineLength == 1) {\n// pnts.clear();\n// lineLength = 0;\n// }\n \n// if (maxGap > 1) {\n// if (maxGap >= nodeGapThreshold) {\n// pnts.add(new ShapefilePoint(x, y));\n// lineLength++;\n// } else if (lineLength > 1) {\n// PointsList pl = new PointsList(pnts);\n// whitebox.geospatialfiles.shapefile.PolyLine wbPoly = new whitebox.geospatialfiles.shapefile.PolyLine(parts, pl.getPointsArray());\n// Object[] rowData = new Object[1];\n// rowData[0] = new Double(recordNum);\n// output.addRecord(wbPoly, rowData);\n// pnts.clear();\n// lineLength = 0;\n// } else {\n// pnts.clear();\n// lineLength = 0;\n// }\n// } else if (lineLength > 1) {\n// PointsList pl = new PointsList(pnts);\n// whitebox.geospatialfiles.shapefile.PolyLine wbPoly = new whitebox.geospatialfiles.shapefile.PolyLine(parts, pl.getPointsArray());\n// Object[] rowData = new Object[1];\n// rowData[0] = new Double(recordNum);\n// output.addRecord(wbPoly, rowData);\n// pnts.clear();\n// lineLength = 0;\n// } else if (lineLength == 1) {\n// pnts.clear();\n// lineLength = 0;\n// }\n \n }\n \n n++;\n if (n >= oneHundredthTotal) {\n n = 0;\n if (cancelOp) {\n cancelOperation();\n return;\n }\n progress++;\n updateProgress(progress);\n }\n }\n \n output.write();\n// outputPnts.write();\n \n // returning a header file string displays the image.\n updateProgress(\"Displaying vector: \", 0);\n returnData(outputFile);\n \n \n } catch (OutOfMemoryError oe) {\n myHost.showFeedback(\"An out-of-memory error has occurred during operation.\");\n } catch (Exception e) {\n myHost.showFeedback(\"An error has occurred during operation. See log file for details.\");\n myHost.logException(\"Error in \" + getDescriptiveName(), e);\n } finally {\n updateProgress(\"Progress: \", 0);\n // tells the main application that this process is completed.\n amIActive = false;\n myHost.pluginComplete();\n }\n \n }",
"void exec3(DeletedDirectoryEntry entry, String outdir, String file) throws Exception {\r\n\r\n byte[] buffer = new byte[fat32.getBytesPerCluster()]; \r\n\r\n //\r\n // startClusterHigh を見つける\r\n //\r\n if (!entry.resolveStartCluster(id3v2MatchingStrategy) || !entry.isStartClusterValid()) {\r\nSystem.err.println(\"start cluster not found: \" + file);\r\n return;\r\n }\r\n int startCluster = entry.getStartCluster();\r\n\r\n //\r\n // 連続しているクラスターを書き出す\r\n // 途切れたら次の使われていないところ\r\n //\r\n\r\nSystem.err.println(entry.getName() + \": \" + entry.getStartCluster() + \", \" + entry.length());\r\n\r\n int block = 0;\r\n boolean continued = false;\r\nouter:\r\n for (int cluster = 0; cluster < fat32.getLastCluster(); cluster++) {\r\n int targetCluster = startCluster + cluster;\r\nSystem.err.print(\"cluster: \" + targetCluster);\r\n\r\n // 途切れたら次の使われていないところ\r\n\r\n if (fat32.isUsing(targetCluster)) {\r\nSystem.err.println(\" has used, skip\");\r\n continued = false;\r\n continue;\r\n } else {\r\n if (continued == false) {\r\n continued = true;\r\n block++;\r\nSystem.err.println(\" block: \" + block);\r\n }\r\n fat32.readCluster(buffer, targetCluster);\r\nif (block > 1) {\r\n System.err.println(\"\\n\" + StringUtil.getDump(buffer, 128));\r\n}\r\n }\r\n\r\nSystem.err.println();\r\n }\r\n\r\n }",
"public void calcSP(Graph g, Vertex source){\n // Algorithm:\n // 1. Take the unvisited node with minimum weight.\n // 2. Visit all its neighbours.\n // 3. Update the distances for all the neighbours (In the Priority Queue).\n // Repeat the process till all the connected nodes are visited.\n\n // clear existing info\n// System.out.println(\"Calc SP from vertex:\" + source.name);\n g.resetMinDistance();\n source.minDistance = 0;\n PriorityQueue<Vertex> queue = new PriorityQueue<Vertex>();\n queue.add(source);\n\n while(!queue.isEmpty()){\n Vertex u = queue.poll();\n for(Edge neighbour:u.neighbours){\n// System.out.println(\"Scanning vector: \"+neighbour.target.name);\n Double newDist = u.minDistance+neighbour.weight;\n\n // get new shortest path, empty existing path info\n if(neighbour.target.minDistance>newDist){\n // Remove the node from the queue to update the distance value.\n queue.remove(neighbour.target);\n neighbour.target.minDistance = newDist;\n\n // Take the path visited till now and add the new node.s\n neighbour.target.path = new ArrayList<>(u.path);\n neighbour.target.path.add(u);\n// System.out.println(\"Path\");\n// for (Vertex vv: neighbour.target.path) {\n// System.out.print(vv.name);\n// }\n// System.out.print(\"\\n\");\n\n// System.out.println(\"Paths\");\n neighbour.target.pathCnt = 0;\n neighbour.target.paths = new ArrayList<ArrayList<Vertex>>();\n if (u.paths.size() == 0) {\n ArrayList<Vertex> p = new ArrayList<Vertex>();\n p.add(u);\n neighbour.target.paths.add(p);\n neighbour.target.pathCnt++;\n } else {\n for (ArrayList<Vertex> p : u.paths) {\n ArrayList<Vertex> p1 = new ArrayList<>(p);\n p1.add(u);\n// for (Vertex vv : p1) {\n// System.out.print(vv.name);\n// }\n// System.out.print(\"\\n\");\n neighbour.target.paths.add(p1);\n neighbour.target.pathCnt++;\n }\n }\n\n //Reenter the node with new distance.\n queue.add(neighbour.target);\n }\n // get equal cost path, add into path list\n else if (neighbour.target.minDistance == newDist) {\n queue.remove(neighbour.target);\n for(ArrayList<Vertex> p: u.paths) {\n ArrayList<Vertex> p1 = new ArrayList<>(p);\n p1.add(u);\n neighbour.target.paths.add(p1);\n neighbour.target.pathCnt++;\n }\n queue.add(neighbour.target);\n }\n }\n }\n }",
"private void openSubFile() throws Exception {\r\n sub = new PrintOutput(SUBMISSION);\r\n \r\n xml = new XMLSerializer(sub, false, true);\r\n xml.doctype(token(\"efficiency-submission\"),\r\n token(\"\\\"efficiency-submission.dtd\\\"\"), null);\r\n \r\n // print header in output file\r\n xml.openElement(token(\"efficiency-submission\"),\r\n token(\"participant-id\"), token(\"304\"),\r\n token(\"run-id\"), token(\"1111111\"),\r\n token(\"task\"), token(TASK[0]),\r\n token(\"type\"), token(TYPE[0]),\r\n token(\"query\"), token(QUERY[0]),\r\n token(\"sequential\"), token(\"yes\"),\r\n token(\"no_cpu\"), token(\"2\"),\r\n token(\"ram\"), token(\"32 GB\"),\r\n token(\"index_size_bytes\"), token(\"7869335184\"),\r\n token(\"indexing_time_sec\"), token(\"2874\")\r\n );\r\n xml.emptyElement(token(\"topic-fields\"),\r\n token(\"co_title\"), token(\"no\"),\r\n token(\"cas_title\"), token(\"no\"),\r\n token(\"xpath_title\"), token(\"yes\"),\r\n token(\"text_predicates\"), token(\"no\"),\r\n token(\"description\"), token(\"no\"),\r\n token(\"narrative\"), token(\"no\")\r\n );\r\n \r\n xml.openElement(token(\"general_description\"));\r\n xml.text(token(\"The client/server architecture of BaseX 5.72 was used \" +\r\n \"to perform the tests. The test machine has an Intel Xeon E5345 \" +\r\n \"with 2 Quad-Core CPUs and 32 GB RAM.\"));\r\n xml.closeElement();\r\n xml.openElement(token(\"ranking_description\"));\r\n xml.text(token(\"We are using both content-based as well as \" +\r\n \"structural-based ranking. At first, a content-based weight \" +\r\n \"is estimated and later refined for each location step. \" +\r\n \"The weights are derived from database meta information.\"));\r\n xml.closeElement();\r\n xml.openElement(token(\"indexing_description\"));\r\n xml.text(token(\"The full-text indexes of BaseX support both an \" +\r\n \"sped up evaluation of simple ftcontains operators as well \" +\r\n \"as advanced features of the upcoming XQFT Recommendation. \" +\r\n \"The indexes contain token positions and pointers on the text nodes. \" +\r\n \"Structural information, such as location paths to the text nodes, \" +\r\n \"are evaluated at runtime. As a consequence, our performance \" +\r\n \"measurements include the total time both for accessing the indexes \" +\r\n \"as well as traversing the inverted specified location paths.\"));\r\n xml.closeElement();\r\n xml.openElement(token(\"caching_description\"));\r\n xml.text(token(\"Both database instances as well as the full-text \" +\r\n \"indexes are completely disk-based and rely on the caching \" +\r\n \"mechanisms of the operating system.\"));\r\n xml.closeElement();\r\n }",
"public void goapPlanFound(Queue<GoapAction> actions);",
"public static void main(String[] args) {\n\t\tlinkedListQueue<String> queue = new linkedListQueue<String>();\r\n\t\tqueue.printQueue();\r\n\t\tqueue.enqueue(\"a\");\r\n\t\tqueue.enqueue(\"b\");\r\n\t\tqueue.enqueue(\"c\");\r\n\t\tqueue.enqueue(\"d\");\r\n\t\tqueue.printQueue();\r\n\t\tqueue.dequeue();\r\n\t\tqueue.dequeue();\r\n\t\tqueue.dequeue();\r\n\t\tqueue.dequeue();\r\n\t\tqueue.dequeue();\r\n\t}",
"public InOrderIterator(NestedQuest tree) {\n queue.add(tree);\n }",
"public static void main(String[] args) throws Exception {\n \t\t\n \t\tif (args.length != 2) {\n \t\t\tSystem.err.println(\"Usage (no trailing slashes): project2.NodeDriver s3n://<in filename> s3n://<out bucket>\");\n \t\t\tSystem.exit(2);\n \t\t}\n \t\tString inputFile = args[0];\n \t\tString outputPath = args[1];\n \n for (int i = 0; i < NUM_ITERATIONS; i++) {\n Job job = new Job();\n // Set a unique job name\n job.setJobName(\"pagerank_\"+ (i+1));\n job.setJarByClass(project2.NodeDriver.class);\n \n // Set Mapper and Reducer class\n job.setMapperClass(project2.LeMapper.class);\n job.setReducerClass(project2.LeReducer.class);\n \n // set the classes for output key and value\n job.setOutputKeyClass(Text.class);\n job.setOutputValueClass(Text.class);\n \n // on the initial pass, use the preprocessed input file\n // note that we use the default input format which is TextInputFormat (each record is a line of input)\n if (i == 0) {\n FileInputFormat.addInputPath(job, new Path(inputFile)); \t\n // otherwise use the output of the last pass as our input\n } else {\n \tFileInputFormat.addInputPath(job, new Path(outputPath + \"/temp\"+i)); \n }\n // set the output file path\n FileOutputFormat.setOutputPath(job, new Path(outputPath + \"/temp\"+(i+1)));\n \n // execute the job and wait for completion before starting the next pass\n job.waitForCompletion(true);\n \n // before starting the next pass, compute the avg residual error for this pass and print it out\n // TODO: will float work or do we need a double?\n float residualErrorAvg = job.getCounters().findCounter(ProjectCounters.RESIDUAL_ERROR).getValue() / precision / totalNodes;\n String residualErrorString = String.format(\"%.4f\", residualErrorAvg);\n System.out.println(\"Residual error for iteration \" + i + \": \" + residualErrorString);\n \n // reset the counter for the next round\n job.getCounters().findCounter(ProjectCounters.RESIDUAL_ERROR).setValue(0L);\n }\n \n }",
"void findSearchOrder() {\n boolean filled = false;\n for(int node: queryGraphNodes.keySet()) {\n\n vertexClass vc = queryGraphNodes.get(node);\n searchOrderSeq.add(node);\n for(int edge: queryGraphNodes.get(node).edges.keySet()) {\n filled = calcOrdering(edge);\n if (filled)\n break;\n }\n if(searchOrderSeq.size() == queryGraphNodes.size())\n break;\n\n }\n\n }",
"private void addToQueue (Parcel[] packagesAssigned){\n\n }",
"public void breadthFirstSearch(int vertexIndex) {\n Queue<Integer> queue = new LinkedList<Integer>();\n vertexList[vertexIndex].wasVisited = true;\n displayVertex(vertexIndex);\n int unvisitedIndex;\n do {\n\n do {\n unvisitedIndex = getAdjacentUnvisitedVertexIndex(vertexIndex);\n if(unvisitedIndex != -1) {\n vertexList[unvisitedIndex].wasVisited = true;\n displayVertex(unvisitedIndex);\n queue.add(unvisitedIndex);\n\n }\n } while(unvisitedIndex != -1);\n if(!queue.isEmpty()) {\n vertexIndex = queue.remove();\n\n }\n\n } while(!queue.isEmpty());\n\n for (int i = 0; i < vertexCount; i++) {\n vertexList[i].wasVisited = false;\n\n }\n }",
"private void connectClasses(Header [] list)\r\n {\r\n Vector queue;\r\n Vector garbage = new Vector();\r\n\r\n Find.setCrossreference(list);\r\n\r\n for(int i = 0; list != null && i < list.length; i++)\r\n {\r\n queue = list[i].scopes;\r\n\r\n for(int j = 0; j < queue.size(); j++)\r\n for(Iterator iter = ((Scope)queue.get(j)).iterator(); iter.hasNext();)\r\n {\r\n Iterator a = null;\r\n Basic x = (Basic)iter.next();\r\n\r\n if (x instanceof ClassType)\r\n {\r\n ClassType y = (ClassType)x;\r\n ClassType [] z;\r\n boolean done = false;\r\n String st = null;\r\n\r\n if (y.extend != null && y.extend.name != null && y.extend.scope == null)\r\n { // look for superclass\r\n st = y.extend.name.string;\r\n for(a = y.unresolved.iterator(); a.hasNext();)\r\n {\r\n String s = (String)a.next();\r\n if (s.endsWith('.' + st))\r\n {\r\n st = s;\r\n break;\r\n }\r\n }\r\n\r\n z = Find.findClass(st, 0, y.scope);\r\n \r\n for(int k = 0; k < z.length; k++)\r\n if (z[k].scope.javaPath(\"\").endsWith(st) || z[k].scope.buildPath(\"\").endsWith(st))\r\n {\r\n y.extend = z[k];\r\n garbage.add(st);\r\n done = true;\r\n }\r\n }\r\n\r\n for(int k = 0; k < y.implement.length; k++)\r\n if (y.implement[k].name != null && y.implement[k].scope == null)\r\n { // look for interface\r\n st = y.implement[k].name.string;\r\n for(a = y.unresolved.iterator(); a.hasNext();)\r\n {\r\n String s = (String)a.next();\r\n if (s.endsWith('.' + st))\r\n {\r\n st = s;\r\n break;\r\n }\r\n }\r\n done = false;\r\n \r\n z = Find.findClass(st, 0, y.scope);\r\n \r\n for(int l = 0; l < z.length && !done; l++)\r\n if (z[l].scope.javaPath(\"\").endsWith(st) || z[l].scope.buildPath(\"\").endsWith(st))\r\n {\r\n y.implement[k] = z[l];\r\n garbage.add(st);\r\n done = true;\r\n break;\r\n }\r\n }\r\n\r\n a = null;\r\n while(garbage.size() > 0)\r\n {\r\n st = (String)garbage.get(0);\r\n garbage.remove(0);\r\n y.unresolved.remove(st);\r\n }\r\n }\r\n }\r\n }\r\n }",
"@Test\n public void test3() throws Exception {\n String query = \"A =LOAD 'file.txt' AS (a:(u,v), b, c);\" +\n \"B = FOREACH A GENERATE $0, b;\" +\n \"C = FILTER B BY 8 > 5;\" +\n \"STORE C INTO 'empty';\"; \n LogicalPlan newLogicalPlan = buildPlan( query );\n\n Operator load = newLogicalPlan.getSources().get( 0 );\n Assert.assertTrue( load instanceof LOLoad );\n Operator filter = newLogicalPlan.getSuccessors( load ).get( 0 );\n Assert.assertTrue( filter instanceof LOFilter );\n Operator fe1 = newLogicalPlan.getSuccessors( filter ).get( 0 );\n Assert.assertTrue( fe1 instanceof LOForEach );\n Operator fe2 = newLogicalPlan.getSuccessors( fe1 ).get( 0 );\n Assert.assertTrue( fe2 instanceof LOForEach );\n }",
"public void insertReorderBarrier() {\n\t\t\n\t}",
"private void actionExport() {\n ExportPanel myPanel = new ExportPanel(ImportPanel.nlistDir);\n int result = JOptionPane.showConfirmDialog(this, myPanel, \"Export\",\n JOptionPane.OK_CANCEL_OPTION);\n Long functionStartTime = System.currentTimeMillis();\n Long accumulatedTime = 0L;\n if (result == JOptionPane.OK_OPTION) { // Afirmative\n writeNeuronListToFile(\n myPanel.tfields[ExportPanel.idxInhList].getText(),\n layoutPanel.inhNList, LayoutPanel.INH);\n // add to workbench project\n if (null != workbenchMgr && workbenchMgr.isProvEnabled()) {\n Long startTime = System.currentTimeMillis();\n workbenchMgr.getProvMgr().addFileGeneration(\n \"InhibitoryNeuronListExport\" + java.util.UUID.randomUUID(),\n \"neuronListExport\", \"NLEdit\", null, false,\n myPanel.tfields[ExportPanel.idxInhList].getText(), null,\n null);\n accumulatedTime = DateTime.sumProvTiming(startTime, accumulatedTime);\n }\n\n writeNeuronListToFile(\n myPanel.tfields[ExportPanel.idxActList].getText(),\n layoutPanel.activeNList, LayoutPanel.ACT);\n // add to workbench project\n if (null != workbenchMgr && workbenchMgr.isProvEnabled()) {\n Long startTime = System.currentTimeMillis();\n workbenchMgr.getProvMgr().addFileGeneration(\n \"ActiveNeuronListExport\" + java.util.UUID.randomUUID(),\n \"neuronListExport\", \"NLEdit\", null, false,\n myPanel.tfields[ExportPanel.idxActList].getText(), null,\n null);\n accumulatedTime = DateTime.sumProvTiming(startTime, accumulatedTime);\n }\n\n writeNeuronListToFile(\n myPanel.tfields[ExportPanel.idxPrbList].getText(),\n layoutPanel.probedNList, LayoutPanel.PRB);\n // add to workbench project\n if (null != workbenchMgr && workbenchMgr.isProvEnabled()) {\n Long startTime = System.currentTimeMillis();\n workbenchMgr.getProvMgr().addFileGeneration(\n \"ProbedNeuronListExport\" + java.util.UUID.randomUUID(),\n \"neuronListExport\", \"NLEdit\", null, false,\n myPanel.tfields[ExportPanel.idxPrbList].getText(), null,\n null);\n accumulatedTime = DateTime.sumProvTiming(startTime, accumulatedTime);\n }\n }\n DateTime.recordFunctionExecutionTime(\"ControlFrame\", \"actionExport\",\n System.currentTimeMillis() - functionStartTime,\n workbenchMgr.isProvEnabled());\n if (workbenchMgr.isProvEnabled()) {\n DateTime.recordAccumulatedProvTiming(\"ControlFrame\", \"actionExport\",\n accumulatedTime);\n }\n }",
"public static void main(String[] args) throws IOException, InterruptedException, ClassNotFoundException {\n\t\tTimeRecord.start();\n\t\tString sourceTable = \"orderdetailr\";\n\t\tPath outputPath = new Path(\"hdfs://192.168.3.201:8020/output/\");\n\t\tConfiguration conf = HadoopUtils.getConfiguration();\n\t\tJob job = Job.getInstance(conf, \"test detail\");\n\t\tjob.setJarByClass(SortOutput.class);\n\n\t\tScan scan = new Scan();\n\t\tscan.setCaching(500); // 1 is the default in Scan, which will be bad\n\t\t// for\n\t\t// MapReduce jobs\n\t\tscan.setCacheBlocks(false); // don't set to true for MR jobs\n\t\t// set other scan attrs\n\t\tTableMapReduceUtil.initTableMapperJob(sourceTable, // input table\n\t\t\t\tscan, // Scan instance to control CF and attribute selection\n\t\t\t\tMap.class, // mapper class\n\t\t\t\tDoubleWritable.class, // mapper output key\n\t\t\t\tText.class, // mapper output value\n\t\t\t\tjob);\n\t\tjob.setOutputFormatClass(TextOutputFormat.class);\n\t\tFileOutputFormat.setOutputPath(job, outputPath);\n\t\tjob.setOutputKeyClass(Text.class);\n\t\tjob.setOutputValueClass(DoubleWritable.class);\n\t\tjob.setNumReduceTasks(1);\n\n\t\tHadoopUtils.deleteOutputDirectory(outputPath);\n\n\t\tboolean b = job.waitForCompletion(true);\n\t\tif (!b) {\n\t\t\tthrow new IOException(\"error with job!\");\n\t\t}\n\t\tTimeRecord.stop();\n\n\t}",
"public static void main(String[] args) throws Exception {\n if (args.length < 2) {\n System.err.println(\"\\nusage: java -jar target/jarfilename.jar <path/to/input_gtfs.zip> <arrival_timeORdeparture_time> <Number_of\"\n + \"_records_to_fetch> \\nThe second argument specify whether to consider arrival_time or departure_time to calculate schedule_deviation\"\n + \"\\nThe third argument is optional, which specify number of records to fetch. If it not provided we retreive all records\");\n return;\n }\n\n File input = new File(args[0]);\n String arrivalOrDeparture = args[1].toLowerCase();\n if(!arrivalOrDeparture.equals(\"arrival_time\") && !arrivalOrDeparture.equals(\"departure_time\")) {\n System.err.println(\"\\nPlease check spelling of the string provided as second argument. It should be either arrival_time or departure_time\");\n return;\n }\n int numRecords = 0;\n if(args.length == 3) {\n numRecords = Integer.parseInt(args[2]);\n if(numRecords <= 0) {\n System.err.println(\"\\nThe third parameter 'Number of records to fetch' should be greater than 0\");\n return;\n }\n }\n System.err.println(\"\\nProcessing feed :\" + input.getName());\n FeedProcessor processor = new FeedProcessor(input, arrivalOrDeparture, numRecords);\n try {\n processor.load();\n } catch (IOException e) {\n System.err.println(\"Unable to access input GTFS \" + input.getPath() + \". Does the file exist and do I have permission to read it?\");\n return;\n }\n }",
"void exec1(DeletedDirectoryEntry entry, String outdir, String file) throws Exception {\r\n\r\n byte[] buffer = new byte[fat32.getBytesPerSector()];\r\n\r\n boolean incomplete = false;\r\n\r\n //\r\n // startClusterHigh を見つける\r\n //\r\n\r\n if (!entry.resolveStartCluster(id3v2MatchingStrategy) || !entry.isStartClusterValid()) {\r\nSystem.err.println(\"start cluster not found: \" + file);\r\n return;\r\n }\r\n int startCluster = entry.getStartCluster();\r\n\r\n //\r\n // 連続しているクラスターを書き出す\r\n // 途切れたら終わり\r\n //\r\n \r\n File output = new File(outdir, file);\r\n OutputStream os = new FileOutputStream(output);\r\n\r\nSystem.err.println(entry.getName() + \": \" + entry.getStartCluster() + \", \" + entry.length());\r\n\r\n long rest = entry.length();\r\n\r\n\r\nouter:\r\n for (int cluster = 0; cluster < fat32.getLastCluster(); cluster++) {\r\n int targetCluster = startCluster + cluster;\r\nSystem.err.print(\"cluster: \" + targetCluster);\r\n\r\n\r\n // 途切れたら終わり\r\n\r\n if (fat32.isUsing(targetCluster)) {\r\nSystem.err.println(\" has used, skip\");\r\nint restClusters = fat32.getRequiredClusters(rest);\r\nSystem.err.println(\"rest: \" + file + \": \" + restClusters + \" clusters, \" + rest + \" / \" + entry.length());\r\n incomplete = true;\r\nSystem.err.println(\"salvage, not continued: \" + file + \": \" + (entry.length() - rest) + \" / \" + entry.length());\r\n break outer;\r\n }\r\n\r\n\r\n // 1 クラスタの書き出し\r\n\r\n for (int sector = 0; sector < fat32.getSectorsPerCluster(); sector++) {\r\n int targetSector = fat32.getSector(targetCluster) + sector;\r\n fat32.readSector(buffer, targetSector);\r\n if (rest > fat32.getBytesPerSector()) {\r\n os.write(buffer, 0, fat32.getBytesPerSector());\r\n rest -= fat32.getBytesPerSector();\r\n } else {\r\n os.write(buffer, 0, (int) rest);\r\n rest -= rest;\r\n break outer;\r\n }\r\n }\r\nSystem.err.println(\" salvaged: \" + (entry.length() - rest) + \" / \" + entry.length());\r\n }\r\n\r\nSystem.err.println(\"salvage finished: \" + (entry.length() - rest) + \"/\" + entry.length());\r\n\r\n\r\n os.flush();\r\n os.close();\r\n output.setLastModified(entry.lastModified());\r\n\r\n // 途切れたら incomplete を付ける\r\n \r\n if (incomplete) {\r\n output.renameTo(new File(outdir, file + \".\" + \"incomplete\"));\r\n }\r\n }",
"@Override\r\n\tpublic boolean BFS(E src) {\r\n\t\tif(containsVertex(src)) {\r\n\t\t\tVertex<E> s = vertices.get(src);\r\n\t\t\tlastSrc = s;\r\n\t\t\tvertices.forEach((E e, Vertex<E> u) -> {\r\n\t\t\t\tu.setColor(Color.WHITE);\r\n\t\t\t\tu.setDistance(Integer.MAX_VALUE);\r\n\t\t\t\tu.setPredecessor(null);\r\n\t\t\t});\r\n\t\t\ts.setColor(Color.GRAY);\r\n\t\t\ts.setDistance(0);\r\n\t\t\t//s.predecessor is already null so skip that step\r\n\t\t\tQueue<Vertex<E>> queue = new Queue<>();\r\n\t\t\tqueue.enqueue(s);\r\n\t\t\ttry {\r\n\t\t\t\twhile(!queue.isEmpty()) {\r\n\t\t\t\t\tVertex<E> u = queue.dequeue();\r\n\t\t\t\t\tArrayList<Edge<E>> adj = adjacencyLists.get(u.getElement());\r\n\t\t\t\t\tfor(Edge<E> ale: adj) {\r\n\t\t\t\t\t\tVertex<E> v = vertices.get(ale.getDst());\r\n\t\t\t\t\t\tif(v.getColor() == Color.WHITE) {\r\n\t\t\t\t\t\t\tv.setColor(Color.GRAY);\r\n\t\t\t\t\t\t\tv.setDistance(u.getDistance()+1);\r\n\t\t\t\t\t\t\tv.setPredecessor(u);\r\n\t\t\t\t\t\t\tqueue.enqueue(v);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tu.setColor(Color.BLACK);\r\n\t\t\t\t}\r\n\t\t\t} catch (Exception emptyQueueException) {\r\n\t\t\t\t//-_-\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"private <T extends Definition> void preloadSerialize(Collection<T> defs, Class<T> type, Appendable out,\n String format) throws IOException, QuickFixException {\n AuraContext context = Aura.getContextService().getCurrentContext();\n SerializationService serializationService = Aura.getSerializationService();\n \n context.setPreloading(true);\n try{\n serializationService.writeCollection(defs, type, out, format);\n } finally {\n context.setPreloading(false);\n }\n }",
"private void batchExport(){\r\n \t \t\r\n \t// Retrieve all the rsml files\r\n \tFile f = new File(batchSourceFolder.getText());\r\n \tFile[] rsml = f.listFiles(new FilenameFilter() {\r\n \t\tpublic boolean accept(File directory, String fileName) {\r\n \t\t\treturn fileName.endsWith(\".rsml\");\r\n \t\t}\r\n \t});\r\n \t \t\r\n \tif(rsml.length < 100){\r\n\t \tSR.write(\"Batch export started for \"+rsml.length+\" files\");\r\n\t\r\n\t \t// Open the different RSML files, retriev their data and get their size.\r\n\t \tRootModel[] models = new RootModel[rsml.length];\r\n\t \tint w = 0; int h = 0;\r\n\t \t \tfor(int i = 0; i < rsml.length; i++){\r\n\t \t \t\tmodels[i] = new RootModel(rsml[i].getAbsolutePath());\r\n\t \t \t\tif(models[i].getWidth(true) > w) w = models[i].getWidth(true);\r\n\t \t \t\tif(models[i].getHeight(true) > h) h = models[i].getHeight(true);\r\n\t \t \t}\r\n\t \t \t\r\n\t \t \tResultsTable rt = new ResultsTable();\r\n\t \t \tImageStack is= new ImageStack(w, h);\r\n\t \t \r\n\t \t \r\n\t \t \tfor(int i = 0; i < rsml.length; i++){\r\n\t \t \t\t// Send the imagr to the stack\r\n\t \t \t\tif(batchImage.isSelected()) {\r\n\t \t \t\t\tImagePlus ip = new ImagePlus(rsml[i].getName(),models[i].createImage(batchColorJCB.getSelectedIndex() == 0, Integer.valueOf(batchLineWidth.getText()), batchRealWidth.isSelected(), w, h, batchConvex.isSelected())); \r\n\t \t \t\t\tis.addSlice(ip.getProcessor());\r\n\t \t \t \t\t// Save a single image\r\n\t \t \t \t\tif(batchSave.isSelected()){\r\n\t \t \t \t\t\tIJ.save(ip, this.batchSourceFolder.getText()+\"/images/\"+rsml[i].getName()+\".jpg\");\r\n\t\r\n\t \t \t \t\t}\r\n\t \t \t\t}\r\n\t\t \t \tif(!batchImage.isSelected() && batchSave.isSelected()){\r\n\t\t \t \t\tSR.write(rsml[i].getName());\r\n\t \t \t\t\tImagePlus ip = new ImagePlus(rsml[i].getName(),models[i].createImage(batchColorJCB.getSelectedIndex() == 0, Integer.valueOf(batchLineWidth.getText()), batchRealWidth.isSelected(), batchConvex.isSelected())); \r\n\t\t \t \t\tIJ.save(ip, this.batchSourceFolder.getText()+\"/images/\"+rsml[i].getName()+\".jpg\");\r\n\t\t \t \t}\t \t \t\t\r\n\t \t \t\t\r\n\t \t \t\t// Send the results to the Result Table\r\n\t \t \t\tif(batchResults.isSelected()){\r\n\t \t \t\t\tint sel = batchJCB.getSelectedIndex();\r\n\t \t \t\t\tswitch (sel) { \r\n\t \t \t\t\t\tcase 0: models[i].sendImageData(rt, rsml[i].getName()); break;\r\n\t \t \t\t\t\tcase 1: models[i].sendRootData(rt, rsml[i].getName()); break;\r\n\t \t \t\t\t\tcase 2: models[i].sendNodeData(rt, rsml[i].getName()); break;\r\n\t \t \t\t\t}\r\n\t \t \t\t}\r\n\t \t \t}\r\n\t \t \r\n\t \t \tif(batchResults.isSelected()) rt.show(batchJCB.getSelectedItem().toString()+\" data\");\r\n\t \t \tif(batchImage.isSelected()){\r\n\t \t \t\tImagePlus ip = new ImagePlus(\"RSML images\");\r\n\t \t \t\tip.setStack(is);\r\n\t \t \t\tip.show();\r\n\t \t \t}\t\t\t\r\n \t}\r\n \telse{\r\n\t \tSR.write(\"Batch export started for \"+rsml.length+\" files\");\r\n\t \t \tResultsTable rt = new ResultsTable();\r\n\t \t// Open the different RSML files, retriev their data and get their size.\r\n\t \tRootModel model;\r\n\t \t \tfor(int i = 0; i < rsml.length; i++){\r\n\t \t \t\tmodel = new RootModel(rsml[i].getAbsolutePath());\r\n\t\t \t \tif(batchSave.isSelected()){\r\n\t \t \t\t\tImagePlus ip = new ImagePlus(rsml[i].getName(),model.createImage(batchColorJCB.getSelectedIndex() == 0, Integer.valueOf(batchLineWidth.getText()), batchRealWidth.isSelected(), batchConvex.isSelected())); \r\n\t\t \t \t\tIJ.save(ip, this.batchSourceFolder.getText()+\"/images/\"+rsml[i].getName()+\".jpg\");\r\n\t\t \t \t}\t \t \t\t\r\n\t \t \t\t\r\n\t \t \t\t// Send the results to the Result Table\r\n\t \t \t\tif(batchResults.isSelected()){\r\n\t \t \t\t\tint sel = batchJCB.getSelectedIndex();\r\n\t \t \t\t\tswitch (sel) { \r\n\t \t \t\t\t\tcase 0: model.sendImageData(rt, rsml[i].getName()); break;\r\n\t \t \t\t\t\tcase 1: model.sendRootData(rt, rsml[i].getName()); break;\r\n\t \t \t\t\t\tcase 2: model.sendNodeData(rt, rsml[i].getName()); break;\r\n\t \t \t\t\t}\r\n\t \t \t\t}\r\n\t \t \t}\r\n \t\trt.show(batchJCB.getSelectedItem().toString());\r\n \t}\r\n \t\r\n \t \tSR.write(\"Export done for \"+rsml.length+\" files\"); \r\n }",
"public void assignSorting(final CFANode start) {\n\n final Set<CFANode> finished = new HashSet<>();\n\n final Deque<CFANode> nodeStack = new ArrayDeque<>();\n @SuppressWarnings(\"JdkObsolete\") // ArrayDeque doesn't work here because we store nulls\n final Deque<Iterator<CFANode>> iteratorStack = new LinkedList<>();\n\n nodeStack.push(start);\n iteratorStack.push(null);\n\n while (!nodeStack.isEmpty()) {\n assert nodeStack.size() == iteratorStack.size();\n\n final CFANode node = nodeStack.peek();\n Iterator<CFANode> successors = iteratorStack.peek();\n\n if (successors == null) {\n // Entering this stack frame.\n // This part of the code corresponds to the code in checkIds()\n // before the for loop.\n\n if (!finished.add(node)) {\n // already handled, do nothing\n\n // Do a simulated \"return\".\n nodeStack.pop();\n iteratorStack.pop();\n continue;\n }\n\n // enter the for loop\n successors = CFAUtils.successorsOf(node).iterator();\n iteratorStack.pop();\n iteratorStack.push(successors);\n }\n\n if (successors.hasNext()) {\n // \"recursive call\"\n // This part of the code corresponds to the code in checkIds()\n // during the loop.\n CFANode successor = successors.next();\n\n // Do a simulated \"function call\" by pushing something on the stacks,\n // creating a new stack frame.\n nodeStack.push(successor);\n iteratorStack.push(null);\n\n } else {\n // All children handled.\n // This part of the code corresponds to the code in checkIds()\n // after the loop.\n node.setReversePostorderId(reversePostorderId++);\n\n // Do a simulated \"return\".\n nodeStack.pop();\n iteratorStack.pop();\n }\n }\n\n // Disabled because the recursive algorithm throws StackOverflowError\n // for large files.\n //assert checkIds(start);\n }",
"public void train(ITraceIterator trace, Boolean isLastTrace, String database, IDataAccessObject connection, IAlgorithmOutStream outStream) throws TotalADSGeneralException, TotalADSDBMSException, TotalADSReaderException;",
"public NSEIndexITDImportJob() {\n super() ;\n }",
"@Test\n\tpublic void test1() {\n\t\t// toArray()\n\t\tDoubleLinkedList dll = new DoubleLinkedList(getList(10));\n\t\tObject[] a = new Object[] {21, 22, 23, 24, 25};\n\t\tassertArrayEquals(dll.toArray(a), getList(10).toArray());\n\t\t\n\t\tdll = new DoubleLinkedList(getList(4));\n\t\tassertEquals(dll.toArray(a)[4], null);\n\t\t\n\t\t// addBefore()\n\t\tdll.addBefore(101, dll.header);\n\t\t\n\t\t// remove()\n\t\ttry{\n\t\t\tdll.remove(dll.header);\n\t\t}catch(NoSuchElementException e){\n\t\t\tassertEquals(e.getMessage(), null);\n\t\t}\n\t\t\n\t\tdll.remove(dll.header.next);\n\t\t\n\t\t\n\t}",
"public void bfs(Queue<Integer> queue, int visited[]) {\n if (queue.isEmpty()) {\n return;\n }\n\n int root = queue.poll();\n\n if (visited[root] == 1) {\n bfs(queue, visited);\n return;//alreadu into consideration\n }\n\n\n System.out.printf(\"Exploring of node %d has started\\n\", root);\n visited[root] = 1;\n\n\n for (int i = 0; i < adjMatrix[root].size(); i++) {\n if (visited[adjMatrix[root].get(i)] == 1 || visited[adjMatrix[root].get(i)] == 2) {\n continue;\n }\n queue.add(adjMatrix[root].get(i));\n }\n bfs(queue, visited);\n System.out.printf(\"Exploring of node %d has end\\n\", root);\n visited[root] = 2;\n }",
"public void bft() {\r\n\t\tHashMap<String, Boolean> processed = new HashMap<>();\r\n\t\tLinkedList<Pair> queue = new LinkedList<>();\r\n\r\n\t\tArrayList<String> vnames = new ArrayList<>(vces.keySet());\r\n\t\tfor (String vname : vnames) {\r\n\t\t\tif (processed.containsKey(vname)) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tPair rootpair = new Pair(vname, vname);\r\n\t\t\tqueue.addLast(rootpair);\r\n\t\t\twhile (queue.size() != 0) {\r\n\t\t\t\t// 1. removeFirst\r\n\t\t\t\tPair rp = queue.removeFirst();\r\n\r\n\t\t\t\t// 2. check if processed, mark if not\r\n\t\t\t\tif (processed.containsKey(rp.vname)) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tprocessed.put(rp.vname, true);\r\n\r\n\t\t\t\t// 3. Check, if an edge is found\r\n\t\t\t\tSystem.out.println(rp.vname + \" via \" + rp.psf);\r\n\r\n\t\t\t\t// 4. Add the unprocessed nbrs back\r\n\t\t\t\tArrayList<String> nbrnames = new ArrayList<>(rp.vtx.nbrs.keySet());\r\n\t\t\t\tfor (String nbrname : nbrnames) {\r\n\t\t\t\t\tif (!processed.containsKey(nbrname)) {\r\n\t\t\t\t\t\tPair np = new Pair(nbrname, rp.psf + nbrname);\r\n\t\t\t\t\t\tqueue.addLast(np);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"private static void prMode(DiskIndexWriter diskWriter, DiskPositionalIndex disk_posIndex) throws ClassNotFoundException, InstantiationException, IllegalAccessException, FileNotFoundException {\n long time = 0;\n GUI.JListModel.clear();\n\n if (query.equals(\"q\")) {\n\n System.exit(0);\n }\n MAP mean_ap = new MAP(path);\n //returns qRel.keyset() i.e. queries \n Set<String> queries = mean_ap.getQueries();\n List<Long> time_per_query = new ArrayList<>();\n //run ranked retrival for each query\n for (String q : queries) {\n time = 0;\n List<String> word = new ArrayList();\n\n query = q;\n long start = System.currentTimeMillis();\n\n String[] query_array = query.split(\"\\\\s+\");\n TokenProcessor processor = new NewTokenProcessor();\n\n for (int i = 0; i < query_array.length; i++) {\n word.add(processor.processToken(query_array[i]).get(0));\n }\n long t1 = System.currentTimeMillis();\n time = t1 - start; //time to parse\n StrategyFactory sf = new StrategyFactory();\n StrategyInterface strategy = sf.execute(rankedOption);\n\n //maps postings to accumulator value\n HashMap<Integer, Doc_accum> postingMap = new HashMap<Integer, Doc_accum>();\n\n PriorityQueue<Doc_accum> queue = new PriorityQueue<>(Collections.reverseOrder());\n\n List<Posting> postings = new ArrayList<>();\n List<Doc_accum> results = new ArrayList<>();\n\n for (String term : word) {\n long t2 = System.currentTimeMillis();\n\n if (term.equals(\"\")) {\n continue;\n } else {\n\n postings = disk_posIndex.getPosting_noPos(term);\n long t3 = System.currentTimeMillis();\n time = time + (t3 - t2);\n\n for (Posting p : postings) { //for each document in the postings list\n double t_fd = p.getT_fd();\n double d_ft = p.getD_ft();\n double w_qt = strategy.calculate_wqt(N, d_ft);\n double accum = 0;\n double w_dt = strategy.get_wdt(t_fd, disk_posIndex, p.getDocumentId());\n\n //pairs (Ranked_posting, accumulator factor)\n if (postingMap.containsKey(p.getDocumentId())) {\n accum = postingMap.get(p.getDocumentId()).getAccumulator();\n accum += (w_qt * w_dt);\n postingMap.replace(p.getDocumentId(), new Doc_accum(p, accum)); //replaces old accum value\n\n } else {\n accum += (w_qt * w_dt);\n postingMap.put(p.getDocumentId(), new Doc_accum(p, accum));\n }\n }\n\n }\n }\n for (Integer p : postingMap.keySet()) {\n Doc_accum doc_temp = postingMap.get(p);\n double accum = doc_temp.getAccumulator(); //gets accum associated with doc\n\n if (accum > 0) {\n //search for each p's Ld factor in docWeights.bin\n double l_d = strategy.calculate_Ld(disk_posIndex, doc_temp.getPosting().getDocumentId());\n\n accum /= l_d;\n doc_temp.setAccumulator(accum);\n }\n\n queue.add(postingMap.get(p));\n\n }\n\n //returns top K=10 results \n int topK = 50;\n\n while ((results.size() < topK) && queue.size() > 0) {\n\n results.add(queue.poll()); //gets the posting acc pair and returns only posting\n\n }\n time_per_query.add(time);\n List<String> filenames = get_RankedResults(results);\n\n mean_ap.add_poseRel(q, filenames);\n\n }\n\n double map_result = mean_ap.mean_ap();\n String mapDisplay = \"Mean average precision: \" + map_result;\n GUI.JListModel.addElement(mapDisplay);\n System.out.println(\"\\n\" + mapDisplay);\n\n double throughput_result = mean_ap.calculate_throughput(time_per_query);\n String throughput_Display = \"Throughput of the system is: \" + throughput_result;\n GUI.JListModel.addElement(throughput_Display);\n System.out.println(throughput_Display);\n\n double mrt_result = mean_ap.calculae_mean_response_time(time_per_query);\n String mrt_Display = \"Mean Response Time of the system is: \" + mrt_result;\n GUI.JListModel.addElement(mrt_Display);\n System.out.println(mrt_Display);\n\n }",
"public static void main(String[] args) throws SQLException, IOException, ClassNotFoundException {\n\t\tTravelAgency vtr=new TravelAgency();\n\t\tList list=vtr.generatePackageCost(\"d://VarshTourPackageDetails.txt\");\n\t\tIterator<String> itr=list.iterator();\n\t\twhile(itr.hasNext()) {\n\t\t\tSystem.out.println(itr.next());\n\t\t\t\n\t\t\tList list1=vtr.findPackagesWithMinimumNumberOfDays();\n\t\t\tIterator itr1=list1.iterator();\n\t\t\twhile(itr1.hasNext()) {\n\t\t\t\tPackage p=(Package)itr1.next();\n\t\t\t\tSystem.out.println(p.getPackageId() + \" \" +p.getSourcePlace()+ \" \" + p.getDestinationPlace() + \" \" + p.getNoOfDays() + \" \" + p.getBasicFare());\n\t\t}\n\n\t}\n\n}",
"private void processStartObject() {\n\t\tif (currentFieldName != null) {\r\n\t\t\t// go down the tree following the field name\r\n\t\t\tFieldFilterTree tmpIncludes = curNode.getChild(currentFieldName);\r\n\t\t\tparentNode = curNode;\r\n\t\t\tcurNode = tmpIncludes;\r\n\t\t}\r\n\t}",
"@Test(timeout = 4000)\n public void test01() throws Throwable {\n FileUtil fileUtil0 = new FileUtil();\n fileUtil0.downloadBrowseNodeFile(\">RY@\\\"d8cDm4\", \"gIeuBfO{y#\", \"\", \">RY@\\\"d8cDm4\");\n fileUtil0.fetchThirdPartySearchFile(\"net.kencochrane.a4j.file.FileUtil\", \"g!n_C$F8\\\"D4 e)e\", \"b_\", \"net.kencochrane.a4j.file.FileUtil\");\n ArrayList<Integer> arrayList0 = new ArrayList<Integer>();\n Integer integer0 = new Integer((-977));\n arrayList0.add(integer0);\n fileUtil0.cacheDir = \"\";\n fileUtil0.fetchAccessories(\"\", arrayList0);\n fileUtil0.getBrowseNodeFile(\"\", \"\", \"\");\n fileUtil0.downloadCart(\"4[EG]r,0beUTj1 \");\n FileInputStream fileInputStream0 = fileUtil0.fetchBlendedSearchFile(\"4[EG]r,0beUTj1 \", \"\");\n assertNull(fileInputStream0);\n }",
"public static void main(String[] args) throws Throwable {\n\n Main object = new Main();\n String target = \"4\";\n Map<String, List<String>> deps = new HashMap<>();\n List<String> a = new ArrayList<>();\n a.add(\"3\");\n a.add(\"2\");\n deps.put(\"4\", a);\n List<String> b = new ArrayList<>();\n b.add(\"1\");\n deps.put(\"3\",b);\n deps.put(\"2\",b);\n List<String> res = object.buildOrder(\"4\",deps);\n\n System.out.print(\"res\" + Arrays.toString(res.toArray()));\n\n }",
"private <T extends Definition> void preloadSerialize(Collection<T> defs, Class<T> type,\n Appendable out) throws IOException, QuickFixException {\n AuraContext context = Aura.getContextService().getCurrentContext();\n SerializationService serializationService = Aura.getSerializationService();\n \n context.setPreloading(true);\n try{\n serializationService.writeCollection(defs, type, out);\n } finally {\n context.setPreloading(false);\n }\n }",
"public void insertInorderBarrier() {\n\t\t\n\t}",
"public QQKachoo(){\n\t_front = new DLLNode<T>(null,null,null);\n\t_end = new DLLNode<T>(null, null,null);\n\t_size = 0;\n }",
"public static void main(String[] args) throws Exception {\n\t\tif (args[0].equals(\"-vs1\")) {\r\n\t\t\tvisibleSplitByRelationName_step1(args[1]);\r\n\t\t}\r\n\t\t/**sort uniq*/\r\n\t\tif (args[0].equals(\"-vs2\")) {\r\n\t\t\tcreateArgRelKey(args[1], args[2], Integer.parseInt(args[3]));\r\n\t\t}\r\n\t\tif (args[0].equals(\"-filter\")) {\r\n\t\t\tfilterOutLargeBlock(args[1], args[2], Integer.parseInt(args[3]), Integer.parseInt(args[4]));\r\n\t\t}\r\n\t\tif (args[0].equals(\"-join\")) {\r\n\t\t\tvisibleJoin(args[1], args[2], args[3]);\r\n\t\t}\r\n\t\tif (args[0].equals(\"-get_notable_type_plus_jenny\")) {\r\n\t\t\tget_notable_type_plus_jenny(args[1], args[2], args[3],args[4]);\r\n\t\t}\r\n\r\n\t\t//visibleSplitByRelationName();\r\n\t}",
"@Test\n public void testParallelScan() throws Exception {\n WorkflowJob job = r.jenkins.createProject(WorkflowJob.class, \"Convoluted\");\n job.setDefinition(new CpsFlowDefinition(\n \"echo 'first'\\n\" +\n \"def steps = [:]\\n\" +\n \"steps['1'] = {\\n\" +\n \" echo 'do 1 stuff'\\n\" +\n \"}\\n\" +\n \"steps['2'] = {\\n\" +\n \" echo '2a'\\n\" +\n \" echo '2b'\\n\" +\n \"}\\n\" +\n \"parallel steps\\n\" +\n \"echo 'final'\",\n true));\n\n /* Flow structure (ID - type)\n 2 - FlowStartNode (BlockStartNode)\n 3 - Echostep\n 4 - ParallelStep (StepStartNode) (start branches)\n 6 - ParallelStep (StepStartNode) (start branch 1), ParallelLabelAction with branchname=1\n 7 - ParallelStep (StepStartNode) (start branch 2), ParallelLabelAction with branchname=2\n 8 - EchoStep, (branch 1) parent=6\n 9 - StepEndNode, (end branch 1) startId=6, parentId=8\n 10 - EchoStep, (branch 2) parentId=7\n 11 - EchoStep, (branch 2) parentId = 10\n 12 - StepEndNode (end branch 2) startId=7 parentId=11,\n 13 - StepEndNode (close branches), parentIds = 9,12, startId=4\n 14 - EchoStep\n 15 - FlowEndNode (BlockEndNode)\n */\n\n WorkflowRun b = r.assertBuildStatusSuccess(job.scheduleBuild2(0));\n FlowExecution exec = b.getExecution();\n Collection<FlowNode> heads = b.getExecution().getCurrentHeads();\n\n AbstractFlowScanner scanner = new LinearScanner();\n scanner.setup(heads);\n FlowTestUtils.assertNodeOrder(\"Linear\", scanner, 15, 14, 13, 9, 8, 6, 4, 3, 2);\n scanner.setup(heads, Collections.singleton(exec.getNode(\"9\")));\n FlowTestUtils.assertNodeOrder(\"Linear\", scanner, 15, 14, 13, 12, 11, 10, 7, 4, 3, 2);\n\n\n // Depth first scanner and with blacklist\n scanner = new DepthFirstScanner();\n scanner.setup(heads);\n\n // Compatibility test for ordering\n FlowTestUtils.assertNodeOrder(\"FlowGraphWalker\", new FlowGraphWalker(exec), 15, 14, 13,\n 9, 8, 6, // Branch 1\n 4, 3, 2, // Before parallel\n 12, 11, 10, 7); // Branch 2\n FlowTestUtils.assertNodeOrder(\"Depth first\", new FlowGraphWalker(exec), 15, 14, 13,\n 9, 8, 6, // Branch 1\n 4, 3, 2, // Before parallel\n 12, 11, 10, 7); // Branch 2\n scanner.setup(heads, Collections.singleton(exec.getNode(\"9\")));\n FlowTestUtils.assertNodeOrder(\"Linear\", scanner, 15, 14, 13, 12, 11, 10, 7, 4, 3, 2);\n\n scanner.setup(Arrays.asList(exec.getNode(\"9\"), exec.getNode(\"12\")));\n FlowTestUtils.assertNodeOrder(\"Depth-first scanner from inside parallels\", scanner, 9, 8, 6, 4, 3, 2, 12, 11, 10, 7);\n\n // We're going to test the ForkScanner in more depth since this is its natural use\n scanner = new ForkScanner();\n scanner.setup(heads);\n FlowTestUtils.assertNodeOrder(\"ForkedScanner\", scanner, 15, 14, 13,\n 12, 11, 10, 7,// One parallel\n 9, 8, 6, // other parallel\n 4, 3, 2); // end bit\n scanner.setup(heads, Collections.singleton(exec.getNode(\"9\")));\n FlowTestUtils.assertNodeOrder(\"ForkedScanner\", scanner, 15, 14, 13, 12, 11, 10, 7, 4, 3, 2);\n\n // Test forkscanner midflow\n scanner.setup(exec.getNode(\"14\"));\n FlowTestUtils.assertNodeOrder(\"ForkedScanner\", scanner, 14, 13,\n 12, 11, 10, 7, // Last parallel\n 9, 8, 6, // First parallel\n 4, 3, 2); // end bit\n\n // Test forkscanner inside a parallel\n List<FlowNode> startingPoints = Arrays.asList(exec.getNode(\"9\"), exec.getNode(\"12\"));\n scanner.setup(startingPoints);\n FlowTestUtils.assertNodeOrder(\"ForkedScanner\", scanner, 9, 8, 6, 12, 11, 10, 7, 4, 3, 2);\n\n startingPoints = Arrays.asList(exec.getNode(\"9\"), exec.getNode(\"11\"));\n scanner.setup(startingPoints);\n FlowTestUtils.assertNodeOrder(\"ForkedScanner\", scanner, 9, 8, 6, 11, 10, 7, 4, 3, 2);\n\n\n // Filtering at different points within branches\n List<FlowNode> blackList = Arrays.asList(exec.getNode(\"6\"), exec.getNode(\"7\"));\n Assert.assertEquals(4, scanner.filteredNodes(heads, blackList, FlowTestUtils.MATCH_ECHO_STEP).size());\n Assert.assertEquals(4, scanner.filteredNodes(heads, Collections.singletonList(exec.getNode(\"4\")), FlowTestUtils.MATCH_ECHO_STEP).size());\n blackList = Arrays.asList(exec.getNode(\"6\"), exec.getNode(\"10\"));\n Assert.assertEquals(3, scanner.filteredNodes(heads, blackList, FlowTestUtils.MATCH_ECHO_STEP).size());\n }",
"private void dijkstras() {\n LinkedList<Integer> openNodeList = new LinkedList<Integer>();\n openNodeList.add(grid.length - 1);\n Integer curGrid = -1;\n\n while ( openNodeList.size() > 0 ) {\n curGrid = getBestGrid(openNodeList,curGrid);\n\n for ( int i = 0; i < grid[curGrid].edges.size() - 1; i++ ) {\n Integer tmp = grid[curGrid].edges.get(i).arrayIndex;\n if ( !grid[tmp].bFinalized && !openNodeList.contains(tmp)) {\n //System.out.println(\"Adding:\\t\" + tmp + \":\\t\" + grid[tmp].cost);\n grid[tmp].setHead(curGrid);\n grid[tmp].cost = grid[curGrid].cost + grid[curGrid].edges.get(i).Exposure;\n openNodeList.add(tmp);\n }\n }\n\n grid[curGrid].bFinalized = true;\n openNodeList.removeFirstOccurrence(curGrid);\n }\n }",
"public static void main(String[] args) throws Exception {\r\n\r\n\t //All results in Phase K-1.\r\n\t List<ItemSet> itemSetsPrevPass = new ArrayList<>();\r\n\t \r\n\t //Results in Phase K.\r\n\t List<ItemSet> candidateItemSets = null;\r\n\t int passNum=3;\r\n\t //Index Structure in Phase K.\r\n\t Trie trie = null;\r\n\t \r\n\t\tString lastPassOutputFile = \"E:\\\\复旦小学的资料\\\\part-r-00000\";\t\r\n \r\n try {\r\n File fp = new File(lastPassOutputFile);\r\n BufferedReader p = new BufferedReader(new FileReader(fp));\r\n String currLine;\r\n while ((currLine = p.readLine()) != null) {\r\n currLine = currLine.replace(\"[\", \"\");\r\n currLine = currLine.replace(\"]\", \"\");\r\n String[] words = currLine.split(\"[\\\\s\\\\t]+\");\r\n if (words.length < 2) {\r\n continue;\r\n }\r\n\r\n String finalWord = words[words.length - 1];\r\n int support = Integer.parseInt(finalWord);\r\n ItemSet itemSet = new ItemSet(support);\r\n //Make {itemSetsPrevPass}\r\n for (int k = 0; k < words.length - 1; k++) {\r\n String csvItemIds = words[k];\r\n String[] itemIds = csvItemIds.split(\",\");\r\n for (String itemId : itemIds) {\r\n itemSet.add(Integer.parseInt(itemId));\r\n }\r\n }\r\n if(itemSet.size() ==(passNum-1))\r\n \titemSetsPrevPass.add(itemSet);\r\n }\r\n }\r\n catch (Exception e) {\r\n \tSystem.out.println(e);\r\n }\r\n\r\n \r\n System.out.println(\"OK1!\");\r\n //See annotation in file: utils/Funcs.java\r\n candidateItemSets = Funcs.getCandidateItemSets(itemSetsPrevPass, (passNum - 1));\r\n// File fout = new File(\"E:\\\\复旦小学的资料\\\\tri.txt\");\r\n// PrintWriter output = new PrintWriter(fout);\r\n// for(ItemSet s:candidateItemSets) {\r\n// \toutput.println(s);\r\n// }\r\n// output.close();\r\n System.out.println(\"OK2!\");\r\n \r\n trie = new Trie(passNum);\r\n\r\n int candidateItemSetsSize = candidateItemSets.size();\r\n for (int i = 0; i < candidateItemSetsSize; i++) {\r\n ItemSet itemSet = candidateItemSets.get(i);\r\n //System.out.println(itemSet);\r\n trie.add(itemSet);\r\n }\r\n \r\n \r\n File fp = new File(\"C:\\\\Users\\\\DELL6\\\\Desktop\\\\mul\");\r\n BufferedReader p = new BufferedReader(new FileReader(fp));\r\n String currLine;\r\n ArrayList<ItemSet> empt = new ArrayList<ItemSet>();\r\n while((currLine = p.readLine()) != null) {\r\n\t Transaction txn = Funcs.getTransaction(2, currLine);\r\n\t Collections.sort(txn);\r\n\t ArrayList<ItemSet> matchedItemSet = new ArrayList<>();\r\n\t trie.findItemSets(matchedItemSet, txn);\r\n\t if(!matchedItemSet.equals(empt)) {\r\n\t \tfor(ItemSet itemSet : matchedItemSet) \r\n\t\t \tSystem.out.println(itemSet);\r\n\t\t }\r\n\t }\r\n }",
"public static void main(final String[] args) {\n PriorityQueue<Map.Entry<String, Integer>> storage =\n new PriorityQueue<>(1, new DescendingByPriority());\n PriorityQueue<Map.Entry<String, Integer>> filledStorage =\n new PriorityQueue<>(1, new DescendingByPriority());\n AtStore Store = new AtStore();\n AtHome Home = new AtHome();\n\n // TODO ask the user if they want to add or remove products to the list (Home or sto\n filledStorage = Home.fillQueue(storage);\n\n while (filledStorage.size() >= 1) {\n Store.remove(filledStorage);\n }\n\n // Store.printReceipt();\n\n // TODO add an option to run without a price field\n\n // IF ADD\n // TODO create a prioritized queue that will act as the main data structure\n\n // TODO create a hashmap that can hold the value of each items\n // TODO when adding items to the prioritized queue ask for the priority and add to the queue\n // then ask the price and add the value to the hashmap\n // TODO ask user if they have a next item to add\n\n // TODO ask user if they want to add or remove products to the list\n // IF REMOVE\n // TODO state how many objects are in the Queue\n // TODO peek(?) the first object and get the price from the hashmap\n // TODO ask the user if they want to purchase this item at this price this trip\n // IF YES\n // TODO add the price from the hashmap to the total for this trip\n // TODO remove the item from the queue (should be done with the poll method)\n // TODO peek (?) the next item and repeat from line 19\n // IF NO\n // TODO leave item in the queue and move onto the next item? (would break abstraction)\n\n // TODO ask user if they have all the items they need (IF items still in list)\n // TODO print you are buing XX items for YY dollars\n\n // TODO loop back to line 8\n\n }",
"void exec2(DeletedDirectoryEntry entry, String outdir, String file) throws Exception {\r\n\r\n byte[] buffer = new byte[fat32.getBytesPerSector()];\r\n\r\n //\r\n // startClusterHigh を見つける\r\n //\r\n if (!entry.resolveStartCluster(id3v2MatchingStrategy) || !entry.isStartClusterValid()) {\r\nSystem.err.println(\"start cluster not found: \" + file);\r\n return;\r\n }\r\n int startCluster = entry.getStartCluster();\r\n\r\n //\r\n // 連続しているクラスターを書き出す\r\n // 途切れたら次の使われていないところ\r\n //\r\n \r\n File output = new File(outdir, file);\r\n OutputStream os = new FileOutputStream(output);\r\n\r\nSystem.err.println(entry.getName() + \": \" + entry.getStartCluster() + \", \" + entry.length());\r\n\r\n long rest = entry.length();\r\n\r\n\r\nouter:\r\n for (int cluster = 0; cluster < fat32.getLastCluster(); cluster++) {\r\n int targetCluster = startCluster + cluster;\r\nSystem.err.print(\"cluster: \" + targetCluster);\r\n\r\n\r\n // 途切れたら次の使われていないところ\r\n\r\n if (fat32.isUsing(targetCluster)) {\r\nSystem.err.println(\" has used, skip\");\r\n//int restClusters = (int) ((rest + (fat32.getBytesPerCluster() - 1)) / fat32.getBytesPerCluster());\r\n//System.err.println(\"rest: \" + rest + \" / \" + entry.length() + \", \" + restClusters + \" clusters: \" + file);\r\n continue;\r\n }\r\n\r\n // 1 クラスタの書き出し\r\n\r\n for (int sector = 0; sector < fat32.getSectorsPerCluster(); sector++) {\r\n int targetSector = fat32.getSector(targetCluster) + sector;\r\n fat32.readSector(buffer, targetSector);\r\n if (rest > fat32.getBytesPerSector()) {\r\n os.write(buffer, 0, fat32.getBytesPerSector());\r\n rest -= fat32.getBytesPerSector();\r\n } else {\r\n os.write(buffer, 0, (int) rest);\r\n rest -= rest;\r\n break outer;\r\n }\r\n }\r\nSystem.err.println(\" salvaged: \" + (entry.length() - rest) + \"/\" + entry.length());\r\n }\r\n\r\nSystem.err.println(\" salvaged, finish: \" + (entry.length() - rest) + \"/\" + entry.length());\r\n\r\n\r\n os.flush();\r\n os.close();\r\n output.setLastModified(entry.lastModified());\r\n \r\n }",
"void moveLaterFutureTargetsToIterator() {moveStackToIterator(laterFutureTargets);}",
"private void bfs() {\n\t\tQueue<Node> q = new ArrayDeque<>();\n\t\tq.add(treeNodes.get(0));\n\t\twhile (!q.isEmpty()) {\n\t\t\tint size = q.size();\n\t\t\tfor (int i = 0; i < size; i++) {\n\t\t\t\tNode curr = q.poll();\n\t\t\t\ttime += curr.informTime;\n\t\t\t\tSet<Node> nextNodes = curr.nextNodes;\n\t\t\t\tif (nextNodes == null || curr.id == treeNodes.get(0).id)\n\t\t\t\t\tcontinue;\n\t\t\t\tfor (Node node : nextNodes) {\n\t\t\t\t\tq.add(node);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t}",
"@Override\r\n public boolean breadthFirstSearch(T start, T end) {\r\n Vertex<T> startV = vertices.get(start);\r\n Vertex<T> endV = vertices.get(end);\r\n\r\n Queue<Vertex<T>> queue = new LinkedList<Vertex<T>>();\r\n Set<Vertex<T>> visited = new HashSet<>();\r\n\r\n queue.add(startV);\r\n visited.add(startV);\r\n\r\n while(queue.size() > 0){\r\n Vertex<T> next = queue.poll();\r\n if(next == null){\r\n continue;\r\n }\r\n if(next == endV){\r\n return true;\r\n }\r\n\r\n for (Vertex<T> neighbor: next.getNeighbors()){\r\n if(!visited.contains(neighbor)){\r\n visited.add(neighbor);\r\n queue.add(neighbor);\r\n }\r\n }\r\n }\r\n\r\n return false;\r\n }"
] | [
"0.5329349",
"0.5050871",
"0.5047281",
"0.48347458",
"0.48280242",
"0.47843015",
"0.47455785",
"0.47279954",
"0.47148055",
"0.47059217",
"0.4681776",
"0.46778366",
"0.46700108",
"0.4662793",
"0.463503",
"0.46335703",
"0.46313307",
"0.46309626",
"0.46029365",
"0.45713046",
"0.4570794",
"0.45677355",
"0.45671335",
"0.4557477",
"0.45519674",
"0.45401663",
"0.45347756",
"0.45339718",
"0.45330182",
"0.45281148",
"0.45036444",
"0.44956484",
"0.44928703",
"0.44891778",
"0.4476147",
"0.44677728",
"0.44662076",
"0.44647428",
"0.44637346",
"0.4463109",
"0.44592178",
"0.44532874",
"0.4452363",
"0.44519442",
"0.44515312",
"0.44497532",
"0.4438355",
"0.44367144",
"0.44266993",
"0.4421225",
"0.44154736",
"0.44144097",
"0.4409329",
"0.43975952",
"0.43868065",
"0.43829566",
"0.4371008",
"0.43708423",
"0.43690643",
"0.43641338",
"0.43632108",
"0.43457937",
"0.43455163",
"0.43440259",
"0.4342862",
"0.43397626",
"0.43388507",
"0.43336162",
"0.43302387",
"0.43242368",
"0.43238205",
"0.432266",
"0.43186513",
"0.43173447",
"0.43157405",
"0.4313451",
"0.43076548",
"0.42887026",
"0.4284731",
"0.4281088",
"0.42783374",
"0.4278052",
"0.4277631",
"0.4277363",
"0.42767358",
"0.42742312",
"0.4270302",
"0.42679477",
"0.42668617",
"0.42614236",
"0.42606747",
"0.42580566",
"0.42561617",
"0.42497185",
"0.42489824",
"0.42480642",
"0.42473468",
"0.42426205",
"0.4235786",
"0.42338902"
] | 0.48212352 | 5 |
IMPORT: label (String)queue EXPORT: bool (DSALinkedList) ASSERTION: DEPTH FIRST SEARCH Recur for all the vertices adjacent to vx while stack is not empty | public void dfs(DSAGraphVertex vx, DSAStack visited, DSAQueue queue)
{
try {
if(vx != null) //base case if it's null end recursion
{
visited.push(vx); //push onto visited stack
Iterator<DSAGraphVertex> itr = vx.getAdjacent().iterator();
do{
while (itr.hasNext())
{
vx = itr.next();
if(!vx.getVisited()) //if not visited traverse here
{
queue.enqueue(vx); //adds to output queue
vx.setVisited(); //sets to visited
dfs(vx, visited, queue);
}
}
visited.pop();
} while(!visited.isEmpty());
}
}
catch (IllegalArgumentException e) //catches empty stack exceptions
{
//System.out.println(e.getMessage());
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String breadthFirstSearch( AnyType start_vertex ) throws VertexException {\n \n StringBuffer buffer = new StringBuffer();\n \n // ----------------------------\n // TODO: Add your code here\n // ----------------------------\n boolean exists = false;\n Vertex<AnyType> S = new Vertex<AnyType>(start_vertex);\n int counter = 1;\n //make new vertex to check if its in list\n //make queue to hold vertices\n SemiConstantTimeQueue<Vertex<AnyType>> queue = new SemiConstantTimeQueue<Vertex<AnyType>>();\n //loop through and set not visited\n for( int i = 0; i < vertex_adjacency_list.size(); i++){\n vertex_adjacency_list.get(i).setVisited(-1);\n //if it's in list then set exists to true\n //and set visited \n if(vertex_adjacency_list.get(i).compareTo(S) == 0){\n exists = true;\n vertex_adjacency_list.get(i).setVisited(counter);\n counter = i;\n }\n } \n //if doesn't exist then throw the exception\n if(exists == false){\n throw new VertexException(\"Start Vertex does not exist\");\n }\n //make new queue\n queue.add(vertex_adjacency_list.get(counter));\n vertex_adjacency_list.get(counter).setVisited(1);\n counter = 1;\n int k=0;\n Vertex<AnyType>e;\n //while the queue isn't empty\n while(queue.peek() !=null){\n //make e the top of the queue \n e = queue.peek(); \n //go through the list and if you reach the begining it exits loop\n for( k = 0; k < vertex_adjacency_list.size()-1; k++){\n if(vertex_adjacency_list.get(k).compareTo(e)==0){\n break;\n }\n } \n //go through loop and check if visited, if not then add it to queue, set visited\n for( int j = 0; j< vertex_adjacency_list.get(k).numberOfAdjacentVertices(); j++){\n if(vertex_adjacency_list.get(k).getAdjacentVertex(j).hasBeenVisited()==false){\n counter++;\n queue.add(vertex_adjacency_list.get(k).getAdjacentVertex(j));\n vertex_adjacency_list.get(k).getAdjacentVertex(j).setVisited(counter);\n }\n }\n //remove from queue when through loop once\n k++;\n queue.remove();\n }\n //loop through list and print vertex and when it was visited\n for(int o = 0; o< vertex_adjacency_list.size(); o++){\n buffer.append(vertex_adjacency_list.get(o) + \":\" + vertex_adjacency_list.get(o).getVisited()+ \"\\n\");\n }\n return buffer.toString();\n }",
"public String depthFirstSearch( AnyType start_vertex ) throws VertexException {\n \n StringBuffer buffer = new StringBuffer();\n \n // ----------------------------\n // TODO: Add your code here\n // ----------------------------\n ConstantTimeStack<Vertex<AnyType>> stack = new ConstantTimeStack<Vertex<AnyType>>();\n boolean exists = false;\n Vertex<AnyType> S = new Vertex<AnyType>(start_vertex);\n int counter = 0;\n //loop through to set each vertex to not visited\n for( int i = 0; i < vertex_adjacency_list.size(); i++){\n vertex_adjacency_list.get(i).setVisited(-1);\n //if find the start vertex then set index position to counter\n if(vertex_adjacency_list.get(i).compareTo(S) == 0){\n exists = true;\n vertex_adjacency_list.get(i).setVisited(counter);\n counter = i;\n }\n }\n //if doesn't exist then through exception\n if(exists == false){\n throw new VertexException(\"Start Vertex does not exist\");\n }\n //if it does exist then push start node onto stack, set visited \n else if(exists){\n stack.push(vertex_adjacency_list.get(counter));\n vertex_adjacency_list.get(counter).setVisited(1);\n Vertex <AnyType> e = vertex_adjacency_list.get(counter);\n counter = 2;\n int n = e.numberOfAdjacentVertices();\n try{\n \n while(true){\n //loop through e's adjacent vertices \n for (n = e.numberOfAdjacentVertices()-1; n >=0 ; n--){\n //if the adacent vertex has not been visited\n if(e.getAdjacentVertex(n).hasBeenVisited()==false){\n //change e to adjacent vertex and push onto stack\n e = e.getAdjacentVertex(n);\n stack.push(e);\n //set e as visited at counter\n e.setVisited(counter);\n counter++;\n //reset n to e's num of vertices\n n = e.numberOfAdjacentVertices();\n }\n //if it has been visited and it's the first node in list\n //then pop it off the stack and then set e to new top\n //set n to new num of vertices\n else if(e.getAdjacentVertex(n).hasBeenVisited() && n == 0){\n stack.pop();\n e = stack.peek();\n n = e.numberOfAdjacentVertices();\n }\n }\n }\n }catch(EmptyStackException m){\n }\n }\n //loop through the list and print each with when it was visited\n for(int k = 0; k< vertex_adjacency_list.size(); k++){\n buffer.append(vertex_adjacency_list.get(k) + \":\" + vertex_adjacency_list.get(k).getVisited()+ \"\\n\");\n }\n \n return buffer.toString();\n \n }",
"public void dft() {\r\n\t\tHashMap<String, Boolean> processed = new HashMap<>();\r\n\t\tLinkedList<Pair> stack = new LinkedList<>();\r\n\r\n\t\tArrayList<String> vnames = new ArrayList<>(vces.keySet());\r\n\t\tfor (String vname : vnames) {\r\n\t\t\tif (processed.containsKey(vname)) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tPair rootpair = new Pair(vname, vname);\r\n\t\t\tstack.addFirst(rootpair);\r\n\t\t\twhile (stack.size() != 0) {\r\n\t\t\t\t// 1. removeFirst\r\n\t\t\t\tPair rp = stack.removeFirst();\r\n\r\n\t\t\t\t// 2. check if processed, mark if not\r\n\t\t\t\tif (processed.containsKey(rp.vname)) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tprocessed.put(rp.vname, true);\r\n\r\n\t\t\t\t// 3. Check, if an edge is found\r\n\t\t\t\tSystem.out.println(rp.vname + \" via \" + rp.psf);\r\n\r\n\t\t\t\t// 4. Add the unprocessed nbrs back\r\n\t\t\t\tArrayList<String> nbrnames = new ArrayList<>(rp.vtx.nbrs.keySet());\r\n\t\t\t\tfor (String nbrname : nbrnames) {\r\n\t\t\t\t\tif (!processed.containsKey(nbrname)) {\r\n\t\t\t\t\t\tPair np = new Pair(nbrname, rp.psf + nbrname);\r\n\t\t\t\t\t\tstack.addFirst(np);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void dfs() {\n int currentVertexIndex = 0;\r\n dfsStack.push(0);\r\n vertexList[0].wasVisited = true;\r\n System.out.println(vertexList[dfsStack.peek()]);\r\n while (dfsStack.top != -1) {\r\n\r\n\r\n currentVertexIndex = this.getAdjUnvisitedVert(dfsStack.peek());\r\n if (currentVertexIndex != -1) {\r\n dfsStack.push(currentVertexIndex);\r\n vertexList[currentVertexIndex].wasVisited = true;\r\n System.out.println(vertexList[dfsStack.peek()]);\r\n\r\n\r\n } else {\r\n currentVertexIndex = dfsStack.pop();\r\n\r\n }\r\n }\r\n// reset wasVisted\r\n for (Vertex x : vertexList) {\r\n x.wasVisited = false;\r\n }\r\n }",
"void testSearches(Tester t) {\n Vertex v1 = new Vertex(10, 10);\n Vertex v2 = new Vertex(10, 11);\n Vertex v3 = new Vertex(10, 12);\n\n Edge e1 = new Edge(v1, v2, 1);\n Edge e2 = new Edge(v2, v3, 1);\n\n IList<Vertex> map = new Cons<Vertex>(v1, new Cons<Vertex>(v2, new Cons<Vertex>(\n v3, new Empty<Vertex>())));\n\n Player player = new Player(map);\n DepthFirst dp = new DepthFirst(map);\n BreadthFirst bp = new BreadthFirst(map);\n\n t.checkExpect(player.current, v1);\n t.checkExpect(player.finished, false);\n\n t.checkExpect(bp.hasNext(), true);\n t.checkExpect(bp.next(), new Queue<Vertex>());\n\n t.checkExpect(dp.hasNext(), true);\n t.checkExpect(dp.next(), new Stack<Vertex>());\n\n t.checkExpect(player.move(true, e1), v2);\n\n t.checkExpect(player.current, v2);\n t.checkExpect(player.finished, false);\n\n t.checkExpect(bp.hasNext(), false);\n t.checkExpect(bp.next(), v3);\n\n t.checkExpect(dp.hasNext(), false);\n t.checkExpect(dp.next(), v3);\n\n t.checkExpect(player.move(true, e2), v3);\n\n player.finished = true;\n\n t.checkExpect(player.current, v3);\n t.checkExpect(player.finished, true);\n\n Queue<Vertex> q = new Queue<Vertex>(map);\n\n q.enqueue(new Vertex(5, 5));\n\n Deque<Vertex> dq = new Deque<Vertex>();\n dq.addAtHead(v1);\n dq.addAtTail(v2);\n dq.addAtTail(new Vertex(5, 5));\n\n\n t.checkExpect(q.isEmpty(), false);\n t.checkExpect(q.contents, dq);\n\n Stack<Vertex> stack = new Stack<Vertex>(map);\n\n t.checkExpect(stack.isEmpty(), false);\n dq.removeFromHead();\n t.checkExpect(stack.pop(), dq);\n\n t.checkExpect(dp.next(), v2);\n t.checkExpect(bp.hasNext(), true);\n\n }",
"private void breadthFirstSearch (int start, int[] visited, int[] parent){\r\n Queue< Integer > theQueue = new LinkedList< Integer >();\r\n boolean[] identified = new boolean[getNumV()];\r\n identified[start] = true;\r\n theQueue.offer(start);\r\n while (!theQueue.isEmpty()) {\r\n int current = theQueue.remove();\r\n visited[current] = 1; //ziyaret edilmis vertexler queuedan cikarilan vertexlerdir\r\n Iterator < Edge > itr = edgeIterator(current);\r\n while (itr.hasNext()) {\r\n Edge edge = itr.next();\r\n int neighbor = edge.getDest();\r\n if (!identified[neighbor]) {\r\n identified[neighbor] = true;\r\n theQueue.offer(neighbor);\r\n parent[neighbor] = current;\r\n }\r\n }\r\n }\r\n }",
"public void mst() {\n int currentVertexIndex = 0;\r\n dfsStack.push(0);\r\n vertexList[0].wasVisited = true;\r\n// System.out.println(vertexList[dfsStack.peek()]);\r\n while (dfsStack.top != -1) {\r\n\r\n\r\n currentVertexIndex = this.getAdjUnvisitedVert(dfsStack.peek());\r\n if (currentVertexIndex != -1) {\r\n System.out.print(vertexList[dfsStack.peek()]);\r\n dfsStack.push(currentVertexIndex);\r\n vertexList[currentVertexIndex].wasVisited = true;\r\n System.out.print(vertexList[dfsStack.peek()]);\r\n System.out.print(\", \");\r\n\r\n\r\n } else {\r\n currentVertexIndex = dfsStack.pop();\r\n\r\n }\r\n }\r\n for (Vertex x : vertexList) {\r\n x.wasVisited = false;\r\n }\r\n }",
"private static int breadthFirstSearch(Vertex start) throws Queue.UnderflowException, Queue.EmptyException {\n boolean visited[] = new boolean[48];\n //Keep a queue of vertecies and a queue of the depth of the verticies - they will be added to and poped from identically\n ListQueue<Vertex> queue = new ListQueue<Vertex>();\n ListQueue<Integer> numQueue = new ListQueue<Integer>();\n //Set the starting node as visited\n visited[start.index()] = true;\n queue.enqueue(start);\n numQueue.enqueue(new Integer(1));\n\n //Keep last\n int last = -1;\n //While the queue isnt empty\n while (!queue.isEmpty()) {\n //Pop off the top from both queues and mark as visited\n start = queue.dequeue();\n int current = numQueue.dequeue();\n visited[start.index] = true;\n //For all neigbors\n for (Vertex v : start.neighbors) {\n //If we havent visited it make sure to visit it\n if (visited[v.index()] == false) {\n //As we keep adding new nodes to visit keep track of the depth\n queue.enqueue(v);\n numQueue.enqueue(current + 1);\n }\n }\n //Keep track of the most recent depth before we pop it off (queue will be empty when we exit)\n last = current;\n }\n //Return the max of the depth\n return last;\n }",
"void dfs(){\n // start from the index 0\n for (int vertex=0; vertex<v; vertex++){\n // check visited or not\n if (visited[vertex]==false){\n Explore(vertex);\n }\n }\n }",
"public void bfs(DSAGraphVertex vx, DSAStack visited, DSAQueue queue, DSAGraphVertex target)\n\t{\n\n\t\ttry {\n\t\t\tif(vx != null) //base case if it's null end recursion\n\t\t\t{\n\t\t\t\tvisited.push(vx); //push onto visited stack\n\t\t\t\tIterator<DSAGraphVertex> itr = vx.getAdjacent().iterator();\n\n\t\t\t\tdo{\n\t\t\t\t\twhile (itr.hasNext())\n\t\t\t\t\t{\n\t\t\t\t\t\tvx = itr.next();\n\t\t\t\t\t\tif(!vx.getVisited() && !vx.equals(target)) //if not visited and is not target traverse here\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tqueue.enqueue(vx); //adds to output queue\n\t\t\t\t\t\t\tvx.setVisited(); //sets to visited\n\t\t\t\t\t\t\tbfs(vx, visited, queue, target);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tvisited.pop();\n\n\t\t\t\t} while(!visited.isEmpty());\n\t\t\t}\n\t\t}\n\t\tcatch (IllegalArgumentException e) //catches empty stack exceptions\n\t\t{\n\t\t\t//System.out.println(e.getMessage());\n\t\t}\n\n\n\t}",
"void BFS(int s, int d) \r\n { \r\n int source = s;\r\n int destination = d;\r\n boolean visited[] = new boolean[V];\r\n int parent[] = new int[V];\r\n \r\n // Create a queue for BFS \r\n LinkedList<Integer> queue = new LinkedList<Integer>(); \r\n \r\n // Mark the current node as visited and enqueue it \r\n \r\n visited[s]=true; \r\n queue.add(s); \r\n System.out.println(\"Search Nodes: \");\r\n while (queue.size() != 0) \r\n { \r\n int index = 0;\r\n \r\n // Dequeue a vertex from queue and print it \r\n \r\n s = queue.poll();\r\n \r\n System.out.print(convert2(s)); \r\n \r\n if(s == destination)\r\n {\r\n break;\r\n }\r\n \r\n System.out.print(\" -> \");\r\n while(index < adj[s].size()) \r\n { \r\n \r\n \r\n int n = adj[s].get(index); \r\n if (!visited[n]) \r\n { \r\n visited[n] = true;\r\n parent[n] = s;\r\n queue.add(n); \r\n }\r\n index = index+ 2;\r\n \r\n \r\n }\r\n \r\n \r\n \r\n }\r\n int check = destination;\r\n int cost = 0, first, second = 0;\r\n String string = \"\" + convert2(check);\r\n while(check!=source)\r\n {\r\n \r\n first = parent[check];\r\n string = convert2(first) + \" -> \" + string;\r\n while(adj[first].get(second) != check)\r\n {\r\n second++;\r\n }\r\n cost = cost + adj[first].get(second +1);\r\n check = first;\r\n second = 0;\r\n \r\n }\r\n \r\n System.out.println(\"\\n\\nPathway: \");\r\n \r\n System.out.println(string);\r\n \r\n \r\n System.out.println(\"\\nTotal cost: \" + cost);\r\n }",
"private void breadthHelper(Graph<VLabel, ELabel>.Vertex v) {\n LinkedList<Graph<VLabel, ELabel>.Vertex> fringe =\n new LinkedList<Graph<VLabel, ELabel>.Vertex>();\n fringe.add(v);\n while (fringe.size() > 0) {\n Graph<VLabel, ELabel>.Vertex curV = fringe.poll();\n try {\n if (!_marked.contains(curV)) {\n _marked.add(curV);\n try {\n visit(curV);\n } catch (RejectException rExc) {\n fringe.add(curV);\n continue;\n }\n for (Graph<VLabel, ELabel>.Edge e: _graph.outEdges(curV)) {\n Graph<VLabel, ELabel>.Vertex child = e.getV(curV);\n if (!_marked.contains(child)) {\n try {\n preVisit(e, curV);\n fringe.add(child);\n } catch (RejectException rExc) {\n int unused = 0;\n }\n }\n }\n fringe.add(curV);\n } else {\n postVisit(curV);\n while (fringe.remove(curV)) {\n continue;\n }\n }\n } catch (StopException sExc) {\n _finalVertex = curV;\n return;\n }\n }\n }",
"public void calcSP(Graph g, Vertex source){\n // Algorithm:\n // 1. Take the unvisited node with minimum weight.\n // 2. Visit all its neighbours.\n // 3. Update the distances for all the neighbours (In the Priority Queue).\n // Repeat the process till all the connected nodes are visited.\n\n // clear existing info\n// System.out.println(\"Calc SP from vertex:\" + source.name);\n g.resetMinDistance();\n source.minDistance = 0;\n PriorityQueue<Vertex> queue = new PriorityQueue<Vertex>();\n queue.add(source);\n\n while(!queue.isEmpty()){\n Vertex u = queue.poll();\n for(Edge neighbour:u.neighbours){\n// System.out.println(\"Scanning vector: \"+neighbour.target.name);\n Double newDist = u.minDistance+neighbour.weight;\n\n // get new shortest path, empty existing path info\n if(neighbour.target.minDistance>newDist){\n // Remove the node from the queue to update the distance value.\n queue.remove(neighbour.target);\n neighbour.target.minDistance = newDist;\n\n // Take the path visited till now and add the new node.s\n neighbour.target.path = new ArrayList<>(u.path);\n neighbour.target.path.add(u);\n// System.out.println(\"Path\");\n// for (Vertex vv: neighbour.target.path) {\n// System.out.print(vv.name);\n// }\n// System.out.print(\"\\n\");\n\n// System.out.println(\"Paths\");\n neighbour.target.pathCnt = 0;\n neighbour.target.paths = new ArrayList<ArrayList<Vertex>>();\n if (u.paths.size() == 0) {\n ArrayList<Vertex> p = new ArrayList<Vertex>();\n p.add(u);\n neighbour.target.paths.add(p);\n neighbour.target.pathCnt++;\n } else {\n for (ArrayList<Vertex> p : u.paths) {\n ArrayList<Vertex> p1 = new ArrayList<>(p);\n p1.add(u);\n// for (Vertex vv : p1) {\n// System.out.print(vv.name);\n// }\n// System.out.print(\"\\n\");\n neighbour.target.paths.add(p1);\n neighbour.target.pathCnt++;\n }\n }\n\n //Reenter the node with new distance.\n queue.add(neighbour.target);\n }\n // get equal cost path, add into path list\n else if (neighbour.target.minDistance == newDist) {\n queue.remove(neighbour.target);\n for(ArrayList<Vertex> p: u.paths) {\n ArrayList<Vertex> p1 = new ArrayList<>(p);\n p1.add(u);\n neighbour.target.paths.add(p1);\n neighbour.target.pathCnt++;\n }\n queue.add(neighbour.target);\n }\n }\n }\n }",
"public static void main(String[] args) {\n\n BDNode a = new BDNode(\"A\");\n BDNode b = new BDNode(\"B\");\n BDNode c = new BDNode(\"C\");\n BDNode d = new BDNode(\"D\");\n BDNode e = new BDNode(\"E\");\n\n a.link(b);\n a.link(d);\n b.link(a);\n b.link(c);\n b.link(e);\n c.link(b);\n c.link(d);\n d.link(a);\n d.link(c);\n d.link(e);\n e.link(b);\n e.link(d);\n\n BDNode target = e;\n\n/*\n // BFS\n Queue<BDNode> queue = new LinkedList<>();\n queue.offer(a);\n\n while(!queue.isEmpty()) {\n BDNode n = queue.poll();\n n.visit();\n System.out.println(n); // 찾는 여정 출력\n\n if(n.equals(target)) {\n System.out.println(\"BFS Found! \" + n);\n break;\n }\n\n for (BDNode l : n.links) {\n if(l.isVisited()) continue;\n if (queue.contains(l)) continue;\n queue.offer(l);\n }\n\n // 위랑 같은 표현\n// n.links.stream()\n// .filter(l -> !queue.contains(l))\n// .forEach(queue::offer);\n }\n*/\n\n // DFS\n Stack<BDNode> stack = new Stack<>();\n stack.push(a);\n\n while(!stack.isEmpty()) {\n BDNode n = stack.pop();\n n.visit();\n System.out.println(n); // 찾는 여정 출력\n\n if (n.equals(target)) {\n System.out.println(\"DFS Found! \" + n);\n break;\n }\n\n for (BDNode l : n.links) {\n if (l.isVisited()) continue;\n if (stack.contains(l)) continue;\n\n stack.push(l);\n }\n }\n\n\n }",
"public List<Graph> search() {\n\n long start = System.currentTimeMillis();\n TetradLogger.getInstance().log(\"info\", \"Starting ION Search.\");\n logGraphs(\"\\nInitial Pags: \", this.input);\n TetradLogger.getInstance().log(\"info\", \"Transfering local information.\");\n long steps = System.currentTimeMillis();\n\n /*\n * Step 1 - Create the empty graph\n */\n List<Node> varNodes = new ArrayList<>();\n for (String varName : variables) {\n varNodes.add(new GraphNode(varName));\n }\n Graph graph = new EdgeListGraph(varNodes);\n\n /*\n * Step 2 - Transfer local information from the PAGs (adjacencies\n * and edge orientations)\n */\n // transfers edges from each graph and finds definite noncolliders\n transferLocal(graph);\n // adds edges for variables never jointly measured\n for (NodePair pair : nonIntersection(graph)) {\n graph.addEdge(new Edge(pair.getFirst(), pair.getSecond(), Endpoint.CIRCLE, Endpoint.CIRCLE));\n }\n TetradLogger.getInstance().log(\"info\", \"Steps 1-2: \" + (System.currentTimeMillis() - steps) / 1000. + \"s\");\n System.out.println(\"step2\");\n System.out.println(graph);\n\n /*\n * Step 3\n *\n * Branch and prune step that blocks problematic undirectedPaths, possibly d-connecting undirectedPaths\n */\n steps = System.currentTimeMillis();\n Queue<Graph> searchPags = new LinkedList<>();\n // place graph constructed in step 2 into the queue\n searchPags.offer(graph);\n // get d-separations and d-connections\n List<Set<IonIndependenceFacts>> sepAndAssoc = findSepAndAssoc(graph);\n this.separations = sepAndAssoc.get(0);\n this.associations = sepAndAssoc.get(1);\n Map<Collection<Node>, List<PossibleDConnectingPath>> paths;\n// Queue<Graph> step3PagsSet = new LinkedList<Graph>();\n HashSet<Graph> step3PagsSet = new HashSet<>();\n Set<Graph> reject = new HashSet<>();\n // if no d-separations, nothing left to search\n if (separations.isEmpty()) {\n // makes orientations preventing definite noncolliders from becoming colliders\n // do final orientations\n// doFinalOrientation(graph);\n step3PagsSet.add(graph);\n }\n // sets length to iterate once if search over path lengths not enabled, otherwise set to 2\n int numNodes = graph.getNumNodes();\n int pl = numNodes - 1;\n if (pathLengthSearch) {\n pl = 2;\n }\n // iterates over path length, then adjacencies\n for (int l = pl; l < numNodes; l++) {\n if (pathLengthSearch) {\n TetradLogger.getInstance().log(\"info\", \"Braching over path lengths: \" + l + \" of \" + (numNodes - 1));\n }\n int seps = separations.size();\n int currentSep = 1;\n int numAdjacencies = separations.size();\n for (IonIndependenceFacts fact : separations) {\n if (adjacencySearch) {\n TetradLogger.getInstance().log(\"info\", \"Braching over path nonadjacencies: \" + currentSep + \" of \" + numAdjacencies);\n }\n seps--;\n // uses two queues to keep up with which PAGs are being iterated and which have been\n // accepted to be iterated over in the next iteration of the above for loop\n searchPags.addAll(step3PagsSet);\n recGraphs.add(searchPags.size());\n step3PagsSet.clear();\n while (!searchPags.isEmpty()) {\n System.out.println(\"ION Step 3 size: \" + searchPags.size());\n double currentUsage = Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory();\n if (currentUsage > maxMemory) maxMemory = currentUsage;\n // deques first PAG from searchPags\n Graph pag = searchPags.poll();\n // Part 3.a - finds possibly d-connecting undirectedPaths between each pair of nodes\n // known to be d-separated\n List<PossibleDConnectingPath> dConnections = new ArrayList<>();\n // checks to see if looping over adjacencies\n if (adjacencySearch) {\n for (Collection<Node> conditions : fact.getZ()) {\n // checks to see if looping over path lengths\n if (pathLengthSearch) {\n dConnections.addAll(PossibleDConnectingPath.findDConnectingPathsOfLength\n (pag, fact.getX(), fact.getY(), conditions, l));\n } else {\n dConnections.addAll(PossibleDConnectingPath.findDConnectingPaths\n (pag, fact.getX(), fact.getY(), conditions));\n }\n }\n } else {\n for (IonIndependenceFacts allfact : separations) {\n for (Collection<Node> conditions : allfact.getZ()) {\n // checks to see if looping over path lengths\n if (pathLengthSearch) {\n dConnections.addAll(PossibleDConnectingPath.findDConnectingPathsOfLength\n (pag, allfact.getX(), allfact.getY(), conditions, l));\n } else {\n dConnections.addAll(PossibleDConnectingPath.findDConnectingPaths\n (pag, allfact.getX(), allfact.getY(), conditions));\n }\n }\n }\n }\n // accept PAG go to next PAG if no possibly d-connecting undirectedPaths\n if (dConnections.isEmpty()) {\n// doFinalOrientation(pag);\n// Graph p = screenForKnowledge(pag);\n// if (p != null) step3PagsSet.add(p);\n step3PagsSet.add(pag);\n continue;\n }\n // maps conditioning sets to list of possibly d-connecting undirectedPaths\n paths = new HashMap<>();\n for (PossibleDConnectingPath path : dConnections) {\n List<PossibleDConnectingPath> p = paths.get(path.getConditions());\n if (p == null) {\n p = new LinkedList<>();\n }\n p.add(path);\n paths.put(path.getConditions(), p);\n }\n // Part 3.b - finds minimal graphical changes to block possibly d-connecting undirectedPaths\n List<Set<GraphChange>> possibleChanges = new ArrayList<>();\n for (Set<GraphChange> changes : findChanges(paths)) {\n Set<GraphChange> newChanges = new HashSet<>();\n for (GraphChange gc : changes) {\n boolean okay = true;\n for (Triple collider : gc.getColliders()) {\n\n if (pag.isUnderlineTriple(collider.getX(), collider.getY(), collider.getZ())) {\n okay = false;\n break;\n }\n\n }\n if (!okay) {\n continue;\n }\n for (Triple collider : gc.getNoncolliders()) {\n if (pag.isDefCollider(collider.getX(), collider.getY(), collider.getZ())) {\n okay = false;\n break;\n }\n }\n if (okay) {\n newChanges.add(gc);\n }\n }\n if (!newChanges.isEmpty()) {\n possibleChanges.add(newChanges);\n } else {\n possibleChanges.clear();\n break;\n }\n }\n float starthitset = System.currentTimeMillis();\n Collection<GraphChange> hittingSets = IonHittingSet.findHittingSet(possibleChanges);\n recHitTimes.add((System.currentTimeMillis() - starthitset) / 1000.);\n // Part 3.c - checks the newly constructed graphs from 3.b and rejects those that\n // cycles or produce independencies known not to occur from the input PAGs or\n // include undirectedPaths from definite nonancestors\n for (GraphChange gc : hittingSets) {\n boolean badhittingset = false;\n for (Edge edge : gc.getRemoves()) {\n Node node1 = edge.getNode1();\n Node node2 = edge.getNode2();\n Set<Triple> triples = new HashSet<>();\n triples.addAll(gc.getColliders());\n triples.addAll(gc.getNoncolliders());\n if (triples.size() != (gc.getColliders().size() + gc.getNoncolliders().size())) {\n badhittingset = true;\n break;\n }\n for (Triple triple : triples) {\n if (node1.equals(triple.getY())) {\n if (node2.equals(triple.getX()) ||\n node2.equals(triple.getZ())) {\n badhittingset = true;\n break;\n }\n }\n if (node2.equals(triple.getY())) {\n if (node1.equals(triple.getX()) ||\n node1.equals(triple.getZ())) {\n badhittingset = true;\n break;\n }\n }\n }\n if (badhittingset) {\n break;\n }\n for (NodePair pair : gc.getOrients()) {\n if ((node1.equals(pair.getFirst()) && node2.equals(pair.getSecond())) ||\n (node2.equals(pair.getFirst()) && node1.equals(pair.getSecond()))) {\n badhittingset = true;\n break;\n }\n }\n if (badhittingset) {\n break;\n }\n }\n if (!badhittingset) {\n for (NodePair pair : gc.getOrients()) {\n for (Triple triple : gc.getNoncolliders()) {\n if (pair.getSecond().equals(triple.getY())) {\n if (pair.getFirst().equals(triple.getX()) &&\n pag.getEndpoint(triple.getZ(), triple.getY()).equals(Endpoint.ARROW)) {\n badhittingset = true;\n break;\n\n }\n if (pair.getFirst().equals(triple.getZ()) &&\n pag.getEndpoint(triple.getX(), triple.getY()).equals(Endpoint.ARROW)) {\n badhittingset = true;\n break;\n }\n }\n if (badhittingset) {\n break;\n }\n }\n if (badhittingset) {\n break;\n }\n }\n }\n if (badhittingset) {\n continue;\n }\n Graph changed = gc.applyTo(pag);\n // if graph change has already been rejected move on to next graph\n if (reject.contains(changed)) {\n continue;\n }\n // if graph change has already been accepted move on to next graph\n if (step3PagsSet.contains(changed)) {\n continue;\n }\n // reject if null, predicts false independencies or has cycle\n if (predictsFalseIndependence(associations, changed)\n || changed.existsDirectedCycle()) {\n reject.add(changed);\n }\n // makes orientations preventing definite noncolliders from becoming colliders\n // do final orientations\n// doFinalOrientation(changed);\n // now add graph to queue\n\n// Graph p = screenForKnowledge(changed);\n// if (p != null) step3PagsSet.add(p);\n step3PagsSet.add(changed);\n }\n }\n // exits loop if not looping over adjacencies\n if (!adjacencySearch) {\n break;\n }\n }\n }\n TetradLogger.getInstance().log(\"info\", \"Step 3: \" + (System.currentTimeMillis() - steps) / 1000. + \"s\");\n Queue<Graph> step3Pags = new LinkedList<>(step3PagsSet);\n\n /*\n * Step 4\n *\n * Finds redundant undirectedPaths and uses this information to expand the list\n * of possible graphs\n */\n steps = System.currentTimeMillis();\n Map<Edge, Boolean> necEdges;\n Set<Graph> outputPags = new HashSet<>();\n\n while (!step3Pags.isEmpty()) {\n Graph pag = step3Pags.poll();\n necEdges = new HashMap<>();\n // Step 4.a - if x and y are known to be unconditionally associated and there is\n // exactly one trek between them, mark each edge on that trek as necessary and\n // make the tiples on the trek definite noncolliders\n // initially mark each edge as not necessary\n for (Edge edge : pag.getEdges()) {\n necEdges.put(edge, false);\n }\n // look for unconditional associations\n for (IonIndependenceFacts fact : associations) {\n for (List<Node> nodes : fact.getZ()) {\n if (nodes.isEmpty()) {\n List<List<Node>> treks = treks(pag, fact.x, fact.y);\n if (treks.size() == 1) {\n List<Node> trek = treks.get(0);\n List<Triple> triples = new ArrayList<>();\n for (int i = 1; i < trek.size(); i++) {\n // marks each edge in trek as necessary\n necEdges.put(pag.getEdge(trek.get(i - 1), trek.get(i)), true);\n if (i == 1) {\n continue;\n }\n // makes each triple a noncollider\n pag.addUnderlineTriple(trek.get(i - 2), trek.get(i - 1), trek.get(i));\n }\n }\n // stop looping once the empty set is found\n break;\n }\n }\n }\n // Part 4.b - branches by generating graphs for every combination of removing\n // redundant undirectedPaths\n boolean elimTreks;\n // checks to see if removing redundant undirectedPaths eliminates every trek between\n // two variables known to be nconditionally assoicated\n List<Graph> possRemovePags = possRemove(pag, necEdges);\n double currentUsage = Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory();\n if (currentUsage > maxMemory) maxMemory = currentUsage;\n for (Graph newPag : possRemovePags) {\n elimTreks = false;\n // looks for unconditional associations\n for (IonIndependenceFacts fact : associations) {\n for (List<Node> nodes : fact.getZ()) {\n if (nodes.isEmpty()) {\n if (treks(newPag, fact.x, fact.y).isEmpty()) {\n elimTreks = true;\n }\n // stop looping once the empty set is found\n break;\n }\n }\n }\n // add new PAG to output unless a necessary trek has been eliminated\n if (!elimTreks) {\n outputPags.add(newPag);\n }\n }\n }\n outputPags = removeMoreSpecific(outputPags);\n// outputPags = applyKnowledge(outputPags);\n\n TetradLogger.getInstance().log(\"info\", \"Step 4: \" + (System.currentTimeMillis() - steps) / 1000. + \"s\");\n\n /*\n * Step 5\n *\n * Generate the Markov equivalence classes for graphs and accept only\n * those that do not predict false d-separations\n */\n steps = System.currentTimeMillis();\n Set<Graph> outputSet = new HashSet<>();\n for (Graph pag : outputPags) {\n Set<Triple> unshieldedPossibleColliders = new HashSet<>();\n for (Triple triple : getPossibleTriples(pag)) {\n if (!pag.isAdjacentTo(triple.getX(), triple.getZ())) {\n unshieldedPossibleColliders.add(triple);\n }\n }\n\n PowerSet<Triple> pset = new PowerSet<>(unshieldedPossibleColliders);\n for (Set<Triple> set : pset) {\n Graph newGraph = new EdgeListGraph(pag);\n for (Triple triple : set) {\n newGraph.setEndpoint(triple.getX(), triple.getY(), Endpoint.ARROW);\n newGraph.setEndpoint(triple.getZ(), triple.getY(), Endpoint.ARROW);\n }\n doFinalOrientation(newGraph);\n }\n for (Graph outputPag : finalResult) {\n if (!predictsFalseIndependence(associations, outputPag)) {\n Set<Triple> underlineTriples = new HashSet<>(outputPag.getUnderLines());\n for (Triple triple : underlineTriples) {\n outputPag.removeUnderlineTriple(triple.getX(), triple.getY(), triple.getZ());\n }\n outputSet.add(outputPag);\n }\n }\n }\n\n// outputSet = applyKnowledge(outputSet);\n outputSet = checkPaths(outputSet);\n\n output.addAll(outputSet);\n TetradLogger.getInstance().log(\"info\", \"Step 5: \" + (System.currentTimeMillis() - steps) / 1000. + \"s\");\n runtime = ((System.currentTimeMillis() - start) / 1000.);\n logGraphs(\"\\nReturning output (\" + output.size() + \" Graphs):\", output);\n double currentUsage = Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory();\n if (currentUsage > maxMemory) maxMemory = currentUsage;\n return output;\n }",
"public static void main(String args[]) {\n int V = 4;\n Graph g = new Graph(V);\n g.addEdge(0, 1);\n g.addEdge(0, 2);\n g.addEdge(1, 2);\n g.addEdge(2, 0);\n g.addEdge(2, 3);\n g.addEdge(3, 3);\n\n int src = 1;\n int dest = 3;\n boolean[] visited = new boolean[V];\n\n // To store the complete path between source and destination\n Stack<Integer> path1 = new Stack<>();\n\n if (hasPathDFS(g, src, dest, visited, path1)) {\n System.out.println(\"There is a path from \" + src + \" to \" + dest);\n System.out.println(\"The complete path is \" + path1);\n } else System.out.println(\"There is no path from \" + src + \" to \" + dest);\n\n src = 3;\n dest = 1;\n // To store the complete path between source and destination\n Stack<Integer> path2 = new Stack<>();\n\n if (hasPathDFS(g, src, dest, visited, path2)) System.out.println(\"There is a path from \" + src + \" to \" + dest);\n else System.out.println(\"There is no path from \" + src + \" to \" + dest);\n\n // total number of nodes in the graph (labeled from 0 to 7)\n int n = 8;\n\n // List of graph edges as per the above diagram\n Graph g2 = new Graph(n);\n /**\n * There is a path from 1 to 3\n * The complete path is [1, 2, 3]\n * There is no path from 3 to 1\n * There is a path from 0 to 7\n * The complete path is [0, 3, 4, 6, 7]\n */\n\n g2.addEdge(0, 3);\n g2.addEdge(1, 0);\n g2.addEdge(1, 2);\n g2.addEdge(1, 4);\n g2.addEdge(2, 7);\n g2.addEdge(3, 4);\n g2.addEdge(3, 5);\n g2.addEdge(4, 3);\n g2.addEdge(4, 6);\n g2.addEdge(5, 6);\n g2.addEdge(6, 7);\n\n // source and destination vertex\n src = 0;\n dest = 7;\n\n // To store the complete path between source and destination\n Stack<Integer> path = new Stack<>();\n boolean[] visited2 = new boolean[n];\n\n if (hasPathDFS(g2, src, dest, visited2, path)) {\n System.out.println(\"There is a path from \" + src + \" to \" + dest);\n System.out.println(\"The complete path is \" + path);\n } else System.out.println(\"There is no path from \" + src + \" to \" + dest);\n\n\n }",
"private void traverseHelper(Graph<VLabel, ELabel>.Vertex v) {\n PriorityQueue<Graph<VLabel, ELabel>.Vertex> fringe =\n new PriorityQueue<Graph<VLabel,\n ELabel>.Vertex>(_graph.vertexSize(), _comparator);\n fringe.add(v);\n while (fringe.size() > 0) {\n Graph<VLabel, ELabel>.Vertex curV = fringe.poll();\n try {\n if (!_marked.contains(curV)) {\n _marked.add(curV);\n visit(curV);\n for (Graph<VLabel, ELabel>.Edge e: _graph.outEdges(curV)) {\n if (!_marked.contains(e.getV(curV))) {\n preVisit(e, curV);\n fringe.add(e.getV(curV));\n }\n }\n }\n } catch (StopException e) {\n _finalVertex = curV;\n return;\n }\n }\n }",
"public boolean augmentedPath(){\n QueueMaxHeap<GraphNode> queue = new QueueMaxHeap<>();\n graphNode[0].visited = true;//this is so nodes are not chosen again\n queue.add(graphNode[0]);\n boolean check = false;\n while(!queue.isEmpty()){//goes through and grabs each node and visits that nodes successors, will stop when reaches T or no flow left in system from S to T\n GraphNode node = queue.get();\n for(int i = 0; i < node.succ.size(); i++){//this will get all the nodes successors\n GraphNode.EdgeInfo info = node.succ.get(i);\n int id = info.to;\n if(!graphNode[id].visited && graph.flow[info.from][info.to][1] != 0){//this part just make sure it hasn't been visited and that it still has flow\n graphNode[id].visited = true;\n graphNode[id].parent = info.from;\n queue.add(graphNode[id]);\n if(id == t){//breaks here because it has found the last node\n check = true;\n setNodesToUnvisited();\n break;\n }\n }\n }\n if(check){\n break;\n }\n }\n return queue.isEmpty();\n }",
"@Override\r\n\tpublic boolean BFS(E src) {\r\n\t\tif(containsVertex(src)) {\r\n\t\t\tVertex<E> s = vertices.get(src);\r\n\t\t\tlastSrc = s;\r\n\t\t\tvertices.forEach((E e, Vertex<E> u) -> {\r\n\t\t\t\tu.setColor(Color.WHITE);\r\n\t\t\t\tu.setDistance(Integer.MAX_VALUE);\r\n\t\t\t\tu.setPredecessor(null);\r\n\t\t\t});\r\n\t\t\ts.setColor(Color.GRAY);\r\n\t\t\ts.setDistance(0);\r\n\t\t\t//s.predecessor is already null so skip that step\r\n\t\t\tQueue<Vertex<E>> queue = new Queue<>();\r\n\t\t\tqueue.enqueue(s);\r\n\t\t\ttry {\r\n\t\t\t\twhile(!queue.isEmpty()) {\r\n\t\t\t\t\tVertex<E> u = queue.dequeue();\r\n\t\t\t\t\tArrayList<Edge<E>> adj = adjacencyLists.get(u.getElement());\r\n\t\t\t\t\tfor(Edge<E> ale: adj) {\r\n\t\t\t\t\t\tVertex<E> v = vertices.get(ale.getDst());\r\n\t\t\t\t\t\tif(v.getColor() == Color.WHITE) {\r\n\t\t\t\t\t\t\tv.setColor(Color.GRAY);\r\n\t\t\t\t\t\t\tv.setDistance(u.getDistance()+1);\r\n\t\t\t\t\t\t\tv.setPredecessor(u);\r\n\t\t\t\t\t\t\tqueue.enqueue(v);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tu.setColor(Color.BLACK);\r\n\t\t\t\t}\r\n\t\t\t} catch (Exception emptyQueueException) {\r\n\t\t\t\t//-_-\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"public void dfs (int start) {\n vertexList[start].wasVisited = true; // mark it\n print(start); stack.push(start);\n while (!stack.isEmpty()) {\n int b = getNextUnvisitedNeighbor(stack.peek());\n if (b==-1) stack.pop(); // no unvisited neighbor;\n else {\n vertexList[b].wasVisited = true;\n print(b); stack.push(b);\n }\n }\n // clear wasVisited marks\n }",
"void Graph::BFS(int s)\n{\n bool *visited = new bool[V];\n for(int i = 0; i < V; i++)\n visited[i] = false;\n \n // Create a queue for BFS\n list<int> queue;\n \n // Mark the current node as visited and enqueue it\n visited[s] = true;\n queue.push_back(s);\n \n // 'i' will be used to get all adjacent vertices of a vertex\n list<int>::iterator i;\n \n while(!queue.empty())\n {\n // Dequeue a vertex from queue and print it\n s = queue.front();\n cout << s << \" \";\n queue.pop_front();\n \n // Get all adjacent vertices of the dequeued vertex s\n // If a adjacent has not been visited, then mark it visited\n // and enqueue it\n for(i = adj[s].begin(); i != adj[s].end(); ++i)\n {\n if(!visited[*i])\n {\n visited[*i] = true;\n queue.push_back(*i);\n }\n }\n }",
"@Override\n List<NodeData> pathFind() throws NoPathException {\n System.out.println(\"Starting Scenic\");\n\n frontier.add(start);\n\n while(!frontier.isEmpty()) {\n StarNode current = frontier.getLast();\n frontier.removeLast(); // pop the priority queue\n if(current.getXCoord() == goal.getXCoord() && current.getYCoord() == goal.getYCoord()) {\n // If we are at the goal, we need to backtrack through the shortest path\n System.out.println(\"At target!\");\n finalList.add(current); // we have to add the goal to the path before we start backtracking\n while(!(current.getXCoord() == start.getXCoord() && current.getYCoord() == start.getYCoord())) {\n finalList.add(current.getPreviousNode());\n current = current.getPreviousNode();\n System.out.println(current.getNodeID());\n }\n return finalList;\n }\n else {\n // we need to get all the neighbor nodes, identify their costs, and put them into the queue\n LinkedList<StarNode> neighbors = current.getNeighbors();\n // we also need to remove the previous node from the list of neighbors because we do not want to backtrack\n neighbors.remove(current.getPreviousNode());\n\n for (StarNode newnode : neighbors) {\n int nodePlace = this.listContainsId(frontier, newnode);\n if(nodePlace > -1) {\n if (frontier.get(nodePlace).getF() > actionCost(newnode) + distanceToGo(newnode, goal)) {\n System.out.println(\"Here\");\n frontier.remove(frontier.get(nodePlace));\n newnode.setPreviousNode(current);\n frontier.add(newnode);\n newnode.setF(actionCost(newnode) + distanceToGo(newnode, goal));\n }\n }\n else {\n newnode.setPreviousNode(current);\n frontier.add(newnode);\n newnode.setF(actionCost(newnode) + distanceToGo(newnode, goal));\n }\n\n // This fixes the problem with infinitely looping elevators (I hope)\n if(current.getNodeType().equals(\"ELEV\") && newnode.getNodeType().equals(\"ELEV\")) {\n for (Iterator<StarNode> iterator = newnode.neighbors.iterator(); iterator.hasNext();) {\n StarNode newneighbor = iterator.next();\n if (newneighbor.getNodeType().equals(\"ELEV\")) {\n // Remove the current element from the iterator and the list.\n iterator.remove();\n }\n }\n }\n if(current.getNodeType().equals(\"STAI\") && newnode.getNodeType().equals(\"STAI\")) {\n for (Iterator<StarNode> iterator = newnode.neighbors.iterator(); iterator.hasNext();) {\n StarNode newneighbor = iterator.next();\n if (newneighbor.getNodeType().equals(\"STAI\")) {\n // Remove the current element from the iterator and the list.\n iterator.remove();\n }\n }\n }\n // this is where the node is put in the right place in the queue\n Collections.sort(frontier);\n }\n }\n }\n throw new NoPathException(start.getLongName(), goal.getLongName());\n }",
"private void reachable() {\r\n\r\n\t\tSortedSet<String> keys = new TreeSet<String>(vertexMap.keySet());\r\n\t\tIterator it = keys.iterator();\r\n\t\twhile (it.hasNext()) {\r\n\t\t\tVertex v = vertexMap.get(it.next());\r\n\t\t\tif (v.isStatus()) {\r\n\t\t\t\tSystem.out.println(v.getName());\r\n\t\t\t\tbfs(v);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"private void DFS(Vertex start, Set<Vertex> visited, Stack<Vertex> stack) {\r\n\t\t// if(visited.contains(start)) return;\r\n\r\n\t\t// Mark the current node as visited and push it\r\n\t\tvisited.add(start);\r\n\t\tstack.push(start);\r\n\r\n\t\tVertex currentNode;\r\n\t\tSet<Vertex> neighbors;\r\n\r\n\t\twhile (stack.size() > 0) {\r\n\t\t\t// Pop a vertex from stack and print it\r\n\t\t\tcurrentNode = stack.pop();\r\n\r\n\t\t\tSystem.out.print(currentNode + \" \");\r\n\r\n\t\t\t// Get all adjacent vertices of the dequeued vertex s\r\n\t\t\t// If a adjacent has not been visited, then mark it\r\n\t\t\t// visited and enqueue it\r\n\t\t\tneighbors = currentNode.getNeighbors();\r\n\r\n\t\t\tfor (Vertex n : neighbors) {\r\n\t\t\t\tif (!visited.contains(n)) {\r\n\t\t\t\t\tvisited.add(n);\r\n\t\t\t\t\tstack.push(n);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"private void BFS() {\n\n int fruitIndex = vertices.size()-1;\n Queue<GraphNode> bfsQueue = new LinkedList<>();\n bfsQueue.add(vertices.get(0));\n while (!bfsQueue.isEmpty()) {\n GraphNode pollNode = bfsQueue.poll();\n pollNode.setSeen(true);\n for (GraphNode node : vertices) {\n if (node.isSeen()) {\n continue;\n } else if (node.getID() == pollNode.getID()) {\n continue;\n } else if (!los.isIntersects(pollNode.getPoint(), node.getPoint())) {\n pollNode.getNeigbours().add(node);\n if (node.getID() != fruitIndex) {\n bfsQueue.add(node);\n node.setSeen(true);\n }\n }\n }\n }\n }",
"public void bft() {\r\n\t\tHashMap<String, Boolean> processed = new HashMap<>();\r\n\t\tLinkedList<Pair> queue = new LinkedList<>();\r\n\r\n\t\tArrayList<String> vnames = new ArrayList<>(vces.keySet());\r\n\t\tfor (String vname : vnames) {\r\n\t\t\tif (processed.containsKey(vname)) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tPair rootpair = new Pair(vname, vname);\r\n\t\t\tqueue.addLast(rootpair);\r\n\t\t\twhile (queue.size() != 0) {\r\n\t\t\t\t// 1. removeFirst\r\n\t\t\t\tPair rp = queue.removeFirst();\r\n\r\n\t\t\t\t// 2. check if processed, mark if not\r\n\t\t\t\tif (processed.containsKey(rp.vname)) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tprocessed.put(rp.vname, true);\r\n\r\n\t\t\t\t// 3. Check, if an edge is found\r\n\t\t\t\tSystem.out.println(rp.vname + \" via \" + rp.psf);\r\n\r\n\t\t\t\t// 4. Add the unprocessed nbrs back\r\n\t\t\t\tArrayList<String> nbrnames = new ArrayList<>(rp.vtx.nbrs.keySet());\r\n\t\t\t\tfor (String nbrname : nbrnames) {\r\n\t\t\t\t\tif (!processed.containsKey(nbrname)) {\r\n\t\t\t\t\t\tPair np = new Pair(nbrname, rp.psf + nbrname);\r\n\t\t\t\t\t\tqueue.addLast(np);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"@Override\r\n\tpublic void DFS(E src) {\r\n\t\tif(containsVertex(src)) {\r\n\t\t\tvertices.forEach((E e, Vertex<E> u) -> {\r\n\t\t\t\tu.setDiscovered(0);\r\n\t\t\t\tu.setFinished(0);\r\n\t\t\t\tu.setColor(Color.WHITE);\r\n\t\t\t\tu.setPredecessor(null);\r\n\t\t\t});\r\n\t\t\tDFStime = 1;\r\n\t\t\tVertex<E> s = vertices.get(src);\r\n\t\t\ts.setColor(Color.GRAY);\r\n\t\t\ts.setDiscovered(DFStime);\r\n\t\t\t//s.predecessor is already null so skip that step\r\n\t\t\tStack<Vertex<E>> stack = new Stack<>();\r\n\t\t\tstack.push(s);\r\n\t\t\twhile(!stack.isEmpty()) {\r\n\t\t\t\tVertex<E> u = stack.pop();\r\n\t\t\t\tArrayList<Edge<E>> adj = adjacencyLists.get(u.getElement());\r\n\t\t\t\tfor(Edge<E> ale: adj) {\r\n\t\t\t\t\tVertex<E> v = vertices.get(ale.getDst());\r\n\t\t\t\t\tif(v.getColor() == Color.WHITE) {\r\n\t\t\t\t\t\tDFStime++;\r\n\t\t\t\t\t\tv.setColor(Color.GRAY);\r\n\t\t\t\t\t\tv.setDiscovered(DFStime);\r\n\t\t\t\t\t\tv.setPredecessor(u);\r\n\t\t\t\t\t\tstack.push(v);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tu.setColor(Color.BLACK);\r\n\t\t\t\tDFStime++;\r\n\t\t\t\tu.setFinished(DFStime);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"private void dfsVisit(Node node) {\n\t\tStack<Node>stack = new Stack<>();\r\n\t\tstack.push(node); //add source node to queue\r\n\t\twhile(!stack.isEmpty()) {\r\n\t\t\tNode presentNode = stack.pop();\r\n\t\t\tpresentNode.setVisited(true);\r\n\t\t\tSystem.out.print(presentNode.getName()+\" \");\r\n\t\t\tfor(Node neighbor: presentNode.getNeighbors()) { //for each neighbor of present node\r\n\t\t\t\tif(!neighbor.isVisited()) { //if neighbor is not visited then add it to queue\r\n\t\t\t\t\tstack.push(neighbor);\r\n\t\t\t\t\tneighbor.setVisited(true);\r\n\t\t\t\t}\r\n\t\t\t}//end of for loop\r\n\t\t}//end of while loop\r\n\t\t\r\n\t}",
"@Override\n\t\t\tprotected Void doInBackground() throws Exception {\n\t\t\t\tif (!verifyStartEndVerticesExist(true, false)) {\n\t\t\t\t\tsetRunning(false);\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Queue\n\t\t\t\tQueue<Vertex> q = new LinkedList<Vertex>();\n\t\t\t\t\n\t\t\t\t// set start vertex as visited\n\t\t\t\tpanel.getStartVertex().setVisited(true);\n\t\t\t\tq.add(panel.getStartVertex());\n\t\t\t\twhile (!q.isEmpty()) {\n\t\t\t\t\tVertex v = q.remove();\n\t\t\t\t\tv.setSelected(true);\n\t\t\t\t\tpublish();\n\t\t\t\t\tThread.sleep(panel.getCurrentDelay());\n\t\t\t\t\tfor (Vertex vertex : getNeighbors(v)) {\n\t\t\t\t\t\tvertex.setHighlighted();\n\t\t\t\t\t\tpublish();\n\t\t\t\t\t\tThread.sleep(panel.getCurrentDelay());\n\t\t\t\t\t\tif (!vertex.isVisited()) {\n\t\t\t\t\t\t\tvertex.setVisited(true);\n\t\t\t\t\t\t\tvertex.setParent(v);\n\t\t\t\t\t\t\tq.add(vertex);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tv.setSelected(false);\n\t\t\t\t\tv.setHighlighted();\n\t\t\t\t\tpublish();\n\t\t\t\t\tThread.sleep(panel.getCurrentDelay());\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"BFS Finished!\");\n\t\t\t\tpublish();\n\t\t\t\tsetRunning(false);\n\t\t\t\treturn null;\n\t\t\t}",
"public void breadthFirstTraverse() {\n\t\t// track whether vertex was visited\n\t\tHashMap<Integer, Boolean> visited = buildVisited();\n\t\t// store neighbors\n\t\tQueue<Integer> queue = new LinkedList<Integer>();\n\n\t\t// arbitrarily add first element\n\t\tInteger current = (Integer) edges.keySet().toArray()[0];\n\t\tqueue.add(current);\n\n\t\twhile (queue.peek() != null) {\n\n\t\t\tcurrent = queue.remove();\n\t\t\tSystem.out.println(\"current: \" + current);\n\t\t\tvisited.put(current, true);\n\n\t\t\tfor (Integer neighbor: edges.get(current)) {\n\t\t\t\tif (!visited.get(neighbor)) {\n\t\t\t\t\tqueue.add(neighbor);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"void topologicalSort(){ \n Stack<Integer> stack = new Stack<Integer>(); \n \n // Mark all the vertices as not visited \n boolean visited[] = new boolean[V]; \n for (int i = 0; i < V; i++) \n visited[i] = false; \n \n // Call the recursive helper function to store Topological Sort starting from all vertices one by one \n for (int i = 0; i < V; i++) \n if (visited[i] == false) \n topologicalSortUtil(i, visited, stack); \n \n // Print contents of stack \n while (stack.empty()==false) \n System.out.print(stack.pop() + \" \"); \n }",
"void DFS(int head) {\n //visited boolean array maintained to keep track of visited nodes and to avoid infinite looping\n boolean visited[] = new boolean[V+1];\n if(visited[head] == false)\n DFS(head,visited);\n\n System.out.println(V-connected);\n }",
"public void breadthFirstSearch(int vertexIndex) {\n Queue<Integer> queue = new LinkedList<Integer>();\n vertexList[vertexIndex].wasVisited = true;\n displayVertex(vertexIndex);\n int unvisitedIndex;\n do {\n\n do {\n unvisitedIndex = getAdjacentUnvisitedVertexIndex(vertexIndex);\n if(unvisitedIndex != -1) {\n vertexList[unvisitedIndex].wasVisited = true;\n displayVertex(unvisitedIndex);\n queue.add(unvisitedIndex);\n\n }\n } while(unvisitedIndex != -1);\n if(!queue.isEmpty()) {\n vertexIndex = queue.remove();\n\n }\n\n } while(!queue.isEmpty());\n\n for (int i = 0; i < vertexCount; i++) {\n vertexList[i].wasVisited = false;\n\n }\n }",
"public void dfs() {\n\t\tfor (Vertice v : vertices) {\n\t\t\tv.setVisited(false);\n\t\t}\n\t\tfor (Vertice v : vertices) {\n\t\t\tif (!v.getVisited()) {\n\t\t\t\tVisitar(v, -1);\n\t\t\t}\n\t\t}\n\t}",
"private void DFS(Vertex x) {\r\n\t\tseen[vertices.indexOf(x)] = true;\r\n\t\tSystem.out.print(x.label + \" \");\r\n\t\tfor (int i = 0; i < x.outList.size(); i++) {\r\n\t\t\tif (!seen[vertices.indexOf(x.outList.get(i).vertex)]) {\r\n\t\t\t\tDFS(x);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public static boolean Util(Graph<V, DefaultEdge> g, ArrayList<V> set, int colors, HashMap<String, Integer> coloring, int i, ArrayList<arc> arcs, Queue<arc> agenda)\n {\n /*if (i == set.size())\n {\n System.out.println(\"reached max size\");\n return true;\n }*/\n if (set.isEmpty())\n {\n System.out.println(\"Set empty\");\n return true;\n }\n //V currentVertex = set.get(i);\n\n /*System.out.println(\"vertices and mrv:\");\n V start = g.vertexSet().stream().filter(V -> V.getID().equals(\"0\")).findAny().orElse(null);\n Iterator<V> iterator = new DepthFirstIterator<>(g, start);\n while (iterator.hasNext()) {\n V v = iterator.next();\n System.out.println(\"vertex \" + v.getID() + \" has mrv of \" + v.mrv);\n }*/\n\n // Find vertex with mrv\n V currentVertex;\n int index = -1;\n int mrv = colors + 10;\n for (int it = 0; it < set.size(); it++)\n {\n if (set.get(it).mrv < mrv)\n {\n mrv = set.get(it).mrv;\n index = it;\n }\n }\n currentVertex = set.remove(index);\n\n //System.out.println(\"Got vertex: \" + currentVertex.getID());\n\n\n // Try to assign that vertex a color\n for (int c = 0; c < colors; c++)\n {\n currentVertex.color = c;\n if (verifyColor(g, currentVertex))\n {\n\n // We can assign color c to vertex v\n // See if AC3 is satisfied\n /*currentVertex.domain.clear();\n currentVertex.domain.add(c);*/\n if (!agenda.isEmpty()) numAgenda++;\n while(!agenda.isEmpty())\n {\n arc temp = agenda.remove();\n\n // Make sure there exists v1, v2, in V1, V2, such that v1 != v2\n V v1 = g.vertexSet().stream().filter(V -> V.getID().equals(temp.x)).findAny().orElse(null);\n V v2 = g.vertexSet().stream().filter(V -> V.getID().equals(temp.y)).findAny().orElse(null);\n\n\n\n // No solution exists in this branch if a domain is empty\n //if ((v1.domain.isEmpty()) || (v2.domain.isEmpty())) return false;\n\n if (v2.color == -1) continue;\n else\n {\n Boolean[] toRemove = new Boolean[colors];\n Boolean domainChanged = false;\n for (Integer it : v1.domain)\n {\n if (it == v2.color)\n {\n toRemove[it] = true;\n }\n }\n for (int j = 0; j < toRemove.length; j++)\n {\n if ((toRemove[j] != null))\n {\n v1.domain.remove(j);\n domainChanged = true;\n }\n }\n // Need to check constraints with v1 on the right hand side\n if (domainChanged)\n {\n for (arc it : arcs)\n {\n // Add arc back to agenda to check constraints again\n if (it.y.equals(v1.getID()))\n {\n agenda.add(it);\n }\n }\n }\n }\n if ((v1.domain.isEmpty()) || (v2.domain.isEmpty()))\n {\n System.out.println(\"returning gfalse here\");\n return false;\n }\n }\n\n // Reset agenda to check arc consistency on next iteration\n for (int j = 0; j < arcs.size(); j++)\n {\n agenda.add(arcs.get(i));\n }\n\n\n //System.out.println(\"Checking if vertex \" + currentVertex.getID() + \" can be assigned color \" + c);\n coloring.put(currentVertex.getID(), c);\n updateMRV(g, currentVertex);\n if (Util(g, set, colors, coloring, i + 1, arcs, agenda))\n {\n\n return true;\n }\n\n //System.out.println(\"Assigning vertex \" + currentVertex.getID() + \" to color \" + currentVertex.color + \" did not work\");\n coloring.remove(currentVertex.getID());\n currentVertex.color = -1;\n }\n }\n return false;\n }",
"void DFS() {\n \t\n \t// Mark all the vertices as not visited(set as false by default in java) \n \tboolean visited[] = new boolean[V];\n \t\n \t// Call the recursive helper function to print DFS traversal \n // starting from all vertices one by one \n \tfor (int i=0; i<V; i++) { \n \t\t if (visited[i] == false)\n \t\t\t DFSUtil(i, visited);\n \t}\n }",
"public void depthFirstSearch(Node vertex){\n vertex.visited = true;\n if(vertex.row == row_size-1 && vertex.col == col_size-1){\n while(!dfs_stack.isEmpty()){\n exitPath +=dfs_stack.peek(); \n dfs_stack.pop();\n } \n }\n if(vertex.north!=null && vertex.north.visited==false){\n dfs_stack.push(\"N\");\n vertex.depthFirstSearch(vertex.north);\n }\n if(vertex.south!=null && vertex.south.visited==false){\n dfs_stack.push(\"S\");\n vertex.depthFirstSearch(vertex.south);\n }\n if(vertex.west !=null && vertex.west.visited ==false){\n dfs_stack.push(\"W\");\n vertex.depthFirstSearch(vertex.west);\n }\n if(vertex.east !=null && vertex.east.visited==false){\n dfs_stack.push(\"E\");\n vertex.depthFirstSearch(vertex.east);\n }\n if (!dfs_stack.isEmpty()){\n dfs_stack.pop();\n }\n return;\n }",
"private static void breadthFirstSearch(int source, ArrayList<ArrayList<Integer>> nodes) {\n\t\tArrayList<ArrayList<Integer>> neighbours = nodes;\n\t\tQueue<Integer> queue= new LinkedList<Integer>();\n\t\t\n\t\tboolean[] visited = new boolean[nodes.size()];\n\t\t\n\t\tqueue.add(source);\n\t\tvisited[source]=true;\n\t\t\n\t\twhile(!queue.isEmpty()) {\n\t\t\tint k =queue.remove();\n\t\t\tSystem.out.println(k);\n\t\t\tfor(int p : nodes.get(k)) {\n\t\t\t\tif(!visited[p]) {\n\t\t\t\t\tqueue.add(p);\n\t\t\t\t\tvisited[p]=true;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t}",
"public void run() {\n\t\tArrays.fill(label, NOT_AN_INDEX);\r\n\t\t\r\n\t\t// while there is a u in V with considered[u]=0 and mate[u]=0 do\r\n\t\tstage: for (int u = 0; u < gOrig.numVertices(); u++ ) {\r\n\t\t\t// if(mate[u] == NOT_AN_INDEX){\r\n\t\t\tif (gOrig.vertex(u) == null) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tif (matching.matches() == gOrig.numVertices() / 2) {\r\n\t\t\t\t// we are done\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tSystem.out.print(String.format(\"considering vertex u%d\\n\", u));\r\n\t\t\tif ( ! matching.isMatched(u)) {\r\n\t\t\t\t\r\n\t\t\t\t// considered[u]=1,A={empty}\r\n\t\t\t\t// A = new WeightedDigraph(gOrig.numVertices()/2);\r\n\t\t\t\tA.clear();\r\n\t\t\t\t\r\n\t\t\t\t// forall v in V do exposed[v]=0\r\n\t\t\t\tArrays.fill(exposed, NOT_AN_INDEX);\r\n\t\t\t\t\r\n\t\t\t\t// Construct the auxiliary digraph\r\n\t\t\t\t\r\n\t\t\t\t// for all (v,w) in E do\r\n\t\t\t\tfor (int v = 0; v < gOrig.numVertices(); v++ ) {\r\n\t\t\t\t\tfor (Edge e : gOrig.eOuts(v)) {\r\n\t\t\t\t\t\tint w = e.right;\r\n\t\t\t\t\t\tassert e.left == v : \"vertex correspondence is wrong\";\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// if mate[w]=0 and w!=u then exposed[v]=w else if mate[w] !=v,0 then A=union(A,{v,mate[w]})\r\n\t\t\t\t\t\t// if(mate[w] == NOT_AN_INDEX && w != u){\r\n\t\t\t\t\t\t// exposed[v] = w;\r\n\t\t\t\t\t\t// }else if(mate[w] != v && mate[w] != NOT_AN_INDEX){\r\n\t\t\t\t\t\t// A.addEdge(new Edge(v,mate[w]));\r\n\t\t\t\t\t\t// }\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif ( ! matching.isMatched(w) && w != u) {\r\n\t\t\t\t\t\t\t// DEBUG(String.format(\"adding (%d,%d) to exposed\\n\", v, w));\r\n\t\t\t\t\t\t\tif (exposed[v] == NOT_AN_INDEX) {\r\n\t\t\t\t\t\t\t\texposed[v] = w;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} else if (matching.mate(w) != v && matching.isMatched(w)) {\r\n\t\t\t\t\t\t\t// DEBUG(String.format(\"adding (%d,%d) to A\\n\", v, matching.mate(w)));\r\n\t\t\t\t\t\t\tA.add(new Edge(v, matching.mate(w)));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tDEBUG(String.format(\"Exposed vertices={%s}\\n\", printExposed()));\r\n\t\t\t\tif (exposed().size() == 0) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// forall v in V do seen[v]=0\r\n\t\t\t\tArrays.fill(seen, false);\r\n\t\t\t\t\r\n\t\t\t\t// Q={u}; label[u]=0; if exposed[u]!=0 then augment(u), goto stage;\r\n\t\t\t\tQ.clear();\r\n\t\t\t\tQ.add(u);\r\n\t\t\t\tArrays.fill(label, NOT_AN_INDEX);// unsure whether it was meant to clear label or just unset label[u] OLD_CODE=label[u] = NOT_AN_INDEX;\r\n\t\t\t\tif (isExposed(u)) {\r\n\t\t\t\t\taugment(u);\r\n\t\t\t\t\tDEBUG(String.format(\"new matching %s\\n\", matching.toString()));\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\t// need to figure out how to handle blossom()\r\n\t\t\t\t\r\n\t\t\t\t// while Q != {empty} do\r\n\t\t\t\twhile ( ! Q.isEmpty()) {\r\n\t\t\t\t\tint v = Q.pop();\r\n\t\t\t\t\t\r\n\t\t\t\t\t// forall unlabeled nodes w in V such that (v,w) in A\r\n\t\t\t\t\tfor (Edge e : A) {\r\n\t\t\t\t\t\tint w = e.left;\r\n\t\t\t\t\t\tif (e.right == v && label[w] == NOT_AN_INDEX && label[v] != w) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t// Q=union(Q,w), label[w]=v\r\n\t\t\t\t\t\t\tif ( ! Q.contains(w)) {\r\n\t\t\t\t\t\t\t\tQ.offer(w);\r\n\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\tcontinue; ///THIS CONTINUE WAS ADDED LATE AT NIGHT\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tlabel[w] = v;\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t// seen[mate[w]] = 1;\r\n\t\t\t\t\t\t\ttry{\r\n\t\t\t\t\t\t\t\tint mate = findMate(w);\r\n\t\t\t\t\t\t\t\tseen[mate] = true;\r\n\t\t\t\t\t\t\t}catch(Exception err){\r\n\t\t\t\t\t\t\t\tDEBUG(String.format(\"error marking mate of %d as seen, mate not found\\n\", w));\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t// if exposed[w]!=0 then augment(w) goto stage;\r\n\t\t\t\t\t\t\tif (isExposed(w)) {\r\n\t\t\t\t\t\t\t\taugment(w);\r\n\t\t\t\t\t\t\t\tDEBUG(String.format(\"new matching %s\\n\", matching.toString()));\r\n\t\t\t\t\t\t\t\tcontinue stage;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t// if seen[w]=1 then blossom(w)\r\n\t\t\t\t\t\t\tif (seen[w]) {\r\n\t\t\t\t\t\t\t\tblossom(w);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// remove loops created by the blossoms\r\n\t\t\t\t\tremoveSelfLoops(A);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"static void bfs(int[][] G){\n\t\tQueue<Integer> q = new LinkedList<Integer>();\t\t\n\t\tfor (int ver_start = 0; ver_start < N; ver_start ++){\n\t\t\tif (visited[ver_start]) continue;\n\t\t\tq.add(ver_start);\n\t\t\tvisited[ver_start] = true;\n\n\t\t\twhile(!q.isEmpty()){\n\t\t\t\tint vertex = q.remove();\n\t\t\t\tSystem.out.print((vertex+1) + \" \");\n\t\t\t\tfor (int i=0; i<N; i++){\n\t\t\t\t\tif (G[vertex][i] == 1 && !visited[i]){\n\t\t\t\t\t\t// find neigbor of current vertex and not visited\n\t\t\t\t\t\t// add into the queue\n\t\t\t\t\t\tq.add(i);\n\t\t\t\t\t\tvisited[i] = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(\"--\");\t\t\t\n\t\t}\n\t}",
"@SuppressWarnings({\"rawtypes\", \"unchecked\", \"SuspiciousMethodCalls\"})\n private List getDepthFirstTraversal_iterative_usingStack_BigO_VPlusE() throws Exception {\n Map<Object, Boolean> visited = new LinkedHashMap<>();\n Stack watchStack = new Stack();\n\n V root = data.keySet().stream().findFirst().orElseThrow(() -> new Exception(\"Graph is Empty\"));\n watchStack.push(root);\n visited.put(root, true);\n\n while(!watchStack.isEmpty()) {\n Object currentVertex = watchStack.top();\n\n BinarySearchTree<E> edgeTree = data.getOrDefault(currentVertex, new BinarySearchTree<>());\n List<E> edges = edgeTree.getTreeByInOrder_depthFirst();\n\n //Remove an item from the stack when there are no edges or all the edges are visited for that vertex\n if(edgeTree.isEmpty() || visited.keySet().containsAll(edges)) {\n watchStack.pop();\n } else {\n for(E edge : edges) {\n if(!visited.containsKey(edge)) {\n watchStack.push(edge);\n visited.put(edge, true);\n break;\n }\n }\n }\n }\n return new ArrayList<>(visited.keySet());\n }",
"private void checkTargetsReachable(){\n\t\tPathfinder pathfinder = new Pathfinder(collisionMatrix);\n\t\tLinkedList<Node> removeList = new LinkedList<Node>();\n\t\tboolean pathWasFound = false;\n\t\tLinkedList<Node> currentPath;\n\t\tLinkedList<Node> reversePath;\n\t\t\n\t\t//Go through all starting positions\n\t\tfor(LinkedList<Node> startList : targets){\n\t\t\tprogress += 8;\n\t\t\tsetProgress(progress);\n\t\t\tfor(Node startNode : startList){\n\t\t\t\t\n\t\t\t\tboolean outsideMap = (startNode.getCollisionXPos(scaleCollision) < 0 || startNode.getCollisionXPos(scaleCollision) >= (collisionMatrix.length-1) || startNode.getCollisionYPos(scaleCollision) < 0 || startNode.getCollisionYPos(scaleCollision) >= (collisionMatrix.length-1));\n\t\t\t\t\n\t\t\t\tpathWasFound = false;\n\t\t\t\t//Make sure that target is inside of map\n\t\t\t\tif(!outsideMap){\n\t\t\t\t\t//Check against all target positions\n\t\t\t\t\tfor(LinkedList<Node> targetList : targets){\n\t\t\t\t\t\tfor(Node targetNode : targetList){\n\t\t\t\t\t\t\t//Only check against targets that have not already been marked as unreachable\n\t\t\t\t\t\t\tboolean selfCheck = (targetNode.getXPos() != startNode.getXPos() || targetNode.getYPos() != startNode.getYPos());\n\t\t\t\t\t\t\tif(!removeList.contains(targetNode) && selfCheck){\n\t\t\t\t\t\t\t\t//Check if this path has already been checked\n\t\t\t\t\t\t\t\tif(!preCalculatedPaths.containsKey(startNode.toStringCollision(scaleCollision) + \"-\" + targetNode.toStringCollision(scaleCollision))){\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tcurrentPath = new LinkedList<Node>();\n\t\t\t\t\t\t\t\t\t//Check if a path can be found for this start and target node\n\t\t\t\t\t\t\t\t\tif(pathfinder.findPath(startNode.getCollisionXPos(scaleCollision), startNode.getCollisionYPos(scaleCollision), targetNode.getCollisionXPos(scaleCollision), targetNode.getCollisionYPos(scaleCollision), currentPath)){\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tif(Frame.USE_PRECALCULATED_PATHS)\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tpreCalculatedPaths.put(startNode.toStringCollision(scaleCollision) + \"-\" + targetNode.toStringCollision(scaleCollision), currentPath);\n\t\t\t\t\t\t\t\t\t\t\treversePath = new LinkedList<Node>();\n\t\t\t\t\t\t\t\t\t\t\treversePath.addAll(currentPath);\n\t\t\t\t\t\t\t\t\t\t\tCollections.reverse(reversePath);\n\t\t\t\t\t\t\t\t\t\t\treversePath.removeFirst();\n\t\t\t\t\t\t\t\t\t\t\treversePath.add(startNode);\n\t\t\t\t\t\t\t\t\t\t\tpreCalculatedPaths.put(targetNode.toStringCollision(scaleCollision) + \"-\" + startNode.toStringCollision(scaleCollision) ,reversePath);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tpathWasFound = true;\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\tpathWasFound = true;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//Remove nodes which we cannot find a path from\n\t\t\t\tif(!pathWasFound){\n\t\t\t\t\tremoveList.add(startNode);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Go through the remove list and remove unreachable nodes\n\t\tfor(Node node : removeList){\n\t\t\tfor(LinkedList<Node> startList : targets){\n\t\t\t\tstartList.remove(node);\n\t\t\t}\n\t\t}\n\t}",
"int BFS(int source,int sink) \n {\n\tint first=0, last=0; \n int[] queue=new int[V]; \n int[] mark = new int[V]; \n \n for (int i = 0; i < V; i++) {\n mark[i] = 0; // Mark all vertices as not visited \n minFlow[i] = 10000000;\n }\n\n queue[last++] = source; //enqueue source vertex\n mark[source] = 1; //mark source vertex as visited\n //BFS Loop\n while (first != last) { // While queue is not empty.\n int v = queue[first++];\n for (int u = 0; u < V; u++){\n if (mark[u] == 0 && resCap[v][u] > 0) {\n minFlow[u] = Math.min(minFlow[v],resCap[v][u]);\n parent[u] = v;\n mark[u] = 1;\n if (u == sink) //If we reach sink starting from source, then return 1\n return 1;\n queue[last++] = u;\n }\n }\n }\n return 0; //else return 0\n }",
"public void DFS() {\r\n\t\tSet<Vertex> visited = new HashSet<Vertex>();\r\n\r\n\t\t// Create a stack for DFS\r\n\t\tStack<Vertex> stack = new Stack<Vertex>();\r\n\r\n\t\tDFS(this.vertices[3], visited, stack); // DFS starting with 40\r\n\r\n\t\t// Call the helper function to print DFS traversal\r\n\t\t// starting from all vertices one by one\r\n\t\tfor (int i = 0; i < N; ++i)\r\n\t\t\tif (!visited.contains(this.vertices[i]))\r\n\t\t\t\tDFS(this.vertices[i], visited, stack);\r\n\t}",
"private int BFS() {\n adjList.cleanNodeFields();\n\n //Queue for storing current shortest path\n Queue<Node<Integer, Integer>> q = new LinkedList<>();\n\n //Set source node value to 0\n q.add(adjList.getNode(startNode));\n q.peek().key = 0;\n q.peek().d = 0;\n q.peek().visited = true;\n\n //Helper variables\n LinkedList<Pair<Node<Integer, Integer>, Integer>> neighbors;//Array of pairs <neighborKey, edgeWeight>\n Node<Integer, Integer> neighbor, u;\n long speed = (long) (cellSideLength * 1.20);\n\n while (!isCancelled() && q.size() != 0) {\n u = q.poll();\n\n //Marks node as checked\n checkedNodesGC.fillRect((u.value >> 16) * cellSideLength + 0.5f,\n (u.value & 0x0000FFFF) * cellSideLength + 0.5f,\n (int) cellSideLength - 1, (int) cellSideLength - 1);\n\n //endNode found\n if (u.value == endNode) {\n //Draws shortest path\n Node<Integer, Integer> current = u, prev = u;\n\n while ((current = current.prev) != null) {\n shortestPathGC.strokeLine((prev.value >> 16) * cellSideLength + cellSideLength / 2,\n (prev.value & 0x0000FFFF) * cellSideLength + cellSideLength / 2,\n (current.value >> 16) * cellSideLength + cellSideLength / 2,\n (current.value & 0x0000FFFF) * cellSideLength + cellSideLength / 2);\n prev = current;\n }\n return u.d;\n }\n\n //Wait after checking node\n try {\n Thread.sleep(speed);\n } catch (InterruptedException interrupted) {\n if (isCancelled())\n break;\n }\n\n //Checking Neighbors\n neighbors = adjList.getNeighbors(u.value);\n for (Pair<Node<Integer, Integer>, Integer> neighborKeyValuePair : neighbors) {\n neighbor = neighborKeyValuePair.getKey();\n //Relaxation step\n //Checks if neighbor hasn't been checked, if so the assign the shortest path\n if (!neighbor.visited) {\n //Adds checked neighbor to queue\n neighbor.key = u.d + 1;\n neighbor.d = u.d + 1; //Assign shorter path found to neighbor\n neighbor.prev = u;\n neighbor.visited = true;\n q.add(neighbor);\n }\n }\n }\n return Integer.MAX_VALUE;\n }",
"public void retrace(){\n\t\t//look at the sPath stack\n\t\tPoint temp = sPath.peek();\n\t\t// find neighbor with lowest score\n\t\tPoint lNeighbor = backtrack(temp);\n\t\t// coordinates of lNeighbor\n\t\tint x = (int) lNeighbor.getX();\n\t\tint y = (int) lNeighbor.getY();\n\t\t// score of neighbor\n\t\tint score = topology[x][y];\n\t\t// if there is no more neighbor then lNeighbor = temp\n\t\t// then we reach the Start then\n\t\twhile(score!=0){\n\t\t\t// push that neighbor on the stack\n\t\t\tsPath.push(lNeighbor);\n\t\t\t// update temp and lNeighbor\n\t\t\ttemp = sPath.peek();\n\t\t\tlNeighbor = backtrack(temp);\n\t\t\t// coordinates of lNeighbor\n\t\t\tx = (int) lNeighbor.getX();\n\t\t\ty = (int) lNeighbor.getY();\n\t\t\t// score of neighbor\n\t\t\tscore = topology[x][y];\n\t\t}\n\t\t// we have to do that until we see the start with score 0\n\t\t// the last lNeighbor is the S with score = 0, push it to the stack\n\t\tsPath.push(lNeighbor);\n\t\twhile(!sPath.isEmpty()){\n\t\t\tPoint track = sPath.pop();\n\t\t\tSystem.out.println(\"(\"+(int)track.getX()+\",\"+(int)track.getY()+\")\");\n\t\t}\n\t}",
"public static void main(String[] args) {\r\n \r\n Graph X=new Graph();\r\n \r\n X.GenerateGraph();\r\n \r\n \r\n X.DisplayGraph();\r\n // System.out.println(\"Printing Stack\");\r\n // X.DFS();\r\n \r\n // System.out.println(X.AdjList.get(3).neighbours);\r\n \r\n // ArrayList<Vertex> A=new ArrayList();\r\n \r\n X.BFS();\r\n \r\n X.TraceBack();\r\n }",
"public void computeAllPaths(String source)\r\n {\r\n Vertex sourceVertex = network_topology.get(source);\r\n Vertex u,v;\r\n double distuv;\r\n\r\n Queue<Vertex> vertexQueue = new PriorityQueue<Vertex>();\r\n \r\n \r\n // Switch between methods and decide what to do\r\n if(routing_method.equals(\"SHP\"))\r\n {\r\n // SHP, weight of each edge is 1\r\n sourceVertex.minDistance = 0;\r\n vertexQueue.add(sourceVertex);\r\n while(!vertexQueue.isEmpty())\r\n {\r\n u = vertexQueue.remove();\r\n for (String key : u.adjacentVertices.keySet())\r\n {\r\n v = network_topology.get(key);\r\n distuv = u.minDistance + 1;\r\n if(distuv < v.minDistance)\r\n {\r\n v.minDistance = distuv;\r\n v.previous = u;\r\n vertexQueue.add(v);\r\n }\r\n }\r\n \r\n }\r\n \r\n }\r\n \r\n else if (routing_method.equals(\"SDP\"))\r\n {\r\n // SDP, weight of each edge is it's propagation delay\r\n sourceVertex.minDistance = 0;\r\n vertexQueue.add(sourceVertex);\r\n while(!vertexQueue.isEmpty())\r\n {\r\n u = vertexQueue.remove();\r\n for (String key : u.adjacentVertices.keySet())\r\n {\r\n v = network_topology.get(key);\r\n distuv = u.minDistance + u.adjacentVertices.get(key).propDelay;\r\n if(distuv < v.minDistance)\r\n {\r\n v.minDistance = distuv;\r\n v.previous = u;\r\n vertexQueue.add(v);\r\n }\r\n } \r\n }\r\n }\r\n else if (routing_method.equals(\"LLP\"))\r\n {\r\n // LLP, weight each edge is activeCircuits/AvailableCircuits\r\n sourceVertex.minDistance = 0;\r\n vertexQueue.add(sourceVertex);\r\n while(!vertexQueue.isEmpty())\r\n {\r\n u = vertexQueue.remove();\r\n for (String key : u.adjacentVertices.keySet())\r\n {\r\n v = network_topology.get(key);\r\n distuv = Math.max(u.minDistance,u.adjacentGet(key).load());\r\n //System.out.println(u.adjacentGet(key).load());\r\n if(distuv < v.minDistance)\r\n {\r\n v.minDistance = distuv;\r\n v.previous = u;\r\n vertexQueue.add(v);\r\n }\r\n }\r\n }\r\n }\r\n }",
"private static void depthFirstSearch(Vertex v, ArrayList<Vertex> visitedArrayList, Graph graph){\n visitedArrayList.add(v);\n Iterator<Vertex> iter=graph.getNeighbors(v).iterator();\n while (iter.hasNext()){\n Vertex v1=iter.next();\n if(!visitedArrayList.contains(v1)){\n depthFirstSearch(v1,visitedArrayList,graph);\n }\n }\n for(Vertex v1 : graph.getNeighbors(v)){\n if(!visitedArrayList.contains(v1)){\n depthFirstSearch(v1,visitedArrayList,graph);\n }\n }\n }",
"private int searchNext(JmtCell prev) {\r\n \t\tRectangle boundspadre = GraphConstants.getBounds((prev).getAttributes()).getBounds();\r\n \t\tObject[] listEdges = null;\r\n \t\tGraphModel graphmodel = graph.getModel();\r\n \t\tList<Object> next = new ArrayList<Object>();\r\n \r\n \t\tif (flag1 == false && prev.seen == false) {\r\n \r\n \t\t\t// Rectangle bounds =\r\n \t\t\t// GraphConstants.getBounds(((JmtCell)prev).getAttributes()).getBounds();\r\n \t\t\tif (!flag2) {\r\n \t\t\t\tboundspadre.setLocation(x, y + ((e + 1) * (42 + heightMax)) - (int) (boundspadre.getHeight() / 2) + 30);\r\n \t\t\t} else {\r\n \t\t\t\tboundspadre.setLocation(x - (int) (boundspadre.getWidth() / 2), y + ((e + 1) * (42 + heightMax))\r\n \t\t\t\t\t\t- (int) (boundspadre.getHeight() / 2) + 30);\r\n \t\t\t}\r\n \r\n \t\t\tGraphConstants.setBounds(prev.getAttributes(), boundspadre);\r\n \t\t\tx = (int) boundspadre.getCenterX() + widthMax + 50;\r\n \t\t\tprev.seen = true;\r\n \t\t\tflag2 = true;\r\n \t\t}\r\n \r\n \t\t// inserisco tutti gli archi uscenti e entranti di min.get(j) in\r\n \t\t// listEdges\r\n \t\tlistEdges = DefaultGraphModel.getOutgoingEdges(graphmodel, prev);\r\n \t\tVector<Object> listEdgestmp = new Vector<Object>();\r\n \t\tfor (Object listEdge : listEdges) {\r\n \t\t\tJmtCell qq = (JmtCell) (graphmodel.getParent(graphmodel.getTarget(listEdge)));\r\n \t\t\tif (!(qq).seen) {\r\n \t\t\t\tlistEdgestmp.add(listEdge);\r\n \t\t\t}\r\n \t\t}\r\n \t\tlistEdges = listEdgestmp.toArray();\r\n \r\n \t\tint numTarget = listEdges.length;\r\n \t\tif (numTarget == 0) {\r\n \t\t\treturn 1;\r\n \t\t}\r\n \r\n \t\tfor (int k = 0; k < numTarget; k++) {\r\n \t\t\tnext.add((graphmodel.getParent(graphmodel.getTarget(listEdges[k]))));\r\n \t\t}\r\n \r\n \t\tint j = 1;\r\n \t\tif (inRepositionSons == false && ((JmtCell) next.get(0)).seen == false) {\r\n \t\t\tj = searchNext((JmtCell) next.get(0));\r\n \t\t} else if (inRepositionSons == true && ((JmtCell) next.get(0)).seen == false) {\r\n \r\n \t\t\tRectangle bounds = GraphConstants.getBounds(((JmtCell) next.get(0)).getAttributes()).getBounds();\r\n \t\t\tbounds.setLocation((int) (boundspadre.getCenterX()) + widthMax + 50 - (int) (bounds.getWidth() / 2), (int) boundspadre.getCenterY()\r\n \t\t\t\t\t- (int) (bounds.getHeight() / 2));\r\n \t\t\tGraphConstants.setBounds(((JmtCell) next.get(0)).getAttributes(), bounds);\r\n \r\n \t\t\t((JmtCell) next.get(0)).seen = true;\r\n \t\t\tj = searchNext((JmtCell) next.get(0));\r\n \t\t}\r\n \r\n \t\tif (numTarget > 0) {\r\n \t\t\tif (!flag) {\r\n \t\t\t\trepositionSons(prev, next, j - 1, 1);\r\n \t\t\t} else {\r\n \t\t\t\trepositionSons(prev, next, -1, 0);\r\n \t\t\t}\r\n \t\t\tflag = false;\r\n \t\t}\r\n \r\n \t\t(prev).sons = 0;\r\n \t\tfor (int w = 0; w < numTarget; w++) {\r\n \t\t\tprev.sons += ((JmtCell) next.get(w)).sons;\r\n \t\t}\r\n \r\n \t\treturn prev.sons;\r\n \t}",
"void findSearchOrder() {\n boolean filled = false;\n for(int node: queryGraphNodes.keySet()) {\n\n vertexClass vc = queryGraphNodes.get(node);\n searchOrderSeq.add(node);\n for(int edge: queryGraphNodes.get(node).edges.keySet()) {\n filled = calcOrdering(edge);\n if (filled)\n break;\n }\n if(searchOrderSeq.size() == queryGraphNodes.size())\n break;\n\n }\n\n }",
"public static void main(String[] args){\n Graph g = new Graph(13);\n //add vortexes and edges to construct the graph\n g.addEdge(0,1);\n g.addEdge(0,2);\n g.addEdge(0,6);\n g.addEdge(0,5);\n g.addEdge(6,4);\n g.addEdge(4,3);\n g.addEdge(4,5);\n g.addEdge(3,5);\n g.addEdge(7,8);\n g.addEdge(9,10);\n g.addEdge(9,11);\n g.addEdge(9,12);\n g.addEdge(11,12);\n\n //create a DepthFirstSearch object\n BreadthFirstSearch DFS = new BreadthFirstSearch(g,0);\n\n System.out.println(\"7 and 0 is connected: \"+ DFS.marked(7));\n System.out.println(\"10 and 0 is connected: \"+ DFS.marked(10));\n System.out.println(\"6 and 0 is connected: \"+ DFS.marked(6));\n System.out.println(\"4 and 0 is connected: \"+ DFS.marked(0));\n System.out.println(\"12 and 0 is connected: \"+ DFS.marked(12));\n\n System.out.println(DFS.count()+\" vortexes connect with the vortex 0.\");\n\n }",
"Bfs_search(int v) \r\n { \r\n V = v; \r\n \r\n adj = new LinkedList[v]; \r\n \r\n for (int i=0; i<v; ++i) \r\n adj[i] = new LinkedList(); \r\n }",
"public void depthFirstSearch() {\n List<Vertex> visited = new ArrayList<Vertex>();\r\n // start the recursive depth first search on the current vertex\r\n this.dfs(visited);\r\n }",
"public void iterativeDfs(Graph graph, int sourceVertex) {\n\n stack.addLast(sourceVertex);\n\n while (!stack.isEmpty()) {\n int vertex = stack.removeLast();\n\n if (!marked[vertex]) {\n sourceVertexCount++;\n marked[vertex] = true;\n\n for (int adjacentVertex : graph.adj(vertex)) {\n if (!marked[adjacentVertex]) {\n stack.addLast(adjacentVertex);\n }\n }\n }\n }\n }",
"static void dfs(int[][] G){\n\t\tStack<Integer> s = new Stack<Integer>();\n\t\tfor (int ver_start=0; ver_start<N; ver_start++){\n\t\t\tif (visited[ver_start]) continue;\n\t\t\ts.push(ver_start);\n\t\t\tvisited[ver_start] = true;\n\n\t\t\twhile(!s.isEmpty()){\n\t\t\t\tint vertex = s.pop();\n\t\t\t\tSystem.out.print((vertex+1) + \" \");\n\t\t\t\tfor (int i=0; i<N; i++){\n\t\t\t\t\tif (G[vertex][i] == 1 && !visited[i]){\n\t\t\t\t\t\t// find neigbor of current vertex and not visited\n\t\t\t\t\t\t// add into the stack\n\t\t\t\t\t\ts.push(i);\n\t\t\t\t\t\tvisited[i] = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tSystem.out.println();\n\t\t}\n\t}",
"void BFS(int s) {\n // Mark all the vertices as not visited(By default\n // set as false)\n boolean visited[] = new boolean[V];\n\n // Create a queue for BFS\n LinkedList<Integer> queue = new LinkedList<Integer>();\n\n // Mark the current node as visited and enqueue it\n visited [s] = true;\n queue.add(s);\n\n while (queue.size() != 0) {\n // Dequeue a vertex from queue and print it\n s = queue.poll();\n System.out.print(s + \" \");\n\n // Get all adjacent vertices of the dequeued vertex s\n // If a adjacent has not been visited, then mark it\n // visited and enqueue it\n Iterator<Integer> i = adj [s].listIterator();\n while (i.hasNext()) {\n int n = i.next();\n if (!visited [n]) {\n visited [n] = true;\n queue.add(n);\n }\n }\n }\n }",
"public void dfsPrint(Node start){\n Stack<Node> stack = new Stack<>();\n Set<Node> visited = new HashSet<>(); //we can use integer for better space\n\n stack.push(start);\n while (!stack.isEmpty()){\n Node curr = stack.pop();\n if(!visited.contains(curr)){\n visited.add(curr);\n //do something\n }\n for(Node n: curr.adj){\n if(!visited.contains(n)){\n stack.push(n);\n }\n }\n }\n }",
"private void computePaths(Vertex source, Vertex target, ArrayList<Vertex> vs)\n {\n \tfor (Vertex v : vs)\n \t{\n \t\tv.minDistance = Double.POSITIVE_INFINITY;\n \t\tv.previous = null;\n \t}\n source.minDistance = 0.;\t\t// distance to self is zero\n IndexMinPQ<Vertex> vertexQueue = new IndexMinPQ<Vertex>(vs.size());\n \n for (Vertex v : vs) vertexQueue.insert(Integer.parseInt(v.id), v);\n\n\t\twhile (!vertexQueue.isEmpty()) \n\t\t{\n\t \t// retrieve vertex with shortest distance to source\n\t \tVertex u = vertexQueue.minKey();\n\t \tvertexQueue.delMin();\n\t\t\tif (u == target)\n\t\t\t{\n\t\t\t\t// trace back\n\t\t\t\twhile (u.previous != null)\n\t\t\t\t{;\n\t\t\t\t\tu = u.previous;\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n \t// Visit each edge exiting u\n \tfor (Edge e : u.adjacencies)\n \t\t{\n \t\tVertex v = e.target;\n\t\t\t\tdouble weight = e.weight;\n \tdouble distanceThroughU = u.minDistance + weight;\n\t\t\t\tif (distanceThroughU < v.minDistance) \n\t\t\t\t{\n\t\t\t\t\tint vid = Integer.parseInt(v.id);\n\t\t \t\tvertexQueue.delete(vid);\n\t\t \t\tv.minDistance = distanceThroughU;\n\t\t \t\tv.previous = u;\n\t\t \t\tvertexQueue.insert(vid,v);\n\t\t\t\t}\n\t\t\t}\n }\n }",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tStack<Integer> st = new Stack<Integer>();\n\t\tQueue<Integer> que = new LinkedList<Integer>();\n\t\tArrayList<Integer> path = new ArrayList<>();\n\t\tint n = sc.nextInt();\n\t\tint m = sc.nextInt();\n\t\tint v = sc.nextInt();\n\t\tint [][] arr= new int [n+1][n+1];\n\t\tboolean [] visit = new boolean[n+1];\n\t\tfor(int i=0;i<m;i++) {\n\t\t\tint a = sc.nextInt();\n\t\t\tint b = sc.nextInt();\n\t\t\tarr[a][b] = 1;\n\t\t\tarr[b][a] = 1;\n\t\t}\n\t\tst.push(v);\n\t\twhile(!st.isEmpty()) {\n\t\t\tint temp = st.pop();\n\t\t\tif(visit[temp]) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tpath.add(temp);\n\t\t\tvisit[temp] = true;\n\t\t\tfor(int i=n;i>0;i--) {\n\t\t\t\tif(arr[temp][i]==1 && !visit[i]) {\n\t\t\t\t\tst.push(i);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor(int i=0;i<path.size();i++) {\n\t\t\tSystem.out.print(path.get(i)+\" \");\n\t\t}\n\t\tSystem.out.println();\n\t\tArrays.fill(visit, false);\n\t\tpath = new ArrayList<>();\n\t\tque.add(v);\n\t\twhile(!que.isEmpty()) {\n\t\t\tint temp = que.poll();\n\t\t\tif(visit[temp]) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tpath.add(temp);\n\t\t\tvisit[temp] = true;\n\t\t\tfor(int i=1;i<=n;i++) {\n\t\t\t\tif(arr[temp][i]==1 && !visit[i]) {\n\t\t\t\t\tque.add(i);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor(int i=0;i<path.size();i++) {\n\t\t\tSystem.out.print(path.get(i)+\" \");\n\t\t}\n\t}",
"private void GreedySearch(){\n\n Queue<Node> expanded = new LinkedList<>();\n ArrayList<Node> fringe = new ArrayList<>();\n ArrayList<Node> fringeTemp = new ArrayList<>();\n\n\n Node current = startNode;\n\n while(expanded.size() < 1000){\n\n if(current.getDigit().getDigitString().equals(goalNode.getDigit().getDigitString())){\n //goal is reached.\n solutionPath(current);\n expanded.add(current);\n printExpanded(expanded);\n System.exit(0);\n }\n\n\n boolean b = cycleCheck(current,expanded);\n\n if(!b) {\n expanded.add(current);\n }\n\n if(!b){\n\n if(current.getDigit().last_changed != 0){\n\n if ((Integer.parseInt(current.getDigit().getFirst_digit()) - 1 >= 0)) {\n Node child_node = new Node(current.getDigit().decreaseFirstDigit());\n child_node.setParent(current);\n child_node.getDigit().setLastChanged(0);\n\n if(!forbidden.contains(child_node.getDigit().getDigitString())){\n fringe.add(child_node);\n }\n }\n\n //+1 child first digit\n if ((Integer.parseInt(current.getDigit().getFirst_digit()) + 1 <= 9)) {\n Node child_node = new Node(current.getDigit().increaseFirstDigit());\n child_node.setParent(current);\n child_node.getDigit().setLastChanged(0);\n if(!forbidden.contains(child_node.getDigit().getDigitString())){\n fringe.add(child_node);\n }\n\n }\n }\n\n if(current.getDigit().last_changed != 1){\n\n if ((Integer.parseInt(current.getDigit().getSecond_digit()) - 1 >= 0)) {\n Node child_node = new Node(current.getDigit().decreaseSecondDigit());\n child_node.setParent(current);\n child_node.getDigit().setLastChanged(1);\n if(!forbidden.contains(child_node.getDigit().getDigitString())){\n fringe.add(child_node);\n }\n }\n\n //+1 child\n if ((Integer.parseInt(current.getDigit().getSecond_digit()) + 1 <= 9)) {\n Node child_node = new Node(current.getDigit().increaseSecondDigit());\n child_node.setParent(current);\n child_node.getDigit().setLastChanged(1);\n if(!forbidden.contains(child_node.getDigit().getDigitString())){\n fringe.add(child_node);\n }\n }\n }\n\n if(current.getDigit().last_changed != 2){\n if ((Integer.parseInt(current.getDigit().getThird_digit()) - 1 >= 0)) {\n Node child_node = new Node(current.getDigit().decreaseThirdDigit());\n child_node.setParent(current);\n child_node.getDigit().setLastChanged(2);\n if(!forbidden.contains(child_node.getDigit().getDigitString())){\n fringe.add(child_node);\n }\n }\n //+1 child\n if ((Integer.parseInt(current.getDigit().getThird_digit()) + 1 <= 9)) {\n Node child_node = new Node(current.getDigit().increaseThirdDigit());\n child_node.setParent(current);\n child_node.getDigit().setLastChanged(2);\n if(!forbidden.contains(child_node.getDigit().getDigitString())){\n fringe.add(child_node);\n }\n }\n }\n\n }\n\n\n\n for(Node n : fringe){\n heuristicSetter(n);\n\n }\n\n fringeTemp.addAll(fringe);\n //now all the nodes in fringe have the heuristic value.\n //We can get the last added minm\n Node minm;\n if(fringeTemp.size() != 0){\n minm = fringeTemp.get(0);\n }else{\n break;\n }\n for(int i = 1; i<fringeTemp.size(); i++){\n if(fringeTemp.get(i).getHeuristic() <= minm.getHeuristic()){\n minm = fringeTemp.get(i);\n }\n }\n\n //now we have the minm for the next stage.\n current = minm;\n fringeTemp.remove(minm);\n fringe.clear();\n }\n\n //While loop ends\n System.out.println(\"No solution found.\");\n printExpanded(expanded);\n\n\n\n }",
"private void calculate() {\n\t\tList<Edge> path = new ArrayList<>();\n\t\tPriorityQueue<Vert> qv = new PriorityQueue<>();\n\t\tverts[s].dist = 0;\n\t\tqv.add(verts[s]);\n\t\twhile (!qv.isEmpty()) {\n\t\t\tVert v = qv.poll();\n\t\t\tint vidx = v.idx;\n\t\t\tfor (Edge e : v.edges) {\n\t\t\t\tif (e.w==0) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tVert vo = verts[e.other(vidx)];\n\t\t\t\tif (vo.dist > v.dist + e.w) {\n\t\t\t\t\tvo.dist = v.dist + e.w;\n\t\t\t\t\tqv.add(vo);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (verts[t].dist < L) {\n\t\t\tok = false;\n\t\t\treturn;\n\t\t} else if (verts[t].dist == L) {\n\t\t\tok = true;\n\t\t\tfor (int i=0; i<m; i++) {\n\t\t\t\tif (edges[i].w == 0) {\n\t\t\t\t\tedges[i].w = MAX_DIST;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\t// replace 0 with 1, adding to za list\n\t\tfor (int i=0; i<m; i++) {\n\t\t\tif (edges[i].w == 0) {\n\t\t\t\tza[i] = true;\n\t\t\t\tedges[i].w = 1;\n\t\t\t} else {\n\t\t\t\tza[i] = false;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// looking for shortest path from s to t with 0\n\t\tfor (int i=0; i<n; i++) {\n\t\t\tif (i != s) {\n\t\t\t\tverts[i].dist = MAX_DIST;\n\t\t\t}\n\t\t}\n\t\tqv.clear();\n\t\tqv.add(verts[s]);\n\t\twhile (!qv.isEmpty()) {\n\t\t\tVert v = qv.poll();\n\t\t\tint vidx = v.idx;\n\t\t\tfor (Edge e : v.edges) {\n\t\t\t\tVert vo = verts[e.other(vidx)];\n\t\t\t\tif (vo.dist > v.dist + e.w) {\n\t\t\t\t\tvo.dist = v.dist + e.w;\n\t\t\t\t\tqv.add(vo);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (verts[t].dist > L) {\n\t\t\tok = false;\n\t\t\treturn;\n\t\t}\n\t\tVert v = verts[t];\n\t\twhile (v.dist > 0) {\n\t\t\tlong minDist = MAX_DIST;\n\t\t\tVert vMin = null;\n\t\t\tEdge eMin = null;\n\t\t\tfor (Edge e : v.edges) {\n\t\t\t\tVert vo = verts[e.other(v.idx)];\n\t\t\t\tif (vo.dist+e.w < minDist) {\n\t\t\t\t\tvMin = vo;\n\t\t\t\t\teMin = e;\n\t\t\t\t\tminDist = vMin.dist+e.w;\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t\tv = vMin;\t\n\t\t\tpath.add(eMin);\n\t\t}\n\t\tCollections.reverse(path);\n\t\tfor (int i=0; i<m; i++) {\n\t\t\tif (za[i]) {\n\t\t\t\tedges[i].w = MAX_DIST;\n\t\t\t}\n\t\t}\n\t\tlong totLen=0;\n\t\tboolean wFixed = false;\n\t\tfor (Edge e : path) {\n\t\t\ttotLen += (za[e.idx] ? 1 : e.w);\n\t\t}\n\t\tfor (Edge e : path) {\n\t\t\tif (za[e.idx]) {\n\t\t\t\tif (!wFixed) {\n\t\t\t\t\te.w = L - totLen + 1;\n\t\t\t\t\twFixed = true;\n\t\t\t\t} else {\n\t\t\t\t\te.w = 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tok = true;\n\t}",
"public void preFlow() {\n\t\tg.getVertex(source).h = g.getV();\n\t\tg.getVertex(sink).h = 0;\n\t\t\n\t\tfor (int i : g.getAdjacents(source)) {\n\t\t\tpushFillingFlow(source, i);\n\t\t}\n\t}",
"private void CreatingBeautyContentTopK() {\n\t\t\tConstraintsPlacement objConstraints= new ConstraintsPlacement(this);\r\n\t\t\t//Creating array with states\r\n\t\t\tArrayList<BlockNode> states = new ArrayList<BlockNode>();\r\n\t\t\t//Building the graph in a deph way\r\n\t \tGraphBuilder objGrapB= new GraphBuilder(1);\r\n\t \tint numElements=objElem.getNumberObjects();\r\n\t \tint numEnemies=objElem.getNumberObjectsEnemies();\r\n\t \tint globalControlSearch=0;\r\n\t \t//Beststates=objGrapB.basicDepthSearch(mediumStraight,height,numElements,numElements,states,objConstraints, objElem.getFinalList(),objElem);\r\n\t \tbestBranches=objGrapB.relativePositionDepthSearchTopK(mediumStraight,height,numElements-numEnemies,numElements-numEnemies,states,objConstraints, objElem.getFinalList(),objElem,-mediumStraight+1,mediumStraight-1,floorTileHeight,0,0,maxScreens,numEnemies,random,globalControlSearch);\r\n\t \t//Beststates=objGrapB.relativeTransPositionDepthSearch(mediumStraight,height,numElements,numElements,states,objConstraints, objElem.getFinalList(),objElem,-mediumStraight+1,mediumStraight-1,floorTileHeight,0,0,currentState,hTable);\r\n\t \r\n\t \tBranch objBranch=new Branch();\r\n\t \t//bestBranches=objBranch.sortBranches(bestBranches);\r\n\t \t\r\n\t \t//System.out.print( \"CounterStates\"+objGrapB.getCounterIDs() );\r\n\t \r\n\t //imprimiendo los estados visitados\r\n\t /*\r\n\t Iterator<BlockNode> nombreIterator = states.iterator();\r\n\t while(nombreIterator.hasNext()){\r\n\t \tBlockNode elemento = nombreIterator.next();\r\n\t \tSystem.out.print(elemento.getID()+\" / \");\r\n\t }*/\r\n\t \r\n\t //here we are painting as the best branches foundeded\r\n\t \r\n\t Iterator<Branch> nombreIterator = bestBranches.iterator();\r\n\t while(nombreIterator.hasNext()){\r\n\t \tBranch elemento = nombreIterator.next();\r\n\t \t//System.out.print(elemento.getHeuristicValue()+ \" / \");\r\n\t }\r\n\t \r\n\t \r\n\t //Here we will put the elements on the tile\r\n\t \t//Just here to implement the n screens!\r\n\t for(int i=0;i<maxScreens;i++)\r\n\t {//block from Lelis and Reis (>class GeradorDeFasses)\r\n/*\t \ttry {\r\n\t \t\tLevel levelScreen=PaintElements(((Branch)bestBranches.get(i)).getStates(),this.clone());\t\t\t\t\t\r\n\t\t\t\t\tScreen objScreen=new Screen();\r\n\t\t\t\t\tobjScreen.SaveScreen(levelScreen,odds,objElem);\r\n\t \t\tInformacoesTelas info = new InformacoesTelas();\r\n\t\t\t CopiaArquivos copiador = new CopiaArquivos();\r\n\t\t\t \r\n\t\t\t info = info.carregaInfoTela(\"infoTela\");\r\n\t\t\t\t\tinfo.setOutrasVariaveis(0, 0); // Salva outras informacoes da Tela\r\n\t\t\t\t\tinfo.salvaInfoTela(\"infoTela\", info);\t\t\t\t\t\r\n\t\t\t\t\tcopiador.copy(\"\" + i, \"Screens/\");\r\n\t\t\t\t\t\r\n\t\t\t\t} catch (CloneNotSupportedException e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t} catch (ClassNotFoundException e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}*/\r\n\t }\r\n\t \r\n\t\t\t\r\n\t\t}",
"public DSAQueue depthFirstSearch(String start)\n\t{\n\t\tif(!vertices.isEmpty())\n\t\t{\n\t\t\tDSAQueue queue = new DSAQueue();\n\t\t\tDSAGraphVertex vx = getVertex(start); //vertex to start on (root)\n\t\t\tDSAStack visited = new DSAStack();\t//creates empty stack\n\n\t\t\tclear(); //sets all vertices as not visited\n\t\t\tvx.setVisited(); // Marks root as visited\n\t\t\tqueue.enqueue(vx); //start point\n\n\t\t\tdfs(vx, visited, queue); //begin recursion\n\n\t\t\treturn queue;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthrow new NoSuchElementException(\"List is empty\");\n\t\t}\n\t}",
"@Override\r\n public boolean breadthFirstSearch(T start, T end) {\r\n Vertex<T> startV = vertices.get(start);\r\n Vertex<T> endV = vertices.get(end);\r\n\r\n Queue<Vertex<T>> queue = new LinkedList<Vertex<T>>();\r\n Set<Vertex<T>> visited = new HashSet<>();\r\n\r\n queue.add(startV);\r\n visited.add(startV);\r\n\r\n while(queue.size() > 0){\r\n Vertex<T> next = queue.poll();\r\n if(next == null){\r\n continue;\r\n }\r\n if(next == endV){\r\n return true;\r\n }\r\n\r\n for (Vertex<T> neighbor: next.getNeighbors()){\r\n if(!visited.contains(neighbor)){\r\n visited.add(neighbor);\r\n queue.add(neighbor);\r\n }\r\n }\r\n }\r\n\r\n return false;\r\n }",
"public int breadthFirstSearch(T srcId, T destId)\n {\n if (nodeList.isEmpty())\n {\n System.out.println(\"Empty graph\");\n return -1;\n }\n \n // queue used during the traversal\n LinkedList<QueueNode> queue = new LinkedList();\n \n // keeps track of node which are visited and added into the queue\n HashMap<T, Integer> visited = new HashMap();\n \n // find srcNode with id = srcId in graph\n GraphNode srcNode = nodeList.get(srcId);\n \n // if srcNode is not there in graph, breadth first traversal which starts at srcNode cannot be done \n if (srcNode == null)\n {\n System.out.println(\"Source vertex not found\");\n return -1;\n }\n \n int minNumberTrials = -1;\n \n // add srcNode in queue, mark it as visited\n queue.add(new QueueNode(srcNode, 0));\n visited.put(srcNode.nodeId, 1);\n \n while (!queue.isEmpty())\n {\n QueueNode currentNode = queue.remove();\n \n // if destination node found\n if (currentNode.graphNode.nodeId == destId)\n {\n minNumberTrials = currentNode.level;\n break;\n }\n \n // first neighbor of current graph node\n GraphNode neighbor = currentNode.graphNode.next;\n \n // add all neighbors of current graph node into the queue\n while (neighbor != null)\n {\n // if this neighbor is not visited earlier, mark it as visited\n // add it to the queue at appropriate level\n if (visited.get(neighbor.nodeId) == null)\n {\n visited.put(neighbor.nodeId, 1);\n queue.add(new QueueNode(findGraphNode(neighbor.nodeId), currentNode.level + 1));\n }\n neighbor = neighbor.next; \n }\n }\n \n return minNumberTrials;\n }",
"public void bfs(Queue<Integer> queue, int visited[]) {\n if (queue.isEmpty()) {\n return;\n }\n\n int root = queue.poll();\n\n if (visited[root] == 1) {\n bfs(queue, visited);\n return;//alreadu into consideration\n }\n\n\n System.out.printf(\"Exploring of node %d has started\\n\", root);\n visited[root] = 1;\n\n\n for (int i = 0; i < adjMatrix[root].size(); i++) {\n if (visited[adjMatrix[root].get(i)] == 1 || visited[adjMatrix[root].get(i)] == 2) {\n continue;\n }\n queue.add(adjMatrix[root].get(i));\n }\n bfs(queue, visited);\n System.out.printf(\"Exploring of node %d has end\\n\", root);\n visited[root] = 2;\n }",
"public List<Long> getPath(Long start, Long finish){\n \n \n List<Long> res = new ArrayList<>();\n // auxiliary list\n List<DeixtraObj> serving = new ArrayList<>();\n// nearest vertexes map \n Map<Long,DeixtraObj> optimMap = new HashMap<>();\n// thread save reading \n synchronized (vertexes){ \n // preparation\n for (Map.Entry<Long, Vertex> entry : vertexes.entrySet()) {\n Vertex userVertex = entry.getValue();\n // If it`s start vertex weight = 0 and the nereast vertex is itself \n if(userVertex.getID().equals(start)){\n serving.add(new DeixtraObj(start, 0.0, start));\n }else{\n // For other vertex weight = infinity and the nereast vertex is unknown \n serving.add(new DeixtraObj(userVertex.getID(), Double.MAX_VALUE, null));\n }\n\n } \n // why auxiliary is not empty \n while(serving.size()>0 ){\n // sort auxiliary by weight \n Collections.sort(serving);\n\n \n // remove shortes fom auxiliary and put in to answer \n DeixtraObj minObj = serving.remove(0);\n optimMap.put(minObj.getID(), minObj);\n\n Vertex minVertex = vertexes.get(minObj.getID());\n\n // get all edges from nearest \n for (Map.Entry<Long, Edge> entry : minVertex.allEdges().entrySet()) {\n Long dest = entry.getKey();\n Double wieght = entry.getValue().getWeight();\n // by all remain vertexes \n for(DeixtraObj dx : serving){\n if(dx.getID().equals(dest)){\n // if in checking vertex weight more then nearest vertex weight plus path to cheking \n // then change in checking weight and nearest\n if( (minObj.getWeight()+wieght) < dx.getWeight()){\n dx.setNearest(minVertex.getID());\n dx.setWeight((minObj.getWeight()+wieght));\n }\n }\n }\n }\n\n }\n }\n \n // create output list\n res.add(finish);\n Long point = finish;\n while(!point.equals(start)){\n \n point = ((DeixtraObj)optimMap.get(point)).getNearest();\n res.add(point);\n }\n \n Collections.reverse(res);\n \n \n return res;\n \n }",
"public void dfs (String input)\r\n\t {\r\n\t\t \tNode root_dfs = new Node (input);\r\n\t\t \tNode current = new Node(root_dfs.getState());\r\n\t\t \t\r\n\t\t\tArrayList<String> visited = new ArrayList<String>();\r\n\t\t\tArrayList<String> children = new ArrayList<String>();\r\n\t\t\tStack<Node> stack_dfs = new Stack<Node>();\r\n\t\t\t\r\n\t\t\tint nodes_popped = 0;\r\n\t\t\tint stack_max_size = 0;\r\n\t\t\tint stack_size = 0;\r\n\t\t\tcurrent.cost = 0;\r\n\t\t\t\r\n\t\t\tgoal_dfs = isGoal(current.getState());\r\n\t\t\t\r\n\t\t\twhile(!goal_dfs)\r\n\t\t\t{\r\n\t\t\t\tvisited.add(current.getState());\r\n\t\t\t\tchildren = Successor.findChildren(current.getState());\r\n\t\t\t\t\r\n\t\t\t\tfor (String a : children)\r\n\t\t\t\t{\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (visited.contains(a))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t\tNode nino = new Node(a);\r\n\t\t\t\t\t\tcurrent.children_nodes.add(nino);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tint cost = isCost(current.getState(), nino.getState());\r\n\t\t\t\t\t\tnino.cost = cost;\r\n\t\t\t\t\t\tnino.parent = current;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// Repeated state check\r\n\t\t\t\t\t\tif (!stack_dfs.contains(nino))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tstack_dfs.add(nino);\r\n\t\t\t\t\t\t\tstack_size++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// Popping off the stack. LIFO architecture\r\n\t\t\t\tcurrent = stack_dfs.pop();\r\n\t\t\t\tnodes_popped++;\r\n\t\t\t\t\r\n\t\t\t\tif (stack_size > stack_max_size)\r\n\t\t\t\t{\r\n\t\t\t\t\tstack_max_size = stack_size;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tstack_size--;\r\n\t\t\t\tgoal_dfs = isGoal(current.getState());\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tgoal_dfs = false;\r\n\t\t\tSystem.out.println(\"DFS Solved!!\");\r\n\t\t\tSolution.performSolution(current, root_dfs, nodes_popped, stack_max_size);\r\n\t }",
"void topologicalSort() {\n Stack stack = new Stack();\n\n // Mark all the vertices as not visited\n Boolean visited[] = new Boolean[V];\n for (int i = 0; i < V; i++)\n visited [i] = false;\n\n // Call the recursive helper function to store Topological\n // Sort starting from all vertices one by one\n for (int i = 0; i < V; i++)\n if (visited [i] == false)\n topologicalSortUtil(i, visited, stack);\n\n // Print contents of stack\n while (stack.empty() == false)\n System.out.print(stack.pop() + \" \");\n }",
"public void breadthFirst(Vertex[] vertices ){\n\t\t\n\t\tVertex temp = vertices[0];\n\t\ttemp.state=1; //for tracking the visited nodes, visited/discovered A\n\t\tboolean[] seen = new boolean[vertices.length];\n\t\tQueue<Vertex> q = new LinkedList<Vertex>(); //queue for breadth first traversal\n\t\t\n\t\tq.add(temp); //root node added to queue\n\t\tseen[0] = true;\n\t\tSystem.out.println(\"Begin breadth first traversal: \\n\" + \n\t\t\t\tq.toString());\n\t\t\t\t\n\t\tfor (int i = 0; i < vertices.length; i++){\n\t\t\ttemp = vertices[i];\n\t\t\twhile (!q.isEmpty() ) {\n\t Vertex v = q.remove();\n\t for (int j : v.neighbors) {\n\t if (!seen[j]) {\n\t q.add(vertices[j]);\n\t seen[j] = true;\n\t vertices[j].state=1;\n\t }\n\t }\n\t System.out.println(q.toString());\n \t}\n\t\t}\n\t}",
"private static void disjkstraAlgorithm(Node sourceNode, GraphBuilder graph){\n PriorityQueue<Node> smallestDisQueue = new PriorityQueue<>(graph.nodeArr.size(), new Comparator<Node>() {\n @Override\n public int compare(Node first, Node sec) {\n if(first.distance == Integer.MAX_VALUE && sec.distance == Integer.MAX_VALUE){\n return 0;\n }\n else if(first.distance == Integer.MAX_VALUE && sec.distance != Integer.MAX_VALUE){\n return 1;\n } else if(first.distance != Integer.MAX_VALUE && sec.distance == Integer.MAX_VALUE){\n return -1;\n }\n else\n return (int) (first.distance - sec.distance);\n }\n });\n\n smallestDisQueue.add(sourceNode); //add the node to the queue\n\n // until all vertices are know get the vertex with smallest distance\n\n while(!smallestDisQueue.isEmpty()) {\n\n Node currNode = smallestDisQueue.poll();\n// System.out.println(\"Curr: \");\n// System.out.println(currNode);\n if(currNode.known)\n continue; //do nothing if the currNode is known\n\n currNode.known = true; // otherwise, set it to be known\n\n for(Edge connectedEdge : currNode.connectingEdges){\n Node nextNode = connectedEdge.head;\n if(!nextNode.known){ // Visit all neighbors that are unknown\n\n long weight = connectedEdge.weight;\n if(currNode.distance == Integer.MAX_VALUE){\n continue;\n }\n else if(nextNode.distance == Integer.MAX_VALUE && currNode.distance == Integer.MAX_VALUE) {\n continue;\n }\n\n else if(nextNode.distance> weight + currNode.distance){//Update their distance and path variable\n smallestDisQueue.remove(nextNode); //remove it from the queue\n nextNode.distance = weight + currNode.distance;\n\n smallestDisQueue.add(nextNode); //add it again to the queue\n nextNode.pathFromSouce = currNode;\n\n// System.out.println(\"Next: \");\n// System.out.println(nextNode);\n }\n }\n }\n// System.out.println(\"/////////////\");\n }\n }",
"static void bfs(String label) {\n\n /* Add a graph node to the queue. */\n queue.addLast(label);\n graphVisited.put(label, true);\n\n while (!queue.isEmpty()) {\n\n /* Take a node out of the queue and add it to the list of visited nodes. */\n if (!graphVisited.containsKey(queue.getFirst()))\n graphVisited.put(queue.getFirst(), true);\n\n String str = queue.removeFirst();\n\n /*\n For each unvisited vertex from the list of the adjacent vertices,\n add the vertex to the queue.\n */\n for (String lab : silhouette.get(str)) {\n if (!graphVisited.containsKey(lab) && lab != null && !queue.contains(lab))\n queue.addLast(lab);\n }\n }\n }",
"void bfs(SimpleVertex simpleVertex) {\n\t\twhile (true) {\n\t\t\tif (simpleVertex.isVisited == false) {\n\n\t\t\t\tif (simpleVertex.isAdded == false) {\n\t\t\t\t\tqueue.add(simpleVertex);\n\t\t\t\t\tsimpleVertex.isAdded = true;\n\t\t\t\t}\n\t\t\t\tsimpleVertex.isVisited = true;\n\t\t\t\tSystem.out.print(simpleVertex.Vertexname + \" \");\n\n\t\t\t\tfor (int i = 0; i < simpleVertex.neighborhood.size(); i++) {\n\t\t\t\t\tSimpleEdge node = simpleVertex.neighborhood.get(i);\n\n\t\t\t\t\tif (node.two.isAdded == false)\n\t\t\t\t\t\tqueue.add(node.two);\n\t\t\t\t\tnode.two.isAdded = true;\n\n\t\t\t\t}\n\t\t\t\tqueue.poll();\n\t\t\t\tif (!queue.isEmpty())\n\t\t\t\t\tbfs(queue.peek());\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\n\t}",
"private void bfs() {\n\t\tQueue<Node> q = new ArrayDeque<>();\n\t\tq.add(treeNodes.get(0));\n\t\twhile (!q.isEmpty()) {\n\t\t\tint size = q.size();\n\t\t\tfor (int i = 0; i < size; i++) {\n\t\t\t\tNode curr = q.poll();\n\t\t\t\ttime += curr.informTime;\n\t\t\t\tSet<Node> nextNodes = curr.nextNodes;\n\t\t\t\tif (nextNodes == null || curr.id == treeNodes.get(0).id)\n\t\t\t\t\tcontinue;\n\t\t\t\tfor (Node node : nextNodes) {\n\t\t\t\t\tq.add(node);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t}",
"public void bfs(GraphNode source)\n {\n Queue<GraphNode> q = new ArrayDeque<>();\n q.add(source);\n HashMap<GraphNode,Boolean> visit =\n new HashMap<GraphNode,Boolean>();\n visit.put(source,true);\n while (!q.isEmpty())\n {\n GraphNode u = q.poll();\n System.out.println(\"Value of Node \" + u.val);\n System.out.println(\"Address of Node \" + u);\n if (u.neighbours != null)\n {\n List<GraphNode> v = u.neighbours;\n for (GraphNode g : v)\n {\n if (visit.get(g) == null)\n {\n q.add(g);\n visit.put(g,true);\n }\n }\n }\n }\n System.out.println();\n }",
"public static void main(String[] args) {\n // write your code here\n initialize();\n\n\n Sort(profile.getProfile());\n Integer[][][] mas = new Integer[11][11][1];\n\n R.add(Q.pollFirst());\n\n for (Integer[] e : Q) {\n if (DiskCover(e, R, Rant)) {\n R.add(e);\n // Rtmp.add(Q.pollFirst());\n }\n }\n\n FindMaxAngle(R, 0);\n\n Rg = R;\n //Rtmp-R add Q\n list_r.add(R);\n int j = 0;\n boolean flag = false;\n while (!Q.isEmpty()) {\n\n\n list_r.add(FindMaxPolygonCover(Rg));\n\n }\n\n MakePolygon(list_r);\n\n boolean work = true;\n\n do {\n R.clear();\n Gr.getEdge().clear();\n // algorithmConnectivity.setMarketVertexFirst();\n for (int i = 0; i < Gr.getVertex().size(); i++) {\n\n AlgorithmConnectivity algorithmConnectivity = new AlgorithmConnectivity();\n algorithmConnectivity.initializated(Gr.getVertex().size());\n algorithmConnectivity.setMarketVertexFirst();\n algorithmConnectivity.setMarketVertexSecond(i);\n while (algorithmConnectivity.findSecond() != 100) {\n //int a= iterator.next();\n int index = algorithmConnectivity.findSecond();\n algorithmConnectivity.setMarketVertexThird(index);\n algorithmConnectivity = MakeConnection(index, algorithmConnectivity);\n }\n R.add(algorithmConnectivity.getMarket());\n }\n if (!checkConnectionGraf(R)) {\n //MakeConnection(Gr);\n ArrayList<Integer[]> result = new ArrayList<Integer[]>();\n ArrayList<Integer> ver = new ArrayList<Integer>();\n ArrayList<ArrayList<Integer>> v = new ArrayList<ArrayList<Integer>>();\n for (Integer[] p : R) {\n ArrayList<Integer> res = new ArrayList<Integer>();\n ver.clear();\n for (int i = 0; i < p.length; i++) {\n if (p[i] != 1) {\n ver.add(Gr.getVertex().get(i));\n }\n }\n if (ver.size() != 1) {\n // result.add(AddNewRoute(ver));\n // v.add(ver);\n result.addAll(AddNewRoute(ver));\n }\n }\n int minumum = 1000;\n Integer[] place = new Integer[3];\n for (int i = 0; i < result.size(); i++) {\n Integer[] ma = result.get(i);\n if (ma[2] == null) {\n System.out.print(\"\");\n }\n if ((minumum > ma[2]) && (ma[2]) != 0) {\n minumum = ma[2];\n place = ma;\n }\n }\n if (minumum == 1000) {\n for (Integer[] p : R) {\n ver.clear();\n for (int i = 0; i < p.length - 1; i++) {\n if (p[i] == 1) {\n ver.add(Gr.getVertex().get(i));\n }\n }\n result.addAll(AddNewRoute(ver));\n // result.add(AddNewRoute(ver));\n for (int i = 0; i < result.size(); i++) {\n Integer[] ma = result.get(i);\n if (ma[2] == null) {\n System.out.print(\"\");\n }\n if ((minumum > ma[2]) && (ma[2]) != 0) {\n minumum = ma[2];\n place = ma;\n }\n }\n AddNewVertex(place);\n }\n } else {\n AddNewVertex(place);\n }\n } else {\n work = false;\n }\n\n } while (work);\n\n MobileProfile prof = new MobileProfile();\n prof.initialization(Gr.getVertex().size());\n int sum = 0;\n int[][][] massive = profile.getProfile();\n for (int i = 0; i < Gr.getVertex().size(); i++) {\n // sum=sum+massive;\n }\n\n\n zcd = new ZCD();\n\n zcd.setGraphR(Gr);\n\n Iterator<Edges> it = Gr.getEdgeses().iterator();\n boolean fla = false;\n while (it.hasNext()) {\n Edges d = it.next();\n LinkedList<Integer[]> graph_edges = g.getSort_index();\n\n for (int i = 0; i < graph_edges.size(); i++) {\n Integer[] mass = graph_edges.get(i);\n if (checkLine(g.getCoordinate().get(mass[0]), g.getCoordinate().get(mass[1]), Gr.getCoordinate().get(d.getX()), Gr.getCoordinate().get(d.getY()))) {\n if (!fla) {\n Integer[] wr = new Integer[3];\n wr[0] = d.getX();\n wr[1] = d.getY();\n wr[2] = mass[2];\n fla = true;\n zcd.addWrEdges(wr);\n }\n }\n }\n if (!fla) {\n\n Integer[] wr = new Integer[3];\n wr[0] = d.getX();\n wr[1] = d.getY();\n wr[2] = 2;\n\n zcd.addWrEdges(wr);\n\n }\n fla = false;\n }\n\n Edges e = null;\n for (int i = 0; i < Gr.getVertex().size(); i++) {\n int sumwr = 0;\n HashSet<Edges> item = Gr.getEdgeses();\n Iterator<Edges> iterator = item.iterator();\n for (int k = 0; k < zcd.getWrEdges().size(); k++) {\n\n e = iterator.next();\n if (e.checkEdge(i)) {\n Integer[] m = zcd.getWrEdges().get(k);\n sumwr = sumwr + m[2];\n\n }\n\n }\n wr.add(sumwr);\n\n }\n\n int max = 0;\n int count = 0;\n for (int i = 0; i < wr.size(); i++) {\n if (max < wr.get(i)) {\n max = wr.get(i);\n count = i;\n }\n }\n Integer[] a = new Integer[2];\n a[0] = count;\n a[1] = max;\n zcd.setRoot_vertex(a);\n\n\n int number_vertex = 5;\n //ZTC ztc = new ZTC();\n neig = new int[Gr.getVertex().size()][Gr.getVertex().size()];\n for (int i = 0; i < Gr.getVertex().size(); i++) {\n HashSet<Edges> item = Gr.getEdgeses();\n Iterator<Edges> iterator = item.iterator();\n while (iterator.hasNext()) {\n e = iterator.next();\n if (e.checkEdge(i)) {\n\n neig[i][e.getY()] = 1;\n }\n }\n }\n ztc.setNeigboor(neig);\n ztc.addTVertex(a[0]);\n Integer[] zero = new Integer[3];\n zero[0] = a[0];\n zero[1] = 0;\n zero[2] = 0;\n verLmtest.add(zero);\n vertex_be = new boolean[Gr.getVertex().size()];\n int root_number = 5;\n while (ztc.getTvertex().size() != Gr.getVertex().size()) {\n\n LinkedList<Edges> q = new LinkedList<Edges>();\n\n\n count_tree++;\n\n\n LinkedList<Integer> vertext_t = new LinkedList<Integer>(ztc.getTvertex());\n while (vertext_t.size() != 0) {\n // for(int i=0; i<count_tree;i++){\n\n number_vertex = vertext_t.pollFirst();\n weight_edges.clear();\n if (!vertex_be[number_vertex]) {\n vertex_be[number_vertex] = true;\n } else {\n continue;\n }\n\n // if(i<vertext_t.size())\n\n\n HashSet<Edges> item = Gr.getEdgeses();\n Iterator<Edges> iterator = item.iterator();\n // while (iterator.hasNext()) {\n for (int k = 0; k < item.size(); k++) {\n e = iterator.next();\n\n if (e.checkEdge(number_vertex)) {\n\n weight_edges.add(zcd.getWrEdges().get(k));\n q.add(e);\n }\n\n if (q.size() > 1)\n q = sort(weight_edges, q);\n\n\n while (!q.isEmpty()) {\n e = q.pollFirst();\n Integer[] lm = new Integer[3];\n\n\n lm[0] = e.getY();\n lm[1] = 1;\n lm[2] = 0;\n boolean add_flag = true;\n for (int i = 0; i < verLmtest.size(); i++) {\n Integer[] mess = verLmtest.get(i);\n if (e.getY() == mess[0]) {\n add_flag = false;\n }\n }\n if (add_flag) {\n for (int i = 0; i < verLmtest.size(); i++) {\n Integer[] mess = verLmtest.get(i);\n if (e.getX() == mess[0]) {\n mess[2] = mess[2] + 1;\n /* if (e.getX() == root_number) {\n mess[1] = 1;\n } else {\n mess[1] = mess[1] + 1;\n lm[1]=mess[1];\n\n }*/\n verLmtest.set(i, mess);\n break;\n }\n\n }\n for (int i = 0; i < verLmtest.size(); i++) {\n Integer[] mess = verLmtest.get(i);\n if (e.getX() == mess[0]) {\n lm[1] = mess[1] + 1;\n }\n\n }\n\n verLmtest.add(lm);\n } else {\n continue;\n }\n // }\n if (ztc.getTvertex().size() == 1) {\n edgesesTestHash.add(e);\n int x = e.getX();\n int y = e.getY();\n Edges e1 = new Edges(y, x);\n edgesesTestHash.add(e1);\n\n ztc.addEdges(e);\n ztc.addEdges(e1);\n\n ztc.addTVertex(lm[0]);\n // q.removeFirst();\n\n\n } else {\n // edgesTest.add(e);\n int x = e.getX();\n int y = e.getY();\n Edges e1 = new Edges(y, x);\n // disable.add(e);\n // disable.add(e1);\n\n edgesesTestHash.add(e1);\n edgesesTestHash.add(e);\n\n int[][] ad = getNeighboor();\n\n\n if (checkLegal(e, ad)) {\n ztc.addEdges(e);\n ztc.addEdges(e1);\n\n ztc.addTVertex(lm[0]);\n\n // if(q.size()!=0)\n // q.removeFirst();\n } else {\n // q.removeFirst();\n\n Iterator<Edges> edgesIterator = edgesesTestHash.iterator();\n while (edgesIterator.hasNext()) {\n Edges eo = edgesIterator.next();\n if ((eo.getY() == e.getY()) && (eo.getX() == e.getX())) {\n edgesIterator.remove();\n }\n if ((eo.getY() == e1.getY()) && (eo.getX() == e1.getX())) {\n edgesIterator.remove();\n }\n }\n\n verLmtest.removeLast();\n }\n\n\n }\n\n\n }\n\n\n }\n }\n }\n\n ztc.setEdgesesTree(edgesesTestHash);\n ztc.setGr(Gr);\n ConvertDataToJs convertDataToJs=new ConvertDataToJs();\n try {\n convertDataToJs.save(ztc);\n } catch (FileNotFoundException e1) {\n e1.printStackTrace();\n }\n\n System.out.print(\"\");\n\n }",
"void Explore(int vertex){\n // first mark it as true as it has been visited\n visited[vertex]=true;\n\n //now make the pre at the counterPre index this vertex\n pre[counterPre] = vertex;\n // also increase the counterPre for next iteration\n counterPre+=1;\n\n // do exploration\n // using Iterator to iterate the adjList\n Iterator<Integer> i = adjList[vertex].listIterator();\n while(i.hasNext()){\n int ver = i.next();\n\n // check is it visited or not if not then again explore that ver\n if (visited[ver]==false){\n Explore(ver);\n }\n }\n }",
"void BFS(int s)\n {\n /* List of visited vertices; all false in the beginning) */\n boolean visited[] = new boolean[V];\n\n /* Queue data structure is used for BFS */\n LinkedList<Integer> queue = new LinkedList<>();\n\n /* Mark starting node s as visited and enqueue it */\n visited[s]=true;\n queue.add(s);\n\n /* Until queue is empty, dequeue a single node in queue and look for it's neighboring vertices.\n * If an adjecent node hasn't been visited yet, set it as visited and enqueue this node. s*/\n while (queue.size() != 0)\n {\n /* Dequeue */\n s = queue.poll();\n System.out.print( s + \" \");\n\n /* Get all adjacent vertices */\n Iterator<Integer> i = adj[s].listIterator();\n while (i.hasNext())\n {\n int n = i.next();\n if (!visited[n])\n {\n visited[n] = true;\n queue.add(n);\n }\n }\n }\n }",
"@Override\r\n\tpublic ArrayList<Edge<E>> primMinimumSpanningTree(E src) {\r\n\t\tArrayList<Edge<E>> prim = new ArrayList<Edge<E>>();\r\n\t\tif(containsVertex(src)) {\r\n\t\t\tlastSrc = vertices.get(src);\r\n\t\t\tPriorityQueue<Vertex<E>> pq = new PriorityQueue<Vertex<E>>();\r\n\t\t\tvertices.forEach((E t, Vertex<E> u) -> {\r\n\t\t\t\tu.setDistance(Integer.MAX_VALUE);\r\n\t\t\t\tu.setColor(Color.WHITE);\r\n\t\t\t\tu.setPredecessor(null);\r\n\t\t\t\tpq.offer(u);\r\n\t\t\t});\r\n\t\t\tpq.remove(lastSrc);\r\n\t\t\tlastSrc.setDistance(0);\r\n\t\t\tpq.offer(lastSrc);\r\n\r\n\t\t\twhile(!pq.isEmpty()) {\r\n\t\t\t\tVertex<E> u = pq.poll();\r\n\t\t\t\tfor(Edge<E> ale : adjacencyLists.get(u.getElement())) {\r\n\t\t\t\t\tVertex<E> s = vertices.get(ale.getSrc());\r\n\t\t\t\t\tVertex<E> d = vertices.get(ale.getDst());\r\n\t\t\t\t\tif(d.getColor() == Color.WHITE && d.getDistance() > ale.getWeight()) {\r\n\t\t\t\t\t\tpq.remove(d);\r\n\t\t\t\t\t\tVertex<E> pred = d.getPredecessor();\r\n\t\t\t\t\t\tif(pred != null) { //remove the edge that has ale.dst as dst vertex\r\n\t\t\t\t\t\t\tEdge<E> edgeToRemove = new Edge<>(pred.getElement(), ale.getDst(), 1);\r\n\t\t\t\t\t\t\tprim.remove(edgeToRemove);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\td.setDistance(ale.getWeight());\r\n\t\t\t\t\t\td.setPredecessor(s);\r\n\t\t\t\t\t\tpq.offer(d);\r\n\t\t\t\t\t\tprim.add(ale);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tu.setColor(Color.BLACK);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn prim;\r\n\t}",
"public void BFS(int startingVertex) {\n boolean[] visited = new boolean[numberVertices];\n Queue<Integer> q = new LinkedList<>();\n\n //Add starting vertex\n q.add(startingVertex);\n visited[startingVertex] = true;\n\n //Go through queue adding vertex edges until everything is visited and print out order visited\n while (!q.isEmpty()) {\n int current = q.poll();\n System.out.println(current + \" \");\n for (int e : adj[current]) {\n if (!visited[e]) {\n q.add(e);\n visited[e] = true;\n }\n\n }\n }\n }",
"public boolean pathExists(int startVertex, int stopVertex) {\n// your code here\n ArrayList<Integer> fetch_result = visitAll(startVertex);\n if(fetch_result.contains(stopVertex)){\n return true;\n }\n return false;\n }",
"@Override\n public boolean isConnected() { //i got help from the site https://www.geeksforgeeks.org/shortest-path-unweighted-graph/\n if(this.ga.edgeSize()<this.ga.nodeSize()-1) return false;\n initializeInfo();//initialize all the info fields to be null for the algorithm to work\n if(this.ga.nodeSize()==0||this.ga.nodeSize()==1) return true;//if there is not node or one its connected\n WGraph_DS copy = (WGraph_DS) (copy());//create a copy graph that the algorithm will on it\n LinkedList<node_info> qValues = new LinkedList<>();//create linked list that will storage all nodes that we didn't visit yet\n int firstNodeKey = copy.getV().iterator().next().getKey();//first key for get the first node(its doesnt matter which node\n node_info first = copy.getNode(firstNodeKey);//get the node\n qValues.add(first);//without limiting generality taking the last node added to graph\n int counterVisitedNodes = 0;//counter the times we change info of node to \"visited\"\n while (qValues.size() != 0) {\n node_info current = qValues.removeFirst();\n if (current.getInfo() != null) continue;//if we visit we can skip to the next loop because we have already marked\n current.setInfo(\"visited\");//remark the info\n counterVisitedNodes++;\n\n Collection<node_info> listNeighbors = copy.getV(current.getKey());//create a collection for the neighbors list\n LinkedList<node_info> Neighbors = new LinkedList<>(listNeighbors);//create the neighbors list\n if (Neighbors == null) continue;\n for (node_info n : Neighbors) {\n if (n.getInfo() == null) {//if there is a node we didn't visited it yet, we will insert it to the linkedList\n qValues.add(n);\n }\n }\n }\n if (this.ga.nodeSize() != counterVisitedNodes) return false;//check that we visited all of the nodes\n\n return true;\n }",
"public static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tint V = sc.nextInt();\n\t\tint E = sc.nextInt();\n\n\t\tList<Integer>[]adjList = new ArrayList[10010];\n\t\tList<Integer>[]reverseAdjList = new ArrayList[10010];\n\n\t\tList<List<Integer>>scc = new ArrayList<List<Integer>>();\n\t\tint visited[] = new int[10010];\n\n\t\tfor(int i = 1 ; i <= V ; i++){\n\t\t\tadjList[i] = new ArrayList<Integer>();\n\t\t\treverseAdjList[i] = new ArrayList<Integer>();\n\t\t}\n\n\t\tfor(int i = 1 ; i <= E ; i++){\n\n\t\t\tint start = sc.nextInt();\n\t\t\tint end = sc.nextInt();\n\t\t\tadjList[start].add(end);\n\t\t\treverseAdjList[end].add(start);\n\t\t}\n\n\n\t\t//선작업 DFS 스택에 담음.\n\t\tStack <Integer>stack = new Stack<Integer>();\n\t\tfor(int i = 1 ; i <= V ; i++){\n\t\t\tif(visited[i] == 0){\n\t\t\t\tdfs(i,visited,stack,adjList);\n\t\t\t}\n\t\t}\n\n\n\t\t//후작업 역 DFS\n\t\tvisited = new int[10010];\n\n\t\tint r = 0;\n\t\twhile(!stack.isEmpty()){\n\n\t\t\tint here = stack.peek();\n\t\t\tstack.pop();\n\t\t\tif(visited[here] == 1){\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tscc.add(new ArrayList<Integer>());\n\t\t\t++r;\n\t\t\treverseDFS(here, r-1, visited, scc, reverseAdjList);\n\n\t\t}\n\n\t\tSystem.out.println(r);\n\t\tfor(int i = 0 ; i < r ; i++){\n\t\t\tList <Integer>temp = scc.get(i);\n\t\t\tCollections.sort(temp);\n\t\t}\n\n\t\tscc.sort(new Comparator<List<Integer>>() {\n\t\t\t@Override\n\t\t\tpublic int compare(List<Integer> o1, List<Integer> o2) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tif(o1.get(0)< o2.get(0)){\n\t\t\t\t\treturn -1;\n\t\t\t\t}else if(o1.get(0) > o2.get(0)){\n\t\t\t\t\treturn 1;\n\t\t\t\t}\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t});\n\n\t\t\tfor(List <Integer>list : scc){\n\t\t\t\tfor(int i = 0 ; i < list.size() ; i++){\n\t\t\t\t\tSystem.out.print(list.get(i) + \" \");\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"-1\");\n\t\t\t}\n\n\t}",
"private void BFS(Vertex start, Set<Vertex> visited, Queue<Vertex> queue) {\r\n\t\t// if(visited.contains(start)) return;\r\n\r\n\t\t// Mark the current node as visited and enqueue it\r\n\t\tvisited.add(start);\r\n\t\tqueue.offer(start);\r\n\r\n\t\tVertex currentNode;\r\n\t\tSet<Vertex> neighbors;\r\n\r\n\t\twhile (queue.size() != 0) { // or !queue.isEmpty()\r\n\t\t\t// Dequeue a vertex from queue and print it\r\n\t\t\tcurrentNode = queue.poll();\r\n\t\t\tSystem.out.print(currentNode + \" \");\r\n\r\n\t\t\t// Get all adjacent vertices of the dequeued vertex s\r\n\t\t\t// If a adjacent has not been visited, then mark it\r\n\t\t\t// visited and enqueue it\r\n\t\t\tneighbors = currentNode.getNeighbors();\r\n\r\n\t\t\tfor (Vertex n : neighbors) {\r\n\t\t\t\tif (!visited.contains(n)) {\r\n\t\t\t\t\tvisited.add(n);\r\n\t\t\t\t\tqueue.offer(n);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t/*\r\n\t\t\t * neighbors.forEach(n -> { if (!visited.contains(n)){\r\n\t\t\t * visited.add(n); queue.offer(n); } });\r\n\t\t\t */\r\n\t\t}\r\n\t}",
"public void BFS() {\r\n\t\tSet<Vertex> visited = new HashSet<Vertex>();\r\n\r\n\t\t// Create a queue for BFS\r\n\t\tQueue<Vertex> queue = new LinkedList<Vertex>();\r\n\r\n\t\tBFS(this.vertices[3], visited, queue); // BFS starting with 40\r\n\r\n\t\t// Call the helper function to print BFS traversal\r\n\t\t// starting from all vertices one by one\r\n\t\tfor (int i = 0; i < N; ++i)\r\n\t\t\tif (!visited.contains(this.vertices[i]))\r\n\t\t\t\tBFS(this.vertices[i], visited, queue);\r\n\t}",
"private void depthFirstSearch(DirectedGraph graph, int vertex) {\r\n \r\n visited[vertex] = true;\r\n inRecursionStack[vertex] = true;\r\n \r\n for(int adjacentVertex: graph.adjacentVertices(vertex)) {\r\n if(inRecursionStack[adjacentVertex]) {\r\n throw new IllegalArgumentException(String.format(\"Graph contains a cycle: no topological sort possible: %s -> %s\", vertex, adjacentVertex));\r\n }\r\n \r\n if(!visited[adjacentVertex]) {\r\n depthFirstSearch(graph, adjacentVertex);\r\n }\r\n }\r\n\r\n reversePostOrder.push(vertex); \r\n inRecursionStack[vertex] = false;\r\n }",
"private Queue<Integer> breadthSearch(int i, int j, Queue<Integer> queue, Queue<Integer> path) {\n while(queue.size() != 0) {\n queue.poll();\n }//while\n return new LinkedList();\n }",
"private static void spreadVirus(int v){\n Queue<Integer> queue = new LinkedList<>();\n queue.add(v);\n while(!queue.isEmpty()){\n int temp = queue.poll();\n isVisited[temp]=true;\n for(int i = 1; i<adj[temp].length;i++){\n if(isVisited[i]==false && adj[temp][i]==1){\n queue.add(i);\n isVisited[i]=true;\n maxContamination++;\n }\n }\n }\n }",
"public void BFS() {\n visitedCells = 1;\n\n // Initialize the vertices\n for (int j = 0; j < maze.getGrid().length; j++) {\n for (int k = 0; k < maze.getGrid().length; k++) {\n Cell cell = maze.getGrid()[j][k];\n cell.setColor(\"WHITE\");\n cell.setDistance(0);\n cell.setParent(null);\n }\n }\n\n Cell sourceCell = maze.getGrid()[0][0];\n Cell neighbor = null;\n Cell currentCell;\n int distance = 0;\n\n // Initialize the source node\n sourceCell.setColor(\"GREY\");\n sourceCell.setDistance(0);\n sourceCell.setParent(null);\n\n queue.add(sourceCell);\n\n // Visits each cell until the queue is empty\n while (!queue.isEmpty()) {\n currentCell = queue.remove();\n\n for (int i = 0; i < currentCell.mazeNeighbors.size(); i++) {\n neighbor = currentCell.mazeNeighbors.get(i);\n\n // Stop the search if you reach the final cell\n if (neighbor.x == r - 1 && neighbor.y == r - 1) {\n distance++;\n if (distance == 10)\n distance = 0;\n neighbor.setDistance(distance);\n neighbor.setParent(currentCell);\n neighbor.visited = true;\n visitedCells++;\n break;\n }\n\n // Checks each neighbor and adds it to the queue if its color is white\n if (neighbor.getColor().equalsIgnoreCase(\"WHITE\")) {\n distance++;\n if (distance == 10)\n distance = 0;\n neighbor.setColor(\"GREY\");\n neighbor.setDistance(distance);\n neighbor.setParent(currentCell);\n neighbor.visited = true;\n queue.add(neighbor);\n visitedCells++;\n }\n }\n // Stop the search if you reach the final cell\n if (neighbor.x == r - 1 && neighbor.y == r - 1)\n break;\n\n currentCell.setColor(\"BLACK\");\n }\n }",
"private static void initGraphCheck(int V) {\r\n\t\tdfs_num = new int[V];\r\n\t\tArrays.fill(dfs_num, DFS_WHITE);// reinicio a no visitado\r\n\t\tnumComp = 0;\r\n\t\tdfs_parent = new int[V];\r\n\t\tArrays.fill(dfs_parent, -1);\r\n\r\n\t\tprintThis(\"Graph Edges Property Check\");\r\n\t\tfor (int i = 0; i < V; i++) {\r\n\t\t\tif (dfs_num[i] == DFS_WHITE) {\r\n\t\t\t\tSystem.out.printf(\"Component %d:\\n\", ++numComp);\r\n\t\t\t\tgraphCheck(i);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public int [] breadthFirstSearch (int start){\r\n int [] visited = new int[getNumV()];\r\n int[] order = new int[getNumV()];\r\n int index = 0;\r\n int[] parent = new int[getNumV()];\r\n\r\n // parent arrayi, visited arrayi ve order arrayi set edildi\r\n for(int i = start; i<getNumV(); i++){\r\n parent[i] = -1;\r\n visited[i] = -1;\r\n order[index] = i;\r\n index++;\r\n }\r\n //eger baslanilan vertex sifirdan farkli bir vertex ise bu vertex'e kadar ki vertexler de order arrayine eklendi.\r\n if(index<getNumV()-1)\r\n for(int i=0; i<start; i++){\r\n order[index] = i;\r\n index++;\r\n }\r\n\r\n // her vertex uzerinden breadthFirsSearch yapildi.\r\n for(int i = 0; i<getNumV(); i++) {\r\n if(visited[i] == -1)\r\n breadthFirstSearch(order[i], visited, parent);\r\n }\r\n return parent;\r\n }",
"static void bridge()\n {\n // Mark all the vertices as not visited\n boolean visited[] = new boolean[V];\n int disc[] = new int[V];\n int low[] = new int[V];\n int parent[] = new int[V];\n \n \n // Initialize parent and visited, and ap(articulation point)\n // arrays\n for (int i = 0; i < V; i++)\n {\n parent[i] = NIL;\n }\n \n // Call the recursive helper function to find Bridges\n // in DFS tree rooted with vertex 'i'\n for (int i = 0; i < V; i++)\n if (!visited[i])\n bridgeUtil(i, visited, disc, low, parent);\n }",
"private static void bfs(int idx) {\n\t\t\n\t\tQueue<node> q =new LinkedList<node>();\n\t\tq.add(new node(idx,0,\"\"));\n\t\twhile (!q.isEmpty()) {\n\t\t\tnode tmp = q.poll();\n\t\t\tif(tmp.idx<0 ||tmp.idx > 200000) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif(tmp.cnt> min) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif(tmp.idx == k) {\n\t\t\t\tif(tmp.cnt < min) {\n\t\t\t\t\tmin = tmp.cnt;\n\t\t\t\t\tminnode = tmp;\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif(!visit[tmp.idx] && tmp.idx<=100000) {\n\t\t\t\tvisit[tmp.idx]= true;\n\t\t\t\tq.add(new node(tmp.idx*2, tmp.cnt+1,tmp.s));\n\t\t\t\tq.add(new node(tmp.idx-1, tmp.cnt+1,tmp.s));\n\t\t\t\tq.add(new node(tmp.idx+1, tmp.cnt+1,tmp.s));\n\t\t\t}\n\t\t}\n\t\t\n\t}",
"static void dfs(int x, int p, int f, int s, int v, int c) {\n\t\t\n\t\tif (p >= mins[0] && f >= mins[1] && s >= mins[2] && v >= mins[3]) {\n\t\t\tif (c<min) {\n\t\t\t\tres = new int[list.size()];\n\t\t\t\tfor (int i=0;i<list.size();i++) {\n\t\t\t\t\tres[i] = list.get(i);\n\t\t\t\t}\n\t\t\t\tmin = c;\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\tSystem.out.println(list);\n\t\tfor (int i = x; i < N; i++) {\n\t\t\tif (!visited[i]) {\n\t\t\t\tlist.add(i);\n\t\t\t\tvisited[i] = true;\n\t\t\t\tdfs(i + 1, p + info[i][0], f + info[i][1], s + info[i][2], v + info[i][3], c + info[i][4]);\n\t\t\t\tlist.remove(list.size() - 1);\n\t\t\t\tvisited[i] = false;\n\t\t\t}\n\t\t}\n\t}",
"public void DFS() {\r\n for (int i = 0; i < vertexNum; i++) {\r\n DFS(i);\r\n }\r\n }",
"public boolean IsCyclic() {\r\n\t\tHashMap<String, Boolean> processed = new HashMap<>();\r\n\t\tLinkedList<Pair> queue = new LinkedList<>();\r\n\r\n\t\tArrayList<String> vnames = new ArrayList<>(vces.keySet());\r\n\t\tfor (String vname : vnames) {\r\n\t\t\tif (processed.containsKey(vname)) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tPair rootpair = new Pair(vname, vname);\r\n\t\t\tqueue.addLast(rootpair);\r\n\t\t\twhile (queue.size() != 0) {\r\n\t\t\t\t// 1. removeFirst\r\n\t\t\t\tPair rp = queue.removeFirst();\r\n\r\n\t\t\t\t// 2. check if processed, mark if not\r\n\t\t\t\tif (processed.containsKey(rp.vname)) {\r\n\t\t\t\t\tSystem.out.println(rp.vname + \" via \" + rp.psf);\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t\tprocessed.put(rp.vname, true);\r\n\r\n\t\t\t\t// 3. Check, if an edge is found\r\n\t\t\t\tSystem.out.println(rp.vname + \" via \" + rp.psf);\r\n\r\n\t\t\t\t// 4. Add the unprocessed nbrs back\r\n\t\t\t\tArrayList<String> nbrnames = new ArrayList<>(rp.vtx.nbrs.keySet());\r\n\t\t\t\tfor (String nbrname : nbrnames) {\r\n\t\t\t\t\tif (!processed.containsKey(nbrname)) {\r\n\t\t\t\t\t\tPair np = new Pair(nbrname, rp.psf + nbrname);\r\n\t\t\t\t\t\tqueue.addLast(np);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint tc = sc.nextInt();\n\t\tfor (int T = 0; T < tc; T++) {\n\t\t\tint V = sc.nextInt();\n\t\t\tint E = sc.nextInt();\n\t\t\tint[][] graph = new int[V][V];\n\t\t\tfor (int i = 0; i < E; i++) {\n\t\t\t\tint start = sc.nextInt();\n\t\t\t\tint end = sc.nextInt();\n\t\t\t\tgraph[start][end] = 1;\n\t\t\t\t// graph[end][start] = 1;\n\t\t\t}\n\n\t\t\tfront = 0;\n\t\t\tstack = new int[V];\n\t\t\tjava.util.Arrays.fill(stack, -1);\n\t\t\tvisited = new int[V];\n\t\t\tfound = false;\n\t\t\tint src = 0;\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tfor (int i = 0; i < V; i++) {\n\t\t\t\t\n\t\t\t\tif(found == false && visited[i] ==0){\n\t\t\t\t\tstack[front++] = i;\n\t\t\t\t\tDFS(graph,i);\n\t\t\t\t}\n\t\t\t\tif(found == true)\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tif(found == true){\n\t\t\t\tSystem.out.println(\"Found\");\n\t\t\t\tfor (int j = 0; j < front; j++) {\n\t\t\t\t\tSystem.out.println(stack[j]);\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tSystem.out.println(\"Not Found\");\n\t\t\t}\n\t\t}\n\t}"
] | [
"0.6702221",
"0.66072524",
"0.6546889",
"0.64396995",
"0.6273907",
"0.6204036",
"0.6184727",
"0.6180022",
"0.6072474",
"0.605994",
"0.59938765",
"0.59790736",
"0.59743494",
"0.5973729",
"0.59674215",
"0.59508413",
"0.5933823",
"0.59232134",
"0.5885832",
"0.5881077",
"0.58790207",
"0.587896",
"0.5821541",
"0.58084583",
"0.5791848",
"0.5780318",
"0.5773826",
"0.5744447",
"0.57370687",
"0.5722941",
"0.57125694",
"0.570882",
"0.5692255",
"0.56649345",
"0.56423426",
"0.5627436",
"0.5616329",
"0.5615715",
"0.5614153",
"0.5590917",
"0.55690277",
"0.5562905",
"0.55514973",
"0.55500734",
"0.55430716",
"0.5527249",
"0.5500894",
"0.54958326",
"0.54905",
"0.5488021",
"0.54772323",
"0.54762346",
"0.54744506",
"0.5464847",
"0.5463273",
"0.5438333",
"0.54278857",
"0.5418282",
"0.54082865",
"0.54023194",
"0.5393712",
"0.5386708",
"0.5384383",
"0.53827363",
"0.53801686",
"0.5374156",
"0.53713614",
"0.53654325",
"0.5360051",
"0.53566545",
"0.53453106",
"0.53415453",
"0.5337512",
"0.53298724",
"0.5326939",
"0.5324169",
"0.53217155",
"0.5319228",
"0.53189933",
"0.5318569",
"0.53164214",
"0.5315154",
"0.5313356",
"0.52923054",
"0.52904904",
"0.52901345",
"0.5281521",
"0.5280308",
"0.5279081",
"0.52786696",
"0.5267517",
"0.52589685",
"0.525167",
"0.52509075",
"0.5248966",
"0.52375025",
"0.52352285",
"0.52315295",
"0.5231285",
"0.52298397"
] | 0.5898343 | 18 |
TRAVERSAL2 IMPORT: label (String) EXPORT: queue (DSAQueue) ASSERTION: breadthFirstSearch takes start and target parameters TODO: not correct algorithm Throws: NoSuchElementException | public DSAQueue breadthFirstSearch(String start, String target)
{
if(!vertices.isEmpty())
{
DSAQueue queue = new DSAQueue();
DSAStack visited = new DSAStack(); //creates empty stack
DSAGraphVertex vx = getVertex(start); //vertex to start on (root)
DSAGraphVertex dest = getVertex(target); //vertex to start on (dest)
clear(); //sets all visited on all vertices == false
vx.setVisited(); // Marks root as visited
queue.enqueue(vx); //adds start point to queue
bfs(vx, visited, queue, dest); //begin recursion
queue.enqueue(dest); //if successful adds destination to queue
return queue;
}
else
{
throw new NoSuchElementException("List is empty or start or end elements don't exist");
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String breadthFirstSearch( AnyType start_vertex ) throws VertexException {\n \n StringBuffer buffer = new StringBuffer();\n \n // ----------------------------\n // TODO: Add your code here\n // ----------------------------\n boolean exists = false;\n Vertex<AnyType> S = new Vertex<AnyType>(start_vertex);\n int counter = 1;\n //make new vertex to check if its in list\n //make queue to hold vertices\n SemiConstantTimeQueue<Vertex<AnyType>> queue = new SemiConstantTimeQueue<Vertex<AnyType>>();\n //loop through and set not visited\n for( int i = 0; i < vertex_adjacency_list.size(); i++){\n vertex_adjacency_list.get(i).setVisited(-1);\n //if it's in list then set exists to true\n //and set visited \n if(vertex_adjacency_list.get(i).compareTo(S) == 0){\n exists = true;\n vertex_adjacency_list.get(i).setVisited(counter);\n counter = i;\n }\n } \n //if doesn't exist then throw the exception\n if(exists == false){\n throw new VertexException(\"Start Vertex does not exist\");\n }\n //make new queue\n queue.add(vertex_adjacency_list.get(counter));\n vertex_adjacency_list.get(counter).setVisited(1);\n counter = 1;\n int k=0;\n Vertex<AnyType>e;\n //while the queue isn't empty\n while(queue.peek() !=null){\n //make e the top of the queue \n e = queue.peek(); \n //go through the list and if you reach the begining it exits loop\n for( k = 0; k < vertex_adjacency_list.size()-1; k++){\n if(vertex_adjacency_list.get(k).compareTo(e)==0){\n break;\n }\n } \n //go through loop and check if visited, if not then add it to queue, set visited\n for( int j = 0; j< vertex_adjacency_list.get(k).numberOfAdjacentVertices(); j++){\n if(vertex_adjacency_list.get(k).getAdjacentVertex(j).hasBeenVisited()==false){\n counter++;\n queue.add(vertex_adjacency_list.get(k).getAdjacentVertex(j));\n vertex_adjacency_list.get(k).getAdjacentVertex(j).setVisited(counter);\n }\n }\n //remove from queue when through loop once\n k++;\n queue.remove();\n }\n //loop through list and print vertex and when it was visited\n for(int o = 0; o< vertex_adjacency_list.size(); o++){\n buffer.append(vertex_adjacency_list.get(o) + \":\" + vertex_adjacency_list.get(o).getVisited()+ \"\\n\");\n }\n return buffer.toString();\n }",
"private Queue<Integer> breadthSearch(int i, int j, Queue<Integer> queue, Queue<Integer> path) {\n while(queue.size() != 0) {\n queue.poll();\n }//while\n return new LinkedList();\n }",
"public int breadthFirstSearch(T srcId, T destId)\n {\n if (nodeList.isEmpty())\n {\n System.out.println(\"Empty graph\");\n return -1;\n }\n \n // queue used during the traversal\n LinkedList<QueueNode> queue = new LinkedList();\n \n // keeps track of node which are visited and added into the queue\n HashMap<T, Integer> visited = new HashMap();\n \n // find srcNode with id = srcId in graph\n GraphNode srcNode = nodeList.get(srcId);\n \n // if srcNode is not there in graph, breadth first traversal which starts at srcNode cannot be done \n if (srcNode == null)\n {\n System.out.println(\"Source vertex not found\");\n return -1;\n }\n \n int minNumberTrials = -1;\n \n // add srcNode in queue, mark it as visited\n queue.add(new QueueNode(srcNode, 0));\n visited.put(srcNode.nodeId, 1);\n \n while (!queue.isEmpty())\n {\n QueueNode currentNode = queue.remove();\n \n // if destination node found\n if (currentNode.graphNode.nodeId == destId)\n {\n minNumberTrials = currentNode.level;\n break;\n }\n \n // first neighbor of current graph node\n GraphNode neighbor = currentNode.graphNode.next;\n \n // add all neighbors of current graph node into the queue\n while (neighbor != null)\n {\n // if this neighbor is not visited earlier, mark it as visited\n // add it to the queue at appropriate level\n if (visited.get(neighbor.nodeId) == null)\n {\n visited.put(neighbor.nodeId, 1);\n queue.add(new QueueNode(findGraphNode(neighbor.nodeId), currentNode.level + 1));\n }\n neighbor = neighbor.next; \n }\n }\n \n return minNumberTrials;\n }",
"public static void main(String[] args) {\n\n BDNode a = new BDNode(\"A\");\n BDNode b = new BDNode(\"B\");\n BDNode c = new BDNode(\"C\");\n BDNode d = new BDNode(\"D\");\n BDNode e = new BDNode(\"E\");\n\n a.link(b);\n a.link(d);\n b.link(a);\n b.link(c);\n b.link(e);\n c.link(b);\n c.link(d);\n d.link(a);\n d.link(c);\n d.link(e);\n e.link(b);\n e.link(d);\n\n BDNode target = e;\n\n/*\n // BFS\n Queue<BDNode> queue = new LinkedList<>();\n queue.offer(a);\n\n while(!queue.isEmpty()) {\n BDNode n = queue.poll();\n n.visit();\n System.out.println(n); // 찾는 여정 출력\n\n if(n.equals(target)) {\n System.out.println(\"BFS Found! \" + n);\n break;\n }\n\n for (BDNode l : n.links) {\n if(l.isVisited()) continue;\n if (queue.contains(l)) continue;\n queue.offer(l);\n }\n\n // 위랑 같은 표현\n// n.links.stream()\n// .filter(l -> !queue.contains(l))\n// .forEach(queue::offer);\n }\n*/\n\n // DFS\n Stack<BDNode> stack = new Stack<>();\n stack.push(a);\n\n while(!stack.isEmpty()) {\n BDNode n = stack.pop();\n n.visit();\n System.out.println(n); // 찾는 여정 출력\n\n if (n.equals(target)) {\n System.out.println(\"DFS Found! \" + n);\n break;\n }\n\n for (BDNode l : n.links) {\n if (l.isVisited()) continue;\n if (stack.contains(l)) continue;\n\n stack.push(l);\n }\n }\n\n\n }",
"private void breadthFirstSearch (int start, int[] visited, int[] parent){\r\n Queue< Integer > theQueue = new LinkedList< Integer >();\r\n boolean[] identified = new boolean[getNumV()];\r\n identified[start] = true;\r\n theQueue.offer(start);\r\n while (!theQueue.isEmpty()) {\r\n int current = theQueue.remove();\r\n visited[current] = 1; //ziyaret edilmis vertexler queuedan cikarilan vertexlerdir\r\n Iterator < Edge > itr = edgeIterator(current);\r\n while (itr.hasNext()) {\r\n Edge edge = itr.next();\r\n int neighbor = edge.getDest();\r\n if (!identified[neighbor]) {\r\n identified[neighbor] = true;\r\n theQueue.offer(neighbor);\r\n parent[neighbor] = current;\r\n }\r\n }\r\n }\r\n }",
"private static int breadthFirstSearch(Vertex start) throws Queue.UnderflowException, Queue.EmptyException {\n boolean visited[] = new boolean[48];\n //Keep a queue of vertecies and a queue of the depth of the verticies - they will be added to and poped from identically\n ListQueue<Vertex> queue = new ListQueue<Vertex>();\n ListQueue<Integer> numQueue = new ListQueue<Integer>();\n //Set the starting node as visited\n visited[start.index()] = true;\n queue.enqueue(start);\n numQueue.enqueue(new Integer(1));\n\n //Keep last\n int last = -1;\n //While the queue isnt empty\n while (!queue.isEmpty()) {\n //Pop off the top from both queues and mark as visited\n start = queue.dequeue();\n int current = numQueue.dequeue();\n visited[start.index] = true;\n //For all neigbors\n for (Vertex v : start.neighbors) {\n //If we havent visited it make sure to visit it\n if (visited[v.index()] == false) {\n //As we keep adding new nodes to visit keep track of the depth\n queue.enqueue(v);\n numQueue.enqueue(current + 1);\n }\n }\n //Keep track of the most recent depth before we pop it off (queue will be empty when we exit)\n last = current;\n }\n //Return the max of the depth\n return last;\n }",
"public void search(IndexShort < O > index, short range, short k)\n throws Exception {\n // assertEquals(index.aDB.count(), index.bDB.count());\n // assertEquals(index.aDB.count(), index.bDB.count());\n // index.stats();\n index.resetStats();\n // it is time to Search\n int querySize = 1000; // amount of elements to read from the query\n String re = null;\n logger.info(\"Matching begins...\");\n File query = new File(testProperties.getProperty(\"test.query.input\"));\n File dbFolder = new File(testProperties.getProperty(\"test.db.path\"));\n BufferedReader r = new BufferedReader(new FileReader(query));\n List < OBPriorityQueueShort < O >> result = new LinkedList < OBPriorityQueueShort < O >>();\n re = r.readLine();\n int i = 0;\n long realIndex = index.databaseSize();\n\n while (re != null) {\n String line = parseLine(re);\n if (line != null) {\n OBPriorityQueueShort < O > x = new OBPriorityQueueShort < O >(\n k);\n if (i % 100 == 0) {\n logger.info(\"Matching \" + i);\n }\n\n O s = factory.create(line);\n if (factory.shouldProcess(s)) {\n if(i == 279){\n System.out.println(\"hey\");\n }\n index.searchOB(s, range, x);\n result.add(x);\n i++;\n }\n }\n if (i == querySize) {\n logger.warn(\"Finishing test at i : \" + i);\n break;\n }\n re = r.readLine();\n }\n \n logger.info(index.getStats().toString());\n \n int maxQuery = i;\n // logger.info(\"Matching ends... Stats follow:\");\n // index.stats();\n\n // now we compare the results we got with the sequential search\n Iterator < OBPriorityQueueShort < O >> it = result.iterator();\n r.close();\n r = new BufferedReader(new FileReader(query));\n re = r.readLine();\n i = 0;\n while (re != null) {\n String line = parseLine(re);\n if (line != null) {\n if (i % 300 == 0) {\n logger.info(\"Matching \" + i + \" of \" + maxQuery);\n }\n O s = factory.create(line);\n if (factory.shouldProcess(s)) {\n OBPriorityQueueShort < O > x2 = new OBPriorityQueueShort < O >(\n k);\n searchSequential(realIndex, s, x2, index, range);\n OBPriorityQueueShort < O > x1 = it.next();\n //assertEquals(\"Error in query line: \" + i + \" slice: \"\n // + line, x2, x1); \n \n assertEquals(\"Error in query line: \" + i + \" \" + index.debug(s) + \"\\n slice: \"\n + line + \" \" + debug(x2,index ) + \"\\n\" + debug(x1,index), x2, x1);\n\n i++;\n }\n \n }\n if (i == querySize) {\n logger.warn(\"Finishing test at i : \" + i);\n break;\n }\n re = r.readLine();\n }\n r.close();\n logger.info(\"Finished matching validation.\");\n assertFalse(it.hasNext());\n }",
"@Override\r\n public boolean breadthFirstSearch(T start, T end) {\r\n Vertex<T> startV = vertices.get(start);\r\n Vertex<T> endV = vertices.get(end);\r\n\r\n Queue<Vertex<T>> queue = new LinkedList<Vertex<T>>();\r\n Set<Vertex<T>> visited = new HashSet<>();\r\n\r\n queue.add(startV);\r\n visited.add(startV);\r\n\r\n while(queue.size() > 0){\r\n Vertex<T> next = queue.poll();\r\n if(next == null){\r\n continue;\r\n }\r\n if(next == endV){\r\n return true;\r\n }\r\n\r\n for (Vertex<T> neighbor: next.getNeighbors()){\r\n if(!visited.contains(neighbor)){\r\n visited.add(neighbor);\r\n queue.add(neighbor);\r\n }\r\n }\r\n }\r\n\r\n return false;\r\n }",
"public static void main(String[] args) \t{\n\n\t\tif (args.length!=7){\n\t\t\tSystem.out.println(\"\\nUsage: java SortGreedy_BLikeness inFile n SA beta part_size part_option q\");\n\t\t\tSystem.out.println(\"\\t inFile: input file name (path included).\");\n\t\t\tSystem.out.println(\"\\t n: number of tuples in inFile.\");\n\t\t\t//System.out.println(\"\\t d: dimensionality of the dataset.\");\n\t\t\tSystem.out.println(\"\\t SA: index of sensitive attribute [0 -- d-1].\");\n\t\t\tSystem.out.println(\"\\t l: beta: B-likeness parameter.\");\n\t\t\tSystem.out.println(\"\\t part_size: size of the bucket partitions.\");\n\t\t\tSystem.out.println(\"\\t part_option: 0 (safer, keeps all SAs distributions), or\");\n\t\t\tSystem.out.println(\"\\t 1 (better utility, but may cause problems), or \");\n\t\t\tSystem.out.println(\"\\t 2 (no bucket partitioning).\\n\");\n\t\t\tSystem.out.println(\"\\t q: 1 with queries, 0 without\\n\");\n\t\t\t//\t\t\tSystem.out.println(\"\\t th: distance threshold to place chunk in bucket, in [0, 1].\");\n\t\t\treturn;\n\t\t}\n\n\t\tString inputFile = args[0];\n\t\ttuples = Integer.parseInt(args[1]); // n\n\t\t//dims = Integer.parseInt(args[2]); //d\n\t\tSA = Integer.parseInt(args[2]); //Sensitive Attribute (0 - 7).\n\t\tb_param = Double.parseDouble(args[3]); // beta\n\t\tpartition_size = Integer.parseInt(args[4]);\n\t\tpartition_function = Integer.parseInt(args[5]);\n\t\tq = Boolean.parseBoolean(args[6]);\n\t\t//\t\tthreshold = Double.parseDouble(args[7]);\n\t\torigTuples = tuples;\n\n\t\t/*\n\t\tint modl = (tuples % l_param);\n\t\tif (modl > 0){\n\t\t\t//change n (#tuples), so that it is divided by l:\n\t\t\ttuples = tuples + (l_param - modl);\n\t\t\tfor (int i=0; i<dims-1; i++)\n\t\t\t\tcardinalities[1]++;\n\t\t}\n\t\tmap = new short[tuples][dims];\n\t\tbuckets = new short[l_param][tuples/l_param][dims];\n\t\t */\n\t\tmap = new short[tuples][dims];\n\t\tMinMaxPerAttribute = new int[dims][2];\n\n\t\tlong startTime = System.currentTimeMillis();\n\t\ttry {\n\t\t\tCensusParser tp = new CensusParser(inputFile, dims);\n\t\t\tint i=0;\n\t\t\twhile (tp.hasNext()){\n\t\t\t\tmap[i++]=tp.nextTuple2();\n\t\t\t\tfor (int j=0; j<dims; j++){\n\t\t\t\t\tif (map[i-1][j] < MinMaxPerAttribute[j][0]){ //min\n\t\t\t\t\t\tMinMaxPerAttribute[j][0] = map[i-1][j];\n\t\t\t\t\t}\n\t\t\t\t\tif (map[i-1][j] > MinMaxPerAttribute[j][1]){ //max\n\t\t\t\t\t\tMinMaxPerAttribute[j][1] = map[i-1][j];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t/*\n\t\tif (modl > 0){\n\t\t\t//add dummy tuples:\n\t\t\tfor(int i=(tuples-(l_param-modl)); i<tuples; i++){\n\t\t\t\tfor(int j=0; j<dims; j++){\n\t\t\t\t\tif (j == dims-1){\n\t\t\t\t\t\tmap[i][j] = -1; //unique SA\n\t\t\t\t\t}else{\n\t\t\t\t\t\tmap[i][j] = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t */\n\t\tlong midTime = System.currentTimeMillis();\n\t\tdimension_sort();//sort the dimensions\n\t\tLikenessBuckets bk = new LikenessBuckets(b_param, tuples, dims, map, buckets, 0, inputFile);\n\t\tbuckets = bk.bucketization(SA);\n\t\t//bk.printBuckets();\n\n\t\tlong bucketEndTime = System.currentTimeMillis();\n\t\tSystem.out.println(\"Time of reading dataset: \"+(midTime - startTime)+\" miliseconds.\");\n\t\tSystem.out.println(\"Time of creating buckets: \"+(bucketEndTime - midTime)+\" miliseconds.\");\n\t\t//bk.printBuckets();\n\n\t\tmap=null; //delete map\n\t\tSystem.gc();\n\n\n\t\tbucket_size = bk.bucketSize;//bucket capacity (c).\n\t\tbuckNum = bk.buckNum; //number of buckets (|B|).\n\t\tSystem.out.println(\"Number of buckets:\"+buckNum);\n\t\t//update \"tuples\" number, taking into account the dummies:\n\t\ttuples = (bucket_size * buckNum);\n\n\t\tfinal_assignment = new int[tuples][buckNum];\n\n\t\tdouble distortion = 0.0;\n\t\tint chunk_size;\n\n\t\t/*\n\t\t * Sort groups of same-SA tuples in each bucket, wrt QIDs.\n\t\t * Then form bucket partitions, keeping SA distributions.\n\t\t */\n\t\tif (partition_function == 0)\n\t\t\tbucket_partition(bucket_size, bk); //keep all SAs distrubutions.\n\t\telse if (partition_function == 1){\n\t\t\tbucket_partition2(bucket_size, bk); //only keep 1st SA distribution.\n\t\t} //else NO_PARTITION //default.\n\t\tSystem.gc();\n\t\t//bk.printBuckets();\n\n\t\tif((partition_function == 0) || (partition_function == 1)){ //partitioned buckets:\n\n\t\t\tfor (int bucket_index=0; bucket_index<buckNum; bucket_index++){\n\n\t\t\t\tint chunk_offset = 0;\n\t\t\t\tfor (int chunk_index=0; chunk_index<chunk_sizes.size(); chunk_index++){\n\t\t\t\t\tchunk_size = chunk_sizes.get(chunk_index);\n\n\t\t\t\t\t//edges = new HeapNode[chunk_size*chunk_size*2];\n\t\t\t\t\tedges = new HeapNode[chunk_size*chunk_size];\n\n\t\t\t\t\t//we need SA, too!\n\t\t\t\t\tif (MIXED){\n\t\t\t\t\t\tMinMaxPerAssign = new int[chunk_size][dims-1][2];\n\t\t\t\t\t\tdistinctValuesPerAssign = (LinkedList<Integer>[][]) new LinkedList[chunk_size][dims];\n\t\t\t\t\t}else{\n\t\t\t\t\t\tif (RANGE){\n\t\t\t\t\t\t\tMinMaxPerAssign = new int[chunk_size][dims-1][2];\n\t\t\t\t\t\t\tdistinctValues1 = (LinkedList<Integer>[]) new LinkedList[chunk_size];\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tdistinctValuesPerAssign = (LinkedList<Integer>[][]) new LinkedList[chunk_size][dims];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t//HeapComparator hc = new HeapComparator();\n\t\t\t\t\tdouble[][] array = computeCostMatrix(buckets[bucket_index],buckets[(bucket_index+1)%buckNum], bucket_index*bucket_size, chunk_offset, chunk_size);\n\t\t\t\t\tint[] assignment = new int[array.length];\n\t\t\t\t\tint times = 0;\n\n\t\t\t\t\twhile (++times<buckNum){\n\t\t\t\t\t\t//qSort(0, chunk_size*chunk_size-1);\n\t\t\t\t\t\tqSort(0, edge_size-1);\n\t\t\t\t\t\tgreedyAssign(array, assignment, chunk_size);//Call SortGreedy algorithm.\n\n\t\t\t\t\t\tfor (int i=0; i<assignment.length; i++){\n\t\t\t\t\t\t\tfinal_assignment[i+chunk_offset+bucket_index*bucket_size][times] = bucketToIndexMapping((bucket_index+times)%buckNum,(chunk_offset+assignment[i]));\n\t\t\t\t\t\t\tif (MIXED){\n\t\t\t\t\t\t\t\tfindSet_mixed(i, buckets[(bucket_index+times)%buckNum][chunk_offset+assignment[i]] );\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\tif (RANGE)\n\t\t\t\t\t\t\t\t\tfindSet_numerical(i, buckets[(bucket_index+times)%buckNum][chunk_offset+assignment[i]]);\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\tfindSet(i,buckets[(bucket_index+times)%buckNum][chunk_offset+assignment[i]]);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (times!=buckNum-1)\n\t\t\t\t\t\t\trecomputeCostMatrix(array, (bucket_index+times+1)%buckNum, chunk_offset, chunk_size);\n\t\t\t\t\t}\n\t\t\t\t\tfor (int i=0; i<chunk_size; i++){\n\t\t\t\t\t\tif (MIXED){\n\t\t\t\t\t\t\tdistortion += NCP_mixed(MinMaxPerAssign[i], distinctValuesPerAssign[i]);\n\t\t\t\t\t\t}else\n\t\t\t\t\t\t\tif (RANGE)\n\t\t\t\t\t\t\t\tdistortion += NCP_numerical(MinMaxPerAssign[i]);\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\tdistortion += NCP(distinctValuesPerAssign[i]);\n\t\t\t\t\t}\n\t\t\t\t\tchunk_offset += chunk_size;\n\t\t\t\t}\n\t\t\t}\n\t\t}else{ //No partitioning:\n\t\t\tfor (int bucket_index=0; bucket_index<buckNum; bucket_index++){\n\n\t\t\t\t//edges = new HeapNode[bucket_size*bucket_size*2];\n\t\t\t\tedges = new HeapNode[bucket_size*bucket_size];\n\t\t\t\t//we need SA, too!\n\t\t\t\tif (MIXED){\n\t\t\t\t\tMinMaxPerAssign = new int[bucket_size][dims-1][2];\n\t\t\t\t\tdistinctValuesPerAssign = (LinkedList<Integer>[][]) new LinkedList[bucket_size][dims];\n\t\t\t\t}else{\n\t\t\t\t\tif (RANGE){\n\t\t\t\t\t\tMinMaxPerAssign = new int[bucket_size][dims-1][2];\n\t\t\t\t\t\tdistinctValues1 = (LinkedList<Integer>[]) new LinkedList[bucket_size];\n\t\t\t\t\t}else{\n\t\t\t\t\t\tdistinctValuesPerAssign = (LinkedList<Integer>[][]) new LinkedList[bucket_size][dims];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//HeapComparator hc = new HeapComparator();\n\t\t\t\tdouble[][] array = computeCostMatrix(buckets[bucket_index],buckets[(bucket_index+1)%buckNum], bucket_index*bucket_size, 0, bucket_size);\n\n\t\t\t\tint[] assignment = new int[array.length];\n\t\t\t\tint times = 0;\n\n\t\t\t\twhile (++times<buckNum){\n\t\t\t\t\t//qSort(0, bucket_size*bucket_size-1);\n\t\t\t\t\tqSort(0, edge_size-1);\n\t\t\t\t\tgreedyAssign(array, assignment, bucket_size);//Call SortGreedy algorithm.\n\n\t\t\t\t\tfor (int i=0; i<assignment.length; i++){\n\t\t\t\t\t\tfinal_assignment[i+bucket_index*bucket_size][times] = bucketToIndexMapping((bucket_index+times)%buckNum, assignment[i]);\n\t\t\t\t\t\tif (MIXED){\n\t\t\t\t\t\t\tfindSet_mixed(i, buckets[(bucket_index+times)%buckNum][assignment[i]] );\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tif (RANGE)\n\t\t\t\t\t\t\t\tfindSet_numerical(i, buckets[(bucket_index+times)%buckNum][assignment[i]]);\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\tfindSet(i,buckets[(bucket_index+times)%buckNum][assignment[i]]);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (times!=buckNum-1)\n\t\t\t\t\t\trecomputeCostMatrix(array, (bucket_index+times+1)%buckNum, 0, bucket_size);\n\t\t\t\t}\n\t\t\t\tfor (int i=0; i<bucket_size; i++){\n\t\t\t\t\tif (MIXED){\n\t\t\t\t\t\tdistortion += NCP_mixed(MinMaxPerAssign[i], distinctValuesPerAssign[i]);\n\t\t\t\t\t}else\n\t\t\t\t\t\tif (RANGE)\n\t\t\t\t\t\t\tdistortion += NCP_numerical(MinMaxPerAssign[i]);\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tdistortion += NCP(distinctValuesPerAssign[i]);\n\t\t\t\t}\n\t\t\t}\n\t\t}//endif (partition or no_partition)\n\n\t\t//**** BEGIN XUE MINGQIANG **** //\n\t\t// this call returns a random assignment generated from the k-regular matching graph\n\t\tint [] rand_A = Randomization.run(final_assignment, 0, final_assignment.length, buckNum);\n\t\t//**** END XUE MINGQIANG **** //\n\t\tlong endTime = System.currentTimeMillis();\n\n\t\t//System.out.println(\"The winning assignment after \"+index+\" runs (\" + sumType + \" sum) is:\\n\");\t\n\n\t\t/*\n\t\tfor (int i=0; i<final_assignment.length; i++){\n\t\t\tfor (int j=0; j<buckNum; j++){\n\t\t\t\tSystem.out.print((final_assignment[i][j] +1)+\" \");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t\t */\n\n\t\tSystem.out.println(\"Time: \"+(endTime - startTime)+\"ms \"+\"\\n Distortion \"+ (double)(distortion/((dims-1)*tuples)));\n\n\t\tSystem.out.println(\"Saving results.\");\n\t\t//Save Results:\n\t\tFileWriter fw = null;\n\t\ttry{\n\t\t\tfw = new FileWriter(\"./SortGreedyResults.txt\",true); //true == append\n\t\t\tfw.write(origTuples+\" \"+b_param+\" \");\n\t\t\tif((partition_function == 0) || (partition_function == 1)){\n\t\t\t\tfw.write(partition_size+\" \");\n\t\t\t}else{\n\t\t\t\tfw.write(bucket_size+\" \");\n\t\t\t}\n\t\t\tfw.write((endTime - startTime)+\" \"\n\t\t\t\t\t+((double)(distortion/((dims-1)*tuples)))+\"\\n\");\n\t\t}catch(IOException ioe){\n\t\t\tSystem.err.println(\"IOException: \" + ioe.getMessage());\n\t\t}finally{\n\t\t\ttry{\n\t\t\t\tif(fw != null) fw.close();\n\t\t\t}catch(Exception e){\n\t\t\t\t//ignore.\n\t\t\t}\n\t\t}\n\t\tif (!q){\n\t\t\tSystem.out.println(\"Range Queries.\");\n\t\t\tdouble[] selectivities = {0.05, 0.1, 0.15, 0.2, 0.25};\n\t\t\tString qErr = \"\";\n\t\t\tFileWriter qw = null;\n\t\t\ttry{\n\t\t\t\tint qtimes = 1000; //numer of random queries.\n\t\t\t\tdouble[] errArray = new double[qtimes];\n\t\t\t\tqw = new FileWriter(\"./SortGreedy_QueryError.txt\",true); //true == append\n\t\t\t\t//qw.write(\"#tuples beta size lamda sel error\\n\");\n\t\t\t\t/*\n\t\t\tfor (int i=0; i<selectivities.length; i++){\n\t\t\t\tfor (int l=1; l<dims; l++){\n\t\t\t\t\tqw.write(origTuples+\" \"+b_param+\" \"+bucket_size+\" \"+\n\t\t\t\t\t\t\t l+\" \"+selectivities[i]+\" \");\n\t\t\t\t\tdouble[][] tmpres = new double[l+1][2];\n\t\t\t\t\tqErr = rangeQueries(selectivities[i], l, tmpres, qtimes);\n\t\t\t\t\tqw.write(qErr+\" \\n\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t\t */\n\t\t\t\t//sel=0.1\n\t\t\t\tdouble[][] tmpres = new double[dims][2];\n\n\t\t\t\tSystem.out.println(\"Vary lambda (sel=0.1): \");\n\t\t\t\tfor (int l=1; l<dims; l++){\n\t\t\t\t\tqw.write(origTuples+\" \"+b_param+\" \"+bucket_size+\" \"+\n\t\t\t\t\t\t\tl+\" \"+selectivities[1]+\" \");\n\t\t\t\t\tfor (int qi=0; qi<dims; qi++){ //INITIALIZATION:\n\t\t\t\t\t\ttmpres[qi][0] = (double)MinMaxPerAttribute[qi][0]-1;//<min SA value.\n\t\t\t\t\t\ttmpres[qi][1] = (double)MinMaxPerAttribute[qi][1]+1;//>max SA value\n\t\t\t\t\t}\n\n\t\t\t\t\tqErr = rangeQueries_serial(selectivities[1], l, tmpres, qtimes, errArray);\n\t\t\t\t\tqw.write(qErr+\" \\n\");\n\t\t\t\t}\n\n\t\t\t\tqw.write(\"\\n\");\n\t\t\t\tSystem.out.println(\"Vary selectivity (lambda=3): \");\n\t\t\t\tint l=3; //lambda = 3 first QIs.\n\t\t\t\tfor (int i=0; i<selectivities.length; i++){\n\t\t\t\t\tqw.write(origTuples+\" \"+b_param+\" \"+bucket_size+\" \"+\n\t\t\t\t\t\t\tl+\" \"+selectivities[i]+\" \");\n\t\t\t\t\tfor (int qi=0; qi<dims; qi++){ //INITIALIZATION:\n\t\t\t\t\t\ttmpres[qi][0] = (double)MinMaxPerAttribute[qi][0]-1;//<min SA value.\n\t\t\t\t\t\ttmpres[qi][1] = (double)MinMaxPerAttribute[qi][1]+1;//>max SA value\n\t\t\t\t\t}\n\n\t\t\t\t\tqErr = rangeQueries_serial(selectivities[i], l, tmpres, qtimes, errArray);\n\t\t\t\t\tqw.write(qErr+\" \\n\");\n\t\t\t\t}\n\n\t\t\t\tqw.write(\"\\n\");\n\t\t\t}catch(IOException ioe){\n\t\t\t\tSystem.err.println(\"IOException: \" + ioe.getMessage());\n\t\t\t}finally{\n\t\t\t\ttry{\n\t\t\t\t\tif(qw != null) qw.close();\n\t\t\t\t}catch(Exception e){\n\t\t\t\t\tSystem.err.println(e.getMessage());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t}",
"public static void breadthFirstSearch (HashMap<String, Zpair> stores,\n HashSet<Zpair> visited,\n List<Integer> sortedQueue) {\n List<String> q = new ArrayList<String>();\n q.add(\"Q\");\n // k=0\n //int k = 0;\n while(q.size() != 0) {\n //if(k == 21) {\n // System.exit(20);\n // }\n List<StringBuffer> path = new ArrayList<StringBuffer>(); // this is the return string\n List<String> q1 = new ArrayList<String>();\n int size = q.size();\n //System.out.println(k);\n for(int i = 0; i < size; i++) {\n //printList(q);\n path.add(ZMethods.stringPop(q));\n execute(path.get(i), stores, visited, q1, sortedQueue);\n }\n copyStringBuffer(q1,q);\n //k++;\n }\n }",
"private static void breadthFirstSearch(int source, ArrayList<ArrayList<Integer>> nodes) {\n\t\tArrayList<ArrayList<Integer>> neighbours = nodes;\n\t\tQueue<Integer> queue= new LinkedList<Integer>();\n\t\t\n\t\tboolean[] visited = new boolean[nodes.size()];\n\t\t\n\t\tqueue.add(source);\n\t\tvisited[source]=true;\n\t\t\n\t\twhile(!queue.isEmpty()) {\n\t\t\tint k =queue.remove();\n\t\t\tSystem.out.println(k);\n\t\t\tfor(int p : nodes.get(k)) {\n\t\t\t\tif(!visited[p]) {\n\t\t\t\t\tqueue.add(p);\n\t\t\t\t\tvisited[p]=true;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t}",
"static void bfs(String label) {\n\n /* Add a graph node to the queue. */\n queue.addLast(label);\n graphVisited.put(label, true);\n\n while (!queue.isEmpty()) {\n\n /* Take a node out of the queue and add it to the list of visited nodes. */\n if (!graphVisited.containsKey(queue.getFirst()))\n graphVisited.put(queue.getFirst(), true);\n\n String str = queue.removeFirst();\n\n /*\n For each unvisited vertex from the list of the adjacent vertices,\n add the vertex to the queue.\n */\n for (String lab : silhouette.get(str)) {\n if (!graphVisited.containsKey(lab) && lab != null && !queue.contains(lab))\n queue.addLast(lab);\n }\n }\n }",
"public void breadthFirstSearch(){\n Deque<Node> q = new ArrayDeque<>(); // In an interview just write Queue ? Issue is java 8 only has priority queue, \n // meaning I have to pass it a COMPARABLE for the Node class\n if (this.root == null){\n return;\n }\n \n q.add(this.root);\n while(q.isEmpty() == false){\n Node n = (Node) q.remove();\n System.out.print(n.val + \", \");\n if (n.left != null){\n q.add(n.left);\n }\n if (n.right != null){\n q.add(n.right);\n }\n }\n }",
"public void bfs(Queue<Integer> queue, int visited[]) {\n if (queue.isEmpty()) {\n return;\n }\n\n int root = queue.poll();\n\n if (visited[root] == 1) {\n bfs(queue, visited);\n return;//alreadu into consideration\n }\n\n\n System.out.printf(\"Exploring of node %d has started\\n\", root);\n visited[root] = 1;\n\n\n for (int i = 0; i < adjMatrix[root].size(); i++) {\n if (visited[adjMatrix[root].get(i)] == 1 || visited[adjMatrix[root].get(i)] == 2) {\n continue;\n }\n queue.add(adjMatrix[root].get(i));\n }\n bfs(queue, visited);\n System.out.printf(\"Exploring of node %d has end\\n\", root);\n visited[root] = 2;\n }",
"void testSearches(Tester t) {\n Vertex v1 = new Vertex(10, 10);\n Vertex v2 = new Vertex(10, 11);\n Vertex v3 = new Vertex(10, 12);\n\n Edge e1 = new Edge(v1, v2, 1);\n Edge e2 = new Edge(v2, v3, 1);\n\n IList<Vertex> map = new Cons<Vertex>(v1, new Cons<Vertex>(v2, new Cons<Vertex>(\n v3, new Empty<Vertex>())));\n\n Player player = new Player(map);\n DepthFirst dp = new DepthFirst(map);\n BreadthFirst bp = new BreadthFirst(map);\n\n t.checkExpect(player.current, v1);\n t.checkExpect(player.finished, false);\n\n t.checkExpect(bp.hasNext(), true);\n t.checkExpect(bp.next(), new Queue<Vertex>());\n\n t.checkExpect(dp.hasNext(), true);\n t.checkExpect(dp.next(), new Stack<Vertex>());\n\n t.checkExpect(player.move(true, e1), v2);\n\n t.checkExpect(player.current, v2);\n t.checkExpect(player.finished, false);\n\n t.checkExpect(bp.hasNext(), false);\n t.checkExpect(bp.next(), v3);\n\n t.checkExpect(dp.hasNext(), false);\n t.checkExpect(dp.next(), v3);\n\n t.checkExpect(player.move(true, e2), v3);\n\n player.finished = true;\n\n t.checkExpect(player.current, v3);\n t.checkExpect(player.finished, true);\n\n Queue<Vertex> q = new Queue<Vertex>(map);\n\n q.enqueue(new Vertex(5, 5));\n\n Deque<Vertex> dq = new Deque<Vertex>();\n dq.addAtHead(v1);\n dq.addAtTail(v2);\n dq.addAtTail(new Vertex(5, 5));\n\n\n t.checkExpect(q.isEmpty(), false);\n t.checkExpect(q.contents, dq);\n\n Stack<Vertex> stack = new Stack<Vertex>(map);\n\n t.checkExpect(stack.isEmpty(), false);\n dq.removeFromHead();\n t.checkExpect(stack.pop(), dq);\n\n t.checkExpect(dp.next(), v2);\n t.checkExpect(bp.hasNext(), true);\n\n }",
"void BFS(int s, int d) \r\n { \r\n int source = s;\r\n int destination = d;\r\n boolean visited[] = new boolean[V];\r\n int parent[] = new int[V];\r\n \r\n // Create a queue for BFS \r\n LinkedList<Integer> queue = new LinkedList<Integer>(); \r\n \r\n // Mark the current node as visited and enqueue it \r\n \r\n visited[s]=true; \r\n queue.add(s); \r\n System.out.println(\"Search Nodes: \");\r\n while (queue.size() != 0) \r\n { \r\n int index = 0;\r\n \r\n // Dequeue a vertex from queue and print it \r\n \r\n s = queue.poll();\r\n \r\n System.out.print(convert2(s)); \r\n \r\n if(s == destination)\r\n {\r\n break;\r\n }\r\n \r\n System.out.print(\" -> \");\r\n while(index < adj[s].size()) \r\n { \r\n \r\n \r\n int n = adj[s].get(index); \r\n if (!visited[n]) \r\n { \r\n visited[n] = true;\r\n parent[n] = s;\r\n queue.add(n); \r\n }\r\n index = index+ 2;\r\n \r\n \r\n }\r\n \r\n \r\n \r\n }\r\n int check = destination;\r\n int cost = 0, first, second = 0;\r\n String string = \"\" + convert2(check);\r\n while(check!=source)\r\n {\r\n \r\n first = parent[check];\r\n string = convert2(first) + \" -> \" + string;\r\n while(adj[first].get(second) != check)\r\n {\r\n second++;\r\n }\r\n cost = cost + adj[first].get(second +1);\r\n check = first;\r\n second = 0;\r\n \r\n }\r\n \r\n System.out.println(\"\\n\\nPathway: \");\r\n \r\n System.out.println(string);\r\n \r\n \r\n System.out.println(\"\\nTotal cost: \" + cost);\r\n }",
"@Override\n List<NodeData> pathFind() throws NoPathException {\n System.out.println(\"Starting Scenic\");\n\n frontier.add(start);\n\n while(!frontier.isEmpty()) {\n StarNode current = frontier.getLast();\n frontier.removeLast(); // pop the priority queue\n if(current.getXCoord() == goal.getXCoord() && current.getYCoord() == goal.getYCoord()) {\n // If we are at the goal, we need to backtrack through the shortest path\n System.out.println(\"At target!\");\n finalList.add(current); // we have to add the goal to the path before we start backtracking\n while(!(current.getXCoord() == start.getXCoord() && current.getYCoord() == start.getYCoord())) {\n finalList.add(current.getPreviousNode());\n current = current.getPreviousNode();\n System.out.println(current.getNodeID());\n }\n return finalList;\n }\n else {\n // we need to get all the neighbor nodes, identify their costs, and put them into the queue\n LinkedList<StarNode> neighbors = current.getNeighbors();\n // we also need to remove the previous node from the list of neighbors because we do not want to backtrack\n neighbors.remove(current.getPreviousNode());\n\n for (StarNode newnode : neighbors) {\n int nodePlace = this.listContainsId(frontier, newnode);\n if(nodePlace > -1) {\n if (frontier.get(nodePlace).getF() > actionCost(newnode) + distanceToGo(newnode, goal)) {\n System.out.println(\"Here\");\n frontier.remove(frontier.get(nodePlace));\n newnode.setPreviousNode(current);\n frontier.add(newnode);\n newnode.setF(actionCost(newnode) + distanceToGo(newnode, goal));\n }\n }\n else {\n newnode.setPreviousNode(current);\n frontier.add(newnode);\n newnode.setF(actionCost(newnode) + distanceToGo(newnode, goal));\n }\n\n // This fixes the problem with infinitely looping elevators (I hope)\n if(current.getNodeType().equals(\"ELEV\") && newnode.getNodeType().equals(\"ELEV\")) {\n for (Iterator<StarNode> iterator = newnode.neighbors.iterator(); iterator.hasNext();) {\n StarNode newneighbor = iterator.next();\n if (newneighbor.getNodeType().equals(\"ELEV\")) {\n // Remove the current element from the iterator and the list.\n iterator.remove();\n }\n }\n }\n if(current.getNodeType().equals(\"STAI\") && newnode.getNodeType().equals(\"STAI\")) {\n for (Iterator<StarNode> iterator = newnode.neighbors.iterator(); iterator.hasNext();) {\n StarNode newneighbor = iterator.next();\n if (newneighbor.getNodeType().equals(\"STAI\")) {\n // Remove the current element from the iterator and the list.\n iterator.remove();\n }\n }\n }\n // this is where the node is put in the right place in the queue\n Collections.sort(frontier);\n }\n }\n }\n throw new NoPathException(start.getLongName(), goal.getLongName());\n }",
"private int BFS() {\n adjList.cleanNodeFields();\n\n //Queue for storing current shortest path\n Queue<Node<Integer, Integer>> q = new LinkedList<>();\n\n //Set source node value to 0\n q.add(adjList.getNode(startNode));\n q.peek().key = 0;\n q.peek().d = 0;\n q.peek().visited = true;\n\n //Helper variables\n LinkedList<Pair<Node<Integer, Integer>, Integer>> neighbors;//Array of pairs <neighborKey, edgeWeight>\n Node<Integer, Integer> neighbor, u;\n long speed = (long) (cellSideLength * 1.20);\n\n while (!isCancelled() && q.size() != 0) {\n u = q.poll();\n\n //Marks node as checked\n checkedNodesGC.fillRect((u.value >> 16) * cellSideLength + 0.5f,\n (u.value & 0x0000FFFF) * cellSideLength + 0.5f,\n (int) cellSideLength - 1, (int) cellSideLength - 1);\n\n //endNode found\n if (u.value == endNode) {\n //Draws shortest path\n Node<Integer, Integer> current = u, prev = u;\n\n while ((current = current.prev) != null) {\n shortestPathGC.strokeLine((prev.value >> 16) * cellSideLength + cellSideLength / 2,\n (prev.value & 0x0000FFFF) * cellSideLength + cellSideLength / 2,\n (current.value >> 16) * cellSideLength + cellSideLength / 2,\n (current.value & 0x0000FFFF) * cellSideLength + cellSideLength / 2);\n prev = current;\n }\n return u.d;\n }\n\n //Wait after checking node\n try {\n Thread.sleep(speed);\n } catch (InterruptedException interrupted) {\n if (isCancelled())\n break;\n }\n\n //Checking Neighbors\n neighbors = adjList.getNeighbors(u.value);\n for (Pair<Node<Integer, Integer>, Integer> neighborKeyValuePair : neighbors) {\n neighbor = neighborKeyValuePair.getKey();\n //Relaxation step\n //Checks if neighbor hasn't been checked, if so the assign the shortest path\n if (!neighbor.visited) {\n //Adds checked neighbor to queue\n neighbor.key = u.d + 1;\n neighbor.d = u.d + 1; //Assign shorter path found to neighbor\n neighbor.prev = u;\n neighbor.visited = true;\n q.add(neighbor);\n }\n }\n }\n return Integer.MAX_VALUE;\n }",
"public static void main(String[] args) throws ParallelException {\r\n\t\tif (args.length < 2) {\r\n\t\t\tSystem.err.println(\"usage: java -cp <classpath> <graphfile> <k> \"+\r\n\t\t\t\t \"[numinitnodes] [numiterations] \"+\r\n\t\t\t\t \"[do_local_search] [num_dls_threads] \"+\r\n\t\t\t\t \"[max_allowed_time_millis] [use_N2RXP_4_DLS]\");\r\n\t\t\tSystem.exit(-1);\r\n\t\t}\r\n try {\r\n long st = System.currentTimeMillis();\r\n Graph g = DataMgr.readGraphFromFile2(args[0]);\r\n\t\t\tint k = Integer.parseInt(args[1]);\r\n double best = 0;\r\n boolean do_local_search = false;\r\n\t\t\tboolean use_N2RXP_4_ls = false;\r\n int num_threads = 1;\r\n\t\t\tlong max_time_ms = Long.MAX_VALUE; // indicates the max allowed time to run (in millis)\r\n GRASPPacker p = new GRASPPacker(g,k);\r\n Set init=null;\r\n int num_iters = 1;\r\n if (args.length>2) {\r\n int numinit = 0;\r\n try {\r\n numinit = Integer.parseInt(args[2]);\r\n if (numinit<0) numinit=0; // ignore wrong option value and continue\r\n }\r\n catch (ClassCastException e) {\r\n e.printStackTrace(); // ignore wrong option value and continue\r\n }\r\n Graph gp = p._g;\r\n int gsz = gp.getNumNodes();\r\n init = k==2 ? new TreeSet(new NodeComparator2()) : new TreeSet(new NodeComparator4());\r\n\t\t\t\tRandom rnd = RndUtil.getInstance().getRandom();\r\n for (int i=0; i<numinit; i++) {\r\n int nid = rnd.nextInt(gsz);\r\n Node n = gp.getNodeUnsynchronized(nid);\r\n init.add(n);\r\n }\r\n if (args.length>3) {\r\n try {\r\n num_iters = Integer.parseInt(args[3]);\r\n if (num_iters<0) num_iters = 0;\r\n }\r\n catch (ClassCastException e) {\r\n e.printStackTrace(); // ignore wrong option value and continue\r\n }\r\n if (args.length>4) {\r\n do_local_search = \"true\".equals(args[4]);\r\n if (args.length>5) {\r\n try {\r\n num_threads = Integer.parseInt(args[5]);\r\n\t\t\t\t\t\t\t\tif (args.length>6) {\r\n\t\t\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\t\t\tmax_time_ms = Long.parseLong(args[6]);\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\tcatch (Exception e) {\r\n\t\t\t\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\tif (args.length>7)\r\n\t\t\t\t\t\t\t\t\t\tuse_N2RXP_4_ls = \"true\".equals(args[7]);\r\n\t\t\t\t\t\t\t\t}\r\n }\r\n catch (Exception e) {\r\n e.printStackTrace(); // ignore wrong option and continue\r\n }\r\n }\r\n }\r\n }\r\n }\r\n Set best_found = null;\r\n\t\t\tif (max_time_ms<0) // -1 or any negative value indicates +Inf\r\n\t\t\t\tmax_time_ms = Long.MAX_VALUE;\r\n\t\t\tboolean cont = true;\r\n\t\t\tTimerThread t = new TimerThread(max_time_ms, cont);\r\n\t\t\tt.start();\r\n for (int i=0; i<num_iters && t.doContinue(); i++) {\r\n\t\t\t\tSystem.err.println(\"GRASPPacker: starting iteration \"+i);\r\n Set s = p.pack(init); // Set<Node>\r\n if (do_local_search) {\r\n // convert s to Set<Integer>\r\n Set nodeids = new IntSet();\r\n Iterator iter = s.iterator();\r\n while (iter.hasNext()) {\r\n Node n = (Node) iter.next();\r\n Integer nid = new Integer(n.getId());\r\n nodeids.add(nid);\r\n }\r\n // now do the local search\r\n DLS dls = new DLS();\r\n AllChromosomeMakerIntf movesmaker;\r\n\t\t\t\t\tif (use_N2RXP_4_ls) movesmaker = new IntSetN2RXPGraphAllMovesMaker(k);\r\n\t\t\t\t\telse movesmaker = new IntSetN1RXPFirstImprovingGraphAllMovesMakerMT(k);\r\n IntSetNeighborhoodFilterIntf filter = new GRASPPackerIntSetNbrhoodFilter2(k);\r\n //FunctionIntf f = k==2 ? new SetSizeEvalFunction() : new SetWeightEvalFunction(g);\r\n FunctionIntf f;\r\n if (k==2) f = new SetSizeEvalFunction();\r\n else f = new SetWeightEvalFunction(g);\r\n HashMap dlsparams = new HashMap();\r\n dlsparams.put(\"dls.movesmaker\",movesmaker);\r\n dlsparams.put(\"dls.x0\", nodeids);\r\n dlsparams.put(\"dls.numthreads\", new Integer(num_threads));\r\n dlsparams.put(\"dls.maxiters\", new Integer(10)); // itc: HERE rm asap\r\n dlsparams.put(\"dls.graph\", g);\r\n dlsparams.put(\"dls.intsetneighborhoodfilter\", filter);\r\n //dlsparams.put(\"dls.createsetsperlevellimit\", new Integer(100));\r\n dls.setParams(dlsparams);\r\n PairObjDouble pod = dls.minimize(f);\r\n Set sn = (Set) pod.getArg();\r\n if (sn!=null) {\r\n s.clear();\r\n Iterator sniter = sn.iterator();\r\n while (sniter.hasNext()) {\r\n Integer id = (Integer) sniter.next();\r\n Node n = g.getNode(id.intValue());\r\n s.add(n);\r\n }\r\n }\r\n }\r\n int iter_best = s.size();\r\n double iter_w_best = 0.0;\r\n Iterator it = s.iterator();\r\n while (it.hasNext()) {\r\n Node n = (Node) it.next();\r\n Double nwD = n.getWeightValueUnsynchronized(\"value\"); // used to be n.getWeightValue(\"value\");\r\n double nw = nwD==null ? 1.0 : nwD.doubleValue();\r\n iter_w_best += nw;\r\n }\r\n System.err.println(\"GRASPPacker.main(): iter: \"+i+\": soln size found=\"+iter_best+\" soln weight=\"+iter_w_best);\r\n if (iter_w_best > best) {\r\n best_found = s;\r\n best = iter_w_best;\r\n }\r\n }\r\n long tot = System.currentTimeMillis()-st;\r\n System.out.println(\"Final Best soln found=\"+best+\" total time=\"+tot+\" (msecs)\");\r\n if (p.isFeasible(best_found)) {\r\n System.out.println(\"feasible soln: \"+printNodes(best_found));\r\n }\r\n else System.err.println(\"infeasible soln\");\r\n // write solution to file\r\n PrintWriter pw = new PrintWriter(new FileWriter(\"sol.out\"));\r\n pw.println(best);\r\n Iterator it = best_found.iterator();\r\n while (it.hasNext()) {\r\n Node n = (Node) it.next();\r\n pw.println((n.getId()+1));\r\n }\r\n pw.flush();\r\n pw.close();\r\n }\r\n catch (Exception e) {\r\n e.printStackTrace();\r\n System.exit(-1);\r\n }\r\n }",
"public interface WorkAheadQueueADT<T> extends QueueADT<T> {\n \n /**\n * Removes and returns the element that is at place x in the queue.\n * Precondition: x must be less than 3, x must be less than size\n * Note: indexing from 0: 0 == front element, 1 == second element, etc.\n * @param x the passed in index of the element to be removed\n * @return the element removed from the queue\n * @throws EmptyCollectionException if the queue is empty\n * @throws InvalidArgumentException if x > 2, or x > size of collection\n * \n */\n public T dequeue(int x) throws EmptyCollectionException, \n InvalidArgumentException;\n \n /**\n * Returns (without removing) the element that is at place x in the queue.\n * Precondition: x must be less than 3, x must be less than size\n * Note: indexing from 0: 0 == front element, 1 == second element, etc.\n * @return the element at the front of the queue\n * @throws EmptyCollectionException if the queue is empty\n * @throws InvalidArgumentException if x > 2, or x > size of collection\n * @param x the specified index of the element to return\n */\n public T first(int x)throws EmptyCollectionException, \n InvalidArgumentException;\n \n /**\n * Returns an ArrayList of the first three nodes in the queue.\n * @return ArrayList<LinearNode<T>> array list of nodes\n * @throws EmptyCollectionException if the queue is empty\n */\n public ArrayList<LinearNode<T>> firstThreeNodes() throws \n EmptyCollectionException;\n \n /**\n * Returns an ArrayList of the first three elements in the queue.\n * @return ArrayList<T> array list of elements\n * @throws EmptyCollectionException if the queue is empty\n */\n public ArrayList<T> firstThreeElements() throws EmptyCollectionException;\n}",
"@Override\r\n\tpublic boolean BFS(E src) {\r\n\t\tif(containsVertex(src)) {\r\n\t\t\tVertex<E> s = vertices.get(src);\r\n\t\t\tlastSrc = s;\r\n\t\t\tvertices.forEach((E e, Vertex<E> u) -> {\r\n\t\t\t\tu.setColor(Color.WHITE);\r\n\t\t\t\tu.setDistance(Integer.MAX_VALUE);\r\n\t\t\t\tu.setPredecessor(null);\r\n\t\t\t});\r\n\t\t\ts.setColor(Color.GRAY);\r\n\t\t\ts.setDistance(0);\r\n\t\t\t//s.predecessor is already null so skip that step\r\n\t\t\tQueue<Vertex<E>> queue = new Queue<>();\r\n\t\t\tqueue.enqueue(s);\r\n\t\t\ttry {\r\n\t\t\t\twhile(!queue.isEmpty()) {\r\n\t\t\t\t\tVertex<E> u = queue.dequeue();\r\n\t\t\t\t\tArrayList<Edge<E>> adj = adjacencyLists.get(u.getElement());\r\n\t\t\t\t\tfor(Edge<E> ale: adj) {\r\n\t\t\t\t\t\tVertex<E> v = vertices.get(ale.getDst());\r\n\t\t\t\t\t\tif(v.getColor() == Color.WHITE) {\r\n\t\t\t\t\t\t\tv.setColor(Color.GRAY);\r\n\t\t\t\t\t\t\tv.setDistance(u.getDistance()+1);\r\n\t\t\t\t\t\t\tv.setPredecessor(u);\r\n\t\t\t\t\t\t\tqueue.enqueue(v);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tu.setColor(Color.BLACK);\r\n\t\t\t\t}\r\n\t\t\t} catch (Exception emptyQueueException) {\r\n\t\t\t\t//-_-\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"public static void main(String[] args) throws IOException {\n\n // check for correct number of arguments\n if (args.length > constants.TREEQUERY_MAX_ARG_COUNT || args.length < constants.TREEQUERY_MIN_ARG_COUNT) {\n System.out.println(\"Error: Incorrect number of arguments were input\");\n return;\n }\n\n int pageSize;\n String start_index = args[0].replace('_',' ');\n // allowing range query with arguments length\n Key start_key = new Key(start_index), end_key = null;\n if(args.length == constants.TREEQUERY_MAX_ARG_COUNT) {\n String end_index = args[1].replace('_', ' ');\n end_key = new Key(end_index);\n pageSize = Integer.parseInt(args[constants.TREEQUERY_MAX_PAGE_SIZE_ARG]);\n }else\n pageSize = Integer.parseInt(args[constants.TREEQUERY_MIN_PAGE_SIZE_ARG]);\n\n String datafile = \"heap.\" + pageSize;\n String treefile = String.format(\"bptree.%d\", pageSize);\n\n long startTime = 0;\n long finishTime = 0;\n long tree_start = 0, tree_end = 0;\n\n int numBytesIntField = Integer.BYTES;\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"MM/dd/yyyy hh:mm:ss a\");\n\n FileInputStream inStream = null;\n FileInputStream inStream_tree = null;\n try{\n File file = new File(datafile);\n inStream = new FileInputStream(file);\n inStream_tree = new FileInputStream(treefile);\n\n // calculate tree degree\n int degree = (int) Math.sqrt((double) file.length()/pageSize);\n tree_start = System.nanoTime();\n BPlusTree tree = new BPlusTree(degree, pageSize);\n // construct tree from tree file\n tree.construct(inStream_tree);\n tree_end = System.nanoTime();\n\n // start query\n startTime = System.nanoTime();\n\n byte[] sdtnameBytes = new byte[constants.STD_NAME_SIZE];\n byte[] idBytes = new byte[constants.ID_SIZE];\n byte[] dateBytes = new byte[constants.DATE_SIZE];\n byte[] yearBytes = new byte[constants.YEAR_SIZE];\n byte[] monthBytes = new byte[constants.MONTH_SIZE];\n byte[] mdateBytes = new byte[constants.MDATE_SIZE];\n byte[] dayBytes = new byte[constants.DAY_SIZE];\n byte[] timeBytes = new byte[constants.TIME_SIZE];\n byte[] sensorIdBytes = new byte[constants.SENSORID_SIZE];\n byte[] sensorNameBytes = new byte[constants.SENSORNAME_SIZE];\n byte[] countsBytes = new byte[constants.COUNTS_SIZE];\n RandomAccessFile raf = new RandomAccessFile(datafile, \"r\");\n // range query\n if(end_key!=null) {\n // Range query can have more than one results, using ArrayList to save\n ArrayList<Integer> result = tree.query(start_key, end_key);\n if (!result.isEmpty()){\n result.forEach(p -> {\n try {\n // random access file seek to the point we want\n raf.seek(p);\n // retrieve the whole data from this point\n byte[] data = new byte[constants.TOTAL_SIZE];\n raf.read(data);\n /*\n * Fixed Length Records (total size = 112 bytes):\n * SDT_NAME field = 24 bytes, offset = 0\n * id field = 4 bytes, offset = 24\n * date field = 8 bytes, offset = 28\n * year field = 4 bytes, offset = 36\n * month field = 9 bytes, offset = 40\n * mdate field = 4 bytes, offset = 49\n * day field = 9 bytes, offset = 53\n * time field = 4 bytes, offset = 62\n * sensorid field = 4 bytes, offset = 66\n * sensorname field = 38 bytes, offset = 70\n * counts field = 4 bytes, offset = 108\n *\n * Copy the corresponding sections of \"page\" to the individual field byte arrays\n */\n System.arraycopy(data, 0, sdtnameBytes, 0, constants.STD_NAME_SIZE);\n System.arraycopy(data, constants.STD_NAME_SIZE, idBytes, 0, numBytesIntField);\n System.arraycopy(data, constants.DATE_OFFSET, dateBytes, 0, constants.DATE_SIZE);\n System.arraycopy(data, constants.YEAR_OFFSET, yearBytes, 0, numBytesIntField);\n System.arraycopy(data, constants.MONTH_OFFSET, monthBytes, 0, constants.MONTH_SIZE);\n System.arraycopy(data, constants.MDATE_OFFSET, mdateBytes, 0, numBytesIntField);\n System.arraycopy(data, constants.DAY_OFFSET, dayBytes, 0, constants.DAY_SIZE);\n System.arraycopy(data, constants.TIME_OFFSET, timeBytes, 0, numBytesIntField);\n System.arraycopy(data, constants.SENSORID_OFFSET, sensorIdBytes, 0, numBytesIntField);\n System.arraycopy(data, constants.SENSORNAME_OFFSET, sensorNameBytes, 0, constants.SENSORNAME_SIZE);\n System.arraycopy(data, constants.COUNTS_OFFSET, countsBytes, 0, numBytesIntField);\n\n // Convert long data into Date object\n Date date = new Date(ByteBuffer.wrap(dateBytes).getLong());\n String sdtNameString = new String(sdtnameBytes);\n\n // Get a string representation of the record for printing to stdout\n String record = sdtNameString.trim() + \",\" + ByteBuffer.wrap(idBytes).getInt()\n + \",\" + dateFormat.format(date) + \",\" + ByteBuffer.wrap(yearBytes).getInt() +\n \",\" + new String(monthBytes).trim() + \",\" + ByteBuffer.wrap(mdateBytes).getInt()\n + \",\" + new String(dayBytes).trim() + \",\" + ByteBuffer.wrap(timeBytes).getInt()\n + \",\" + ByteBuffer.wrap(sensorIdBytes).getInt() + \",\" +\n new String(sensorNameBytes).trim() + \",\" + ByteBuffer.wrap(countsBytes).getInt();\n System.out.println(record);\n } catch (IOException e) {\n e.printStackTrace();\n }\n });\n System.out.printf(\"\\nRange query result: %d records found.\\n\", result.size());\n }\n }else {\n // equal query\n int result = tree.query(start_key);\n if (result!=-1) {\n try {\n // same as Range query\n raf.seek(result);\n byte[] data = new byte[constants.TOTAL_SIZE];\n raf.read(data);\n /*\n * Fixed Length Records (total size = 112 bytes):\n * SDT_NAME field = 24 bytes, offset = 0\n * id field = 4 bytes, offset = 24\n * date field = 8 bytes, offset = 28\n * year field = 4 bytes, offset = 36\n * month field = 9 bytes, offset = 40\n * mdate field = 4 bytes, offset = 49\n * day field = 9 bytes, offset = 53\n * time field = 4 bytes, offset = 62\n * sensorid field = 4 bytes, offset = 66\n * sensorname field = 38 bytes, offset = 70\n * counts field = 4 bytes, offset = 108\n *\n * Copy the corresponding sections of \"page\" to the individual field byte arrays\n */\n System.arraycopy(data, 0, sdtnameBytes, 0, constants.STD_NAME_SIZE);\n System.arraycopy(data, constants.STD_NAME_SIZE, idBytes, 0, numBytesIntField);\n System.arraycopy(data, constants.DATE_OFFSET, dateBytes, 0, constants.DATE_SIZE);\n System.arraycopy(data, constants.YEAR_OFFSET, yearBytes, 0, numBytesIntField);\n System.arraycopy(data, constants.MONTH_OFFSET, monthBytes, 0, constants.MONTH_SIZE);\n System.arraycopy(data, constants.MDATE_OFFSET, mdateBytes, 0, numBytesIntField);\n System.arraycopy(data, constants.DAY_OFFSET, dayBytes, 0, constants.DAY_SIZE);\n System.arraycopy(data, constants.TIME_OFFSET, timeBytes, 0, numBytesIntField);\n System.arraycopy(data, constants.SENSORID_OFFSET, sensorIdBytes, 0, numBytesIntField);\n System.arraycopy(data, constants.SENSORNAME_OFFSET, sensorNameBytes, 0, constants.SENSORNAME_SIZE);\n System.arraycopy(data, constants.COUNTS_OFFSET, countsBytes, 0, numBytesIntField);\n\n // Convert long data into Date object\n Date date = new Date(ByteBuffer.wrap(dateBytes).getLong());\n String sdtNameString = new String(sdtnameBytes);\n\n // Get a string representation of the record for printing to stdout\n String record = sdtNameString.trim() + \",\" + ByteBuffer.wrap(idBytes).getInt()\n + \",\" + dateFormat.format(date) + \",\" + ByteBuffer.wrap(yearBytes).getInt() +\n \",\" + new String(monthBytes).trim() + \",\" + ByteBuffer.wrap(mdateBytes).getInt()\n + \",\" + new String(dayBytes).trim() + \",\" + ByteBuffer.wrap(timeBytes).getInt()\n + \",\" + ByteBuffer.wrap(sensorIdBytes).getInt() + \",\" +\n new String(sensorNameBytes).trim() + \",\" + ByteBuffer.wrap(countsBytes).getInt();\n System.out.println(record);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n System.out.println();\n }\n\n finishTime = System.nanoTime();\n }catch (FileNotFoundException e) {\n System.err.println(\"File not found \" + e.getMessage());\n }\n finally {\n\n if (inStream != null) {\n inStream.close();\n }\n if (inStream_tree != null){\n inStream_tree.close();\n }\n }\n\n long treeInMilliseconds = (tree_end - tree_start)/constants.MILLISECONDS_PER_SECOND;\n System.out.println(\"Time taken for constructing B+Tree: \" + treeInMilliseconds + \" ms\");\n long timeInMilliseconds = (finishTime - startTime)/constants.MILLISECONDS_PER_SECOND;\n System.out.println(\"Time taken for query: \" + timeInMilliseconds + \" ms\");\n System.out.println(\"Total Time taken: \" + (treeInMilliseconds + timeInMilliseconds) + \" ms\");\n }",
"private static void bfs(int idx) {\n\t\t\n\t\tQueue<node> q =new LinkedList<node>();\n\t\tq.add(new node(idx,0,\"\"));\n\t\twhile (!q.isEmpty()) {\n\t\t\tnode tmp = q.poll();\n\t\t\tif(tmp.idx<0 ||tmp.idx > 200000) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif(tmp.cnt> min) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif(tmp.idx == k) {\n\t\t\t\tif(tmp.cnt < min) {\n\t\t\t\t\tmin = tmp.cnt;\n\t\t\t\t\tminnode = tmp;\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif(!visit[tmp.idx] && tmp.idx<=100000) {\n\t\t\t\tvisit[tmp.idx]= true;\n\t\t\t\tq.add(new node(tmp.idx*2, tmp.cnt+1,tmp.s));\n\t\t\t\tq.add(new node(tmp.idx-1, tmp.cnt+1,tmp.s));\n\t\t\t\tq.add(new node(tmp.idx+1, tmp.cnt+1,tmp.s));\n\t\t\t}\n\t\t}\n\t\t\n\t}",
"public boolean DijkstraHelp(int src, int dest) {\n PriorityQueue<Entry>queue=new PriorityQueue();//queue storages the nodes that we will visit by the minimum tag\n //WGraph_DS copy = (WGraph_DS) (copy());//create a copy graph that the algorithm will on it\n initializeTag();\n initializeInfo();\n node_info first=this.ga.getNode(src);\n first.setTag(0);//distance from itself=0\n queue.add(new Entry(first,first.getTag()));\n while(!queue.isEmpty()) {\n Entry pair=queue.poll();\n node_info current= pair.node;\n if (current.getInfo() != null) continue;//if we visit we can skip to the next loop because we have already marked\n current.setInfo(\"visited\");//remark the info\n Collection<node_info> listNeighbors = this.ga.getV(current.getKey());//create a collection for the neighbors list\n LinkedList<node_info> Neighbors = new LinkedList<>(listNeighbors);//create the neighbors list\n if (Neighbors == null) continue;\n for(node_info n:Neighbors) {\n\n if(n.getTag()>ga.getEdge(n.getKey(),current.getKey())+current.getTag())\n {\n n.setTag(current.getTag() + ga.getEdge(n.getKey(), current.getKey()));//compute the new tag\n }\n queue.add(new Entry(n,n.getTag()));\n }\n }\n Iterator<node_info> it=this.ga.getV().iterator();\n while(it.hasNext()){\n if(it.next().getInfo()==null) return false;\n }\n return true;\n }",
"public List<Graph> search() {\n\n long start = System.currentTimeMillis();\n TetradLogger.getInstance().log(\"info\", \"Starting ION Search.\");\n logGraphs(\"\\nInitial Pags: \", this.input);\n TetradLogger.getInstance().log(\"info\", \"Transfering local information.\");\n long steps = System.currentTimeMillis();\n\n /*\n * Step 1 - Create the empty graph\n */\n List<Node> varNodes = new ArrayList<>();\n for (String varName : variables) {\n varNodes.add(new GraphNode(varName));\n }\n Graph graph = new EdgeListGraph(varNodes);\n\n /*\n * Step 2 - Transfer local information from the PAGs (adjacencies\n * and edge orientations)\n */\n // transfers edges from each graph and finds definite noncolliders\n transferLocal(graph);\n // adds edges for variables never jointly measured\n for (NodePair pair : nonIntersection(graph)) {\n graph.addEdge(new Edge(pair.getFirst(), pair.getSecond(), Endpoint.CIRCLE, Endpoint.CIRCLE));\n }\n TetradLogger.getInstance().log(\"info\", \"Steps 1-2: \" + (System.currentTimeMillis() - steps) / 1000. + \"s\");\n System.out.println(\"step2\");\n System.out.println(graph);\n\n /*\n * Step 3\n *\n * Branch and prune step that blocks problematic undirectedPaths, possibly d-connecting undirectedPaths\n */\n steps = System.currentTimeMillis();\n Queue<Graph> searchPags = new LinkedList<>();\n // place graph constructed in step 2 into the queue\n searchPags.offer(graph);\n // get d-separations and d-connections\n List<Set<IonIndependenceFacts>> sepAndAssoc = findSepAndAssoc(graph);\n this.separations = sepAndAssoc.get(0);\n this.associations = sepAndAssoc.get(1);\n Map<Collection<Node>, List<PossibleDConnectingPath>> paths;\n// Queue<Graph> step3PagsSet = new LinkedList<Graph>();\n HashSet<Graph> step3PagsSet = new HashSet<>();\n Set<Graph> reject = new HashSet<>();\n // if no d-separations, nothing left to search\n if (separations.isEmpty()) {\n // makes orientations preventing definite noncolliders from becoming colliders\n // do final orientations\n// doFinalOrientation(graph);\n step3PagsSet.add(graph);\n }\n // sets length to iterate once if search over path lengths not enabled, otherwise set to 2\n int numNodes = graph.getNumNodes();\n int pl = numNodes - 1;\n if (pathLengthSearch) {\n pl = 2;\n }\n // iterates over path length, then adjacencies\n for (int l = pl; l < numNodes; l++) {\n if (pathLengthSearch) {\n TetradLogger.getInstance().log(\"info\", \"Braching over path lengths: \" + l + \" of \" + (numNodes - 1));\n }\n int seps = separations.size();\n int currentSep = 1;\n int numAdjacencies = separations.size();\n for (IonIndependenceFacts fact : separations) {\n if (adjacencySearch) {\n TetradLogger.getInstance().log(\"info\", \"Braching over path nonadjacencies: \" + currentSep + \" of \" + numAdjacencies);\n }\n seps--;\n // uses two queues to keep up with which PAGs are being iterated and which have been\n // accepted to be iterated over in the next iteration of the above for loop\n searchPags.addAll(step3PagsSet);\n recGraphs.add(searchPags.size());\n step3PagsSet.clear();\n while (!searchPags.isEmpty()) {\n System.out.println(\"ION Step 3 size: \" + searchPags.size());\n double currentUsage = Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory();\n if (currentUsage > maxMemory) maxMemory = currentUsage;\n // deques first PAG from searchPags\n Graph pag = searchPags.poll();\n // Part 3.a - finds possibly d-connecting undirectedPaths between each pair of nodes\n // known to be d-separated\n List<PossibleDConnectingPath> dConnections = new ArrayList<>();\n // checks to see if looping over adjacencies\n if (adjacencySearch) {\n for (Collection<Node> conditions : fact.getZ()) {\n // checks to see if looping over path lengths\n if (pathLengthSearch) {\n dConnections.addAll(PossibleDConnectingPath.findDConnectingPathsOfLength\n (pag, fact.getX(), fact.getY(), conditions, l));\n } else {\n dConnections.addAll(PossibleDConnectingPath.findDConnectingPaths\n (pag, fact.getX(), fact.getY(), conditions));\n }\n }\n } else {\n for (IonIndependenceFacts allfact : separations) {\n for (Collection<Node> conditions : allfact.getZ()) {\n // checks to see if looping over path lengths\n if (pathLengthSearch) {\n dConnections.addAll(PossibleDConnectingPath.findDConnectingPathsOfLength\n (pag, allfact.getX(), allfact.getY(), conditions, l));\n } else {\n dConnections.addAll(PossibleDConnectingPath.findDConnectingPaths\n (pag, allfact.getX(), allfact.getY(), conditions));\n }\n }\n }\n }\n // accept PAG go to next PAG if no possibly d-connecting undirectedPaths\n if (dConnections.isEmpty()) {\n// doFinalOrientation(pag);\n// Graph p = screenForKnowledge(pag);\n// if (p != null) step3PagsSet.add(p);\n step3PagsSet.add(pag);\n continue;\n }\n // maps conditioning sets to list of possibly d-connecting undirectedPaths\n paths = new HashMap<>();\n for (PossibleDConnectingPath path : dConnections) {\n List<PossibleDConnectingPath> p = paths.get(path.getConditions());\n if (p == null) {\n p = new LinkedList<>();\n }\n p.add(path);\n paths.put(path.getConditions(), p);\n }\n // Part 3.b - finds minimal graphical changes to block possibly d-connecting undirectedPaths\n List<Set<GraphChange>> possibleChanges = new ArrayList<>();\n for (Set<GraphChange> changes : findChanges(paths)) {\n Set<GraphChange> newChanges = new HashSet<>();\n for (GraphChange gc : changes) {\n boolean okay = true;\n for (Triple collider : gc.getColliders()) {\n\n if (pag.isUnderlineTriple(collider.getX(), collider.getY(), collider.getZ())) {\n okay = false;\n break;\n }\n\n }\n if (!okay) {\n continue;\n }\n for (Triple collider : gc.getNoncolliders()) {\n if (pag.isDefCollider(collider.getX(), collider.getY(), collider.getZ())) {\n okay = false;\n break;\n }\n }\n if (okay) {\n newChanges.add(gc);\n }\n }\n if (!newChanges.isEmpty()) {\n possibleChanges.add(newChanges);\n } else {\n possibleChanges.clear();\n break;\n }\n }\n float starthitset = System.currentTimeMillis();\n Collection<GraphChange> hittingSets = IonHittingSet.findHittingSet(possibleChanges);\n recHitTimes.add((System.currentTimeMillis() - starthitset) / 1000.);\n // Part 3.c - checks the newly constructed graphs from 3.b and rejects those that\n // cycles or produce independencies known not to occur from the input PAGs or\n // include undirectedPaths from definite nonancestors\n for (GraphChange gc : hittingSets) {\n boolean badhittingset = false;\n for (Edge edge : gc.getRemoves()) {\n Node node1 = edge.getNode1();\n Node node2 = edge.getNode2();\n Set<Triple> triples = new HashSet<>();\n triples.addAll(gc.getColliders());\n triples.addAll(gc.getNoncolliders());\n if (triples.size() != (gc.getColliders().size() + gc.getNoncolliders().size())) {\n badhittingset = true;\n break;\n }\n for (Triple triple : triples) {\n if (node1.equals(triple.getY())) {\n if (node2.equals(triple.getX()) ||\n node2.equals(triple.getZ())) {\n badhittingset = true;\n break;\n }\n }\n if (node2.equals(triple.getY())) {\n if (node1.equals(triple.getX()) ||\n node1.equals(triple.getZ())) {\n badhittingset = true;\n break;\n }\n }\n }\n if (badhittingset) {\n break;\n }\n for (NodePair pair : gc.getOrients()) {\n if ((node1.equals(pair.getFirst()) && node2.equals(pair.getSecond())) ||\n (node2.equals(pair.getFirst()) && node1.equals(pair.getSecond()))) {\n badhittingset = true;\n break;\n }\n }\n if (badhittingset) {\n break;\n }\n }\n if (!badhittingset) {\n for (NodePair pair : gc.getOrients()) {\n for (Triple triple : gc.getNoncolliders()) {\n if (pair.getSecond().equals(triple.getY())) {\n if (pair.getFirst().equals(triple.getX()) &&\n pag.getEndpoint(triple.getZ(), triple.getY()).equals(Endpoint.ARROW)) {\n badhittingset = true;\n break;\n\n }\n if (pair.getFirst().equals(triple.getZ()) &&\n pag.getEndpoint(triple.getX(), triple.getY()).equals(Endpoint.ARROW)) {\n badhittingset = true;\n break;\n }\n }\n if (badhittingset) {\n break;\n }\n }\n if (badhittingset) {\n break;\n }\n }\n }\n if (badhittingset) {\n continue;\n }\n Graph changed = gc.applyTo(pag);\n // if graph change has already been rejected move on to next graph\n if (reject.contains(changed)) {\n continue;\n }\n // if graph change has already been accepted move on to next graph\n if (step3PagsSet.contains(changed)) {\n continue;\n }\n // reject if null, predicts false independencies or has cycle\n if (predictsFalseIndependence(associations, changed)\n || changed.existsDirectedCycle()) {\n reject.add(changed);\n }\n // makes orientations preventing definite noncolliders from becoming colliders\n // do final orientations\n// doFinalOrientation(changed);\n // now add graph to queue\n\n// Graph p = screenForKnowledge(changed);\n// if (p != null) step3PagsSet.add(p);\n step3PagsSet.add(changed);\n }\n }\n // exits loop if not looping over adjacencies\n if (!adjacencySearch) {\n break;\n }\n }\n }\n TetradLogger.getInstance().log(\"info\", \"Step 3: \" + (System.currentTimeMillis() - steps) / 1000. + \"s\");\n Queue<Graph> step3Pags = new LinkedList<>(step3PagsSet);\n\n /*\n * Step 4\n *\n * Finds redundant undirectedPaths and uses this information to expand the list\n * of possible graphs\n */\n steps = System.currentTimeMillis();\n Map<Edge, Boolean> necEdges;\n Set<Graph> outputPags = new HashSet<>();\n\n while (!step3Pags.isEmpty()) {\n Graph pag = step3Pags.poll();\n necEdges = new HashMap<>();\n // Step 4.a - if x and y are known to be unconditionally associated and there is\n // exactly one trek between them, mark each edge on that trek as necessary and\n // make the tiples on the trek definite noncolliders\n // initially mark each edge as not necessary\n for (Edge edge : pag.getEdges()) {\n necEdges.put(edge, false);\n }\n // look for unconditional associations\n for (IonIndependenceFacts fact : associations) {\n for (List<Node> nodes : fact.getZ()) {\n if (nodes.isEmpty()) {\n List<List<Node>> treks = treks(pag, fact.x, fact.y);\n if (treks.size() == 1) {\n List<Node> trek = treks.get(0);\n List<Triple> triples = new ArrayList<>();\n for (int i = 1; i < trek.size(); i++) {\n // marks each edge in trek as necessary\n necEdges.put(pag.getEdge(trek.get(i - 1), trek.get(i)), true);\n if (i == 1) {\n continue;\n }\n // makes each triple a noncollider\n pag.addUnderlineTriple(trek.get(i - 2), trek.get(i - 1), trek.get(i));\n }\n }\n // stop looping once the empty set is found\n break;\n }\n }\n }\n // Part 4.b - branches by generating graphs for every combination of removing\n // redundant undirectedPaths\n boolean elimTreks;\n // checks to see if removing redundant undirectedPaths eliminates every trek between\n // two variables known to be nconditionally assoicated\n List<Graph> possRemovePags = possRemove(pag, necEdges);\n double currentUsage = Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory();\n if (currentUsage > maxMemory) maxMemory = currentUsage;\n for (Graph newPag : possRemovePags) {\n elimTreks = false;\n // looks for unconditional associations\n for (IonIndependenceFacts fact : associations) {\n for (List<Node> nodes : fact.getZ()) {\n if (nodes.isEmpty()) {\n if (treks(newPag, fact.x, fact.y).isEmpty()) {\n elimTreks = true;\n }\n // stop looping once the empty set is found\n break;\n }\n }\n }\n // add new PAG to output unless a necessary trek has been eliminated\n if (!elimTreks) {\n outputPags.add(newPag);\n }\n }\n }\n outputPags = removeMoreSpecific(outputPags);\n// outputPags = applyKnowledge(outputPags);\n\n TetradLogger.getInstance().log(\"info\", \"Step 4: \" + (System.currentTimeMillis() - steps) / 1000. + \"s\");\n\n /*\n * Step 5\n *\n * Generate the Markov equivalence classes for graphs and accept only\n * those that do not predict false d-separations\n */\n steps = System.currentTimeMillis();\n Set<Graph> outputSet = new HashSet<>();\n for (Graph pag : outputPags) {\n Set<Triple> unshieldedPossibleColliders = new HashSet<>();\n for (Triple triple : getPossibleTriples(pag)) {\n if (!pag.isAdjacentTo(triple.getX(), triple.getZ())) {\n unshieldedPossibleColliders.add(triple);\n }\n }\n\n PowerSet<Triple> pset = new PowerSet<>(unshieldedPossibleColliders);\n for (Set<Triple> set : pset) {\n Graph newGraph = new EdgeListGraph(pag);\n for (Triple triple : set) {\n newGraph.setEndpoint(triple.getX(), triple.getY(), Endpoint.ARROW);\n newGraph.setEndpoint(triple.getZ(), triple.getY(), Endpoint.ARROW);\n }\n doFinalOrientation(newGraph);\n }\n for (Graph outputPag : finalResult) {\n if (!predictsFalseIndependence(associations, outputPag)) {\n Set<Triple> underlineTriples = new HashSet<>(outputPag.getUnderLines());\n for (Triple triple : underlineTriples) {\n outputPag.removeUnderlineTriple(triple.getX(), triple.getY(), triple.getZ());\n }\n outputSet.add(outputPag);\n }\n }\n }\n\n// outputSet = applyKnowledge(outputSet);\n outputSet = checkPaths(outputSet);\n\n output.addAll(outputSet);\n TetradLogger.getInstance().log(\"info\", \"Step 5: \" + (System.currentTimeMillis() - steps) / 1000. + \"s\");\n runtime = ((System.currentTimeMillis() - start) / 1000.);\n logGraphs(\"\\nReturning output (\" + output.size() + \" Graphs):\", output);\n double currentUsage = Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory();\n if (currentUsage > maxMemory) maxMemory = currentUsage;\n return output;\n }",
"public static void main(String[] args) {\n\t\tint[][] m= { {197,130,139,188},{20,24,167,182},{108,78,169,193},{184,65,83,41} };\r\n\t\tint[][] m2= {{149,77,42,136},\r\n\t\t\t\t{145,155,45,0},\r\n\t\t\t\t{136,102,182,87},\r\n\t\t\t\t{178,183,143,60}};\r\n\t\tfor (int[] is : m2) {\r\n\t\t\tfor (int is2 : is) {\r\n\t\t\t\tSystem.out.print(is2+\",\");\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\tSystem.out.println(\"\\n\");\r\n\t\t}\r\n\t\tSearchable matrix=new Matrix(m2,new MatrixState(\"0,0\"),new MatrixState(\"3,3\"));\r\n\t\tSearcher<String> sol=new BFS<>();\r\n\t\tSystem.out.println(sol.search(matrix));\r\n\t}",
"public static void bfs (String input)\r\n\t{\r\n\t\tNode root_bfs = new Node (input);\r\n\t\tNode current = new Node(root_bfs.getState());\r\n\t\t\r\n\t\tArrayList<String> visited = new ArrayList<String>();\r\n\t\tArrayList<String> children = new ArrayList<String>();\r\n\t\tQueue<Node> queue_bfs = new LinkedList<Node>();\r\n\t\t\r\n\t\tint nodes_popped = 0;\r\n\t\tint queue_max_size = 0;\r\n\t\tint queue_size = 0;\r\n\t\tcurrent.cost = 0;\r\n\t\t\r\n\t\t// Initial check for goal state\r\n\t\tgoal_bfs = isGoal(current.getState());\r\n\t\t\r\n\t\twhile(!goal_bfs)\r\n\t\t{\r\n\t\t\t// Add the current node to the visited array\r\n\t\t\tvisited.add(current.getState());\r\n\t\t\t// Get the nodes children from the successor function\r\n\t\t\tchildren = Successor.findChildren(current.getState());\r\n\t\t\t\r\n\t\t\tfor (String a : children)\r\n\t\t\t{\r\n\t\t\t\t// State checking, don't add already visited nodes to the queue\r\n\t\t\t\tif (visited.contains(a))\r\n\t\t\t\t{\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\t// Create child node from the children array and add it to the current node\r\n\t\t\t\t\tNode nino = new Node(a);\r\n\t\t\t\t\tcurrent.children_nodes.add(nino);\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Obtaining the path cost\r\n\t\t\t\t\tint cost = isCost(current.getState(), nino.getState());\r\n\t\t\t\t\tnino.cost = cost;\r\n\t\t\t\t\tnino.parent = current;\r\n\t\t\t\t\t\r\n\t\t\t\t\t// State check and adding the child to the queue. Increasing size counter\r\n\t\t\t\t\tif (!queue_bfs.contains(nino))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tqueue_bfs.add(nino);\r\n\t\t\t\t\t\tqueue_size++;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Pop a node off the queue\r\n\t\t\tcurrent = queue_bfs.poll();\r\n\t\t\tnodes_popped++;\r\n\t\t\t\r\n\t\t\t// Added this because my queue size variable was always one off based on where my goal check is\r\n\t\t\tif (queue_size > queue_max_size)\r\n\t\t\t{\r\n\t\t\t\tqueue_max_size = queue_size;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Decrease queue size because a node has been popped and check for goal state\r\n\t\t\tqueue_size--;\r\n\t\t\tgoal_bfs = isGoal(current.getState());\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t// Now that a solution has been found, set the boolean back to false for another run\r\n\t\tgoal_bfs = false;\r\n\t\tSystem.out.println(\"BFS Solved!!\");\r\n\t\t\r\n\t\t// Send metrics to be printed to the console\r\n\t\tSolution.performSolution(current, root_bfs, nodes_popped, queue_max_size);\r\n\t\t\t\r\n\t}",
"public DSAQueue depthFirstSearch(String start)\n\t{\n\t\tif(!vertices.isEmpty())\n\t\t{\n\t\t\tDSAQueue queue = new DSAQueue();\n\t\t\tDSAGraphVertex vx = getVertex(start); //vertex to start on (root)\n\t\t\tDSAStack visited = new DSAStack();\t//creates empty stack\n\n\t\t\tclear(); //sets all vertices as not visited\n\t\t\tvx.setVisited(); // Marks root as visited\n\t\t\tqueue.enqueue(vx); //start point\n\n\t\t\tdfs(vx, visited, queue); //begin recursion\n\n\t\t\treturn queue;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthrow new NoSuchElementException(\"List is empty\");\n\t\t}\n\t}",
"public DepthFirst(String q) throws Exception\n {\n /* load graph files */\n graph = ImmutableGraph.load(graphFile);\n labeler = GraphLabeler.load(labelerFile);\n \n /* Set depth first parameters */\n \n //start = 13560; // start node\n query = q;\n maxDist = 3000000; // distance to traverse\n n = graph.numNodes(); // total number of nodes\n \n\tdist = new int[ n ]; // distance array\n IntArrays.fill( dist, Integer.MAX_VALUE ); // Initially, all distances are infinity.\n \n\n \n \n // stack = new Stack(); \n }",
"public static void main(String[] args) throws IOException {\n File file = new File(args[0]);\r\n //FileOutputStream f = new FileOutputStream(\"prat_dfs_data2.txt\");\r\n //System.setOut(new PrintStream(f));\r\n BufferedReader reader = new BufferedReader(new FileReader(file));\r\n String line;\r\n line = reader.readLine();\r\n int nodecount = 0;\r\n HashMap <String , Integer> nodeMap = new HashMap <String , Integer>(); \r\n while ((line = reader.readLine()) != null ) {\r\n String data[] = line.split(\",(?=(?:[^\\\"]*\\\"[^\\\"]*\\\")*[^\\\"]*$)\");\r\n if (!nodeMap.containsKey(data[0].replaceAll(\"^\\\"|\\\"$\", \"\"))){\r\n nodeMap.put(data[0].replaceAll(\"^\\\"|\\\"$\", \"\"), nodecount);\r\n nodecount++;\r\n }\r\n }\r\n reader.close();\r\n Vertex adjList[] = new Vertex[nodecount];\r\n Vertex sortVer[] = new Vertex[nodecount];\r\n for(int it = 0; it < nodecount; it++){\r\n adjList[it] = new Vertex(it);\r\n }\r\n nodeMap.forEach((k, v) -> adjList[v].val = k);\r\n File file2 = new File(args[1]);\r\n BufferedReader reader2 = new BufferedReader(new FileReader(file2));\r\n line = reader2.readLine();\r\n while ((line = reader2.readLine()) !=null) {\r\n String data[] = line.split(\",(?=(?:[^\\\"]*\\\"[^\\\"]*\\\")*[^\\\"]*$)\");\r\n String source = data[0].replaceAll(\"^\\\"|\\\"$\", \"\");\r\n String target = data[1].replaceAll(\"^\\\"|\\\"$\", \"\");\r\n\r\n int weight = Integer.parseInt(data[2]);\r\n Vertex current = adjList[nodeMap.get(source)];\r\n Vertex newbie = new Vertex(nodeMap.get(target));\r\n current.countN++;\r\n current.co_occur += weight;\r\n if (adjList[nodeMap.get(source)].next == null){\r\n current.next = newbie;\r\n newbie.prev = current;\r\n }\r\n else{\r\n current.next.prev = newbie;\r\n newbie.next = current.next;\r\n current.next = newbie;\r\n newbie.prev = current;\r\n }\r\n Vertex current1 = adjList[nodeMap.get(target)];\r\n Vertex newbie1 = new Vertex(nodeMap.get(source));\r\n current1.co_occur += weight;\r\n current1.countN++;\r\n if (current1.next == null){\r\n current1.next = newbie1;\r\n newbie1.prev = current1;\r\n }\r\n else{\r\n current1.next.prev = newbie1;\r\n newbie1.next = current1.next;\r\n current1.next = newbie1;\r\n newbie1.prev = current1;\r\n }\r\n }\r\n reader2.close();\r\n \r\n for(int it = 0; it < nodecount; it++){\r\n sortVer[it] = new Vertex(adjList[it].id);\r\n sortVer[it].val = adjList[it].val;\r\n sortVer[it].co_occur = adjList[it].co_occur;\r\n }\r\n if (args[2].equals(\"average\")){\r\n double countdeg = 0;\r\n for(int it = 0; it<nodecount; it++){\r\n countdeg+= (double) adjList[it].countN;\r\n }\r\n countdeg = countdeg / (double) (nodecount);\r\n System.out.printf(\"%.2f\", countdeg);\r\n System.out.println();\r\n //long toc= System.nanoTime();\r\n //System.out.println((toc- startTime)/1000000000.0);\r\n }\r\n \r\n if(args[2].equals(\"rank\")){\r\n Graph.mergesort(sortVer, 0, nodecount-1);\r\n // long toc= System.nanoTime();\r\n // System.out.println((toc- startTime)/1000000000.0);\r\n System.out.print(sortVer[0].val);\r\n for(int kk=1; kk<nodecount; kk++){\r\n System.out.print(\",\" + sortVer[kk].val.toString());\r\n }\r\n System.out.println();\r\n }\r\n if(args[2].equals(\"independent_storylines_dfs\")){\r\n boolean visited[] = new boolean[nodecount];\r\n int ind = 0;\r\n ArrayList<ArrayList<Vertex>> comps = new ArrayList<ArrayList<Vertex>>();\r\n for(int it1 = 0; it1<nodecount; it1++){\r\n visited[it1] = false;\r\n }\r\n for(int it1 = 0; it1<nodecount; it1++){\r\n if (visited[it1] == false){\r\n ArrayList<Vertex> temp = new ArrayList<Vertex>();\r\n Graph.dfs(it1, visited, ind, adjList, temp);\r\n ind++;\r\n Graph.mergesort2(temp, 0, temp.size()-1);\r\n comps.add(temp);\r\n }\r\n }\r\n Graph.mergesort3(comps, 0, comps.size()-1);\r\n // long toc= System.nanoTime();\r\n // System.out.println((toc- startTime)/1000000000.0);\r\n for(int a1 = 0; a1 < ind; a1++){\r\n System.out.print(comps.get(a1).get(0).val);\r\n for(int j1 = 1; j1<comps.get(a1).size(); j1++){\r\n System.out.print(\",\" + comps.get(a1).get(j1).val);\r\n }\r\n System.out.println();\r\n }\r\n }\r\n }",
"private void BFS(Vertex start, Set<Vertex> visited, Queue<Vertex> queue) {\r\n\t\t// if(visited.contains(start)) return;\r\n\r\n\t\t// Mark the current node as visited and enqueue it\r\n\t\tvisited.add(start);\r\n\t\tqueue.offer(start);\r\n\r\n\t\tVertex currentNode;\r\n\t\tSet<Vertex> neighbors;\r\n\r\n\t\twhile (queue.size() != 0) { // or !queue.isEmpty()\r\n\t\t\t// Dequeue a vertex from queue and print it\r\n\t\t\tcurrentNode = queue.poll();\r\n\t\t\tSystem.out.print(currentNode + \" \");\r\n\r\n\t\t\t// Get all adjacent vertices of the dequeued vertex s\r\n\t\t\t// If a adjacent has not been visited, then mark it\r\n\t\t\t// visited and enqueue it\r\n\t\t\tneighbors = currentNode.getNeighbors();\r\n\r\n\t\t\tfor (Vertex n : neighbors) {\r\n\t\t\t\tif (!visited.contains(n)) {\r\n\t\t\t\t\tvisited.add(n);\r\n\t\t\t\t\tqueue.offer(n);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t/*\r\n\t\t\t * neighbors.forEach(n -> { if (!visited.contains(n)){\r\n\t\t\t * visited.add(n); queue.offer(n); } });\r\n\t\t\t */\r\n\t\t}\r\n\t}",
"public static void main(String[] args) throws Exception {\n\t\tlong startTime, stopTime;\n\t\tdouble t_searchCache, t_storeCache;\n//\t\tMap<SmallGraph, SmallGraph> cache = new HashMap<SmallGraph, SmallGraph>(); // the cache\n\t\t// the index on the ploytrees stored in the cache\n\t\tMap<Set<Pair<Integer,Integer>>, Set<SmallGraph>> cacheIndex = new HashMap<Set<Pair<Integer,Integer>>, Set<SmallGraph>>();\n\t\tMap<SmallGraph, Pair<Integer, SmallGraph>> polytree2query = new HashMap<SmallGraph, Pair<Integer, SmallGraph>>();\n\n\t\t// reading the original data graph\n\t\tGraph originalDataGraph = new Graph(args[0]);\n\t\tif(args.length == 6)\toriginalDataGraph.buildParentIndex(args[5]);\n\n\t\t// reading all popular data graphs\n\t\tFile dirG = new File(args[1]);\n\t\tif(!dirG.isDirectory())\n\t\t\tthrow new Exception(\"The specified path for the candidate data graphs is not a valid directory\");\n\t\tFile[] graphFiles = dirG.listFiles();\n\t\tint nPopularGraphs = graphFiles.length;\n\t\tGraph[] graphs = new Graph[nPopularGraphs];\n\t\tfor(int i=0; i < nPopularGraphs; i++)\n\t\t\tgraphs[i] = new Graph(graphFiles[i].getAbsolutePath());\n\t\t\n\t\t// statistical result file\n\t\tFile file = new File(args[2]);\n\t\t// if file does not exists, then create it\n\t\tif (!file.exists()) file.createNewFile();\n\t\tFileWriter fw = new FileWriter(file.getAbsoluteFile());\t\t\t\n\t\tBufferedWriter bw = new BufferedWriter(fw);\t\n\n\t\tbw.write(\"queryNo\\t querySize\\t degree\\t sourceNo\\t isPolytree\\t nHitCandidates\\t t_searchCache\\t isHit\\t hitQueryNo\\t hitQuerySize\\t t_storeCache\\n\");\n\t\tStringBuilder fileContents = new StringBuilder();\n\t\t\n\t\tint nSourceOptions = nPopularGraphs + 1; // number of sources for creating query\n\t\tRandom randSource = new Random();\n\t\tint[] querySizes = {20,22,24,26,28,30,32,34,36,38}; // different available sizes for queries\n\t\tRandom randQuerySize = new Random();\n//\t\tRandom randDegree = new Random();\n\t\tRandom randCenter = new Random();\n\t\t\t\t\n\t\tint requestedQueries = Integer.parseInt(args[4]);\n\t\tfor(int queryNo=0; queryNo < requestedQueries; queryNo++) { // main loop\n\t\t\tSystem.out.print(\"Processing Q\" + queryNo + \":\\t\");\n\t\t\tSmallGraph q;\n\t\t\tint querySize = 25;\n\t\t\tint degree = 5;\n\t\t\tint sourceNo = randSource.nextInt(nSourceOptions);\n\t\t\t// q is created\n\t\t\tif(sourceNo == nSourceOptions - 1) { // from the original data graph\n\t\t\t\tboolean notFound = true;\n\t\t\t\tSmallGraph sg = null;\n\t\t\t\twhile(notFound) {\n\t\t\t\t\tquerySize = querySizes[randQuerySize.nextInt(querySizes.length)];\n\t\t\t\t\t//degree = randDegree.nextInt(querySize/DEGREE_RATIO);\n\t\t\t\t\tdegree = (int)Math.sqrt(querySize);\n\t\t\t\t\tint center = randCenter.nextInt(originalDataGraph.getNumVertices());\n\t\t\t\t\tsg = GraphUtils.subGraphBFS(originalDataGraph, center, degree, querySize);\n\t\t\t\t\tif(sg.getNumVertices() == querySize)\n\t\t\t\t\t\tnotFound = false;\n\t\t\t\t}\n\t\t\t\tq = QueryGenerator.arrangeID(sg);\n\t\t\t} else {\t// from popular data graphs\n\t\t\t\tGraph dataGraph = graphs[sourceNo];\n\t\t\t\tboolean notFound = true;\n\t\t\t\tSmallGraph sg = null;\n\t\t\t\twhile(notFound) {\n\t\t\t\t\tquerySize = querySizes[randQuerySize.nextInt(querySizes.length)];\n\t\t\t\t\tdegree = (int)Math.sqrt(querySize);\n\t\t\t\t\tif(degree == 0) continue;\n\t\t\t\t\tint center = randCenter.nextInt(dataGraph.getNumVertices());\n\t\t\t\t\tsg = GraphUtils.subGraphBFS(dataGraph, center, degree, querySize);\n\t\t\t\t\tif(sg.getNumVertices() == querySize)\n\t\t\t\t\t\tnotFound = false;\n\t\t\t\t}\n\t\t\t\tq = QueryGenerator.arrangeID(sg);\n\t\t\t} //if-else\n\t\t\t\n\t\t\tfileContents.append(queryNo + \"\\t\" + q.getNumVertices() + \"\\t\" + degree + \"\\t\" + sourceNo + \"\\t\");\n\t\t\tSystem.out.print(\"N\" + q.getNumVertices() + \"D\" + degree + \"S\" + sourceNo + \",\\t\");\n\t\t\t\n\t\t\tint queryStatus = q.isPolytree();\n\t\t\tswitch (queryStatus) {\n\t\t\t\tcase -1: System.out.println(\"The query Graph is disconnected\");\n\t\t\t\t\tfileContents.append(\"-1\\t 0\\t 0\\t 0\\t -1\\t 0\\t\");\n\t\t\t\t\tcontinue;\n\t\t\t\tcase 0: System.out.print(\"! polytree, \");\n\t\t\t\t\tfileContents.append(\"0\\t\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase 1: System.out.print(\"a polytree, \");\n\t\t\t\t\tfileContents.append(\"1\\t\");\n\t\t\t\t\tbreak;\n\t\t\t\tdefault: System.out.println(\"Undefined status of the query graph\");\n\t\t\t\t\tfileContents.append(\"2\\t 0\\t 0\\t 0\\t -1\\t 0\\t\");\n\t\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// searching in the cache\n\t\t\tPair<Integer, SmallGraph> hitPair = null;\n\t\t\tstartTime = System.nanoTime();\n\t\t\tboolean notInCache = true;\n\t\t\tSet<SmallGraph> candidateMatchSet = CacheUtils.getCandidateMatchSet(q, cacheIndex);\n\t\t\tint nHitCandidates = candidateMatchSet.size();\n\t\t\tSystem.out.print(\"nHitCandidates=\" + nHitCandidates + \", \");\n\t\t\tfileContents.append(nHitCandidates + \"\\t\");\n\t\t\t\n\t\t\tfor(SmallGraph candidate : candidateMatchSet) {\n\t\t\t\tif(CacheUtils.isDualCoverMatch(q, candidate)) {\n\t\t\t\t\tnotInCache = false;\n\t\t\t\t\tSystem.out.print(\"Hit the cache!, \");\n\n\t\t\t\t\thitPair = polytree2query.get(candidate);\n\t\t\t\t\t// use the cache content to answer the query\n//\t\t\t\t\tlong bTime = System.currentTimeMillis();\n//\t\t\t\t\tSmallGraph inducedSubgraph = cache.get(candidate);\n//\t\t\t\t\tSet<Ball> tightResults_cache = TightSimulation.getTightSimulation(inducedSubgraph, queryGraph);\n//\t\t\t\t\ttightResults_cache = TightSimulation.filterMatchGraphs(tightResults_cache);\n//\t\t\t\t\tlong fTime = System.currentTimeMillis();\n//\t\t\t\t\tSystem.out.println(\"The time for tight simulation from cache: \" + (fTime - bTime) + \" ms\");\n\t\t\t\t\tbreak; // the first match would be enough \n\t\t\t\t} //if\n\t\t\t} //for\n\t\t\tstopTime = System.nanoTime();\n\t\t\tt_searchCache = (double)(stopTime - startTime) / 1000000;\n\t\t\tSystem.out.print(\"search: \" + t_searchCache + \", \");\n\t\t\tfileContents.append(t_searchCache + \"\\t\");\n\t\t\t\n\t\t\tif(! notInCache) { // found in the cache\n\t\t\t\t// hit query\n\t\t\t\tfileContents.append(\"1\\t\");\n\t\t\t\tint hitQueryNo = hitPair.getValue0();\n\t\t\t\tSmallGraph hitQuery = hitPair.getValue1();\n\t\t\t\thitQuery.print2File(args[3] + \"/Q\" + hitQueryNo + \"_N\" + hitQuery.getNumVertices() + \".txt\");\n\t\t\t\tfileContents.append(hitQueryNo + \"\\t\" + hitQuery.getNumVertices() + \"\\t\");\n\t\t\t}\n\n\t\t\tstartTime = System.nanoTime();\n\t\t\tif(notInCache) { // Not found in the cache\n\t\t\t\tSystem.out.print(\"Not the cache!, \");\n\t\t\t\tfileContents.append(\"0\\t\");\n\t\t\t\tfileContents.append(\"-1\\t-1\\t\");\n//\t\t\t\tlong bTime = System.currentTimeMillis();\n//\t\t\t\tSet<Ball> tightResults_cache = TightSimulation.getTightSimulation(dataGraph, queryGraph);\n//\t\t\t\ttightResults_cache = TightSimulation.filterMatchGraphs(tightResults_cache);\n//\t\t\t\tlong fTime = System.currentTimeMillis();\n//\t\t\t\tSystem.out.println(\"The time for tight simulation without cache: \" + (fTime - bTime) + \" ms\");\n\t\t\t\t// store in the cache\n\t\t\t\t// The polytree of the queryGraph is created\n\t\t\t\tint center = q.getSelectedCenter();\n\t\t\t\tSmallGraph polytree = GraphUtils.getPolytree(q, center);\n\t\t\t\t// The dualSimSet of the polytree is found\n\t\t\t\t// The induced subgraph of the dualSimSet is found\n\t\t\t\t// The <polytree, inducedSubgraph> is stored in the cache\n//\t\t\t\tcache.put(polytree, inducedSubgraph);\n\t\t\t\tSet<Pair<Integer, Integer>> sig = polytree.getSignature(); \n\t\t\t\tif (cacheIndex.get(sig) == null) {\n\t\t\t\t\tSet<SmallGraph> pltSet = new HashSet<SmallGraph>();\n\t\t\t\t\tpltSet.add(polytree);\n\t\t\t\t\tcacheIndex.put(sig, pltSet);\n\t\t\t\t} else\n\t\t\t\t\tcacheIndex.get(sig).add(polytree);\n\t\t\t\t\n\t\t\t\tpolytree2query.put(polytree, new Pair<Integer, SmallGraph>(queryNo, q)); // save the queries filling the cache\n\t\t\t} //if\n\t\t\tstopTime = System.nanoTime();\n\t\t\tt_storeCache = (double)(stopTime - startTime) / 1000000;\n\t\t\tSystem.out.println(\"store: \" + t_storeCache);\n\t\t\tfileContents.append(t_storeCache + \"\\n\");\t\t\t\n\t\t\t\n\t\t\tbw.write(fileContents.toString());\n\t\t\tfileContents.delete(0, fileContents.length());\n\t\t} //for\n\t\t\n\t\tbw.close();\n\t\t\n\t\tSystem.out.println(\"Number of signatures stored: \" + cacheIndex.size());\n\t\tSystem.out.println(\"Number of polytrees stored: \" + polytree2query.size());\n\t\tint maxSet = 0;\n\t\tfor(Set<SmallGraph> pt : cacheIndex.values()) {\n\t\t\tint theSize = pt.size();\n\t\t\tif(theSize > maxSet)\n\t\t\t\tmaxSet = theSize;\n\t\t} //for\n\t\tSystem.out.println(\"The maximum number of stored polytrees with the same signature: \" + maxSet);\n\t}",
"int BFS(int source,int sink) \n {\n\tint first=0, last=0; \n int[] queue=new int[V]; \n int[] mark = new int[V]; \n \n for (int i = 0; i < V; i++) {\n mark[i] = 0; // Mark all vertices as not visited \n minFlow[i] = 10000000;\n }\n\n queue[last++] = source; //enqueue source vertex\n mark[source] = 1; //mark source vertex as visited\n //BFS Loop\n while (first != last) { // While queue is not empty.\n int v = queue[first++];\n for (int u = 0; u < V; u++){\n if (mark[u] == 0 && resCap[v][u] > 0) {\n minFlow[u] = Math.min(minFlow[v],resCap[v][u]);\n parent[u] = v;\n mark[u] = 1;\n if (u == sink) //If we reach sink starting from source, then return 1\n return 1;\n queue[last++] = u;\n }\n }\n }\n return 0; //else return 0\n }",
"public static void main(String[] args) throws NumberFormatException, IOException {\n\r\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\r\n\t\tint T = Integer.parseInt(br.readLine());\r\n\t\tStringTokenizer st;\r\n\t\tfor (int test_case = 1; test_case <= T; test_case++) {\r\n\t\t\tst = new StringTokenizer(br.readLine());\r\n\t\t\tN = Integer.parseInt(st.nextToken());\r\n\t\t\tK = Integer.parseInt(st.nextToken());\r\n\t\t\tst = new StringTokenizer(br.readLine());\r\n\t\t\tlist = new ArrayList[N + 1];\r\n\t\t\tfor (int i = 1; i <= N; i++) {\r\n\t\t\t\tlist[i] = new ArrayList<Integer>();\r\n\t\t\t}\r\n\t\t\tfor (int i = 1; i <= N; i++) {\r\n\t\t\t\tint k = Integer.parseInt(st.nextToken());\r\n\t\t\t\tlist[k].add(i);\r\n\t\t\t}\r\n//\t\t\tfor (int i = 1; i <= N; i++) {\r\n//\t\t\t\tfor (int j = 0; j < list[i].size(); j++)\r\n//\t\t\t\t\tSystem.out.print(i + \", \" + list[i].get(j) + \" \");\r\n//\t\t\t}\r\n//\t\t\tSystem.out.println();\r\n\r\n\t\t\tQueue<Integer> q;\r\n//\t\t\tfor(int i = 1; i<=N;i++) {\r\n//\t\t\t\tif(list[i].size()==0) {\r\n//\t\t\t\t\tq.add(i);\r\n//\t\t\t\t}\r\n//\t\t\t}\r\n\t\t\tint visited[];\r\n\t\t\tint answer = 0;\r\n\t\t\tfor (int i = 1; i <= N; i++) {// 각 굴에 대해서 인원 센다\r\n\t\t\t\tq = new LinkedList<Integer>();\r\n\t\t\t\tvisited = new int[N + 1];\r\n\t\t\t\tint count = K;\r\n//\t\t\t\tfor (int j = 1; j < K; j++) {// 지날 수 있는 굴의 최대갯수 K\r\n\t\t\t\tif (list[i].size() < 1) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tint idx;\r\n\t\t\t\tfor (int u = 0; u < list[i].size(); u++) {\r\n\t\t\t\t\tidx = list[i].get(u);\r\n\t\t\t\t\tq.add(idx);\r\n\t\t\t\t}\r\n\t\t\t\twhile (count > 0 && !q.isEmpty()) {\r\n\t\t\t\t\tidx = q.poll();\r\n\r\n\t\t\t\t\tfor (int m = 0; m < list[idx].size(); m++) {\r\n\r\n\t\t\t\t\t\tint dd = list[idx].get(m);\r\n\t\t\t\t\t\tif (visited[dd] == 0 && dd != i) {\r\n\t\t\t\t\t\t\tvisited[dd] = 1;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tq.add(list[idx].get(m));\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcount--;\r\n\r\n\t\t\t\t}\r\n//\t\t\t\t}\r\n\t\t\t\tfor (int e = 1; e <= N; e++) {\r\n\t\t\t\t\tif (visited[e] == 1)\r\n\t\t\t\t\t\tanswer++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tSystem.out.println(\"#\" + test_case + \" \" + answer);\r\n\r\n\t\t}\r\n\r\n\t}",
"public void calcSP(Graph g, Vertex source){\n // Algorithm:\n // 1. Take the unvisited node with minimum weight.\n // 2. Visit all its neighbours.\n // 3. Update the distances for all the neighbours (In the Priority Queue).\n // Repeat the process till all the connected nodes are visited.\n\n // clear existing info\n// System.out.println(\"Calc SP from vertex:\" + source.name);\n g.resetMinDistance();\n source.minDistance = 0;\n PriorityQueue<Vertex> queue = new PriorityQueue<Vertex>();\n queue.add(source);\n\n while(!queue.isEmpty()){\n Vertex u = queue.poll();\n for(Edge neighbour:u.neighbours){\n// System.out.println(\"Scanning vector: \"+neighbour.target.name);\n Double newDist = u.minDistance+neighbour.weight;\n\n // get new shortest path, empty existing path info\n if(neighbour.target.minDistance>newDist){\n // Remove the node from the queue to update the distance value.\n queue.remove(neighbour.target);\n neighbour.target.minDistance = newDist;\n\n // Take the path visited till now and add the new node.s\n neighbour.target.path = new ArrayList<>(u.path);\n neighbour.target.path.add(u);\n// System.out.println(\"Path\");\n// for (Vertex vv: neighbour.target.path) {\n// System.out.print(vv.name);\n// }\n// System.out.print(\"\\n\");\n\n// System.out.println(\"Paths\");\n neighbour.target.pathCnt = 0;\n neighbour.target.paths = new ArrayList<ArrayList<Vertex>>();\n if (u.paths.size() == 0) {\n ArrayList<Vertex> p = new ArrayList<Vertex>();\n p.add(u);\n neighbour.target.paths.add(p);\n neighbour.target.pathCnt++;\n } else {\n for (ArrayList<Vertex> p : u.paths) {\n ArrayList<Vertex> p1 = new ArrayList<>(p);\n p1.add(u);\n// for (Vertex vv : p1) {\n// System.out.print(vv.name);\n// }\n// System.out.print(\"\\n\");\n neighbour.target.paths.add(p1);\n neighbour.target.pathCnt++;\n }\n }\n\n //Reenter the node with new distance.\n queue.add(neighbour.target);\n }\n // get equal cost path, add into path list\n else if (neighbour.target.minDistance == newDist) {\n queue.remove(neighbour.target);\n for(ArrayList<Vertex> p: u.paths) {\n ArrayList<Vertex> p1 = new ArrayList<>(p);\n p1.add(u);\n neighbour.target.paths.add(p1);\n neighbour.target.pathCnt++;\n }\n queue.add(neighbour.target);\n }\n }\n }\n }",
"@Override\n protected void start() throws Exception {\n LogManager.getLogger().log(ALGORITHM, \"STARTING TABU SEARCH...\");\n LogManager.getLogger().log(ALGORITHM, \"MAX ITERATIONS: \" + maxIterations);\n LogManager.getLogger().log(ALGORITHM, \"MAX ITERATIONS WITHOUT IMPROVEMENTS: \" + maxIterationsWithoutImprovement);\n LogManager.getLogger().log(ALGORITHM, \"MIN QUEUE: \" + minQueue);\n LogManager.getLogger().log(ALGORITHM, \"RISING TREND: \" + risingTrend);\n LogManager.getLogger().log(ALGORITHM, \"MAX THREADS: \" + (maxThreads != null ? maxThreads : \"DEFAULT\"));\n LogManager.getLogger().log(ALGORITHM, \"MULTI-STARTS -> # OF GREEDY: \" + greedyMultiStart + \", # OF RANDOM: \" + randomMultiStart);\n\n String iSettings = null;\n if (intensificationLearning) {\n iSettings = \"LEARNING\";\n }\n if (localSearchIntensification) {\n if (iSettings != null) {\n iSettings += \", \";\n } else {\n iSettings = \"\";\n }\n iSettings += \"LOCAL SEARCH\";\n }\n if (pathRelinking) {\n if (iSettings != null) {\n iSettings += \", \";\n } else {\n iSettings = \"\";\n }\n iSettings += \"PATH RELINKING\";\n }\n if (intensification) {\n if (iSettings != null) {\n iSettings += \", \";\n } else {\n iSettings = \"\";\n }\n iSettings += \"INTENSIFICATION\";\n }\n if (iSettings == null) {\n iSettings = \"NONE\";\n }\n LogManager.getLogger().log(ALGORITHM, \"INTENSIFICATION SETTINGS: \" + iSettings);\n\n String dSettings = null;\n if (diversificationLearning) {\n dSettings = \"LEARNING\";\n }\n if (greedyMultiStart + randomMultiStart > 1) {\n if (dSettings != null) {\n dSettings += \", \";\n } else {\n dSettings = \"\";\n }\n dSettings += \"MULTI-STARTS\";\n }\n if (moveDiversification) {\n if (dSettings != null) {\n dSettings += \", \";\n } else {\n dSettings = \"\";\n }\n dSettings += \"MOVE DIVERSIFY\";\n }\n if (diversification) {\n if (dSettings != null) {\n dSettings += \", \";\n } else {\n dSettings = \"\";\n }\n dSettings += \"DIVERSIFICATION\";\n }\n if (dSettings == null) {\n dSettings = \"NONE\";\n }\n LogManager.getLogger().log(ALGORITHM, \"DIVERSIFICATION SETTINGS: \" + dSettings);\n\n LabeledUndirectedGraph<N, E> zero = getZeroGraph(minGraph);\n\n if (!zero.isConnected()) {\n minCost = zero.calculateCost() + 1;\n\n Queue<LabeledUndirectedGraph<N, E>> startsQueue = new LinkedList<>();\n for (int i = 0; i < greedyMultiStart; i++) {\n startsQueue.add(applyMVCA());\n }\n for (int i = 0; i < randomMultiStart; i++) {\n startsQueue.add(new LabeledUndirectedGraph<>(getSpanningTree(graph)));\n }\n int nthreads = Runtime.getRuntime().availableProcessors();\n if (maxThreads != null) {\n if (maxThreads <= 1) {\n nthreads = 1;\n } else {\n nthreads = maxThreads;\n }\n }\n nthreads = Integer.min(nthreads, (greedyMultiStart + randomMultiStart));\n\n LogManager.getLogger().log(ALGORITHM, \"THREADS: \" + nthreads);\n\n //PRINT PROGRESS\n prog = 0;\n tot = startsQueue.size();\n print(Ansi.ansi().cursor().save().erase().eraseLine().a(String.format(\"\\t%.2f%%\", prog)));\n\n if (nthreads == 1) {\n while (!startsQueue.isEmpty()) {\n compute(startsQueue.poll());\n\n //PRINT PROGRESS\n// prog = (tot - startsQueue.size()) * 100 / tot;\n prog = 100;\n print(Ansi.ansi().cursor().load().erase().eraseLine().a(String.format(\"\\t%.2f%%\", prog)));\n }\n } else {\n\n List<Thread> pool = new ArrayList<>();\n for (int i = 0; i < nthreads; i++) {\n Thread th = new Thread(() -> {\n try {\n boolean empty;\n synchronized (lock) {\n empty = startsQueue.isEmpty();\n }\n\n while (!empty) {\n LabeledUndirectedGraph<N, E> g;\n\n synchronized (lock) {\n g = startsQueue.poll();\n }\n compute(g);\n synchronized (lock) {\n empty = startsQueue.isEmpty();\n\n //PRINT PROGRESS\n// prog = (tot - startsQueue.size()) * 100 / tot;\n prog++;\n double _prog = this.prog * 100 / tot;\n print(Ansi.ansi().cursor().load().erase().eraseLine().a(String.format(\"\\t%.2f%%\", _prog)));\n }\n }\n } catch (Exception ex) {\n throw new RuntimeException(ex);\n }\n });\n th.setDaemon(false);\n th.setName(\"TabuSearch_Calc_\" + i);\n th.setPriority(Thread.MAX_PRIORITY);\n th.start();\n pool.add(th);\n }\n for (Thread th : pool) {\n th.join();\n }\n }\n\n println();\n\n minGraphs.forEach(_min -> {\n if (_min.calculateCost() < minGraph.calculateCost()) {\n minGraph = _min;\n }\n });\n\n LogManager.getLogger().log(ALGORITHM, \"END TABU SEARCH.\");\n LogManager.getLogger().log(ALGORITHM, \"BEST AT THIS POINT: \" + minGraph.calculateCost());\n\n if (pathRelinking) {\n LogManager.getLogger().log(ALGORITHM, \"STARTING PATH RELINKING...\");\n\n pathRelinking(pathRelinkingAlt);\n\n println();\n LogManager.getLogger().log(ALGORITHM, \"BEST AT THIS POINT: \" + minGraph.calculateCost());\n }\n } else {\n minGraph = zero;\n }\n\n LogManager.getLogger().log(ALGORITHM, \"END.\");\n }",
"public void breadthFirstTraverse() {\n\t\t// track whether vertex was visited\n\t\tHashMap<Integer, Boolean> visited = buildVisited();\n\t\t// store neighbors\n\t\tQueue<Integer> queue = new LinkedList<Integer>();\n\n\t\t// arbitrarily add first element\n\t\tInteger current = (Integer) edges.keySet().toArray()[0];\n\t\tqueue.add(current);\n\n\t\twhile (queue.peek() != null) {\n\n\t\t\tcurrent = queue.remove();\n\t\t\tSystem.out.println(\"current: \" + current);\n\t\t\tvisited.put(current, true);\n\n\t\t\tfor (Integer neighbor: edges.get(current)) {\n\t\t\t\tif (!visited.get(neighbor)) {\n\t\t\t\t\tqueue.add(neighbor);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"void dijkstra(Coordinate startName) {\n if (!graph.containsKey(startName)) {\n //test use print statement\n //System.out.printf(\"Graph doesn't contain start vertex \\\"%s\\\"\\n\", startName);\n return;\n }\n final Node source = graph.get(startName);\n NavigableSet<Node> queue = new TreeSet<>();\n\n // set-up vertices\n for (Node node : graph.values()) {\n node.previous = node == source ? source : null;\n node.dist = node == source ? 0 : Integer.MAX_VALUE;\n queue.add(node);\n }\n dijkstra(queue);\n }",
"public static void main(String[] args) \r\n\t{\n\t\tif(args.length < 3 || args.length > 5) \r\n\t\t{\r\n\t\t\tprintUsage();\r\n\t\t}\r\n\r\n\t\t// This if statement determines whether to use a cache or not\r\n\t\tif (args[0].equals(\"1\")) \r\n\t\t{\r\n\t\t\tuseCache = 1; //use BTree with cache\r\n\t\t}\r\n\t\t\r\n\t\telse if (!(args[0].equals(\"0\") || args[0].equals(\"1\"))) \r\n\t\t{\r\n\t\t\tprintUsage();\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\tbtreeFile = args[1]; //BTree File\r\n\t\tqueryFile = args[2]; //Query File \r\n\r\n\t\t//This if statement checks the size of the cache if there are at least 4 arguments\r\n\t\tif (useCache == 1 && args.length >= 4) \r\n\t\t{\r\n\t\t\tcacheSize = Integer.parseInt(args[3]);\r\n\t\t}\r\n\r\n\t\t//Set debug level if there are 5 arguments\r\n\t\tif(args.length == 5)\r\n\t\t\tdebugLevel = Integer.parseInt(args[4]);\r\n\r\n\t\t//find degree and sequence length\r\n\t\tString seq = \"\";\r\n\t\tString deg = \"\";\r\n\r\n\t\t//finds the degree of the btree file\r\n\t\tfor(int i = btreeFile.length()-1; i >= 0; i--) \r\n\t\t{\r\n\t\t\tif(btreeFile.charAt(i) != '.')\r\n\t\t\t\tdeg += btreeFile.charAt(i);\r\n\t\t\telse break;\r\n\t\t}\r\n\t\tdeg = reverseString(deg);\r\n\r\n\t\t//finds the sequence length of the btree file\r\n\t\tfor (int i = btreeFile.length()-deg.length()-2; i >= 0; i--) \r\n\t\t{\r\n\t\t\tif(btreeFile.charAt(i) != '.')\r\n\t\t\t\tseq += btreeFile.charAt(i);\r\n\t\t\telse break;\r\n\t\t}\r\n\t\tseq = reverseString(seq);\r\n\r\n\t\tint degree = Integer.parseInt(deg);\r\n\t\tint sequence = Integer.parseInt(seq);\r\n\t\t//System.out.println(\"degree: \" + degree);\r\n\t\t//System.out.println(\"sequence length: \" + sequence);\r\n\t\t\r\n\t\tsubSequences = \"\";\r\n\t\t//searching in the specified BTree for sequences of given length. The search program\r\n\t\t//assumes that the user specified the proper BTree to use depending upon the query length.\r\n\t\ttry {\r\n\t\t\tFile treeFile = new File(btreeFile);\r\n\t\t\tif(treeFile.createNewFile()) {\r\n\t\t\t\tSystem.out.println(\"Error, no such file!\");\r\n\t\t\t\tSystem.exit(0);\r\n\t\t\t}\r\n\t\t\tRandomAccessFile read = new RandomAccessFile(treeFile, \"r\");\r\n\t\t\tBTree<TreeObject> tree = new BTree<TreeObject>(degree, btreeFile, queryFile, useCache, cacheSize);\r\n\t\t\tread.seek(4); //position of rootOffset metadata\r\n\t\t\ttree.getRoot().setOffset(read.readInt());\r\n\t\t\tread.seek(tree.getRoot().getOffset());\r\n\t\t\ttree.setRoot(tree.readNode(tree.getRoot().getOffset()));\r\n\t\t\tread.seek(0);\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tScanner scan = new Scanner(new File(queryFile));\r\n\t\t\t\r\n\t\t\twhile(scan.hasNext()) {\r\n\t\t\t\tsubSequences = \"\";\r\n\t\t\t\tString query = scan.nextLine(); //sequence to search for binary \r\n\t\t\t\tString currString = \"\";\r\n\t\t\t\tint numValidReads = 0;\r\n\t\t\t\tdo \r\n\t\t\t\t{\r\n//\t\t\t\t\tString.valueOf(currChar = fileReader.readChar());\r\n//\t\t\t\t\tcurrChar = fileReader.readChar();\r\n\t\t\t\t\tString currChar = query.substring(numValidReads, numValidReads+1);\r\n\t\t\t\t\tcurrString += currChar;\r\n\t\t\t\t\t//if good character found convert to binary and save in subsequence string\r\n\t\t\t\t\tif (currChar.equalsIgnoreCase(\"a\"))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tnumValidReads++;\r\n\t\t\t\t\t\tsubSequences += \"00\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if (currChar.equalsIgnoreCase(\"t\"))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tnumValidReads++;\r\n\t\t\t\t\t\tsubSequences += \"11\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if (currChar.equalsIgnoreCase(\"c\"))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tnumValidReads++;\r\n\t\t\t\t\t\tsubSequences += \"01\";\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if (currChar.equalsIgnoreCase(\"g\"))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tnumValidReads++;\r\n\t\t\t\t\t\tsubSequences += \"10\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//if n found,clear subsequence, find next valid value and return\r\n\t\t\t\t\telse if(currChar.equalsIgnoreCase(\"n\"))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tsubSequences = \"\";\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}while (numValidReads < sequence);\r\n\t\t\t\t\r\n\t\t\t\tif(!subSequences.isEmpty()) \r\n\t\t\t\t\tsearchLong = Long.parseLong(subSequences, 2);\r\n\t\t\t\t\r\n\t\t\t\tTreeObject found = tree.search(tree.getRoot(), searchLong);\r\n\t\t\t\t\r\n\t\t\t\tif(found != null) {\r\n\t\t\t\t\tSystem.out.println(currString + \": \" + found.getFrequency());\r\n\t\t\t\t} else {\r\n\t\t\t\t\tSystem.out.println(currString + \": \" + 0);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tscan.close();\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"public static int runBFS(int[][]map, coordinate src1, coordinate src2){\n\t \n boolean visited[][] = new boolean[dim][dim]; //visited boolean 2d array that is the same size as 2d map\n coordinate visit1[][]=new coordinate[dim][dim]; // this is the one used to hold previous location\n coordinate visit2[][]=new coordinate[dim][dim]; // this is the one used to hold previous location\n\t \n\t visit1[0][0]=new coordinate(0,0); //same as BFS\n \n\t visit2[dim-1][dim-1] = new coordinate(dim-1,dim-1);\n\t //marked both the 0,0 and dim-1, dim-1 srcs as visited\n\t \n\t Queue<QueueNode> queue1 = new LinkedList<>(); //queue for src1\n\t Queue<QueueNode> queue2 = new LinkedList<>(); //queue for src2\n\t \n\t QueueNode sn1 = new QueueNode(src1, 0, src1); //src node 1 queue node\n\t QueueNode sn2 = new QueueNode(src2, 0, src2);\n\t \n\t ArrayList<coordinate> pathHold1 = new ArrayList<>(); //for first path\n\t ArrayList<coordinate> pathHold2 = new ArrayList<>(); //for second path \n\t \n\t visited[src1.x][src1.y] = true; //mark the start node as visited inside of the visited boolean 2d array for first src\n\t visited[src2.x][src2.y] = true; //mark the start node as visited inside of the visited boolean 2d array for second src\n\t \n\t System.out.println();\n\t \n\t queue1.add(sn1);\n\t queue2.add(sn2);\n\t //added the start nodes\n\t \n\t QueueNode current1 = null;\n\t QueueNode current2 = null;\n\t //to be used later to hold current node being looked at\n\t coordinate c1 = null;\n\t coordinate c2 = null;\n\t\t//coordinates to be examined\n\t \n\t while(!queue1.isEmpty()&&!queue2.isEmpty()){\n\t //keep iterating so long as queues have items -- but if one becomes empty, check at each iteration\n\t\t\t//to avoid null pointer so we are not dequeuing from empty queue\n int maxFringe = 0;\n\t\t//use this to check max fringe at each time we add to either queue\n if(queue1.size()>maxFringe || queue2.size()>0) {\n \t if(queue1.size()>maxFringe) {\n \t\t maxFringe=queue1.size();\n \t }else {\n \t\t maxFringe=queue2.size();\n \t }\n }\n\t \n\t \tif(!queue1.isEmpty()) { \n\t\t\t\t//while first queue is not empty, pop\n\t \t\t current1 = queue1.peek(); // this is n\n\t c1 = current1.point;\n\t \t\t visited[c1.x][c1.y]=true; //mark this node as visited, will check neighbors later\n\t boolean inFringe = false;\n\t inFringe = compareFringe(c1, queue2); //see if intersect or not\n\t \n\t \n\t // compare current point to the queue2 fringe. If not in fringe\n\t if(inFringe) {\n\t \t //we have found the duplicate \n\t \t System.out.println(\"duplicate\");\n\t \t intersect = c1;\n\t\t System.out.println(\"Intersect is :\"+c1.x+\",\"+c1.y);\n\t\t visit1[c1.x][c1.y]=current1.prev; //set prev node or where we came from\n\t\t \n\t\t System.out.println(\"We have reached our goal!\");\n\t\t \n\t\t if(current2 != null) {\n\t\t\t\t\t //so long as paths have values, add length and return\n\t\t return current1.pathTotal+current2.pathTotal;\n\t\t }else {\n\t\t\t\t\t //else return only one path \n\t\t \t return current1.pathTotal;\n\t\t }\n\t }\n\t\t\t\t//this is getting the neighbors, same as BFS\n\t \n\t int row1 = 0;\n\t int col1 = 0;\n\t \n\t for (int i = 0; i < 4; i++) { \n\t row1= c1.x + rowNum1[i]; \n\t col1 = c1.y + colNum1[i]; \n\t //grab neighbor of current\n\t if (cellValid(row1, col1) && map[row1][col1] == 1 && !visited[row1][col1]){ \n\t \t \n\t // mark cell as visited and enqueue it \n\t visited[row1][col1] = true; //we visited the node so mark it\n\t visit1[row1][col1] = new coordinate(c1.x, c1.y); //set prev as current coord\n\n\t QueueNode Adjcell = new QueueNode(new coordinate(row1, col1), current1.pathTotal + 1, new coordinate(row1-rowNum1[i], col1-colNum1[i])); \n\t queue1.add(Adjcell); //make it a queueNode to add to q1 for first path\n\t }else if(cellValid(row1, col1) && map[row1][col1] == 1 && (visited[row1][col1]&&visit2[row1][col1]!=null)){\n\t \t // System.out.println(\"already visited\"+row1+\",\"+col1); \n\t\t\t\t //check if already visited and valid (not off grid) and = 1 so we can take path -- \n\t\t\t\t //if so, this means we found intersect\n\t\t\t\t //make sure node has been visited in other path to guarantee it is intersect\n\t \t intersect=new coordinate(row1,col1); //set intersect\n\t \t visit1[intersect.x][intersect.y]=new coordinate(c1.x, c1.y); //set where we came from\n\t \t //current1.pathTotal++;\n\t \t printfin(visit1, visit2); //used to print final path -- set map\n \n int nodesExplored1 = 0;\n int nodesExplored2 = 0;\n for(coordinate coor : pathHold1){\n nodesExplored1++;\n }\n for(coordinate coor : pathHold2){\n nodesExplored2++;\n }\n\t\t\t\t \n\t\t\t\t //get number of nodes expanded in each path, add together\n\n int fin = nodesExplored1+nodesExplored2; //this is final explored nodes in each path\n System.out.println(\"Nodes explored: \" + fin);\n \n\t \t return pathsize; //return total pathsize\n\t \t //break;\n\t }\n\t \n\t \n\t } \n\t //once all of the neighbors have been visited, dequeue from queue 1 in path 1\n\t queue1.remove(); \n\t pathHold1.add(c1); //add to explored\n\t \n\t }\n\t \t//now to the same in path2 from (dim-1, dim-1) as src2\n\t \tif(!queue2.isEmpty()) {\n\t \t\t\n\t \t\t current2 = queue2.peek(); // this is n\n\t c2 = current2.point;\n\t \t\t visited[c2.x][c2.y]=true;\n\t boolean inFringe = false;\n\t inFringe = compareFringe(c2, queue1);\n\t \n\t // compare current point to the queue2 fringe. If not in fringe\n\t if(inFringe) {\n\t \t //we have found the duplicate \n\t \t System.out.println(\"duplicate\");\n\t \t intersect = c2;\n\t\t // System.out.println(\"Intersect is :\"+c2.x+\",\"+c2.y);\n\t\t visit2[c2.x][c2.y]=current2.prev;\n\t\t \n\t\t System.out.println(\"We have reached our goal!\");\n\t\t \n\t\t \n\t\t if(current1 != null) {\n\t\t\t return current1.pathTotal+current2.pathTotal;\n\t\t\t }else {\n\t\t\t \t return current2.pathTotal;\n\t\t\t }\n\t }\n\t \n\t \t// get neighbors\n\t int row2 = 0;\n\t int col2 = 0;\n\t \n\t for (int i = 0; i < 4; i++) { \n\t row2= c2.x + rowNum2[i]; \n\t col2 = c2.y + colNum2[i]; \n\t \n\t \n\t if (cellValid(row2, col2) && map[row2][col2] == 1 && !visited[row2][col2]){ \n\t \t \n\t // mark cell as visited and enqueue it \n\t visited[row2][col2] = true; \n\t visit2[row2][col2] = new coordinate(c2.x, c2.y);\n\n\t QueueNode Adjcell2 = new QueueNode(new coordinate(row2, col2), current2.pathTotal + 1, new coordinate(row2-rowNum2[i], col2-colNum2[i])); \n\t queue2.add(Adjcell2);\n\t }else if(cellValid(row2, col2) && map[row2][col2] == 1 && (visited[row2][col2]&&visit1[row2][col2]!=null)){\n\t \t \n\t \t intersect=new coordinate(row2,col2);\n\t \t \n\t \t visit2[intersect.x][intersect.y]=new coordinate(c2.x, c2.y);\n\t \n\t \n\t printfin(visit1, visit2);\n\t int nodesExplored1 = 0;\n int nodesExplored2 = 0;\n for(coordinate coor : pathHold1){\n nodesExplored1++;\n }\n for(coordinate coor : pathHold2){\n nodesExplored2++;\n }\n\n int fin = nodesExplored1+nodesExplored2;\n System.out.println(\"Nodes explored: \" + fin);\n\t \t return pathsize;\n\t \t \n\t }\n\t \n\t } \n\t //once all of the neighbors have been visited, dequeue \n\t queue2.remove(); \n\t pathHold2.add(c2);\n\t \t\t\n\t \t}\n\n\t }\n \n int nodesExplored1 = 0;\n int nodesExplored2 = 0;\n for(coordinate coor : pathHold1){\n nodesExplored1++;\n }\n for(coordinate coor : pathHold2){\n nodesExplored2++;\n }\n\n int fin = nodesExplored1+nodesExplored2;\n System.out.println(\"Nodes explored: \" + fin);\n\t //if here, means no path was found\n\t return -1;\n\t \n\t }",
"private int bfs(String source, String destination, Map<String, List<String>> graph) {\n\n class Node {\n String word;\n int distance = 0;\n\n public Node(String word, int distance) {\n this.word = word;\n this.distance = distance;\n }\n }\n\n final Queue<Node> queue = new LinkedList<>();\n Set<String> visited = new HashSet<>();\n queue.offer(new Node(source, 0)); //distance of source to source is 0\n visited.add(source);\n\n while (!queue.isEmpty()) {\n\n final Node node = queue.poll();\n final int distance = node.distance;\n\n //if we reached the destination node\n if (node.word.equals(destination)) {\n return distance + 1;\n }\n\n //try all word which is 1 weight away\n for (String neighbour : graph.getOrDefault(node.word, new ArrayList<>())) {\n if (!visited.contains(neighbour)) {\n visited.add(neighbour);\n queue.offer(new Node(neighbour, distance + 1));\n }\n }\n\n\n }\n return 0;\n }",
"public List<String> breadthFirstSearch(List<String> array) {\n // Write your code here.\n Queue<Node> queue = new ArrayDeque<>();\n queue.add(this);\n // breadthFirstSearch(this, queue, array);\n while (queue.size() > 0) {\n Node node = queue.poll();\n array.add(node.name);\n queue.addAll(node.children);\n }\n return array;\n }",
"public static void main(String[] args) {\n BreadthFirstSearch g = new BreadthFirstSearch(4);\n\n /* Add edges in graph */\n g.addEdge(0, 0);\n g.addEdge(0,1);\n g.addEdge(0, 2);\n g.addEdge(1, 2);\n g.addEdge(2, 0);\n g.addEdge(2, 3);\n\n System.out.println(\"Traverse graph with BFS...\");\n System.out.println(\"Starting Vertex: 2\");\n\n g.BFS(2);\n }",
"public static void main(String[] args) throws IOException {\n\t\t\n\t\t\tbbst rbt = new bbst();\n\t\t\n\t\t\t//File f1 = new File(\"C:\\\\Users\\\\Prakriti\\\\Downloads\\\\ads_project\\\\test_10000000.txt\");\n\t\t\t\t//System.out.println(\" file name \" + args[0]);\n\t\t\tFile f1 = new File(args[0]);\n\t\t\tFileReader input = new FileReader(f1);\n\t\t\tBufferedReader in = new BufferedReader(input);\n\t\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\t\tString line;\n\t\t\t\tline = in.readLine();\n\t\t\t\tint size = Integer.parseInt(line);\n\t\t\t\tint arr[][] = new int[size][2];\n\t\t\t\tint i=0;\n\t\t\t\twhile(line != null){\n\t\t\t\t\tline = in.readLine();\n\t\t\t\t\tif( line != null){\n\t\t\t\t\t\tint key = Integer.parseInt(line.split(\" \")[0]);\n\t\t\t\t\t\tint val = Integer.parseInt(line.split(\" \")[1]);\n\t\t\t\t\t\tarr[i][0]=key;\n\t\t\t\t\t\tarr[i][1]=val;\n\t\t\t\t\t\ti++;\n\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\trbt.buildInitialTree(arr,size);\n\t\t\t\t\n\t\t\t\tinput.close();\n\t\t\t\tin.close();\n\t\t\t\t//System.out.println(\" tree build\");\n\t\t\t\tString line1;\n\t\t\t\twhile ((line1 = br.readLine()) != null) {\n\t\t\t\t\t//System.out.println(\" line \" + line);\n\t \tif(line1.isEmpty())\n\t \t\tcontinue;\n\t \t//System.out.println(\" line \");\n\t \tStringTokenizer stringTokenizer = new StringTokenizer(line1, \" \");\n\t \t\n\t \twhile (stringTokenizer.hasMoreElements()) {\n\t\t\t\t\t \n\t \tString command = stringTokenizer.nextElement().toString();\n\t \tint param1 ;\n\t\t\t \tint param2;\n\t\t\t \t\t \n\t \n\t\t // System.out.println(command);\n\t\t switch (command.toString()) {\n\t\t case \"increase\":\n\t\t \tparam1 = Integer.parseInt(stringTokenizer.nextElement().toString());\n\t\t \tparam2 = Integer.parseInt(stringTokenizer.nextElement().toString());\n\t\t \n\t\t //System.out.println(Integer.parseInt(y.toString()));\n\t\t rbt.Increase(param1, param2);\n\t\t break;\n\t\t case \"reduce\":\n\t\t \tparam1 = Integer.parseInt(stringTokenizer.nextElement().toString());\n\t\t \tparam2 = Integer.parseInt(stringTokenizer.nextElement().toString());\n\t\t rbt.Reduce(param1,param2);\n\t\t break;\n\t\t case \"count\":\n\t\t \tparam1 = Integer.parseInt(stringTokenizer.nextElement().toString());\n\t\t rbt.Count(param1);\n\t\t break;\n\t\t case \"inrange\":\n\t\t \tparam1 = Integer.parseInt(stringTokenizer.nextElement().toString());\n\t\t \tparam2 = Integer.parseInt(stringTokenizer.nextElement().toString());\n\t\t rbt.InRange(param1, param2);\n\t\t break;\n\t\t case \"next\":\n\t\t \tparam1 = Integer.parseInt(stringTokenizer.nextElement().toString());\n\t\t rbt.Next(param1);\n\t\t break;\n\t\n\t\t case \"previous\":\n\t\t \tparam1 = Integer.parseInt(stringTokenizer.nextElement().toString());\n\t\t rbt.Previous(param1);\n\t\t break;\n\t\t case \"quit\":\n\t\t\t\t\t\t \tSystem.exit(0);\n\t\t\t\t\t\t \tbreak;\n\t\t\t\t\t\t default : \n\t\t\t\t\t\t \tSystem.out.println(\" incorrect Input\");\n\t\t\t\t\t\t \tSystem.exit(0);\n\t\t\t\t\t\t \tbreak;\n\t\t }\n\t \t}\n\t }\n\t\t\t\t\n\t\t\t\t//File f2 = new File(\"C:\\\\Users\\\\Prakriti\\\\Downloads\\\\ads_project\\\\commands.txt\");\n\t\t\t\t//File f2 = new File(args[1]);\n\t\t\t\t//FileReader input2 = new FileReader(f2);\n\t\t\t\t//BufferedReader in2 = new BufferedReader(input2);\n\t\t\t\t//String s2 = in2.readLine();\n\t\t\t\t/*while(s != null){\n\t\t\t\t\ts = in.readLine();\n\t\t\t\t\tif(s!=null){\n\t\t\t\t\t\tswitch(s.split(\" \")[0]){\n\t\t\t\t\t case \"increase\" :\n\t\t\t\t\t \t//System.out.println(\" increase \");\n\t\t\t\t\t \tint key = Integer.parseInt(s.split(\" \")[1]);\n\t\t\t\t\t \tint incVal = Integer.parseInt(s.split(\" \")[2]);\n\t\t\t\t\t \t//System.out.println(\" key \" + key + \" incVal \" + incVal);\n\t\t\t\t\t \trbt.Increase(key, incVal);\n\t\t\t\t\t break; \n\t\t\t\t\t case \"reduce\" :\n\t\t\t\t\t \t //System.out.println(\" reduce \");\n\t\t\t\t\t \tkey = Integer.parseInt(s.split(\" \")[1]);\n\t\t\t\t\t \tincVal = Integer.parseInt(s.split(\" \")[2]);\n\t\t\t\t\t \t//System.out.println( \" key \" + key + \" incVal \" + incVal);\n\t\t\t\t\t \trbt.Reduce(key, incVal);\n\t\t\t\t\t break;\n\t\t\t\t\t case \"count\" :\n\t\t\t\t\t \t//System.out.println(\"count \");\n\t\t\t\t\t \tkey = Integer.parseInt(s.split(\" \")[1]);\n\t\t\t\t\t \t//System.out.println(\" key \" + key);\n\t\t\t\t\t \trbt.Count(key);\n\t\t\t\t\t \tbreak;\n\t\t\t\t\t case \"inrange\" :\n\t\t\t\t\t \t//System.out.println(\" in range \");\n\t\t\t\t\t \tkey = Integer.parseInt(s.split(\" \")[1]);\n\t\t\t\t\t \tint key2 = Integer.parseInt(s.split(\" \")[2]);\n\t\t\t\t\t \t//System.out.println(\" key \" + key + \" val \" + key2);\n\t\t\t\t\t \trbt.InRange(key, key2);\n\t\t\t\t\t \tbreak;\n\t\t\t\t\t case \"next\" :\n\t\t\t\t\t \t//System.out.println(\" next\");\n\t\t\t\t\t \tkey = Integer.parseInt(s.split(\" \")[1]);\n\t\t\t\t\t \t//System.out.println(\" key \" + key);\n\t\t\t\t\t \trbt.Next(key);\n\t\t\t\t\t \tbreak;\n\t\t\t\t\t case \"previous\" :\n\t\t\t\t\t \t//System.out.println(\" prev \");\n\t\t\t\t\t \tkey = Integer.parseInt(s.split(\" \")[1]);\n\t\t\t\t\t \t//System.out.println(\" find prev of \" + key);\n\t\t\t\t\t \t//System.out.println(\" node in tree \" + rbt.getNode(root, key).id);\n\t\t\t\t\t \trbt.Previous(key);\n\t\t\t\t\t \tbreak;\n\t\t\t\t\t case \"quit\":\n\t\t\t\t\t \tSystem.exit(0);\n\t\t\t\t\t \tbreak;\n\t\t\t\t\t default : \n\t\t\t\t\t \tSystem.out.println(\" incorrect Input\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}*/\n\t\t\n\t}",
"public static void main (String []args) throws FileNotFoundException {\n\t\tArrayList<Item> priorities = new ArrayList<Item>();\n\t\t\n\t\t// pq.id.100K1.1\n\t\t// pq.id.100K4.1\n\t\t// pq.id.10K1.2\n\t\t// pqsort.100K.3\n\t\t\n\t\t// do this to retrieve large cases via internet.\n\t\t//java.net.URL u;\n\t\t//Scanner s = new Scanner (u.openStream());\n\t\t\n\t\tFile f = new File (\"tests\\\\algs\\\\model\\\\performance\\\\pq_random\\\\pqsort.1K.1\");\n\t\tScanner sc = new Scanner (f);\n\t\twhile (sc.hasNext()) {\n\t\t\tString s = sc.nextLine();\n\t\t\tif (s.startsWith(\"pqh\")) continue;\n\t\t\tif (s.startsWith(\"com\")) continue;\n\t\t\t\n\t\t\tif (s.startsWith(\"dmn\")) {\n\t\t\t\tpriorities.add(sentinel);\n\t\t\t} else {\n\t\t\t\tStringTokenizer st = new StringTokenizer(s, \" \");\n\t\t\t\tst.nextToken();\n\t\t\t\tDouble d = Double.parseDouble(st.nextToken());\n\t\t\t\tInteger i = Integer.parseInt(st.nextToken());\n\t\t\t\tpriorities.add(new Item (i, d));\n\t\t\t}\n\t\t}\n\t\tsc.close();\n\t\t\n\t\t// Now ready to measure PQ.\n\t\tIPQueue ipq = new ArrayPQ();\n\t\t//IPQueue ipq = new BalancedTreePQ();\n\t\t\n\t\tTrialSuite minTS = new TrialSuite ();\n\t\tTrialSuite insTS = new TrialSuite ();\n\t\tlong n0 = System.currentTimeMillis();\n\t\tfor (int i = 0; i < priorities.size(); i++) {\n\t\t\tItem it = priorities.get(i);\n\t\t\tif (it == sentinel) {\n\t\t\t\tlong n1 = System.currentTimeMillis();\n\t\t\t\tipq.minimum();\n\t\t\t\tlong n2 = System.currentTimeMillis();\n\t\t\t\tminTS.addTrial(1, n1, n2);\n\t\t\t} else {\n\t\t\t\tlong n1 = System.currentTimeMillis();\n\t\t\t\tipq.insert(it.priority, it.item);\n\t\t\t\tlong n2 = System.currentTimeMillis();\n\t\t\t\tinsTS.addTrial(1, n1, n2);\n\t\t\t}\n\t\t}\n\t\tlong e0 = System.currentTimeMillis();\n\t\tSystem.out.println ((e0 - n0) + \" milliseconds for completion.\");\n\t\tSystem.out.println (\"min\");\n\t\tSystem.out.println (minTS.computeTable());\n\t\tSystem.out.println (\"insert\");\n\t\tSystem.out.println (insTS.computeTable());\n\t}",
"@Override\r\n public List<T> breadthFirstPath(T start, T end) {\r\n\r\n Vertex<T> startV = vertices.get(start);\r\n Vertex<T> endV = vertices.get(end);\r\n\r\n LinkedList<Vertex<T>> vertexList = new LinkedList<>();\r\n //Set<Vertex<T>> visited = new HashSet<>();\r\n ArrayList<Vertex<T>> visited = new ArrayList<>();\r\n\r\n LinkedList<Vertex<T>> pred = new LinkedList<>();\r\n int currIndex = 0;\r\n\r\n pred.add(null);\r\n\r\n vertexList.add(startV);\r\n visited.add(startV);\r\n\r\n LinkedList<T> path = new LinkedList<>();\r\n\r\n if (breadthFirstSearch(start, end) == false) {\r\n path = new LinkedList<>();\r\n return path;\r\n } else {\r\n while (vertexList.size() > 0) {\r\n Vertex<T> next = vertexList.poll();\r\n if(next == null){\r\n continue;\r\n }\r\n if (next == endV) {\r\n path.add(endV.getValue());\r\n break;\r\n }\r\n for (Vertex<T> neighbor : next.getNeighbors()) {\r\n if (!visited.contains(neighbor)) {\r\n pred.add(next);\r\n visited.add(neighbor);\r\n vertexList.add(neighbor);\r\n }\r\n }\r\n currIndex++;\r\n //path.add(next.getValue());\r\n\r\n }\r\n while (currIndex != 0) {\r\n Vertex<T> parent = pred.get(currIndex);\r\n path.add(parent.getValue());\r\n currIndex = visited.indexOf(parent);\r\n }\r\n }\r\n Collections.reverse(path);\r\n return path;\r\n }",
"public static void main(String[] args) {\n generateAndSaveExampleGraph();\n\n\n /*\n * select graph for prepairing and handling by algorhytm\n * determine graph source from config.xml:\n * config case = ?\n * 1 - from matrix\n * 2 - from edges list\n * 3 - from xml\n * */\n //read configCase\n Integer configCase = 0;\n try {\n configCase = (Integer) XMLSerializer.read( \"config.xml\");\n } catch (Exception e) {\n e.printStackTrace();\n }\n //determine case\n EuclidDirectedGraph graph = null;\n switch (configCase){\n case 1:\n graph = getGraphFromMatrix();\n break;\n case 2:\n graph = getGraphFromEdgesList();\n break;\n case 3:\n graph = getGraphFromXML();\n break;\n default:\n return;\n\n }\n //find all sources and sinks\n ArrayList<BoundsGraphVertex> sources = new ArrayList<>();\n ArrayList<BoundsGraphVertex> sinks = new ArrayList<>();\n //get all sources and sinks\n for (Map.Entry<BoundsGraphVertex, Map<BoundsGraphVertex, Double>> vertexEntry : graph.getMap().entrySet()) {\n //if there are no edges from vertex then its sink\n if (vertexEntry.getValue().isEmpty()) {\n sinks.add(vertexEntry.getKey());\n } else {\n //mark all vertexes which have incoming edges\n for (BoundsGraphVertex dest : vertexEntry.getValue().keySet()) {\n dest.setMarked(true);\n }\n }\n }\n //all unmarked vertexes are sources\n for (BoundsGraphVertex vertex : graph) {\n if (!vertex.isMarked()) sources.add(vertex);\n }\n\n /*\n * First algorithm: for each source-sink pair get path using euclid heuristics\n * */\n List<BoundsGraphVertex> minPath = null;\n Double minLength = Double.MAX_VALUE;\n for (BoundsGraphVertex source :\n sources) {\n for (BoundsGraphVertex sink :\n sinks) {\n //need use path storage list because algorhytm returns only double val of length.\n //path will be saved in this storage.\n List<BoundsGraphVertex> pathStorage = new ArrayList<>();\n //do algo\n Double length = Algorithms.shortestEuclidDijkstraFibonacciPathWithHeuristics(graph, source, sink, pathStorage, minLength);\n //check min\n if (minLength > length) {\n minLength = length;\n minPath = pathStorage;\n }\n\n }\n }\n\n /*\n * Second algorithm: for each source get better sink\n * */\n minPath = null;\n minLength = Double.MAX_VALUE;\n for (BoundsGraphVertex source :\n sources) {\n //need use path storage list because algorhytm returns only double val of length.\n //path will be saved in this storage.\n List<BoundsGraphVertex> pathStorage = new ArrayList<>();\n //do algo\n Double length = Algorithms.shortestEuclidDijkstraFibonacciPathToManySinks(graph, source, sinks, pathStorage, minLength);\n //check min\n if (minLength > length) {\n minLength = length;\n minPath = pathStorage;\n }\n }\n try {\n XMLSerializer.write(minPath, \"output.xml\", false);\n XMLSerializer.write(minLength, \"output.xml\", true);\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n\n }",
"public void dijkstra(List<List<Node> > adj, int src){ \n this.adj = adj; \n \n for (int i = 0; i < V; i++) \n dist[i] = Integer.MAX_VALUE; \n \n // Add source node to the priority queue \n pq.add(new Node(src, 0)); \n \n // Distance to the source is 0 \n dist[src] = 0; \n while (settled.size() != V) { \n \n // remove the minimum distance node from the priority queue \n int u = pq.remove().node; \n \n // adding the node whose distance is finalized \n settled.add(u); \n \n e_Neighbours(u); \n } \n }",
"public static void breadthFirstSearch(ArrayList<Node> graph) {\n\t\tSystem.out.println(\"BFS:\");\n\t\tif(graph.size() == 0) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tGraphUtils.cleanGraph(graph);\n\n\t\tQueue<Node> queue = new LinkedList<Node>();\n\t\tfor(Node node : graph) {\n\t\t\tif(node.state != Node.State.UNDISCOVERED) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tnode.state = Node.State.DISCOVERED;\n\t\t\tqueue.add(node);\n\t\t\t\n\t\t\twhile(!queue.isEmpty()) {\n\t\t\t\tnode = queue.remove();\n\t\t\t\t\n\t\t\t\t//process node\n\t\t\t\tSystem.out.print(node.name + \" -> \");\n\t\t\t\t\n\t\t\t\tfor(Edge e : node.edges) {\n\t\t\t\t\t//process edge\n\t\t\t\t\tNode neighbor = e.getNeighbor(node);\n\t\t\t\t\t\n\t\t\t\t\t//first time we see this node it gets added to the queue for later processing\n\t\t\t\t\tif(neighbor.state == Node.State.UNDISCOVERED) {\n\t\t\t\t\t\tneighbor.state = Node.State.DISCOVERED;\n\t\t\t\t\t\tqueue.add(neighbor);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//finished with this node\n\t\t\t\tnode.state = Node.State.COMPLETE;\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println();\n\t\tGraphUtils.cleanGraph(graph);\n\t}",
"public void bft() {\r\n\t\tHashMap<String, Boolean> processed = new HashMap<>();\r\n\t\tLinkedList<Pair> queue = new LinkedList<>();\r\n\r\n\t\tArrayList<String> vnames = new ArrayList<>(vces.keySet());\r\n\t\tfor (String vname : vnames) {\r\n\t\t\tif (processed.containsKey(vname)) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tPair rootpair = new Pair(vname, vname);\r\n\t\t\tqueue.addLast(rootpair);\r\n\t\t\twhile (queue.size() != 0) {\r\n\t\t\t\t// 1. removeFirst\r\n\t\t\t\tPair rp = queue.removeFirst();\r\n\r\n\t\t\t\t// 2. check if processed, mark if not\r\n\t\t\t\tif (processed.containsKey(rp.vname)) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tprocessed.put(rp.vname, true);\r\n\r\n\t\t\t\t// 3. Check, if an edge is found\r\n\t\t\t\tSystem.out.println(rp.vname + \" via \" + rp.psf);\r\n\r\n\t\t\t\t// 4. Add the unprocessed nbrs back\r\n\t\t\t\tArrayList<String> nbrnames = new ArrayList<>(rp.vtx.nbrs.keySet());\r\n\t\t\t\tfor (String nbrname : nbrnames) {\r\n\t\t\t\t\tif (!processed.containsKey(nbrname)) {\r\n\t\t\t\t\t\tPair np = new Pair(nbrname, rp.psf + nbrname);\r\n\t\t\t\t\t\tqueue.addLast(np);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"void DFSearch(BFSNode n){\n\t\tn.discovered=true;\r\n\t\tSystem.out.print(\" discovered\");\r\n\t\tn.preProcessNode();\r\n\t\tfor( Integer edg: n.edges){\r\n\t\t\tn.processEdge(edg);\r\n\t\t\tif(!nodes[edg].discovered){\r\n\t\t\t\tnodes[edg].parent = n; \r\n\t\t\t\tnodes[edg].depth = n.depth +1;\r\n\t\t\t\t\r\n\t\t\t\tSystem.out.print(\"{new track with parent [\"+ nodes[edg].parent.value+\"] }\");\r\n\t\t\t\tDFSearch(nodes[edg]);\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tif(nodes[edg] != n.parent){\r\n\t\t\t\t\tSystem.out.print(\"{LOOP}\");\r\n\t\t\t\t\tif(nodes[edg].depth < n.reachableLimit.depth){\r\n\t\t\t\t\t\tn.reachableLimit = nodes[edg];\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\tSystem.out.print(\"{second visit}\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(\"back from node [ \"+n.value +\" ]\");\r\n\t\tn.postProcessNode();\r\n\t\tn.processed = true;\r\n\t\t\r\n\t}",
"public static Integer[] LexBFS(Graph<Integer,String> g) {\n\t\tGraph<myVertex,String> h = new SparseGraph<myVertex,String>();\r\n\t\th = convertToWeighted(g);\r\n\t\tfinal int N = g.getVertexCount();\r\n\t\t//System.out.print(\"Done. Old graph: \"+N+\" vertices. New graph \" +h.getVertexCount()+\"\\n\");\r\n\t\t\r\n\t\t//System.out.print(\"New graph is:\\n\"+h+\"\\n\");\r\n\t\tmyVertex[] queue = new myVertex[N];\r\n\t\t\r\n\t\tIterator<myVertex> a = h.getVertices().iterator();\r\n\t\tqueue[0] = a.next(); // start of BFS search. Now add neighbours.\r\n\t\tint indexCounter = 1;\r\n\t\tint pivot = 0;\r\n\t\t//System.out.print(\"Initial vertex is: \"+queue[0]+\" \");\r\n\t\tSystem.out.print(\"STATUS REPORT:\\n queue = \"+queue+\"\\n indexCounter=\" + indexCounter+\"\\n pivot=\"+pivot+\"\\n\");\r\n\t\tIterator<myVertex> b = h.getNeighbors(queue[0]).iterator();\r\n\t\twhile (b.hasNext()) {\r\n\t\t\tqueue[indexCounter] = b.next();\r\n\t\t\tqueue[indexCounter].label.add(N);\r\n\t\t\tqueue[indexCounter].setColor(1); // 1 = grey = queued\r\n\t\t\tindexCounter++;\r\n\t\t}\r\n\t\t//System.out.print(\"with \"+(indexCounter-1) +\" neighbours\\n\");\r\n\t\t//System.out.print(\"STATUS REPORT:\\n queue = \"+queue+\"\\n indexCounter=\" + indexCounter+\"\\n pivot=\"+pivot+\"\\n\");\r\n\t\tqueue[0].setColor(2); // 2 = black = processed\r\n\t\t// indexCounter counts where the next grey vertex will be enqueued\r\n\t\t// pivot counts where the next grey vertex will be processed and turned black\r\n\r\n\t\tpivot = 1;\r\n\r\n\t\t//System.out.print(\"STATUS REPORT:\\n queue = \"+queue+\"\\n indexCounter=\" + indexCounter+\"\\n pivot=\"+pivot+\"\\n\");\r\n\t\twhile (pivot < indexCounter) {\r\n\t\t\t// first, find the highest labelled entry in the rest of the queue\r\n\t\t\t// and move it to the pivot position. This should be improved upon\r\n\t\t\t// by maintaining sorted order upon adding elements to the queue\r\n\t\t\t\r\n\t\t\t//System.out.print(\"choosing next vertex...\\n\");\r\n\t\t\tint max = pivot;\r\n\t\t\tfor (int i = pivot+1; i<indexCounter; i++) {\r\n\t\t\t\t//indexCounter is the next available spot, so indexCounter-1 is the last\r\n\t\t\t\t//entry i.e. it is last INDEX where queue[INDEX] is non-empty.\r\n\t\t\t\tif (queue[i].comesBefore(queue[max])) {\r\n\t\t\t\t\tmax = i;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t//System.out.print(\"STATUS REPORT:\\n queue = \"+queue+\"\\n indexCounter=\" + indexCounter+\"\\n pivot=\"+pivot+\"\\n\");\r\n\t\t\t// at the end of this for-loop, found the index \"max\" of the element of\r\n\t\t\t// the queue with the lexicographically largest label. Swap it with pivot.\r\n\t\t\tmyVertex temp = queue[pivot];\r\n\t\t\tqueue[pivot] = queue[max];\r\n\t\t\tqueue[max] = temp;\r\n\r\n\t\t\t//System.out.print(\"Chose vertex: \"+temp+\" to visit next\\n\");\r\n\t\t\t//System.out.print(\"STATUS REPORT:\\n queue = \"+queue+\"\\n indexCounter=\" + indexCounter+\"\\n pivot=\"+pivot+\"\\n\");\r\n\t\t\t\r\n\t\t\t// process the pivot point => find and mark its neighbours, turn it black.\r\n\t\t\tb = h.getNeighbors(queue[pivot]).iterator();\r\n\t\t\twhile (b.hasNext()) {\r\n\t\t\t\tmyVertex B = b.next();\r\n\t\t\t\tif (B.color == 0) {\r\n\t\t\t\t\t// found a vertex which has not been queued...\r\n\t\t\t\t\tqueue[indexCounter] = B;\r\n\t\t\t\t\tB.label.add(N-pivot);\r\n\t\t\t\t\tB.setColor(1);\r\n\t\t\t\t\tindexCounter++;\r\n\t\t\t\t}\r\n\t\t\t\telse if (B.color == 1) {\r\n\t\t\t\t\t// found a vertex in the queue which has not been processed...\r\n\t\t\t\t\tB.label.add(N-pivot);\r\n\t\t\t\t}\r\n\t\t\t\telse if (B.color != 2) {\r\n\t\t\t\t\tSystem.out.print(\"Critical Error: found a vertex in LexBFS process \");\r\n\t\t\t\t\tSystem.out.print(\"which has been visited but is not grey or black.\\n\");\r\n\t\t\t\t}\t\t\t\t\r\n\t\t\t\t//System.out.print(\"STATUS REPORT:\\n queue = \"+queue+\"\\n indexCounter=\" + indexCounter+\"\\n pivot=\"+pivot+\"\\n\");\r\n\t\t\t}\r\n\t\t\tqueue[pivot].setColor(2); //done processing current pivot\r\n\t\t\tpivot ++;\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t//LexBFS done; produce integer array to return;\r\n\t\t//System.out.print(\"STATUS REPORT:\\n queue = \"+queue+\"\\n indexCounter=\" + indexCounter+\"\\n pivot=\"+pivot+\"\\n\");\r\n\t\tInteger[] LBFS = new Integer[N]; // N assumes the graph is connected...\r\n\t\tfor (int i = 0; i<N; i++) {\r\n\t\t\tLBFS[i] = queue[i].id;\r\n\t\t}\r\n\t\t//System.out.print(\"STATUS REPORT:\\n queue = \"+queue+\"\\n indexCounter=\" + indexCounter+\"\\n pivot=\"+pivot+\"\\n\");\r\n\t\t//System.out.print(\"Returning array: \" + LBFS);\r\n\t\treturn LBFS;\r\n\t}",
"public void bfs(DSAGraphVertex vx, DSAStack visited, DSAQueue queue, DSAGraphVertex target)\n\t{\n\n\t\ttry {\n\t\t\tif(vx != null) //base case if it's null end recursion\n\t\t\t{\n\t\t\t\tvisited.push(vx); //push onto visited stack\n\t\t\t\tIterator<DSAGraphVertex> itr = vx.getAdjacent().iterator();\n\n\t\t\t\tdo{\n\t\t\t\t\twhile (itr.hasNext())\n\t\t\t\t\t{\n\t\t\t\t\t\tvx = itr.next();\n\t\t\t\t\t\tif(!vx.getVisited() && !vx.equals(target)) //if not visited and is not target traverse here\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tqueue.enqueue(vx); //adds to output queue\n\t\t\t\t\t\t\tvx.setVisited(); //sets to visited\n\t\t\t\t\t\t\tbfs(vx, visited, queue, target);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tvisited.pop();\n\n\t\t\t\t} while(!visited.isEmpty());\n\t\t\t}\n\t\t}\n\t\tcatch (IllegalArgumentException e) //catches empty stack exceptions\n\t\t{\n\t\t\t//System.out.println(e.getMessage());\n\t\t}\n\n\n\t}",
"public static void main(String[] args) {\n Scanner scan = null;\n try {\n scan = new Scanner(new File(\"src/input.txt\"));\n } catch (FileNotFoundException e) {\n System.out.println(\"File not found.\");\n }\n\n /** Read the minimum degree of B+Tree first */\n\n int degree = scan.nextInt();\n\n BTree bTree = new BTree(degree);\n\n /** Reading the database student.csv into B+Tree Node*/\n List<Student> studentsDB = getStudents();\n\n for (Student s : studentsDB) {\n bTree.insert(s);\n }\n \n long size = (long) studentsDB.size();\n /** Start reading the operations now from input file*/\n try {\n while (scan.hasNextLine()) {\n Scanner s2 = new Scanner(scan.nextLine());\n\n while (s2.hasNext()) {\n\n String operation = s2.next();\n //System.out.println(operation);\n switch (operation) {\n case \"insert\": {\n\n long studentId = Long.parseLong(s2.next());\n String studentName = s2.next() + \" \" + s2.next();\n String major = s2.next();\n String level = s2.next();\n int age = Integer.parseInt(s2.next());\n /** TODO: Write a logic to generate recordID*/\n\n long recordID = ++size;\n\n Student s = new Student(studentId, age, studentName, major, level, recordID);\n bTree.insert(s);\n\n break;\n }\n case \"delete\": {\n long studentId = Long.parseLong(s2.next());\n boolean result = bTree.delete(studentId);\n if (result)\n System.out.println(\"Student deleted successfully.\");\n else\n System.out.println(\"Student deletion failed.\");\n\n break;\n }\n case \"search\": {\n long studentId = Long.parseLong(s2.next());\n long recordID = bTree.search(studentId);\n if (recordID != -1)\n System.out.println(\"Student exists in the database at \" + recordID);\n else\n System.out.println(\"Student does not exist.\");\n break;\n }\n case \"print\": {\n List<Long> listOfRecordID = new ArrayList<>();\n listOfRecordID = bTree.print();\n System.out.println(\"List of recordIDs in B+Tree \" + listOfRecordID.toString());\n break;\n }\n default:\n System.out.println(\"Wrong Operation\");\n break;\n }\n }\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"public static void main(String[] args) throws CorruptIndexException, LockObtainFailedException, IOException, ParseException{\n\t\tboolean lucene_im_mem = false;\n\t\t//1. Build the Index with varying \"database size\"\n\t\tString dirName =\"/data/home/duy113/SupSearchExp/AIDSNew/\";\n//\t\tString dirName = \"/Users/dayuyuan/Documents/workspace/Experiment/\";\n\t\tString dbFileName = dirName + \"DBFile\";\n\t\tString trainQueryName= dirName + \"TrainQuery\";\n//\t\tString testQuery15 = dirName + \"TestQuery15\";\n\t\tString testQuery25 = dirName + \"TestQuery25\";\n//\t\tString testQuery35 = dirName + \"TestQuery35\";\n\t\tGraphDatabase query = new GraphDatabase_OnDisk(testQuery25, MyFactory.getSmilesParser());\n\t\tdouble[] minSupts = new double[4];\n\t\tminSupts[0] = 0.05; minSupts[1] = 0.03; minSupts[2] =0.02; minSupts[3] = 0.01;\n \t\tint lwIndexCount[] = new int[1];\n\t\tlwIndexCount[0] = 479;\t\n//\t\tSystem.out.println(\"Build CIndexFlat Left-over: \");\n//\t\tfor(int j = 3; j< 4; j++){\n//\t\t\tdouble minSupt = minSupts[j];\n//\t\t\tfor(int i = 4; i<=10; i = i+2){\n//\t\t\t\tString baseName = dirName + \"G_\" + i + \"MinSup_\" + minSupt + \"/\";\n//\t\t\t\tGraphDatabase trainingDB = new GraphDatabase_OnDisk(dbFileName + i, MyFactory.getDFSCoder());\n//\t\t\t\tGraphDatabase trainQuery = new GraphDatabase_OnDisk(trainQueryName, MyFactory.getSmilesParser());\t\t\n//\t\t\t\tif(i == 2){\n//\t\t\t\t\tSystem.out.println(baseName + \"CIndexFlat\");\n//\t\t\t\t\tCIndexExp.buildIndex(trainingDB, trainQuery, trainingDB, baseName, minSupt, lwIndexCount[0]);\n//\t\t\t\t}\n//\t\t\t\telse{\n//\t\t\t\t\tString featureBaseName = dirName + \"G_2\" + \"MinSup_\" + minSupt + \"/\";\n//\t\t\t\t\tSystem.out.println(baseName + \"CIndexFlat with Features \" + featureBaseName);\n//\t\t\t\t\tCIndexExp.buildIndex(featureBaseName, trainingDB, baseName, minSupt);\n//\t\t\t\t}\n//\t\t\t\tSystem.gc();\n//\t\t\t}\n//\t\t}\n\t\tSystem.out.println(\"Run Query Processing: \");\n\t\tfor(int j = 0; j< 4; j++){\n\t\t\tdouble minSupt = minSupts[j];\n\t\t\tfor(int i = 2; i<=10; i = i+2){\n\t\t\t\tString baseName = dirName + \"G_\" + i + \"MinSup_\" + minSupt + \"/\";\n\t\t\t\tGraphDatabase trainingDB = new GraphDatabase_OnDisk(dbFileName + i, MyFactory.getDFSCoder());\n\t\t\t\tGraphDatabase trainQuery = new GraphDatabase_OnDisk(trainQueryName, MyFactory.getSmilesParser());\t\t\n\t\t\t\tif(j!=0 || i!=2){\n\t\t\t\t\tSystem.out.println(baseName + \"LWindex\");\n\t\t\t\t\t//LWIndexExp.buildIndex(trainingDB, trainQuery, trainingDB, trainQuery.getParser(),baseName, minSupt, lwIndexCount);\n\t\t\t\t\t//System.gc();\n\t\t\t\t\tLWIndexExp.runIndex(trainingDB, trainQuery, baseName, lucene_im_mem);\n\t\t\t\t\tLWIndexExp.runIndex(trainingDB, query, baseName, lucene_im_mem);\n\t\t\t\t\tSystem.gc();\t\t\n\t\t\t\t\tSystem.out.println(baseName + \"PrefixIndex\");\n\t\t\t\t\t//PrefixIndexExp.buildIndex(trainingDB, trainingDB, baseName, minSupt);\n\t\t\t\t\t//System.gc();\n\t\t\t\t\tPrefixIndexExp.runIndex(trainingDB, trainQuery, baseName, lucene_im_mem);\n\t\t\t\t\tPrefixIndexExp.runIndex(trainingDB, query, baseName, lucene_im_mem);\n\t\t\t\t\tSystem.gc();\t\t\n\t\t\t\t\tSystem.out.println(baseName + \"PrefixIndexHi\");\n\t\t\t\t\t//PrefixIndexExp.buildHiIndex(trainingDB, trainingDB, 2, baseName, minSupt);\n\t\t\t\t\t//System.gc();\n\t\t\t\t\tPrefixIndexExp.runHiIndex(trainingDB, trainQuery, baseName, lucene_im_mem);\n\t\t\t\t\tPrefixIndexExp.runHiIndex(trainingDB, query, baseName, lucene_im_mem);\n\t\t\t\t\tSystem.gc();\n\t\t\t\t\tSystem.out.println(baseName + \"GPTree\");\n\t\t\t\t\t//GPTreeExp.buildIndex(trainingDB, trainingDB, baseName, minSupt);\n\t\t\t\t\t//System.gc();\n\t\t\t\t\tGPTreeExp.runIndex(trainingDB, trainQuery, baseName, lucene_im_mem);\n\t\t\t\t\tGPTreeExp.runIndex(trainingDB, query, baseName, lucene_im_mem);\n\t\t\t\t\tSystem.gc();\n\t\t\t\t\tSystem.out.println(baseName + \"CIndexFlat\");\n\t\t\t\t\t//CIndexExp.buildIndex(trainingDB, trainQuery, trainingDB, baseName, minSupt, lwIndexCount[0]);\n\t\t\t\t\t//System.gc();\n\t\t\t\t\tCIndexExp.runIndex(trainingDB, trainQuery, baseName, lucene_im_mem);\n\t\t\t\t\tCIndexExp.runIndex(trainingDB, query, baseName, lucene_im_mem);\n\t\t\t\t\tSystem.gc();\n\t\t\t\t}\n\t\t\t\tif(j==0&&i==2){\n\t\t\t\t\tSystem.out.println(baseName + \"CIndexTopDown: \" + lwIndexCount[0]);\n\t\t\t\t\tCIndexExp.buildIndexTopDown(trainingDB, trainQuery, trainingDB,MyFactory.getUnCanDFS(), baseName, minSupt, 2*trainQuery.getTotalNum()/lwIndexCount[0] ); // 8000 test queries\n\t\t\t\t\t//System.gc();\n\t\t\t\t}\n\t\t\t\tSystem.out.println(baseName + \"CIndexTopDown: \" + lwIndexCount[0]);\n\t\t\t\tCIndexExp.runIndexTopDown(trainingDB, trainQuery, baseName, lucene_im_mem);\n\t\t\t\tCIndexExp.runIndexTopDown(trainingDB, query, baseName, lucene_im_mem);\n\t\t\t\tSystem.gc();\n\t\t\t}\n\t\t}\n\t\tAIDSLargeExp.main(args);\n\t}",
"void BFS(String start){\n\t\tint iStart = index(start);\n\t\t\n\t\tFronta f = new Fronta(pocetVrcholu*2);\n\t\t\n\t\tvrchP[iStart].barva = 'S';\n\t\tvrchP[iStart].vzdalenost = 0;\n\t\t\n\t\tf.vloz(start);\n\t\t\n\t\twhile(!f.jePrazdna()){\n\t\t\tString u = f.vyber();\n\t\t\tint indexU = index(u);\n\t\t\tint pom = 0;\n\t\t\t\n\t\t\tfor(int i = 1;i<= vrchP[indexU].pocetSousedu;i++){\n\t\t\t\twhile(matice[indexU][pom] == 0){\n\t\t\t\t\tpom++;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tint a = pom++;\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif(vrchP[a].barva =='B'){\n\t\t\t\t\tvrchP[a].barva = 'S';\n\t\t\t\t\tvrchP[a].vzdalenost = vrchP[indexU].vzdalenost + 1;\n\t\t\t\t\tvrchP[a].predchudce = u;\n\t\t\t\t\tf.vloz(vrchP[a].klic);\n\t\t\t\t}\n\t\t\t}\n\t\t\tvrchP[indexU].barva = 'C';\n\t\t\tpole.add(vrchP[indexU].klic);\n\t\t}\n\t\t\n\t\t\n\t}",
"Bfs_search(int v) \r\n { \r\n V = v; \r\n \r\n adj = new LinkedList[v]; \r\n \r\n for (int i=0; i<v; ++i) \r\n adj[i] = new LinkedList(); \r\n }",
"public void greedyBFS(String input)\r\n\t{\r\n\t\tNode root_gbfs = new Node (input);\r\n\t\tNode current = new Node(root_gbfs.getState());\r\n\t\t\r\n\t\tNodeComparator gbfs_comparator = new NodeComparator();\r\n\t\tPriorityQueue<Node> queue_gbfs = new PriorityQueue<Node>(12, gbfs_comparator);\r\n\t\tArrayList<String> visited = new ArrayList<String>();\r\n\t\tArrayList<String> children = new ArrayList<String>();\r\n\t\t\r\n\t\tint nodes_popped = 0;\r\n\t\tint pqueue_max_size = 0;\r\n\t\tint pq_size = 0;\r\n\t\t\r\n\t\tcurrent.cost = 0;\r\n\t\tcurrent.total_cost = 0;\r\n\t\t\r\n\t\twhile(!goal_gbfs)\r\n\t\t{\r\n\t\t\tvisited.add(current.getState());\r\n\t\t\tchildren = Successor.findChildren(current.getState());\r\n\t\t\t\r\n\t\t\tfor (String a : children)\r\n\t\t\t{\r\n\t\t\t\t\r\n\t\t\t\tif (visited.contains(a))\r\n\t\t\t\t{\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\tNode nino = new Node(a);\r\n\t\t\t\t\tcurrent.children_nodes.add(nino);\r\n\t\t\t\t\tvisited.add(nino.getState());\r\n\t\t\t\t\t\r\n\t\t\t\t\tint cost = isCost(current.getState(), nino.getState());\r\n\t\t\t\t\tnino.cost = cost;\r\n\t\t\t\t\tnino.parent = current;\r\n\t\t\t\t\tint greedy_cost = greedybfsCost(nino.getState(), root_gbfs.getState());\r\n\t\t\t\t\tnino.setTotalCost(greedy_cost);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (!queue_gbfs.contains(nino))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tqueue_gbfs.add(nino);\r\n\t\t\t\t\t\tpq_size++;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Repeated State checking. Removing the same node from PQ if the path cost is less then the current one \r\n\t\t\t\t\telse if (queue_gbfs.contains(nino))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tfor (Node original : queue_gbfs)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tif (original.equals(nino))\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tNode copy = original;\r\n\t\t\t\t\t\t\t\tif (nino.getTotalCost() < copy.getTotalCost())\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\tqueue_gbfs.remove(copy);\r\n\t\t\t\t\t\t\t\t\tqueue_gbfs.add(nino);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tcurrent = queue_gbfs.poll();\r\n\t\t\tnodes_popped++;\r\n\t\t\t\r\n\t\t\tif (pq_size > pqueue_max_size)\r\n\t\t\t{\r\n\t\t\t\tpqueue_max_size = pq_size;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tpq_size--;\r\n\t\t\tgoal_gbfs = isGoal(current.getState());\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tgoal_gbfs = false;\r\n\t\tSystem.out.println(\"GBFS Solved!!\");\r\n\t\tSolution.performSolution(current, root_gbfs, nodes_popped, pqueue_max_size);\r\n\t}",
"public static void main(String[] args) throws Exception {\r\n\r\n\t //All results in Phase K-1.\r\n\t List<ItemSet> itemSetsPrevPass = new ArrayList<>();\r\n\t \r\n\t //Results in Phase K.\r\n\t List<ItemSet> candidateItemSets = null;\r\n\t int passNum=3;\r\n\t //Index Structure in Phase K.\r\n\t Trie trie = null;\r\n\t \r\n\t\tString lastPassOutputFile = \"E:\\\\复旦小学的资料\\\\part-r-00000\";\t\r\n \r\n try {\r\n File fp = new File(lastPassOutputFile);\r\n BufferedReader p = new BufferedReader(new FileReader(fp));\r\n String currLine;\r\n while ((currLine = p.readLine()) != null) {\r\n currLine = currLine.replace(\"[\", \"\");\r\n currLine = currLine.replace(\"]\", \"\");\r\n String[] words = currLine.split(\"[\\\\s\\\\t]+\");\r\n if (words.length < 2) {\r\n continue;\r\n }\r\n\r\n String finalWord = words[words.length - 1];\r\n int support = Integer.parseInt(finalWord);\r\n ItemSet itemSet = new ItemSet(support);\r\n //Make {itemSetsPrevPass}\r\n for (int k = 0; k < words.length - 1; k++) {\r\n String csvItemIds = words[k];\r\n String[] itemIds = csvItemIds.split(\",\");\r\n for (String itemId : itemIds) {\r\n itemSet.add(Integer.parseInt(itemId));\r\n }\r\n }\r\n if(itemSet.size() ==(passNum-1))\r\n \titemSetsPrevPass.add(itemSet);\r\n }\r\n }\r\n catch (Exception e) {\r\n \tSystem.out.println(e);\r\n }\r\n\r\n \r\n System.out.println(\"OK1!\");\r\n //See annotation in file: utils/Funcs.java\r\n candidateItemSets = Funcs.getCandidateItemSets(itemSetsPrevPass, (passNum - 1));\r\n// File fout = new File(\"E:\\\\复旦小学的资料\\\\tri.txt\");\r\n// PrintWriter output = new PrintWriter(fout);\r\n// for(ItemSet s:candidateItemSets) {\r\n// \toutput.println(s);\r\n// }\r\n// output.close();\r\n System.out.println(\"OK2!\");\r\n \r\n trie = new Trie(passNum);\r\n\r\n int candidateItemSetsSize = candidateItemSets.size();\r\n for (int i = 0; i < candidateItemSetsSize; i++) {\r\n ItemSet itemSet = candidateItemSets.get(i);\r\n //System.out.println(itemSet);\r\n trie.add(itemSet);\r\n }\r\n \r\n \r\n File fp = new File(\"C:\\\\Users\\\\DELL6\\\\Desktop\\\\mul\");\r\n BufferedReader p = new BufferedReader(new FileReader(fp));\r\n String currLine;\r\n ArrayList<ItemSet> empt = new ArrayList<ItemSet>();\r\n while((currLine = p.readLine()) != null) {\r\n\t Transaction txn = Funcs.getTransaction(2, currLine);\r\n\t Collections.sort(txn);\r\n\t ArrayList<ItemSet> matchedItemSet = new ArrayList<>();\r\n\t trie.findItemSets(matchedItemSet, txn);\r\n\t if(!matchedItemSet.equals(empt)) {\r\n\t \tfor(ItemSet itemSet : matchedItemSet) \r\n\t\t \tSystem.out.println(itemSet);\r\n\t\t }\r\n\t }\r\n }",
"public Set pack(Set addfirstfrom) throws PackingException, ParallelException {\r\n Set res = new HashSet(); // Set<Node>\r\n\t\tRandom rand = RndUtil.getInstance().getRandom();\r\n if (addfirstfrom!=null) {\r\n Iterator it = addfirstfrom.iterator();\r\n while (it.hasNext()) {\r\n Node n = (Node) it.next();\r\n if (isFree2Cover(n, res)) {\r\n res.add(n);\r\n updateQueue(n);\r\n }\r\n }\r\n }\r\n boolean cont = true;\r\n while (cont) {\r\n cont = false;\r\n // 1. get the first valid element(s) from the queue\r\n Set candidates = new TreeSet(); // Set<Node>\r\n Iterator it = _nodesq.iterator();\r\n if (it.hasNext() == false) break;\r\n Node first = (Node) it.next();\r\n candidates.add(first);\r\n //System.err.println(\"1. Adding first=\" + first.getId() +\r\n // \" to candidates set w/ card=\" + first.getNNbors().size());\r\n Node n = null;\r\n if (it.hasNext()) {\r\n while (it.hasNext()) {\r\n n = (Node) it.next();\r\n if ((_k==2 && n.getNNbors().size() == first.getNNbors().size()) ||\r\n\t\t\t\t\t\t\t(_k==1 && isApproximatelyEqual(n,first))) {\r\n\t\t\t\t\t\t// 2nd condition used to be:\r\n\t\t\t\t\t\t// (_k==1 && n.getNbors().size() == first.getNbors().size())\r\n candidates.add(n);\r\n continue; // keep adding\r\n }\r\n else if (_k==2 || !isApproximatelyEqualWeight(n,first)) break;\r\n } // while it.hasNext()\r\n System.err.println(\"candidates.size()=\" + candidates.size());\r\n // pick a candidate node at random\r\n int pos = rand.nextInt(candidates.size());\r\n Iterator it2 = candidates.iterator();\r\n for (int i = 0; i < pos; i++) it2.next();\r\n n = (Node) it2.next();\r\n // 2. update the queue\r\n updateQueue(n);\r\n // 3. add the element to the result set\r\n res.add(n);\r\n System.err.println(\"added n=\" + n.getId() + \" res.size()=\" +\r\n res.size() + \" _nodesq.size()=\" + _nodesq.size());\r\n cont = true;\r\n }\r\n else {\r\n if (isFree2Cover(first, res))\r\n res.add(first);\r\n }\r\n }\r\n reset(); // return _nodesq to original situation\r\n return res;\r\n }",
"public void breadthFirstSearch(int vertexIndex) {\n Queue<Integer> queue = new LinkedList<Integer>();\n vertexList[vertexIndex].wasVisited = true;\n displayVertex(vertexIndex);\n int unvisitedIndex;\n do {\n\n do {\n unvisitedIndex = getAdjacentUnvisitedVertexIndex(vertexIndex);\n if(unvisitedIndex != -1) {\n vertexList[unvisitedIndex].wasVisited = true;\n displayVertex(unvisitedIndex);\n queue.add(unvisitedIndex);\n\n }\n } while(unvisitedIndex != -1);\n if(!queue.isEmpty()) {\n vertexIndex = queue.remove();\n\n }\n\n } while(!queue.isEmpty());\n\n for (int i = 0; i < vertexCount; i++) {\n vertexList[i].wasVisited = false;\n\n }\n }",
"public static void main(String[] args)\n\t{\n\t\tif(args.length < 4)\n\t\t{\n\t\t\tSystem.out.println(\"Please pass source, destination, runmode and datafile \\n\");\n\t\t\tSystem.out.println(\"java -jar project-ShortestPath.jar 1 5 Dijkstra /raj/UT-Masters/Spring2019/Algorithms/Project/Data/USA-road-d.NY.gr\");\n\t\t\treturn;\n\t\t}\n\t\tSystem.out.println(\"--------- START ------------\");\n\n\n\t\tGraph g = new Graph(\"AIRPORTS_FLIGHTS\"); // load data into graph object - load airports/flights data. re-used.\n\t\tSystem.out.println(\"Source node = \" + args[0]);\n\t\tSystem.out.println(\"Destination node = \" + args[1]);\n\t\tSystem.out.println(\"Run mode = \" + args[2]);\n\t\tSystem.out.println(\"Datafile = \" + args[3]);\n\t\tString start_test = args[0];\n\t\tString end_test = args[1];\n\t\tString runMode = args[2];\n\t\tg.setDatafile(args[3]);\n\n//\t\tGraph g = new Graph(\"AIRPORTS_FLIGHTS\");\n////\t\tString start_test = \"173\";\n////\t\tString end_test = \"463\";\n//\t\tString start_test = \"HOU\";\n//\t\tString end_test = \"LHR\";\n//\t\tString runMode = \"ALL\";\n//\t\tg.setDatafile(\"AIRPORTS_FLIGHTS\");\n//\t\tg.loadFiles();\n\n\t\tRoute shortestRoute;\n\t\tif (runMode.equalsIgnoreCase(\"ALL\") || runMode.equalsIgnoreCase(\"Dijkstra\")) {\n\n\n\t\t\t//System.out.println(g.toString());\n\t\t\tSystem.out.println(\"\\n--- Dijkstra using Binary Heap ---\");\n\t\t\tDijkstra dj = new Dijkstra(start_test, end_test, g);\n\t\t\tdj.startTimer();\n\t\t\tshortestRoute = dj.findShortestPath();\n\t\t\tdj.stopTimer();\n\t\t\tSystem.out.println(dj.asString(shortestRoute, true));\n\n\t\t\tSystem.out.println(\"\\n--- Dijkstra using Fibonacci Heap ---\");\n\t\t\tdj.startTimer();\n\t\t\tshortestRoute = dj.findShortestPathUsingFibonacciHeap(start_test, end_test);\n\t\t\tdj.stopTimer();\n\t\t\tSystem.out.println(dj.asString(shortestRoute, true));\n\t\t}\n\n\t\tif (runMode.equalsIgnoreCase(\"ALL\") || runMode.equalsIgnoreCase(\"Bellman\")) {\n\t\t\tSystem.out.println(\"\\n--- Bellman-Ford using Fibonacci Heap ---\");\n\t\t\tBellmanFord bf = new BellmanFord(start_test, end_test, g);\n\t\t\tbf.startTimer();\n\t\t\tshortestRoute = bf.findShortestPath();\n\t\t\tbf.stopTimer();\n\t\t\tSystem.out.println(bf.asString(shortestRoute));\n\t\t}\n\n\t\tif (runMode.equalsIgnoreCase(\"ALL\") || runMode.equalsIgnoreCase(\"AStar\")) {\n\n\t\t\tAStar as = new AStar(start_test, end_test, g);\n\t\t\tas.startTimer();\n\t\t\tshortestRoute = as.findShortestPath();\n\t\t\tas.stopTimer();\n\t\t\tSystem.out.println(as.asString(shortestRoute));\n\t\t}\n\n\t\tSystem.out.println(\"--------- END ------------\");\n\t}",
"private void dijkstra(final NavigableSet<Node> queue) {\n Node firstNode, neighbor;\n while (!queue.isEmpty()) {\n // vertex with shortest distance (first iteration will return source)\n firstNode = queue.pollFirst();\n assert firstNode != null;\n if (!explored.contains(firstNode.coordinate)) {\n explored.add(firstNode.coordinate);\n }\n if (firstNode.dist == Integer.MAX_VALUE)\n // we can ignore u (and any other remaining vertices) since they are unreachable\n break;\n //look at distances to each neighbour\n for (Map.Entry<Node, Integer> temp : firstNode.neighbours.entrySet()) {\n neighbor = temp.getKey(); //the neighbour in this iteration\n if (!explored.contains(neighbor.coordinate)) {\n explored.add(neighbor.coordinate);\n }\n final int alternateDist = firstNode.dist + temp.getValue();\n if (alternateDist < neighbor.dist) { // shorter path to neighbour found\n queue.remove(neighbor);\n neighbor.dist = alternateDist;\n neighbor.previous = firstNode;\n queue.add(neighbor);\n }\n }\n }\n }",
"@Override\n\tpublic List<node_data> TSP(List<Integer> targets) {\n\t\tList<Integer> targets1 = new ArrayList<>();\n\t\tList<node_data> ans = new ArrayList<>();\n\t\tfor (Integer target: targets) {\n\t\t\tif(!targets1.contains(target)){\n\t\t\t\ttargets1.add(target);\n\t\t\t}\n\t\t}\n\t\tif(targets1.size()==1){\n\t\t\tans.add(this.GA.getNode(targets.get(0)));\n\t\t\treturn ans;\n\t\t}\n\t\tint help=targets1.get(0);\n\t\tint targetSize = targets1.size();\n\t\twhile(!targets1.isEmpty()) {\n\t\t\tdouble minWeight = Integer.MAX_VALUE;\n\t\t\tint geti=-1;\n\t\t\tfor (int j = 0; j <targetSize ; j++) {\n\t\t\t\tif(shortestPathDist(help,targets1.get(j)) !=0 &&shortestPathDist(help,targets1.get(j))<minWeight || targets1.size()==1 && shortestPathDist(help,targets1.get(j)) ==0) {\n\t\t\t\t\tminWeight = shortestPathDist(help, targets1.get(j));\n\t\t\t\t\tgeti = targets1.get(j);\n\t\t\t\t}\n\t\t\t}\n\t\t\tList<node_data> ans2 = new ArrayList<>();\n\t\t\tif(geti==-1) return null;\n\t\t\tif(targets1.size()>1) {\n\t\t\t\tans2 = shortestPath(help, geti);\n\t\t\t\tans.addAll(ans2);\n\t\t\t\ttargets1.remove((Integer) help);\n\t\t\t\ttargetSize--;\n\t\t\t}\n\t\t\telse{\n\t\t\t\ttargets1.remove((Integer)geti);\n\t\t\t}\n\t\t\thelp=geti;\n\t\t}\n\t\tfor (int ii = 0; ii <ans.size()-1 ; ii++) {\n\t\t\tif(ans.get(ii)==ans.get(ii+1)){\n\t\t\t\tans.remove(ii);\n\t\t\t}\n\t\t}\n\t\treturn ans;\n\t}",
"public static void main(String[] args) throws Exception {\n\t\tConfiguration conf = new Configuration();\n\t\tSystem.out.println(\"[~programer messege~] Staring step 1 .\");\n\n\t\tJob job = Job.getInstance(conf);\n\t\tjob.setJarByClass(Step1Blessed5Gram.class);\n\t\tjob.setMapperClass(MapperClass5GramAgg.class);\n\t\tjob.setReducerClass(ReducerClass.class);\n\t\t//job.setNumReduceTasks(1);\n\t\tjob.setMapOutputKeyClass(Text.class);\n\t\tjob.setMapOutputValueClass(LongWritable.class);\n\t\tjob.setOutputKeyClass(Text.class);\n\t\tjob.setOutputValueClass(LongWritable.class);\n\t\tjob.setOutputFormatClass(TextOutputFormat.class);\n\t\tjob.setInputFormatClass(TextInputFormat.class);\n\t\tFileInputFormat.addInputPath(job, new Path(args[0]));\n\t\t/* cache */\n\t\tFileSystem fs_s3a = new S3AFileSystem();\n\t\t//args[1] = \"s3n://ass3dsp181resultstamir\"\n\t\tfs_s3a.initialize(URI.create(args[1] ) , conf);\n\t\t// args[2] = \"s3n://ass3dsp181resultstamir/blessed/\"\n\t\tPath path = new Path(args[2]);\n\t\tRemoteIterator<LocatedFileStatus> itr = fs_s3a.listFiles(path, false);\n\t\twhile (itr.hasNext()) {\n\t\t\tLocatedFileStatus f = itr.next();\n\t\t\tif(f.getPath().getName().toString().equals(\"_SUCCESS\")) {\n\t\t\t\tSystem.out.println(\"[Step1] Skiped \\\"_SUCCESS\\\" file\");\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tSystem.out.println(\"[Step1] Adding \"+ f.getPath().toUri()+\" URI to cache File\");\n\t\t\tjob.addCacheFile(f.getPath().toUri());\n\t\t\tSystem.out.println(\"[Step1]\tA file has been added to cache\");\n\t\t}\n\t\tfs_s3a.close();\n\t\tSystem.out.println(\"[Step1] Finished adding files to cache.\");\n\t\tFileOutputFormat.setOutputPath(job, new Path(args[3]));\n\t\tjob.waitForCompletion(true);\n\t\tSystem.out.println(\"finished step1 \");\n\t}",
"public void computeAllPaths(String source)\r\n {\r\n Vertex sourceVertex = network_topology.get(source);\r\n Vertex u,v;\r\n double distuv;\r\n\r\n Queue<Vertex> vertexQueue = new PriorityQueue<Vertex>();\r\n \r\n \r\n // Switch between methods and decide what to do\r\n if(routing_method.equals(\"SHP\"))\r\n {\r\n // SHP, weight of each edge is 1\r\n sourceVertex.minDistance = 0;\r\n vertexQueue.add(sourceVertex);\r\n while(!vertexQueue.isEmpty())\r\n {\r\n u = vertexQueue.remove();\r\n for (String key : u.adjacentVertices.keySet())\r\n {\r\n v = network_topology.get(key);\r\n distuv = u.minDistance + 1;\r\n if(distuv < v.minDistance)\r\n {\r\n v.minDistance = distuv;\r\n v.previous = u;\r\n vertexQueue.add(v);\r\n }\r\n }\r\n \r\n }\r\n \r\n }\r\n \r\n else if (routing_method.equals(\"SDP\"))\r\n {\r\n // SDP, weight of each edge is it's propagation delay\r\n sourceVertex.minDistance = 0;\r\n vertexQueue.add(sourceVertex);\r\n while(!vertexQueue.isEmpty())\r\n {\r\n u = vertexQueue.remove();\r\n for (String key : u.adjacentVertices.keySet())\r\n {\r\n v = network_topology.get(key);\r\n distuv = u.minDistance + u.adjacentVertices.get(key).propDelay;\r\n if(distuv < v.minDistance)\r\n {\r\n v.minDistance = distuv;\r\n v.previous = u;\r\n vertexQueue.add(v);\r\n }\r\n } \r\n }\r\n }\r\n else if (routing_method.equals(\"LLP\"))\r\n {\r\n // LLP, weight each edge is activeCircuits/AvailableCircuits\r\n sourceVertex.minDistance = 0;\r\n vertexQueue.add(sourceVertex);\r\n while(!vertexQueue.isEmpty())\r\n {\r\n u = vertexQueue.remove();\r\n for (String key : u.adjacentVertices.keySet())\r\n {\r\n v = network_topology.get(key);\r\n distuv = Math.max(u.minDistance,u.adjacentGet(key).load());\r\n //System.out.println(u.adjacentGet(key).load());\r\n if(distuv < v.minDistance)\r\n {\r\n v.minDistance = distuv;\r\n v.previous = u;\r\n vertexQueue.add(v);\r\n }\r\n }\r\n }\r\n }\r\n }",
"public List<Node> computeDijkstraShortestPath(Node source, Node destination) {\n\n source.minDistance = 0.;\n PriorityQueue<Node> nodeQueue = new PriorityQueue<Node>();\n nodeQueue.add(source);\n\n int destinationGroup = destination._groupID;\n\n while (!nodeQueue.isEmpty()) {\n Node v = nodeQueue.poll();\n\n Log.i(\"bbb\", \"In dijsk node name \"+ v._waypointName);\n //Stop searching when reach the destination node\n\n\n if(destinationGroup!=0){\n\n if(v._groupID==destinationGroup){\n destination = navigationGraph.get(navigationGraph.size()-1).nodesInSubgraph.get(v._waypointID);\n Log.i(\"bbb\", \"destination is: \"+destination._waypointName);\n\n break;\n }\n\n }\n\n if (v._waypointID.equals(destination._waypointID))\n break;\n\n\n // Visit each edge that is adjacent to v\n for (Edge e : v._edges) {\n Node a = e.target;\n Log.i(\"bbb\", \"node a \"+a._waypointName);\n double weight = e.weight;\n double distanceThroughU = v.minDistance + weight;\n if (distanceThroughU < a.minDistance) {\n nodeQueue.remove(a);\n a.minDistance = distanceThroughU;\n a.previous = v;\n Log.i(\"bbb\", \"set previous\");\n nodeQueue.add(a);\n }\n }\n }\n\n Log.i(\"bbb\", \"destination is: \"+destination._waypointName);\n\n return getShortestPathToDestination(destination);\n }",
"@Override\r\n\tpublic void Dijkstra(E src) {\r\n\t\tPriorityQueue<Vertex<E>> pq = new PriorityQueue<Vertex<E>>();\r\n\t\tif(containsVertex(src)) {\r\n\t\t\tlastSrc = vertices.get(src);\r\n\t\t\tvertices.forEach((E t, Vertex<E> u) -> {\r\n\t\t\t\tu.setDistance(Integer.MAX_VALUE);\r\n\t\t\t\tu.setPredecessor(null);\r\n\t\t\t\tpq.offer(u);\r\n\t\t\t});\r\n\t\t\tpq.remove(lastSrc);\r\n\t\t\tlastSrc.setDistance(0);\r\n\t\t\tpq.offer(lastSrc);\r\n\t\t\twhile(!pq.isEmpty()) {\r\n\t\t\t\tVertex<E> u = pq.poll();\r\n\t\t\t\tfor(Edge<E> ale : adjacencyLists.get(u.getElement())) {\r\n\t\t\t\t\tVertex<E> s = vertices.get(ale.getSrc());\r\n\t\t\t\t\tVertex<E> d = vertices.get(ale.getDst());\r\n\t\t\t\t\tif(d.getDistance() > (long)s.getDistance() + (long)ale.getWeight()) {\r\n\t\t\t\t\t\tpq.remove(ale.getDst());\r\n\t\t\t\t\t\td.setDistance(s.getDistance() + ale.getWeight());\r\n\t\t\t\t\t\td.setPredecessor(s);\r\n\t\t\t\t\t\tpq.offer(d);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public boolean bfs(Node start, String elementToFind) {\r\n if (!graph.containsNode(start)) {\r\n return false;\r\n }\r\n if (start.getElement().equals(elementToFind)) {\r\n return true;\r\n }\r\n Queue<Node> toExplore = new LinkedList<Node>();\r\n marked.add(start);\r\n toExplore.add(start);\r\n while (!toExplore.isEmpty()) {\r\n Node current = toExplore.remove();\r\n for (Node neighbor : graph.getNodeNeighbors(current)) {\r\n if (!marked.contains(neighbor)) {\r\n if (neighbor.getElement().equals(elementToFind)) {\r\n return true;\r\n }\r\n marked.add(neighbor);\r\n toExplore.add(neighbor);\r\n }\r\n }\r\n }\r\n return false;\r\n }",
"private int bfs(String source, String destination, final Set<String> uniqueWords) {\n\n class Node {\n String word;\n int distance;\n\n public Node(String word, int distance) {\n this.word = word;\n this.distance = distance;\n }\n }\n\n final Queue<Node> queue = new LinkedList<>();\n Set<String> visited = new HashSet<>();\n queue.offer(new Node(source, 0)); //distance of source to source is 0\n visited.add(source);\n\n while (!queue.isEmpty()) {\n\n final Node node = queue.poll();\n final int distance = node.distance;\n\n //if we reached the destination node\n if (node.word.equals(destination))\n return distance + 1;\n\n //try all word which is 1 weight away\n for (String neighbour : getNeighbour(node.word, uniqueWords)) {\n if (!visited.contains(neighbour)) {\n visited.add(neighbour);\n queue.offer(new Node(neighbour, distance + 1));\n }\n }\n\n\n }\n return 0;\n }",
"@Override\n\tpublic void search() {\n\t\tpq = new IndexMinPQ<>(graph.getNumberOfStations());\n\t\tpq.insert(startIndex, distTo[startIndex]);\n\t\twhile (!pq.isEmpty()) {\n\t\t\tint v = pq.delMin();\n\t\t\tnodesVisited.add(graph.getStation(v));\n\t\t\tnodesVisitedAmount++;\n\t\t\tfor (Integer vertex : graph.getAdjacentVertices(v)) {\t\n\t\t\t\trelax(graph.getConnection(v, vertex));\n\t\t\t}\n\t\t}\n\t\tpathWeight = distTo[endIndex];\n\t\tpathTo(endIndex);\n\t}",
"public int [] breadthFirstSearch (int start){\r\n int [] visited = new int[getNumV()];\r\n int[] order = new int[getNumV()];\r\n int index = 0;\r\n int[] parent = new int[getNumV()];\r\n\r\n // parent arrayi, visited arrayi ve order arrayi set edildi\r\n for(int i = start; i<getNumV(); i++){\r\n parent[i] = -1;\r\n visited[i] = -1;\r\n order[index] = i;\r\n index++;\r\n }\r\n //eger baslanilan vertex sifirdan farkli bir vertex ise bu vertex'e kadar ki vertexler de order arrayine eklendi.\r\n if(index<getNumV()-1)\r\n for(int i=0; i<start; i++){\r\n order[index] = i;\r\n index++;\r\n }\r\n\r\n // her vertex uzerinden breadthFirsSearch yapildi.\r\n for(int i = 0; i<getNumV(); i++) {\r\n if(visited[i] == -1)\r\n breadthFirstSearch(order[i], visited, parent);\r\n }\r\n return parent;\r\n }",
"@Override\n\t//loc1 is the start location,loc2 is the destination\n\tpublic ArrayList<MapCoordinate> bfsSearch(MapCoordinate loc1, MapCoordinate loc2, Map m) {\n\t\tSystem.out.println(\"come into bfsSearch\");\n\t\tif(m.isAgentHasAxe() && m.isAgentHasKey()){\n\t\t\tLinkedList<State> queue=new LinkedList<State>();\n\t\t\tArrayList<MapCoordinate> Visited=new ArrayList<MapCoordinate>();\n\t\t\t\n\t\t\t//Visited.add(loc1);\n\t\t\tState s1=new State(loc1,m.getAgentHasNStones(),null);\n\t\t\tqueue.add(s1);\n\t\t\t\n\t\t\twhile(!queue.isEmpty()){\n\t\t\t\tState s=queue.remove();\n\t\t\t\tMapCoordinate currentLocation=s.getLocation();\n\t\t\t\tVisited.add(s.getLocation()); //add to visited every loop\n\t\t\t\tif(loc2.equals(currentLocation)){\n\t\t\t\t\t//means could reach loc2 from loc1\n\t\t\t\t\tArrayList<MapCoordinate> route=new ArrayList<MapCoordinate>();\n\t\t\t\t\twhile(s.getPrevState()!=null){\n\t\t\t\t\t\troute.add(0,s.getLocation()); //add to head\n\t\t\t\t\t\ts=s.getPrevState();\n\t\t\t\t\t}\n\t\t\t\t\treturn route;\n\t\t\t\t}\n\t\t\t\tMapCoordinate temp=new MapCoordinate(currentLocation.getX()+1,currentLocation.getY());\n\t\t\t\tif(m.hasCoordinate(temp)){//state move east\n\t\t\t\t\tif(s.getPrevState()!=null&&!temp.equals(s.getPrevState().getLocation())){\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\tif(!Visited.contains(temp)&&cTemp!='*' ){\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){//at least has 1 stone\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){ //this is important else if(cTemp!='~'), not barely else,\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}else if(s.getPrevState()==null){ //for initial state\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\t//System.out.println(\"2 if lalala\");\n\t\t\t\t\t\tif(cTemp!='*' ){\n\t\t\t\t\t\t\t//System.out.println(\"3 iflalala\");\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 iflalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 elselalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ttemp=new MapCoordinate(currentLocation.getX()-1,currentLocation.getY());\n\t\t\t\tif(m.hasCoordinate(temp)){//state move south\n\t\t\t\t\tif(s.getPrevState()!=null&&!temp.equals(s.getPrevState().getLocation())){\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\tif(!Visited.contains(temp)&&cTemp!='*' ){\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){//at least has 1 stone\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}else if(s.getPrevState()==null){ //for initial state\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\t//System.out.println(\"2 if lalala\");\n\t\t\t\t\t\tif(cTemp!='*' ){\n\t\t\t\t\t\t\t//System.out.println(\"3 iflalala\");\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 iflalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 elselalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ttemp=new MapCoordinate(currentLocation.getX(),currentLocation.getY()+1);\n\t\t\t\tif(m.hasCoordinate(temp)){//state move north\n\t\t\t\t\tif(s.getPrevState()!=null&&!temp.equals(s.getPrevState().getLocation())){\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\tif(!Visited.contains(temp)&&cTemp!='*' ){\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){//at least has 1 stone\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}else if(s.getPrevState()==null){ //for initial state\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\t//System.out.println(\"2 if lalala\");\n\t\t\t\t\t\tif(cTemp!='*' ){\n\t\t\t\t\t\t\t//System.out.println(\"3 iflalala\");\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 iflalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 elselalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ttemp=new MapCoordinate(currentLocation.getX(),currentLocation.getY()-1);\n\t\t\t\tif(m.hasCoordinate(temp)){//state move south\n\t\t\t\t\tif(s.getPrevState()!=null&&!temp.equals(s.getPrevState().getLocation())){\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\tif(!Visited.contains(temp)&&cTemp!='*' ){\n\t\t\t\t\t\t\tif(cTemp=='~' &&s.getStoneNumber()>0){//at least has 1 stone\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}else if(s.getPrevState()==null){ //for initial state\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\t//System.out.println(\"2 if lalala\");\n\t\t\t\t\t\tif(cTemp!='*' ){\n\t\t\t\t\t\t\t//System.out.println(\"3 iflalala\");\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 iflalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 elselalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\t\n\t\t\t}\n\t\t\treturn null;\n\t\t}else if(m.isAgentHasAxe()){ //only have axe\n\t\t\tLinkedList<State> queue=new LinkedList<State>();\n\t\t\tArrayList<MapCoordinate> Visited=new ArrayList<MapCoordinate>();\n\t\t\t\n\t\t\t//Visited.add(loc1);\n\t\t\tState s1=new State(loc1,m.getAgentHasNStones(),null);\n\t\t\tqueue.add(s1);\n\t\t\t\n\t\t\twhile(!queue.isEmpty()){\n\t\t\t\tState s=queue.remove();\n\t\t\t\tMapCoordinate currentLocation=s.getLocation();\n\t\t\t\tVisited.add(s.getLocation()); //add visited every loop\n\t\t\t\tif(loc2.equals(currentLocation)){\n\t\t\t\t\t//means could reach loc2 from loc1\n\t\t\t\t\tArrayList<MapCoordinate> route=new ArrayList<MapCoordinate>();\n\t\t\t\t\twhile(s.getPrevState()!=null){\n\t\t\t\t\t\troute.add(0,s.getLocation()); //add to head\n\t\t\t\t\t\ts=s.getPrevState();\n\t\t\t\t\t}\n\t\t\t\t\treturn route;\n\t\t\t\t}\n\t\t\t\tMapCoordinate temp=new MapCoordinate(currentLocation.getX()+1,currentLocation.getY());\n\t\t\t\tif(m.hasCoordinate(temp)){//state move south\n\t\t\t\t\tif(s.getPrevState()!=null&&!temp.equals(s.getPrevState().getLocation())){\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\tif(!Visited.contains(temp)&&cTemp!='*' &&cTemp!='-' ){\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){//at least has 1 stone\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}else if(s.getPrevState()==null){ //for initial state\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\t//System.out.println(\"2 if lalala\");\n\t\t\t\t\t\tif(cTemp!='*' &&cTemp!='-' ){\n\t\t\t\t\t\t\t//System.out.println(\"3 iflalala\");\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 iflalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 elselalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ttemp=new MapCoordinate(currentLocation.getX()-1,currentLocation.getY());\n\t\t\t\tif(m.hasCoordinate(temp)){//state move south\n\t\t\t\t\tif(s.getPrevState()!=null&&!temp.equals(s.getPrevState().getLocation())){\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\tif(!Visited.contains(temp)&&cTemp!='*' &&cTemp!='-' ){\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){//at least has 1 stone\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}else if(s.getPrevState()==null){ //for initial state\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\t//System.out.println(\"2 if lalala\");\n\t\t\t\t\t\tif(cTemp!='*' &&cTemp!='-' ){\n\t\t\t\t\t\t\t//System.out.println(\"3 iflalala\");\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 iflalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 elselalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ttemp=new MapCoordinate(currentLocation.getX(),currentLocation.getY()+1);\n\t\t\t\tif(m.hasCoordinate(temp)){//state move north\n\t\t\t\t\tif(s.getPrevState()!=null&&!temp.equals(s.getPrevState().getLocation())){\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\tif(!Visited.contains(temp)&&cTemp!='*' &&cTemp!='-' ){\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){//at least has 1 stone\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}else if(s.getPrevState()==null){ //for initial state\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\t//System.out.println(\"2 if lalala\");\n\t\t\t\t\t\tif(cTemp!='*' &&cTemp!='-' ){\n\t\t\t\t\t\t\t//System.out.println(\"3 iflalala\");\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 iflalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 elselalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ttemp=new MapCoordinate(currentLocation.getX(),currentLocation.getY()-1);\n\t\t\t\tif(m.hasCoordinate(temp)){//state move south\n\t\t\t\t\tif(s.getPrevState()!=null&&!temp.equals(s.getPrevState().getLocation())){\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\tif(!Visited.contains(temp)&&cTemp!='*' &&cTemp!='-' ){\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){//at least has 1 stone\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}else if(s.getPrevState()==null){ //for initial state\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\t//System.out.println(\"2 if lalala\");\n\t\t\t\t\t\tif(cTemp!='*' &&cTemp!='-' ){\n\t\t\t\t\t\t\t//System.out.println(\"3 iflalala\");\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 iflalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 elselalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn null;\n\t\t}else if(m.isAgentHasKey()){ //only have key\n\t\t\tLinkedList<State> queue=new LinkedList<State>();\n\t\t\tArrayList<MapCoordinate> Visited=new ArrayList<MapCoordinate>();\n\t\t\t\n\t\t\t//Visited.add(loc1);\n\t\t\tState s1=new State(loc1,m.getAgentHasNStones(),null);\n\t\t\tqueue.add(s1);\n\t\t\t\n\t\t\twhile(!queue.isEmpty()){\n\t\t\t\tState s=queue.remove();\n\t\t\t\tMapCoordinate currentLocation=s.getLocation();\n\t\t\t\tVisited.add(s.getLocation());\n\t\t\t\tif(loc2.equals(currentLocation)){\n\t\t\t\t\t//means could reach loc2 from loc1\n\t\t\t\t\tArrayList<MapCoordinate> route=new ArrayList<MapCoordinate>();\n\t\t\t\t\twhile(s.getPrevState()!=null){\n\t\t\t\t\t\troute.add(0, s.getLocation()); //add to head,in this fashion, return the right order of route\n\t\t\t\t\t\ts=s.getPrevState();\n\t\t\t\t\t}\n\t\t\t\t\treturn route;\n\t\t\t\t}\n\t\t\t\tMapCoordinate temp=new MapCoordinate(currentLocation.getX()+1,currentLocation.getY()); \n\t\t\t\tif(m.hasCoordinate(temp)){//state move east\n\t\t\t\t\tif(s.getPrevState()!=null&&!temp.equals(s.getPrevState().getLocation())){\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\tif(!Visited.contains(temp)&&cTemp!='*' &&cTemp!='T' ){\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){//at least has 1 stone\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}else if(s.getPrevState()==null){ //for initial state\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\t//System.out.println(\"2 if lalala\");\n\t\t\t\t\t\tif(cTemp!='*' &&cTemp!='T' ){\n\t\t\t\t\t\t\t//System.out.println(\"3 iflalala\");\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 iflalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 elselalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ttemp=new MapCoordinate(currentLocation.getX()-1,currentLocation.getY()); //state that move west\n\t\t\t\tif(m.hasCoordinate(temp)){\n\t\t\t\t\tif(s.getPrevState()!=null&&!temp.equals(s.getPrevState().getLocation())){\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\tif(!Visited.contains(temp)&&cTemp!='*' &&cTemp!='T' ){\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){//at least has 1 stone\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}else if(s.getPrevState()==null){ //for initial state\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\t//System.out.println(\"2 if lalala\");\n\t\t\t\t\t\tif(cTemp!='*' &&cTemp!='T' ){\n\t\t\t\t\t\t\t//System.out.println(\"3 iflalala\");\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 iflalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 elselalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ttemp=new MapCoordinate(currentLocation.getX(),currentLocation.getY()+1); //state move north\n\t\t\t\tif(m.hasCoordinate(temp)){\n\t\t\t\t\tif(s.getPrevState()!=null&&!temp.equals(s.getPrevState().getLocation())){\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\tif(!Visited.contains(temp)&&cTemp!='*' &&cTemp!='T' ){\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){//at least has 1 stone\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}else if(s.getPrevState()==null){ //for initial state\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\t//System.out.println(\"2 if lalala\");\n\t\t\t\t\t\tif(cTemp!='*' &&cTemp!='T' ){\n\t\t\t\t\t\t\t//System.out.println(\"3 iflalala\");\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 iflalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 elselalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ttemp=new MapCoordinate(currentLocation.getX(),currentLocation.getY()-1); //state move south\n\t\t\t\tif(m.hasCoordinate(temp)){\n\t\t\t\t\tif(s.getPrevState()!=null&&!temp.equals(s.getPrevState().getLocation())){\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\tif(!Visited.contains(temp)&&cTemp!='*' &&cTemp!='T' ){\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){//at least has 1 stone\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}else if(s.getPrevState()==null){ //for initial state\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\t//System.out.println(\"2 if lalala\");\n\t\t\t\t\t\tif(cTemp!='*' &&cTemp!='T' ){\n\t\t\t\t\t\t\t//System.out.println(\"3 iflalala\");\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 iflalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 elselalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\t\n\t\t/*\n\t\t * \n\t\t **/\t\t\n\t\telse{ //have no key and axe\n\t\t\tSystem.out.println(\"come into the last elas clause\");\n\t\t\tLinkedList<State> queue=new LinkedList<State>();\n\t\t\tArrayList<MapCoordinate> Visited=new ArrayList<MapCoordinate>();\n\t\t\t\n\t\t\tVisited.add(loc1);\n\t\t\tState s1=new State(loc1,m.getAgentHasNStones(),null);\n\t\t\tqueue.add(s1);\n\t\t\t\n\t\t\t//int i=0;\n\t\t\twhile(!queue.isEmpty()){\n\t\t\t\t//i++;\n\t\t\t\t//System.out.println(\"come into while: \"+i);\n\t\t\t\tState s=queue.remove();\n\t\t\t\tMapCoordinate currentLocation=s.getLocation();\n\t\t\t\tVisited.add(s.getLocation()); //add visited, let program won't stuck in \n\t\t\t\tif(loc2.equals(currentLocation)){\n\t\t\t\t\t//means could reach loc2 from loc1\n\t\t\t\t\tSystem.out.println(\"return computed route\");\n\t\t\t\t\tArrayList<MapCoordinate> route=new ArrayList<MapCoordinate>();\n\t\t\t\t\twhile(s.getPrevState()!=null){\n\t\t\t\t\t\troute.add(0, s.getLocation()); //add to head\n\t\t\t\t\t\ts=s.getPrevState();\n\t\t\t\t\t}\n\t\t\t\t\tfor(MapCoordinate mc:route){\n\t\t\t\t\t\t//System.out.println(\"print returned route in bfssearch\");\n\t\t\t\t\t\tSystem.out.print(\"mc:\"+mc.getX()+\" \"+mc.getY()+\"->\");\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\treturn route;\n\t\t\t\t}\n\t\t\t\tMapCoordinate temp=new MapCoordinate(currentLocation.getX()+1,currentLocation.getY());\n\t\t\t\tif(m.hasCoordinate(temp)){\n\t\t\t\t\t//System.out.println(\"1 if\");\n\t\t\t\t\tif(s.getPrevState()!=null &&!temp.equals(s.getPrevState().getLocation())){\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\t//System.out.println(\"2 if\");\n\t\t\t\t\t\tif(!Visited.contains(temp)&&cTemp!='*' &&cTemp!='T'&&cTemp!='-' ){\n\t\t\t\t\t\t\t//System.out.println(\"3 if\");\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 if\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 else\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}else if(s.getPrevState()==null){ //for the initial state \n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\t//System.out.println(\"2 if lalala\");\n\t\t\t\t\t\tif(cTemp!='*' &&cTemp!='T'&&cTemp!='-' ){\n\t\t\t\t\t\t\t//System.out.println(\"3 iflalala\");\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 iflalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 elselalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ttemp=new MapCoordinate(currentLocation.getX()-1,currentLocation.getY());\n\t\t\t\tif(m.hasCoordinate(temp)){\n\t\t\t\t\tif(s.getPrevState()!=null&&!temp.equals(s.getPrevState().getLocation())){\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\tif(!Visited.contains(temp)&&cTemp!='*' &&cTemp!='T'&&cTemp!='-' ){\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.add(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}else if(s.getPrevState()==null){ //for the initial state \n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\t//System.out.println(\"2 if lalala\");\n\t\t\t\t\t\tif(cTemp!='*' &&cTemp!='T'&&cTemp!='-' ){\n\t\t\t\t\t\t\t//System.out.println(\"3 iflalala\");\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){\n\t\t\t\t\t\t\t\tSystem.out.println(\"4 iflalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 elselalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ttemp=new MapCoordinate(currentLocation.getX(),currentLocation.getY()+1);\n\t\t\t\tif(m.hasCoordinate(temp)){\n\t\t\t\t\tif(s.getPrevState()!=null&&!temp.equals(s.getPrevState().getLocation())){\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\tif(!Visited.contains(temp)&&cTemp!='*'&&cTemp!='T'&&cTemp!='-' ){\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}else if(s.getPrevState()==null){ //for the initial state \n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\t//System.out.println(\"2 if lalala\");\n\t\t\t\t\t\tif(cTemp!='*' &&cTemp!='T'&&cTemp!='-' ){\n\t\t\t\t\t\t\t//System.out.println(\"3 iflalala\");\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 iflalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 elselalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ttemp=new MapCoordinate(currentLocation.getX(),currentLocation.getY()-1);\n\t\t\t\tif(m.hasCoordinate(temp)){\n\t\t\t\t\tif(s.getPrevState()!=null&&!temp.equals(s.getPrevState().getLocation())){\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\tif(!Visited.contains(temp)&&cTemp!='*' &&cTemp!='T' &&cTemp!='-' ){\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}//do not do any action for not enough stones situation\n\t\t\t\t\t\t}\n\t\t\t\t\t}else if(s.getPrevState()==null){ //for the initial state \n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\t//System.out.println(\"2 if lalala\");\n\t\t\t\t\t\tif(cTemp!='*' &&cTemp!='T'&&cTemp!='-' ){\n\t\t\t\t\t\t\t//System.out.println(\"3 iflalala\");\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 iflalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 elselalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}//do not do any action for not enough stones situation\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn null;\n\t\t}\n\t}",
"public void secondScan(String path) throws Exception {\n\t\tSystem.out.println(\"=======secondScan==========\");\r\n\t\t\r\n\t\tindiv2con.openSearcher(path);\r\n\t\tBufferedReader root = new BufferedReader(new FileReader(path+resultFile)), br;\r\n\t\tnew File(path+GRAPHEDGEPOOL).mkdir();\r\n\t\tPrintWriter pw;\r\n\t\tindivSize = Integer.parseInt(root.readLine());\r\n\t\tpropSize = Integer.parseInt(root.readLine());\r\n\t\tObjectInputStream in = new ObjectInputStream(new FileInputStream(path+conceptCountObj));\r\n\t\tconceptCount = (TreeMap<String, Integer>)in.readObject(); \r\n\t\tin.close();\r\n\t\tcache = new TreeMap<String, Set<String>>();\r\n\t\tString predid;\r\n\t\tint count = 0, hits = 0;\r\n\t\twhile((predid = root.readLine())!=null)\r\n\t\t{\r\n\t\t\tString pred = predid.substring(0, predid.indexOf('\\t'));\r\n\t\t\tString id = predid.substring(predid.indexOf('\\t')+1);\r\n\t\t\tSystem.out.println((++count)+\" \"+pred+\"\\tcache:\"+cache.size()+\"\\thits:\"+hits);\r\n\t\t\t\r\n\t\t\tFile file = new File(path+OBJPROPPOOL+File.separator+id);\r\n\t\t\tif(file.length() > MAX_OBJPROP_FILESIZE) continue;\r\n\t\t\tbr = new BufferedReader(new FileReader(file));\r\n\t\t\t\r\n\t\t\tTreeMap<String, Integer> triples = new TreeMap<String, Integer>();\r\n\t\t\t\r\n\t\t\tString line;\r\n\t\t\twhile((line = br.readLine())!= null)\r\n\t\t\t{\r\n\t\t\t\tString subj = line.substring(0, line.indexOf('\\t'));\r\n\t\t\t\tString obj = line.substring(line.indexOf('\\t')+1);\r\n\t\t\t\tSet<String> subjParent = null, objParent = null;\r\n\t\t\t\tsubjParent = cache.get(subj);\r\n\t\t\t\ttry \r\n\t\t\t\t{\r\n\t\t\t\t\tif(subjParent == null || subjParent.size()==0)\r\n\t\t\t\t\t\tsubjParent = indiv2con.search(subj);\r\n\t\t\t\t\telse hits++;\r\n\t\t\t\t} catch (Exception e) { e.printStackTrace(); continue; }\r\n\t\t\t\t\r\n\t\t\t\tif(subjParent == null || subjParent.size()==0)\r\n\t\t\t\t{\r\n\t\t\t\t\tsubjParent = new TreeSet<String>();\r\n\t\t\t\t\tsubjParent.add(NamedConcept.TOP.getUri());\r\n\t\t\t\t}\r\n\t\t\t\tif(!cache.containsKey(subj))\r\n\t\t\t\t\tcache.put(subj, subjParent);\r\n//\t\t\t\tSystem.out.println(obj);\r\n\t\t\t\tobjParent = cache.get(obj);\r\n\t\t\t\ttry \r\n\t\t\t\t{\r\n\t\t\t\t\tif(objParent == null || objParent.size()==0)\r\n\t\t\t\t\t\tobjParent = indiv2con.search(obj);\r\n\t\t\t\t\telse hits++;\r\n\t\t\t\t} catch (Exception e) { e.printStackTrace(); continue; }\r\n\t\t\t\t\r\n\t\t\t\tif(objParent == null || objParent.size()==0)\r\n\t\t\t\t{\r\n\t\t\t\t\tobjParent = new TreeSet<String>();\r\n\t\t\t\t\tobjParent.add(NamedConcept.TOP.getUri());\r\n\t\t\t\t}\r\n\t\t\t\tif(!cache.containsKey(obj))\r\n\t\t\t\t\tcache.put(obj, objParent);\r\n\t\t\t\t\r\n\t\t\t\twhile(cache.size()>=MAX_CACHE_SIZE) cache.clear();\r\n\t\t\t\t\r\n\t\t\t\tfor(String str: subjParent)\r\n\t\t\t\t{\r\n\t\t\t\t\tfor(String otr: objParent)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tInteger i = triples.get(str+'\\t'+otr);\r\n\t\t\t\t\t\tif(i==null) i = 0;\r\n\t\t\t\t\t\ttriples.put(str+'\\t'+otr, i+1);\r\n\t\t\t\t\t}\t\t\r\n\t\t\t\t}\r\n\t\t\t\tsubjParent = null;\r\n\t\t\t\tobjParent = null;\r\n\t\t\t}\r\n\t\t\tbr.close();\r\n\t\t\tpw = new PrintWriter(new FileWriter(path+GRAPHEDGEPOOL+File.separator+id));\r\n\t\t\tSystem.out.println(\"search finished! size:\"+triples.size());\r\n\t\t\tint order = 0;\r\n\t\t\tfor(String so: triples.keySet())\r\n\t\t\t{\r\n\t\t\t\tString str = so.substring(0, so.indexOf('\\t'));\r\n\t\t\t\tString otr = so.substring(so.indexOf('\\t')+1);\r\n\t\t\t\tString ptr = pred+\"(\"+order+\")\";\r\n\t\t\t\tdouble sscore, oscore, pscore;\r\n\t\t\t\tif(str.equals(NamedConcept.TOP.getUri()))\r\n\t\t\t\t\tsscore = TOP_ELEMENT_SCORE;\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tInteger j = conceptCount.get(str);\r\n\t\t\t\t\tif(j==null) sscore = Double.MAX_VALUE;\r\n\t\t\t\t\telse sscore = j.doubleValue()/indivSize;\r\n\t\t\t\t}\r\n\t\t\t\tif(otr.equals(NamedConcept.TOP.getUri()))\r\n\t\t\t\t\toscore = TOP_ELEMENT_SCORE;\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tInteger j = conceptCount.get(otr);\r\n\t\t\t\t\tif(j==null) oscore = Double.MAX_VALUE;\r\n\t\t\t\t\telse oscore = j.doubleValue()/indivSize;\r\n\t\t\t\t}\r\n\t\t\t\tInteger i = triples.get(so);\r\n\t\t\t\tif(i==null) pscore = Double.MAX_VALUE;\r\n\t\t\t\telse pscore = i.doubleValue()/propSize;\r\n\t\t\t\tpw.println(str+\"\\t\"+sscore+\"\\t\"+ptr+\"\\t\"+pscore+\"\\t\"+otr+\"\\t\"+oscore);\r\n\t\t\t\torder++;\r\n\t\t\t}\r\n\t\t\tpw.close();\r\n\t\t\ttriples.clear();\r\n\t\t\ttriples = null;\r\n\t\t\t\r\n\t\t}\r\n\t\troot.close();\r\n\t\tindiv2con.closeSearcher();\r\n\t}",
"public static void liveDemo() {\n Scanner in = new Scanner( System.in );\n float srcTank1, srcTank2, destTank;\n int alternetPaths;\n Graph mnfld = new Graph();\n boolean runSearch = true;\n\n //might need to limit query results, too large maybe?\n //newnodes = JDBC.graphInformation(); //returns arraylist of nodes\n //mnfld.setPipes(newnodes); //set nodes to the manifold\n //JDBC.insertConnections(mnfld);\n\n//\t\t /*\n//\t\t\tfor (int i = 0; i < newnodes.length(); i++) { //length might be wrong\n//\t\t\t\t//need to look for way to add edges by looking for neighbor nodes i think\n//\t\t\t\t//loop through nodes and create Edges\n//\t\t\t\t//might need new query\n//\t\t\t\tnewedges.addEdge(node1,node2,cost);\n//\t\t\t}\n//\n//\t\t\tmnfld.setConnections(newedges);\n//\n//\t\t\tup to this point, graph should be global to Dijkstra and unused.\n//\t\t\tloop until user leaves page\n//\t\t\tget input from user for tanks to transfer\n//\t\t\tfind shortest path between both tanks\n//\t\t\tend loop\n//\t\t\tthis will change depending how html works so not spending any time now on it\n//\t\t*/\n //shortestPath.runTest();\n\n shortestPath.loadGraph( mnfld );\n while (runSearch) {\n // Gets user input\n System.out.print( \"First Source Tank: \" );\n srcTank1 = in.nextFloat();\n System.out.print( \"Second Source Tank: \" );\n srcTank2 = in.nextFloat();\n System.out.print( \"Destination Tank: \" );\n destTank = in.nextFloat();\n System.out.print( \"Desired Number of Alternate Paths: \" );\n alternetPaths = in.nextInt();\n\n // Prints outputs\n Dijkstra.resetCosts( mnfld );\n System.out.println( \"True shortest with alt paths\" );\n Dijkstra.findAltPaths( mnfld, alternetPaths, srcTank1, destTank );\n mnfld.restoreDroppedConnections();\n\n Dijkstra.resetCosts( mnfld );\n System.out.println( \"Lineup Considering used connections\" );\n Dijkstra.findMinPaths( mnfld, mnfld.getPipe( srcTank1 ), true );\n mnfld.getPipe( destTank ).printLine();\n mnfld.restoreDroppedConnections();\n\n Dijkstra.resetCosts( mnfld );\n System.out.println( \"Lineup Considering only open connections\" );\n Dijkstra.findMinPaths( mnfld, mnfld.getPipe( srcTank1 ), false );\n mnfld.getPipe( destTank ).printLine();\n mnfld.restoreDroppedConnections();\n\n Dijkstra.resetCosts( mnfld );\n System.out.println( \"Merge Lineup\" );\n Dijkstra.findMinPaths( mnfld, mnfld.getPipe( srcTank1 ) );\n System.out.println( \"\\t Original Lineup: \" );\n mnfld.getPipe( destTank ).printLine();\n System.out.println( \"\\t Merged Lineup: \" );\n Dijkstra.mergePaths( mnfld, srcTank2, mnfld.getPipe( destTank ).getPath(), mnfld.getPipe( destTank ) );\n System.out.print( \"\\nRun another search [1:Yes, 0:No] :: \" );\n if (in.nextInt() == 0) runSearch = false;\n else System.out.println( \"\\n\\n\\n\" );\n }\n\n\n }",
"public interface SearchSolver {\n\n /**\n * initializes the algorithm. This method has to be called before calling any other method\n * @param graph the graph of the map where the search takes place\n * @param targetStart the start position for the target (in our case the thief)\n * @param searchStart the start position for the searcher (in our case the police)\n * @param counter the counter object that counts the expanded nodes\n */\n void initialize(Graph graph, Node targetStart, Node searchStart, ExpandCounter counter);\n\n /**\n * gets the shortest path from search start to target\n * @return list of edges that describe the path\n * @throws NoPathFoundException if there is no path to the target\n */\n List<Edge> getPath() throws NoPathFoundException;\n}",
"public void run() throws Exception {\n try {\n\t System.out.println(\"SSVD start!\");\n FileSystem fs = FileSystem.get(conf);\n\n Path qPath = new Path(outputPath, \"Q-job\");\n Path btPath = new Path(outputPath, \"Bt-job\");\n Path yPath = new Path(outputPath, \"Y-job\"); //tetst phase\n Path uHatPath = new Path(outputPath, \"UHat\");\n Path svPath = new Path(outputPath, \"Sigma\");\n Path uPath = new Path(outputPath, \"U\");\n Path vPath = new Path(outputPath, \"V\");\n\n if (overwrite) {\n fs.delete(outputPath, true);\n }\n\n\t int[] iseed = {0,0,0,1};\n\t double[] x = new double[1];\n\t Dlarnv.dlarnv(2,iseed,0,1,x,0);\n\t long seed = (long)(x[0]*(double)Long.MAX_VALUE);\n\n\t long start, end;\n\t \t\t\n\tstart = new Date().getTime();\n\tQJob.run(conf,\n inputPath,\n qPath.toString(),\n\t\treduceSchedule,\n k,\n p,\n seed,\n\t\tmis);\n\tend = new Date().getTime();\n\tSystem.out.println(\"Q-Job done \"+Long.toString(end-start));\n\tLogger LOG = LoggerFactory.getLogger(SSVDSolver.class);\n\t \n /*\n * restrict number of reducers to a reasonable number so we don't have to\n * run too many additions in the frontend when reconstructing BBt for the\n * last B' and BB' computations. The user may not realize that and gives a\n * bit too many (I would be happy i that were ever the case though).\n */\n\t \n start = new Date().getTime();\n\t BtJob.run(conf,\n inputPath,\n\t\t\t\tbtPath,\n\t\t\t\tqPath.toString(),\n\t\t\t\tk,\n p,\n outerBlockHeight,\n\t\t\t\tq <= 0 ? Math.min(1000, reduceTasks) : reduceTasks,\n\t\t\t\tq <= 0,\n\t\t\t\treduceSchedule,\n\t\t\t\tmis);\n\n\t end = new Date().getTime();\n System.out.println(\"Bt-Job done \"+Long.toString(end-start));\n\t \n // power iterations is unnecessary in application of recommendation system \t \n\t /*for (int i = 0; i < q; i++) {\n\t Path btPathGlob = new Path(btPath, BtJob.OUTPUT_BT + \"-*\");\n\t\tPath aBtPath = new Path(outputPath, String.format(\"ABt-job-%d\", i + 1)); \n qPath = new Path(outputPath, String.format(\"ABtQ-job-%d\", i + 1));\t\t\n ABtDenseOutJob.run(conf,\n inputPath,\n btPathGlob,\n aBtPath,//qPath,\n //ablockRows,\n //minSplitSize,\n k,\n p,\n //abtBlockHeight,\n reduceTasks,\n //broadcast\n\t\t\t\t\t\t mis);\n\t\t\n\t\tToolRunner.run(conf, new QRFirstJob(), new String[]{\n \"-input\", aBtPath.toString(),\n \"-output\", qPath.toString(),\n\t\t\t \"-mis\",Integer.toString(mis),\n\t\t\t \"-colsize\", Integer.toString(k+p),\n \"-reduceSchedule\", reduceSchedule});\n\t\t\t \n btPath = new Path(outputPath, String.format(\"Bt-job-%d\", i + 1));\n\n BtJob.run(conf,\n inputPath,\n\t\t\t\t btPath,\n qPath.toString(), \n k,\n p,\n outerBlockHeight,\n i == q - 1 ? Math.min(1000, reduceTasks) : reduceTasks,\n i == q - 1,\n\t\t\t\t reduceSchedule,\n\t\t\t\t mis);\n }*/\n\t \n cmUpperTriangDenseMatrix bbt =\n loadAndSumUpperTriangMatrices(fs, new Path(btPath, BtJob.OUTPUT_BBT\n + \"-*\"), conf);\n\n // convert bbt to something our eigensolver could understand\n assert bbt.numColumns() == k + p;\n\n double[][] bbtSquare = new double[k + p][];\n for (int i = 0; i < k + p; i++) {\n bbtSquare[i] = new double[k + p];\n }\n\n for (int i = 0; i < k + p; i++) {\n for (int j = i; j < k + p; j++) {\n bbtSquare[i][j] = bbtSquare[j][i] = bbt.get(i, j);\n }\n }\n\n svalues = new double[k + p];\n\n // try something else.\n EigenSolver eigenWrapper = new EigenSolver(bbtSquare);\n double[] eigenva2 = eigenWrapper.getWR();\n\t \n for (int i = 0; i < k + p; i++) {\n svalues[i] = Math.sqrt(eigenva2[i]); // sqrt?\n }\n // save/redistribute UHat\n double[][] uHat = eigenWrapper.getVL();\n\t //double[][] uHat = eigenWrapper.getUHat();\n\t \n fs.mkdirs(uHatPath);\n SequenceFile.Writer uHatWriter =\n SequenceFile.createWriter(fs,\n conf,\n uHatPath = new Path(uHatPath, \"uhat.seq\"),\n IntWritable.class,\n VectorWritable.class,\n CompressionType.BLOCK);\n\t \n int m = uHat.length;\n IntWritable iw = new IntWritable();\n VectorWritable vw = new VectorWritable();\n\t \n for (int i = 0; i < m; i++) {\n vw.set(new DenseVector(uHat[i],true));\n iw.set(i);\n uHatWriter.append(iw, vw);\n }\n\t uHatWriter.close();\n\n SequenceFile.Writer svWriter =\n SequenceFile.createWriter(fs,\n conf,\n svPath = new Path(svPath, \"svalues.seq\"),\n IntWritable.class,\n VectorWritable.class,\n CompressionType.BLOCK);\n\n vw.set(new DenseVector(svalues, true));\n svWriter.append(iw, vw);\n\n svWriter.close();\n\n\t start = new Date().getTime();\n UJob ujob = null;\t \n if (computeU) {\n ujob = new UJob();\n\t\tujob.start(conf,\n new Path(btPath, BtJob.Q_MAT+ \"-*\"),\n uHatPath,\n svPath,\n uPath,\n k,\n cUHalfSigma,\n\t\t\t\t mis);\t\t\t\t \n // actually this is map-only job anyway\n }\n\n VJob vjob = null;\n if (computeV) {\n vjob = new VJob();\n vjob.start(conf,\n new Path(btPath, BtJob.OUTPUT_BT + \"-*\"),\n uHatPath,\n svPath,\n vPath,\n k,\n reduceTasks,\n\t\t\t\t subRowSize,\n cVHalfSigma,\n\t\t\t\t mis);\n }\n\n if (ujob != null) {\n ujob.waitForCompletion();\n this.uPath = uPath.toString();\n }\n\t System.out.println(\"U-Job done \");\n\t \n if (vjob != null) {\n vjob.waitForCompletion();\n this.vPath = vPath.toString();\n }\n\tend = new Date().getTime();\n\tSystem.out.println(\"U-Job+V-Job done \"+(end-start));\n\t\n } catch (InterruptedException exc) {\n throw new IOException(\"Interrupted\", exc);\n } catch (ClassNotFoundException exc) {\n throw new IOException(exc);\n }\n\n }",
"public static void test(String[] args) throws Exception {\n\t\tAbstractPILPDelegate.setDebugMode(null);\r\n\t\t\r\n\t\tComputeCostBasedOnFreq ins = new ComputeCostBasedOnFreq();\r\n\t\tins.initPreMapping(\"D:/data4code/replay/pre.csv\");\r\n\t\tins.getEventSeqForEachPatient(\"D:/data4code/cluster/LogBasedOnKmeansPlusPlus-14.csv\");\r\n\t\tins.removeOneLoop();\r\n\r\n\t\tPetrinetGraph net = null;\r\n\t\tMarking initialMarking = null;\r\n\t\tMarking[] finalMarkings = null; // only one marking is used so far\r\n\t\tXLog log = null;\r\n\t\tMap<Transition, Integer> costMOS = null; // movements on system\r\n\t\tMap<XEventClass, Integer> costMOT = null; // movements on trace\r\n\t\tTransEvClassMapping mapping = null;\r\n\r\n\t\tnet = constructNet(\"D:/data4code/mm.pnml\");\r\n\t\tinitialMarking = getInitialMarking(net);\r\n\t\tfinalMarkings = getFinalMarkings(net);\r\n\t\tXParserRegistry temp=XParserRegistry.instance();\r\n\t\ttemp.setCurrentDefault(new XesXmlParser());\r\n\t\tlog = temp.currentDefault().parse(new File(\"D:/data4code/mm.xes\")).get(0);\r\n//\t\tlog = XParserRegistry.instance().currentDefault().parse(new File(\"d:/temp/BPI2013all90.xes.gz\")).get(0);\r\n\t\t//\t\t\tlog = XParserRegistry.instance().currentDefault().parse(new File(\"d:/temp/BPI 730858110.xes.gz\")).get(0);\r\n\t\t//\t\t\tlog = XFactoryRegistry.instance().currentDefault().openLog();\r\n\t\tcostMOS = constructMOSCostFunction(net);\r\n\t\tXEventClass dummyEvClass = new XEventClass(\"DUMMY\", 99999);\r\n\t\tXEventClassifier eventClassifier = XLogInfoImpl.STANDARD_CLASSIFIER;\r\n\t\tcostMOT = constructMOTCostFunction(net, log, eventClassifier, dummyEvClass);\r\n\t\tmapping = constructMapping(net, log, dummyEvClass, eventClassifier);\r\n\r\n\t\tint cost1 = AlignmentTest.computeCost(costMOS, costMOT, initialMarking, finalMarkings, null, net, log,\r\n\t\t\t\tmapping, false);\r\n\t\tSystem.out.println(cost1);\r\n\t\t\r\n//\t\tint iteration = 0;\r\n//\t\twhile (true) {\r\n//\t\t\tSystem.out.println(\"start: \" + iteration);\r\n//\t\t\tlong start = System.currentTimeMillis();\r\n//\t\t\tint cost1 = AlignmentTest.computeCost(costMOS, costMOT, initialMarking, finalMarkings, null, net, log,\r\n//\t\t\t\t\tmapping, false);\r\n//\t\t\tlong mid = System.currentTimeMillis();\r\n//\t\t\tSystem.out.println(\" With ILP cost: \" + cost1 + \" t: \" + (mid - start));\r\n//\r\n//\t\t\tlong mid2 = System.currentTimeMillis();\r\n//\t\t\tint cost2 = AlignmentTest.computeCost(costMOS, costMOT, initialMarking, finalMarkings, null, net, log,\r\n//\t\t\t\t\tmapping, false);\r\n//\t\t\tlong end = System.currentTimeMillis();\r\n//\r\n//\t\t\tSystem.out.println(\" No ILP cost: \" + cost2 + \" t: \" + (end - mid2));\r\n//\t\t\tif (cost1 != cost2) {\r\n//\t\t\t\tSystem.err.println(\"ERROR\");\r\n//\t\t\t}\r\n//\t\t\t//System.gc();\r\n//\t\t\tSystem.out.flush();\r\n//\t\t\titeration++;\r\n//\t\t}\r\n\r\n\t}",
"private static LinkedList<Integer> localSearch2Opt(File fileNameWithPath, int kNeighborHood ) throws Exception{\n\t\t\n\t\tString traceString = \"\";\n\t\tdouble bestCost = Double.POSITIVE_INFINITY;\n\t\tLinkedList<Integer> bestTspList = null;\n\t\tdouble bestCycleTime = Double.POSITIVE_INFINITY;\n\n\t\tif (Project.runId == -1 )\n\t\t\tProject.runId = 1;\n\n\t\t/* \n\t\t * read the file and build the cost table\n\t\t */\n parseEdges(fileNameWithPath);\n\n /*\n\t\t * time starts once you read the data\n */\n\t\tdouble baseTime = System.nanoTime();\n\n\t\t/*\n\t\t * invoking furthest insertion algorithm to get the tsp\n\t\t */\n\t\tlong startNodeSeed = (long)(1000.0*generator.nextDouble());\n\t\tLinkedList<Integer> currentTspList = FurthestInsertion.generateTSP(Project.sourceGTree,startNodeSeed);\n\t\t\n\t\tdouble currentTspCost = tspCost(currentTspList);\n\n\t\tbestTspList = currentTspList;\n\t\tbestCost = currentTspCost;\n\t\tbestCycleTime = System.nanoTime() - baseTime;\n\n\t\t/* print the trace file */\n\t\ttraceString = String.format(\"%.2f, %d\",Math.round(((System.nanoTime()-baseTime)/nanosecs)*100.0)/100.0,Math.round(bestCost));\n\t\tprintTrace(runId,traceString);\n\n\t\t/*\n\t\t * remove the last node as it matches the first\n\t\t */\n\t\tcurrentTspList.removeLast();\n\n\t\twhile ( true )\n\t\t{\n\t\t\t/*\n\t\t\t * reached cutoff time\n\t\t\t */\n\t\t\tif ( System.nanoTime()-baseTime >= Project.cutoffTimeSeconds*nanosecs ) {\n\t\t\t\ttimedOut=true;\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tdouble cycleStartTime = System.nanoTime();\n\n\t\t\tLinkedList<Integer> newTspList = currentTspList;\n\n\t\t\t/* do a 2 opt search in current k=5 neighborhood to get a newtsp */\n\t\t\t/* 1. Pick the first random element in the current tsp */\n\t\t\tint element2 = (int)((double)(newTspList.size()-1) * generator.nextDouble());\n\t\t\tint element1 = element2 - 1;\n\t\t\tif ( element1 == -1 ){\n\t\t\t\telement1 = newTspList.size()-1;\n\t\t\t}\n\t\t\t\n int delta;\n\n\t\t\t/*\n\t\t\t * search in the neighborhood specified\n * if not specified search all\n\t\t\t */\n if ( kNeighborHood != -1 ) {\n\t\t\t /* We want to search in the specified k=n neighborhoods of element1 */\n\t\t\t delta= (int)(2*kNeighborHood*generator.nextDouble()) - kNeighborHood;\n } else {\n\t\t\t delta= (int)((newTspList.size()-1)*generator.nextDouble()) - (int)(newTspList.size()/2);\n\t\t\t}\n\n\t\t\tif ( delta == 0 ) {\n\t\t\t\tdelta = 2;\n\t\t\t} else if ( delta == 1 ) {\n\t\t\t\tdelta = 2;\n\t\t\t} else if ( delta == -1) {\n\t\t\t\tdelta = -2; }\n\n\t\t\tint element4 = element2 + delta;\n\n\t\t\tif ( element4 < 0 ) {\n\t\t\t\telement4 = newTspList.size()+element4;\n\t\t\t}else if ( element4 >= newTspList.size() ) {\n\t\t\t\telement4 = element4-(newTspList.size()-1);\n\t\t\t}\n\n\t\t\tint element3 = element4 -1;\n\t\t\tif ( element3 == -1 ){\n\t\t\t\telement3 = newTspList.size()-1;\n\t\t\t}\n\n\n\t\t\t/* \n\t\t\t * the new tsp will have element2->element4.......element1->element3....\n\t\t\t */\n\t\t\tInteger vertex_3 = newTspList.get(element3);\n\t\t\tnewTspList.set(element3,newTspList.get(element2));\n\t\t\tnewTspList.set(element2,vertex_3);\n\n\t\t\t/*\n\t\t\t * from element2+1 to element3-1 swap to reverse their order\n\t\t\t */\n\t\t\twhile ( element2 < element3 ){\n\t\t\t\telement3 = element3-1;\n\t\t\t\tif ( element3 == -1 ) {\n\t\t\t\t\telement3 = newTspList.size()-1;\n\t\t\t\t}\n\n\t\t\t\telement2 = element2 + 1;\n\t\t\t\tif ( element2 == newTspList.size() ) {\n\t\t\t\t\telement3 = 0;\n\t\t\t\t}\n\n\t\t\t\tInteger tempVertex = newTspList.get(element2);\n\t\t\t\tnewTspList.set(element2,newTspList.get(element3));\n\t\t\t\tnewTspList.set(element3,tempVertex);\n\n\t\t\t}\n\n\t\t\tdouble newTspCost = tspCost(newTspList);\n\n\t\t\t/* if new local search solution is better than eariler take the search and continue search\n\t\t\t */\n\t\t\tif ( newTspCost <= currentTspCost ){\n\t\t\t\tcurrentTspList = newTspList;\n\t\t\t\tcurrentTspCost = newTspCost;\n\t\t\t} else {\n\t\t\t/* if new local search solution is not better than eariler \n\t\t\t */\n\t\t\t\tcontinue;\n\t\t\t}\n\t\n\t\t\t//Subtract the start time from the finish time to get the actual algorithm running time; divide by 10e6 to convert to milliseconds\n\t\t\tdouble cycleTime = (System.nanoTime()-cycleStartTime);\n\n\t\t\t/* first improvement , take the best each time */\n\t\t\tif ( newTspCost < bestCost ) {\n\t\t\t\tbestCost = newTspCost;\n\t\t\t\tbestTspList = newTspList;\n\t\t\t\tbestCycleTime = cycleTime;\n\t\t\t\t/* print the trace file */\n\t\t\t\ttraceString = String.format(\"%.2f, %d\",Math.round(((System.nanoTime()-baseTime)/nanosecs)*100.0)/100.0,Math.round(bestCost));\n\t\t\t\tappendToTraceFile(runId,traceString);\n\n\t\t\t\tif ( bestCost <= optimalCost )\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t}\n\n\t\t/* print the sol file */\n\t\tprintSol(runId,bestTspList,bestCost);\n\n\t\t/* print the tab results file */\n\t\tappendTabResults(runId,bestCycleTime,bestCost,bestTspList);\n\n\t\treturn bestTspList;\n\n\t}",
"public static void bfs(int a, int b) {\n\t\t\r\n\t\tQueue<Node> q = new LinkedList<>();\r\n\t\t\r\n\t\tq.add(new Node(a,b));\r\n\t\t\r\n\t\twhile(!q.isEmpty()) {\r\n\t\t\t\r\n\t\t\tNode n = q.remove();\r\n\t\t\t\r\n\t\t\tint x = n.x;\r\n\t\t\tint y = n.y;\r\n\t\t\t\r\n\t\t\tif(x+1 <= N && map[x+1][y] > map[x][y]) {\r\n\t\t\t\tif(visited[x+1][y] != 1) {\r\n\t\t\t\t\tq.add(new Node(x+1,y));\r\n\t\t\t\t\tvisited[x+1][y] = cnt;\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\tif(x-1 > 0 && map[x-1][y] > map[x][y]) {\r\n\t\t\t\tif(visited[x-1][y] != 1) {\r\n\t\t\t\t\tq.add(new Node(x-1,y));\r\n\t\t\t\t\tvisited[x-1][y] = cnt;\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\tif(y-1 > 0 && map[x][y-1] > map[x][y]) {\r\n\t\t\t\tif(visited[x][y-1] != 1) {\r\n\t\t\t\t\tq.add(new Node(x,y-1));\r\n\t\t\t\t\tvisited[x][y-1] = cnt;\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\tif(y+1 <=N && map[x][y+1] > map[x][y]) {\r\n\t\t\t\tif(visited[x][y+1] != 1) {\r\n\t\t\t\t\tq.add(new Node(x,y+1));\r\n\t\t\t\t\tvisited[x][y+1] = cnt;\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}",
"@Override\n\t\t\tprotected Void doInBackground() throws Exception {\n\t\t\t\tif (!verifyStartEndVerticesExist(true, false)) {\n\t\t\t\t\tsetRunning(false);\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Queue\n\t\t\t\tQueue<Vertex> q = new LinkedList<Vertex>();\n\t\t\t\t\n\t\t\t\t// set start vertex as visited\n\t\t\t\tpanel.getStartVertex().setVisited(true);\n\t\t\t\tq.add(panel.getStartVertex());\n\t\t\t\twhile (!q.isEmpty()) {\n\t\t\t\t\tVertex v = q.remove();\n\t\t\t\t\tv.setSelected(true);\n\t\t\t\t\tpublish();\n\t\t\t\t\tThread.sleep(panel.getCurrentDelay());\n\t\t\t\t\tfor (Vertex vertex : getNeighbors(v)) {\n\t\t\t\t\t\tvertex.setHighlighted();\n\t\t\t\t\t\tpublish();\n\t\t\t\t\t\tThread.sleep(panel.getCurrentDelay());\n\t\t\t\t\t\tif (!vertex.isVisited()) {\n\t\t\t\t\t\t\tvertex.setVisited(true);\n\t\t\t\t\t\t\tvertex.setParent(v);\n\t\t\t\t\t\t\tq.add(vertex);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tv.setSelected(false);\n\t\t\t\t\tv.setHighlighted();\n\t\t\t\t\tpublish();\n\t\t\t\t\tThread.sleep(panel.getCurrentDelay());\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"BFS Finished!\");\n\t\t\t\tpublish();\n\t\t\t\tsetRunning(false);\n\t\t\t\treturn null;\n\t\t\t}",
"public void aEstrella2 (String input)\r\n\t{\r\n\t\tNode root_aEstrella2 = new Node (input);\r\n\t\tNode current = new Node(root_aEstrella2.getState());\r\n\t\t\r\n\t\tHeuristicComparator aEstrella_comparator = new HeuristicComparator();\r\n\t\tPriorityQueue<Node> queue_gbfs = new PriorityQueue<Node>(12, aEstrella_comparator);\r\n\t\tArrayList<String> visited = new ArrayList<String>();\r\n\t\tArrayList<String> children = new ArrayList<String>();\r\n\t\t\r\n\t\tint nodes_popped = 0;\r\n\t\tint pqueue_max_size = 0;\r\n\t\tint pq_size = 0;\r\n\t\t\r\n\t\tcurrent.cost = 0;\r\n\t\t\r\n\t\twhile(!goal_aEstrella2)\r\n\t\t{\r\n\t\t\tvisited.add(current.getState());\r\n\t\t\tchildren = Successor.findChildren(current.getState());\r\n\t\t\t\r\n\t\t\tfor (String a : children)\r\n\t\t\t{\r\n\t\t\t\t\r\n\t\t\t\tif (visited.contains(a))\r\n\t\t\t\t{\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\tNode nino = new Node(a);\r\n\t\t\t\t\tcurrent.children_nodes.add(nino);\r\n\t\t\t\t\tvisited.add(nino.getState());\r\n\t\t\t\t\t\r\n\t\t\t\t\tint cost = isCost(current.getState(), nino.getState());\r\n\t\t\t\t\tnino.cost = cost;\r\n\t\t\t\t\tnino.parent = current;\r\n\t\t\t\t\tint manhattanD = manhattanDistance(nino.getState(), root_aEstrella2.getState());\r\n\t\t\t\t\tnino.setTotalCost(nino.parent.getTotalCost() + nino.cost);\r\n\t\t\t\t\t\r\n\t\t\t\t\t// f(n) = g(n) + h(n)\r\n\t\t\t\t\tnino.setHeuristicCost(nino.getTotalCost() + manhattanD);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (!queue_gbfs.contains(nino))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tqueue_gbfs.add(nino);\r\n\t\t\t\t\t\tpq_size++;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Repeated State checking. Removing the same node from PQ if the path cost is less then the current one \r\n\t\t\t\t\telse if (queue_gbfs.contains(nino))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tfor (Node original : queue_gbfs)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tif (original.equals(nino))\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tNode copy = original;\r\n\t\t\t\t\t\t\t\tif (nino.getHeuristicCost() < copy.getHeuristicCost())\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\tqueue_gbfs.remove(copy);\r\n\t\t\t\t\t\t\t\t\tqueue_gbfs.add(nino);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tcurrent = queue_gbfs.poll();\r\n\t\t\tnodes_popped++;\r\n\t\t\t\r\n\t\t\tif (pq_size > pqueue_max_size)\r\n\t\t\t{\r\n\t\t\t\tpqueue_max_size = pq_size;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tpq_size--;\r\n\t\t\tgoal_aEstrella2 = isGoal(current.getState());\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tgoal_aEstrella2 = false;\r\n\t\tSystem.out.println(\"A*2 Solved!!\");\r\n\t\tSolution.performSolution(current, root_aEstrella2, nodes_popped, pqueue_max_size);\r\n\t}",
"public List<GeographicPoint> bfs(GeographicPoint start, \n\t\t\t \t\t\t\t\t GeographicPoint goal, Consumer<GeographicPoint> nodeSearched)\n\t{\n\t\t// TODO: Implement this method in WEEK 3\n\t\t\n\t\t// Hook for visualization. See writeup.\n\t\t//nodeSearched.accept(next.getLocation());\n\t\t\n\t\tSet<GeographicPoint> visited = new HashSet<GeographicPoint>();\n\t\tList<GeographicPoint> queue = new ArrayList<GeographicPoint>();\n\t\tHashMap<GeographicPoint, List<GeographicPoint>> prev = new HashMap<GeographicPoint, List<GeographicPoint>>();\n\t\t\n\t\tfor (GeographicPoint temp : map.keySet())\n\t\t\tprev.put(temp, new ArrayList<GeographicPoint>());\n\t\t\n\t\tif (!map.containsKey(start) || !map.containsKey(goal)) \n\t\t\treturn null;\n\t\t\n\t\tqueue.add(start);\n\t\twhile (!queue.isEmpty() && !visited.contains(goal)) {\n\t\t\t\n\t\t\tGeographicPoint currPoint = queue.get(0);\n\t\t\tMapNode currNode = map.get(currPoint);\n\t\t\tnodeSearched.accept(currPoint);\n\t\t\t\n\t\t\tqueue.remove(0);\n\t\t\tHashMap<MapEdge, GeographicPoint> neighbours = currNode.getNeighbours();\n\t\t\tfor (GeographicPoint n : neighbours.values()) {\n\t\t\t\tif (n.equals(start))\n\t\t\t\t\tcontinue;\n\t\t\t\tif (!visited.contains(n)) {\n\t\t\t\t\tqueue.add(n);\n\t\t\t\t\tvisited.add(n);\n\t\t\t\t\tprev.get(n).add(currPoint);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn backTrack(prev, goal);\n\t}",
"void initialize(Graph graph, Node targetStart, Node searchStart, ExpandCounter counter);",
"public void bfs(GraphNode source)\n {\n Queue<GraphNode> q = new ArrayDeque<>();\n q.add(source);\n HashMap<GraphNode,Boolean> visit =\n new HashMap<GraphNode,Boolean>();\n visit.put(source,true);\n while (!q.isEmpty())\n {\n GraphNode u = q.poll();\n System.out.println(\"Value of Node \" + u.val);\n System.out.println(\"Address of Node \" + u);\n if (u.neighbours != null)\n {\n List<GraphNode> v = u.neighbours;\n for (GraphNode g : v)\n {\n if (visit.get(g) == null)\n {\n q.add(g);\n visit.put(g,true);\n }\n }\n }\n }\n System.out.println();\n }",
"public static void main(String[] args) throws Exception\r\n {\n if (args.length != 5) {\r\n System.out.println(\"Required arguments: NETWORK_SCHEME ROUTING_SCHEME TOPOLOGY_FILE WORKLOAD_FILE PACKET_RATE\");\r\n return;\r\n }\r\n Request currRequest;\r\n int successfulPackets = 0;\r\n int blockedPackets = 0;\r\n int totPackets = 0;\r\n \r\n // Initialise Network topology and workload based on input files\r\n network_topology = new Network(args[TOPOLOGY_FILE]);\r\n workload = new Workload(args[WORKLOAD_FILE], Integer.parseInt(args[PACKET_RATE]), args[NETWORKING_SCHEME]);\r\n numHops = 0;\r\n cumPropagationDelay = 0;\r\n \r\n // Initialise the Dijkstra's processor and set the routing scheme\r\n router = new RoutingProcessor(network_topology);\r\n router.setMethod(args[ROUTING_SCHEME]);\r\n \r\n // Go through the workload and process each request\r\n while(!workload.isEmpty())\r\n {\r\n // Pop off the top of the list\r\n currRequest = workload.remove();\r\n totPackets+=currRequest.packets;\r\n \r\n\r\n currRequest.path = router.computeBestPath(currRequest.source, currRequest.dest);\r\n\r\n\r\n if(network_topology.createCircuit(currRequest) == 0)\r\n {\r\n // Sum up the number of hops and propagation delay on the path\r\n numHops += (network_topology.numHops(currRequest))*currRequest.packets;\r\n cumPropagationDelay += network_topology.calculateCumPropDelay(currRequest) * currRequest.packets;\r\n successfulPackets+=currRequest.packets;\r\n //System.out.println(\"=======success!=============\");\r\n } else {\r\n blockedPackets+=currRequest.packets;\r\n //System.out.println(\"=======blocked=============\");\r\n }\r\n \r\n }\r\n \r\n\r\n // Print out all analytics\r\n int totVirtualCircuitRequests = workload.vcRequestCount;\r\n double percentageSuccessPackets = (double) (((double) successfulPackets/(double) totPackets) * 100.0);\r\n double perecentageBlockedPackets = (double) (((double) blockedPackets/ (double) totPackets) * 100.0);\r\n double averageNumHops = (double) numHops/ (double) successfulPackets;\r\n double averageCumPropDelay = (double) cumPropagationDelay/ (double) successfulPackets;\r\n \r\n// System.out.println(\"-----------\");\r\n// System.out.println(Arrays.toString(args));\r\n System.out.println(\"total number of virtual circuit requests: \" + totVirtualCircuitRequests);\r\n System.out.println(\"total number of packets: \" + totPackets);\r\n System.out.println(\"number of successfully routed packets: \" + successfulPackets);\r\n System.out.format(\"percentage of successfully routed packets: %.2f\\n\", percentageSuccessPackets);\r\n System.out.println(\"number of blocked packets: \" + blockedPackets);\r\n System.out.format(\"percentage of blocked packets: %.2f\\n\", perecentageBlockedPackets);\r\n System.out.format(\"average number of hops per circuit: %.2f\\n\" , averageNumHops);\r\n System.out.format(\"average cumulative propagation delay per circuit: %.2f\\n\" , averageCumPropDelay);\r\n }",
"private DiskBufferDriver compute(DataSourceFactory dsf,\n KeyedGraph<VWBetw, Edge> graph)\n throws DriverException {\n \n // Initialize the output.\n DiskBufferDriver output = new DiskBufferDriver(dsf, getMetadata(null));\n \n if (graph == null) {\n LOGGER.error(\"Null graph.\");\n } else {\n // Get a Dijkstra algo for the distance calculation.\n Dijkstra<VWBetw, Edge> dijkstra = new Dijkstra<VWBetw, Edge>(graph);\n \n // (source, destination, ...) (One-to-one)\n if (source != -1 && destination != -1) {\n double distance =\n dijkstra.oneToOne(graph.getVertex(source),\n graph.getVertex(destination));\n storeValue(source, destination, distance, output);\n } // (source, ...) (One-to-ALL)\n else if (source != -1 && destination == -1) {\n // TODO: Replace this by calculate().\n Map<VWBetw, Double> distances =\n dijkstra.oneToMany(graph.getVertex(source),\n graph.vertexSet());\n storeValues(source, distances, output);\n } // (source_dest_table, ...) (Many-to-many)\n else if (sourceDestinationTable != null) {\n // Make sure the source-destination table has columns named\n // SOURCE and DESTINATION.\n Metadata metadata = sourceDestinationTable.getMetadata();\n int sourceIndex = metadata.getFieldIndex(SOURCE);\n int targetIndex = metadata.getFieldIndex(DESTINATION);\n if (sourceIndex == -1) {\n throw new IllegalArgumentException(\n \"The source-destination table must contain \"\n + \"a column named \\'\" + SOURCE + \"\\'.\");\n } else if (targetIndex == -1) {\n throw new IllegalArgumentException(\n \"The source-destination table must contain \"\n + \"a column named \\'\" + DESTINATION + \"\\'.\");\n } else {\n \n // Prepare the source-destination map from the source-\n // destination table.\n Map<VWBetw, Set<VWBetw>> sourceDestinationMap =\n prepareSourceDestinationMap(graph,\n sourceIndex,\n targetIndex);\n if (sourceDestinationMap.isEmpty()) {\n LOGGER.error(\n \"No sources/destinations requested.\");\n }\n \n // Do One-to-Many many times!\n for (Entry<VWBetw, Set<VWBetw>> e\n : sourceDestinationMap.entrySet()) {\n Map<VWBetw, Double> distances =\n dijkstra.oneToMany(e.getKey(), e.getValue());\n storeValues(e.getKey().getID(), distances, output);\n }\n }\n }\n // Clean-up\n output.writingFinished();\n output.open();\n }\n return output;\n }",
"private void breadthFirst(PathBetweenNodes graph, LinkedList<String> visited) {\r\n\r\n LinkedList<String> nodes = graph.adjacentNodes(visited.getLast());\r\n for (String node : nodes)\r\n {\r\n if (visited.contains(node))\r\n {\r\n continue;\r\n }\r\n if (node.equals(END))\r\n {\r\n \tif (mode1 && mode){\r\n visited.add(node);\r\n printPath(visited); \r\n graph.flag=false;\r\n mode=false;\r\n visited.removeLast();\r\n \t} else if(mode2){\r\n visited.add(node);\r\n printPath(visited); \r\n flag=mode2; \r\n visited.removeLast();\r\n \t} \r\n } \r\n }\r\n\r\n for (String node : nodes) { // implementing a for loop to call each node in the array nodes\r\n if (visited.contains(node) || node.equals(END)) { // if statement to see if node is already visited or it is the end node\r\n continue;\r\n }\r\n flag=true;\r\n visited.addLast(node); //adding the last node to visited array\r\n breadthFirst(graph, visited); // implementing the breath first search\r\n visited.removeLast(); // removing the last node from array visited\r\n }\r\n if (flag == false) {\r\n System.out.println(\"No path Exists between \" + START + \" and \" + END);\r\n flag = true;\r\n }\r\n }",
"private void bfs() {\n\t\tQueue<Node> q = new ArrayDeque<>();\n\t\tq.add(treeNodes.get(0));\n\t\twhile (!q.isEmpty()) {\n\t\t\tint size = q.size();\n\t\t\tfor (int i = 0; i < size; i++) {\n\t\t\t\tNode curr = q.poll();\n\t\t\t\ttime += curr.informTime;\n\t\t\t\tSet<Node> nextNodes = curr.nextNodes;\n\t\t\t\tif (nextNodes == null || curr.id == treeNodes.get(0).id)\n\t\t\t\t\tcontinue;\n\t\t\t\tfor (Node node : nextNodes) {\n\t\t\t\t\tq.add(node);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t}",
"public interface BdObjectGraph\r\n{\r\n // Object Graph is a tree representation of BD object.\r\n // From root node to sub child node to finally leaf object graph shows the location of object.\r\n // for example \r\n //root=station,\r\n //station has 3 clusters=Nodes\r\n // Clusters has many objects for example file objects,schedule objects \r\n // then sub-node=file object,schedule object \r\n //Each node has resource description allocator,for example if i want to get file object in clsuter1\r\n //in station1 then resource description allocator of Big Dinosaur gives me \r\n //stationname,clustername,filename as a query \r\n //the syntax for query has to be decided in what format\r\n // may be station:cluster:where:filename=\"big dinosaur u will rule \"\r\n //Challenges:On what interval of time the BdObjectGraph has to be persist or it is stored in file system or create object\r\n //in runtime \r\n//////////////////////////////////\r\n //May be representing tree in file system or in object \r\n \r\n //for Example Example 1\r\n // Bd has different types of object graph on the basis of object type\r\n // which tree as object graph to search is determined on the basis of query syntax\r\n // for example\r\n // Station:Abcbankclientstation(in sense it represent one machine virtually but is a collection of many physical clusters or virtual clusters)\r\n // this will search station tree object with key as Abcbankclientstation.It goes on traversing on tree until it gets Abcbankclientstation and gets space object allcoated for this client in sense of cluster \r\n\r\n //for Example Example 2\r\n //Now after transversing cluster object with allocated space is retirved then again i need to retirve file object from that cluster\r\n //then again the query is \r\n //Station:Abcbankclientstation:insurancestore:abishkar.txt\r\n //now again file object graph tree is traversed until i get abishkar.txt and goes on recusrsively\r\n //or \r\n //Station:Abcbankclientstation:insurancestore:insuranceObject\r\n //insurancestore has large no of insuranceObject kept as tree,so again insurancestore is traversed until\r\n //insuranceObject is retirved and goes on recusrsively \r\n \r\n \r\n //Object graph is continuously updated ot inserted by another program in continuous basis on the basis of tree type object\r\n \r\n}",
"private static void disjkstraAlgorithm(Node sourceNode, GraphBuilder graph){\n PriorityQueue<Node> smallestDisQueue = new PriorityQueue<>(graph.nodeArr.size(), new Comparator<Node>() {\n @Override\n public int compare(Node first, Node sec) {\n if(first.distance == Integer.MAX_VALUE && sec.distance == Integer.MAX_VALUE){\n return 0;\n }\n else if(first.distance == Integer.MAX_VALUE && sec.distance != Integer.MAX_VALUE){\n return 1;\n } else if(first.distance != Integer.MAX_VALUE && sec.distance == Integer.MAX_VALUE){\n return -1;\n }\n else\n return (int) (first.distance - sec.distance);\n }\n });\n\n smallestDisQueue.add(sourceNode); //add the node to the queue\n\n // until all vertices are know get the vertex with smallest distance\n\n while(!smallestDisQueue.isEmpty()) {\n\n Node currNode = smallestDisQueue.poll();\n// System.out.println(\"Curr: \");\n// System.out.println(currNode);\n if(currNode.known)\n continue; //do nothing if the currNode is known\n\n currNode.known = true; // otherwise, set it to be known\n\n for(Edge connectedEdge : currNode.connectingEdges){\n Node nextNode = connectedEdge.head;\n if(!nextNode.known){ // Visit all neighbors that are unknown\n\n long weight = connectedEdge.weight;\n if(currNode.distance == Integer.MAX_VALUE){\n continue;\n }\n else if(nextNode.distance == Integer.MAX_VALUE && currNode.distance == Integer.MAX_VALUE) {\n continue;\n }\n\n else if(nextNode.distance> weight + currNode.distance){//Update their distance and path variable\n smallestDisQueue.remove(nextNode); //remove it from the queue\n nextNode.distance = weight + currNode.distance;\n\n smallestDisQueue.add(nextNode); //add it again to the queue\n nextNode.pathFromSouce = currNode;\n\n// System.out.println(\"Next: \");\n// System.out.println(nextNode);\n }\n }\n }\n// System.out.println(\"/////////////\");\n }\n }",
"public static void main(String[] args)throws IOException{\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));\n \n StringTokenizer st = new StringTokenizer(br.readLine());\n int N = Integer.parseInt(st.nextToken());\n int M = Integer.parseInt(st.nextToken());\n int K = Integer.parseInt(st.nextToken());\n\n st = new StringTokenizer(br.readLine());\n int S = Integer.parseInt(st.nextToken());\n int D = Integer.parseInt(st.nextToken());\n\n Graph g = new Graph(N);\n for(int i=0;i<M;i++){\n st = new StringTokenizer(br.readLine());\n int start = Integer.parseInt(st.nextToken());\n int end = Integer.parseInt(st.nextToken());\n int weight = Integer.parseInt(st.nextToken());\n\n g.addEdge(start, end, weight);\n }\n\n List<Integer> taxes = new ArrayList<Integer>();\n for(int i=0;i<K;i++){\n int weight = Integer.parseInt(br.readLine());\n\n taxes.add(weight);\n }\n\n int[] result;\n result = dijkstra(g, S);\n bw.write(Integer.toString(result[D])+\"\\n\");\n\n for(int i=0;i<K;i++){\n g.addWeight2AllEdge(taxes.get(i));\n result = dijkstra(g, S);\n bw.write(Integer.toString(result[D])+\"\\n\");\n }\n\n bw.flush();\n bw.close();\n br.close();\n }",
"public A_star_search(Node start, Node end) {\r\n initial_node = start;\r\n end_node = end;\r\n cost = 0;\r\n }",
"public static void main(String[] args) {\n\t\tinit(Hx.Manhattan, CostMode.Def);\n\t\tMaze smallMaze = new Maze(\"mazes/tinySearch.txt\");\n\t\tAgent astarAg = new Agent(smallMaze);\n\t\tRecorder rd = new Recorder();\n\t\tSearch.AstarMulOptimal(astarAg, smallMaze, rd);\n\t\t//System.out.println(rd.getExpandNodes());\n\t}",
"public static void main(String args[]) throws Exception {\n\n String sourceFile = args[0]; //source file has supervised SRL tags\n String targetFile = args[1]; //target file has supervised SRL tags\n String alignmentFile = args[2];\n String sourceClusterFilePath = args[3];\n String targetClusterFilePath = args[4];\n String projectionFilters = args[5];\n double sparsityThresholdStart = Double.parseDouble(args[6]);\n double sparsityThresholdEnd = Double.parseDouble(args[6]);\n\n\n Alignment alignment = new Alignment(alignmentFile);\n HashMap<Integer, HashMap<Integer, Integer>> alignmentDic = alignment.getSourceTargetAlignmentDic();\n\n final IndexMap sourceIndexMap = new IndexMap(sourceFile, sourceClusterFilePath);\n final IndexMap targetIndexMap = new IndexMap(targetFile, targetClusterFilePath);\n ArrayList<String> sourceSents = IO.readCoNLLFile(sourceFile);\n ArrayList<String> targetSents = IO.readCoNLLFile(targetFile);\n\n System.out.println(\"Projection started...\");\n DependencyLabelsAnalyser dla = new DependencyLabelsAnalyser();\n for (int senId = 0; senId < sourceSents.size(); senId++) {\n if (senId % 100000 == 0)\n System.out.print(senId);\n else if (senId % 10000 == 0)\n System.out.print(\".\");\n\n Sentence sourceSen = new Sentence(sourceSents.get(senId), sourceIndexMap);\n Sentence targetSen = new Sentence(targetSents.get(senId), targetIndexMap);\n int maxNumOfProjectedLabels = dla.getNumOfProjectedLabels(sourceSen, alignmentDic.get(senId));\n double trainGainPerWord = (double) maxNumOfProjectedLabels/targetSen.getLength();\n\n if (trainGainPerWord >= sparsityThresholdStart && trainGainPerWord< sparsityThresholdEnd) {\n dla.analysSourceTargetDependencyMatch(sourceSen, targetSen, alignmentDic.get(senId),\n sourceIndexMap, targetIndexMap, projectionFilters);\n }\n }\n System.out.print(sourceSents.size() + \"\\n\");\n dla.writeConfusionMatrix(\"confusion_\"+sparsityThresholdStart+\"_\"+sparsityThresholdEnd+\".out\", sourceIndexMap, targetIndexMap);\n }",
"public static void main(String[] args) {\n\n /*\n * Given below directed graph, show the DFS and BFS traversal and print the paths\n * it took throughout the traversal of the graph\n *\n * (D)--(F)\n * /\n * (B)--(E)\n * /\n * (A)\n * \\\n * (C)--(G)\n *\n * Do Breadth First Search and Depth First Search, conclude on the trade offs\n * between the two traversal\n */\n\n // Initialize the graph here and its edges\n Graphs graph = new Graphs();\n graph.addNode('A', new Node('A'));\n graph.addNode('B', new Node('B'));\n graph.addNode('C', new Node('C'));\n graph.addNode('D', new Node('D'));\n graph.addNode('E', new Node('E'));\n graph.addNode('F', new Node('F'));\n graph.addNode('G', new Node('G'));\n\n graph.addEdge('A','B');\n graph.addEdge('B','D');\n graph.addEdge('D','F');\n graph.addEdge('B','E');\n graph.addEdge('A','C');\n graph.addEdge('C','G');\n\n // Initialize the list of paths\n ArrayList<String> traversedNodes;\n // Do a DFS on the graph\n traversedNodes = graph.depthFirstSearch('A','G');\n System.out.println(\"Traversal in DFS:\");\n // Print all of the paths\n for(String path : traversedNodes) {\n System.out.println(path);\n }\n\n // Do a BFS on the graph\n traversedNodes = graph.breadthFirstSearch('A','G');\n System.out.println(\"\\nTraversal in BFS:\");\n // Print all of the paths\n for(String path : traversedNodes) {\n System.out.println(path);\n }\n\n }",
"private Vector<Vector<BusStopInfo>> findRek (BusStopInterface from, BusStopInterface to, Vector <BusStopInfo> toInfo, Vector<BusStopInfo> visited, int swaps, int transfers )\r\n {\r\n Vector<Vector<BusStopInfo>> sciezka = new Vector<Vector<BusStopInfo>>();\r\n \r\n if(from.getName()==to.getName())\r\n {\r\n sciezka.add(toInfo);\r\n return sciezka;\r\n }\r\n\r\n for(BusStopInfo vis: visited)\r\n {\r\n if(vis.awtobus.busLine.getBusStop(vis.pozycja).getName()==from.getName())\r\n return sciezka;\r\n }\r\n\r\n Vector <BusStopInfo> fromInfo = findStopInfo(from);\r\n\r\n fromInfo = infoFilter(fromInfo, toInfo);\r\n\r\n for(BusStopInfo info: fromInfo)\r\n {\r\n int swapsNow = swaps;\r\n if(visited.size()>0 && info.awtobus.bus.getBusNumber()!=visited.lastElement().awtobus.bus.getBusNumber())\r\n {\r\n swapsNow++;\r\n }\r\n\r\n if(swapsNow <= transfers)\r\n {\r\n int nextPosition = info.pozycja +1; //ide do przodu linii\r\n int prevPosition = info.pozycja -1; //ide do tyłu linii\r\n\r\n Vector<BusStopInfo> temp = new Vector<BusStopInfo>(visited);\r\n temp.add(info);\r\n Vector<Vector<BusStopInfo>> result ;\r\n if(nextPosition<info.awtobus.busLine.getNumberOfBusStops())\r\n {\r\n BusStopInterface nextStop = info.awtobus.busLine.getBusStop(nextPosition);\r\n result = findRek(nextStop, to, toInfo, temp, swapsNow, transfers);\r\n for(Vector<BusStopInfo> res: result)\r\n {\r\n res.add(0, info);\r\n sciezka.add(res);\r\n }\r\n }\r\n if(prevPosition >= 0)\r\n {\r\n BusStopInterface prevStop = info.awtobus.busLine.getBusStop(prevPosition);\r\n result = findRek(prevStop, to, toInfo, temp, swapsNow, transfers);\r\n for(Vector<BusStopInfo> res: result)\r\n {\r\n res.add(0, info);\r\n sciezka.add(res);\r\n }\r\n }\r\n }\r\n }\r\n\r\n return sciezka;\r\n }",
"void Graph::BFS(int s)\n{\n bool *visited = new bool[V];\n for(int i = 0; i < V; i++)\n visited[i] = false;\n \n // Create a queue for BFS\n list<int> queue;\n \n // Mark the current node as visited and enqueue it\n visited[s] = true;\n queue.push_back(s);\n \n // 'i' will be used to get all adjacent vertices of a vertex\n list<int>::iterator i;\n \n while(!queue.empty())\n {\n // Dequeue a vertex from queue and print it\n s = queue.front();\n cout << s << \" \";\n queue.pop_front();\n \n // Get all adjacent vertices of the dequeued vertex s\n // If a adjacent has not been visited, then mark it visited\n // and enqueue it\n for(i = adj[s].begin(); i != adj[s].end(); ++i)\n {\n if(!visited[*i])\n {\n visited[*i] = true;\n queue.push_back(*i);\n }\n }\n }",
"public static void main(String[] args) {\n Graph graph = new Graph();\n graph.addEdge(0, 1);\n graph.addEdge(0, 4);\n\n graph.addEdge(1,0);\n graph.addEdge(1,5);\n graph.addEdge(1,2);\n graph.addEdge(2,1);\n graph.addEdge(2,6);\n graph.addEdge(2,3);\n\n graph.addEdge(3,2);\n graph.addEdge(3,7);\n\n graph.addEdge(7,3);\n graph.addEdge(7,6);\n graph.addEdge(7,11);\n\n graph.addEdge(5,1);\n graph.addEdge(5,9);\n graph.addEdge(5,6);\n graph.addEdge(5,4);\n\n graph.addEdge(9,8);\n graph.addEdge(9,5);\n graph.addEdge(9,13);\n graph.addEdge(9,10);\n\n graph.addEdge(13,17);\n graph.addEdge(13,14);\n graph.addEdge(13,9);\n graph.addEdge(13,12);\n\n graph.addEdge(4,0);\n graph.addEdge(4,5);\n graph.addEdge(4,8);\n graph.addEdge(8,4);\n graph.addEdge(8,12);\n graph.addEdge(8,9);\n graph.addEdge(12,8);\n graph.addEdge(12,16);\n graph.addEdge(12,13);\n graph.addEdge(16,12);\n graph.addEdge(16,17);\n graph.addEdge(17,13);\n graph.addEdge(17,16);\n graph.addEdge(17,18);\n\n graph.addEdge(18,17);\n graph.addEdge(18,14);\n graph.addEdge(18,19);\n\n graph.addEdge(19,18);\n graph.addEdge(19,15);\n LinkedList<Integer> visited = new LinkedList();\n List<ArrayList<Integer>> paths = new ArrayList<ArrayList<Integer>>();\n int currentNode = START;\n visited.add(START);\n new searchEasy().findAllPaths(graph, visited, paths, currentNode);\n for(ArrayList<Integer> path : paths){\n for (Integer node : path) {\n System.out.print(node);\n System.out.print(\" \");\n }\n System.out.println();\n }\n }",
"public String outputBreadthFirstSearch() {\n\n String output = \"\";\n\n // create a queue for BFS \n LinkedList<TrieNode> queue = new LinkedList<>();\n\n queue.add(root);\n\n while (queue.size() != 0) {\n // dequeue a node from queue and append to the output\n TrieNode s = queue.poll();\n\n // append to the output\n output += s;\n\n // get all children nodes of the dequeued node s\n TrieNode[] children = s.offsprings;\n for (int i = 0; i < 26; i++) {\n TrieNode next = children[i];\n if (next != null) {\n queue.add(next);\n }\n\n }\n }\n return output;\n }"
] | [
"0.6276583",
"0.62440985",
"0.5829307",
"0.58189934",
"0.5787781",
"0.5729359",
"0.5694542",
"0.5681728",
"0.5676192",
"0.5658338",
"0.5641067",
"0.5636788",
"0.5601665",
"0.5528141",
"0.54672843",
"0.54449016",
"0.54398817",
"0.54140925",
"0.5357816",
"0.5353829",
"0.5335324",
"0.531653",
"0.5313552",
"0.5310522",
"0.53026986",
"0.52966493",
"0.5290966",
"0.5281758",
"0.52553034",
"0.52221626",
"0.52152544",
"0.51811564",
"0.51714265",
"0.51649916",
"0.5161566",
"0.5156435",
"0.5116773",
"0.51151675",
"0.5114381",
"0.51116234",
"0.5101174",
"0.5099615",
"0.5092249",
"0.507258",
"0.5054968",
"0.50463337",
"0.5045218",
"0.5039468",
"0.5028605",
"0.5026732",
"0.50217646",
"0.5010563",
"0.500093",
"0.4959979",
"0.49570695",
"0.4948405",
"0.4947692",
"0.49355054",
"0.4931795",
"0.4928823",
"0.49216485",
"0.49203372",
"0.49146432",
"0.49092448",
"0.49070007",
"0.48952287",
"0.48890024",
"0.48884156",
"0.488577",
"0.48827302",
"0.48816836",
"0.4880919",
"0.48799878",
"0.48764768",
"0.48726618",
"0.48720914",
"0.48685992",
"0.48664057",
"0.48640794",
"0.48635513",
"0.48631713",
"0.4858487",
"0.48570332",
"0.48522553",
"0.48477775",
"0.4840276",
"0.48379132",
"0.48309314",
"0.48277143",
"0.48276418",
"0.48274848",
"0.48272842",
"0.48204294",
"0.4816767",
"0.48155633",
"0.48065582",
"0.4791698",
"0.4789447",
"0.47888973",
"0.47885802"
] | 0.69463223 | 0 |
IMPORT: label (String)queue EXPORT: bool (DSALinkedList) ASSERTION: DEPTH FIRST SEARCH Recur for all the vertices adjacent to vx while stack is not empty | public void bfs(DSAGraphVertex vx, DSAStack visited, DSAQueue queue, DSAGraphVertex target)
{
try {
if(vx != null) //base case if it's null end recursion
{
visited.push(vx); //push onto visited stack
Iterator<DSAGraphVertex> itr = vx.getAdjacent().iterator();
do{
while (itr.hasNext())
{
vx = itr.next();
if(!vx.getVisited() && !vx.equals(target)) //if not visited and is not target traverse here
{
queue.enqueue(vx); //adds to output queue
vx.setVisited(); //sets to visited
bfs(vx, visited, queue, target);
}
}
visited.pop();
} while(!visited.isEmpty());
}
}
catch (IllegalArgumentException e) //catches empty stack exceptions
{
//System.out.println(e.getMessage());
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String breadthFirstSearch( AnyType start_vertex ) throws VertexException {\n \n StringBuffer buffer = new StringBuffer();\n \n // ----------------------------\n // TODO: Add your code here\n // ----------------------------\n boolean exists = false;\n Vertex<AnyType> S = new Vertex<AnyType>(start_vertex);\n int counter = 1;\n //make new vertex to check if its in list\n //make queue to hold vertices\n SemiConstantTimeQueue<Vertex<AnyType>> queue = new SemiConstantTimeQueue<Vertex<AnyType>>();\n //loop through and set not visited\n for( int i = 0; i < vertex_adjacency_list.size(); i++){\n vertex_adjacency_list.get(i).setVisited(-1);\n //if it's in list then set exists to true\n //and set visited \n if(vertex_adjacency_list.get(i).compareTo(S) == 0){\n exists = true;\n vertex_adjacency_list.get(i).setVisited(counter);\n counter = i;\n }\n } \n //if doesn't exist then throw the exception\n if(exists == false){\n throw new VertexException(\"Start Vertex does not exist\");\n }\n //make new queue\n queue.add(vertex_adjacency_list.get(counter));\n vertex_adjacency_list.get(counter).setVisited(1);\n counter = 1;\n int k=0;\n Vertex<AnyType>e;\n //while the queue isn't empty\n while(queue.peek() !=null){\n //make e the top of the queue \n e = queue.peek(); \n //go through the list and if you reach the begining it exits loop\n for( k = 0; k < vertex_adjacency_list.size()-1; k++){\n if(vertex_adjacency_list.get(k).compareTo(e)==0){\n break;\n }\n } \n //go through loop and check if visited, if not then add it to queue, set visited\n for( int j = 0; j< vertex_adjacency_list.get(k).numberOfAdjacentVertices(); j++){\n if(vertex_adjacency_list.get(k).getAdjacentVertex(j).hasBeenVisited()==false){\n counter++;\n queue.add(vertex_adjacency_list.get(k).getAdjacentVertex(j));\n vertex_adjacency_list.get(k).getAdjacentVertex(j).setVisited(counter);\n }\n }\n //remove from queue when through loop once\n k++;\n queue.remove();\n }\n //loop through list and print vertex and when it was visited\n for(int o = 0; o< vertex_adjacency_list.size(); o++){\n buffer.append(vertex_adjacency_list.get(o) + \":\" + vertex_adjacency_list.get(o).getVisited()+ \"\\n\");\n }\n return buffer.toString();\n }",
"public String depthFirstSearch( AnyType start_vertex ) throws VertexException {\n \n StringBuffer buffer = new StringBuffer();\n \n // ----------------------------\n // TODO: Add your code here\n // ----------------------------\n ConstantTimeStack<Vertex<AnyType>> stack = new ConstantTimeStack<Vertex<AnyType>>();\n boolean exists = false;\n Vertex<AnyType> S = new Vertex<AnyType>(start_vertex);\n int counter = 0;\n //loop through to set each vertex to not visited\n for( int i = 0; i < vertex_adjacency_list.size(); i++){\n vertex_adjacency_list.get(i).setVisited(-1);\n //if find the start vertex then set index position to counter\n if(vertex_adjacency_list.get(i).compareTo(S) == 0){\n exists = true;\n vertex_adjacency_list.get(i).setVisited(counter);\n counter = i;\n }\n }\n //if doesn't exist then through exception\n if(exists == false){\n throw new VertexException(\"Start Vertex does not exist\");\n }\n //if it does exist then push start node onto stack, set visited \n else if(exists){\n stack.push(vertex_adjacency_list.get(counter));\n vertex_adjacency_list.get(counter).setVisited(1);\n Vertex <AnyType> e = vertex_adjacency_list.get(counter);\n counter = 2;\n int n = e.numberOfAdjacentVertices();\n try{\n \n while(true){\n //loop through e's adjacent vertices \n for (n = e.numberOfAdjacentVertices()-1; n >=0 ; n--){\n //if the adacent vertex has not been visited\n if(e.getAdjacentVertex(n).hasBeenVisited()==false){\n //change e to adjacent vertex and push onto stack\n e = e.getAdjacentVertex(n);\n stack.push(e);\n //set e as visited at counter\n e.setVisited(counter);\n counter++;\n //reset n to e's num of vertices\n n = e.numberOfAdjacentVertices();\n }\n //if it has been visited and it's the first node in list\n //then pop it off the stack and then set e to new top\n //set n to new num of vertices\n else if(e.getAdjacentVertex(n).hasBeenVisited() && n == 0){\n stack.pop();\n e = stack.peek();\n n = e.numberOfAdjacentVertices();\n }\n }\n }\n }catch(EmptyStackException m){\n }\n }\n //loop through the list and print each with when it was visited\n for(int k = 0; k< vertex_adjacency_list.size(); k++){\n buffer.append(vertex_adjacency_list.get(k) + \":\" + vertex_adjacency_list.get(k).getVisited()+ \"\\n\");\n }\n \n return buffer.toString();\n \n }",
"public void dft() {\r\n\t\tHashMap<String, Boolean> processed = new HashMap<>();\r\n\t\tLinkedList<Pair> stack = new LinkedList<>();\r\n\r\n\t\tArrayList<String> vnames = new ArrayList<>(vces.keySet());\r\n\t\tfor (String vname : vnames) {\r\n\t\t\tif (processed.containsKey(vname)) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tPair rootpair = new Pair(vname, vname);\r\n\t\t\tstack.addFirst(rootpair);\r\n\t\t\twhile (stack.size() != 0) {\r\n\t\t\t\t// 1. removeFirst\r\n\t\t\t\tPair rp = stack.removeFirst();\r\n\r\n\t\t\t\t// 2. check if processed, mark if not\r\n\t\t\t\tif (processed.containsKey(rp.vname)) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tprocessed.put(rp.vname, true);\r\n\r\n\t\t\t\t// 3. Check, if an edge is found\r\n\t\t\t\tSystem.out.println(rp.vname + \" via \" + rp.psf);\r\n\r\n\t\t\t\t// 4. Add the unprocessed nbrs back\r\n\t\t\t\tArrayList<String> nbrnames = new ArrayList<>(rp.vtx.nbrs.keySet());\r\n\t\t\t\tfor (String nbrname : nbrnames) {\r\n\t\t\t\t\tif (!processed.containsKey(nbrname)) {\r\n\t\t\t\t\t\tPair np = new Pair(nbrname, rp.psf + nbrname);\r\n\t\t\t\t\t\tstack.addFirst(np);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void dfs() {\n int currentVertexIndex = 0;\r\n dfsStack.push(0);\r\n vertexList[0].wasVisited = true;\r\n System.out.println(vertexList[dfsStack.peek()]);\r\n while (dfsStack.top != -1) {\r\n\r\n\r\n currentVertexIndex = this.getAdjUnvisitedVert(dfsStack.peek());\r\n if (currentVertexIndex != -1) {\r\n dfsStack.push(currentVertexIndex);\r\n vertexList[currentVertexIndex].wasVisited = true;\r\n System.out.println(vertexList[dfsStack.peek()]);\r\n\r\n\r\n } else {\r\n currentVertexIndex = dfsStack.pop();\r\n\r\n }\r\n }\r\n// reset wasVisted\r\n for (Vertex x : vertexList) {\r\n x.wasVisited = false;\r\n }\r\n }",
"void testSearches(Tester t) {\n Vertex v1 = new Vertex(10, 10);\n Vertex v2 = new Vertex(10, 11);\n Vertex v3 = new Vertex(10, 12);\n\n Edge e1 = new Edge(v1, v2, 1);\n Edge e2 = new Edge(v2, v3, 1);\n\n IList<Vertex> map = new Cons<Vertex>(v1, new Cons<Vertex>(v2, new Cons<Vertex>(\n v3, new Empty<Vertex>())));\n\n Player player = new Player(map);\n DepthFirst dp = new DepthFirst(map);\n BreadthFirst bp = new BreadthFirst(map);\n\n t.checkExpect(player.current, v1);\n t.checkExpect(player.finished, false);\n\n t.checkExpect(bp.hasNext(), true);\n t.checkExpect(bp.next(), new Queue<Vertex>());\n\n t.checkExpect(dp.hasNext(), true);\n t.checkExpect(dp.next(), new Stack<Vertex>());\n\n t.checkExpect(player.move(true, e1), v2);\n\n t.checkExpect(player.current, v2);\n t.checkExpect(player.finished, false);\n\n t.checkExpect(bp.hasNext(), false);\n t.checkExpect(bp.next(), v3);\n\n t.checkExpect(dp.hasNext(), false);\n t.checkExpect(dp.next(), v3);\n\n t.checkExpect(player.move(true, e2), v3);\n\n player.finished = true;\n\n t.checkExpect(player.current, v3);\n t.checkExpect(player.finished, true);\n\n Queue<Vertex> q = new Queue<Vertex>(map);\n\n q.enqueue(new Vertex(5, 5));\n\n Deque<Vertex> dq = new Deque<Vertex>();\n dq.addAtHead(v1);\n dq.addAtTail(v2);\n dq.addAtTail(new Vertex(5, 5));\n\n\n t.checkExpect(q.isEmpty(), false);\n t.checkExpect(q.contents, dq);\n\n Stack<Vertex> stack = new Stack<Vertex>(map);\n\n t.checkExpect(stack.isEmpty(), false);\n dq.removeFromHead();\n t.checkExpect(stack.pop(), dq);\n\n t.checkExpect(dp.next(), v2);\n t.checkExpect(bp.hasNext(), true);\n\n }",
"private void breadthFirstSearch (int start, int[] visited, int[] parent){\r\n Queue< Integer > theQueue = new LinkedList< Integer >();\r\n boolean[] identified = new boolean[getNumV()];\r\n identified[start] = true;\r\n theQueue.offer(start);\r\n while (!theQueue.isEmpty()) {\r\n int current = theQueue.remove();\r\n visited[current] = 1; //ziyaret edilmis vertexler queuedan cikarilan vertexlerdir\r\n Iterator < Edge > itr = edgeIterator(current);\r\n while (itr.hasNext()) {\r\n Edge edge = itr.next();\r\n int neighbor = edge.getDest();\r\n if (!identified[neighbor]) {\r\n identified[neighbor] = true;\r\n theQueue.offer(neighbor);\r\n parent[neighbor] = current;\r\n }\r\n }\r\n }\r\n }",
"public void mst() {\n int currentVertexIndex = 0;\r\n dfsStack.push(0);\r\n vertexList[0].wasVisited = true;\r\n// System.out.println(vertexList[dfsStack.peek()]);\r\n while (dfsStack.top != -1) {\r\n\r\n\r\n currentVertexIndex = this.getAdjUnvisitedVert(dfsStack.peek());\r\n if (currentVertexIndex != -1) {\r\n System.out.print(vertexList[dfsStack.peek()]);\r\n dfsStack.push(currentVertexIndex);\r\n vertexList[currentVertexIndex].wasVisited = true;\r\n System.out.print(vertexList[dfsStack.peek()]);\r\n System.out.print(\", \");\r\n\r\n\r\n } else {\r\n currentVertexIndex = dfsStack.pop();\r\n\r\n }\r\n }\r\n for (Vertex x : vertexList) {\r\n x.wasVisited = false;\r\n }\r\n }",
"private static int breadthFirstSearch(Vertex start) throws Queue.UnderflowException, Queue.EmptyException {\n boolean visited[] = new boolean[48];\n //Keep a queue of vertecies and a queue of the depth of the verticies - they will be added to and poped from identically\n ListQueue<Vertex> queue = new ListQueue<Vertex>();\n ListQueue<Integer> numQueue = new ListQueue<Integer>();\n //Set the starting node as visited\n visited[start.index()] = true;\n queue.enqueue(start);\n numQueue.enqueue(new Integer(1));\n\n //Keep last\n int last = -1;\n //While the queue isnt empty\n while (!queue.isEmpty()) {\n //Pop off the top from both queues and mark as visited\n start = queue.dequeue();\n int current = numQueue.dequeue();\n visited[start.index] = true;\n //For all neigbors\n for (Vertex v : start.neighbors) {\n //If we havent visited it make sure to visit it\n if (visited[v.index()] == false) {\n //As we keep adding new nodes to visit keep track of the depth\n queue.enqueue(v);\n numQueue.enqueue(current + 1);\n }\n }\n //Keep track of the most recent depth before we pop it off (queue will be empty when we exit)\n last = current;\n }\n //Return the max of the depth\n return last;\n }",
"void dfs(){\n // start from the index 0\n for (int vertex=0; vertex<v; vertex++){\n // check visited or not\n if (visited[vertex]==false){\n Explore(vertex);\n }\n }\n }",
"void BFS(int s, int d) \r\n { \r\n int source = s;\r\n int destination = d;\r\n boolean visited[] = new boolean[V];\r\n int parent[] = new int[V];\r\n \r\n // Create a queue for BFS \r\n LinkedList<Integer> queue = new LinkedList<Integer>(); \r\n \r\n // Mark the current node as visited and enqueue it \r\n \r\n visited[s]=true; \r\n queue.add(s); \r\n System.out.println(\"Search Nodes: \");\r\n while (queue.size() != 0) \r\n { \r\n int index = 0;\r\n \r\n // Dequeue a vertex from queue and print it \r\n \r\n s = queue.poll();\r\n \r\n System.out.print(convert2(s)); \r\n \r\n if(s == destination)\r\n {\r\n break;\r\n }\r\n \r\n System.out.print(\" -> \");\r\n while(index < adj[s].size()) \r\n { \r\n \r\n \r\n int n = adj[s].get(index); \r\n if (!visited[n]) \r\n { \r\n visited[n] = true;\r\n parent[n] = s;\r\n queue.add(n); \r\n }\r\n index = index+ 2;\r\n \r\n \r\n }\r\n \r\n \r\n \r\n }\r\n int check = destination;\r\n int cost = 0, first, second = 0;\r\n String string = \"\" + convert2(check);\r\n while(check!=source)\r\n {\r\n \r\n first = parent[check];\r\n string = convert2(first) + \" -> \" + string;\r\n while(adj[first].get(second) != check)\r\n {\r\n second++;\r\n }\r\n cost = cost + adj[first].get(second +1);\r\n check = first;\r\n second = 0;\r\n \r\n }\r\n \r\n System.out.println(\"\\n\\nPathway: \");\r\n \r\n System.out.println(string);\r\n \r\n \r\n System.out.println(\"\\nTotal cost: \" + cost);\r\n }",
"private void breadthHelper(Graph<VLabel, ELabel>.Vertex v) {\n LinkedList<Graph<VLabel, ELabel>.Vertex> fringe =\n new LinkedList<Graph<VLabel, ELabel>.Vertex>();\n fringe.add(v);\n while (fringe.size() > 0) {\n Graph<VLabel, ELabel>.Vertex curV = fringe.poll();\n try {\n if (!_marked.contains(curV)) {\n _marked.add(curV);\n try {\n visit(curV);\n } catch (RejectException rExc) {\n fringe.add(curV);\n continue;\n }\n for (Graph<VLabel, ELabel>.Edge e: _graph.outEdges(curV)) {\n Graph<VLabel, ELabel>.Vertex child = e.getV(curV);\n if (!_marked.contains(child)) {\n try {\n preVisit(e, curV);\n fringe.add(child);\n } catch (RejectException rExc) {\n int unused = 0;\n }\n }\n }\n fringe.add(curV);\n } else {\n postVisit(curV);\n while (fringe.remove(curV)) {\n continue;\n }\n }\n } catch (StopException sExc) {\n _finalVertex = curV;\n return;\n }\n }\n }",
"public void calcSP(Graph g, Vertex source){\n // Algorithm:\n // 1. Take the unvisited node with minimum weight.\n // 2. Visit all its neighbours.\n // 3. Update the distances for all the neighbours (In the Priority Queue).\n // Repeat the process till all the connected nodes are visited.\n\n // clear existing info\n// System.out.println(\"Calc SP from vertex:\" + source.name);\n g.resetMinDistance();\n source.minDistance = 0;\n PriorityQueue<Vertex> queue = new PriorityQueue<Vertex>();\n queue.add(source);\n\n while(!queue.isEmpty()){\n Vertex u = queue.poll();\n for(Edge neighbour:u.neighbours){\n// System.out.println(\"Scanning vector: \"+neighbour.target.name);\n Double newDist = u.minDistance+neighbour.weight;\n\n // get new shortest path, empty existing path info\n if(neighbour.target.minDistance>newDist){\n // Remove the node from the queue to update the distance value.\n queue.remove(neighbour.target);\n neighbour.target.minDistance = newDist;\n\n // Take the path visited till now and add the new node.s\n neighbour.target.path = new ArrayList<>(u.path);\n neighbour.target.path.add(u);\n// System.out.println(\"Path\");\n// for (Vertex vv: neighbour.target.path) {\n// System.out.print(vv.name);\n// }\n// System.out.print(\"\\n\");\n\n// System.out.println(\"Paths\");\n neighbour.target.pathCnt = 0;\n neighbour.target.paths = new ArrayList<ArrayList<Vertex>>();\n if (u.paths.size() == 0) {\n ArrayList<Vertex> p = new ArrayList<Vertex>();\n p.add(u);\n neighbour.target.paths.add(p);\n neighbour.target.pathCnt++;\n } else {\n for (ArrayList<Vertex> p : u.paths) {\n ArrayList<Vertex> p1 = new ArrayList<>(p);\n p1.add(u);\n// for (Vertex vv : p1) {\n// System.out.print(vv.name);\n// }\n// System.out.print(\"\\n\");\n neighbour.target.paths.add(p1);\n neighbour.target.pathCnt++;\n }\n }\n\n //Reenter the node with new distance.\n queue.add(neighbour.target);\n }\n // get equal cost path, add into path list\n else if (neighbour.target.minDistance == newDist) {\n queue.remove(neighbour.target);\n for(ArrayList<Vertex> p: u.paths) {\n ArrayList<Vertex> p1 = new ArrayList<>(p);\n p1.add(u);\n neighbour.target.paths.add(p1);\n neighbour.target.pathCnt++;\n }\n queue.add(neighbour.target);\n }\n }\n }\n }",
"public static void main(String[] args) {\n\n BDNode a = new BDNode(\"A\");\n BDNode b = new BDNode(\"B\");\n BDNode c = new BDNode(\"C\");\n BDNode d = new BDNode(\"D\");\n BDNode e = new BDNode(\"E\");\n\n a.link(b);\n a.link(d);\n b.link(a);\n b.link(c);\n b.link(e);\n c.link(b);\n c.link(d);\n d.link(a);\n d.link(c);\n d.link(e);\n e.link(b);\n e.link(d);\n\n BDNode target = e;\n\n/*\n // BFS\n Queue<BDNode> queue = new LinkedList<>();\n queue.offer(a);\n\n while(!queue.isEmpty()) {\n BDNode n = queue.poll();\n n.visit();\n System.out.println(n); // 찾는 여정 출력\n\n if(n.equals(target)) {\n System.out.println(\"BFS Found! \" + n);\n break;\n }\n\n for (BDNode l : n.links) {\n if(l.isVisited()) continue;\n if (queue.contains(l)) continue;\n queue.offer(l);\n }\n\n // 위랑 같은 표현\n// n.links.stream()\n// .filter(l -> !queue.contains(l))\n// .forEach(queue::offer);\n }\n*/\n\n // DFS\n Stack<BDNode> stack = new Stack<>();\n stack.push(a);\n\n while(!stack.isEmpty()) {\n BDNode n = stack.pop();\n n.visit();\n System.out.println(n); // 찾는 여정 출력\n\n if (n.equals(target)) {\n System.out.println(\"DFS Found! \" + n);\n break;\n }\n\n for (BDNode l : n.links) {\n if (l.isVisited()) continue;\n if (stack.contains(l)) continue;\n\n stack.push(l);\n }\n }\n\n\n }",
"public List<Graph> search() {\n\n long start = System.currentTimeMillis();\n TetradLogger.getInstance().log(\"info\", \"Starting ION Search.\");\n logGraphs(\"\\nInitial Pags: \", this.input);\n TetradLogger.getInstance().log(\"info\", \"Transfering local information.\");\n long steps = System.currentTimeMillis();\n\n /*\n * Step 1 - Create the empty graph\n */\n List<Node> varNodes = new ArrayList<>();\n for (String varName : variables) {\n varNodes.add(new GraphNode(varName));\n }\n Graph graph = new EdgeListGraph(varNodes);\n\n /*\n * Step 2 - Transfer local information from the PAGs (adjacencies\n * and edge orientations)\n */\n // transfers edges from each graph and finds definite noncolliders\n transferLocal(graph);\n // adds edges for variables never jointly measured\n for (NodePair pair : nonIntersection(graph)) {\n graph.addEdge(new Edge(pair.getFirst(), pair.getSecond(), Endpoint.CIRCLE, Endpoint.CIRCLE));\n }\n TetradLogger.getInstance().log(\"info\", \"Steps 1-2: \" + (System.currentTimeMillis() - steps) / 1000. + \"s\");\n System.out.println(\"step2\");\n System.out.println(graph);\n\n /*\n * Step 3\n *\n * Branch and prune step that blocks problematic undirectedPaths, possibly d-connecting undirectedPaths\n */\n steps = System.currentTimeMillis();\n Queue<Graph> searchPags = new LinkedList<>();\n // place graph constructed in step 2 into the queue\n searchPags.offer(graph);\n // get d-separations and d-connections\n List<Set<IonIndependenceFacts>> sepAndAssoc = findSepAndAssoc(graph);\n this.separations = sepAndAssoc.get(0);\n this.associations = sepAndAssoc.get(1);\n Map<Collection<Node>, List<PossibleDConnectingPath>> paths;\n// Queue<Graph> step3PagsSet = new LinkedList<Graph>();\n HashSet<Graph> step3PagsSet = new HashSet<>();\n Set<Graph> reject = new HashSet<>();\n // if no d-separations, nothing left to search\n if (separations.isEmpty()) {\n // makes orientations preventing definite noncolliders from becoming colliders\n // do final orientations\n// doFinalOrientation(graph);\n step3PagsSet.add(graph);\n }\n // sets length to iterate once if search over path lengths not enabled, otherwise set to 2\n int numNodes = graph.getNumNodes();\n int pl = numNodes - 1;\n if (pathLengthSearch) {\n pl = 2;\n }\n // iterates over path length, then adjacencies\n for (int l = pl; l < numNodes; l++) {\n if (pathLengthSearch) {\n TetradLogger.getInstance().log(\"info\", \"Braching over path lengths: \" + l + \" of \" + (numNodes - 1));\n }\n int seps = separations.size();\n int currentSep = 1;\n int numAdjacencies = separations.size();\n for (IonIndependenceFacts fact : separations) {\n if (adjacencySearch) {\n TetradLogger.getInstance().log(\"info\", \"Braching over path nonadjacencies: \" + currentSep + \" of \" + numAdjacencies);\n }\n seps--;\n // uses two queues to keep up with which PAGs are being iterated and which have been\n // accepted to be iterated over in the next iteration of the above for loop\n searchPags.addAll(step3PagsSet);\n recGraphs.add(searchPags.size());\n step3PagsSet.clear();\n while (!searchPags.isEmpty()) {\n System.out.println(\"ION Step 3 size: \" + searchPags.size());\n double currentUsage = Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory();\n if (currentUsage > maxMemory) maxMemory = currentUsage;\n // deques first PAG from searchPags\n Graph pag = searchPags.poll();\n // Part 3.a - finds possibly d-connecting undirectedPaths between each pair of nodes\n // known to be d-separated\n List<PossibleDConnectingPath> dConnections = new ArrayList<>();\n // checks to see if looping over adjacencies\n if (adjacencySearch) {\n for (Collection<Node> conditions : fact.getZ()) {\n // checks to see if looping over path lengths\n if (pathLengthSearch) {\n dConnections.addAll(PossibleDConnectingPath.findDConnectingPathsOfLength\n (pag, fact.getX(), fact.getY(), conditions, l));\n } else {\n dConnections.addAll(PossibleDConnectingPath.findDConnectingPaths\n (pag, fact.getX(), fact.getY(), conditions));\n }\n }\n } else {\n for (IonIndependenceFacts allfact : separations) {\n for (Collection<Node> conditions : allfact.getZ()) {\n // checks to see if looping over path lengths\n if (pathLengthSearch) {\n dConnections.addAll(PossibleDConnectingPath.findDConnectingPathsOfLength\n (pag, allfact.getX(), allfact.getY(), conditions, l));\n } else {\n dConnections.addAll(PossibleDConnectingPath.findDConnectingPaths\n (pag, allfact.getX(), allfact.getY(), conditions));\n }\n }\n }\n }\n // accept PAG go to next PAG if no possibly d-connecting undirectedPaths\n if (dConnections.isEmpty()) {\n// doFinalOrientation(pag);\n// Graph p = screenForKnowledge(pag);\n// if (p != null) step3PagsSet.add(p);\n step3PagsSet.add(pag);\n continue;\n }\n // maps conditioning sets to list of possibly d-connecting undirectedPaths\n paths = new HashMap<>();\n for (PossibleDConnectingPath path : dConnections) {\n List<PossibleDConnectingPath> p = paths.get(path.getConditions());\n if (p == null) {\n p = new LinkedList<>();\n }\n p.add(path);\n paths.put(path.getConditions(), p);\n }\n // Part 3.b - finds minimal graphical changes to block possibly d-connecting undirectedPaths\n List<Set<GraphChange>> possibleChanges = new ArrayList<>();\n for (Set<GraphChange> changes : findChanges(paths)) {\n Set<GraphChange> newChanges = new HashSet<>();\n for (GraphChange gc : changes) {\n boolean okay = true;\n for (Triple collider : gc.getColliders()) {\n\n if (pag.isUnderlineTriple(collider.getX(), collider.getY(), collider.getZ())) {\n okay = false;\n break;\n }\n\n }\n if (!okay) {\n continue;\n }\n for (Triple collider : gc.getNoncolliders()) {\n if (pag.isDefCollider(collider.getX(), collider.getY(), collider.getZ())) {\n okay = false;\n break;\n }\n }\n if (okay) {\n newChanges.add(gc);\n }\n }\n if (!newChanges.isEmpty()) {\n possibleChanges.add(newChanges);\n } else {\n possibleChanges.clear();\n break;\n }\n }\n float starthitset = System.currentTimeMillis();\n Collection<GraphChange> hittingSets = IonHittingSet.findHittingSet(possibleChanges);\n recHitTimes.add((System.currentTimeMillis() - starthitset) / 1000.);\n // Part 3.c - checks the newly constructed graphs from 3.b and rejects those that\n // cycles or produce independencies known not to occur from the input PAGs or\n // include undirectedPaths from definite nonancestors\n for (GraphChange gc : hittingSets) {\n boolean badhittingset = false;\n for (Edge edge : gc.getRemoves()) {\n Node node1 = edge.getNode1();\n Node node2 = edge.getNode2();\n Set<Triple> triples = new HashSet<>();\n triples.addAll(gc.getColliders());\n triples.addAll(gc.getNoncolliders());\n if (triples.size() != (gc.getColliders().size() + gc.getNoncolliders().size())) {\n badhittingset = true;\n break;\n }\n for (Triple triple : triples) {\n if (node1.equals(triple.getY())) {\n if (node2.equals(triple.getX()) ||\n node2.equals(triple.getZ())) {\n badhittingset = true;\n break;\n }\n }\n if (node2.equals(triple.getY())) {\n if (node1.equals(triple.getX()) ||\n node1.equals(triple.getZ())) {\n badhittingset = true;\n break;\n }\n }\n }\n if (badhittingset) {\n break;\n }\n for (NodePair pair : gc.getOrients()) {\n if ((node1.equals(pair.getFirst()) && node2.equals(pair.getSecond())) ||\n (node2.equals(pair.getFirst()) && node1.equals(pair.getSecond()))) {\n badhittingset = true;\n break;\n }\n }\n if (badhittingset) {\n break;\n }\n }\n if (!badhittingset) {\n for (NodePair pair : gc.getOrients()) {\n for (Triple triple : gc.getNoncolliders()) {\n if (pair.getSecond().equals(triple.getY())) {\n if (pair.getFirst().equals(triple.getX()) &&\n pag.getEndpoint(triple.getZ(), triple.getY()).equals(Endpoint.ARROW)) {\n badhittingset = true;\n break;\n\n }\n if (pair.getFirst().equals(triple.getZ()) &&\n pag.getEndpoint(triple.getX(), triple.getY()).equals(Endpoint.ARROW)) {\n badhittingset = true;\n break;\n }\n }\n if (badhittingset) {\n break;\n }\n }\n if (badhittingset) {\n break;\n }\n }\n }\n if (badhittingset) {\n continue;\n }\n Graph changed = gc.applyTo(pag);\n // if graph change has already been rejected move on to next graph\n if (reject.contains(changed)) {\n continue;\n }\n // if graph change has already been accepted move on to next graph\n if (step3PagsSet.contains(changed)) {\n continue;\n }\n // reject if null, predicts false independencies or has cycle\n if (predictsFalseIndependence(associations, changed)\n || changed.existsDirectedCycle()) {\n reject.add(changed);\n }\n // makes orientations preventing definite noncolliders from becoming colliders\n // do final orientations\n// doFinalOrientation(changed);\n // now add graph to queue\n\n// Graph p = screenForKnowledge(changed);\n// if (p != null) step3PagsSet.add(p);\n step3PagsSet.add(changed);\n }\n }\n // exits loop if not looping over adjacencies\n if (!adjacencySearch) {\n break;\n }\n }\n }\n TetradLogger.getInstance().log(\"info\", \"Step 3: \" + (System.currentTimeMillis() - steps) / 1000. + \"s\");\n Queue<Graph> step3Pags = new LinkedList<>(step3PagsSet);\n\n /*\n * Step 4\n *\n * Finds redundant undirectedPaths and uses this information to expand the list\n * of possible graphs\n */\n steps = System.currentTimeMillis();\n Map<Edge, Boolean> necEdges;\n Set<Graph> outputPags = new HashSet<>();\n\n while (!step3Pags.isEmpty()) {\n Graph pag = step3Pags.poll();\n necEdges = new HashMap<>();\n // Step 4.a - if x and y are known to be unconditionally associated and there is\n // exactly one trek between them, mark each edge on that trek as necessary and\n // make the tiples on the trek definite noncolliders\n // initially mark each edge as not necessary\n for (Edge edge : pag.getEdges()) {\n necEdges.put(edge, false);\n }\n // look for unconditional associations\n for (IonIndependenceFacts fact : associations) {\n for (List<Node> nodes : fact.getZ()) {\n if (nodes.isEmpty()) {\n List<List<Node>> treks = treks(pag, fact.x, fact.y);\n if (treks.size() == 1) {\n List<Node> trek = treks.get(0);\n List<Triple> triples = new ArrayList<>();\n for (int i = 1; i < trek.size(); i++) {\n // marks each edge in trek as necessary\n necEdges.put(pag.getEdge(trek.get(i - 1), trek.get(i)), true);\n if (i == 1) {\n continue;\n }\n // makes each triple a noncollider\n pag.addUnderlineTriple(trek.get(i - 2), trek.get(i - 1), trek.get(i));\n }\n }\n // stop looping once the empty set is found\n break;\n }\n }\n }\n // Part 4.b - branches by generating graphs for every combination of removing\n // redundant undirectedPaths\n boolean elimTreks;\n // checks to see if removing redundant undirectedPaths eliminates every trek between\n // two variables known to be nconditionally assoicated\n List<Graph> possRemovePags = possRemove(pag, necEdges);\n double currentUsage = Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory();\n if (currentUsage > maxMemory) maxMemory = currentUsage;\n for (Graph newPag : possRemovePags) {\n elimTreks = false;\n // looks for unconditional associations\n for (IonIndependenceFacts fact : associations) {\n for (List<Node> nodes : fact.getZ()) {\n if (nodes.isEmpty()) {\n if (treks(newPag, fact.x, fact.y).isEmpty()) {\n elimTreks = true;\n }\n // stop looping once the empty set is found\n break;\n }\n }\n }\n // add new PAG to output unless a necessary trek has been eliminated\n if (!elimTreks) {\n outputPags.add(newPag);\n }\n }\n }\n outputPags = removeMoreSpecific(outputPags);\n// outputPags = applyKnowledge(outputPags);\n\n TetradLogger.getInstance().log(\"info\", \"Step 4: \" + (System.currentTimeMillis() - steps) / 1000. + \"s\");\n\n /*\n * Step 5\n *\n * Generate the Markov equivalence classes for graphs and accept only\n * those that do not predict false d-separations\n */\n steps = System.currentTimeMillis();\n Set<Graph> outputSet = new HashSet<>();\n for (Graph pag : outputPags) {\n Set<Triple> unshieldedPossibleColliders = new HashSet<>();\n for (Triple triple : getPossibleTriples(pag)) {\n if (!pag.isAdjacentTo(triple.getX(), triple.getZ())) {\n unshieldedPossibleColliders.add(triple);\n }\n }\n\n PowerSet<Triple> pset = new PowerSet<>(unshieldedPossibleColliders);\n for (Set<Triple> set : pset) {\n Graph newGraph = new EdgeListGraph(pag);\n for (Triple triple : set) {\n newGraph.setEndpoint(triple.getX(), triple.getY(), Endpoint.ARROW);\n newGraph.setEndpoint(triple.getZ(), triple.getY(), Endpoint.ARROW);\n }\n doFinalOrientation(newGraph);\n }\n for (Graph outputPag : finalResult) {\n if (!predictsFalseIndependence(associations, outputPag)) {\n Set<Triple> underlineTriples = new HashSet<>(outputPag.getUnderLines());\n for (Triple triple : underlineTriples) {\n outputPag.removeUnderlineTriple(triple.getX(), triple.getY(), triple.getZ());\n }\n outputSet.add(outputPag);\n }\n }\n }\n\n// outputSet = applyKnowledge(outputSet);\n outputSet = checkPaths(outputSet);\n\n output.addAll(outputSet);\n TetradLogger.getInstance().log(\"info\", \"Step 5: \" + (System.currentTimeMillis() - steps) / 1000. + \"s\");\n runtime = ((System.currentTimeMillis() - start) / 1000.);\n logGraphs(\"\\nReturning output (\" + output.size() + \" Graphs):\", output);\n double currentUsage = Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory();\n if (currentUsage > maxMemory) maxMemory = currentUsage;\n return output;\n }",
"public static void main(String args[]) {\n int V = 4;\n Graph g = new Graph(V);\n g.addEdge(0, 1);\n g.addEdge(0, 2);\n g.addEdge(1, 2);\n g.addEdge(2, 0);\n g.addEdge(2, 3);\n g.addEdge(3, 3);\n\n int src = 1;\n int dest = 3;\n boolean[] visited = new boolean[V];\n\n // To store the complete path between source and destination\n Stack<Integer> path1 = new Stack<>();\n\n if (hasPathDFS(g, src, dest, visited, path1)) {\n System.out.println(\"There is a path from \" + src + \" to \" + dest);\n System.out.println(\"The complete path is \" + path1);\n } else System.out.println(\"There is no path from \" + src + \" to \" + dest);\n\n src = 3;\n dest = 1;\n // To store the complete path between source and destination\n Stack<Integer> path2 = new Stack<>();\n\n if (hasPathDFS(g, src, dest, visited, path2)) System.out.println(\"There is a path from \" + src + \" to \" + dest);\n else System.out.println(\"There is no path from \" + src + \" to \" + dest);\n\n // total number of nodes in the graph (labeled from 0 to 7)\n int n = 8;\n\n // List of graph edges as per the above diagram\n Graph g2 = new Graph(n);\n /**\n * There is a path from 1 to 3\n * The complete path is [1, 2, 3]\n * There is no path from 3 to 1\n * There is a path from 0 to 7\n * The complete path is [0, 3, 4, 6, 7]\n */\n\n g2.addEdge(0, 3);\n g2.addEdge(1, 0);\n g2.addEdge(1, 2);\n g2.addEdge(1, 4);\n g2.addEdge(2, 7);\n g2.addEdge(3, 4);\n g2.addEdge(3, 5);\n g2.addEdge(4, 3);\n g2.addEdge(4, 6);\n g2.addEdge(5, 6);\n g2.addEdge(6, 7);\n\n // source and destination vertex\n src = 0;\n dest = 7;\n\n // To store the complete path between source and destination\n Stack<Integer> path = new Stack<>();\n boolean[] visited2 = new boolean[n];\n\n if (hasPathDFS(g2, src, dest, visited2, path)) {\n System.out.println(\"There is a path from \" + src + \" to \" + dest);\n System.out.println(\"The complete path is \" + path);\n } else System.out.println(\"There is no path from \" + src + \" to \" + dest);\n\n\n }",
"private void traverseHelper(Graph<VLabel, ELabel>.Vertex v) {\n PriorityQueue<Graph<VLabel, ELabel>.Vertex> fringe =\n new PriorityQueue<Graph<VLabel,\n ELabel>.Vertex>(_graph.vertexSize(), _comparator);\n fringe.add(v);\n while (fringe.size() > 0) {\n Graph<VLabel, ELabel>.Vertex curV = fringe.poll();\n try {\n if (!_marked.contains(curV)) {\n _marked.add(curV);\n visit(curV);\n for (Graph<VLabel, ELabel>.Edge e: _graph.outEdges(curV)) {\n if (!_marked.contains(e.getV(curV))) {\n preVisit(e, curV);\n fringe.add(e.getV(curV));\n }\n }\n }\n } catch (StopException e) {\n _finalVertex = curV;\n return;\n }\n }\n }",
"public boolean augmentedPath(){\n QueueMaxHeap<GraphNode> queue = new QueueMaxHeap<>();\n graphNode[0].visited = true;//this is so nodes are not chosen again\n queue.add(graphNode[0]);\n boolean check = false;\n while(!queue.isEmpty()){//goes through and grabs each node and visits that nodes successors, will stop when reaches T or no flow left in system from S to T\n GraphNode node = queue.get();\n for(int i = 0; i < node.succ.size(); i++){//this will get all the nodes successors\n GraphNode.EdgeInfo info = node.succ.get(i);\n int id = info.to;\n if(!graphNode[id].visited && graph.flow[info.from][info.to][1] != 0){//this part just make sure it hasn't been visited and that it still has flow\n graphNode[id].visited = true;\n graphNode[id].parent = info.from;\n queue.add(graphNode[id]);\n if(id == t){//breaks here because it has found the last node\n check = true;\n setNodesToUnvisited();\n break;\n }\n }\n }\n if(check){\n break;\n }\n }\n return queue.isEmpty();\n }",
"public void dfs(DSAGraphVertex vx, DSAStack visited, DSAQueue queue)\n\t{\n\t\ttry {\n\t\t\tif(vx != null) //base case if it's null end recursion\n\t\t\t{\n\t\t\t\tvisited.push(vx); //push onto visited stack\n\n\t\t\t\tIterator<DSAGraphVertex> itr = vx.getAdjacent().iterator();\n\n\t\t\t\tdo{\n\t\t\t\t\twhile (itr.hasNext())\n\t\t\t\t\t{\n\t\t\t\t\t\tvx = itr.next();\n\t\t\t\t\t\tif(!vx.getVisited()) //if not visited traverse here\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tqueue.enqueue(vx); //adds to output queue\n\t\t\t\t\t\t\tvx.setVisited(); //sets to visited\n\t\t\t\t\t\t\tdfs(vx, visited, queue);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tvisited.pop();\n\n\t\t\t\t} while(!visited.isEmpty());\n\t\t\t}\n\t\t}\n\t\tcatch (IllegalArgumentException e) //catches empty stack exceptions\n\t\t{\n\t\t\t//System.out.println(e.getMessage());\n\t\t}\n\n\t}",
"@Override\r\n\tpublic boolean BFS(E src) {\r\n\t\tif(containsVertex(src)) {\r\n\t\t\tVertex<E> s = vertices.get(src);\r\n\t\t\tlastSrc = s;\r\n\t\t\tvertices.forEach((E e, Vertex<E> u) -> {\r\n\t\t\t\tu.setColor(Color.WHITE);\r\n\t\t\t\tu.setDistance(Integer.MAX_VALUE);\r\n\t\t\t\tu.setPredecessor(null);\r\n\t\t\t});\r\n\t\t\ts.setColor(Color.GRAY);\r\n\t\t\ts.setDistance(0);\r\n\t\t\t//s.predecessor is already null so skip that step\r\n\t\t\tQueue<Vertex<E>> queue = new Queue<>();\r\n\t\t\tqueue.enqueue(s);\r\n\t\t\ttry {\r\n\t\t\t\twhile(!queue.isEmpty()) {\r\n\t\t\t\t\tVertex<E> u = queue.dequeue();\r\n\t\t\t\t\tArrayList<Edge<E>> adj = adjacencyLists.get(u.getElement());\r\n\t\t\t\t\tfor(Edge<E> ale: adj) {\r\n\t\t\t\t\t\tVertex<E> v = vertices.get(ale.getDst());\r\n\t\t\t\t\t\tif(v.getColor() == Color.WHITE) {\r\n\t\t\t\t\t\t\tv.setColor(Color.GRAY);\r\n\t\t\t\t\t\t\tv.setDistance(u.getDistance()+1);\r\n\t\t\t\t\t\t\tv.setPredecessor(u);\r\n\t\t\t\t\t\t\tqueue.enqueue(v);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tu.setColor(Color.BLACK);\r\n\t\t\t\t}\r\n\t\t\t} catch (Exception emptyQueueException) {\r\n\t\t\t\t//-_-\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"public void dfs (int start) {\n vertexList[start].wasVisited = true; // mark it\n print(start); stack.push(start);\n while (!stack.isEmpty()) {\n int b = getNextUnvisitedNeighbor(stack.peek());\n if (b==-1) stack.pop(); // no unvisited neighbor;\n else {\n vertexList[b].wasVisited = true;\n print(b); stack.push(b);\n }\n }\n // clear wasVisited marks\n }",
"void Graph::BFS(int s)\n{\n bool *visited = new bool[V];\n for(int i = 0; i < V; i++)\n visited[i] = false;\n \n // Create a queue for BFS\n list<int> queue;\n \n // Mark the current node as visited and enqueue it\n visited[s] = true;\n queue.push_back(s);\n \n // 'i' will be used to get all adjacent vertices of a vertex\n list<int>::iterator i;\n \n while(!queue.empty())\n {\n // Dequeue a vertex from queue and print it\n s = queue.front();\n cout << s << \" \";\n queue.pop_front();\n \n // Get all adjacent vertices of the dequeued vertex s\n // If a adjacent has not been visited, then mark it visited\n // and enqueue it\n for(i = adj[s].begin(); i != adj[s].end(); ++i)\n {\n if(!visited[*i])\n {\n visited[*i] = true;\n queue.push_back(*i);\n }\n }\n }",
"@Override\n List<NodeData> pathFind() throws NoPathException {\n System.out.println(\"Starting Scenic\");\n\n frontier.add(start);\n\n while(!frontier.isEmpty()) {\n StarNode current = frontier.getLast();\n frontier.removeLast(); // pop the priority queue\n if(current.getXCoord() == goal.getXCoord() && current.getYCoord() == goal.getYCoord()) {\n // If we are at the goal, we need to backtrack through the shortest path\n System.out.println(\"At target!\");\n finalList.add(current); // we have to add the goal to the path before we start backtracking\n while(!(current.getXCoord() == start.getXCoord() && current.getYCoord() == start.getYCoord())) {\n finalList.add(current.getPreviousNode());\n current = current.getPreviousNode();\n System.out.println(current.getNodeID());\n }\n return finalList;\n }\n else {\n // we need to get all the neighbor nodes, identify their costs, and put them into the queue\n LinkedList<StarNode> neighbors = current.getNeighbors();\n // we also need to remove the previous node from the list of neighbors because we do not want to backtrack\n neighbors.remove(current.getPreviousNode());\n\n for (StarNode newnode : neighbors) {\n int nodePlace = this.listContainsId(frontier, newnode);\n if(nodePlace > -1) {\n if (frontier.get(nodePlace).getF() > actionCost(newnode) + distanceToGo(newnode, goal)) {\n System.out.println(\"Here\");\n frontier.remove(frontier.get(nodePlace));\n newnode.setPreviousNode(current);\n frontier.add(newnode);\n newnode.setF(actionCost(newnode) + distanceToGo(newnode, goal));\n }\n }\n else {\n newnode.setPreviousNode(current);\n frontier.add(newnode);\n newnode.setF(actionCost(newnode) + distanceToGo(newnode, goal));\n }\n\n // This fixes the problem with infinitely looping elevators (I hope)\n if(current.getNodeType().equals(\"ELEV\") && newnode.getNodeType().equals(\"ELEV\")) {\n for (Iterator<StarNode> iterator = newnode.neighbors.iterator(); iterator.hasNext();) {\n StarNode newneighbor = iterator.next();\n if (newneighbor.getNodeType().equals(\"ELEV\")) {\n // Remove the current element from the iterator and the list.\n iterator.remove();\n }\n }\n }\n if(current.getNodeType().equals(\"STAI\") && newnode.getNodeType().equals(\"STAI\")) {\n for (Iterator<StarNode> iterator = newnode.neighbors.iterator(); iterator.hasNext();) {\n StarNode newneighbor = iterator.next();\n if (newneighbor.getNodeType().equals(\"STAI\")) {\n // Remove the current element from the iterator and the list.\n iterator.remove();\n }\n }\n }\n // this is where the node is put in the right place in the queue\n Collections.sort(frontier);\n }\n }\n }\n throw new NoPathException(start.getLongName(), goal.getLongName());\n }",
"private void reachable() {\r\n\r\n\t\tSortedSet<String> keys = new TreeSet<String>(vertexMap.keySet());\r\n\t\tIterator it = keys.iterator();\r\n\t\twhile (it.hasNext()) {\r\n\t\t\tVertex v = vertexMap.get(it.next());\r\n\t\t\tif (v.isStatus()) {\r\n\t\t\t\tSystem.out.println(v.getName());\r\n\t\t\t\tbfs(v);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"private void DFS(Vertex start, Set<Vertex> visited, Stack<Vertex> stack) {\r\n\t\t// if(visited.contains(start)) return;\r\n\r\n\t\t// Mark the current node as visited and push it\r\n\t\tvisited.add(start);\r\n\t\tstack.push(start);\r\n\r\n\t\tVertex currentNode;\r\n\t\tSet<Vertex> neighbors;\r\n\r\n\t\twhile (stack.size() > 0) {\r\n\t\t\t// Pop a vertex from stack and print it\r\n\t\t\tcurrentNode = stack.pop();\r\n\r\n\t\t\tSystem.out.print(currentNode + \" \");\r\n\r\n\t\t\t// Get all adjacent vertices of the dequeued vertex s\r\n\t\t\t// If a adjacent has not been visited, then mark it\r\n\t\t\t// visited and enqueue it\r\n\t\t\tneighbors = currentNode.getNeighbors();\r\n\r\n\t\t\tfor (Vertex n : neighbors) {\r\n\t\t\t\tif (!visited.contains(n)) {\r\n\t\t\t\t\tvisited.add(n);\r\n\t\t\t\t\tstack.push(n);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"private void BFS() {\n\n int fruitIndex = vertices.size()-1;\n Queue<GraphNode> bfsQueue = new LinkedList<>();\n bfsQueue.add(vertices.get(0));\n while (!bfsQueue.isEmpty()) {\n GraphNode pollNode = bfsQueue.poll();\n pollNode.setSeen(true);\n for (GraphNode node : vertices) {\n if (node.isSeen()) {\n continue;\n } else if (node.getID() == pollNode.getID()) {\n continue;\n } else if (!los.isIntersects(pollNode.getPoint(), node.getPoint())) {\n pollNode.getNeigbours().add(node);\n if (node.getID() != fruitIndex) {\n bfsQueue.add(node);\n node.setSeen(true);\n }\n }\n }\n }\n }",
"public void bft() {\r\n\t\tHashMap<String, Boolean> processed = new HashMap<>();\r\n\t\tLinkedList<Pair> queue = new LinkedList<>();\r\n\r\n\t\tArrayList<String> vnames = new ArrayList<>(vces.keySet());\r\n\t\tfor (String vname : vnames) {\r\n\t\t\tif (processed.containsKey(vname)) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tPair rootpair = new Pair(vname, vname);\r\n\t\t\tqueue.addLast(rootpair);\r\n\t\t\twhile (queue.size() != 0) {\r\n\t\t\t\t// 1. removeFirst\r\n\t\t\t\tPair rp = queue.removeFirst();\r\n\r\n\t\t\t\t// 2. check if processed, mark if not\r\n\t\t\t\tif (processed.containsKey(rp.vname)) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tprocessed.put(rp.vname, true);\r\n\r\n\t\t\t\t// 3. Check, if an edge is found\r\n\t\t\t\tSystem.out.println(rp.vname + \" via \" + rp.psf);\r\n\r\n\t\t\t\t// 4. Add the unprocessed nbrs back\r\n\t\t\t\tArrayList<String> nbrnames = new ArrayList<>(rp.vtx.nbrs.keySet());\r\n\t\t\t\tfor (String nbrname : nbrnames) {\r\n\t\t\t\t\tif (!processed.containsKey(nbrname)) {\r\n\t\t\t\t\t\tPair np = new Pair(nbrname, rp.psf + nbrname);\r\n\t\t\t\t\t\tqueue.addLast(np);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"@Override\r\n\tpublic void DFS(E src) {\r\n\t\tif(containsVertex(src)) {\r\n\t\t\tvertices.forEach((E e, Vertex<E> u) -> {\r\n\t\t\t\tu.setDiscovered(0);\r\n\t\t\t\tu.setFinished(0);\r\n\t\t\t\tu.setColor(Color.WHITE);\r\n\t\t\t\tu.setPredecessor(null);\r\n\t\t\t});\r\n\t\t\tDFStime = 1;\r\n\t\t\tVertex<E> s = vertices.get(src);\r\n\t\t\ts.setColor(Color.GRAY);\r\n\t\t\ts.setDiscovered(DFStime);\r\n\t\t\t//s.predecessor is already null so skip that step\r\n\t\t\tStack<Vertex<E>> stack = new Stack<>();\r\n\t\t\tstack.push(s);\r\n\t\t\twhile(!stack.isEmpty()) {\r\n\t\t\t\tVertex<E> u = stack.pop();\r\n\t\t\t\tArrayList<Edge<E>> adj = adjacencyLists.get(u.getElement());\r\n\t\t\t\tfor(Edge<E> ale: adj) {\r\n\t\t\t\t\tVertex<E> v = vertices.get(ale.getDst());\r\n\t\t\t\t\tif(v.getColor() == Color.WHITE) {\r\n\t\t\t\t\t\tDFStime++;\r\n\t\t\t\t\t\tv.setColor(Color.GRAY);\r\n\t\t\t\t\t\tv.setDiscovered(DFStime);\r\n\t\t\t\t\t\tv.setPredecessor(u);\r\n\t\t\t\t\t\tstack.push(v);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tu.setColor(Color.BLACK);\r\n\t\t\t\tDFStime++;\r\n\t\t\t\tu.setFinished(DFStime);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"private void dfsVisit(Node node) {\n\t\tStack<Node>stack = new Stack<>();\r\n\t\tstack.push(node); //add source node to queue\r\n\t\twhile(!stack.isEmpty()) {\r\n\t\t\tNode presentNode = stack.pop();\r\n\t\t\tpresentNode.setVisited(true);\r\n\t\t\tSystem.out.print(presentNode.getName()+\" \");\r\n\t\t\tfor(Node neighbor: presentNode.getNeighbors()) { //for each neighbor of present node\r\n\t\t\t\tif(!neighbor.isVisited()) { //if neighbor is not visited then add it to queue\r\n\t\t\t\t\tstack.push(neighbor);\r\n\t\t\t\t\tneighbor.setVisited(true);\r\n\t\t\t\t}\r\n\t\t\t}//end of for loop\r\n\t\t}//end of while loop\r\n\t\t\r\n\t}",
"@Override\n\t\t\tprotected Void doInBackground() throws Exception {\n\t\t\t\tif (!verifyStartEndVerticesExist(true, false)) {\n\t\t\t\t\tsetRunning(false);\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Queue\n\t\t\t\tQueue<Vertex> q = new LinkedList<Vertex>();\n\t\t\t\t\n\t\t\t\t// set start vertex as visited\n\t\t\t\tpanel.getStartVertex().setVisited(true);\n\t\t\t\tq.add(panel.getStartVertex());\n\t\t\t\twhile (!q.isEmpty()) {\n\t\t\t\t\tVertex v = q.remove();\n\t\t\t\t\tv.setSelected(true);\n\t\t\t\t\tpublish();\n\t\t\t\t\tThread.sleep(panel.getCurrentDelay());\n\t\t\t\t\tfor (Vertex vertex : getNeighbors(v)) {\n\t\t\t\t\t\tvertex.setHighlighted();\n\t\t\t\t\t\tpublish();\n\t\t\t\t\t\tThread.sleep(panel.getCurrentDelay());\n\t\t\t\t\t\tif (!vertex.isVisited()) {\n\t\t\t\t\t\t\tvertex.setVisited(true);\n\t\t\t\t\t\t\tvertex.setParent(v);\n\t\t\t\t\t\t\tq.add(vertex);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tv.setSelected(false);\n\t\t\t\t\tv.setHighlighted();\n\t\t\t\t\tpublish();\n\t\t\t\t\tThread.sleep(panel.getCurrentDelay());\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"BFS Finished!\");\n\t\t\t\tpublish();\n\t\t\t\tsetRunning(false);\n\t\t\t\treturn null;\n\t\t\t}",
"public void breadthFirstTraverse() {\n\t\t// track whether vertex was visited\n\t\tHashMap<Integer, Boolean> visited = buildVisited();\n\t\t// store neighbors\n\t\tQueue<Integer> queue = new LinkedList<Integer>();\n\n\t\t// arbitrarily add first element\n\t\tInteger current = (Integer) edges.keySet().toArray()[0];\n\t\tqueue.add(current);\n\n\t\twhile (queue.peek() != null) {\n\n\t\t\tcurrent = queue.remove();\n\t\t\tSystem.out.println(\"current: \" + current);\n\t\t\tvisited.put(current, true);\n\n\t\t\tfor (Integer neighbor: edges.get(current)) {\n\t\t\t\tif (!visited.get(neighbor)) {\n\t\t\t\t\tqueue.add(neighbor);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"void topologicalSort(){ \n Stack<Integer> stack = new Stack<Integer>(); \n \n // Mark all the vertices as not visited \n boolean visited[] = new boolean[V]; \n for (int i = 0; i < V; i++) \n visited[i] = false; \n \n // Call the recursive helper function to store Topological Sort starting from all vertices one by one \n for (int i = 0; i < V; i++) \n if (visited[i] == false) \n topologicalSortUtil(i, visited, stack); \n \n // Print contents of stack \n while (stack.empty()==false) \n System.out.print(stack.pop() + \" \"); \n }",
"void DFS(int head) {\n //visited boolean array maintained to keep track of visited nodes and to avoid infinite looping\n boolean visited[] = new boolean[V+1];\n if(visited[head] == false)\n DFS(head,visited);\n\n System.out.println(V-connected);\n }",
"public void breadthFirstSearch(int vertexIndex) {\n Queue<Integer> queue = new LinkedList<Integer>();\n vertexList[vertexIndex].wasVisited = true;\n displayVertex(vertexIndex);\n int unvisitedIndex;\n do {\n\n do {\n unvisitedIndex = getAdjacentUnvisitedVertexIndex(vertexIndex);\n if(unvisitedIndex != -1) {\n vertexList[unvisitedIndex].wasVisited = true;\n displayVertex(unvisitedIndex);\n queue.add(unvisitedIndex);\n\n }\n } while(unvisitedIndex != -1);\n if(!queue.isEmpty()) {\n vertexIndex = queue.remove();\n\n }\n\n } while(!queue.isEmpty());\n\n for (int i = 0; i < vertexCount; i++) {\n vertexList[i].wasVisited = false;\n\n }\n }",
"public void dfs() {\n\t\tfor (Vertice v : vertices) {\n\t\t\tv.setVisited(false);\n\t\t}\n\t\tfor (Vertice v : vertices) {\n\t\t\tif (!v.getVisited()) {\n\t\t\t\tVisitar(v, -1);\n\t\t\t}\n\t\t}\n\t}",
"private void DFS(Vertex x) {\r\n\t\tseen[vertices.indexOf(x)] = true;\r\n\t\tSystem.out.print(x.label + \" \");\r\n\t\tfor (int i = 0; i < x.outList.size(); i++) {\r\n\t\t\tif (!seen[vertices.indexOf(x.outList.get(i).vertex)]) {\r\n\t\t\t\tDFS(x);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public static boolean Util(Graph<V, DefaultEdge> g, ArrayList<V> set, int colors, HashMap<String, Integer> coloring, int i, ArrayList<arc> arcs, Queue<arc> agenda)\n {\n /*if (i == set.size())\n {\n System.out.println(\"reached max size\");\n return true;\n }*/\n if (set.isEmpty())\n {\n System.out.println(\"Set empty\");\n return true;\n }\n //V currentVertex = set.get(i);\n\n /*System.out.println(\"vertices and mrv:\");\n V start = g.vertexSet().stream().filter(V -> V.getID().equals(\"0\")).findAny().orElse(null);\n Iterator<V> iterator = new DepthFirstIterator<>(g, start);\n while (iterator.hasNext()) {\n V v = iterator.next();\n System.out.println(\"vertex \" + v.getID() + \" has mrv of \" + v.mrv);\n }*/\n\n // Find vertex with mrv\n V currentVertex;\n int index = -1;\n int mrv = colors + 10;\n for (int it = 0; it < set.size(); it++)\n {\n if (set.get(it).mrv < mrv)\n {\n mrv = set.get(it).mrv;\n index = it;\n }\n }\n currentVertex = set.remove(index);\n\n //System.out.println(\"Got vertex: \" + currentVertex.getID());\n\n\n // Try to assign that vertex a color\n for (int c = 0; c < colors; c++)\n {\n currentVertex.color = c;\n if (verifyColor(g, currentVertex))\n {\n\n // We can assign color c to vertex v\n // See if AC3 is satisfied\n /*currentVertex.domain.clear();\n currentVertex.domain.add(c);*/\n if (!agenda.isEmpty()) numAgenda++;\n while(!agenda.isEmpty())\n {\n arc temp = agenda.remove();\n\n // Make sure there exists v1, v2, in V1, V2, such that v1 != v2\n V v1 = g.vertexSet().stream().filter(V -> V.getID().equals(temp.x)).findAny().orElse(null);\n V v2 = g.vertexSet().stream().filter(V -> V.getID().equals(temp.y)).findAny().orElse(null);\n\n\n\n // No solution exists in this branch if a domain is empty\n //if ((v1.domain.isEmpty()) || (v2.domain.isEmpty())) return false;\n\n if (v2.color == -1) continue;\n else\n {\n Boolean[] toRemove = new Boolean[colors];\n Boolean domainChanged = false;\n for (Integer it : v1.domain)\n {\n if (it == v2.color)\n {\n toRemove[it] = true;\n }\n }\n for (int j = 0; j < toRemove.length; j++)\n {\n if ((toRemove[j] != null))\n {\n v1.domain.remove(j);\n domainChanged = true;\n }\n }\n // Need to check constraints with v1 on the right hand side\n if (domainChanged)\n {\n for (arc it : arcs)\n {\n // Add arc back to agenda to check constraints again\n if (it.y.equals(v1.getID()))\n {\n agenda.add(it);\n }\n }\n }\n }\n if ((v1.domain.isEmpty()) || (v2.domain.isEmpty()))\n {\n System.out.println(\"returning gfalse here\");\n return false;\n }\n }\n\n // Reset agenda to check arc consistency on next iteration\n for (int j = 0; j < arcs.size(); j++)\n {\n agenda.add(arcs.get(i));\n }\n\n\n //System.out.println(\"Checking if vertex \" + currentVertex.getID() + \" can be assigned color \" + c);\n coloring.put(currentVertex.getID(), c);\n updateMRV(g, currentVertex);\n if (Util(g, set, colors, coloring, i + 1, arcs, agenda))\n {\n\n return true;\n }\n\n //System.out.println(\"Assigning vertex \" + currentVertex.getID() + \" to color \" + currentVertex.color + \" did not work\");\n coloring.remove(currentVertex.getID());\n currentVertex.color = -1;\n }\n }\n return false;\n }",
"void DFS() {\n \t\n \t// Mark all the vertices as not visited(set as false by default in java) \n \tboolean visited[] = new boolean[V];\n \t\n \t// Call the recursive helper function to print DFS traversal \n // starting from all vertices one by one \n \tfor (int i=0; i<V; i++) { \n \t\t if (visited[i] == false)\n \t\t\t DFSUtil(i, visited);\n \t}\n }",
"public void depthFirstSearch(Node vertex){\n vertex.visited = true;\n if(vertex.row == row_size-1 && vertex.col == col_size-1){\n while(!dfs_stack.isEmpty()){\n exitPath +=dfs_stack.peek(); \n dfs_stack.pop();\n } \n }\n if(vertex.north!=null && vertex.north.visited==false){\n dfs_stack.push(\"N\");\n vertex.depthFirstSearch(vertex.north);\n }\n if(vertex.south!=null && vertex.south.visited==false){\n dfs_stack.push(\"S\");\n vertex.depthFirstSearch(vertex.south);\n }\n if(vertex.west !=null && vertex.west.visited ==false){\n dfs_stack.push(\"W\");\n vertex.depthFirstSearch(vertex.west);\n }\n if(vertex.east !=null && vertex.east.visited==false){\n dfs_stack.push(\"E\");\n vertex.depthFirstSearch(vertex.east);\n }\n if (!dfs_stack.isEmpty()){\n dfs_stack.pop();\n }\n return;\n }",
"private static void breadthFirstSearch(int source, ArrayList<ArrayList<Integer>> nodes) {\n\t\tArrayList<ArrayList<Integer>> neighbours = nodes;\n\t\tQueue<Integer> queue= new LinkedList<Integer>();\n\t\t\n\t\tboolean[] visited = new boolean[nodes.size()];\n\t\t\n\t\tqueue.add(source);\n\t\tvisited[source]=true;\n\t\t\n\t\twhile(!queue.isEmpty()) {\n\t\t\tint k =queue.remove();\n\t\t\tSystem.out.println(k);\n\t\t\tfor(int p : nodes.get(k)) {\n\t\t\t\tif(!visited[p]) {\n\t\t\t\t\tqueue.add(p);\n\t\t\t\t\tvisited[p]=true;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t}",
"public void run() {\n\t\tArrays.fill(label, NOT_AN_INDEX);\r\n\t\t\r\n\t\t// while there is a u in V with considered[u]=0 and mate[u]=0 do\r\n\t\tstage: for (int u = 0; u < gOrig.numVertices(); u++ ) {\r\n\t\t\t// if(mate[u] == NOT_AN_INDEX){\r\n\t\t\tif (gOrig.vertex(u) == null) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tif (matching.matches() == gOrig.numVertices() / 2) {\r\n\t\t\t\t// we are done\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tSystem.out.print(String.format(\"considering vertex u%d\\n\", u));\r\n\t\t\tif ( ! matching.isMatched(u)) {\r\n\t\t\t\t\r\n\t\t\t\t// considered[u]=1,A={empty}\r\n\t\t\t\t// A = new WeightedDigraph(gOrig.numVertices()/2);\r\n\t\t\t\tA.clear();\r\n\t\t\t\t\r\n\t\t\t\t// forall v in V do exposed[v]=0\r\n\t\t\t\tArrays.fill(exposed, NOT_AN_INDEX);\r\n\t\t\t\t\r\n\t\t\t\t// Construct the auxiliary digraph\r\n\t\t\t\t\r\n\t\t\t\t// for all (v,w) in E do\r\n\t\t\t\tfor (int v = 0; v < gOrig.numVertices(); v++ ) {\r\n\t\t\t\t\tfor (Edge e : gOrig.eOuts(v)) {\r\n\t\t\t\t\t\tint w = e.right;\r\n\t\t\t\t\t\tassert e.left == v : \"vertex correspondence is wrong\";\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// if mate[w]=0 and w!=u then exposed[v]=w else if mate[w] !=v,0 then A=union(A,{v,mate[w]})\r\n\t\t\t\t\t\t// if(mate[w] == NOT_AN_INDEX && w != u){\r\n\t\t\t\t\t\t// exposed[v] = w;\r\n\t\t\t\t\t\t// }else if(mate[w] != v && mate[w] != NOT_AN_INDEX){\r\n\t\t\t\t\t\t// A.addEdge(new Edge(v,mate[w]));\r\n\t\t\t\t\t\t// }\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif ( ! matching.isMatched(w) && w != u) {\r\n\t\t\t\t\t\t\t// DEBUG(String.format(\"adding (%d,%d) to exposed\\n\", v, w));\r\n\t\t\t\t\t\t\tif (exposed[v] == NOT_AN_INDEX) {\r\n\t\t\t\t\t\t\t\texposed[v] = w;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} else if (matching.mate(w) != v && matching.isMatched(w)) {\r\n\t\t\t\t\t\t\t// DEBUG(String.format(\"adding (%d,%d) to A\\n\", v, matching.mate(w)));\r\n\t\t\t\t\t\t\tA.add(new Edge(v, matching.mate(w)));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tDEBUG(String.format(\"Exposed vertices={%s}\\n\", printExposed()));\r\n\t\t\t\tif (exposed().size() == 0) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// forall v in V do seen[v]=0\r\n\t\t\t\tArrays.fill(seen, false);\r\n\t\t\t\t\r\n\t\t\t\t// Q={u}; label[u]=0; if exposed[u]!=0 then augment(u), goto stage;\r\n\t\t\t\tQ.clear();\r\n\t\t\t\tQ.add(u);\r\n\t\t\t\tArrays.fill(label, NOT_AN_INDEX);// unsure whether it was meant to clear label or just unset label[u] OLD_CODE=label[u] = NOT_AN_INDEX;\r\n\t\t\t\tif (isExposed(u)) {\r\n\t\t\t\t\taugment(u);\r\n\t\t\t\t\tDEBUG(String.format(\"new matching %s\\n\", matching.toString()));\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\t// need to figure out how to handle blossom()\r\n\t\t\t\t\r\n\t\t\t\t// while Q != {empty} do\r\n\t\t\t\twhile ( ! Q.isEmpty()) {\r\n\t\t\t\t\tint v = Q.pop();\r\n\t\t\t\t\t\r\n\t\t\t\t\t// forall unlabeled nodes w in V such that (v,w) in A\r\n\t\t\t\t\tfor (Edge e : A) {\r\n\t\t\t\t\t\tint w = e.left;\r\n\t\t\t\t\t\tif (e.right == v && label[w] == NOT_AN_INDEX && label[v] != w) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t// Q=union(Q,w), label[w]=v\r\n\t\t\t\t\t\t\tif ( ! Q.contains(w)) {\r\n\t\t\t\t\t\t\t\tQ.offer(w);\r\n\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\tcontinue; ///THIS CONTINUE WAS ADDED LATE AT NIGHT\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tlabel[w] = v;\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t// seen[mate[w]] = 1;\r\n\t\t\t\t\t\t\ttry{\r\n\t\t\t\t\t\t\t\tint mate = findMate(w);\r\n\t\t\t\t\t\t\t\tseen[mate] = true;\r\n\t\t\t\t\t\t\t}catch(Exception err){\r\n\t\t\t\t\t\t\t\tDEBUG(String.format(\"error marking mate of %d as seen, mate not found\\n\", w));\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t// if exposed[w]!=0 then augment(w) goto stage;\r\n\t\t\t\t\t\t\tif (isExposed(w)) {\r\n\t\t\t\t\t\t\t\taugment(w);\r\n\t\t\t\t\t\t\t\tDEBUG(String.format(\"new matching %s\\n\", matching.toString()));\r\n\t\t\t\t\t\t\t\tcontinue stage;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t// if seen[w]=1 then blossom(w)\r\n\t\t\t\t\t\t\tif (seen[w]) {\r\n\t\t\t\t\t\t\t\tblossom(w);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// remove loops created by the blossoms\r\n\t\t\t\t\tremoveSelfLoops(A);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"static void bfs(int[][] G){\n\t\tQueue<Integer> q = new LinkedList<Integer>();\t\t\n\t\tfor (int ver_start = 0; ver_start < N; ver_start ++){\n\t\t\tif (visited[ver_start]) continue;\n\t\t\tq.add(ver_start);\n\t\t\tvisited[ver_start] = true;\n\n\t\t\twhile(!q.isEmpty()){\n\t\t\t\tint vertex = q.remove();\n\t\t\t\tSystem.out.print((vertex+1) + \" \");\n\t\t\t\tfor (int i=0; i<N; i++){\n\t\t\t\t\tif (G[vertex][i] == 1 && !visited[i]){\n\t\t\t\t\t\t// find neigbor of current vertex and not visited\n\t\t\t\t\t\t// add into the queue\n\t\t\t\t\t\tq.add(i);\n\t\t\t\t\t\tvisited[i] = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(\"--\");\t\t\t\n\t\t}\n\t}",
"@SuppressWarnings({\"rawtypes\", \"unchecked\", \"SuspiciousMethodCalls\"})\n private List getDepthFirstTraversal_iterative_usingStack_BigO_VPlusE() throws Exception {\n Map<Object, Boolean> visited = new LinkedHashMap<>();\n Stack watchStack = new Stack();\n\n V root = data.keySet().stream().findFirst().orElseThrow(() -> new Exception(\"Graph is Empty\"));\n watchStack.push(root);\n visited.put(root, true);\n\n while(!watchStack.isEmpty()) {\n Object currentVertex = watchStack.top();\n\n BinarySearchTree<E> edgeTree = data.getOrDefault(currentVertex, new BinarySearchTree<>());\n List<E> edges = edgeTree.getTreeByInOrder_depthFirst();\n\n //Remove an item from the stack when there are no edges or all the edges are visited for that vertex\n if(edgeTree.isEmpty() || visited.keySet().containsAll(edges)) {\n watchStack.pop();\n } else {\n for(E edge : edges) {\n if(!visited.containsKey(edge)) {\n watchStack.push(edge);\n visited.put(edge, true);\n break;\n }\n }\n }\n }\n return new ArrayList<>(visited.keySet());\n }",
"private void checkTargetsReachable(){\n\t\tPathfinder pathfinder = new Pathfinder(collisionMatrix);\n\t\tLinkedList<Node> removeList = new LinkedList<Node>();\n\t\tboolean pathWasFound = false;\n\t\tLinkedList<Node> currentPath;\n\t\tLinkedList<Node> reversePath;\n\t\t\n\t\t//Go through all starting positions\n\t\tfor(LinkedList<Node> startList : targets){\n\t\t\tprogress += 8;\n\t\t\tsetProgress(progress);\n\t\t\tfor(Node startNode : startList){\n\t\t\t\t\n\t\t\t\tboolean outsideMap = (startNode.getCollisionXPos(scaleCollision) < 0 || startNode.getCollisionXPos(scaleCollision) >= (collisionMatrix.length-1) || startNode.getCollisionYPos(scaleCollision) < 0 || startNode.getCollisionYPos(scaleCollision) >= (collisionMatrix.length-1));\n\t\t\t\t\n\t\t\t\tpathWasFound = false;\n\t\t\t\t//Make sure that target is inside of map\n\t\t\t\tif(!outsideMap){\n\t\t\t\t\t//Check against all target positions\n\t\t\t\t\tfor(LinkedList<Node> targetList : targets){\n\t\t\t\t\t\tfor(Node targetNode : targetList){\n\t\t\t\t\t\t\t//Only check against targets that have not already been marked as unreachable\n\t\t\t\t\t\t\tboolean selfCheck = (targetNode.getXPos() != startNode.getXPos() || targetNode.getYPos() != startNode.getYPos());\n\t\t\t\t\t\t\tif(!removeList.contains(targetNode) && selfCheck){\n\t\t\t\t\t\t\t\t//Check if this path has already been checked\n\t\t\t\t\t\t\t\tif(!preCalculatedPaths.containsKey(startNode.toStringCollision(scaleCollision) + \"-\" + targetNode.toStringCollision(scaleCollision))){\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tcurrentPath = new LinkedList<Node>();\n\t\t\t\t\t\t\t\t\t//Check if a path can be found for this start and target node\n\t\t\t\t\t\t\t\t\tif(pathfinder.findPath(startNode.getCollisionXPos(scaleCollision), startNode.getCollisionYPos(scaleCollision), targetNode.getCollisionXPos(scaleCollision), targetNode.getCollisionYPos(scaleCollision), currentPath)){\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tif(Frame.USE_PRECALCULATED_PATHS)\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tpreCalculatedPaths.put(startNode.toStringCollision(scaleCollision) + \"-\" + targetNode.toStringCollision(scaleCollision), currentPath);\n\t\t\t\t\t\t\t\t\t\t\treversePath = new LinkedList<Node>();\n\t\t\t\t\t\t\t\t\t\t\treversePath.addAll(currentPath);\n\t\t\t\t\t\t\t\t\t\t\tCollections.reverse(reversePath);\n\t\t\t\t\t\t\t\t\t\t\treversePath.removeFirst();\n\t\t\t\t\t\t\t\t\t\t\treversePath.add(startNode);\n\t\t\t\t\t\t\t\t\t\t\tpreCalculatedPaths.put(targetNode.toStringCollision(scaleCollision) + \"-\" + startNode.toStringCollision(scaleCollision) ,reversePath);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tpathWasFound = true;\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\tpathWasFound = true;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//Remove nodes which we cannot find a path from\n\t\t\t\tif(!pathWasFound){\n\t\t\t\t\tremoveList.add(startNode);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Go through the remove list and remove unreachable nodes\n\t\tfor(Node node : removeList){\n\t\t\tfor(LinkedList<Node> startList : targets){\n\t\t\t\tstartList.remove(node);\n\t\t\t}\n\t\t}\n\t}",
"int BFS(int source,int sink) \n {\n\tint first=0, last=0; \n int[] queue=new int[V]; \n int[] mark = new int[V]; \n \n for (int i = 0; i < V; i++) {\n mark[i] = 0; // Mark all vertices as not visited \n minFlow[i] = 10000000;\n }\n\n queue[last++] = source; //enqueue source vertex\n mark[source] = 1; //mark source vertex as visited\n //BFS Loop\n while (first != last) { // While queue is not empty.\n int v = queue[first++];\n for (int u = 0; u < V; u++){\n if (mark[u] == 0 && resCap[v][u] > 0) {\n minFlow[u] = Math.min(minFlow[v],resCap[v][u]);\n parent[u] = v;\n mark[u] = 1;\n if (u == sink) //If we reach sink starting from source, then return 1\n return 1;\n queue[last++] = u;\n }\n }\n }\n return 0; //else return 0\n }",
"public void DFS() {\r\n\t\tSet<Vertex> visited = new HashSet<Vertex>();\r\n\r\n\t\t// Create a stack for DFS\r\n\t\tStack<Vertex> stack = new Stack<Vertex>();\r\n\r\n\t\tDFS(this.vertices[3], visited, stack); // DFS starting with 40\r\n\r\n\t\t// Call the helper function to print DFS traversal\r\n\t\t// starting from all vertices one by one\r\n\t\tfor (int i = 0; i < N; ++i)\r\n\t\t\tif (!visited.contains(this.vertices[i]))\r\n\t\t\t\tDFS(this.vertices[i], visited, stack);\r\n\t}",
"private int BFS() {\n adjList.cleanNodeFields();\n\n //Queue for storing current shortest path\n Queue<Node<Integer, Integer>> q = new LinkedList<>();\n\n //Set source node value to 0\n q.add(adjList.getNode(startNode));\n q.peek().key = 0;\n q.peek().d = 0;\n q.peek().visited = true;\n\n //Helper variables\n LinkedList<Pair<Node<Integer, Integer>, Integer>> neighbors;//Array of pairs <neighborKey, edgeWeight>\n Node<Integer, Integer> neighbor, u;\n long speed = (long) (cellSideLength * 1.20);\n\n while (!isCancelled() && q.size() != 0) {\n u = q.poll();\n\n //Marks node as checked\n checkedNodesGC.fillRect((u.value >> 16) * cellSideLength + 0.5f,\n (u.value & 0x0000FFFF) * cellSideLength + 0.5f,\n (int) cellSideLength - 1, (int) cellSideLength - 1);\n\n //endNode found\n if (u.value == endNode) {\n //Draws shortest path\n Node<Integer, Integer> current = u, prev = u;\n\n while ((current = current.prev) != null) {\n shortestPathGC.strokeLine((prev.value >> 16) * cellSideLength + cellSideLength / 2,\n (prev.value & 0x0000FFFF) * cellSideLength + cellSideLength / 2,\n (current.value >> 16) * cellSideLength + cellSideLength / 2,\n (current.value & 0x0000FFFF) * cellSideLength + cellSideLength / 2);\n prev = current;\n }\n return u.d;\n }\n\n //Wait after checking node\n try {\n Thread.sleep(speed);\n } catch (InterruptedException interrupted) {\n if (isCancelled())\n break;\n }\n\n //Checking Neighbors\n neighbors = adjList.getNeighbors(u.value);\n for (Pair<Node<Integer, Integer>, Integer> neighborKeyValuePair : neighbors) {\n neighbor = neighborKeyValuePair.getKey();\n //Relaxation step\n //Checks if neighbor hasn't been checked, if so the assign the shortest path\n if (!neighbor.visited) {\n //Adds checked neighbor to queue\n neighbor.key = u.d + 1;\n neighbor.d = u.d + 1; //Assign shorter path found to neighbor\n neighbor.prev = u;\n neighbor.visited = true;\n q.add(neighbor);\n }\n }\n }\n return Integer.MAX_VALUE;\n }",
"public void retrace(){\n\t\t//look at the sPath stack\n\t\tPoint temp = sPath.peek();\n\t\t// find neighbor with lowest score\n\t\tPoint lNeighbor = backtrack(temp);\n\t\t// coordinates of lNeighbor\n\t\tint x = (int) lNeighbor.getX();\n\t\tint y = (int) lNeighbor.getY();\n\t\t// score of neighbor\n\t\tint score = topology[x][y];\n\t\t// if there is no more neighbor then lNeighbor = temp\n\t\t// then we reach the Start then\n\t\twhile(score!=0){\n\t\t\t// push that neighbor on the stack\n\t\t\tsPath.push(lNeighbor);\n\t\t\t// update temp and lNeighbor\n\t\t\ttemp = sPath.peek();\n\t\t\tlNeighbor = backtrack(temp);\n\t\t\t// coordinates of lNeighbor\n\t\t\tx = (int) lNeighbor.getX();\n\t\t\ty = (int) lNeighbor.getY();\n\t\t\t// score of neighbor\n\t\t\tscore = topology[x][y];\n\t\t}\n\t\t// we have to do that until we see the start with score 0\n\t\t// the last lNeighbor is the S with score = 0, push it to the stack\n\t\tsPath.push(lNeighbor);\n\t\twhile(!sPath.isEmpty()){\n\t\t\tPoint track = sPath.pop();\n\t\t\tSystem.out.println(\"(\"+(int)track.getX()+\",\"+(int)track.getY()+\")\");\n\t\t}\n\t}",
"public static void main(String[] args) {\r\n \r\n Graph X=new Graph();\r\n \r\n X.GenerateGraph();\r\n \r\n \r\n X.DisplayGraph();\r\n // System.out.println(\"Printing Stack\");\r\n // X.DFS();\r\n \r\n // System.out.println(X.AdjList.get(3).neighbours);\r\n \r\n // ArrayList<Vertex> A=new ArrayList();\r\n \r\n X.BFS();\r\n \r\n X.TraceBack();\r\n }",
"public void computeAllPaths(String source)\r\n {\r\n Vertex sourceVertex = network_topology.get(source);\r\n Vertex u,v;\r\n double distuv;\r\n\r\n Queue<Vertex> vertexQueue = new PriorityQueue<Vertex>();\r\n \r\n \r\n // Switch between methods and decide what to do\r\n if(routing_method.equals(\"SHP\"))\r\n {\r\n // SHP, weight of each edge is 1\r\n sourceVertex.minDistance = 0;\r\n vertexQueue.add(sourceVertex);\r\n while(!vertexQueue.isEmpty())\r\n {\r\n u = vertexQueue.remove();\r\n for (String key : u.adjacentVertices.keySet())\r\n {\r\n v = network_topology.get(key);\r\n distuv = u.minDistance + 1;\r\n if(distuv < v.minDistance)\r\n {\r\n v.minDistance = distuv;\r\n v.previous = u;\r\n vertexQueue.add(v);\r\n }\r\n }\r\n \r\n }\r\n \r\n }\r\n \r\n else if (routing_method.equals(\"SDP\"))\r\n {\r\n // SDP, weight of each edge is it's propagation delay\r\n sourceVertex.minDistance = 0;\r\n vertexQueue.add(sourceVertex);\r\n while(!vertexQueue.isEmpty())\r\n {\r\n u = vertexQueue.remove();\r\n for (String key : u.adjacentVertices.keySet())\r\n {\r\n v = network_topology.get(key);\r\n distuv = u.minDistance + u.adjacentVertices.get(key).propDelay;\r\n if(distuv < v.minDistance)\r\n {\r\n v.minDistance = distuv;\r\n v.previous = u;\r\n vertexQueue.add(v);\r\n }\r\n } \r\n }\r\n }\r\n else if (routing_method.equals(\"LLP\"))\r\n {\r\n // LLP, weight each edge is activeCircuits/AvailableCircuits\r\n sourceVertex.minDistance = 0;\r\n vertexQueue.add(sourceVertex);\r\n while(!vertexQueue.isEmpty())\r\n {\r\n u = vertexQueue.remove();\r\n for (String key : u.adjacentVertices.keySet())\r\n {\r\n v = network_topology.get(key);\r\n distuv = Math.max(u.minDistance,u.adjacentGet(key).load());\r\n //System.out.println(u.adjacentGet(key).load());\r\n if(distuv < v.minDistance)\r\n {\r\n v.minDistance = distuv;\r\n v.previous = u;\r\n vertexQueue.add(v);\r\n }\r\n }\r\n }\r\n }\r\n }",
"private static void depthFirstSearch(Vertex v, ArrayList<Vertex> visitedArrayList, Graph graph){\n visitedArrayList.add(v);\n Iterator<Vertex> iter=graph.getNeighbors(v).iterator();\n while (iter.hasNext()){\n Vertex v1=iter.next();\n if(!visitedArrayList.contains(v1)){\n depthFirstSearch(v1,visitedArrayList,graph);\n }\n }\n for(Vertex v1 : graph.getNeighbors(v)){\n if(!visitedArrayList.contains(v1)){\n depthFirstSearch(v1,visitedArrayList,graph);\n }\n }\n }",
"private int searchNext(JmtCell prev) {\r\n \t\tRectangle boundspadre = GraphConstants.getBounds((prev).getAttributes()).getBounds();\r\n \t\tObject[] listEdges = null;\r\n \t\tGraphModel graphmodel = graph.getModel();\r\n \t\tList<Object> next = new ArrayList<Object>();\r\n \r\n \t\tif (flag1 == false && prev.seen == false) {\r\n \r\n \t\t\t// Rectangle bounds =\r\n \t\t\t// GraphConstants.getBounds(((JmtCell)prev).getAttributes()).getBounds();\r\n \t\t\tif (!flag2) {\r\n \t\t\t\tboundspadre.setLocation(x, y + ((e + 1) * (42 + heightMax)) - (int) (boundspadre.getHeight() / 2) + 30);\r\n \t\t\t} else {\r\n \t\t\t\tboundspadre.setLocation(x - (int) (boundspadre.getWidth() / 2), y + ((e + 1) * (42 + heightMax))\r\n \t\t\t\t\t\t- (int) (boundspadre.getHeight() / 2) + 30);\r\n \t\t\t}\r\n \r\n \t\t\tGraphConstants.setBounds(prev.getAttributes(), boundspadre);\r\n \t\t\tx = (int) boundspadre.getCenterX() + widthMax + 50;\r\n \t\t\tprev.seen = true;\r\n \t\t\tflag2 = true;\r\n \t\t}\r\n \r\n \t\t// inserisco tutti gli archi uscenti e entranti di min.get(j) in\r\n \t\t// listEdges\r\n \t\tlistEdges = DefaultGraphModel.getOutgoingEdges(graphmodel, prev);\r\n \t\tVector<Object> listEdgestmp = new Vector<Object>();\r\n \t\tfor (Object listEdge : listEdges) {\r\n \t\t\tJmtCell qq = (JmtCell) (graphmodel.getParent(graphmodel.getTarget(listEdge)));\r\n \t\t\tif (!(qq).seen) {\r\n \t\t\t\tlistEdgestmp.add(listEdge);\r\n \t\t\t}\r\n \t\t}\r\n \t\tlistEdges = listEdgestmp.toArray();\r\n \r\n \t\tint numTarget = listEdges.length;\r\n \t\tif (numTarget == 0) {\r\n \t\t\treturn 1;\r\n \t\t}\r\n \r\n \t\tfor (int k = 0; k < numTarget; k++) {\r\n \t\t\tnext.add((graphmodel.getParent(graphmodel.getTarget(listEdges[k]))));\r\n \t\t}\r\n \r\n \t\tint j = 1;\r\n \t\tif (inRepositionSons == false && ((JmtCell) next.get(0)).seen == false) {\r\n \t\t\tj = searchNext((JmtCell) next.get(0));\r\n \t\t} else if (inRepositionSons == true && ((JmtCell) next.get(0)).seen == false) {\r\n \r\n \t\t\tRectangle bounds = GraphConstants.getBounds(((JmtCell) next.get(0)).getAttributes()).getBounds();\r\n \t\t\tbounds.setLocation((int) (boundspadre.getCenterX()) + widthMax + 50 - (int) (bounds.getWidth() / 2), (int) boundspadre.getCenterY()\r\n \t\t\t\t\t- (int) (bounds.getHeight() / 2));\r\n \t\t\tGraphConstants.setBounds(((JmtCell) next.get(0)).getAttributes(), bounds);\r\n \r\n \t\t\t((JmtCell) next.get(0)).seen = true;\r\n \t\t\tj = searchNext((JmtCell) next.get(0));\r\n \t\t}\r\n \r\n \t\tif (numTarget > 0) {\r\n \t\t\tif (!flag) {\r\n \t\t\t\trepositionSons(prev, next, j - 1, 1);\r\n \t\t\t} else {\r\n \t\t\t\trepositionSons(prev, next, -1, 0);\r\n \t\t\t}\r\n \t\t\tflag = false;\r\n \t\t}\r\n \r\n \t\t(prev).sons = 0;\r\n \t\tfor (int w = 0; w < numTarget; w++) {\r\n \t\t\tprev.sons += ((JmtCell) next.get(w)).sons;\r\n \t\t}\r\n \r\n \t\treturn prev.sons;\r\n \t}",
"void findSearchOrder() {\n boolean filled = false;\n for(int node: queryGraphNodes.keySet()) {\n\n vertexClass vc = queryGraphNodes.get(node);\n searchOrderSeq.add(node);\n for(int edge: queryGraphNodes.get(node).edges.keySet()) {\n filled = calcOrdering(edge);\n if (filled)\n break;\n }\n if(searchOrderSeq.size() == queryGraphNodes.size())\n break;\n\n }\n\n }",
"public static void main(String[] args){\n Graph g = new Graph(13);\n //add vortexes and edges to construct the graph\n g.addEdge(0,1);\n g.addEdge(0,2);\n g.addEdge(0,6);\n g.addEdge(0,5);\n g.addEdge(6,4);\n g.addEdge(4,3);\n g.addEdge(4,5);\n g.addEdge(3,5);\n g.addEdge(7,8);\n g.addEdge(9,10);\n g.addEdge(9,11);\n g.addEdge(9,12);\n g.addEdge(11,12);\n\n //create a DepthFirstSearch object\n BreadthFirstSearch DFS = new BreadthFirstSearch(g,0);\n\n System.out.println(\"7 and 0 is connected: \"+ DFS.marked(7));\n System.out.println(\"10 and 0 is connected: \"+ DFS.marked(10));\n System.out.println(\"6 and 0 is connected: \"+ DFS.marked(6));\n System.out.println(\"4 and 0 is connected: \"+ DFS.marked(0));\n System.out.println(\"12 and 0 is connected: \"+ DFS.marked(12));\n\n System.out.println(DFS.count()+\" vortexes connect with the vortex 0.\");\n\n }",
"Bfs_search(int v) \r\n { \r\n V = v; \r\n \r\n adj = new LinkedList[v]; \r\n \r\n for (int i=0; i<v; ++i) \r\n adj[i] = new LinkedList(); \r\n }",
"public void depthFirstSearch() {\n List<Vertex> visited = new ArrayList<Vertex>();\r\n // start the recursive depth first search on the current vertex\r\n this.dfs(visited);\r\n }",
"public void iterativeDfs(Graph graph, int sourceVertex) {\n\n stack.addLast(sourceVertex);\n\n while (!stack.isEmpty()) {\n int vertex = stack.removeLast();\n\n if (!marked[vertex]) {\n sourceVertexCount++;\n marked[vertex] = true;\n\n for (int adjacentVertex : graph.adj(vertex)) {\n if (!marked[adjacentVertex]) {\n stack.addLast(adjacentVertex);\n }\n }\n }\n }\n }",
"static void dfs(int[][] G){\n\t\tStack<Integer> s = new Stack<Integer>();\n\t\tfor (int ver_start=0; ver_start<N; ver_start++){\n\t\t\tif (visited[ver_start]) continue;\n\t\t\ts.push(ver_start);\n\t\t\tvisited[ver_start] = true;\n\n\t\t\twhile(!s.isEmpty()){\n\t\t\t\tint vertex = s.pop();\n\t\t\t\tSystem.out.print((vertex+1) + \" \");\n\t\t\t\tfor (int i=0; i<N; i++){\n\t\t\t\t\tif (G[vertex][i] == 1 && !visited[i]){\n\t\t\t\t\t\t// find neigbor of current vertex and not visited\n\t\t\t\t\t\t// add into the stack\n\t\t\t\t\t\ts.push(i);\n\t\t\t\t\t\tvisited[i] = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tSystem.out.println();\n\t\t}\n\t}",
"void BFS(int s) {\n // Mark all the vertices as not visited(By default\n // set as false)\n boolean visited[] = new boolean[V];\n\n // Create a queue for BFS\n LinkedList<Integer> queue = new LinkedList<Integer>();\n\n // Mark the current node as visited and enqueue it\n visited [s] = true;\n queue.add(s);\n\n while (queue.size() != 0) {\n // Dequeue a vertex from queue and print it\n s = queue.poll();\n System.out.print(s + \" \");\n\n // Get all adjacent vertices of the dequeued vertex s\n // If a adjacent has not been visited, then mark it\n // visited and enqueue it\n Iterator<Integer> i = adj [s].listIterator();\n while (i.hasNext()) {\n int n = i.next();\n if (!visited [n]) {\n visited [n] = true;\n queue.add(n);\n }\n }\n }\n }",
"public void dfsPrint(Node start){\n Stack<Node> stack = new Stack<>();\n Set<Node> visited = new HashSet<>(); //we can use integer for better space\n\n stack.push(start);\n while (!stack.isEmpty()){\n Node curr = stack.pop();\n if(!visited.contains(curr)){\n visited.add(curr);\n //do something\n }\n for(Node n: curr.adj){\n if(!visited.contains(n)){\n stack.push(n);\n }\n }\n }\n }",
"private void computePaths(Vertex source, Vertex target, ArrayList<Vertex> vs)\n {\n \tfor (Vertex v : vs)\n \t{\n \t\tv.minDistance = Double.POSITIVE_INFINITY;\n \t\tv.previous = null;\n \t}\n source.minDistance = 0.;\t\t// distance to self is zero\n IndexMinPQ<Vertex> vertexQueue = new IndexMinPQ<Vertex>(vs.size());\n \n for (Vertex v : vs) vertexQueue.insert(Integer.parseInt(v.id), v);\n\n\t\twhile (!vertexQueue.isEmpty()) \n\t\t{\n\t \t// retrieve vertex with shortest distance to source\n\t \tVertex u = vertexQueue.minKey();\n\t \tvertexQueue.delMin();\n\t\t\tif (u == target)\n\t\t\t{\n\t\t\t\t// trace back\n\t\t\t\twhile (u.previous != null)\n\t\t\t\t{;\n\t\t\t\t\tu = u.previous;\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n \t// Visit each edge exiting u\n \tfor (Edge e : u.adjacencies)\n \t\t{\n \t\tVertex v = e.target;\n\t\t\t\tdouble weight = e.weight;\n \tdouble distanceThroughU = u.minDistance + weight;\n\t\t\t\tif (distanceThroughU < v.minDistance) \n\t\t\t\t{\n\t\t\t\t\tint vid = Integer.parseInt(v.id);\n\t\t \t\tvertexQueue.delete(vid);\n\t\t \t\tv.minDistance = distanceThroughU;\n\t\t \t\tv.previous = u;\n\t\t \t\tvertexQueue.insert(vid,v);\n\t\t\t\t}\n\t\t\t}\n }\n }",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tStack<Integer> st = new Stack<Integer>();\n\t\tQueue<Integer> que = new LinkedList<Integer>();\n\t\tArrayList<Integer> path = new ArrayList<>();\n\t\tint n = sc.nextInt();\n\t\tint m = sc.nextInt();\n\t\tint v = sc.nextInt();\n\t\tint [][] arr= new int [n+1][n+1];\n\t\tboolean [] visit = new boolean[n+1];\n\t\tfor(int i=0;i<m;i++) {\n\t\t\tint a = sc.nextInt();\n\t\t\tint b = sc.nextInt();\n\t\t\tarr[a][b] = 1;\n\t\t\tarr[b][a] = 1;\n\t\t}\n\t\tst.push(v);\n\t\twhile(!st.isEmpty()) {\n\t\t\tint temp = st.pop();\n\t\t\tif(visit[temp]) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tpath.add(temp);\n\t\t\tvisit[temp] = true;\n\t\t\tfor(int i=n;i>0;i--) {\n\t\t\t\tif(arr[temp][i]==1 && !visit[i]) {\n\t\t\t\t\tst.push(i);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor(int i=0;i<path.size();i++) {\n\t\t\tSystem.out.print(path.get(i)+\" \");\n\t\t}\n\t\tSystem.out.println();\n\t\tArrays.fill(visit, false);\n\t\tpath = new ArrayList<>();\n\t\tque.add(v);\n\t\twhile(!que.isEmpty()) {\n\t\t\tint temp = que.poll();\n\t\t\tif(visit[temp]) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tpath.add(temp);\n\t\t\tvisit[temp] = true;\n\t\t\tfor(int i=1;i<=n;i++) {\n\t\t\t\tif(arr[temp][i]==1 && !visit[i]) {\n\t\t\t\t\tque.add(i);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor(int i=0;i<path.size();i++) {\n\t\t\tSystem.out.print(path.get(i)+\" \");\n\t\t}\n\t}",
"private void GreedySearch(){\n\n Queue<Node> expanded = new LinkedList<>();\n ArrayList<Node> fringe = new ArrayList<>();\n ArrayList<Node> fringeTemp = new ArrayList<>();\n\n\n Node current = startNode;\n\n while(expanded.size() < 1000){\n\n if(current.getDigit().getDigitString().equals(goalNode.getDigit().getDigitString())){\n //goal is reached.\n solutionPath(current);\n expanded.add(current);\n printExpanded(expanded);\n System.exit(0);\n }\n\n\n boolean b = cycleCheck(current,expanded);\n\n if(!b) {\n expanded.add(current);\n }\n\n if(!b){\n\n if(current.getDigit().last_changed != 0){\n\n if ((Integer.parseInt(current.getDigit().getFirst_digit()) - 1 >= 0)) {\n Node child_node = new Node(current.getDigit().decreaseFirstDigit());\n child_node.setParent(current);\n child_node.getDigit().setLastChanged(0);\n\n if(!forbidden.contains(child_node.getDigit().getDigitString())){\n fringe.add(child_node);\n }\n }\n\n //+1 child first digit\n if ((Integer.parseInt(current.getDigit().getFirst_digit()) + 1 <= 9)) {\n Node child_node = new Node(current.getDigit().increaseFirstDigit());\n child_node.setParent(current);\n child_node.getDigit().setLastChanged(0);\n if(!forbidden.contains(child_node.getDigit().getDigitString())){\n fringe.add(child_node);\n }\n\n }\n }\n\n if(current.getDigit().last_changed != 1){\n\n if ((Integer.parseInt(current.getDigit().getSecond_digit()) - 1 >= 0)) {\n Node child_node = new Node(current.getDigit().decreaseSecondDigit());\n child_node.setParent(current);\n child_node.getDigit().setLastChanged(1);\n if(!forbidden.contains(child_node.getDigit().getDigitString())){\n fringe.add(child_node);\n }\n }\n\n //+1 child\n if ((Integer.parseInt(current.getDigit().getSecond_digit()) + 1 <= 9)) {\n Node child_node = new Node(current.getDigit().increaseSecondDigit());\n child_node.setParent(current);\n child_node.getDigit().setLastChanged(1);\n if(!forbidden.contains(child_node.getDigit().getDigitString())){\n fringe.add(child_node);\n }\n }\n }\n\n if(current.getDigit().last_changed != 2){\n if ((Integer.parseInt(current.getDigit().getThird_digit()) - 1 >= 0)) {\n Node child_node = new Node(current.getDigit().decreaseThirdDigit());\n child_node.setParent(current);\n child_node.getDigit().setLastChanged(2);\n if(!forbidden.contains(child_node.getDigit().getDigitString())){\n fringe.add(child_node);\n }\n }\n //+1 child\n if ((Integer.parseInt(current.getDigit().getThird_digit()) + 1 <= 9)) {\n Node child_node = new Node(current.getDigit().increaseThirdDigit());\n child_node.setParent(current);\n child_node.getDigit().setLastChanged(2);\n if(!forbidden.contains(child_node.getDigit().getDigitString())){\n fringe.add(child_node);\n }\n }\n }\n\n }\n\n\n\n for(Node n : fringe){\n heuristicSetter(n);\n\n }\n\n fringeTemp.addAll(fringe);\n //now all the nodes in fringe have the heuristic value.\n //We can get the last added minm\n Node minm;\n if(fringeTemp.size() != 0){\n minm = fringeTemp.get(0);\n }else{\n break;\n }\n for(int i = 1; i<fringeTemp.size(); i++){\n if(fringeTemp.get(i).getHeuristic() <= minm.getHeuristic()){\n minm = fringeTemp.get(i);\n }\n }\n\n //now we have the minm for the next stage.\n current = minm;\n fringeTemp.remove(minm);\n fringe.clear();\n }\n\n //While loop ends\n System.out.println(\"No solution found.\");\n printExpanded(expanded);\n\n\n\n }",
"private void calculate() {\n\t\tList<Edge> path = new ArrayList<>();\n\t\tPriorityQueue<Vert> qv = new PriorityQueue<>();\n\t\tverts[s].dist = 0;\n\t\tqv.add(verts[s]);\n\t\twhile (!qv.isEmpty()) {\n\t\t\tVert v = qv.poll();\n\t\t\tint vidx = v.idx;\n\t\t\tfor (Edge e : v.edges) {\n\t\t\t\tif (e.w==0) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tVert vo = verts[e.other(vidx)];\n\t\t\t\tif (vo.dist > v.dist + e.w) {\n\t\t\t\t\tvo.dist = v.dist + e.w;\n\t\t\t\t\tqv.add(vo);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (verts[t].dist < L) {\n\t\t\tok = false;\n\t\t\treturn;\n\t\t} else if (verts[t].dist == L) {\n\t\t\tok = true;\n\t\t\tfor (int i=0; i<m; i++) {\n\t\t\t\tif (edges[i].w == 0) {\n\t\t\t\t\tedges[i].w = MAX_DIST;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\t// replace 0 with 1, adding to za list\n\t\tfor (int i=0; i<m; i++) {\n\t\t\tif (edges[i].w == 0) {\n\t\t\t\tza[i] = true;\n\t\t\t\tedges[i].w = 1;\n\t\t\t} else {\n\t\t\t\tza[i] = false;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// looking for shortest path from s to t with 0\n\t\tfor (int i=0; i<n; i++) {\n\t\t\tif (i != s) {\n\t\t\t\tverts[i].dist = MAX_DIST;\n\t\t\t}\n\t\t}\n\t\tqv.clear();\n\t\tqv.add(verts[s]);\n\t\twhile (!qv.isEmpty()) {\n\t\t\tVert v = qv.poll();\n\t\t\tint vidx = v.idx;\n\t\t\tfor (Edge e : v.edges) {\n\t\t\t\tVert vo = verts[e.other(vidx)];\n\t\t\t\tif (vo.dist > v.dist + e.w) {\n\t\t\t\t\tvo.dist = v.dist + e.w;\n\t\t\t\t\tqv.add(vo);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (verts[t].dist > L) {\n\t\t\tok = false;\n\t\t\treturn;\n\t\t}\n\t\tVert v = verts[t];\n\t\twhile (v.dist > 0) {\n\t\t\tlong minDist = MAX_DIST;\n\t\t\tVert vMin = null;\n\t\t\tEdge eMin = null;\n\t\t\tfor (Edge e : v.edges) {\n\t\t\t\tVert vo = verts[e.other(v.idx)];\n\t\t\t\tif (vo.dist+e.w < minDist) {\n\t\t\t\t\tvMin = vo;\n\t\t\t\t\teMin = e;\n\t\t\t\t\tminDist = vMin.dist+e.w;\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t\tv = vMin;\t\n\t\t\tpath.add(eMin);\n\t\t}\n\t\tCollections.reverse(path);\n\t\tfor (int i=0; i<m; i++) {\n\t\t\tif (za[i]) {\n\t\t\t\tedges[i].w = MAX_DIST;\n\t\t\t}\n\t\t}\n\t\tlong totLen=0;\n\t\tboolean wFixed = false;\n\t\tfor (Edge e : path) {\n\t\t\ttotLen += (za[e.idx] ? 1 : e.w);\n\t\t}\n\t\tfor (Edge e : path) {\n\t\t\tif (za[e.idx]) {\n\t\t\t\tif (!wFixed) {\n\t\t\t\t\te.w = L - totLen + 1;\n\t\t\t\t\twFixed = true;\n\t\t\t\t} else {\n\t\t\t\t\te.w = 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tok = true;\n\t}",
"public void preFlow() {\n\t\tg.getVertex(source).h = g.getV();\n\t\tg.getVertex(sink).h = 0;\n\t\t\n\t\tfor (int i : g.getAdjacents(source)) {\n\t\t\tpushFillingFlow(source, i);\n\t\t}\n\t}",
"private void CreatingBeautyContentTopK() {\n\t\t\tConstraintsPlacement objConstraints= new ConstraintsPlacement(this);\r\n\t\t\t//Creating array with states\r\n\t\t\tArrayList<BlockNode> states = new ArrayList<BlockNode>();\r\n\t\t\t//Building the graph in a deph way\r\n\t \tGraphBuilder objGrapB= new GraphBuilder(1);\r\n\t \tint numElements=objElem.getNumberObjects();\r\n\t \tint numEnemies=objElem.getNumberObjectsEnemies();\r\n\t \tint globalControlSearch=0;\r\n\t \t//Beststates=objGrapB.basicDepthSearch(mediumStraight,height,numElements,numElements,states,objConstraints, objElem.getFinalList(),objElem);\r\n\t \tbestBranches=objGrapB.relativePositionDepthSearchTopK(mediumStraight,height,numElements-numEnemies,numElements-numEnemies,states,objConstraints, objElem.getFinalList(),objElem,-mediumStraight+1,mediumStraight-1,floorTileHeight,0,0,maxScreens,numEnemies,random,globalControlSearch);\r\n\t \t//Beststates=objGrapB.relativeTransPositionDepthSearch(mediumStraight,height,numElements,numElements,states,objConstraints, objElem.getFinalList(),objElem,-mediumStraight+1,mediumStraight-1,floorTileHeight,0,0,currentState,hTable);\r\n\t \r\n\t \tBranch objBranch=new Branch();\r\n\t \t//bestBranches=objBranch.sortBranches(bestBranches);\r\n\t \t\r\n\t \t//System.out.print( \"CounterStates\"+objGrapB.getCounterIDs() );\r\n\t \r\n\t //imprimiendo los estados visitados\r\n\t /*\r\n\t Iterator<BlockNode> nombreIterator = states.iterator();\r\n\t while(nombreIterator.hasNext()){\r\n\t \tBlockNode elemento = nombreIterator.next();\r\n\t \tSystem.out.print(elemento.getID()+\" / \");\r\n\t }*/\r\n\t \r\n\t //here we are painting as the best branches foundeded\r\n\t \r\n\t Iterator<Branch> nombreIterator = bestBranches.iterator();\r\n\t while(nombreIterator.hasNext()){\r\n\t \tBranch elemento = nombreIterator.next();\r\n\t \t//System.out.print(elemento.getHeuristicValue()+ \" / \");\r\n\t }\r\n\t \r\n\t \r\n\t //Here we will put the elements on the tile\r\n\t \t//Just here to implement the n screens!\r\n\t for(int i=0;i<maxScreens;i++)\r\n\t {//block from Lelis and Reis (>class GeradorDeFasses)\r\n/*\t \ttry {\r\n\t \t\tLevel levelScreen=PaintElements(((Branch)bestBranches.get(i)).getStates(),this.clone());\t\t\t\t\t\r\n\t\t\t\t\tScreen objScreen=new Screen();\r\n\t\t\t\t\tobjScreen.SaveScreen(levelScreen,odds,objElem);\r\n\t \t\tInformacoesTelas info = new InformacoesTelas();\r\n\t\t\t CopiaArquivos copiador = new CopiaArquivos();\r\n\t\t\t \r\n\t\t\t info = info.carregaInfoTela(\"infoTela\");\r\n\t\t\t\t\tinfo.setOutrasVariaveis(0, 0); // Salva outras informacoes da Tela\r\n\t\t\t\t\tinfo.salvaInfoTela(\"infoTela\", info);\t\t\t\t\t\r\n\t\t\t\t\tcopiador.copy(\"\" + i, \"Screens/\");\r\n\t\t\t\t\t\r\n\t\t\t\t} catch (CloneNotSupportedException e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t} catch (ClassNotFoundException e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}*/\r\n\t }\r\n\t \r\n\t\t\t\r\n\t\t}",
"public DSAQueue depthFirstSearch(String start)\n\t{\n\t\tif(!vertices.isEmpty())\n\t\t{\n\t\t\tDSAQueue queue = new DSAQueue();\n\t\t\tDSAGraphVertex vx = getVertex(start); //vertex to start on (root)\n\t\t\tDSAStack visited = new DSAStack();\t//creates empty stack\n\n\t\t\tclear(); //sets all vertices as not visited\n\t\t\tvx.setVisited(); // Marks root as visited\n\t\t\tqueue.enqueue(vx); //start point\n\n\t\t\tdfs(vx, visited, queue); //begin recursion\n\n\t\t\treturn queue;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthrow new NoSuchElementException(\"List is empty\");\n\t\t}\n\t}",
"@Override\r\n public boolean breadthFirstSearch(T start, T end) {\r\n Vertex<T> startV = vertices.get(start);\r\n Vertex<T> endV = vertices.get(end);\r\n\r\n Queue<Vertex<T>> queue = new LinkedList<Vertex<T>>();\r\n Set<Vertex<T>> visited = new HashSet<>();\r\n\r\n queue.add(startV);\r\n visited.add(startV);\r\n\r\n while(queue.size() > 0){\r\n Vertex<T> next = queue.poll();\r\n if(next == null){\r\n continue;\r\n }\r\n if(next == endV){\r\n return true;\r\n }\r\n\r\n for (Vertex<T> neighbor: next.getNeighbors()){\r\n if(!visited.contains(neighbor)){\r\n visited.add(neighbor);\r\n queue.add(neighbor);\r\n }\r\n }\r\n }\r\n\r\n return false;\r\n }",
"public int breadthFirstSearch(T srcId, T destId)\n {\n if (nodeList.isEmpty())\n {\n System.out.println(\"Empty graph\");\n return -1;\n }\n \n // queue used during the traversal\n LinkedList<QueueNode> queue = new LinkedList();\n \n // keeps track of node which are visited and added into the queue\n HashMap<T, Integer> visited = new HashMap();\n \n // find srcNode with id = srcId in graph\n GraphNode srcNode = nodeList.get(srcId);\n \n // if srcNode is not there in graph, breadth first traversal which starts at srcNode cannot be done \n if (srcNode == null)\n {\n System.out.println(\"Source vertex not found\");\n return -1;\n }\n \n int minNumberTrials = -1;\n \n // add srcNode in queue, mark it as visited\n queue.add(new QueueNode(srcNode, 0));\n visited.put(srcNode.nodeId, 1);\n \n while (!queue.isEmpty())\n {\n QueueNode currentNode = queue.remove();\n \n // if destination node found\n if (currentNode.graphNode.nodeId == destId)\n {\n minNumberTrials = currentNode.level;\n break;\n }\n \n // first neighbor of current graph node\n GraphNode neighbor = currentNode.graphNode.next;\n \n // add all neighbors of current graph node into the queue\n while (neighbor != null)\n {\n // if this neighbor is not visited earlier, mark it as visited\n // add it to the queue at appropriate level\n if (visited.get(neighbor.nodeId) == null)\n {\n visited.put(neighbor.nodeId, 1);\n queue.add(new QueueNode(findGraphNode(neighbor.nodeId), currentNode.level + 1));\n }\n neighbor = neighbor.next; \n }\n }\n \n return minNumberTrials;\n }",
"public void bfs(Queue<Integer> queue, int visited[]) {\n if (queue.isEmpty()) {\n return;\n }\n\n int root = queue.poll();\n\n if (visited[root] == 1) {\n bfs(queue, visited);\n return;//alreadu into consideration\n }\n\n\n System.out.printf(\"Exploring of node %d has started\\n\", root);\n visited[root] = 1;\n\n\n for (int i = 0; i < adjMatrix[root].size(); i++) {\n if (visited[adjMatrix[root].get(i)] == 1 || visited[adjMatrix[root].get(i)] == 2) {\n continue;\n }\n queue.add(adjMatrix[root].get(i));\n }\n bfs(queue, visited);\n System.out.printf(\"Exploring of node %d has end\\n\", root);\n visited[root] = 2;\n }",
"public List<Long> getPath(Long start, Long finish){\n \n \n List<Long> res = new ArrayList<>();\n // auxiliary list\n List<DeixtraObj> serving = new ArrayList<>();\n// nearest vertexes map \n Map<Long,DeixtraObj> optimMap = new HashMap<>();\n// thread save reading \n synchronized (vertexes){ \n // preparation\n for (Map.Entry<Long, Vertex> entry : vertexes.entrySet()) {\n Vertex userVertex = entry.getValue();\n // If it`s start vertex weight = 0 and the nereast vertex is itself \n if(userVertex.getID().equals(start)){\n serving.add(new DeixtraObj(start, 0.0, start));\n }else{\n // For other vertex weight = infinity and the nereast vertex is unknown \n serving.add(new DeixtraObj(userVertex.getID(), Double.MAX_VALUE, null));\n }\n\n } \n // why auxiliary is not empty \n while(serving.size()>0 ){\n // sort auxiliary by weight \n Collections.sort(serving);\n\n \n // remove shortes fom auxiliary and put in to answer \n DeixtraObj minObj = serving.remove(0);\n optimMap.put(minObj.getID(), minObj);\n\n Vertex minVertex = vertexes.get(minObj.getID());\n\n // get all edges from nearest \n for (Map.Entry<Long, Edge> entry : minVertex.allEdges().entrySet()) {\n Long dest = entry.getKey();\n Double wieght = entry.getValue().getWeight();\n // by all remain vertexes \n for(DeixtraObj dx : serving){\n if(dx.getID().equals(dest)){\n // if in checking vertex weight more then nearest vertex weight plus path to cheking \n // then change in checking weight and nearest\n if( (minObj.getWeight()+wieght) < dx.getWeight()){\n dx.setNearest(minVertex.getID());\n dx.setWeight((minObj.getWeight()+wieght));\n }\n }\n }\n }\n\n }\n }\n \n // create output list\n res.add(finish);\n Long point = finish;\n while(!point.equals(start)){\n \n point = ((DeixtraObj)optimMap.get(point)).getNearest();\n res.add(point);\n }\n \n Collections.reverse(res);\n \n \n return res;\n \n }",
"public void dfs (String input)\r\n\t {\r\n\t\t \tNode root_dfs = new Node (input);\r\n\t\t \tNode current = new Node(root_dfs.getState());\r\n\t\t \t\r\n\t\t\tArrayList<String> visited = new ArrayList<String>();\r\n\t\t\tArrayList<String> children = new ArrayList<String>();\r\n\t\t\tStack<Node> stack_dfs = new Stack<Node>();\r\n\t\t\t\r\n\t\t\tint nodes_popped = 0;\r\n\t\t\tint stack_max_size = 0;\r\n\t\t\tint stack_size = 0;\r\n\t\t\tcurrent.cost = 0;\r\n\t\t\t\r\n\t\t\tgoal_dfs = isGoal(current.getState());\r\n\t\t\t\r\n\t\t\twhile(!goal_dfs)\r\n\t\t\t{\r\n\t\t\t\tvisited.add(current.getState());\r\n\t\t\t\tchildren = Successor.findChildren(current.getState());\r\n\t\t\t\t\r\n\t\t\t\tfor (String a : children)\r\n\t\t\t\t{\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (visited.contains(a))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t\tNode nino = new Node(a);\r\n\t\t\t\t\t\tcurrent.children_nodes.add(nino);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tint cost = isCost(current.getState(), nino.getState());\r\n\t\t\t\t\t\tnino.cost = cost;\r\n\t\t\t\t\t\tnino.parent = current;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// Repeated state check\r\n\t\t\t\t\t\tif (!stack_dfs.contains(nino))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tstack_dfs.add(nino);\r\n\t\t\t\t\t\t\tstack_size++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// Popping off the stack. LIFO architecture\r\n\t\t\t\tcurrent = stack_dfs.pop();\r\n\t\t\t\tnodes_popped++;\r\n\t\t\t\t\r\n\t\t\t\tif (stack_size > stack_max_size)\r\n\t\t\t\t{\r\n\t\t\t\t\tstack_max_size = stack_size;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tstack_size--;\r\n\t\t\t\tgoal_dfs = isGoal(current.getState());\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tgoal_dfs = false;\r\n\t\t\tSystem.out.println(\"DFS Solved!!\");\r\n\t\t\tSolution.performSolution(current, root_dfs, nodes_popped, stack_max_size);\r\n\t }",
"void topologicalSort() {\n Stack stack = new Stack();\n\n // Mark all the vertices as not visited\n Boolean visited[] = new Boolean[V];\n for (int i = 0; i < V; i++)\n visited [i] = false;\n\n // Call the recursive helper function to store Topological\n // Sort starting from all vertices one by one\n for (int i = 0; i < V; i++)\n if (visited [i] == false)\n topologicalSortUtil(i, visited, stack);\n\n // Print contents of stack\n while (stack.empty() == false)\n System.out.print(stack.pop() + \" \");\n }",
"public void breadthFirst(Vertex[] vertices ){\n\t\t\n\t\tVertex temp = vertices[0];\n\t\ttemp.state=1; //for tracking the visited nodes, visited/discovered A\n\t\tboolean[] seen = new boolean[vertices.length];\n\t\tQueue<Vertex> q = new LinkedList<Vertex>(); //queue for breadth first traversal\n\t\t\n\t\tq.add(temp); //root node added to queue\n\t\tseen[0] = true;\n\t\tSystem.out.println(\"Begin breadth first traversal: \\n\" + \n\t\t\t\tq.toString());\n\t\t\t\t\n\t\tfor (int i = 0; i < vertices.length; i++){\n\t\t\ttemp = vertices[i];\n\t\t\twhile (!q.isEmpty() ) {\n\t Vertex v = q.remove();\n\t for (int j : v.neighbors) {\n\t if (!seen[j]) {\n\t q.add(vertices[j]);\n\t seen[j] = true;\n\t vertices[j].state=1;\n\t }\n\t }\n\t System.out.println(q.toString());\n \t}\n\t\t}\n\t}",
"private static void disjkstraAlgorithm(Node sourceNode, GraphBuilder graph){\n PriorityQueue<Node> smallestDisQueue = new PriorityQueue<>(graph.nodeArr.size(), new Comparator<Node>() {\n @Override\n public int compare(Node first, Node sec) {\n if(first.distance == Integer.MAX_VALUE && sec.distance == Integer.MAX_VALUE){\n return 0;\n }\n else if(first.distance == Integer.MAX_VALUE && sec.distance != Integer.MAX_VALUE){\n return 1;\n } else if(first.distance != Integer.MAX_VALUE && sec.distance == Integer.MAX_VALUE){\n return -1;\n }\n else\n return (int) (first.distance - sec.distance);\n }\n });\n\n smallestDisQueue.add(sourceNode); //add the node to the queue\n\n // until all vertices are know get the vertex with smallest distance\n\n while(!smallestDisQueue.isEmpty()) {\n\n Node currNode = smallestDisQueue.poll();\n// System.out.println(\"Curr: \");\n// System.out.println(currNode);\n if(currNode.known)\n continue; //do nothing if the currNode is known\n\n currNode.known = true; // otherwise, set it to be known\n\n for(Edge connectedEdge : currNode.connectingEdges){\n Node nextNode = connectedEdge.head;\n if(!nextNode.known){ // Visit all neighbors that are unknown\n\n long weight = connectedEdge.weight;\n if(currNode.distance == Integer.MAX_VALUE){\n continue;\n }\n else if(nextNode.distance == Integer.MAX_VALUE && currNode.distance == Integer.MAX_VALUE) {\n continue;\n }\n\n else if(nextNode.distance> weight + currNode.distance){//Update their distance and path variable\n smallestDisQueue.remove(nextNode); //remove it from the queue\n nextNode.distance = weight + currNode.distance;\n\n smallestDisQueue.add(nextNode); //add it again to the queue\n nextNode.pathFromSouce = currNode;\n\n// System.out.println(\"Next: \");\n// System.out.println(nextNode);\n }\n }\n }\n// System.out.println(\"/////////////\");\n }\n }",
"static void bfs(String label) {\n\n /* Add a graph node to the queue. */\n queue.addLast(label);\n graphVisited.put(label, true);\n\n while (!queue.isEmpty()) {\n\n /* Take a node out of the queue and add it to the list of visited nodes. */\n if (!graphVisited.containsKey(queue.getFirst()))\n graphVisited.put(queue.getFirst(), true);\n\n String str = queue.removeFirst();\n\n /*\n For each unvisited vertex from the list of the adjacent vertices,\n add the vertex to the queue.\n */\n for (String lab : silhouette.get(str)) {\n if (!graphVisited.containsKey(lab) && lab != null && !queue.contains(lab))\n queue.addLast(lab);\n }\n }\n }",
"void bfs(SimpleVertex simpleVertex) {\n\t\twhile (true) {\n\t\t\tif (simpleVertex.isVisited == false) {\n\n\t\t\t\tif (simpleVertex.isAdded == false) {\n\t\t\t\t\tqueue.add(simpleVertex);\n\t\t\t\t\tsimpleVertex.isAdded = true;\n\t\t\t\t}\n\t\t\t\tsimpleVertex.isVisited = true;\n\t\t\t\tSystem.out.print(simpleVertex.Vertexname + \" \");\n\n\t\t\t\tfor (int i = 0; i < simpleVertex.neighborhood.size(); i++) {\n\t\t\t\t\tSimpleEdge node = simpleVertex.neighborhood.get(i);\n\n\t\t\t\t\tif (node.two.isAdded == false)\n\t\t\t\t\t\tqueue.add(node.two);\n\t\t\t\t\tnode.two.isAdded = true;\n\n\t\t\t\t}\n\t\t\t\tqueue.poll();\n\t\t\t\tif (!queue.isEmpty())\n\t\t\t\t\tbfs(queue.peek());\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\n\t}",
"private void bfs() {\n\t\tQueue<Node> q = new ArrayDeque<>();\n\t\tq.add(treeNodes.get(0));\n\t\twhile (!q.isEmpty()) {\n\t\t\tint size = q.size();\n\t\t\tfor (int i = 0; i < size; i++) {\n\t\t\t\tNode curr = q.poll();\n\t\t\t\ttime += curr.informTime;\n\t\t\t\tSet<Node> nextNodes = curr.nextNodes;\n\t\t\t\tif (nextNodes == null || curr.id == treeNodes.get(0).id)\n\t\t\t\t\tcontinue;\n\t\t\t\tfor (Node node : nextNodes) {\n\t\t\t\t\tq.add(node);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t}",
"public void bfs(GraphNode source)\n {\n Queue<GraphNode> q = new ArrayDeque<>();\n q.add(source);\n HashMap<GraphNode,Boolean> visit =\n new HashMap<GraphNode,Boolean>();\n visit.put(source,true);\n while (!q.isEmpty())\n {\n GraphNode u = q.poll();\n System.out.println(\"Value of Node \" + u.val);\n System.out.println(\"Address of Node \" + u);\n if (u.neighbours != null)\n {\n List<GraphNode> v = u.neighbours;\n for (GraphNode g : v)\n {\n if (visit.get(g) == null)\n {\n q.add(g);\n visit.put(g,true);\n }\n }\n }\n }\n System.out.println();\n }",
"void Explore(int vertex){\n // first mark it as true as it has been visited\n visited[vertex]=true;\n\n //now make the pre at the counterPre index this vertex\n pre[counterPre] = vertex;\n // also increase the counterPre for next iteration\n counterPre+=1;\n\n // do exploration\n // using Iterator to iterate the adjList\n Iterator<Integer> i = adjList[vertex].listIterator();\n while(i.hasNext()){\n int ver = i.next();\n\n // check is it visited or not if not then again explore that ver\n if (visited[ver]==false){\n Explore(ver);\n }\n }\n }",
"public static void main(String[] args) {\n // write your code here\n initialize();\n\n\n Sort(profile.getProfile());\n Integer[][][] mas = new Integer[11][11][1];\n\n R.add(Q.pollFirst());\n\n for (Integer[] e : Q) {\n if (DiskCover(e, R, Rant)) {\n R.add(e);\n // Rtmp.add(Q.pollFirst());\n }\n }\n\n FindMaxAngle(R, 0);\n\n Rg = R;\n //Rtmp-R add Q\n list_r.add(R);\n int j = 0;\n boolean flag = false;\n while (!Q.isEmpty()) {\n\n\n list_r.add(FindMaxPolygonCover(Rg));\n\n }\n\n MakePolygon(list_r);\n\n boolean work = true;\n\n do {\n R.clear();\n Gr.getEdge().clear();\n // algorithmConnectivity.setMarketVertexFirst();\n for (int i = 0; i < Gr.getVertex().size(); i++) {\n\n AlgorithmConnectivity algorithmConnectivity = new AlgorithmConnectivity();\n algorithmConnectivity.initializated(Gr.getVertex().size());\n algorithmConnectivity.setMarketVertexFirst();\n algorithmConnectivity.setMarketVertexSecond(i);\n while (algorithmConnectivity.findSecond() != 100) {\n //int a= iterator.next();\n int index = algorithmConnectivity.findSecond();\n algorithmConnectivity.setMarketVertexThird(index);\n algorithmConnectivity = MakeConnection(index, algorithmConnectivity);\n }\n R.add(algorithmConnectivity.getMarket());\n }\n if (!checkConnectionGraf(R)) {\n //MakeConnection(Gr);\n ArrayList<Integer[]> result = new ArrayList<Integer[]>();\n ArrayList<Integer> ver = new ArrayList<Integer>();\n ArrayList<ArrayList<Integer>> v = new ArrayList<ArrayList<Integer>>();\n for (Integer[] p : R) {\n ArrayList<Integer> res = new ArrayList<Integer>();\n ver.clear();\n for (int i = 0; i < p.length; i++) {\n if (p[i] != 1) {\n ver.add(Gr.getVertex().get(i));\n }\n }\n if (ver.size() != 1) {\n // result.add(AddNewRoute(ver));\n // v.add(ver);\n result.addAll(AddNewRoute(ver));\n }\n }\n int minumum = 1000;\n Integer[] place = new Integer[3];\n for (int i = 0; i < result.size(); i++) {\n Integer[] ma = result.get(i);\n if (ma[2] == null) {\n System.out.print(\"\");\n }\n if ((minumum > ma[2]) && (ma[2]) != 0) {\n minumum = ma[2];\n place = ma;\n }\n }\n if (minumum == 1000) {\n for (Integer[] p : R) {\n ver.clear();\n for (int i = 0; i < p.length - 1; i++) {\n if (p[i] == 1) {\n ver.add(Gr.getVertex().get(i));\n }\n }\n result.addAll(AddNewRoute(ver));\n // result.add(AddNewRoute(ver));\n for (int i = 0; i < result.size(); i++) {\n Integer[] ma = result.get(i);\n if (ma[2] == null) {\n System.out.print(\"\");\n }\n if ((minumum > ma[2]) && (ma[2]) != 0) {\n minumum = ma[2];\n place = ma;\n }\n }\n AddNewVertex(place);\n }\n } else {\n AddNewVertex(place);\n }\n } else {\n work = false;\n }\n\n } while (work);\n\n MobileProfile prof = new MobileProfile();\n prof.initialization(Gr.getVertex().size());\n int sum = 0;\n int[][][] massive = profile.getProfile();\n for (int i = 0; i < Gr.getVertex().size(); i++) {\n // sum=sum+massive;\n }\n\n\n zcd = new ZCD();\n\n zcd.setGraphR(Gr);\n\n Iterator<Edges> it = Gr.getEdgeses().iterator();\n boolean fla = false;\n while (it.hasNext()) {\n Edges d = it.next();\n LinkedList<Integer[]> graph_edges = g.getSort_index();\n\n for (int i = 0; i < graph_edges.size(); i++) {\n Integer[] mass = graph_edges.get(i);\n if (checkLine(g.getCoordinate().get(mass[0]), g.getCoordinate().get(mass[1]), Gr.getCoordinate().get(d.getX()), Gr.getCoordinate().get(d.getY()))) {\n if (!fla) {\n Integer[] wr = new Integer[3];\n wr[0] = d.getX();\n wr[1] = d.getY();\n wr[2] = mass[2];\n fla = true;\n zcd.addWrEdges(wr);\n }\n }\n }\n if (!fla) {\n\n Integer[] wr = new Integer[3];\n wr[0] = d.getX();\n wr[1] = d.getY();\n wr[2] = 2;\n\n zcd.addWrEdges(wr);\n\n }\n fla = false;\n }\n\n Edges e = null;\n for (int i = 0; i < Gr.getVertex().size(); i++) {\n int sumwr = 0;\n HashSet<Edges> item = Gr.getEdgeses();\n Iterator<Edges> iterator = item.iterator();\n for (int k = 0; k < zcd.getWrEdges().size(); k++) {\n\n e = iterator.next();\n if (e.checkEdge(i)) {\n Integer[] m = zcd.getWrEdges().get(k);\n sumwr = sumwr + m[2];\n\n }\n\n }\n wr.add(sumwr);\n\n }\n\n int max = 0;\n int count = 0;\n for (int i = 0; i < wr.size(); i++) {\n if (max < wr.get(i)) {\n max = wr.get(i);\n count = i;\n }\n }\n Integer[] a = new Integer[2];\n a[0] = count;\n a[1] = max;\n zcd.setRoot_vertex(a);\n\n\n int number_vertex = 5;\n //ZTC ztc = new ZTC();\n neig = new int[Gr.getVertex().size()][Gr.getVertex().size()];\n for (int i = 0; i < Gr.getVertex().size(); i++) {\n HashSet<Edges> item = Gr.getEdgeses();\n Iterator<Edges> iterator = item.iterator();\n while (iterator.hasNext()) {\n e = iterator.next();\n if (e.checkEdge(i)) {\n\n neig[i][e.getY()] = 1;\n }\n }\n }\n ztc.setNeigboor(neig);\n ztc.addTVertex(a[0]);\n Integer[] zero = new Integer[3];\n zero[0] = a[0];\n zero[1] = 0;\n zero[2] = 0;\n verLmtest.add(zero);\n vertex_be = new boolean[Gr.getVertex().size()];\n int root_number = 5;\n while (ztc.getTvertex().size() != Gr.getVertex().size()) {\n\n LinkedList<Edges> q = new LinkedList<Edges>();\n\n\n count_tree++;\n\n\n LinkedList<Integer> vertext_t = new LinkedList<Integer>(ztc.getTvertex());\n while (vertext_t.size() != 0) {\n // for(int i=0; i<count_tree;i++){\n\n number_vertex = vertext_t.pollFirst();\n weight_edges.clear();\n if (!vertex_be[number_vertex]) {\n vertex_be[number_vertex] = true;\n } else {\n continue;\n }\n\n // if(i<vertext_t.size())\n\n\n HashSet<Edges> item = Gr.getEdgeses();\n Iterator<Edges> iterator = item.iterator();\n // while (iterator.hasNext()) {\n for (int k = 0; k < item.size(); k++) {\n e = iterator.next();\n\n if (e.checkEdge(number_vertex)) {\n\n weight_edges.add(zcd.getWrEdges().get(k));\n q.add(e);\n }\n\n if (q.size() > 1)\n q = sort(weight_edges, q);\n\n\n while (!q.isEmpty()) {\n e = q.pollFirst();\n Integer[] lm = new Integer[3];\n\n\n lm[0] = e.getY();\n lm[1] = 1;\n lm[2] = 0;\n boolean add_flag = true;\n for (int i = 0; i < verLmtest.size(); i++) {\n Integer[] mess = verLmtest.get(i);\n if (e.getY() == mess[0]) {\n add_flag = false;\n }\n }\n if (add_flag) {\n for (int i = 0; i < verLmtest.size(); i++) {\n Integer[] mess = verLmtest.get(i);\n if (e.getX() == mess[0]) {\n mess[2] = mess[2] + 1;\n /* if (e.getX() == root_number) {\n mess[1] = 1;\n } else {\n mess[1] = mess[1] + 1;\n lm[1]=mess[1];\n\n }*/\n verLmtest.set(i, mess);\n break;\n }\n\n }\n for (int i = 0; i < verLmtest.size(); i++) {\n Integer[] mess = verLmtest.get(i);\n if (e.getX() == mess[0]) {\n lm[1] = mess[1] + 1;\n }\n\n }\n\n verLmtest.add(lm);\n } else {\n continue;\n }\n // }\n if (ztc.getTvertex().size() == 1) {\n edgesesTestHash.add(e);\n int x = e.getX();\n int y = e.getY();\n Edges e1 = new Edges(y, x);\n edgesesTestHash.add(e1);\n\n ztc.addEdges(e);\n ztc.addEdges(e1);\n\n ztc.addTVertex(lm[0]);\n // q.removeFirst();\n\n\n } else {\n // edgesTest.add(e);\n int x = e.getX();\n int y = e.getY();\n Edges e1 = new Edges(y, x);\n // disable.add(e);\n // disable.add(e1);\n\n edgesesTestHash.add(e1);\n edgesesTestHash.add(e);\n\n int[][] ad = getNeighboor();\n\n\n if (checkLegal(e, ad)) {\n ztc.addEdges(e);\n ztc.addEdges(e1);\n\n ztc.addTVertex(lm[0]);\n\n // if(q.size()!=0)\n // q.removeFirst();\n } else {\n // q.removeFirst();\n\n Iterator<Edges> edgesIterator = edgesesTestHash.iterator();\n while (edgesIterator.hasNext()) {\n Edges eo = edgesIterator.next();\n if ((eo.getY() == e.getY()) && (eo.getX() == e.getX())) {\n edgesIterator.remove();\n }\n if ((eo.getY() == e1.getY()) && (eo.getX() == e1.getX())) {\n edgesIterator.remove();\n }\n }\n\n verLmtest.removeLast();\n }\n\n\n }\n\n\n }\n\n\n }\n }\n }\n\n ztc.setEdgesesTree(edgesesTestHash);\n ztc.setGr(Gr);\n ConvertDataToJs convertDataToJs=new ConvertDataToJs();\n try {\n convertDataToJs.save(ztc);\n } catch (FileNotFoundException e1) {\n e1.printStackTrace();\n }\n\n System.out.print(\"\");\n\n }",
"void BFS(int s)\n {\n /* List of visited vertices; all false in the beginning) */\n boolean visited[] = new boolean[V];\n\n /* Queue data structure is used for BFS */\n LinkedList<Integer> queue = new LinkedList<>();\n\n /* Mark starting node s as visited and enqueue it */\n visited[s]=true;\n queue.add(s);\n\n /* Until queue is empty, dequeue a single node in queue and look for it's neighboring vertices.\n * If an adjecent node hasn't been visited yet, set it as visited and enqueue this node. s*/\n while (queue.size() != 0)\n {\n /* Dequeue */\n s = queue.poll();\n System.out.print( s + \" \");\n\n /* Get all adjacent vertices */\n Iterator<Integer> i = adj[s].listIterator();\n while (i.hasNext())\n {\n int n = i.next();\n if (!visited[n])\n {\n visited[n] = true;\n queue.add(n);\n }\n }\n }\n }",
"@Override\r\n\tpublic ArrayList<Edge<E>> primMinimumSpanningTree(E src) {\r\n\t\tArrayList<Edge<E>> prim = new ArrayList<Edge<E>>();\r\n\t\tif(containsVertex(src)) {\r\n\t\t\tlastSrc = vertices.get(src);\r\n\t\t\tPriorityQueue<Vertex<E>> pq = new PriorityQueue<Vertex<E>>();\r\n\t\t\tvertices.forEach((E t, Vertex<E> u) -> {\r\n\t\t\t\tu.setDistance(Integer.MAX_VALUE);\r\n\t\t\t\tu.setColor(Color.WHITE);\r\n\t\t\t\tu.setPredecessor(null);\r\n\t\t\t\tpq.offer(u);\r\n\t\t\t});\r\n\t\t\tpq.remove(lastSrc);\r\n\t\t\tlastSrc.setDistance(0);\r\n\t\t\tpq.offer(lastSrc);\r\n\r\n\t\t\twhile(!pq.isEmpty()) {\r\n\t\t\t\tVertex<E> u = pq.poll();\r\n\t\t\t\tfor(Edge<E> ale : adjacencyLists.get(u.getElement())) {\r\n\t\t\t\t\tVertex<E> s = vertices.get(ale.getSrc());\r\n\t\t\t\t\tVertex<E> d = vertices.get(ale.getDst());\r\n\t\t\t\t\tif(d.getColor() == Color.WHITE && d.getDistance() > ale.getWeight()) {\r\n\t\t\t\t\t\tpq.remove(d);\r\n\t\t\t\t\t\tVertex<E> pred = d.getPredecessor();\r\n\t\t\t\t\t\tif(pred != null) { //remove the edge that has ale.dst as dst vertex\r\n\t\t\t\t\t\t\tEdge<E> edgeToRemove = new Edge<>(pred.getElement(), ale.getDst(), 1);\r\n\t\t\t\t\t\t\tprim.remove(edgeToRemove);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\td.setDistance(ale.getWeight());\r\n\t\t\t\t\t\td.setPredecessor(s);\r\n\t\t\t\t\t\tpq.offer(d);\r\n\t\t\t\t\t\tprim.add(ale);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tu.setColor(Color.BLACK);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn prim;\r\n\t}",
"public void BFS(int startingVertex) {\n boolean[] visited = new boolean[numberVertices];\n Queue<Integer> q = new LinkedList<>();\n\n //Add starting vertex\n q.add(startingVertex);\n visited[startingVertex] = true;\n\n //Go through queue adding vertex edges until everything is visited and print out order visited\n while (!q.isEmpty()) {\n int current = q.poll();\n System.out.println(current + \" \");\n for (int e : adj[current]) {\n if (!visited[e]) {\n q.add(e);\n visited[e] = true;\n }\n\n }\n }\n }",
"public boolean pathExists(int startVertex, int stopVertex) {\n// your code here\n ArrayList<Integer> fetch_result = visitAll(startVertex);\n if(fetch_result.contains(stopVertex)){\n return true;\n }\n return false;\n }",
"public static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tint V = sc.nextInt();\n\t\tint E = sc.nextInt();\n\n\t\tList<Integer>[]adjList = new ArrayList[10010];\n\t\tList<Integer>[]reverseAdjList = new ArrayList[10010];\n\n\t\tList<List<Integer>>scc = new ArrayList<List<Integer>>();\n\t\tint visited[] = new int[10010];\n\n\t\tfor(int i = 1 ; i <= V ; i++){\n\t\t\tadjList[i] = new ArrayList<Integer>();\n\t\t\treverseAdjList[i] = new ArrayList<Integer>();\n\t\t}\n\n\t\tfor(int i = 1 ; i <= E ; i++){\n\n\t\t\tint start = sc.nextInt();\n\t\t\tint end = sc.nextInt();\n\t\t\tadjList[start].add(end);\n\t\t\treverseAdjList[end].add(start);\n\t\t}\n\n\n\t\t//선작업 DFS 스택에 담음.\n\t\tStack <Integer>stack = new Stack<Integer>();\n\t\tfor(int i = 1 ; i <= V ; i++){\n\t\t\tif(visited[i] == 0){\n\t\t\t\tdfs(i,visited,stack,adjList);\n\t\t\t}\n\t\t}\n\n\n\t\t//후작업 역 DFS\n\t\tvisited = new int[10010];\n\n\t\tint r = 0;\n\t\twhile(!stack.isEmpty()){\n\n\t\t\tint here = stack.peek();\n\t\t\tstack.pop();\n\t\t\tif(visited[here] == 1){\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tscc.add(new ArrayList<Integer>());\n\t\t\t++r;\n\t\t\treverseDFS(here, r-1, visited, scc, reverseAdjList);\n\n\t\t}\n\n\t\tSystem.out.println(r);\n\t\tfor(int i = 0 ; i < r ; i++){\n\t\t\tList <Integer>temp = scc.get(i);\n\t\t\tCollections.sort(temp);\n\t\t}\n\n\t\tscc.sort(new Comparator<List<Integer>>() {\n\t\t\t@Override\n\t\t\tpublic int compare(List<Integer> o1, List<Integer> o2) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tif(o1.get(0)< o2.get(0)){\n\t\t\t\t\treturn -1;\n\t\t\t\t}else if(o1.get(0) > o2.get(0)){\n\t\t\t\t\treturn 1;\n\t\t\t\t}\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t});\n\n\t\t\tfor(List <Integer>list : scc){\n\t\t\t\tfor(int i = 0 ; i < list.size() ; i++){\n\t\t\t\t\tSystem.out.print(list.get(i) + \" \");\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"-1\");\n\t\t\t}\n\n\t}",
"@Override\n public boolean isConnected() { //i got help from the site https://www.geeksforgeeks.org/shortest-path-unweighted-graph/\n if(this.ga.edgeSize()<this.ga.nodeSize()-1) return false;\n initializeInfo();//initialize all the info fields to be null for the algorithm to work\n if(this.ga.nodeSize()==0||this.ga.nodeSize()==1) return true;//if there is not node or one its connected\n WGraph_DS copy = (WGraph_DS) (copy());//create a copy graph that the algorithm will on it\n LinkedList<node_info> qValues = new LinkedList<>();//create linked list that will storage all nodes that we didn't visit yet\n int firstNodeKey = copy.getV().iterator().next().getKey();//first key for get the first node(its doesnt matter which node\n node_info first = copy.getNode(firstNodeKey);//get the node\n qValues.add(first);//without limiting generality taking the last node added to graph\n int counterVisitedNodes = 0;//counter the times we change info of node to \"visited\"\n while (qValues.size() != 0) {\n node_info current = qValues.removeFirst();\n if (current.getInfo() != null) continue;//if we visit we can skip to the next loop because we have already marked\n current.setInfo(\"visited\");//remark the info\n counterVisitedNodes++;\n\n Collection<node_info> listNeighbors = copy.getV(current.getKey());//create a collection for the neighbors list\n LinkedList<node_info> Neighbors = new LinkedList<>(listNeighbors);//create the neighbors list\n if (Neighbors == null) continue;\n for (node_info n : Neighbors) {\n if (n.getInfo() == null) {//if there is a node we didn't visited it yet, we will insert it to the linkedList\n qValues.add(n);\n }\n }\n }\n if (this.ga.nodeSize() != counterVisitedNodes) return false;//check that we visited all of the nodes\n\n return true;\n }",
"private void BFS(Vertex start, Set<Vertex> visited, Queue<Vertex> queue) {\r\n\t\t// if(visited.contains(start)) return;\r\n\r\n\t\t// Mark the current node as visited and enqueue it\r\n\t\tvisited.add(start);\r\n\t\tqueue.offer(start);\r\n\r\n\t\tVertex currentNode;\r\n\t\tSet<Vertex> neighbors;\r\n\r\n\t\twhile (queue.size() != 0) { // or !queue.isEmpty()\r\n\t\t\t// Dequeue a vertex from queue and print it\r\n\t\t\tcurrentNode = queue.poll();\r\n\t\t\tSystem.out.print(currentNode + \" \");\r\n\r\n\t\t\t// Get all adjacent vertices of the dequeued vertex s\r\n\t\t\t// If a adjacent has not been visited, then mark it\r\n\t\t\t// visited and enqueue it\r\n\t\t\tneighbors = currentNode.getNeighbors();\r\n\r\n\t\t\tfor (Vertex n : neighbors) {\r\n\t\t\t\tif (!visited.contains(n)) {\r\n\t\t\t\t\tvisited.add(n);\r\n\t\t\t\t\tqueue.offer(n);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t/*\r\n\t\t\t * neighbors.forEach(n -> { if (!visited.contains(n)){\r\n\t\t\t * visited.add(n); queue.offer(n); } });\r\n\t\t\t */\r\n\t\t}\r\n\t}",
"public void BFS() {\r\n\t\tSet<Vertex> visited = new HashSet<Vertex>();\r\n\r\n\t\t// Create a queue for BFS\r\n\t\tQueue<Vertex> queue = new LinkedList<Vertex>();\r\n\r\n\t\tBFS(this.vertices[3], visited, queue); // BFS starting with 40\r\n\r\n\t\t// Call the helper function to print BFS traversal\r\n\t\t// starting from all vertices one by one\r\n\t\tfor (int i = 0; i < N; ++i)\r\n\t\t\tif (!visited.contains(this.vertices[i]))\r\n\t\t\t\tBFS(this.vertices[i], visited, queue);\r\n\t}",
"private Queue<Integer> breadthSearch(int i, int j, Queue<Integer> queue, Queue<Integer> path) {\n while(queue.size() != 0) {\n queue.poll();\n }//while\n return new LinkedList();\n }",
"private void depthFirstSearch(DirectedGraph graph, int vertex) {\r\n \r\n visited[vertex] = true;\r\n inRecursionStack[vertex] = true;\r\n \r\n for(int adjacentVertex: graph.adjacentVertices(vertex)) {\r\n if(inRecursionStack[adjacentVertex]) {\r\n throw new IllegalArgumentException(String.format(\"Graph contains a cycle: no topological sort possible: %s -> %s\", vertex, adjacentVertex));\r\n }\r\n \r\n if(!visited[adjacentVertex]) {\r\n depthFirstSearch(graph, adjacentVertex);\r\n }\r\n }\r\n\r\n reversePostOrder.push(vertex); \r\n inRecursionStack[vertex] = false;\r\n }",
"private static void spreadVirus(int v){\n Queue<Integer> queue = new LinkedList<>();\n queue.add(v);\n while(!queue.isEmpty()){\n int temp = queue.poll();\n isVisited[temp]=true;\n for(int i = 1; i<adj[temp].length;i++){\n if(isVisited[i]==false && adj[temp][i]==1){\n queue.add(i);\n isVisited[i]=true;\n maxContamination++;\n }\n }\n }\n }",
"public void BFS() {\n visitedCells = 1;\n\n // Initialize the vertices\n for (int j = 0; j < maze.getGrid().length; j++) {\n for (int k = 0; k < maze.getGrid().length; k++) {\n Cell cell = maze.getGrid()[j][k];\n cell.setColor(\"WHITE\");\n cell.setDistance(0);\n cell.setParent(null);\n }\n }\n\n Cell sourceCell = maze.getGrid()[0][0];\n Cell neighbor = null;\n Cell currentCell;\n int distance = 0;\n\n // Initialize the source node\n sourceCell.setColor(\"GREY\");\n sourceCell.setDistance(0);\n sourceCell.setParent(null);\n\n queue.add(sourceCell);\n\n // Visits each cell until the queue is empty\n while (!queue.isEmpty()) {\n currentCell = queue.remove();\n\n for (int i = 0; i < currentCell.mazeNeighbors.size(); i++) {\n neighbor = currentCell.mazeNeighbors.get(i);\n\n // Stop the search if you reach the final cell\n if (neighbor.x == r - 1 && neighbor.y == r - 1) {\n distance++;\n if (distance == 10)\n distance = 0;\n neighbor.setDistance(distance);\n neighbor.setParent(currentCell);\n neighbor.visited = true;\n visitedCells++;\n break;\n }\n\n // Checks each neighbor and adds it to the queue if its color is white\n if (neighbor.getColor().equalsIgnoreCase(\"WHITE\")) {\n distance++;\n if (distance == 10)\n distance = 0;\n neighbor.setColor(\"GREY\");\n neighbor.setDistance(distance);\n neighbor.setParent(currentCell);\n neighbor.visited = true;\n queue.add(neighbor);\n visitedCells++;\n }\n }\n // Stop the search if you reach the final cell\n if (neighbor.x == r - 1 && neighbor.y == r - 1)\n break;\n\n currentCell.setColor(\"BLACK\");\n }\n }",
"public int [] breadthFirstSearch (int start){\r\n int [] visited = new int[getNumV()];\r\n int[] order = new int[getNumV()];\r\n int index = 0;\r\n int[] parent = new int[getNumV()];\r\n\r\n // parent arrayi, visited arrayi ve order arrayi set edildi\r\n for(int i = start; i<getNumV(); i++){\r\n parent[i] = -1;\r\n visited[i] = -1;\r\n order[index] = i;\r\n index++;\r\n }\r\n //eger baslanilan vertex sifirdan farkli bir vertex ise bu vertex'e kadar ki vertexler de order arrayine eklendi.\r\n if(index<getNumV()-1)\r\n for(int i=0; i<start; i++){\r\n order[index] = i;\r\n index++;\r\n }\r\n\r\n // her vertex uzerinden breadthFirsSearch yapildi.\r\n for(int i = 0; i<getNumV(); i++) {\r\n if(visited[i] == -1)\r\n breadthFirstSearch(order[i], visited, parent);\r\n }\r\n return parent;\r\n }",
"private static void initGraphCheck(int V) {\r\n\t\tdfs_num = new int[V];\r\n\t\tArrays.fill(dfs_num, DFS_WHITE);// reinicio a no visitado\r\n\t\tnumComp = 0;\r\n\t\tdfs_parent = new int[V];\r\n\t\tArrays.fill(dfs_parent, -1);\r\n\r\n\t\tprintThis(\"Graph Edges Property Check\");\r\n\t\tfor (int i = 0; i < V; i++) {\r\n\t\t\tif (dfs_num[i] == DFS_WHITE) {\r\n\t\t\t\tSystem.out.printf(\"Component %d:\\n\", ++numComp);\r\n\t\t\t\tgraphCheck(i);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"static void bridge()\n {\n // Mark all the vertices as not visited\n boolean visited[] = new boolean[V];\n int disc[] = new int[V];\n int low[] = new int[V];\n int parent[] = new int[V];\n \n \n // Initialize parent and visited, and ap(articulation point)\n // arrays\n for (int i = 0; i < V; i++)\n {\n parent[i] = NIL;\n }\n \n // Call the recursive helper function to find Bridges\n // in DFS tree rooted with vertex 'i'\n for (int i = 0; i < V; i++)\n if (!visited[i])\n bridgeUtil(i, visited, disc, low, parent);\n }",
"private static void bfs(int idx) {\n\t\t\n\t\tQueue<node> q =new LinkedList<node>();\n\t\tq.add(new node(idx,0,\"\"));\n\t\twhile (!q.isEmpty()) {\n\t\t\tnode tmp = q.poll();\n\t\t\tif(tmp.idx<0 ||tmp.idx > 200000) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif(tmp.cnt> min) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif(tmp.idx == k) {\n\t\t\t\tif(tmp.cnt < min) {\n\t\t\t\t\tmin = tmp.cnt;\n\t\t\t\t\tminnode = tmp;\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif(!visit[tmp.idx] && tmp.idx<=100000) {\n\t\t\t\tvisit[tmp.idx]= true;\n\t\t\t\tq.add(new node(tmp.idx*2, tmp.cnt+1,tmp.s));\n\t\t\t\tq.add(new node(tmp.idx-1, tmp.cnt+1,tmp.s));\n\t\t\t\tq.add(new node(tmp.idx+1, tmp.cnt+1,tmp.s));\n\t\t\t}\n\t\t}\n\t\t\n\t}",
"static void dfs(int x, int p, int f, int s, int v, int c) {\n\t\t\n\t\tif (p >= mins[0] && f >= mins[1] && s >= mins[2] && v >= mins[3]) {\n\t\t\tif (c<min) {\n\t\t\t\tres = new int[list.size()];\n\t\t\t\tfor (int i=0;i<list.size();i++) {\n\t\t\t\t\tres[i] = list.get(i);\n\t\t\t\t}\n\t\t\t\tmin = c;\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\tSystem.out.println(list);\n\t\tfor (int i = x; i < N; i++) {\n\t\t\tif (!visited[i]) {\n\t\t\t\tlist.add(i);\n\t\t\t\tvisited[i] = true;\n\t\t\t\tdfs(i + 1, p + info[i][0], f + info[i][1], s + info[i][2], v + info[i][3], c + info[i][4]);\n\t\t\t\tlist.remove(list.size() - 1);\n\t\t\t\tvisited[i] = false;\n\t\t\t}\n\t\t}\n\t}",
"public boolean IsCyclic() {\r\n\t\tHashMap<String, Boolean> processed = new HashMap<>();\r\n\t\tLinkedList<Pair> queue = new LinkedList<>();\r\n\r\n\t\tArrayList<String> vnames = new ArrayList<>(vces.keySet());\r\n\t\tfor (String vname : vnames) {\r\n\t\t\tif (processed.containsKey(vname)) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tPair rootpair = new Pair(vname, vname);\r\n\t\t\tqueue.addLast(rootpair);\r\n\t\t\twhile (queue.size() != 0) {\r\n\t\t\t\t// 1. removeFirst\r\n\t\t\t\tPair rp = queue.removeFirst();\r\n\r\n\t\t\t\t// 2. check if processed, mark if not\r\n\t\t\t\tif (processed.containsKey(rp.vname)) {\r\n\t\t\t\t\tSystem.out.println(rp.vname + \" via \" + rp.psf);\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t\tprocessed.put(rp.vname, true);\r\n\r\n\t\t\t\t// 3. Check, if an edge is found\r\n\t\t\t\tSystem.out.println(rp.vname + \" via \" + rp.psf);\r\n\r\n\t\t\t\t// 4. Add the unprocessed nbrs back\r\n\t\t\t\tArrayList<String> nbrnames = new ArrayList<>(rp.vtx.nbrs.keySet());\r\n\t\t\t\tfor (String nbrname : nbrnames) {\r\n\t\t\t\t\tif (!processed.containsKey(nbrname)) {\r\n\t\t\t\t\t\tPair np = new Pair(nbrname, rp.psf + nbrname);\r\n\t\t\t\t\t\tqueue.addLast(np);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}",
"public void DFS() {\r\n for (int i = 0; i < vertexNum; i++) {\r\n DFS(i);\r\n }\r\n }",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint tc = sc.nextInt();\n\t\tfor (int T = 0; T < tc; T++) {\n\t\t\tint V = sc.nextInt();\n\t\t\tint E = sc.nextInt();\n\t\t\tint[][] graph = new int[V][V];\n\t\t\tfor (int i = 0; i < E; i++) {\n\t\t\t\tint start = sc.nextInt();\n\t\t\t\tint end = sc.nextInt();\n\t\t\t\tgraph[start][end] = 1;\n\t\t\t\t// graph[end][start] = 1;\n\t\t\t}\n\n\t\t\tfront = 0;\n\t\t\tstack = new int[V];\n\t\t\tjava.util.Arrays.fill(stack, -1);\n\t\t\tvisited = new int[V];\n\t\t\tfound = false;\n\t\t\tint src = 0;\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tfor (int i = 0; i < V; i++) {\n\t\t\t\t\n\t\t\t\tif(found == false && visited[i] ==0){\n\t\t\t\t\tstack[front++] = i;\n\t\t\t\t\tDFS(graph,i);\n\t\t\t\t}\n\t\t\t\tif(found == true)\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tif(found == true){\n\t\t\t\tSystem.out.println(\"Found\");\n\t\t\t\tfor (int j = 0; j < front; j++) {\n\t\t\t\t\tSystem.out.println(stack[j]);\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tSystem.out.println(\"Not Found\");\n\t\t\t}\n\t\t}\n\t}"
] | [
"0.67004585",
"0.66056025",
"0.6546997",
"0.64391744",
"0.62732387",
"0.6203611",
"0.61844385",
"0.61787134",
"0.60717756",
"0.5993597",
"0.5979016",
"0.5974307",
"0.5973306",
"0.5967415",
"0.5950935",
"0.59344244",
"0.5922533",
"0.5899112",
"0.5885581",
"0.58813006",
"0.5878258",
"0.587824",
"0.58188343",
"0.58099574",
"0.57905906",
"0.5780101",
"0.577451",
"0.574497",
"0.5737008",
"0.572173",
"0.57121974",
"0.57079333",
"0.5691029",
"0.56637824",
"0.56423175",
"0.5626552",
"0.5615277",
"0.56141096",
"0.56138724",
"0.5590644",
"0.55670285",
"0.5562049",
"0.5552096",
"0.55496603",
"0.55419236",
"0.5526611",
"0.550223",
"0.5495282",
"0.54900384",
"0.5486385",
"0.54772735",
"0.54747987",
"0.5473219",
"0.5463561",
"0.54616755",
"0.5438929",
"0.5426637",
"0.5417705",
"0.5408434",
"0.5401971",
"0.53933734",
"0.5386417",
"0.5383654",
"0.5383141",
"0.53799134",
"0.53730375",
"0.5370599",
"0.5365029",
"0.53599346",
"0.5355697",
"0.5345886",
"0.53407055",
"0.5335514",
"0.5329118",
"0.53265065",
"0.53228766",
"0.5321024",
"0.5318662",
"0.53183156",
"0.53180504",
"0.5316273",
"0.5314787",
"0.5312013",
"0.529071",
"0.5289938",
"0.5289775",
"0.5281605",
"0.52787536",
"0.52783173",
"0.52779526",
"0.5268446",
"0.52591705",
"0.52501506",
"0.5249288",
"0.52489173",
"0.52372193",
"0.523607",
"0.52312934",
"0.523079",
"0.52302223"
] | 0.6060188 | 9 |
IMPORT: none EXPORT: count (integer) ASSERTION: helper method for traversal methods iterates through vertices list and clears visited from each | public void clear()
{
Iterator<DSAGraphVertex> itr = vertices.iterator();
while(itr.hasNext())
{
itr.next().clearVisited();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void clearVisited(){\r\n\t\tfor(int i=0; i<graphSize; i++){\r\n\t\t\tmyGraph[i].visited = false;\r\n\t\t\tAdjVertex vert = myGraph[i].adjVertexHead;\r\n\t\t\twhile(vert != null){\r\n\t\t\t\tvert.visited = false;\r\n\t\t\t\tvert= vert.next;\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void dfs() {\n\t\tfor (Vertice v : vertices) {\n\t\t\tv.setVisited(false);\n\t\t}\n\t\tfor (Vertice v : vertices) {\n\t\t\tif (!v.getVisited()) {\n\t\t\t\tVisitar(v, -1);\n\t\t\t}\n\t\t}\n\t}",
"public native VertexList clear();",
"public void clearVisited()\n {\n visited = false;\n }",
"public int getVertexCount();",
"public void DFS() {\r\n for (int i = 0; i < vertexNum; i++) {\r\n DFS(i);\r\n }\r\n }",
"public void markAllNodesAsUnvisited() {\r\n visitedToken++;\r\n }",
"@Override\n public void clearVertices()\n {\n // Shouldn't clear vertices\n }",
"void dfs(){\n // start from the index 0\n for (int vertex=0; vertex<v; vertex++){\n // check visited or not\n if (visited[vertex]==false){\n Explore(vertex);\n }\n }\n }",
"public void UpNumberOfVisitedNodes() {\n NumberOfVisitedNodes++;\n }",
"public void DFS() {\r\n\t\tSet<Vertex> visited = new HashSet<Vertex>();\r\n\r\n\t\t// Create a stack for DFS\r\n\t\tStack<Vertex> stack = new Stack<Vertex>();\r\n\r\n\t\tDFS(this.vertices[3], visited, stack); // DFS starting with 40\r\n\r\n\t\t// Call the helper function to print DFS traversal\r\n\t\t// starting from all vertices one by one\r\n\t\tfor (int i = 0; i < N; ++i)\r\n\t\t\tif (!visited.contains(this.vertices[i]))\r\n\t\t\t\tDFS(this.vertices[i], visited, stack);\r\n\t}",
"void DFS() {\n \t\n \t// Mark all the vertices as not visited(set as false by default in java) \n \tboolean visited[] = new boolean[V];\n \t\n \t// Call the recursive helper function to print DFS traversal \n // starting from all vertices one by one \n \tfor (int i=0; i<V; i++) { \n \t\t if (visited[i] == false)\n \t\t\t DFSUtil(i, visited);\n \t}\n }",
"public void testRemoveAllVertices() {\n System.out.println(\"removeAllVertices\");\n\n Graph<Integer, Edge<Integer>> graph = generateGraph();\n Assert.assertTrue(graph.removeAllVertices());\n Assert.assertEquals(graph.verticesSet().size(), 0);\n }",
"public abstract int getVertexCount();",
"@Override\r\n public int size() {\r\n return vertices.size();\r\n }",
"public void testRemoveVertex() {\n System.out.println(\"removeVertex\");\n\n Graph<Integer, Edge<Integer>> graph = generateGraph();\n for (int i = 24; i >= 0; i--) {\n Assert.assertTrue(graph.removeVertex(new Integer(i)));\n Assert.assertFalse(graph.containsVertex(new Integer(i)));\n Assert.assertEquals(graph.verticesSet().size(), i);\n }\n }",
"public void resetVisited() {\n\t\tthis.visited = new HashSet<Point>();\n\t}",
"public void dfs() {\n int currentVertexIndex = 0;\r\n dfsStack.push(0);\r\n vertexList[0].wasVisited = true;\r\n System.out.println(vertexList[dfsStack.peek()]);\r\n while (dfsStack.top != -1) {\r\n\r\n\r\n currentVertexIndex = this.getAdjUnvisitedVert(dfsStack.peek());\r\n if (currentVertexIndex != -1) {\r\n dfsStack.push(currentVertexIndex);\r\n vertexList[currentVertexIndex].wasVisited = true;\r\n System.out.println(vertexList[dfsStack.peek()]);\r\n\r\n\r\n } else {\r\n currentVertexIndex = dfsStack.pop();\r\n\r\n }\r\n }\r\n// reset wasVisted\r\n for (Vertex x : vertexList) {\r\n x.wasVisited = false;\r\n }\r\n }",
"private void clean() {\n Iterable<Long> v = vertices();\n Iterator<Long> iter = v.iterator();\n while (iter.hasNext()) {\n Long n = iter.next();\n if (world.get(n).adj.size() == 0) {\n iter.remove();\n }\n }\n }",
"private void setAllUnvisited(){\n\t\tfor(int i = 0; i < this.getDimension(); i++)\n\t\t\tthis.getGraph().setUnvisited(i);\n\t\tthis.visited = 0;\n\t}",
"private void DFS() {\n\t\tfor(Node node: nodeList) {\r\n\t\t\tif(!node.isVisited())\r\n\t\t\t\tdfsVisit(node);\r\n\t\t}\r\n\t}",
"@Test\r\n void add_20_remove_20_add_20() {\r\n //Add 20\r\n for(int i = 0; i < 20; i++) {\r\n graph.addVertex(\"\" +i);\r\n }\r\n vertices = graph.getAllVertices();\r\n //Check all 20 are in graph\r\n for(int i = 0; i < 20; i++) {\r\n if(!vertices.contains(\"\" + i)) {\r\n fail();\r\n }\r\n }\r\n //Remove 20 \r\n for(int i = 0; i < 20; i++) {\r\n graph.removeVertex(\"\" +i);\r\n }\r\n //Check all 20 are not in graph anymore \r\n \r\n for(int i = 0; i < 20; i++) {\r\n if(vertices.contains(\"\" + i)) {\r\n fail();\r\n }\r\n }\r\n //Add 20 again\r\n for(int i = 0; i < 20; i++) {\r\n graph.addVertex(\"\" +i);\r\n }\r\n //Check all 20 are in graph\r\n for(int i = 0; i < 20; i++) {\r\n if(!vertices.contains(\"\" + i)) {\r\n fail();\r\n }\r\n }\r\n }",
"int getNumberOfVertexes();",
"DFS(int vertices) {\n\t\tlist = new ArrayList<ArrayList<Integer>>(vertices);\n\t\tvis = new boolean[vertices];\n\n\t\tfor (int i = 0; i < vertices; i++) {\n\t\t\tlist.add(new ArrayList<Integer>());\n\t\t}\n\t}",
"public long getVertexCount(){\n return vertexCount;\n }",
"public void reset() {\n for (Vertex v : vertices) {\n v.path = false;\n v.visited = false;\n }\n b = new BreadthFirst(vertices);\n d = new DepthFirst(vertices);\n p = new Player(vertices);\n }",
"void Explore(int vertex){\n // first mark it as true as it has been visited\n visited[vertex]=true;\n\n //now make the pre at the counterPre index this vertex\n pre[counterPre] = vertex;\n // also increase the counterPre for next iteration\n counterPre+=1;\n\n // do exploration\n // using Iterator to iterate the adjList\n Iterator<Integer> i = adjList[vertex].listIterator();\n while(i.hasNext()){\n int ver = i.next();\n\n // check is it visited or not if not then again explore that ver\n if (visited[ver]==false){\n Explore(ver);\n }\n }\n }",
"public void depthFirstTraverse() {\n\t\tInteger first = (Integer) edges.keySet().toArray()[0];\n\t\t// track whether vertex was visited\n\t\tHashMap<Integer, Boolean> visited = buildVisited();\n\t\tdepthFirstTraverse(first, visited);\n\t}",
"@Override\r\n\tpublic void DFS() {\r\n\t\tvertices.forEach((E e, Vertex<E> u) -> {\r\n\t\t\tu.setColor(Color.WHITE);\r\n\t\t\tu.setPredecessor(null);\r\n\t\t});\r\n\t\tDFStime = 0;\r\n\t\tvertices.forEach((E e, Vertex<E> u) -> {\r\n\t\t\tif(u.getColor() == Color.WHITE) {\r\n\t\t\t\tDFSVisit(u);\r\n\t\t\t}\r\n\t\t});\r\n\t}",
"private void clean() {\n // TODO: Your code here.\n for (Long id : vertices()) {\n if (adj.get(id).size() == 1) {\n adj.remove(id);\n }\n }\n }",
"void DFS(int head) {\n //visited boolean array maintained to keep track of visited nodes and to avoid infinite looping\n boolean visited[] = new boolean[V+1];\n if(visited[head] == false)\n DFS(head,visited);\n\n System.out.println(V-connected);\n }",
"public int size() {\n\t\treturn vertices.size();\n\t}",
"void DFS(int v) {\n\t\t\tboolean visited[] = new boolean[number_of_vertices];\n\t\t\t\n\t\t\t//in case that the vertex are not connected, I need to make DFS for all\n\t\t\t//available vertex and checking before if they are not visited\n\t\t\tfor(int i = 0 ; i < number_of_vertices; i++) {\n\t\t\t\tif(visited[i] == false)\n\t\t\t\t\tDFSUtil(v, visited);\n\t\t\t}\n\t\t}",
"public void testVerticesSet() {\n System.out.println(\"verticesSet\");\n\n Assert.assertTrue(generateGraph().verticesSet().size() == 25);\n }",
"private static void depthFirstSearch(Vertex v, ArrayList<Vertex> visitedArrayList, Graph graph){\n visitedArrayList.add(v);\n Iterator<Vertex> iter=graph.getNeighbors(v).iterator();\n while (iter.hasNext()){\n Vertex v1=iter.next();\n if(!visitedArrayList.contains(v1)){\n depthFirstSearch(v1,visitedArrayList,graph);\n }\n }\n for(Vertex v1 : graph.getNeighbors(v)){\n if(!visitedArrayList.contains(v1)){\n depthFirstSearch(v1,visitedArrayList,graph);\n }\n }\n }",
"void DFSUtil(int v, boolean visited[]) {\n // Mark the current node as visited and print it\n visited [v] = true;\n System.out.print(v + \" \");\n\n // Recur for all the vertices adjacent to this vertex\n Iterator<Integer> i = adj [v].listIterator();\n while (i.hasNext()) {\n int n = i.next();\n if (!visited [n])\n DFSUtil(n, visited);\n }\n }",
"public void clearNodeVisitedMarking() {\n\tfor (Node n : nodes)\n\t n.clearVisitedMark();\n }",
"public void resetVisited() {\r\n\t\tvisited = false;\r\n\t\tfor (ASTNode child : getChildren()) {\r\n\t\t\tif (!visited)\r\n\t\t\t\tcontinue;\r\n\t\t\tchild.resetVisited();\r\n\t\t}\r\n\t}",
"public int getVertexCount() {\n return vertexCount;\n }",
"public int getChildCount(V vertex);",
"@SuppressWarnings(\"unchecked\")\n public void clearGraph()\n {\n if (adjList == null)\n adjList = new LinkedList[numVertices];\n numEdges = 0;\n for (int i=0; i < numVertices; i++)\n adjList[i] = new LinkedList<Integer>();\n }",
"@Test\n\tpublic void verticesTest() {\n\t\tgraph.addVertex(A);\n\t\tgraph.addVertex(B);\n\t\tgraph.addVertex(C);\n\t\tgraph.addVertex(D);\n\t\tassertEquals(4, graph.vertices().size());\n\t\tassertTrue(graph.vertices().contains(A));\n\t\tassertTrue(graph.vertices().contains(D));\n\t}",
"public void clear() {\n\t\tvisited = false;\n\t}",
"@Override\n public long[ ][ ] count() {\n // precompute common nodes\n for (int x = 0; x < n; x++) {\n for (int n1 = 0; n1 < deg[x]; n1++) {\n int a = adj[x][n1];\n for (int n2 = n1 + 1; n2 < deg[x]; n2++) {\n int b = adj[x][n2];\n Tuple ab = createTuple(a, b);\n common2.put(ab, common2.getOrDefault(ab, 0) + 1);\n for (int n3 = n2 + 1; n3 < deg[x]; n3++) {\n int c = adj[x][n3];\n boolean st = adjacent(adj[a], b) ? (adjacent(adj[a], c) || adjacent(adj[b], c)) :\n (adjacent(adj[a], c) && adjacent(adj[b], c));\n if (!st) continue;\n Tuple abc = createTuple(a, b, c);\n common3.put(abc, common3.getOrDefault(abc, 0) + 1);\n }\n }\n }\n }\n\n // precompute triangles that span over edges\n int[ ] tri = countTriangles();\n\n // count full graphlets\n long[ ] C5 = new long[n];\n int[ ] neigh = new int[n];\n int[ ] neigh2 = new int[n];\n int nn, nn2;\n for (int x = 0; x < n; x++) {\n for (int nx = 0; nx < deg[x]; nx++) {\n int y = adj[x][nx];\n if (y >= x) break;\n nn = 0;\n for (int ny = 0; ny < deg[y]; ny++) {\n int z = adj[y][ny];\n if (z >= y) break;\n if (adjacent(adj[x], z)) {\n neigh[nn++] = z;\n }\n }\n for (int i = 0; i < nn; i++) {\n int z = neigh[i];\n nn2 = 0;\n for (int j = i + 1; j < nn; j++) {\n int zz = neigh[j];\n if (adjacent(adj[z], zz)) {\n neigh2[nn2++] = zz;\n }\n }\n for (int i2 = 0; i2 < nn2; i2++) {\n int zz = neigh2[i2];\n for (int j2 = i2 + 1; j2 < nn2; j2++) {\n int zzz = neigh2[j2];\n if (adjacent(adj[zz], zzz)) {\n C5[x]++;\n C5[y]++;\n C5[z]++;\n C5[zz]++;\n C5[zzz]++;\n }\n }\n }\n }\n }\n }\n\n int[ ] common_x = new int[n];\n int[ ] common_x_list = new int[n];\n int ncx = 0;\n int[ ] common_a = new int[n];\n int[ ] common_a_list = new int[n];\n int nca = 0;\n\n // set up a system of equations relating orbit counts\n for (int x = 0; x < n; x++) {\n for (int i = 0; i < ncx; i++) common_x[common_x_list[i]] = 0;\n ncx = 0;\n\n // smaller graphlets\n orbit[x][0] = deg[x];\n for (int nx1 = 0; nx1 < deg[x]; nx1++) {\n int a = adj[x][nx1];\n for (int nx2 = nx1 + 1; nx2 < deg[x]; nx2++) {\n int b = adj[x][nx2];\n if (adjacent(adj[a], b)) orbit[x][3]++;\n else orbit[x][2]++;\n }\n for (int na = 0; na < deg[a]; na++) {\n int b = adj[a][na];\n if (b != x && !adjacent(adj[x], b)) {\n orbit[x][1]++;\n if (common_x[b] == 0) common_x_list[ncx++] = b;\n common_x[b]++;\n }\n }\n }\n\n long f_71 = 0, f_70 = 0, f_67 = 0, f_66 = 0, f_58 = 0, f_57 = 0; // 14\n long f_69 = 0, f_68 = 0, f_64 = 0, f_61 = 0, f_60 = 0, f_55 = 0, f_48 = 0, f_42 = 0, f_41 = 0; // 13\n long f_65 = 0, f_63 = 0, f_59 = 0, f_54 = 0, f_47 = 0, f_46 = 0, f_40 = 0; // 12\n long f_62 = 0, f_53 = 0, f_51 = 0, f_50 = 0, f_49 = 0, f_38 = 0, f_37 = 0, f_36 = 0; // 8\n long f_44 = 0, f_33 = 0, f_30 = 0, f_26 = 0; // 11\n long f_52 = 0, f_43 = 0, f_32 = 0, f_29 = 0, f_25 = 0; // 10\n long f_56 = 0, f_45 = 0, f_39 = 0, f_31 = 0, f_28 = 0, f_24 = 0; // 9\n long f_35 = 0, f_34 = 0, f_27 = 0, f_18 = 0, f_16 = 0, f_15 = 0; // 4\n long f_17 = 0; // 5\n long f_22 = 0, f_20 = 0, f_19 = 0; // 6\n long f_23 = 0, f_21 = 0; // 7\n\n for (int nx1 = 0; nx1 < deg[x]; nx1++) {\n int a = inc[x][nx1]._1, xa = inc[x][nx1]._2;\n\n for (int i = 0; i < nca; i++) common_a[common_a_list[i]] = 0;\n nca = 0;\n for (int na = 0; na < deg[a]; na++) {\n int b = adj[a][na];\n for (int nb = 0; nb < deg[b]; nb++) {\n int c = adj[b][nb];\n if (c == a || adjacent(adj[a], c)) continue;\n if (common_a[c] == 0) common_a_list[nca++] = c;\n common_a[c]++;\n }\n }\n\n // x = orbit-14 (tetrahedron)\n for (int nx2 = nx1 + 1; nx2 < deg[x]; nx2++) {\n int b = inc[x][nx2]._1, xb = inc[x][nx2]._2;\n if (!adjacent(adj[a], b)) continue;\n for (int nx3 = nx2 + 1; nx3 < deg[x]; nx3++) {\n int c = inc[x][nx3]._1, xc = inc[x][nx3]._2;\n if (!adjacent(adj[a], c) || !adjacent(adj[b], c)) continue;\n orbit[x][14]++;\n f_70 += common3.getOrDefault(createTuple(a, b, c), 0) - 1;\n f_71 += (tri[xa] > 2 && tri[xb] > 2) ? (common3.getOrDefault(createTuple(x, a, b), 0) - 1) : 0;\n f_71 += (tri[xa] > 2 && tri[xc] > 2) ? (common3.getOrDefault(createTuple(x, a, c), 0) - 1) : 0;\n f_71 += (tri[xb] > 2 && tri[xc] > 2) ? (common3.getOrDefault(createTuple(x, b, c), 0) - 1) : 0;\n f_67 += tri[xa] - 2 + tri[xb] - 2 + tri[xc] - 2;\n f_66 += common2.getOrDefault(createTuple(a, b), 0) - 2;\n f_66 += common2.getOrDefault(createTuple(a, c), 0) - 2;\n f_66 += common2.getOrDefault(createTuple(b, c), 0) - 2;\n f_58 += deg[x] - 3;\n f_57 += deg[a] - 3 + deg[b] - 3 + deg[c] - 3;\n }\n }\n\n // x = orbit-13 (diamond)\n for (int nx2 = 0; nx2 < deg[x]; nx2++) {\n int b = inc[x][nx2]._1, xb = inc[x][nx2]._2;\n if (!adjacent(adj[a], b)) continue;\n for (int nx3 = nx2 + 1; nx3 < deg[x]; nx3++) {\n int c = inc[x][nx3]._1, xc = inc[x][nx3]._2;\n if (!adjacent(adj[a], c) || adjacent(adj[b], c)) continue;\n orbit[x][13]++;\n f_69 += (tri[xb] > 1 && tri[xc] > 1) ? (common3.getOrDefault(createTuple(x, b, c), 0) - 1) : 0;\n f_68 += common3.getOrDefault(createTuple(a, b, c), 0) - 1;\n f_64 += common2.getOrDefault(createTuple(b, c), 0) - 2;\n f_61 += tri[xb] - 1 + tri[xc] - 1;\n f_60 += common2.getOrDefault(createTuple(a, b), 0) - 1;\n f_60 += common2.getOrDefault(createTuple(a, c), 0) - 1;\n f_55 += tri[xa] - 2;\n f_48 += deg[b] - 2 + deg[c] - 2;\n f_42 += deg[x] - 3;\n f_41 += deg[a] - 3;\n }\n }\n\n // x = orbit-12 (diamond)\n for (int nx2 = nx1 + 1; nx2 < deg[x]; nx2++) {\n int b = inc[x][nx2]._1, xb = inc[x][nx2]._2;\n if (!adjacent(adj[a], b)) continue;\n for (int na = 0; na < deg[a]; na++) {\n int c = inc[a][na]._1, ac = inc[a][na]._2;\n if (c == x || adjacent(adj[x], c) || !adjacent(adj[b], c)) continue;\n orbit[x][12]++;\n f_65 += (tri[ac] > 1) ? common3.getOrDefault(createTuple(a, b, c), 0) : 0;\n f_63 += common_x[c] - 2;\n f_59 += tri[ac] - 1 + common2.getOrDefault(createTuple(b, c), 0) - 1;\n f_54 += common2.getOrDefault(createTuple(a, b), 0) - 2;\n f_47 += deg[x] - 2;\n f_46 += deg[c] - 2;\n f_40 += deg[a] - 3 + deg[b] - 3;\n }\n }\n\n // x = orbit-8 (cycle)\n for (int nx2 = nx1 + 1; nx2 < deg[x]; nx2++) {\n int b = inc[x][nx2]._1, xb = inc[x][nx2]._2;\n if (adjacent(adj[a], b)) continue;\n for (int na = 0; na < deg[a]; na++) {\n int c = inc[a][na]._1, ac = inc[a][na]._2;\n if (c == x || adjacent(adj[x], c) || !adjacent(adj[b], c)) continue;\n orbit[x][8]++;\n f_62 += (tri[ac] > 0) ? common3.getOrDefault(createTuple(a, b, c), 0) : 0;\n f_53 += tri[xa] + tri[xb];\n f_51 += tri[ac] + common2.getOrDefault(createTuple(c, b), 0);\n f_50 += common_x[c] - 2;\n f_49 += common_a[b] - 2;\n f_38 += deg[x] - 2;\n f_37 += deg[a] - 2 + deg[b] - 2;\n f_36 += deg[c] - 2;\n }\n }\n\n // x = orbit-11 (paw)\n for (int nx2 = nx1 + 1; nx2 < deg[x]; nx2++) {\n int b = inc[x][nx2]._1, xb = inc[x][nx2]._2;\n if (!adjacent(adj[a], b)) continue;\n for (int nx3 = 0; nx3 < deg[x]; nx3++) {\n int c = inc[x][nx3]._1, xc = inc[x][nx3]._2;\n if (c == a || c == b || adjacent(adj[a], c) || adjacent(adj[b], c)) continue;\n orbit[x][11]++;\n f_44 += tri[xc];\n f_33 += deg[x] - 3;\n f_30 += deg[c] - 1;\n f_26 += deg[a] - 2 + deg[b] - 2;\n }\n }\n\n // x = orbit-10 (paw)\n for (int nx2 = 0; nx2 < deg[x]; nx2++) {\n int b = inc[x][nx2]._1, xb = inc[x][nx2]._2;\n if (!adjacent(adj[a], b)) continue;\n for (int nb = 0; nb < deg[b]; nb++) {\n int c = inc[b][nb]._1, bc = inc[b][nb]._2;\n if (c == x || c == a || adjacent(adj[a], c) || adjacent(adj[x], c)) continue;\n orbit[x][10]++;\n f_52 += common_a[c] - 1;\n f_43 += tri[bc];\n f_32 += deg[b] - 3;\n f_29 += deg[c] - 1;\n f_25 += deg[a] - 2;\n }\n }\n\n // x = orbit-9 (paw)\n for (int na1 = 0; na1 < deg[a]; na1++) {\n int b = inc[a][na1]._1, ab = inc[a][na1]._2;\n if (b == x || adjacent(adj[x], b)) continue;\n for (int na2 = na1 + 1; na2 < deg[a]; na2++) {\n int c = inc[a][na2]._1, ac = inc[a][na2]._2;\n if (c == x || !adjacent(adj[b], c) || adjacent(adj[x], c)) continue;\n orbit[x][9]++;\n f_56 += (tri[ab] > 1 && tri[ac] > 1) ? common3.getOrDefault(createTuple(a, b, c), 0) : 0;\n f_45 += common2.getOrDefault(createTuple(b, c), 0) - 1;\n f_39 += tri[ab] - 1 + tri[ac] - 1;\n f_31 += deg[a] - 3;\n f_28 += deg[x] - 1;\n f_24 += deg[b] - 2 + deg[c] - 2;\n }\n }\n\n // x = orbit-4 (path)\n for (int na = 0; na < deg[a]; na++) {\n int b = inc[a][na]._1, ab = inc[a][na]._2;\n if (b == x || adjacent(adj[x], b)) continue;\n for (int nb = 0; nb < deg[b]; nb++) {\n int c = inc[b][nb]._1, bc = inc[b][nb]._2;\n if (c == a || adjacent(adj[a], c) || adjacent(adj[x], c)) continue;\n orbit[x][4]++;\n f_35 += common_a[c] - 1;\n f_34 += common_x[c];\n f_27 += tri[bc];\n f_18 += deg[b] - 2;\n f_16 += deg[x] - 1;\n f_15 += deg[c] - 1;\n }\n }\n\n // x = orbit-5 (path)\n for (int nx2 = 0; nx2 < deg[x]; nx2++) {\n int b = inc[x][nx2]._1, xb = inc[x][nx2]._2;\n if (b == a || adjacent(adj[a], b)) continue;\n for (int nb = 0; nb < deg[b]; nb++) {\n int c = inc[b][nb]._1, bc = inc[b][nb]._2;\n if (c == x || adjacent(adj[a], c) || adjacent(adj[x], c)) continue;\n orbit[x][5]++;\n f_17 += deg[a] - 1;\n }\n }\n\n // x = orbit-6 (claw)\n for (int na1 = 0; na1 < deg[a]; na1++) {\n int b = inc[a][na1]._1, ab = inc[a][na1]._2;\n if (b == x || adjacent(adj[x], b)) continue;\n for (int na2 = na1 + 1; na2 < deg[a]; na2++) {\n int c = inc[a][na2]._1, ac = inc[a][na2]._2;\n if (c == x || adjacent(adj[x], c) || adjacent(adj[b], c)) continue;\n orbit[x][6]++;\n f_22 += deg[a] - 3;\n f_20 += deg[x] - 1;\n f_19 += deg[b] - 1 + deg[c] - 1;\n }\n }\n\n // x = orbit-7 (claw)\n for (int nx2 = nx1 + 1; nx2 < deg[x]; nx2++) {\n int b = inc[x][nx2]._1, xb = inc[x][nx2]._2;\n if (adjacent(adj[a], b)) continue;\n for (int nx3 = nx2 + 1; nx3 < deg[x]; nx3++) {\n int c = inc[x][nx3]._1, xc = inc[x][nx3]._2;\n if (adjacent(adj[a], c) || adjacent(adj[b], c)) continue;\n orbit[x][7]++;\n f_23 += deg[x] - 3;\n f_21 += deg[a] - 1 + deg[b] - 1 + deg[c] - 1;\n }\n }\n }\n\n // solve equations\n orbit[x][72] = C5[x];\n orbit[x][71] = (f_71 - 12 * orbit[x][72]) / 2;\n orbit[x][70] = (f_70 - 4 * orbit[x][72]);\n orbit[x][69] = (f_69 - 2 * orbit[x][71]) / 4;\n orbit[x][68] = (f_68 - 2 * orbit[x][71]);\n orbit[x][67] = (f_67 - 12 * orbit[x][72] - 4 * orbit[x][71]);\n orbit[x][66] = (f_66 - 12 * orbit[x][72] - 2 * orbit[x][71] - 3 * orbit[x][70]);\n orbit[x][65] = (f_65 - 3 * orbit[x][70]) / 2;\n orbit[x][64] = (f_64 - 2 * orbit[x][71] - 4 * orbit[x][69] - 1 * orbit[x][68]);\n orbit[x][63] = (f_63 - 3 * orbit[x][70] - 2 * orbit[x][68]);\n orbit[x][62] = (f_62 - 1 * orbit[x][68]) / 2;\n orbit[x][61] = (f_61 - 4 * orbit[x][71] - 8 * orbit[x][69] - 2 * orbit[x][67]) / 2;\n orbit[x][60] = (f_60 - 4 * orbit[x][71] - 2 * orbit[x][68] - 2 * orbit[x][67]);\n orbit[x][59] = (f_59 - 6 * orbit[x][70] - 2 * orbit[x][68] - 4 * orbit[x][65]);\n orbit[x][58] = (f_58 - 4 * orbit[x][72] - 2 * orbit[x][71] - 1 * orbit[x][67]);\n orbit[x][57] = (f_57 - 12 * orbit[x][72] - 4 * orbit[x][71] - 3 * orbit[x][70] - 1 * orbit[x][67] - 2 * orbit[x][66]);\n orbit[x][56] = (f_56 - 2 * orbit[x][65]) / 3;\n orbit[x][55] = (f_55 - 2 * orbit[x][71] - 2 * orbit[x][67]) / 3;\n orbit[x][54] = (f_54 - 3 * orbit[x][70] - 1 * orbit[x][66] - 2 * orbit[x][65]) / 2;\n orbit[x][53] = (f_53 - 2 * orbit[x][68] - 2 * orbit[x][64] - 2 * orbit[x][63]);\n orbit[x][52] = (f_52 - 2 * orbit[x][66] - 2 * orbit[x][64] - 1 * orbit[x][59]) / 2;\n orbit[x][51] = (f_51 - 2 * orbit[x][68] - 2 * orbit[x][63] - 4 * orbit[x][62]);\n orbit[x][50] = (f_50 - 1 * orbit[x][68] - 2 * orbit[x][63]) / 3;\n orbit[x][49] = (f_49 - 1 * orbit[x][68] - 1 * orbit[x][64] - 2 * orbit[x][62]) / 2;\n orbit[x][48] = (f_48 - 4 * orbit[x][71] - 8 * orbit[x][69] - 2 * orbit[x][68] - 2 * orbit[x][67] - 2 * orbit[x][64] - 2 * orbit[x][61] - 1 * orbit[x][60]);\n orbit[x][47] = (f_47 - 3 * orbit[x][70] - 2 * orbit[x][68] - 1 * orbit[x][66] - 1 * orbit[x][63] - 1 * orbit[x][60]);\n orbit[x][46] = (f_46 - 3 * orbit[x][70] - 2 * orbit[x][68] - 2 * orbit[x][65] - 1 * orbit[x][63] - 1 * orbit[x][59]);\n orbit[x][45] = (f_45 - 2 * orbit[x][65] - 2 * orbit[x][62] - 3 * orbit[x][56]);\n orbit[x][44] = (f_44 - 1 * orbit[x][67] - 2 * orbit[x][61]) / 4;\n orbit[x][43] = (f_43 - 2 * orbit[x][66] - 1 * orbit[x][60] - 1 * orbit[x][59]) / 2;\n orbit[x][42] = (f_42 - 2 * orbit[x][71] - 4 * orbit[x][69] - 2 * orbit[x][67] - 2 * orbit[x][61] - 3 * orbit[x][55]);\n orbit[x][41] = (f_41 - 2 * orbit[x][71] - 1 * orbit[x][68] - 2 * orbit[x][67] - 1 * orbit[x][60] - 3 * orbit[x][55]);\n orbit[x][40] = (f_40 - 6 * orbit[x][70] - 2 * orbit[x][68] - 2 * orbit[x][66] - 4 * orbit[x][65] - 1 * orbit[x][60] - 1 * orbit[x][59] - 4 * orbit[x][54]);\n orbit[x][39] = (f_39 - 4 * orbit[x][65] - 1 * orbit[x][59] - 6 * orbit[x][56]) / 2;\n orbit[x][38] = (f_38 - 1 * orbit[x][68] - 1 * orbit[x][64] - 2 * orbit[x][63] - 1 * orbit[x][53] - 3 * orbit[x][50]);\n orbit[x][37] = (f_37 - 2 * orbit[x][68] - 2 * orbit[x][64] - 2 * orbit[x][63] - 4 * orbit[x][62] - 1 * orbit[x][53] - 1 * orbit[x][51] - 4 * orbit[x][49]);\n orbit[x][36] = (f_36 - 1 * orbit[x][68] - 2 * orbit[x][63] - 2 * orbit[x][62] - 1 * orbit[x][51] - 3 * orbit[x][50]);\n orbit[x][35] = (f_35 - 1 * orbit[x][59] - 2 * orbit[x][52] - 2 * orbit[x][45]) / 2;\n orbit[x][34] = (f_34 - 1 * orbit[x][59] - 2 * orbit[x][52] - 1 * orbit[x][51]) / 2;\n orbit[x][33] = (f_33 - 1 * orbit[x][67] - 2 * orbit[x][61] - 3 * orbit[x][58] - 4 * orbit[x][44] - 2 * orbit[x][42]) / 2;\n orbit[x][32] = (f_32 - 2 * orbit[x][66] - 1 * orbit[x][60] - 1 * orbit[x][59] - 2 * orbit[x][57] - 2 * orbit[x][43] - 2 * orbit[x][41] - 1 * orbit[x][40]) / 2;\n orbit[x][31] = (f_31 - 2 * orbit[x][65] - 1 * orbit[x][59] - 3 * orbit[x][56] - 1 * orbit[x][43] - 2 * orbit[x][39]);\n orbit[x][30] = (f_30 - 1 * orbit[x][67] - 1 * orbit[x][63] - 2 * orbit[x][61] - 1 * orbit[x][53] - 4 * orbit[x][44]);\n orbit[x][29] = (f_29 - 2 * orbit[x][66] - 2 * orbit[x][64] - 1 * orbit[x][60] - 1 * orbit[x][59] - 1 * orbit[x][53] - 2 * orbit[x][52] - 2 * orbit[x][43]);\n orbit[x][28] = (f_28 - 2 * orbit[x][65] - 2 * orbit[x][62] - 1 * orbit[x][59] - 1 * orbit[x][51] - 1 * orbit[x][43]);\n orbit[x][27] = (f_27 - 1 * orbit[x][59] - 1 * orbit[x][51] - 2 * orbit[x][45]) / 2;\n orbit[x][26] = (f_26 - 2 * orbit[x][67] - 2 * orbit[x][63] - 2 * orbit[x][61] - 6 * orbit[x][58] - 1 * orbit[x][53] - 2 * orbit[x][47] - 2 * orbit[x][42]);\n orbit[x][25] = (f_25 - 2 * orbit[x][66] - 2 * orbit[x][64] - 1 * orbit[x][59] - 2 * orbit[x][57] - 2 * orbit[x][52] - 1 * orbit[x][48] - 1 * orbit[x][40]) / 2;\n orbit[x][24] = (f_24 - 4 * orbit[x][65] - 4 * orbit[x][62] - 1 * orbit[x][59] - 6 * orbit[x][56] - 1 * orbit[x][51] - 2 * orbit[x][45] - 2 * orbit[x][39]);\n orbit[x][23] = (f_23 - 1 * orbit[x][55] - 1 * orbit[x][42] - 2 * orbit[x][33]) / 4;\n orbit[x][22] = (f_22 - 2 * orbit[x][54] - 1 * orbit[x][40] - 1 * orbit[x][39] - 1 * orbit[x][32] - 2 * orbit[x][31]) / 3;\n orbit[x][21] = (f_21 - 3 * orbit[x][55] - 3 * orbit[x][50] - 2 * orbit[x][42] - 2 * orbit[x][38] - 2 * orbit[x][33]);\n orbit[x][20] = (f_20 - 2 * orbit[x][54] - 2 * orbit[x][49] - 1 * orbit[x][40] - 1 * orbit[x][37] - 1 * orbit[x][32]);\n orbit[x][19] = (f_19 - 4 * orbit[x][54] - 4 * orbit[x][49] - 1 * orbit[x][40] - 2 * orbit[x][39] - 1 * orbit[x][37] - 2 * orbit[x][35] - 2 * orbit[x][31]);\n orbit[x][18] = (f_18 - 1 * orbit[x][59] - 1 * orbit[x][51] - 2 * orbit[x][46] - 2 * orbit[x][45] - 2 * orbit[x][36] - 2 * orbit[x][27] - 1 * orbit[x][24]) / 2;\n orbit[x][17] = (f_17 - 1 * orbit[x][60] - 1 * orbit[x][53] - 1 * orbit[x][51] - 1 * orbit[x][48] - 1 * orbit[x][37] - 2 * orbit[x][34] - 2 * orbit[x][30]) / 2;\n orbit[x][16] = (f_16 - 1 * orbit[x][59] - 2 * orbit[x][52] - 1 * orbit[x][51] - 2 * orbit[x][46] - 2 * orbit[x][36] - 2 * orbit[x][34] - 1 * orbit[x][29]);\n orbit[x][15] = (f_15 - 1 * orbit[x][59] - 2 * orbit[x][52] - 1 * orbit[x][51] - 2 * orbit[x][45] - 2 * orbit[x][35] - 2 * orbit[x][34] - 2 * orbit[x][27]);\n }\n\n return orbit;\n }",
"public int inDegree(int vertex) {\n int count = 0;\n//your code here\n for(int i=0; i<adjLists.length; i++){\n if(i==vertex){ continue;}\n if(isAdjacent(i,vertex)){\n count++;\n continue;\n }\n }\n return count;\n }",
"void DFSUtil(int v, boolean visited[]) {\n\t\t\tvisited[v] = true;\n\t\t\tSystem.out.println(v +\" \");\n\t\t\t\n\t\t\t//Recur all the vertices adjacents to this vertex\n\t\t\tIterator<Integer> i = adj[v].listIterator();\n\t\t\twhile(i.hasNext()) {\n\t\t\t\tint node = i.next();\n\t\t\t\tif(!visited[node]) {\n\t\t\t\t\tDFSUtil(node, visited);\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"public void setNodesToUnvisited(){\n for(GraphNode node: graphNode){\n if(node.visited){\n node.visited = false;\n }\n }\n }",
"private void clearAll( )\n {\n for( Vertex v : vertexMap.values( ) )\n v.reset( );\n }",
"@Override\r\n\tpublic List<Integer> getReachableVertices(GraphStructure graph,int vertex) {\r\n\t\tadjacencyList=graph.getAdjacencyList();\r\n\t\tpathList=new ArrayList<Integer>();\r\n\t\tisVisited=new boolean [graph.getNumberOfVertices()];\r\n\t\ttraverseRecursively(graph, vertex);\r\n\t\treturn pathList;\r\n\t}",
"@Test\r\n void remove_nonexistent_vertex() {\r\n graph.addEdge(\"A\", \"B\");\r\n graph.addEdge(\"B\", \"C\");\r\n graph.removeVertex(\"D\");\r\n List<String> adjacent;\r\n vertices = graph.getAllVertices(); \r\n // Check that graph has all added vertexes\r\n if(!vertices.contains(\"A\")| !vertices.contains(\"B\")|\r\n !vertices.contains(\"C\")) {\r\n fail();\r\n }\r\n adjacent = graph.getAdjacentVerticesOf(\"A\");\r\n if (!adjacent.contains(\"B\"))\r\n fail();\r\n adjacent = graph.getAdjacentVerticesOf(\"B\");\r\n if (!adjacent.contains(\"C\"))\r\n fail();\r\n \r\n }",
"@Test\n void test04_checkOrder() {\n graph.addVertex(\"a\");\n graph.addVertex(\"b\");\n graph.addVertex(\"c\");\n graph.addVertex(\"d\");\n graph.addVertex(\"e\");\n graph.addVertex(\"f\"); // added 6 items\n if (graph.order() != 6) {\n fail(\"graph has counted incorrect number of vertices\");\n }\n }",
"public int numVertices();",
"public int numVertices();",
"public int getNumVertices();",
"@Override\n\tpublic int graphOrder() {\n\t\treturn vertices.size();\n\t}",
"void DFS(int v, boolean visited[]) {\n visited[v] = true;\n connected++;\n //LinkedList Iterator to Recursively traverse all adjacent nodes of v\n Iterator<Integer> itr = adj[v].listIterator();\n\n while(itr.hasNext()) {\n int x = itr.next();\n if(visited[x] == false)\n DFS(x,visited);\n }\n }",
"private void depthFirstTraversalWithRecursion(final int startPoint, final boolean[] isVerticesVisited) {\n\t\tisVerticesVisited[startPoint] = true;\n\t\tSystem.out.print(startPoint + \" \");\n\t\tIterator<Integer> edgeIterator = adjacencyList[startPoint].listIterator();\n\n\t\tint vertice;\n\t\twhile (edgeIterator.hasNext()) {\n\t\t\tvertice = edgeIterator.next();\n\t\t\tif (!isVerticesVisited[vertice]) {\n\t\t\t\tdepthFirstTraversalWithRecursion(vertice, isVerticesVisited);\n\t\t\t}\n\t\t}\n\t}",
"int getVertices();",
"public void depthFirstOrder(Graph graph) {\n\t\tQueue<Vertex> zeroDegreeVertex = findZeroIndegrees(graph);\n\t\tint index = 1;\n\n\t\twhile (!zeroDegreeVertex.isEmpty()) {\n\t\t\tVertex vertex = zeroDegreeVertex.remove();\n\n\t\t\tfor (Edge edge : vertex.Adj) {\n\t\t\t\tVertex adjacentVertex = edge.otherEnd(vertex);\n\t\t\t\tadjacentVertex.indegree -= 1;\n\n\t\t\t\tif (adjacentVertex.indegree == 0) {\n\t\t\t\t\tzeroDegreeVertex.add(adjacentVertex);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tvertices[index++] = vertex;\n\t\t}\n\n\t\t// We need make sure all the verrtices are in the toplogical sorted\n\t\t// graph\n\t\t\n\t\tif(isAllVertciesInTopologicalOrder(index, graph.V.length)) {\n\t\t\tvertices = null;\n\t\t}\n\t}",
"private void reachable() {\r\n\r\n\t\tSortedSet<String> keys = new TreeSet<String>(vertexMap.keySet());\r\n\t\tIterator it = keys.iterator();\r\n\t\twhile (it.hasNext()) {\r\n\t\t\tVertex v = vertexMap.get(it.next());\r\n\t\t\tif (v.isStatus()) {\r\n\t\t\t\tSystem.out.println(v.getName());\r\n\t\t\t\tbfs(v);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public int getVertexCount() {\n\t\treturn this._vertices.size();\n\t}",
"public void visit() {\n visited = true;\n }",
"public void setVisited()\n {\n visited = true;\n }",
"public int getNumberOfVertices();",
"private static void DFS(int v, int CC, UndirectedGraphAPI graph) {\n\t\tcolor[v] = GRAY;\n\t\tidArray[v] = CC;\n\t\tArrayList<Edge> list = graph.getAdj()[v];\n\t\tfor(Edge edge : list){\n\t\t\tint w = edge.getOtherVertex(v);\n\t\t\tif(color[w] == WHITE){\n\t\t\t\tcount++;\n\t\t\t\tDFS(w, CC, graph);\n\t\t\t}\n\t\t}\n\t\tcolor[v] = BLACK;\n\t}",
"public int getNodeCount(){\r\n HashSet<FlowGraphNode> visited = new HashSet<>();\r\n LinkedList<FlowGraphNode> queue = new LinkedList<>();\r\n queue.add(start);\r\n visited.add(start);\r\n while(!queue.isEmpty()){\r\n FlowGraphNode node = queue.pop();\r\n for(FlowGraphNode child : node.to){\r\n if(visited.add(child)){\r\n queue.add(child);\r\n }\r\n }\r\n }\r\n return visited.size();\r\n }",
"@Override public Set<L> vertices() {\r\n return new HashSet<L>(vertices);//防御式拷贝\r\n }",
"void DFS(int v) {\n // Mark all the vertices as not visited(set as\n // false by default in java)\n boolean visited[] = new boolean[V];\n\n // Call the recursive helper function to print DFS traversal\n DFSUtil(v, visited);\n }",
"public int getVertexCount() {\n\t\treturn vertexCount;\n\t}",
"public void setNumberOfVisitedNodes(int numberOfVisitedNodes) {\n NumberOfVisitedNodes = numberOfVisitedNodes;\n }",
"public static Map<Integer, Boolean> InitializeVisited() {\n\t\tMap<Integer, Boolean> visited = new HashMap<Integer, Boolean>();\r\n\t\tfor (Entry<Integer, Vertex> currentVertex : vertexes.entrySet())\r\n\t\t\tvisited.put(currentVertex.getKey(), false);\r\n\t\treturn visited;\r\n\t}",
"DFS(int ver){\n // assign the nu,mber of vertex\n v = ver;\n // assign the number of boolean at it's vertex\n visited = new boolean[ver];\n // assisgn the array with the vertex length\n pre = new int[ver];\n // asssigning the adjList length\n adjList = new ArrayList[ver];\n\n // now going throgh the loop and adding the newList to adjList each index , in pre making all -1, and false in all visited\n for (int x=0; x<ver; x+=1){\n adjList[x] = new ArrayList();\n\n // for the visited boolean value false\n visited[x] = false;\n\n // pre \n pre[x]=-1;\n }\n }",
"public void testEdgesSet_ofVertices() {\n System.out.println(\"edgesSet\");\n\n Graph<Integer, Edge<Integer>> graph = generateGraph();\n\n for (int i = 0; i < 25; i++) {\n for (int j = 0; j < 25; j++) {\n Set<Edge<Integer>> set = graph.edgesSet(new Integer(i), new Integer(j));\n\n if ((i + j) % 2 == 0) {\n Assert.assertEquals(set.size(), 1);\n } else {\n Assert.assertEquals(set.size(), 0);\n }\n }\n }\n }",
"@Test\r\n void insert_multiple_vertexes_and_edges_remove_vertex() {\r\n graph.addEdge(\"A\", \"B\");\r\n graph.addEdge(\"B\", \"C\");\r\n graph.addEdge(\"A\", \"C\");\r\n graph.addEdge(\"B\", \"D\");\r\n \r\n List<String> adjacent;\r\n vertices = graph.getAllVertices(); \r\n int numberOfEdges = graph.size();\r\n int numberOfVertices = graph.order();\r\n if(numberOfEdges != 4) {\r\n fail();\r\n }\r\n if(numberOfVertices != 4) {\r\n fail();\r\n }\r\n \r\n // Check that graph has all added vertexes\r\n if(!vertices.contains(\"A\")| !vertices.contains(\"B\")|\r\n !vertices.contains(\"C\")|!vertices.contains(\"D\")) {\r\n fail();\r\n }\r\n \r\n // Check that A's outgoing edges are correct\r\n adjacent = graph.getAdjacentVerticesOf(\"A\");\r\n if (!adjacent.contains(\"B\") || !adjacent.contains(\"C\"))\r\n fail();\r\n // Check that B's outgoing edges are correct\r\n adjacent = graph.getAdjacentVerticesOf(\"B\");\r\n if (!adjacent.contains(\"C\") | !adjacent.contains(\"D\"))\r\n fail(); \r\n // C and D have no out going edges \r\n adjacent = graph.getAdjacentVerticesOf(\"C\");\r\n if (!adjacent.isEmpty())\r\n fail(); \r\n adjacent = graph.getAdjacentVerticesOf(\"D\");\r\n if (!adjacent.isEmpty())\r\n fail(); \r\n // Remove B from the graph \r\n graph.removeVertex(\"B\");\r\n // Check that A's outgoing edges are correct\r\n // An edge to B should no exist any more \r\n adjacent = graph.getAdjacentVerticesOf(\"A\");\r\n if (adjacent.contains(\"B\") || !adjacent.contains(\"C\"))\r\n fail();\r\n // There should be no elements in the list of successors\r\n // of B since its deleted form the graph\r\n adjacent = graph.getAdjacentVerticesOf(\"B\");\r\n if (!adjacent.isEmpty())\r\n fail(); \r\n // Check that graph has still has all vertexes not removed\r\n if(!vertices.contains(\"A\")| !vertices.contains(\"C\")|\r\n !vertices.contains(\"D\")) {\r\n fail();\r\n }\r\n //Check that vertex B was removed from graph \r\n if(vertices.contains(\"B\")) {\r\n fail();\r\n }\r\n numberOfEdges = graph.size();\r\n numberOfVertices = graph.order();\r\n if(numberOfEdges != 1) {\r\n fail();\r\n }\r\n if(numberOfVertices != 3) {\r\n fail();\r\n }\r\n }",
"@Test\n void test02_removeVertex() {\n graph.addVertex(\"a\");\n graph.addVertex(\"b\"); // adds two\n graph.removeVertex(\"a\"); // remove\n\n Set<String> vertices = new LinkedHashSet<>();\n vertices.add(\"a\");\n vertices.add(\"b\");\n vertices.remove(\"a\"); // creates a mock up vertex list\n\n if (!graph.getAllVertices().equals(vertices)) {\n fail(\"Graph didn't remove the vertices correctly\");\n }\n }",
"public Collection<LazyNode2> getVertices() {\n List<LazyNode2> l = new ArrayList();\n \n for(Path p : getActiveTraverser())\n //TODO: Add cache clearing\n l.add(new LazyNode2(p.endNode().getId()));\n \n return l;\n }",
"@Override\n\t\tpublic int getRowCount() {\n\t\t\treturn app.graph.verticesCount;\n\t\t}",
"private static void initGraphCheck(int V) {\r\n\t\tdfs_num = new int[V];\r\n\t\tArrays.fill(dfs_num, DFS_WHITE);// reinicio a no visitado\r\n\t\tnumComp = 0;\r\n\t\tdfs_parent = new int[V];\r\n\t\tArrays.fill(dfs_parent, -1);\r\n\r\n\t\tprintThis(\"Graph Edges Property Check\");\r\n\t\tfor (int i = 0; i < V; i++) {\r\n\t\t\tif (dfs_num[i] == DFS_WHITE) {\r\n\t\t\t\tSystem.out.printf(\"Component %d:\\n\", ++numComp);\r\n\t\t\t\tgraphCheck(i);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"@Test\n public void getVertexes() {\n\n for (int i = 0; i < 6; i++) {\n\n Vertex temp = new Vertex(i + \"\", \"Location number \" + i);\n assertTrue(temp.equals(testGraph.getVertices ().get(i)));\n\n }\n }",
"public static void dfs(Node[] node, int index, int count, int[] visited){\n if(index == 30){\n min = Math.min(min, count);\n return;\n }\n if(min != Integer.MAX_VALUE && min < count){\n return;\n }\n\n // if visited then return\n if(visited[index] == 1){\n return;\n }\n visited[index] = 1;\n for(int i = 1; i <= 6; i++){\n int newIndex = index + i;\n if(newIndex > 30){\n break;\n }\n if(node[newIndex].next != -1){\n //if there is snake or ladder at next index\n dfs(node, node[newIndex].next, count + 1, visited);\n }else{\n // no snake or ladder just moved next\n dfs(node, newIndex, count + 1, visited);\n }\n }\n visited[index] = 0;\n }",
"public int numVertices() { return numV; }",
"public void breadthFirstTraverse() {\n\t\t// track whether vertex was visited\n\t\tHashMap<Integer, Boolean> visited = buildVisited();\n\t\t// store neighbors\n\t\tQueue<Integer> queue = new LinkedList<Integer>();\n\n\t\t// arbitrarily add first element\n\t\tInteger current = (Integer) edges.keySet().toArray()[0];\n\t\tqueue.add(current);\n\n\t\twhile (queue.peek() != null) {\n\n\t\t\tcurrent = queue.remove();\n\t\t\tSystem.out.println(\"current: \" + current);\n\t\t\tvisited.put(current, true);\n\n\t\t\tfor (Integer neighbor: edges.get(current)) {\n\t\t\t\tif (!visited.get(neighbor)) {\n\t\t\t\t\tqueue.add(neighbor);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"private static int findConnectedComponents(Map<Integer, Set<Integer>> graph, boolean[] visited) {\n int count = 0;\n for (int u : graph.keySet()) {\n if (!visited[u]) {\n dfs(u, graph, visited);\n count++;\n }\n }\n return count;\n }",
"private static void traverse(int i, int j) {\r\n\t\tif(i + j == SIZE + SIZE){\r\n\t\t\tCOUNT++;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tif(i < SIZE){\r\n\t\t\ttraverse(i + 1, j);\r\n\t\t}\r\n\t\tif(j < SIZE){\r\n\t\t\ttraverse(i, j + 1);\r\n\t\t}\r\n\t}",
"public static boolean Util(Graph<V, DefaultEdge> g, ArrayList<V> set, int colors, HashMap<String, Integer> coloring, int i, ArrayList<arc> arcs, Queue<arc> agenda)\n {\n /*if (i == set.size())\n {\n System.out.println(\"reached max size\");\n return true;\n }*/\n if (set.isEmpty())\n {\n System.out.println(\"Set empty\");\n return true;\n }\n //V currentVertex = set.get(i);\n\n /*System.out.println(\"vertices and mrv:\");\n V start = g.vertexSet().stream().filter(V -> V.getID().equals(\"0\")).findAny().orElse(null);\n Iterator<V> iterator = new DepthFirstIterator<>(g, start);\n while (iterator.hasNext()) {\n V v = iterator.next();\n System.out.println(\"vertex \" + v.getID() + \" has mrv of \" + v.mrv);\n }*/\n\n // Find vertex with mrv\n V currentVertex;\n int index = -1;\n int mrv = colors + 10;\n for (int it = 0; it < set.size(); it++)\n {\n if (set.get(it).mrv < mrv)\n {\n mrv = set.get(it).mrv;\n index = it;\n }\n }\n currentVertex = set.remove(index);\n\n //System.out.println(\"Got vertex: \" + currentVertex.getID());\n\n\n // Try to assign that vertex a color\n for (int c = 0; c < colors; c++)\n {\n currentVertex.color = c;\n if (verifyColor(g, currentVertex))\n {\n\n // We can assign color c to vertex v\n // See if AC3 is satisfied\n /*currentVertex.domain.clear();\n currentVertex.domain.add(c);*/\n if (!agenda.isEmpty()) numAgenda++;\n while(!agenda.isEmpty())\n {\n arc temp = agenda.remove();\n\n // Make sure there exists v1, v2, in V1, V2, such that v1 != v2\n V v1 = g.vertexSet().stream().filter(V -> V.getID().equals(temp.x)).findAny().orElse(null);\n V v2 = g.vertexSet().stream().filter(V -> V.getID().equals(temp.y)).findAny().orElse(null);\n\n\n\n // No solution exists in this branch if a domain is empty\n //if ((v1.domain.isEmpty()) || (v2.domain.isEmpty())) return false;\n\n if (v2.color == -1) continue;\n else\n {\n Boolean[] toRemove = new Boolean[colors];\n Boolean domainChanged = false;\n for (Integer it : v1.domain)\n {\n if (it == v2.color)\n {\n toRemove[it] = true;\n }\n }\n for (int j = 0; j < toRemove.length; j++)\n {\n if ((toRemove[j] != null))\n {\n v1.domain.remove(j);\n domainChanged = true;\n }\n }\n // Need to check constraints with v1 on the right hand side\n if (domainChanged)\n {\n for (arc it : arcs)\n {\n // Add arc back to agenda to check constraints again\n if (it.y.equals(v1.getID()))\n {\n agenda.add(it);\n }\n }\n }\n }\n if ((v1.domain.isEmpty()) || (v2.domain.isEmpty()))\n {\n System.out.println(\"returning gfalse here\");\n return false;\n }\n }\n\n // Reset agenda to check arc consistency on next iteration\n for (int j = 0; j < arcs.size(); j++)\n {\n agenda.add(arcs.get(i));\n }\n\n\n //System.out.println(\"Checking if vertex \" + currentVertex.getID() + \" can be assigned color \" + c);\n coloring.put(currentVertex.getID(), c);\n updateMRV(g, currentVertex);\n if (Util(g, set, colors, coloring, i + 1, arcs, agenda))\n {\n\n return true;\n }\n\n //System.out.println(\"Assigning vertex \" + currentVertex.getID() + \" to color \" + currentVertex.color + \" did not work\");\n coloring.remove(currentVertex.getID());\n currentVertex.color = -1;\n }\n }\n return false;\n }",
"Iterable<Long> vertices() {\n return nodes.keySet();\n }",
"public int getNumVertices() {\n\t\treturn vertices.size();\n\t}",
"void DFSUtil(int v, boolean visited[]) {\n \t// Mark the current node as visited and print it \n visited[v] = true; \n System.out.print(v + \" \"); \n \n for(int w: adj[v]) \n \tif (!visited[w]) { \n \t\tDFSUtil(w, visited);\n \t}\n }",
"public void depthFirstSearch() {\n List<Vertex> visited = new ArrayList<Vertex>();\r\n // start the recursive depth first search on the current vertex\r\n this.dfs(visited);\r\n }",
"public CC(final Graph graph) {\n marked = new boolean[graph.vertices()];\n id = new int[graph.vertices()];\n size = new int[graph.vertices()];\n for (int v = 0; v < graph.vertices(); v++) {\n if (!marked[v]) {\n dfs(graph, v);\n count++;\n }\n }\n }",
"protected void resetGraph() {\n for (List<Edge> path : graph) {\r\n for (Edge e : path) {\r\n e.flow = 0;\r\n }\r\n }\r\n }",
"private VertexIterator(Vertex[] v, int n) {\n nodeIndex = 0;\n iterV = v;\n iterN = n;\n }",
"private static void criaListaDeVertices(Graph graph) {\r\n\t\tfor (int i = 0; i < graph.getArestas().size(); i++) {\r\n\t\t\tif (!graph.getArestas().get(i).getV1().statusVertice()) {\r\n\t\t\t\tgraph.getVerticesGraph().add( graph.getArestas().get(i).getV1() );\r\n\t\t\t\tgraph.getArestas().get(i).getV1().alteraStatusVertice(true);\r\n\t\t\t}\r\n\r\n\t\t\tif (!graph.getArestas().get(i).getV2().statusVertice()) {\r\n\t\t\t\tgraph.getVerticesGraph().add( graph.getArestas().get(i).getV2() );\r\n\t\t\t\tgraph.getArestas().get(i).getV2().alteraStatusVertice(true);\r\n\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public String depthFirstSearch( AnyType start_vertex ) throws VertexException {\n \n StringBuffer buffer = new StringBuffer();\n \n // ----------------------------\n // TODO: Add your code here\n // ----------------------------\n ConstantTimeStack<Vertex<AnyType>> stack = new ConstantTimeStack<Vertex<AnyType>>();\n boolean exists = false;\n Vertex<AnyType> S = new Vertex<AnyType>(start_vertex);\n int counter = 0;\n //loop through to set each vertex to not visited\n for( int i = 0; i < vertex_adjacency_list.size(); i++){\n vertex_adjacency_list.get(i).setVisited(-1);\n //if find the start vertex then set index position to counter\n if(vertex_adjacency_list.get(i).compareTo(S) == 0){\n exists = true;\n vertex_adjacency_list.get(i).setVisited(counter);\n counter = i;\n }\n }\n //if doesn't exist then through exception\n if(exists == false){\n throw new VertexException(\"Start Vertex does not exist\");\n }\n //if it does exist then push start node onto stack, set visited \n else if(exists){\n stack.push(vertex_adjacency_list.get(counter));\n vertex_adjacency_list.get(counter).setVisited(1);\n Vertex <AnyType> e = vertex_adjacency_list.get(counter);\n counter = 2;\n int n = e.numberOfAdjacentVertices();\n try{\n \n while(true){\n //loop through e's adjacent vertices \n for (n = e.numberOfAdjacentVertices()-1; n >=0 ; n--){\n //if the adacent vertex has not been visited\n if(e.getAdjacentVertex(n).hasBeenVisited()==false){\n //change e to adjacent vertex and push onto stack\n e = e.getAdjacentVertex(n);\n stack.push(e);\n //set e as visited at counter\n e.setVisited(counter);\n counter++;\n //reset n to e's num of vertices\n n = e.numberOfAdjacentVertices();\n }\n //if it has been visited and it's the first node in list\n //then pop it off the stack and then set e to new top\n //set n to new num of vertices\n else if(e.getAdjacentVertex(n).hasBeenVisited() && n == 0){\n stack.pop();\n e = stack.peek();\n n = e.numberOfAdjacentVertices();\n }\n }\n }\n }catch(EmptyStackException m){\n }\n }\n //loop through the list and print each with when it was visited\n for(int k = 0; k< vertex_adjacency_list.size(); k++){\n buffer.append(vertex_adjacency_list.get(k) + \":\" + vertex_adjacency_list.get(k).getVisited()+ \"\\n\");\n }\n \n return buffer.toString();\n \n }",
"public static void dfs(int a, Vertex [] v){\n assert !v[a].visited;\n\n v[a].visited = true;\n\n // traverse over all the outgoing edges\n\n for(int b : v[a].edges){\n v[b].d = Math.max(v[b].d , v[a].d + 1);\n v[b].in --;\n\n if(v[b].in == 0 && !v[b].visited){\n dfs(b,v);\n }\n }\n\n\n }",
"@Test\n void test05_checkSize() {\n graph.addVertex(\"a\");\n graph.addVertex(\"b\");\n graph.addVertex(\"c\"); // adds three vertices\n graph.addEdge(\"a\", \"b\");\n graph.addEdge(\"b\", \"c\");\n graph.addEdge(\"c\", \"b\"); // add three edges\n if (graph.size() != 3) {\n fail(\"graph has counted incorrect number of edges\");\n }\n }",
"public void depthFirstTraversal(final int startPoint) {\n\t\tfinal boolean[] isVerticesVisited = new boolean[adjacencyList.length];\n\n\t\tfinal Stack<Integer> stack = new Stack<>();\n\n\t\tstack.push(startPoint);\n\n\t\tint selectedVertice;\n\t\tint vertice;\n\t\twhile (!stack.isEmpty()) {\n\t\t\tselectedVertice = stack.peek();\n\t\t\tstack.pop();\n\n\t\t\tif (!isVerticesVisited[selectedVertice]) {\n\t\t\t\tSystem.out.print(selectedVertice + \" \");\n\t\t\t\tisVerticesVisited[selectedVertice] = true;\n\t\t\t}\n\n\t\t\tIterator<Integer> edgeIterator = adjacencyList[selectedVertice].listIterator();\n\n\t\t\twhile (edgeIterator.hasNext()) {\n\t\t\t\tvertice = edgeIterator.next();\n\t\t\t\tif (!isVerticesVisited[vertice]) {\n\t\t\t\t\tstack.push(vertice);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public void clear() {\r\n for (Edge edge : edges)\r\n edge.disconnect();\r\n for (Vertex vertex : vertices)\r\n vertex.disconnect();\r\n edges.clear();\r\n vertices.clear();\r\n getChildren().remove(1, getChildren().size());\r\n }",
"int getEdgeCount();",
"public void setVertices(){\n\t\tvertices = new ArrayList<V>();\n\t\tfor (E e : edges){\n\t\t\tV v1 = e.getOrigin();\n\t\t\tV v2 = e.getDestination();\n\t\t\tif (!vertices.contains(v1))\n\t\t\t\tvertices.add(v1);\n\t\t\tif (!vertices.contains(v2))\n\t\t\t\tvertices.add(v2);\n\t\t}\n\t}"
] | [
"0.6783675",
"0.6639824",
"0.6480397",
"0.64570785",
"0.635729",
"0.6309418",
"0.62779915",
"0.6258025",
"0.61995554",
"0.6151906",
"0.6099337",
"0.60860455",
"0.6085927",
"0.6070587",
"0.60562885",
"0.5996528",
"0.5989961",
"0.5945602",
"0.5924802",
"0.59190696",
"0.59162915",
"0.5903786",
"0.58965397",
"0.58774537",
"0.5865957",
"0.5864571",
"0.5825212",
"0.580962",
"0.5791482",
"0.5791169",
"0.57844156",
"0.5784169",
"0.57782453",
"0.57583743",
"0.57507485",
"0.57386607",
"0.5733796",
"0.5730221",
"0.5724313",
"0.5720854",
"0.5705485",
"0.5701533",
"0.5700871",
"0.56992227",
"0.5694981",
"0.56631505",
"0.5657023",
"0.5656426",
"0.5630516",
"0.562212",
"0.5621908",
"0.5619692",
"0.5619692",
"0.56045014",
"0.5598218",
"0.5586617",
"0.5580661",
"0.5578349",
"0.55782515",
"0.5577168",
"0.5570425",
"0.5566234",
"0.5563246",
"0.5556224",
"0.5551253",
"0.554383",
"0.5540621",
"0.5536496",
"0.55363464",
"0.55270904",
"0.55251884",
"0.5522693",
"0.55135685",
"0.5508029",
"0.5498773",
"0.54982924",
"0.5483534",
"0.5457369",
"0.54523116",
"0.5448194",
"0.54405904",
"0.54379624",
"0.5437192",
"0.54333407",
"0.5432214",
"0.5421487",
"0.541394",
"0.54052174",
"0.53986937",
"0.5395323",
"0.53910387",
"0.5378271",
"0.5368113",
"0.53381926",
"0.5337719",
"0.53320724",
"0.5326753",
"0.53245896",
"0.53244454",
"0.53205746"
] | 0.6781241 | 1 |
IMPORT: none EXPORT: boolean ASSERTION: Iterates through vertices list and prints all edges | public void printEdges()
{
System.out.println("Printing all Edges:");
Iterator<DSAGraphVertex> itr = vertices.iterator();
while(itr.hasNext())
{
itr.next().printAdjacent();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void printEdges() {\n\t\tSystem.out.println(\"Edges\");\n\t\tIterator<Edge> i = edges.iterator();\n\t\twhile(i.hasNext()) {\n\t\t\tEdge e = i.next();\n\t\t\tSystem.out.println(e.toString());\n\t\t}\n\t}",
"public void printVertices() {\r\n\t\tfor (int i = 0; i < vertices.size(); i++)\r\n\t\t\tSystem.out.print(vertices.get(i).label);\r\n\t}",
"public void print() {\n\t\tint l = 0;\n\t\tSystem.out.println();\n\t\tfor (int v = 0; v < vertexList.length; v++) {\n\t\t\tSystem.out.print(vertexList[v].id);\n\t\t\tfor (Neighbor nbr = vertexList[v].adjList; nbr != null; nbr = nbr.next) {\n\t\t\t\tSystem.out.print(\" -> \" + vertexList[nbr.vertexNumber].id + \"(\"\n\t\t\t\t\t\t+ nbr.weight + \")\");\n\t\t\t\tl++;\n\t\t\t}\n\t\t\tSystem.out.println(\"\\n\");\n\t\t}\n\t\tSystem.out.println(\"Number of edges = \" + l / 2);\n\t}",
"public void printAdjacencyList() {\n \n for ( int i=0; i<vertex_adjacency_list.size(); i++ ) {\n \n vertex_adjacency_list.get( i ).printVertex();\n \n }\n \n }",
"void printNodesWithEdges()\n {\n for ( int i = 0; i < this.numNodes; i++ )\n {\n Node currNode = this.nodeList.get(i);\n System.out.println(\"Node id: \" + currNode.id );\n \n int numEdges = currNode.connectedNodes.size();\n for ( int j = 0; j < numEdges; j++ )\n {\n Node currEdge = currNode.connectedNodes.get(j);\n System.out.print(currEdge.id + \",\");\n }\n\n System.out.println();\n } \n\n \n }",
"private static void printGraph(ArrayList<Vertex> graph) {\n\t\tSystem.out.print(\"---GRAPH PRINT START---\");\n\t\tfor (Vertex vertex: graph) {\n\t\t\tSystem.out.println(\"\\n\\n\" + vertex.getValue());\n\t\t\tSystem.out.print(\"Adjacent nodes: \");\n\t\t\tfor (Vertex v: vertex.getAdjacencyList()) {\n\t\t\t\tSystem.out.print(v.getValue() + \" \");\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"\\n\\n---GRAPH PRINT END---\\n\\n\");\n\t}",
"public void printGraph() {\n\t\tStringJoiner j = new StringJoiner(\", \");\n\t\tfor(Edge e : edgeList) {\n\t\t\tj.add(e.toString());\n\t\t}\n\t\t\n\t\tSystem.out.println(j.toString());\n\t}",
"public void printGraph() {\n\t\tSystem.out.println(\"-------------------\");\n\t\tSystem.out.println(\"Printing graph...\");\n\t\tSystem.out.println(\"Vertex=>[Neighbors]\");\n\t\tIterator<Integer> i = vertices.keySet().iterator();\n\t\twhile(i.hasNext()) {\n\t\t\tint name = i.next();\n\t\t\tSystem.out.println(name + \"=>\" + vertices.get(name).printNeighbors());\n\t\t}\n\t\tSystem.out.println(\"-------------------\");\n\t}",
"private void printGraph() {\r\n\t\tSortedSet<String> keys = new TreeSet<String>(vertexMap.keySet());\r\n\t\tIterator it = keys.iterator();\r\n\t\twhile (it.hasNext()) {\r\n\t\t\tVertex v = vertexMap.get(it.next());\r\n\t\t\tif (v.isStatus())\r\n\t\t\t\tSystem.out.println(v.getName());\r\n\t\t\telse\r\n\t\t\t\tSystem.out.println(v.getName() + \" DOWN\");\r\n\t\t\tsortEdges(v.adjacent);\r\n\t\t\tfor (Iterator i = v.adjacent.iterator(); i.hasNext();) {\r\n\t\t\t\t// v.adjacent.sort();\r\n\t\t\t\tEdge edge = (Edge) i.next();\r\n\t\t\t\tif (edge.isStatus())\r\n\t\t\t\t\tSystem.out.println(\" \" + edge.getDestination() + \" \" + edge.getCost());\r\n\t\t\t\telse\r\n\t\t\t\t\tSystem.out.println(\" \" + edge.getDestination() + \" \" + edge.getCost() + \" DOWN\");\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void inIncidentEdges() {\r\n\t\tfor (int i = 0; i < currentVertex.inList.size(); i++) {\r\n\t\t\tSystem.out.print(currentVertex.inList.get(i).edge + \" \");\r\n\t\t}\r\n\t\tprintLine();\r\n\t}",
"void printGraph() {\n for (Vertex u : this) {\n System.out.print(u + \": \");\n for (Edge e : u.Adj) {\n System.out.print(e);\n }\n System.out.println();\n }\n }",
"public void outAdjacentVertices() {\r\n\t\tfor (int i = 0; i < currentVertex.outList.size(); i++) {\r\n\t\t\tSystem.out.print(currentVertex.outList.get(i).vertex.label + \" \");\r\n\t\t}\r\n\t\tprintLine();\r\n\t}",
"public void inAdjacentVertices() {\r\n\t\tfor (int i = 0; i < currentVertex.inList.size(); i++) {\r\n\t\t\tSystem.out.print(currentVertex.inList.get(i).vertex.label + \" \");\r\n\t\t}\r\n\t\tprintLine();\r\n\t}",
"void printGraph() {\n System.out.println(\n \"All vertices in the graph are presented below.\\n\" +\n \"Their individual edges presented after a tab. \\n\" +\n \"-------\");\n\n for (Map.Entry<Vertex, LinkedList<Vertex>> entry : verticesAndTheirEdges.entrySet()) {\n LinkedList<Vertex> adj = entry.getValue();\n System.out.println(\"Vertex: \" + entry.getKey().getName());\n for (Vertex v : adj) {\n System.out.println(\" \" + v.getName());\n }\n }\n }",
"public void outIncidentEdges() {\r\n\t\tfor (int i = 0; i < currentVertex.outList.size(); i++) {\r\n\t\t\tSystem.out.print(currentVertex.outList.get(i).edge + \" \");\r\n\t\t}\r\n\t\tprintLine();\r\n\t}",
"public void displayAsList()\n\t{\n\t\tSystem.out.println(\"Printing all vertices\");\n\t\tvertices.show();\n\t}",
"static void showGraph(ArrayList<ArrayList<Integer>> graph) {\n for(int i=0;i< graph.size(); i++ ){\n System.out.print(\"Vertex : \" + i + \" : \");\n for(int j = 0; j < graph.get(i).size(); j++) {\n System.out.print(\" -> \"+ graph.get(i).get(j));\n }\n }\n }",
"public void printEdges(){\n System.out.print(\" |\");\n for(int i=0;i<size;i++)\n System.out.print(\" \"+i+\" \");\n System.out.print(\"\\n\");\n for(int i=0;i<size+1;i++)\n System.out.print(\"-------\");\n System.out.print(\"\\n\");\n for(int i=0;i<size;i++){\n System.out.print(\" \"+i+\" |\");\n for(int j=0;j<size;j++){\n System.out.print(\" \"+Matrix[i][j]+\" \");\n }\n System.out.print(\"\\n\");\n }\n }",
"public void testEdgesSet_ofVertices() {\n System.out.println(\"edgesSet\");\n\n Graph<Integer, Edge<Integer>> graph = generateGraph();\n\n for (int i = 0; i < 25; i++) {\n for (int j = 0; j < 25; j++) {\n Set<Edge<Integer>> set = graph.edgesSet(new Integer(i), new Integer(j));\n\n if ((i + j) % 2 == 0) {\n Assert.assertEquals(set.size(), 1);\n } else {\n Assert.assertEquals(set.size(), 0);\n }\n }\n }\n }",
"public void printEdge(){\n\t\tint count = 0;\n\t\tSystem.out.print(\"\\t\");\n\t\tfor(Edge e: edgeArray){\n\t\t\tif(count > 5){\n\t\t\t\tSystem.out.println();\n\t\t\t\tcount = 0;\n\t\t\t\tSystem.out.print(\"\\t\");\n\t\t\t}\n\t\t\tcount ++;\n\t\t\tSystem.out.printf(\"%s (%d) \", e.getVertex().getRecord(), e.getCost());\n\t\t}\n\t\tSystem.out.println();\n\t}",
"public void printGraphStructure() {\n\t\tSystem.out.println(\"Vector size \" + nodes.size());\n\t\tSystem.out.println(\"Nodes: \"+ this.getSize());\n\t\tfor (int i=0; i<nodes.size(); i++) {\n\t\t\tSystem.out.print(\"pos \"+i+\": \");\n\t\t\tNode<T> node = nodes.get(i);\n\t\t\tSystem.out.print(node.data+\" -- \");\n\t\t\tIterator<EDEdge<W>> it = node.lEdges.listIterator();\n\t\t\twhile (it.hasNext()) {\n\t\t\t\tEDEdge<W> e = it.next();\n\t\t\t\tSystem.out.print(\"(\"+e.getSource()+\",\"+e.getTarget()+\", \"+e.getWeight()+\")->\" );\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}",
"public String toString(){\n String string = \"\" + nrVertices;\n for(DEdge edge : edges){\n string += \"\\n\" + (edge.getVertex1()) + \" \" + (edge.getVertex2());\n }\n return string;\n }",
"public void testEdgesSet_ofVertex() {\n System.out.println(\"edgesSet\");\n\n Graph<Integer, Edge<Integer>> graph = generateGraph();\n\n for (int i = 0; i < 25; i++) {\n Set<Edge<Integer>> set = graph.edgesSet(new Integer(i));\n\n Assert.assertEquals(set.size(), i % 2 == 0 ? 25 : 23);\n for (Edge<Integer> edge : set) {\n Assert.assertTrue((edge.getTargetVertex() + i) % 2 == 0);\n }\n }\n }",
"public void printEdges(PrintWriter os) {\n\n\n // Implement me!\n for (String e : edges.keySet()) {\n String src = e.substring(0, 1);\n String tar = e.substring(1, 2);\n int srcInt = indexOf(e.substring(0, 1), vertices);\n int eInt = edges.get(e);\n int w = getEdgeWeight(src, tar);\n\n os.println(src + \" \" + tar + \" \" + w);\n\n }\n\n }",
"void printGraph();",
"@Override\n public String toString()\n {\n StringBuilder sb = new StringBuilder();\n\n for(Vertex vertex: vertices)\n {\n sb.append(\"V: \" + vertex.toString() + '\\n');\n\n for(Edge edge: connections.get(vertex))\n {\n sb.append(\" -> \" + edge.other(vertex).toString() + \" (\" + edge.getWeight() + \")\\n\");\n }\n }\n\n return sb.toString();\n }",
"public void printRoutine()\n\t{\n\t\tfor (String name: vertices.keySet())\n\t\t{\n\t\t\tString value = vertices.get(name).toString();\n\t\t\tSystem.out.println(value);\n\t\t}\n\t}",
"List<IEdge> getAllEdges();",
"public List<IEdge> getAllEdges();",
"@Test\n public void getVertexes() {\n\n for (int i = 0; i < 6; i++) {\n\n Vertex temp = new Vertex(i + \"\", \"Location number \" + i);\n assertTrue(temp.equals(testGraph.getVertices ().get(i)));\n\n }\n }",
"public static void main(String[] args)\n {\n In in = new In(args[0]);\n Graph G = new Graph(in);\n\n // print out each edge (twice)\n for (int v = 0; v < G.V(); v++)\n for (int w : G.adj(v))\n System.out.println(v + \"-\" + w);\n }",
"public void printVertices(PrintWriter os) {\n\n\n // Implement me!\n String s = \"\";\n for (String k : vertices.keySet()) {\n s = s + k + \" \";\n }\n os.println(s);\n\n\n }",
"public void print (){\r\n for (int i = 0; i < graph.size(); ++i){\r\n graph.get(i).print();\r\n }\r\n }",
"public void setVertices(){\n\t\tvertices = new ArrayList<V>();\n\t\tfor (E e : edges){\n\t\t\tV v1 = e.getOrigin();\n\t\t\tV v2 = e.getDestination();\n\t\t\tif (!vertices.contains(v1))\n\t\t\t\tvertices.add(v1);\n\t\t\tif (!vertices.contains(v2))\n\t\t\t\tvertices.add(v2);\n\t\t}\n\t}",
"public void print(){\n String res = \"\" + this.number;\n for(Edge edge: edges){\n res += \" \" + edge.toString() + \" \";\n }\n System.out.println(res.trim());\n }",
"public static void printGraph(Graph g) {\r\n\t\tfor (int i = 0; i < g.V; i++) {\r\n\t\t\tSystem.out.print(\"Vertex \" + i + \": \");\r\n\t\t\t\r\n\t\t\tif (g.L.get(i).size() > 0) {\r\n\t\t\t\tSystem.out.print(g.L.get(i).get(0).printEdge());\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tfor (int r = 1; r < g.L.get(i).size(); r++) {\r\n\t\t\t\tSystem.out.print(\", \" + g.L.get(i).get(r).printEdge());\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t}",
"public void drawEdges(IEdgeDrawerGraph graph);",
"String getEdges();",
"public Enumeration vertices();",
"@Test\n\tpublic void verticesTest() {\n\t\tgraph.addVertex(A);\n\t\tgraph.addVertex(B);\n\t\tgraph.addVertex(C);\n\t\tgraph.addVertex(D);\n\t\tassertEquals(4, graph.vertices().size());\n\t\tassertTrue(graph.vertices().contains(A));\n\t\tassertTrue(graph.vertices().contains(D));\n\t}",
"public void printGraph(){\n\t\tSystem.out.println(\"[INFO] Graph: \" + builder.nrNodes + \" nodes, \" + builder.nrEdges + \" edges\");\r\n\t}",
"private String edgesLeavingVertexToString() {\n \n //make empty string\n String s = \"\";\n \n //for loop to go through all vertices; \n for (int j = 0; j < arrayOfVertices.length; j++) {\n \n //if it has any edges...\n if (arrayOfVertices[j].getDegree() > 0) {\n \n //go through its edges\n for (int k = 0; k < arrayOfVertices[j].getDegree(); k++) {\n \n //declare an array list\n ArrayList<Vertex> newArrayList = \n arrayOfVertices[j].getAdjacent();\n \n //add to string: the vertex itself + space + edge + line break\n s += j + \" \" + newArrayList.get(k).getID() + \"\\n\"; \n \n } \n } \n }\n \n //add -1, -1 after all the edges\n s += \"-1 -1\";\n \n return s; \n }",
"public String toString() {\n StringBuilder s = new StringBuilder();\n String NEWLINE = System.getProperty(\"line.separator\");\n s.append(vertices + \" \" + NEWLINE);\n for (int v = 0; v < vertices; v++) {\n s.append(String.format(\"%d: \", v));\n for (Map.Entry<Integer, Integer> e : adjacent(v).entrySet()) {\n s.append(String.format(\"%d (%d) \", e.getKey(), e.getValue()));\n }\n s.append(NEWLINE);\n }\n return s.toString();\n }",
"public static void main(String args[])\n\t{\n\t\tList<Vertex> v = new LinkedList<Vertex>();\n\t\tVertex v1 = new Vertex(1);\n\t\tVertex v2 = new Vertex(2);\n\t\tVertex v3 = new Vertex(3);\n \t\tVertex v4 = new Vertex(4);\n\t\t\n \t\t//Setting adjList for each vertex\n \t\tList<Vertex> adjList = new LinkedList<Vertex>();\n\t\tadjList.add(v2);\n\t\tadjList.add(v3);\n\t\tv1.setAdjList(adjList);\n\t\t\n\t\tadjList = new LinkedList<Vertex>();\n\t\tadjList.add(v4);\n\t\tv2.setAdjList(adjList);\n\t\t\n\t\tadjList = new LinkedList<Vertex>();\n\t\tadjList.add(v2);\n\t\tv3.setAdjList(adjList);\n\t\t\n\t\tadjList = new LinkedList<Vertex>();\n\t\tadjList.add(v3);\n\t\tv4.setAdjList(adjList);\n\t\t\n\t\tv.add(v1);\n\t\tv.add(v2);\n \t\tv.add(v3);\n\t\tv.add(v4);\n\n\t\tEdge e1 = new Edge(1, 2);\n\t\tList<Edge> e = new LinkedList<Edge>();\n\t\te.add(e1);\n\t\te1 = new Edge(1, 3);\n\t\te.add(e1);\n\t\te1 = new Edge(2, 4);\n\t\te.add(e1);\n\t\te1 = new Edge(4, 3);\n\t\te.add(e1);\n\t\te1 = new Edge(3, 2);\n\t\te.add(e1);\n\t\t\n\t\t\n\t\tGraph g = new Graph(v, e);\n\t\tg.bfs(v4);\n\t\t\n\t\t//v has all vertices\n\t\tg.unconnected(v2, v);\n\t}",
"public void print() {\n\t\tfor (int count = 0; count < adjacencyList.length; count++) {\n\t\t\tLinkedList<Integer> edges = adjacencyList[count];\n\t\t\tSystem.out.println(\"Adjacency list for \" + count);\n\n\t\t\tSystem.out.print(\"head\");\n\t\t\tfor (Integer edge : edges) {\n\t\t\t\tSystem.out.print(\" -> \" + edge);\n\t\t\t}\n\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println();\n\t\t}\n\t}",
"public String toString()\r\n\t{\r\n\t\tString str = \"\";\r\n\t\t\r\n\t\tSortedSet<String> sortedVertices = new TreeSet<String>(this.getVertices());\r\n\t\t\r\n\t\tstr += \"Vertices: \" + sortedVertices.toString() + \"\\nEdges:\\n\";\r\n\t\t\r\n\t\tfor(String vertex : sortedVertices)\r\n\t\t{\r\n\t\t\tif(this.dataMap.containsKey(vertex))\r\n\t\t\t{\r\n\t\t\t\tHashMap<String,Integer> adjMap = this.adjacencyMap.get(vertex);\r\n\t\t\t\t\r\n\t\t\t\tSortedSet<String> sortedKeys = new TreeSet<String>(adjMap.keySet());\r\n\t\t\t\t\r\n\t\t\t\tstr += \"Vertex(\" + vertex + \")--->{\";\r\n\t\t\t\tfor(String adj : sortedKeys)\r\n\t\t\t\t{\r\n\t\t\t\t\tstr += adj +\"=\"+ adjMap.get(adj) +\", \";\r\n\t\t\t\t}\r\n\t\t\t\tstr = str.trim();\r\n\t\t\t\t\r\n\t\t\t\tif(!sortedKeys.isEmpty())\r\n\t\t\t\t{\r\n\t\t\t\t\tStringBuilder s = new StringBuilder(str);\r\n\t\t\t\t\ts.deleteCharAt(str.length()-1);\r\n\t\t\t\t\tstr = s.toString();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tstr+=\"}\\n\";\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn str;\r\n\t}",
"@Test\n\tpublic void edgesTest() {\n\t\tList<Vertex> vertices = new ArrayList<>();\n\t\tvertices.add(C);\n\t\tvertices.add(D);\n\t\tedge_0.addVertices(vertices);\n\t\tList<Vertex> vertices1 = new ArrayList<>();\n\t\tvertices.add(A);\n\t\tvertices.add(B);\n\t\tedge_1.addVertices(vertices1);\n\t\tgraph.addEdge(edge_0);\n\t\tgraph.addEdge(edge_1);\n\t\tassertEquals(2, graph.edges().size());\n\t\tassertTrue(graph.edges().contains(edge_0));\n\t\tassertTrue(graph.edges().contains(edge_1));\n\t}",
"public String toString() {\n \tString printStatements = \"\";\n \t\n \tfor (Vertex vertex : this) {\n \t\tprintStatements += vertex + \" \";\n \t}\n \treturn printStatements;\n }",
"public void testContainsVertex() {\n System.out.println(\"containsVertex\");\n\n Graph<Integer, Edge<Integer>> graph = generateGraph();\n\n for (int i = 0; i < 25; i++) {\n Assert.assertTrue(graph.containsVertex(new Integer(i)));\n }\n }",
"public static void main(String[] args) {\n int vertex = 5;\n //value of vertexes\n int[][] matrix = new int[vertex+1][vertex+1];\n \n //to store the Edges informarion\n ArrayList<Edge> edgeList = new ArrayList<Edge>();\n edgeList.add(new Edge(1,2,2));\n edgeList.add(new Edge(2,3,4));\n edgeList.add(new Edge(2,4,8));\n edgeList.add(new Edge(3,1,3));\n edgeList.add(new Edge(3,5,8));\n edgeList.add(new Edge(5,2,7));\n edgeList.add(new Edge(5,4,3));\n \n //loop of the ArrayList\n for(int i=0; i<edgeList.size(); i++){\n //define the variable Edge as currentEdge\n Edge currentEdge = edgeList.get(i);\n //stored the information in these 3 variables\n int startVertex = currentEdge.startVertex;\n int endVertex = currentEdge.endVertex;\n int weight = currentEdge.weight;\n //updated matrix and created data structure for weighted Directed Graph\n matrix[startVertex][endVertex] = weight;\n }\n\n for(int i = 1; i<=vertex; i++){\n for(int j=1; j<=vertex; j++){\n System.out.print(matrix[i][j] + \" \");\n }\n System.out.println();\n //to move to the next line\n }\n }",
"public static void printGraph(Model aGraph) {\r\n\t\tStmtIterator triples;\t\t\t\t\t//To loop through the triples\r\n\t\tStatement triple;\t\t\t\t\t\t//One of the triples\r\n\r\n\t\ttriples = aGraph.listStatements();\r\n\t\twhile (triples.hasNext()) {\r\n\t\t\ttriple = triples.next();\r\n//\t\t\tSystem.out.print(\"\\t\");\r\n\t\t\tprintTriple(triple);\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t}",
"@DisplayName(\"Add edges\")\n @Test\n public void testAddEdges() {\n boolean directed1 = true;\n graph = new Graph(new Edge[0], directed1, 0, 5, GraphType.RANDOM);\n graph.addEdges(edges);\n List<Integer> l0 = new ArrayList<>();\n List<Integer> l1 = new ArrayList<>();\n List<Integer> l2 = new ArrayList<>();\n List<Integer> l4 = new ArrayList<>();\n l0.add(1);\n l1.add(2);\n l2.add(3);\n l4.add(0);\n\n Assertions.assertEquals(l0.get(0), graph.getNeighbours(0).get(0));\n Assertions.assertEquals(l1.get(0), graph.getNeighbours(1).get(0));\n Assertions.assertEquals(l2.get(0), graph.getNeighbours(2).get(0));\n Assertions.assertEquals(l4.get(0), graph.getNeighbours(4).get(0));\n }",
"public String toString() \n\t{\n\t\tString toReturn = \"\";\n\t\t\n\t\t\n\t\tfor(Vertex v : vertices) \n\t\t{\n\t\t\tHashMap<Vertex, Integer> E = getEdges(v);\n\t\t\t\n\t\t\tif(!E.isEmpty())\n\t\t\t{\n\t\t\t\ttoReturn = toReturn + v + \"(\";\n\t\t\t\tfor(Vertex edge : E.keySet()) \n\t\t\t\t{\n\t\t\t\t\ttoReturn = toReturn + edge.getName() + \", \";\n\t\t\t\t}\n\t\t\t\ttoReturn = toReturn.trim().substring(0, toReturn.length() - 2);\n\t\t\t\ttoReturn = toReturn + \")\\n\";\n\t\t\t}\n\t\t\telse {toReturn = toReturn + v + \"[]\\n\";}\n\t\t}\n\t\treturn toReturn;\n\t}",
"public void printEdgeSet(Graph<V, Pair<V>> g, String filename)\r\n\t{\n\t\tPrintWriter writer = null;\r\n\t\ttry {\r\n\t\t\twriter = new PrintWriter(filename, \"UTF-8\");\r\n\t\t} catch (FileNotFoundException | UnsupportedEncodingException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\tfor (Pair<V> e :g.getEdges())\r\n\t\t{\r\n\t\t\t\r\n\t\t\twriter.println(e.getFirst() + \"\\t\" + e.getSecond());\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\twriter.close();\r\n\t\t\r\n\t\t\r\n\t}",
"private void printGraphModel() {\n System.out.println(\"Amount of nodes: \" + graphModel.getNodes().size() +\n \" || Amount of edges: \" + graphModel.getEdges().size());\n System.out.println(\"Nodes:\");\n int i = 0;\n for (Node n : graphModel.getNodes()) {\n System.out.println(\"#\" + i + \" \" + n.toString());\n i++;\n }\n System.out.println(\"Edges:\");\n i = 0;\n for (Edge e : graphModel.getEdges()) {\n System.out.println(\"#\" + i + \" \" + e.toString());\n i++;\n }\n }",
"@Override\n public String toString()\n {\n String builder = new String();\n \tfor (V vertex : graph.keySet()){\n \t\tString strVertex = vertex.toString();\n \t\tbuilder = builder + strVertex + \": \";\n \t\tArrayList <V> edges = graph.get(vertex);\n \t\tint degree = edges.size();\n \t\tint i = 0;\n \t\tif (degree > 0){\n \t\t\twhile (i < degree -1){\n \t\t\t\tString strEdge = edges.get(i).toString();\n \t\t\t\tbuilder = builder + strEdge + \", \";\n \t\t\t\ti++;\n \t\t\t}\n \t\tString strEdge = edges.get(i).toString();\n \t\tbuilder = builder + strEdge + \"\\n\";\n\n \t\t}\n \t\telse{\n \t\t\tstrVertex = vertex.toString();\n \t\t\tbuilder = builder + strVertex + \": \\n\";\n \t\t}\n\n \t}\n \treturn builder;\n }",
"public static void main(String[] args) {\n\t\tVertex v1, v2, v3, v4, v5, v6, v7;\n\t\tv1 = new Vertex(\"v1\");\n\t\tv2 = new Vertex(\"v2\");\n\t\tv3 = new Vertex(\"v3\");\n\t\tv4 = new Vertex(\"v4\");\n\t\tv5 = new Vertex(\"v5\");\n\t\tv6 = new Vertex(\"v6\");\n\t\tv7 = new Vertex(\"v7\");\n\n\t\tv1.addAdjacency(v2, 2);\n\t\tv1.addAdjacency(v3, 4);\n\t\tv1.addAdjacency(v4, 1);\n\n\t\tv2.addAdjacency(v1, 2);\n\t\tv2.addAdjacency(v4, 3);\n\t\tv2.addAdjacency(v5, 10);\n\n\t\tv3.addAdjacency(v1, 4);\n\t\tv3.addAdjacency(v4, 2);\n\t\tv3.addAdjacency(v6, 5);\n\n\t\tv4.addAdjacency(v1, 1);\n\t\tv4.addAdjacency(v2, 3);\n\t\tv4.addAdjacency(v3, 2);\n\t\tv4.addAdjacency(v5, 2);\n\t\tv4.addAdjacency(v6, 8);\n\t\tv4.addAdjacency(v7, 4);\n\n\t\tv5.addAdjacency(v2, 10);\n\t\tv5.addAdjacency(v4, 2);\n\t\tv5.addAdjacency(v7, 6);\n\n\t\tv6.addAdjacency(v3, 5);\n\t\tv6.addAdjacency(v4, 8);\n\t\tv6.addAdjacency(v7, 1);\n\n\t\tv7.addAdjacency(v4, 4);\n\t\tv7.addAdjacency(v5, 6);\n\t\tv7.addAdjacency(v6, 1);\n\n\t\tArrayList<Vertex> weightedGraph = new ArrayList<Vertex>();\n\t\tweightedGraph.add(v1);\n\t\tweightedGraph.add(v2);\n\t\tweightedGraph.add(v3);\n\t\tweightedGraph.add(v4);\n\t\tweightedGraph.add(v5);\n\t\tweightedGraph.add(v6);\n\t\tweightedGraph.add(v7);\n\t\t\n\t\tdijkstra( weightedGraph, v7 );\n\t\tprintPath( v1 );\n\t\tSystem.out.println(\"\");\n\t\tprintPath( v2 );\n\t\tSystem.out.println(\"\");\n\t\tprintPath( v3 );\n\t\tSystem.out.println(\"\");\n\t\tprintPath( v4 );\n\t\tSystem.out.println(\"\");\n\t\tprintPath( v5 );\n\t\tSystem.out.println(\"\");\n\t\tprintPath( v6 );\n\t\tSystem.out.println(\"\");\n\t\tprintPath( v7 );\n\t\tSystem.out.println(\"\");\n\t}",
"public void testVerticesSet() {\n System.out.println(\"verticesSet\");\n\n Assert.assertTrue(generateGraph().verticesSet().size() == 25);\n }",
"public void drawEdges(){\n for (Edge edge : primsAlg.getEdges()){\n //DRAW VIEW\n drawView = new DrawView(this);\n drawView.setVertex1(edge.getVertex1());\n drawView.setVertex2(edge.getVertex2());\n primsLayout.addView(drawView);\n\n addEdge(drawView);\n\n showWeight(edge);\n\n }\n }",
"public void printGraph()\n {\n Iterator<T> nodeIterator = nodeList.keySet().iterator();\n \n while (nodeIterator.hasNext())\n {\n GraphNode curr = nodeList.get(nodeIterator.next());\n \n while (curr != null)\n {\n System.out.print(curr.nodeId+\"(\"+curr.parentDist+\")\"+\"->\");\n curr = curr.next;\n }\n System.out.print(\"Null\");\n System.out.println();\n }\n }",
"public void printStatus(){\n System.out.println(\"Nodes: \" + \n getVertexCount() + \" Edges: \" + \n getEdgeCount()); \n //and \" + getEdgeCount() + \" edges active.\");\n }",
"@Test\n void test08_getAllAdjacentVertices() {\n graph.addEdge(\"a\", \"b\");\n graph.addEdge(\"a\", \"c\"); // add two edges\n\n List<String> check = new ArrayList<>();\n check.add(\"b\");\n check.add(\"c\"); // create mock up adjacent list\n\n if (!check.equals(graph.getAdjacentVerticesOf(\"a\"))) { // checks if both are same\n fail(\"graph didn't record adjacent vertices correctly\");\n }\n }",
"public static void printEntireGraph(Graph g){\n \t\n \tfor(String v :g.vertexMap.keySet()){\n \t\t\n \t\tSystem.out.println(v+ ((g.vertexMap.get(v).isDown)?\" DOWN\":\"\"));\n \t\t\n \t\tfor (Edge adj :g.vertexMap.get(v).adjEdge.values()){\n \t\t\t\tSystem.out.print('\\t');\n \t\t\t\tSystem.out.print(adj.adjVertex.name+\" \");\n \t\t\t\tSystem.out.print(adj.dist+ ((adj.isDown)?\" DOWN\":\"\"));\n \t\t\t\tSystem.out.println();\n \t\t}\n \t\t\n \t}\n \t\n \t\n }",
"public String toString()\n\t{\n\t \n\t\tString str = vertexName + \": \" ;\n\t\tfor(int i = 0 ; i < adjacencyList.size(); i++)\n\t\t\tstr = str + adjacencyList.get(i).vertexName + \" \";\n\t\treturn str ;\n\t\t\n\t}",
"public static void main(String [] args){\n\t\tSystem.out.println(\"Code by github: Vinay26k\");\n\t\t // create the graph given in above figure\n int V = 5;\n Graph graph = new Graph(V);\n addEdge(graph, 0, 1);\n addEdge(graph, 0, 4);\n addEdge(graph, 1, 2);\n addEdge(graph, 1, 3);\n addEdge(graph, 1, 4);\n addEdge(graph, 2, 3);\n addEdge(graph, 3, 4);\n \n // print the adjacency list representation of \n // the above graph\n printGraph(graph);\n\t}",
"public abstract Set<? extends EE> edgesOf(VV vertex);",
"public Iterable<DirectedEdge> edges() {\n ArrayList<DirectedEdge> list = new ArrayList<DirectedEdge>();\n for (int v = 0; v < V; v++) {\n for (DirectedEdge e : adj(v)) {\n list.add(e);\n }\n }\n return list;\n }",
"@Test\n public void getEdges() {\n\n for (int i = 0; i < 5; i++) {\n\n Edge temp = new Edge(i + \"\",testVertices.get(i),testVertices.get(i+1) ,(i*10));\n assertEquals(temp.getId(),testGraph.getEdges().get(i).getId());\n\n }\n }",
"@Override\n\tpublic Iterator<E> iterator() {\n\t\treturn vertices.iterator();\n\t}",
"public static void main(String[] args) {\n\tGraph g = new Graph(9);\n\tg.addEdge(0,2);\n\tg.addEdge(0,5);\n\tg.addEdge(2,3);\n\tg.addEdge(2,4);\n\tg.addEdge(5,3);\n\tg.addEdge(5,6);\n\tg.addEdge(3,6);\n\tg.addEdge(6,7);\n\tg.addEdge(6,8);\n\tg.addEdge(6,4);\n\tg.addEdge(7,8);\n\t \n\tg.printGraph();\n\tSystem.out.println(\"Number of edges: \" + numEdges(g));\n\t\n }",
"@Override\r\n\tpublic String toString() {\r\n\t\tStringBuilder out = new StringBuilder();\r\n\t\tMap<Integer,Integer> tmp;\r\n\t\tout.append(\"{\");\r\n\t\tfor(int i = 0; i < edges.length; i++) {\r\n\t\t\ttmp = edges[i];\r\n\t\t\tif (tmp == null) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tfor(Map.Entry entry : tmp.entrySet()) {\r\n\t\t\t\t\tif ((int)entry.getValue() == -1) {\r\n\t\t\t\t\tout.append(\"(\" + i + \",\" + entry.getKey() + \")\" + \",\");\r\n\t\t\t\t} else{\r\n\t\t\t\t\tout.append(\"(\" + i + \",\" + entry.getKey() + \",\" + entry.getValue() + \")\" + \",\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (out.length() > 2) {\r\n\t\tout.setLength(out.length() - 2);\r\n\t\tout.append(\")\");\r\n\t\t}\r\n\r\n\t\tout.append(\"}\");\r\n\t\treturn out.toString();\r\n\t}",
"@Override\n\tpublic String toString()\n\t{\n\t\t/* output looks like this\n\t\t * \n\t\t * 20 - 10, 30 20 has edges with 10 and 30\n\t\t * 40 - 10, 30 \t\t40 has edges with 10 and 30\n\t\t * 10 - 20, 40 \t\t\t10 has edges with 20 and 40\n\t\t * 30 - 20, 40 \t\t\t30 has edges with 20 and 40\n\t\t */\n\t\tString str = new String();\n\t\tfor(Map.Entry<Object, SinglyLinkedList> vertex : map.entrySet())\n\t\t\tstr += vertex.getKey() + \" - \" + vertex.getValue() + '\\n';\t\t\t\t\n\t\treturn str;\n\t}",
"public void testGetEdge() {\n System.out.println(\"getEdge\");\n\n Graph<Integer, Edge<Integer>> graph = generateGraph();\n\n for (int i = 0; i < 25; i++) {\n for (int j = 0; j < 25; j++) {\n if ((i + j) % 2 != 0) {\n Assert.assertNull(graph.getEdge(new Integer(i), new Integer(j)));\n } else {\n Assert.assertNotNull(graph.getEdge(new Integer(i), new Integer(j)));\n }\n }\n }\n }",
"List<Edge<V>> getEdgeList();",
"public String toString() {\n \tStringBuilder s = new StringBuilder();\n \ts.append(V + \" vertices, \" + E + \" edges \" + NEWLINE);\n \tfor(int v = 0; v < V; v++) {\n \t\ts.append(v + \": \");\n \t\tfor(int w : adj[v]) {\n \t\t\ts.append(w + \" \");\n \t\t}\n \t\ts.append(NEWLINE);\n \t}\n \t\n \treturn s.toString();\n }",
"public String toString() \n {\n String NEWLINE = System.getProperty(\"line.separator\");\n StringBuilder s = new StringBuilder();\n for (int v = 0; v < V; v++) \n {\n s.append(v + \": \");\n for (DirectedEdge e : adj[v]) \n {\n \tif(e.online)\n \t{\n \t\ts.append(e + \" \");\n \t}\n }\n s.append(NEWLINE);\n }\n return s.toString();\n }",
"public void printAdjacencyMatrix();",
"ArrayList<Edge> getEdges(ArrayList<ArrayList<Vertex>> v) {\n ArrayList<Edge> all = new ArrayList<Edge>();\n for (ArrayList<Vertex> verts : v) {\n for (Vertex vt : verts) {\n for (Edge ed : vt.outEdges) {\n all.add(ed);\n }\n }\n }\n return all;\n }",
"private String edgeString()\n {\n Iterator<DSAGraphEdge<E>> iter = edgeList.iterator();\n String outputString = \"\";\n DSAGraphEdge<E> edge = null;\n while (iter.hasNext())\n {\n edge = iter.next();\n outputString = (outputString + edge.getLabel() + \", \");\n }\n return outputString;\n }",
"public Iterable<Edge> edges() {\r\n Bag<Edge> list = new Bag<Edge>();\r\n for (int v = 0; v < V; v++) {\r\n for (Edge e : adj(v)) {\r\n list.add(e);\r\n }\r\n }\r\n return list;\r\n }",
"public void printLaptops(){\n\t\tSystem.out.println(\"Root is: \"+vertices.get(root));\n\t\tSystem.out.println(\"Edges: \");\n\t\tfor(int i=0;i<parent.length;i++){\n\t\t\tif(parent[i] != -1){\n\t\t\t\tSystem.out.print(\"(\"+vertices.get(parent[i])+\", \"+\n\t\t\tvertices.get(i)+\") \");\n\t\t\t}\n\t\t}\n\t\tSystem.out.println();\n\t\t}",
"public void display() {\r\n\t\tArrayList<String> vnames = new ArrayList<>(vces.keySet());\r\n\t\tfor (String vname : vnames) {\r\n\t\t\tString str = vname + \" => \";\r\n\t\t\tVertex vtx = vces.get(vname);\r\n\r\n\t\t\tArrayList<String> nbrnames = new ArrayList<>(vtx.nbrs.keySet());\r\n\t\t\tfor (String nbrname : nbrnames) {\r\n\t\t\t\tstr += nbrname + \"[\" + vtx.nbrs.get(nbrname) + \"], \";\r\n\t\t\t}\r\n\r\n\t\t\tSystem.out.println(str + \".\");\r\n\t\t}\r\n\t}",
"private void addVerticesToGraph()\n\t{\n\t\tString vertexName;\n\n\t\tMap<Long, IOFSwitch> switches = this.floodlightProvider.getSwitches();\n\t\tfor(IOFSwitch s :switches.values())\n\t\t{\n\t\t\tvertexName =Long.toString(s.getId());\n\t\t\tm_graph.addVertex(vertexName);\t\t\t \t\t\t \n\t\t}\n\t\tSystem.out.println(m_graph);\n\t}",
"@Test\n public void tae4()\n {\n Graph graph = new Graph(4);\n graph.addEdge(0,0);\n graph.addEdge(0,1);\n graph.addEdge(0,2);\n graph.addEdge(0,3);\n graph.addEdge(1,0);\n graph.addEdge(1,1);\n graph.addEdge(1,2);\n graph.addEdge(1,3);\n graph.addEdge(2,0);\n graph.addEdge(2,1);\n graph.addEdge(2,2);\n graph.addEdge(2,3);\n graph.addEdge(3,0);\n graph.addEdge(3,1);\n graph.addEdge(3,2);\n graph.addEdge(3,3);\n System.out.println(graph);\n assertEquals(graph.toString(), \"numNodes: 4\\nedges: [[true, true, true, true], [true, true, true, true], \" +\n \"[true, true, true, true], [true, true, true, true]]\");\n }",
"Collection<E> edges();",
"public static void main(String[] args) {\n\t\tString vertex=\"abcdefghij\";\n\t\tString edge=\"bdegachiabefbc\";\n\t\tchar[] vc=vertex.toCharArray();\n\t\tchar[] ec=edge.toCharArray();\n\t\tint[] v=new int[vc.length];\n\t\tfor (int i = 0; i < v.length; i++) {\n\t\t\tv[i]=vc[i]-'a'+1;\n\t\t}\n\t\tint[] e=new int[ec.length];\n\t\tfor (int i = 0; i < e.length; i++) {\n\t\t\te[i]=ec[i]-'a'+1;\n\t\t}\t\t\n\t\t\n\t\tDS_List ds_List=new DS_List(v.length);\n//\t\tfor (int i = 0; i < v.length; i++) {\n//\t\t\tds_List.make_set(v[i]);\n//\t\t}\n//\t\tfor (int i = 0; i < e.length; i=i+2) {\n//\t\t\tif (ds_List.find_set(e[i])!=ds_List.find_set(e[i+1])) {\n//\t\t\t\tds_List.union(e[i], e[i+1]);\n//\t\t\t}\n//\t\t}\n\t\tds_List.connect_components(v, e);\n\t\tfor (int i = 0; i < v.length; i++) {\n\t\t\tSystem.out.print(ds_List.find_set(v[i])+\" \");\n\t\t}\n\t\tSystem.out.println();\n\t\tSystem.out.println(ds_List.same_component(v[1], v[2]));\n\t}",
"public void testContainsEdge() {\n System.out.println(\"containsEdge\");\n\n Graph<Integer, Edge<Integer>> graph = generateGraph();\n\n for (int i = 0; i < 25; i++) {\n for (int j = 0; j < 25; j++) {\n if ((i + j) % 2 != 0) {\n Assert.assertFalse(graph.containsEdge(new Integer(i), new Integer(j)));\n } else {\n Assert.assertTrue(graph.containsEdge(new Integer(i), new Integer(j)));\n }\n }\n }\n\n }",
"@Override\n\tpublic int graphOrder() {\n\t\treturn vertices.size();\n\t}",
"@Test\r\n public void testOutboundEdges() {\r\n System.out.println(\"outboundEdges\");\r\n MyDigraph instance = new MyDigraph();\r\n\r\n Object v1Element = 1;\r\n Object v2Element = 2;\r\n Object v3Element = 3;\r\n\r\n Vertex v1 = instance.insertVertex(v1Element);\r\n Vertex v2 = instance.insertVertex(v2Element);\r\n Vertex v3 = instance.insertVertex(v3Element);\r\n\r\n Object edgeElement = \"A\";\r\n Edge e1 = instance.insertEdge(v1, v2, edgeElement);\r\n Edge e2 = instance.insertEdge(v1, v3, edgeElement);\r\n Edge e3 = instance.insertEdge(v2, v3, edgeElement);\r\n\r\n Collection e1OutboundEdges = instance.outboundEdges(v2);\r\n Collection e2OutboundEdges = instance.outboundEdges(v3);\r\n Collection e3OutboundEdges = instance.outboundEdges(v3);\r\n\r\n boolean e1Result = e1OutboundEdges.contains(e1);\r\n boolean e2Result = e2OutboundEdges.contains(e2);\r\n boolean e3Result = e3OutboundEdges.contains(e3);\r\n\r\n Object expectedResult = true;\r\n assertEquals(expectedResult, e1Result);\r\n assertEquals(expectedResult, e2Result);\r\n assertEquals(expectedResult, e3Result);\r\n }",
"public Enumeration directedEdges();",
"public String toString() {\n StringBuilder s = new StringBuilder();\n s.append(ver + \" vertices, \" + edg + \" edges \" + NEWLINE);\n for (int v = 0; v < ver; v++) {\n s.append(String.format(\"%d: \", v));\n for (int w : adj[v]) {\n s.append(String.format(\"%d \", w));\n }\n s.append(NEWLINE);\n }\n return s.toString();\n }",
"public static void main(String[] args) {\n\t\tAdjList IM = new AdjList();\n\t\tPrintWriter os = new PrintWriter(System.out);\n\t\t\n\t\tIM.addVertex(\"A\");\n\t\tIM.addVertex(\"B\");\n\t\tIM.addVertex(\"C\");\n\t\tIM.addVertex(\"D\");\n\t\tIM.addVertex(\"E\");\n\t\tIM.addVertex(\"F\");\n\t\t\n\t\tIM.addEdge(\"A\", \"B\", 1);\n\t\tIM.addEdge(\"C\", \"B\", 1);\n\t\tIM.addEdge(\"B\", \"D\", 1);\n\t\tIM.addEdge(\"A\", \"E\", 3);\n\t\tIM.addEdge(\"D\", \"C\", 5);\n\t\tIM.addEdge(\"F\", \"A\", 2);\n\t\t\n\t\tIM.outNearestNeighbours(-1, \"A\");\n\t\tIM.inNearestNeighbours(-1, \"F\");\n\t\t\n\t\tIM.getEdgeWeight(\"C\", \"B\");\n\t\tIM.getEdgeWeight(\"B\", \"C\");\n\t\tIM.getEdgeWeight(\"A\", \"E\");\n\t\t\n\t\tIM.updateWeightEdge(\"C\", \"B\", 4);\n\t\tIM.updateWeightEdge(\"A\", \"B\", 0);\n\t\t\n\t\tIM.removeVertex(\"D\");\n\t\t\n\t\tIM.addVertex(\"G\");\n\t\t\n\t\tIM.printVertices(os);\n\t\tIM.printEdges(os);\n\t\t\n\t}",
"public static strictfp void main(String... args) {\n\t\tArrayList<Vertex> graph = new ArrayList<>();\r\n\t\tHashMap<Character, Vertex> map = new HashMap<>();\r\n\t\t// add vertices\r\n\t\tfor (char c = 'a'; c <= 'i'; c++) {\r\n\t\t\tVertex v = new Vertex(c);\r\n\t\t\tgraph.add(v);\r\n\t\t\tmap.put(c, v);\r\n\t\t}\r\n\t\t// add edges\r\n\t\tfor (Vertex v: graph) {\r\n\t\t\tif (v.getNodeId() == 'a') {\r\n\t\t\t\tv.getAdjacents().add(map.get('b'));\r\n\t\t\t\tv.getAdjacents().add(map.get('h'));\r\n\t\t\t} else if (v.getNodeId() == 'b') {\r\n\t\t\t\tv.getAdjacents().add(map.get('a'));\r\n\t\t\t\tv.getAdjacents().add(map.get('c'));\r\n\t\t\t\tv.getAdjacents().add(map.get('h'));\r\n\t\t\t} else if (v.getNodeId() == 'c') {\r\n\t\t\t\tv.getAdjacents().add(map.get('b'));\r\n\t\t\t\tv.getAdjacents().add(map.get('d'));\r\n\t\t\t\tv.getAdjacents().add(map.get('f'));\r\n\t\t\t\tv.getAdjacents().add(map.get('i'));\r\n\t\t\t} else if (v.getNodeId() == 'd') {\r\n\t\t\t\tv.getAdjacents().add(map.get('c'));\r\n\t\t\t\tv.getAdjacents().add(map.get('e'));\r\n\t\t\t\tv.getAdjacents().add(map.get('f'));\r\n\t\t\t} else if (v.getNodeId() == 'e') {\r\n\t\t\t\tv.getAdjacents().add(map.get('d'));\r\n\t\t\t\tv.getAdjacents().add(map.get('f'));\r\n\t\t\t} else if (v.getNodeId() == 'f') {\r\n\t\t\t\tv.getAdjacents().add(map.get('c'));\r\n\t\t\t\tv.getAdjacents().add(map.get('d'));\r\n\t\t\t\tv.getAdjacents().add(map.get('e'));\r\n\t\t\t\tv.getAdjacents().add(map.get('g'));\r\n\t\t\t} else if (v.getNodeId() == 'g') {\r\n\t\t\t\tv.getAdjacents().add(map.get('f'));\r\n\t\t\t\tv.getAdjacents().add(map.get('h'));\r\n\t\t\t\tv.getAdjacents().add(map.get('i'));\r\n\t\t\t} else if (v.getNodeId() == 'h') {\r\n\t\t\t\tv.getAdjacents().add(map.get('a'));\r\n\t\t\t\tv.getAdjacents().add(map.get('b'));\r\n\t\t\t\tv.getAdjacents().add(map.get('g'));\r\n\t\t\t\tv.getAdjacents().add(map.get('i'));\r\n\t\t\t} else if (v.getNodeId() == 'i') {\r\n\t\t\t\tv.getAdjacents().add(map.get('c'));\r\n\t\t\t\tv.getAdjacents().add(map.get('g'));\r\n\t\t\t\tv.getAdjacents().add(map.get('h'));\r\n\t\t\t}\t\r\n\t\t}\r\n\t\t// graph created\r\n\t\t// create disjoint sets\r\n\t\tDisjointSet S = null, V_S = null;\r\n\t\tfor (Vertex v: graph) {\r\n\t\t\tchar c = v.getNodeId();\r\n\t\t\tif (c == 'a' || c == 'b' || c == 'd' || c == 'e') {\r\n\t\t\t\tif (S == null) {\r\n\t\t\t\t\tS = v.getDisjointSet();\r\n\t\t\t\t} else {\r\n\t\t\t\t\tDisjointSet set = DisjointSet.union(S, v.getDisjointSet());\r\n\t\t\t\t\tv.setDisjointSet(set);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tif (V_S == null) {\r\n\t\t\t\t\tV_S = v.getDisjointSet();\r\n\t\t\t\t} else {\r\n\t\t\t\t\tDisjointSet set = DisjointSet.union(V_S, v.getDisjointSet());\r\n\t\t\t\t\tv.setDisjointSet(set);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t// Disjoint sets created\r\n\t\tfor (Vertex u: graph) {\r\n\t\t\tfor (Vertex v: u.getAdjacents()) {\r\n\t\t\t\tif (DisjointSet.findSet((DisjointSet) u.getDisjointSet()) == \r\n\t\t\t\t DisjointSet.findSet((DisjointSet) v.getDisjointSet())) {\r\n\t\t\t\t\tSystem.out.println(\"The cut respects (\" + u.getNodeId() + \", \" + v.getNodeId() + \").\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"ArrayList<Edge> getAdjacencies();",
"public String toString(){\n String s = \"\";\n s += \"\\t\";\n \n for (int i = 0; i < n; i++){\n // adding vertices for columns\n s += vertices[i] + \"\\t\";\n }\n \n s += \"\\n\";\n \n for (int i = 0; i < n; i++){\n s += vertices[i] + \"\\t\"; // vertex for row\n for (int j = 0; j < n; j++){\n s += edges[j][i] + \"\\t\"; // adding edges across row\n }\n s += \"\\n\";\n }\n \n return s;\n }",
"public Enumeration edges();",
"Iterable<Long> vertices() {\n return nodes.keySet();\n }",
"public abstract ArrayList<Pair<Vector2, Vector2>> getEdges();",
"private List<Vertex> prepareGraphAdjacencyList() {\n\n\t\tList<Vertex> graph = new ArrayList<Vertex>();\n\t\tVertex vertexA = new Vertex(\"A\");\n\t\tVertex vertexB = new Vertex(\"B\");\n\t\tVertex vertexC = new Vertex(\"C\");\n\t\tVertex vertexD = new Vertex(\"D\");\n\t\tVertex vertexE = new Vertex(\"E\");\n\t\tVertex vertexF = new Vertex(\"F\");\n\t\tVertex vertexG = new Vertex(\"G\");\n\n\t\tList<Edge> edges = new ArrayList<Edge>();\n\t\tedges.add(new Edge(vertexB, 2));\n\t\tedges.add(new Edge(vertexD, 6));\n\t\tedges.add(new Edge(vertexF, 5));\n\t\tvertexA.incidentEdges = edges;\n\n\t\tedges = new ArrayList<Edge>();\n\t\tedges.add(new Edge(vertexA, 2));\n\t\tedges.add(new Edge(vertexC, 7));\n\t\tvertexB.incidentEdges = edges;\n\n\t\tedges = new ArrayList<Edge>();\n\t\tedges.add(new Edge(vertexB, 7));\n\t\tedges.add(new Edge(vertexD, 9));\n\t\tedges.add(new Edge(vertexF, 1));\n\t\tvertexC.incidentEdges = edges;\n\n\t\tedges = new ArrayList<Edge>();\n\t\tedges.add(new Edge(vertexA, 6));\n\t\tedges.add(new Edge(vertexC, 9));\n\t\tedges.add(new Edge(vertexE, 4));\n\t\tedges.add(new Edge(vertexG, 8));\n\t\tvertexD.incidentEdges = edges;\n\n\t\tedges = new ArrayList<Edge>();\n\t\tedges.add(new Edge(vertexD, 4));\n\t\tedges.add(new Edge(vertexF, 3));\n\t\tvertexE.incidentEdges = edges;\n\n\t\tedges = new ArrayList<Edge>();\n\t\tedges.add(new Edge(vertexA, 5));\n\t\tedges.add(new Edge(vertexC, 1));\n\t\tedges.add(new Edge(vertexE, 3));\n\t\tvertexF.incidentEdges = edges;\n\n\t\tedges = new ArrayList<Edge>();\n\t\tedges.add(new Edge(vertexD, 8));\n\t\tvertexG.incidentEdges = edges;\n\n\t\tgraph.add(vertexA);\n\t\tgraph.add(vertexB);\n\t\tgraph.add(vertexC);\n\t\tgraph.add(vertexD);\n\t\tgraph.add(vertexE);\n\t\tgraph.add(vertexF);\n\t\tgraph.add(vertexG);\n\n\t\treturn graph;\n\t}",
"@Test\n public void testEdges() {\n Vertex v1 = new Vertex(1, \"A\");\n Vertex v2 = new Vertex(2, \"B\");\n Vertex v3 = new Vertex(3, \"C\");\n Vertex v4 = new Vertex(4, \"D\");\n\n Edge<Vertex> e1 = new Edge<>(v1, v2, 5);\n Edge<Vertex> e2 = new Edge<>(v2, v3, 7);\n Edge<Vertex> e3 = new Edge<>(v1, v4, 9);\n\n Graph<Vertex, Edge<Vertex>> g = new Graph<>();\n g.addVertex(v1);\n g.addVertex(v2);\n g.addVertex(v3);\n g.addVertex(v4);\n g.addEdge(e1);\n g.addEdge(e2);\n g.addEdge(e3);\n\n Set<Edge> expectedEdges = new HashSet<>();\n expectedEdges.add(e1);\n expectedEdges.add(e2);\n expectedEdges.add(e3);\n\n assertEquals(expectedEdges, g.allEdges());\n\n expectedEdges.remove(e2);\n assertEquals(expectedEdges, g.allEdges(v1));\n\n assertEquals(e3, g.getEdge(v1, v4));\n }"
] | [
"0.73372287",
"0.7274329",
"0.7271158",
"0.7066141",
"0.7063972",
"0.69309175",
"0.69201964",
"0.6910911",
"0.6893806",
"0.6838163",
"0.6826232",
"0.6822198",
"0.67400426",
"0.6726466",
"0.67193073",
"0.66738385",
"0.66722345",
"0.6577004",
"0.6566935",
"0.64947104",
"0.64447594",
"0.64299536",
"0.6411913",
"0.6404797",
"0.6342653",
"0.6300435",
"0.62928313",
"0.6283119",
"0.6275408",
"0.6244774",
"0.6229924",
"0.6216961",
"0.62156487",
"0.62031066",
"0.6198789",
"0.61964524",
"0.61958814",
"0.61930233",
"0.6187105",
"0.6180518",
"0.61687165",
"0.6167692",
"0.6148332",
"0.6144519",
"0.61320615",
"0.61166495",
"0.6116488",
"0.6103642",
"0.60762644",
"0.60757345",
"0.605714",
"0.6037697",
"0.60253274",
"0.6022808",
"0.60141903",
"0.599342",
"0.5984612",
"0.5983695",
"0.5965731",
"0.59599864",
"0.5954183",
"0.594641",
"0.5942709",
"0.5941812",
"0.59306735",
"0.59305745",
"0.5929239",
"0.5927751",
"0.5927503",
"0.5919946",
"0.59055257",
"0.59005636",
"0.58992183",
"0.58977807",
"0.5888477",
"0.5882989",
"0.5872163",
"0.5869169",
"0.5856978",
"0.5852123",
"0.5850817",
"0.58384913",
"0.58319324",
"0.5826153",
"0.58152425",
"0.58146",
"0.58001894",
"0.5796145",
"0.57924724",
"0.5788469",
"0.5785884",
"0.5779788",
"0.57488513",
"0.57483643",
"0.57444584",
"0.57410353",
"0.57383096",
"0.57374513",
"0.57251644",
"0.5718701"
] | 0.7921553 | 0 |
MUTATORS IMPORT: label (String) EXPORT: target (DSAGraphVertex) ASSERTION: iterates through vertices list w/ a label and returns target if found Throws: NoSuchElementException | public DSAGraphVertex getVertex(String label)
{
DSAGraphVertex temp, target = null;
Iterator<DSAGraphVertex> itr = vertices.iterator();
if(vertices.isEmpty()) // case: list is empty
{
throw new NoSuchElementException("Vertices list is empty.");
}
else //searches for target
{
while(itr.hasNext()) //iterates until target is found
{
temp = itr.next();
if(temp.getLabel().equals(label))
{
target = temp;
}
}
}
if(target == null) // case: not found
{
throw new NoSuchElementException("Label |" + label + "| not found");
}
return target;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@InVertex\n Object getTarget();",
"@Override\n public Vertex getTarget() {\n return targetVertex;\n }",
"public static LabelExpression label(LabelTarget labelTarget) { throw Extensions.todo(); }",
"private CFGNode findTarget(String target, ArrayList<CFGNode> nodes) {\n for (CFGNode n: nodes) {\n if (n.block.label != null && n.block.label.trim().equals(target.trim())) {\n return n;\n }\n }\n\n return null;\n }",
"@Test\n\tpublic void targetsTest() {\n\t\tgraph.addVertex(A);\n\t\tgraph.addVertex(B);\n\t\tgraph.addVertex(C);\n\t\tgraph.addVertex(D);\n\t\tList<Vertex> vertices = new ArrayList<>();\n\t\tvertices.add(A);\n\t\tvertices.add(B);\n\t\tedge_0.addVertices(vertices);\n\t\tgraph.addEdge(edge_0);\n\t\tassertTrue(graph.targets(A).keySet().contains(B));\n\t\tassertTrue(graph.targets(A).get(B) == 1);\n\t}",
"public boolean findInEdge(String label){\n\t\tfor(Entry<String, LinkedList<Edge>> s: vertices.entrySet()){\n\t\t\tfor(int i=0; i < vertices.get(s.getKey()).size();i++){\n\t\t\t\tif(vertices.get(s.getKey()).get(i).getDLabel().equals(label)){\n\t\t\t\t\tdelEdge(s.getKey(),label);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}",
"public static GotoExpression continue_(LabelTarget labelTarget) { throw Extensions.todo(); }",
"public static GotoExpression continue_(LabelTarget labelTarget, Class clazz) { throw Extensions.todo(); }",
"public static GotoExpression return_(LabelTarget labelTarget) { throw Extensions.todo(); }",
"String targetGraph();",
"public boolean isAdjacent(String label1, String label2)\n\t{\n\t\tboolean found = false;\n\t\ttry {\n\t\t\tDSAGraphVertex temp, vx1 = getVertex(label1);\n\t\t\tDSALinkedList adjList = vx1.getAdjacent();\n\t\t\tIterator<DSAGraphVertex> itr = adjList.iterator(); // - Maybe needs to check instance?\n\t\t\tif(!adjList.isEmpty()) // if list is not empty\n\t\t\t{\n\t\t\t\twhile(itr.hasNext()) //iterates until target is found\n\t\t\t\t{\n\t\t\t\t\ttemp = itr.next();\n\t\t\t\t\tif(temp.getLabel().equals(label2))\n\t\t\t\t\t{\n\t\t\t\t\t\tfound = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (NoSuchElementException e) {\n\t\t\t//Handles exception thrown by getVertex()\n\t\t\tfound = false;\n\t\t}\n\t\treturn found;\n\t}",
"public static GotoExpression goto_(LabelTarget labelTarget) { throw Extensions.todo(); }",
"public static LabelExpression label(LabelTarget labelTarget, Expression expression) { throw Extensions.todo(); }",
"public Town getTargetVertex(Town sourceVertex) {\r\n\t\tfor(Town town: vertices) {\r\n\t\t\tif(!town.equals(sourceVertex)) {\r\n\t\t\t\treturn town;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn null;\r\n\t}",
"public static LabelTarget label() { throw Extensions.todo(); }",
"public boolean addVertex(T vertexLabel);",
"public IdentifierListNode getTargets()throws ClassCastException;",
"@Test\n public void testWithUnknownLabel() throws Exception {\n LogicalGraph socialGraph = getSocialNetworkLoader().getLogicalGraph();\n LogicalGraph result = socialGraph\n .callForGraph(new VertexDeduplication<>(\"NotInTheGraph\", Arrays.asList(\"a\", \"b\")));\n collectAndAssertTrue(socialGraph.equalsByData(result));\n }",
"public void gotoVertex(char v) {\r\n\t\tfor (int i = 0; i < vertices.size(); i++) {\r\n\t\t\tif (vertices.get(i).label == v) {\r\n\t\t\t\tcurrentVertex = vertices.get(i);\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(\"The vertex \" + v + \" does not exist.\");\r\n\t}",
"public DSALinkedList getAdjacent(String label)\n\t{\n\t\tDSAGraphVertex vx = getVertex(label);\n\t\treturn vx.getAdjacent();\n\t}",
"public void search(int target){\n\t\t\n\t\tint position = 0;\n\t\tfor(Node temp = head; temp != null; temp = temp.next){ // loops through list to find the node\n\t\t\tif(temp.data == target){\n\t\t\t\tSystem.out.println(target + \" was found at position \" + position);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tposition++;\n\t\t}\n\t\tSystem.out.println(target + \" was not found\"); // printed if node was not found\n}",
"private void buildGraph(Target target) {\n Graph g = new Graph();\n\n //add the nodes to the graph\n for (int i = 0; i < vertices.size() ; i++) {\n if (vertices.get(i).getNeigbours().size() != 0) {\n Node d = new Node(\"\" + i);\n d.set_id(i);\n g.add(d);\n }\n }\n\n Node a = new Node(\"\" + (vertices.size() -1));\n a.set_id((vertices.size() -1));\n g.add(a);\n\n //add the edges\n for (int i = 0; i < vertices.size(); i++) {\n GraphNode curr = vertices.get(i);\n if (curr.getNeigbours().size() != 0 ) {\n for (GraphNode neighbour : curr.getNeigbours()) {\n g.addEdge(\"\" + i, \"\" + neighbour.getID(), curr.getPoint().distance2D(neighbour.getPoint()));\n }\n }\n }\n\n // find the minimums path to the fruit\n Graph_Algo.dijkstra(g, \"\"+ 0);\n Node b = g.getNodeByName(\"\" + (vertices.size()-1));\n ArrayList<String> shortestPath = b.getPath();\n target.setDistance(b.getDist());\n\n for (int i = 0 ;i < shortestPath.size() ; i++){\n String s = b.getPath().get(i);\n target.getPath().add(s);\n }\n\n targts.add(target);\n g.clear_meta_data();\n GraphNode.resetCounterId();\n Target.resetCounterId();\n\n if (target.getFruit().getID() != game.getFruits().get(game.getFruits().size()-1).getID()) {\n vertices.clear();\n }\n }",
"@Override public Map<L, Integer> targets(L source) {\r\n \t Map<L, Integer> res= new HashMap <L, Integer>();\r\n \tif(!vertices.contains(source)) {\r\n \t\t//System.out.println(source+\" is not in the graph!\");\r\n \t\treturn res;\r\n \t}\r\n \tIterator<Edge<L>> iter=edges.iterator();\r\n \twhile(iter.hasNext()) {\r\n \t\tEdge<L> tmp=iter.next();\r\n \t\t//if(tmp.getSource()==source)\r\n \t\tif(tmp.getSource().equals(source))\r\n \t\t\tres.put(tmp.getTarget(), tmp.getWeight());\r\n \t\t\r\n \t}\r\n \tcheckRep();\r\n \treturn res;\r\n\r\n }",
"public boolean hasVertex(String label)\n\t{\n\t\tboolean sucess = false;\n\t\ttry {\n\t\t\tgetVertex(label);\n\t\t\tsucess = true;\n\t\t} catch (NoSuchElementException e) {\n\t\t\tsucess = false;\n\t\t}\n\t\treturn sucess;\n\t}",
"private Target getMatchingTarget(Element targetElement)\n {\n String targetName = targetElement.getAttribute(\"name\").getValue();\n\n for (Target target : targets)\n {\n String label = target.getName();\n\n if (label.equals(targetName))\n {\n return target;\n }\n }\n\n return null;\n }",
"public Vertex(int label) {\r\n isVisited = false;\r\n this.label = label;\r\n }",
"public static GotoExpression break_(LabelTarget labelTarget) { throw Extensions.todo(); }",
"public static GotoExpression return_(LabelTarget labelTarget, Expression expression) { throw Extensions.todo(); }",
"public static GotoExpression return_(LabelTarget labelTarget, Class type) { throw Extensions.todo(); }",
"public static GotoExpression break_(LabelTarget labelTarget, Class clazz) { throw Extensions.todo(); }",
"private void dfs(String source) {\n visited.add(source);\n\n System.out.println(source);\n\n for (Object vertex : graph.get(source)) {\n if (!visited.contains(vertex))\n dfs((String) vertex);\n }\n }",
"private Collection<Node> findTarget(final JumpType type, final String label) {\n Collection<Node> result = new Object() {\n private Collection<Node> find(final int i) {\n if (i < 0) return null;\n\n Node nd = ctxt.get(i);\n\n if (nd instanceof Finally) {\n BlockStatement finalizer = ((Finally) nd).body;\n followingCache.put(finalizer, union(followingCache.get(finalizer), find(i - 1)));\n return Collections.singleton(First.of(finalizer));\n }\n\n return nd.accept(\n new DefaultVisitor<Void, Collection<Node>>() {\n @Override\n public Collection<Node> visit(Loop loop, Void v) {\n Set<String> labels = loopLabels.computeIfAbsent(loop, k -> new LinkedHashSet<>());\n if (type == JumpType.CONTINUE && (label == null || labels.contains(label)))\n return Collections.singleton(First.of(loop.getContinueTarget()));\n else if (type == JumpType.BREAK && label == null) return followingCache.get(loop);\n return find(i - 1);\n }\n\n @Override\n public Collection<Node> visit(SwitchStatement nd, Void v) {\n if (type == JumpType.BREAK && label == null) return followingCache.get(nd);\n return find(i - 1);\n }\n\n @Override\n public Collection<Node> visit(LabeledStatement nd, Void v) {\n if (type == JumpType.BREAK && nd.getLabel().getName().equals(label))\n return followingCache.get(nd);\n return find(i - 1);\n }\n\n @Override\n public Collection<Node> visit(TryStatement t, Void v) {\n if (type == JumpType.THROW && !t.getAllHandlers().isEmpty()) {\n return Collections.singleton(First.of(t.getAllHandlers().get(0)));\n }\n if (t.hasFinalizer()) {\n BlockStatement finalizer = t.getFinalizer();\n followingCache.put(\n finalizer, union(followingCache.get(finalizer), find(i - 1)));\n return Collections.singleton(First.of(finalizer));\n }\n return find(i - 1);\n }\n\n @Override\n public Collection<Node> visit(Program nd, Void v) {\n return visit(nd);\n }\n\n @Override\n public Collection<Node> visit(IFunction nd, Void v) {\n return visit(nd);\n }\n\n private Collection<Node> visit(IStatementContainer nd) {\n if (type == JumpType.RETURN) return Collections.singleton(getExitNode((IStatementContainer) nd));\n return null;\n }\n },\n null);\n }\n }.find(ctxt.size() - 1);\n\n if (result == null) {\n return Collections.emptyList();\n }\n return result;\n }",
"protected LinkedList<IVertex<String>> getPath(IVertex<String> target) {\n\n LinkedList<IVertex<String>> path = new LinkedList<IVertex<String>>();\n\n IVertex<String> step = target;\n\n // check if a path exists\n if (predecessors.get(step) == null) {\n return null;\n }\n path.add(step);\n while (predecessors.get(step) != null) {\n step = predecessors.get(step);\n path.add(step);\n }\n // Put it into the correct order\n Collections.reverse(path);\n return path;\n }",
"public ShapesInterface getLabelInPoint(Point mousePoint) {\n\n ShapesInterface label = null;\n boolean isFound = false;\n \n /*Reset selectedShapeIndex to = -1*/\n selectedShapeIndex = -1;\n\n /*Loop the array*/\n for ( int i = this.labelBuffer.size() - 1; i >= 0; i-- )\n {\n /*CASE: ShapeConcept*/\n if (labelBuffer.get(i) instanceof ShapeConcept) {\n\n /*Highlight this ShapeConcept*/\n ((ShapeConcept) labelBuffer.get(i)).hightlight(false);\n\n\tRectangle rect = ((ShapeConcept) labelBuffer.get(i)).getBounds();\n\n if (rect.contains((mousePoint)) && !isFound) {\n label = (ShapeConcept)labelBuffer.get(i);\n ((ShapeConcept) labelBuffer.get(i)).hightlight(true);\n\n /*Only one object is marked as selected*/\n isFound = true;\n\n /*Store the index of this shape*/\n selectedShapeIndex = i;\n\n /*Set too to draw concept*/\n if (drawConsoleUI.getSelectedToolID() != 2)\n drawConsoleUI.setSelectedToolID(1);\n\n }//end if\n }/*END CASE ShapeConcept*/\n else if (labelBuffer.get(i) instanceof ShapeLinking) {\n\n\t Rectangle rect = ((ShapeLinking) labelBuffer.get(i)).getBounds();\n\n if (rect.contains((mousePoint)) && !isFound) {\n label = (ShapeLinking) labelBuffer.get(i);\n \n /*Only one object is marked as selected*/\n isFound = true;\n\n /*Store the index of this shape*/\n selectedShapeIndex = i;\n break;\n }//end if\n }/*END CASE ShapeLinking*/\n else if (labelBuffer.get(i) instanceof ShapeComment) {\n\n /*Highlight this ShapeConcept*/\n ((ShapeComment) labelBuffer.get(i)).hightlight(false);\n\n\tRectangle rect = ((ShapeComment) labelBuffer.get(i)).getBounds();\n\n if (rect.contains((mousePoint)) && !isFound) {\n label = (ShapeComment)labelBuffer.get(i);\n ((ShapeComment) label).hightlight(true);\n\n /*Only one object is marked as selected*/\n isFound = true;\n\n /*Store the index of this shape*/\n selectedShapeIndex = i;\n\n /*Set tool to draw concept*/\n if (drawConsoleUI.getSelectedToolID() != 2)\n drawConsoleUI.setSelectedToolID(3);\n \n }//end if\n }/*END CASE ShapeConcept*/\n else if (labelBuffer.get(i) instanceof ShapeURL) {\n\n /*Highlight this ShapeURL*/\n\n\tRectangle rect = ((ShapeURL) labelBuffer.get(i)).getBounds();\n\n if (rect.contains((mousePoint)) && !isFound) {\n label = (ShapeURL)labelBuffer.get(i);\n\n /*Only one object is marked as selected*/\n isFound = true;\n\n /*Store the index of this shape*/\n selectedShapeIndex = i;\n\n //break;\n }//end if\n }/*END CASE ShapeURL*/\n }//end for\n\n return label;\n}",
"public List<Vertex> getShortestPathTo(Vertex target)\n {\n List<Vertex> path = new ArrayList<Vertex>();\n for (Vertex vertex = target; vertex != null; vertex = vertex.previous)\n path.add(vertex);\n Collections.reverse(path);\n return path;\n }",
"private void addEdgeWithLabel(NasmInst source, NasmLabel destination) {\n if (source == null || destination == null)\n throw new FgException(\"ERROR: Can't create an edge without a source and a destination\");\n\n if (systemCalls.contains(destination.toString()))\n return; // System call: iprintLF, readline or atoi. No edge needed\n\n NasmInst destinationInst = label2Inst.get(destination.toString());\n if (destinationInst == null)\n throw new FgException(\"ERROR: No instruction matching with the given label\");\n addEdgeWithInst(source, destinationInst);\n }",
"public static LabelTarget label(String name) { throw Extensions.todo(); }",
"private double dijkstraSingleTarget(Map<Integer, List<Node>> graph, int vertices, int source, int target) {\n Queue<Node> minHeap = new PriorityQueue<>(\n Comparator.comparingDouble(a -> a.weight)\n );\n\n double[] dist = new double[vertices + 1]; //shortest distance for each vertex\n Arrays.fill(dist, 0.0);\n\n boolean visited[] = new boolean[vertices + 1];\n\n // Distance for starting node is 0\n dist[source] = -1;\n minHeap.add((new Node(-1,source)));\n\n while (!minHeap.isEmpty()) {\n Node topPair = minHeap.remove();\n int currNode = topPair.vertex;\n double currDistance = topPair.weight;\n\n if (!graph.containsKey(currNode)) {\n continue;\n }\n\n if (visited[currNode]) continue;\n visited[currNode] = true;\n\n\n for (Node edge : graph.get(currNode)) {\n double weight = edge.weight;\n int neighborNode = edge.vertex;\n double nextDist = currDistance * weight;\n\n if (!visited[neighborNode] && nextDist < dist[neighborNode]) {\n dist[neighborNode] = nextDist;\n minHeap.add((new Node(nextDist, neighborNode)));\n\n }\n\n }\n\n\n }\n\n return -dist[target];\n }",
"public static GotoExpression goto_(LabelTarget labelTarget, Class type) { throw Extensions.todo(); }",
"Optional<CoreLabelSequence> getGroupedByFirstLabel(CoreLabel label);",
"public LabelModel getLabel(LabelUUID aLabelUUID);",
"public int findTargetBB(String label) {\n\t\tString targetLB = null;\n\t\tfor (int i = 1; i <= BasicBlocks.size(); i++) {\n\t\t\ttargetLB = BasicBlocks.get(i).get(0);\n\t\t\tint lbLen = 0;\n\t\t\tint j = 0;\n\t\t\twhile (targetLB.charAt(j) != ' ') {\n\t\t\t\tlbLen++;\n\t\t\t\tj++;\n\t\t\t}\n\t\t\ttargetLB = targetLB.substring(0, lbLen);\n\t\t\tif (targetLB.equals(label)) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t\treturn 0;\n\t}",
"private void processDetect(String destinationIP) {\n WeightedGraph graph = WeightedGraph.createFromLSD(this.routerDesc, this.lsd);\n WeightedGraph.Vertex root = graph.getVertex(this.routerDesc.simulatedIPAddress);\n WeightedGraph.Vertex target = graph.getVertex(destinationIP);\n\n if(target == null) {\n LOG.info(\"No target found\");\n return;\n }\n\n graph.execute(root);\n\n List<WeightedGraph.Vertex> path = graph.getPath(target);\n if(path == null) {\n LOG.info(\"No path found\");\n } else {\n WeightedGraph.Vertex from = null;\n StringBuilder pathBuild = new StringBuilder();\n\n for(WeightedGraph.Vertex v : path) {\n if(from != null) {\n WeightedGraph.Edge e = graph.getEdge(from, v);\n pathBuild.append(\" ->(\").append(e.cost).append(\") \");\n }\n\n pathBuild.append(v.value + \" \");\n from = v;\n }\n\n LOG.info(pathBuild.toString());\n }\n }",
"@Override\n public T get(T target) {\n if (isEmpty()){// if list is empty, there's nothing to return \n return null;\n }\n else{\n DLNode<T> current = first;\n int index = 0;\n while (current != null && !current.elem.equals(target)) {\n current = current.next;\n index++;\n }\n if (current != null && current.elem.equals(target)) {\n return get(index); //call get(index) method again\n }\n return current.elem;\n //throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }\n }",
"public static GotoExpression goto_(LabelTarget labelTarget, Expression expression) { throw Extensions.todo(); }",
"public Label\ngetStartLabel();",
"N getTarget();",
"@Test\n public void getlabelTest() {\n \tVertex<String> v=new Vertex<String>(\"v\");\n \tassertEquals(\"v\", v.getlabel());\n }",
"@Override public Map<L, Integer> sources(L target) {\r\n Map<L, Integer> res= new HashMap <L, Integer>();\r\n \tif(!vertices.contains(target)) {\r\n \t\t//System.out.println(target+\" is not in the graph!\");\r\n \t\treturn res;\r\n \t}\r\n \tIterator<Edge<L>> iter=edges.iterator();\r\n \twhile(iter.hasNext()) {\r\n \t\tEdge<L> tmp=iter.next();\r\n \t\t//if(tmp.getTarget()==target)\r\n \t\tif(tmp.getTarget().equals(target))\r\n \t\t\r\n \t\t\tres.put(tmp.getSource(), tmp.getWeight());\r\n \t\t\r\n \t}\r\n \tcheckRep();\r\n \treturn res;\r\n }",
"public static GotoExpression return_(LabelTarget labelTarget, Expression expression, Class type) { throw Extensions.todo(); }",
"protected void visit(Graph<VLabel, ELabel>.Vertex v) {\n }",
"public List<MoveLabel> getSimpleLabelNeighborhood(final LabeledUndirectedGraph<N, E> sk, final LabeledUndirectedGraph<N, E> objective) {\n final List<MoveLabel> neighborood = new ArrayList<>();\n final LabeledUndirectedGraph<N, E> csk = new LabeledUndirectedGraph<>(sk);\n\n Set<String> diff = csk.getLabels();\n diff.removeAll(objective.getLabels());\n\n Set<E> allEdges = new HashSet<>(sk.getEdges());\n allEdges.addAll(sk.getRemovedEdges());\n\n diff.forEach(label -> {\n final LabeledUndirectedGraph<N, E> test = new LabeledUndirectedGraph<>(csk);\n\n //Remove label\n test.removeLabel(label);\n\n //Add all edges for all active label in test graph\n test.getLabels().forEach(_label -> {\n allEdges.stream()\n .filter(_edge -> _edge.getLabel().equals(_label))\n .forEachOrdered(_edge -> test.addEdge(_edge));\n });\n\n //Select all labels of objective graph that are different from removed label\n Set<String> _labels = objective.getLabels();\n _labels.remove(label);\n\n _labels.forEach(_label -> {\n //Add label from candidates label in objective graph\n allEdges.stream()\n .filter(edge -> edge.getLabel().endsWith(_label))\n .forEachOrdered(edge -> test.addEdge(edge));\n\n final LabeledUndirectedGraph<N, E> stest;\n if (test.isConnected()) {\n stest = getSpanningTree(test);\n } else {\n stest = test;\n }\n Set<E> out = stest.getRemovedEdges(), in = stest.getEdges();\n out.removeAll(csk.getRemovedEdges());\n in.removeAll(csk.getEdges());\n neighborood.add(new MoveLabel(out, in, csk));\n\n test.removeLabel(_label);\n });\n });\n\n if (neighborood.isEmpty() && !csk.isConnected()) {\n diff = objective.getLabels();\n diff.removeAll(csk.getLabels());\n diff.forEach(label -> {\n Set<E> in = new HashSet<>();\n allEdges.stream()\n .filter(edge -> edge.getLabel().equals(label))\n .forEachOrdered(edge -> in.add(edge));\n neighborood.add(new MoveLabel(new HashSet<>(), in, csk));\n });\n }\n\n return neighborood;\n }",
"Label getLabel();",
"Label getLabel();",
"Label getLabel();",
"public boolean containsEdge(V source, V target);",
"@Generated(value={\"edu.jhu.cs.bsj.compiler.utils.generator.SourceGenerator\"})\npublic interface MetaprogramTargetNode extends Node, BsjSpecificNode\n{\n /**\n * Gets the names of the metaprogram targets in which to participate.\n * @return The names of the metaprogram targets in which to participate.\n * @throws ClassCastException If the value of this property is a special node.\n */\n public IdentifierListNode getTargets()throws ClassCastException;\n \n /**\n * Gets the union object for the names of the metaprogram targets in which to participate.\n * @return A union object representing The names of the metaprogram targets in which to participate.\n */\n public NodeUnion<? extends IdentifierListNode> getUnionForTargets();\n \n /**\n * Changes the names of the metaprogram targets in which to participate.\n * @param targets The names of the metaprogram targets in which to participate.\n */\n public void setTargets(IdentifierListNode targets);\n \n /**\n * Changes the names of the metaprogram targets in which to participate.\n * @param targets The names of the metaprogram targets in which to participate.\n * @throws NullPointerException If the provided value is <code>null</code>.\n * Node union values may have <code>null</code>\n * contents but are never <code>null</code>\n * themselves.\n */\n public void setUnionForTargets(NodeUnion<? extends IdentifierListNode> targets) throws NullPointerException;\n \n /**\n * Generates a deep copy of this node.\n * @param factory The node factory to use to create the deep copy.\n * @return The resulting deep copy node.\n */\n @Override\n public MetaprogramTargetNode deepCopy(BsjNodeFactory factory);\n \n}",
"public static int traverseGraph(String artistKey, String targetName) {\n\t\t// set up the queue for BFS\n\t\tQueue<Node<Artist>> q = new LinkedList<Node<Artist>>();\n\t\tNode<Artist> nd = new Node<Artist>(new Artist(artistKey), 0);\n\t\t// find the neighbors of n and add them to n's adjacency list\n\t\tArtist nArtist = nd.getData();\n\t\tArrayList<Album> nAlbums = nArtist.getAlbums();\n\t\tfor (Album album : nAlbums) {\n\t\t\tArrayList<Song> songs = album.getSongs();\n\t\t\tfor (Song song : songs) {\n\t\t\t\tArrayList<Artist> artists = song.getAllArtists();\n\t\t\t\tfor (Artist result : artists) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (result != null\n\t\t\t\t\t\t\t\t&& nArtist != null\n\t\t\t\t\t\t\t\t&& !result.toString()\n\t\t\t\t\t\t\t\t\t\t.equals(nArtist.toString())) {\n\n\t\t\t\t\t\t\tNode<Artist> toAdd = new Node<Artist>(result,\n\t\t\t\t\t\t\t\t\tnd.getLevel() + 1);\n\t\t\t\t\t\t\tnd.addEdge(toAdd);\n\t\t\t\t\t\t\ttoAdd.addEdge(nd);\n\n\t\t\t\t\t\t\tif (toAdd.toString().toLowerCase()\n\t\t\t\t\t\t\t\t\t.equals(targetName.toLowerCase())) {\n\t\t\t\t\t\t\t\treturn toAdd.getLevel();\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (NullPointerException e) {\n\t\t\t\t\t\t// e.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(nd);\n\t\tq.add(nd);\n\n\t\t// perform BFS\n\t\twhile (!q.isEmpty()) {\n\t\t\tSystem.out.println(\"Queue: \" + q);\n\t\t\tNode<Artist> n = q.remove();\n\t\t\tSystem.out.println(n.getAdjacent());\n\t\t\t// go through each of the adjacent nodes to n and add it to the\n\t\t\t// queue.\n\t\t\tfor (Node<Artist> node : n.getAdjacent()) {\n\t\t\t\tif (!node.isVisited()) {\n\t\t\t\t\tnode.setVisited(true);\n\t\t\t\t\tArtist artist = node.getData();\n\t\t\t\t\tif (artist != null) {\n\t\t\t\t\t\tArrayList<Album> albums = artist.getAlbums();\n\t\t\t\t\t\tfor (Album album : albums) {\n\t\t\t\t\t\t\tArrayList<Song> songs = album.getSongs();\n\t\t\t\t\t\t\tfor (Song song : songs) {\n\t\t\t\t\t\t\t\tArrayList<Artist> artists = song\n\t\t\t\t\t\t\t\t\t\t.getAllArtists();\n\t\t\t\t\t\t\t\tfor (Artist result : artists) {\n\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\tif (result != null\n\t\t\t\t\t\t\t\t\t\t\t\t&& artist != null\n\t\t\t\t\t\t\t\t\t\t\t\t&& !result.toString().equals(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tartist.toString())) {\n\t\t\t\t\t\t\t\t\t\t\tif (!GraphTraverser.artists\n\t\t\t\t\t\t\t\t\t\t\t\t\t.contains(result.toString())) {\n\t\t\t\t\t\t\t\t\t\t\t\tSystem.out.println(result);\n\n\t\t\t\t\t\t\t\t\t\t\t\tNode<Artist> toAdd = new Node<Artist>(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tresult,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tnode.getLevel() + 1);\n\t\t\t\t\t\t\t\t\t\t\t\tnode.addEdge(toAdd);\n\t\t\t\t\t\t\t\t\t\t\t\ttoAdd.addEdge(node);\n\t\t\t\t\t\t\t\t\t\t\t\tq.add(toAdd);\n\n\t\t\t\t\t\t\t\t\t\t\t\tif (toAdd\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.toString()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.toLowerCase()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.equals(targetName\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.toLowerCase())) {\n\t\t\t\t\t\t\t\t\t\t\t\t\treturn toAdd.getLevel();\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\tGraphTraverser.artists\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.add(result.toString());\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t} catch (NullPointerException e) {\n\t\t\t\t\t\t\t\t\t\t// do nothing\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// return -1 if not found.\n\t\treturn -1;\n\t}",
"public Vertex(String label, int index){\n this.label = label;\n this.index = index;\n this.previous = null;\n visited = false;\n }",
"public boolean contains(String target)\t\n\t{\n\t\t// searches for the target: O(n).\n\t\tif(head==null) {\n\t\t\treturn false;\n\t\t}\n\t\tint count = 0;\n\t\tnode p = head;\n\t\twhile(p.next != null&&!(p.getData()+\"\").equals(target))\n\t\t{\n\t\t\tp=p.next;\n\t\t}\n\t\tif(p!=null&&(p.getData()+\"\").equals(target))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"ILinkDeleterActionBuilder<SOURCE_BEAN_TYPE, LINKED_BEAN_TYPE> setLinkedEntityLabelSingular(String label);",
"@Override\r\n\tpublic boolean BFS(E src) {\r\n\t\tif(containsVertex(src)) {\r\n\t\t\tVertex<E> s = vertices.get(src);\r\n\t\t\tlastSrc = s;\r\n\t\t\tvertices.forEach((E e, Vertex<E> u) -> {\r\n\t\t\t\tu.setColor(Color.WHITE);\r\n\t\t\t\tu.setDistance(Integer.MAX_VALUE);\r\n\t\t\t\tu.setPredecessor(null);\r\n\t\t\t});\r\n\t\t\ts.setColor(Color.GRAY);\r\n\t\t\ts.setDistance(0);\r\n\t\t\t//s.predecessor is already null so skip that step\r\n\t\t\tQueue<Vertex<E>> queue = new Queue<>();\r\n\t\t\tqueue.enqueue(s);\r\n\t\t\ttry {\r\n\t\t\t\twhile(!queue.isEmpty()) {\r\n\t\t\t\t\tVertex<E> u = queue.dequeue();\r\n\t\t\t\t\tArrayList<Edge<E>> adj = adjacencyLists.get(u.getElement());\r\n\t\t\t\t\tfor(Edge<E> ale: adj) {\r\n\t\t\t\t\t\tVertex<E> v = vertices.get(ale.getDst());\r\n\t\t\t\t\t\tif(v.getColor() == Color.WHITE) {\r\n\t\t\t\t\t\t\tv.setColor(Color.GRAY);\r\n\t\t\t\t\t\t\tv.setDistance(u.getDistance()+1);\r\n\t\t\t\t\t\t\tv.setPredecessor(u);\r\n\t\t\t\t\t\t\tqueue.enqueue(v);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tu.setColor(Color.BLACK);\r\n\t\t\t\t}\r\n\t\t\t} catch (Exception emptyQueueException) {\r\n\t\t\t\t//-_-\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"public LabeledSDGEdge(SDGNode source, SDGNode sink, Kind kind, String label) {\n\t\tsuper(source, sink);\n\t\tthis.kind = kind;\n\t\tthis.label = label;\n\t}",
"Iterable<Vertex> computePathToGraph(Loc start, Vertex end) throws GraphException;",
"public Living getTarget();",
"public boolean removeVertex(String label)\n\t{\n\t\tif(hasVertex(label)) //if vertex in in list\n\t\t{\n\t\t\tvertices.removeAt(getVertex(label));\n\t\t\t//System.out.println(\"Deleted: \" + label); //debug\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}",
"String getTarget();",
"String getTarget();",
"public void run() {\n\t\tArrays.fill(label, NOT_AN_INDEX);\r\n\t\t\r\n\t\t// while there is a u in V with considered[u]=0 and mate[u]=0 do\r\n\t\tstage: for (int u = 0; u < gOrig.numVertices(); u++ ) {\r\n\t\t\t// if(mate[u] == NOT_AN_INDEX){\r\n\t\t\tif (gOrig.vertex(u) == null) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tif (matching.matches() == gOrig.numVertices() / 2) {\r\n\t\t\t\t// we are done\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tSystem.out.print(String.format(\"considering vertex u%d\\n\", u));\r\n\t\t\tif ( ! matching.isMatched(u)) {\r\n\t\t\t\t\r\n\t\t\t\t// considered[u]=1,A={empty}\r\n\t\t\t\t// A = new WeightedDigraph(gOrig.numVertices()/2);\r\n\t\t\t\tA.clear();\r\n\t\t\t\t\r\n\t\t\t\t// forall v in V do exposed[v]=0\r\n\t\t\t\tArrays.fill(exposed, NOT_AN_INDEX);\r\n\t\t\t\t\r\n\t\t\t\t// Construct the auxiliary digraph\r\n\t\t\t\t\r\n\t\t\t\t// for all (v,w) in E do\r\n\t\t\t\tfor (int v = 0; v < gOrig.numVertices(); v++ ) {\r\n\t\t\t\t\tfor (Edge e : gOrig.eOuts(v)) {\r\n\t\t\t\t\t\tint w = e.right;\r\n\t\t\t\t\t\tassert e.left == v : \"vertex correspondence is wrong\";\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// if mate[w]=0 and w!=u then exposed[v]=w else if mate[w] !=v,0 then A=union(A,{v,mate[w]})\r\n\t\t\t\t\t\t// if(mate[w] == NOT_AN_INDEX && w != u){\r\n\t\t\t\t\t\t// exposed[v] = w;\r\n\t\t\t\t\t\t// }else if(mate[w] != v && mate[w] != NOT_AN_INDEX){\r\n\t\t\t\t\t\t// A.addEdge(new Edge(v,mate[w]));\r\n\t\t\t\t\t\t// }\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif ( ! matching.isMatched(w) && w != u) {\r\n\t\t\t\t\t\t\t// DEBUG(String.format(\"adding (%d,%d) to exposed\\n\", v, w));\r\n\t\t\t\t\t\t\tif (exposed[v] == NOT_AN_INDEX) {\r\n\t\t\t\t\t\t\t\texposed[v] = w;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} else if (matching.mate(w) != v && matching.isMatched(w)) {\r\n\t\t\t\t\t\t\t// DEBUG(String.format(\"adding (%d,%d) to A\\n\", v, matching.mate(w)));\r\n\t\t\t\t\t\t\tA.add(new Edge(v, matching.mate(w)));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tDEBUG(String.format(\"Exposed vertices={%s}\\n\", printExposed()));\r\n\t\t\t\tif (exposed().size() == 0) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// forall v in V do seen[v]=0\r\n\t\t\t\tArrays.fill(seen, false);\r\n\t\t\t\t\r\n\t\t\t\t// Q={u}; label[u]=0; if exposed[u]!=0 then augment(u), goto stage;\r\n\t\t\t\tQ.clear();\r\n\t\t\t\tQ.add(u);\r\n\t\t\t\tArrays.fill(label, NOT_AN_INDEX);// unsure whether it was meant to clear label or just unset label[u] OLD_CODE=label[u] = NOT_AN_INDEX;\r\n\t\t\t\tif (isExposed(u)) {\r\n\t\t\t\t\taugment(u);\r\n\t\t\t\t\tDEBUG(String.format(\"new matching %s\\n\", matching.toString()));\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\t// need to figure out how to handle blossom()\r\n\t\t\t\t\r\n\t\t\t\t// while Q != {empty} do\r\n\t\t\t\twhile ( ! Q.isEmpty()) {\r\n\t\t\t\t\tint v = Q.pop();\r\n\t\t\t\t\t\r\n\t\t\t\t\t// forall unlabeled nodes w in V such that (v,w) in A\r\n\t\t\t\t\tfor (Edge e : A) {\r\n\t\t\t\t\t\tint w = e.left;\r\n\t\t\t\t\t\tif (e.right == v && label[w] == NOT_AN_INDEX && label[v] != w) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t// Q=union(Q,w), label[w]=v\r\n\t\t\t\t\t\t\tif ( ! Q.contains(w)) {\r\n\t\t\t\t\t\t\t\tQ.offer(w);\r\n\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\tcontinue; ///THIS CONTINUE WAS ADDED LATE AT NIGHT\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tlabel[w] = v;\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t// seen[mate[w]] = 1;\r\n\t\t\t\t\t\t\ttry{\r\n\t\t\t\t\t\t\t\tint mate = findMate(w);\r\n\t\t\t\t\t\t\t\tseen[mate] = true;\r\n\t\t\t\t\t\t\t}catch(Exception err){\r\n\t\t\t\t\t\t\t\tDEBUG(String.format(\"error marking mate of %d as seen, mate not found\\n\", w));\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t// if exposed[w]!=0 then augment(w) goto stage;\r\n\t\t\t\t\t\t\tif (isExposed(w)) {\r\n\t\t\t\t\t\t\t\taugment(w);\r\n\t\t\t\t\t\t\t\tDEBUG(String.format(\"new matching %s\\n\", matching.toString()));\r\n\t\t\t\t\t\t\t\tcontinue stage;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t// if seen[w]=1 then blossom(w)\r\n\t\t\t\t\t\t\tif (seen[w]) {\r\n\t\t\t\t\t\t\t\tblossom(w);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// remove loops created by the blossoms\r\n\t\t\t\t\tremoveSelfLoops(A);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public Edge<V> getEdge(V source, V target);",
"public Contig getTarget() { return target; }",
"private ArrayList<Vertex> dfs(boolean[] visited, Vertex start, Vertex target) {\n \n //TEST VALUES: if start/end are out of bounds of array of vertices\n if (start.getID() < 0) {\n return null;\n }\n \n if (target.getID() > arrayOfVertices.length) {\n return null;\n }\n \n \n //base case: if start = target, return start vertex right there.\n if (start == target) {\n solution.add(0, start);\n return solution;\n }\n \n //has this vertex been visited before? yes? then just return. if no, \n if (visited[start.getID()]) {\n return null;\n }\n \n //since it hasn't been visited before, mark it as visited\n visited[start.getID()] = true;\n \n //does it have kids? no? return.\n if (start.getDegree() == 0) {\n return null;\n }\n \n //create ArrayList of adjacent vertices to the given start\n ArrayList<Vertex> adjacents = start.getAdjacent();\n \n //go through its edges, for loop. to go through edges\n for (int i = 0; i < start.getDegree(); i++) {\n \n //(from testing)\n NavigateMaze.advance(start.getID(), adjacents.get(i).getID());\n \n //do the dfs; if it's not equal to null \n //(i.e. we found the target, then add it to path\n if (dfs(visited, adjacents.get(i), target) != null) {\n //then add to path\n solution.add(0, start); \n return solution;\n }\n \n //(from testing)\n else {\n NavigateMaze.backtrack(adjacents.get(i).getID(), start.getID());\n }\n \n } \n \n //return null\n return null;\n }",
"java.lang.String getTarget();",
"java.lang.String getTarget();",
"Object getTarget();",
"Object getTarget();",
"public DSAQueue breadthFirstSearch(String start, String target)\n\t{\n\t\tif(!vertices.isEmpty())\n\t\t{\n\t\t\tDSAQueue queue = new DSAQueue();\n\t\t\tDSAStack visited = new DSAStack();\t//creates empty stack\n\t\t\tDSAGraphVertex vx = getVertex(start); //vertex to start on (root)\n\t\t\tDSAGraphVertex dest = getVertex(target); //vertex to start on (dest)\n\n\t\t\tclear(); //sets all visited on all vertices == false\n\t\t\tvx.setVisited(); // Marks root as visited\n\t\t\tqueue.enqueue(vx); //adds start point to queue\n\n\t\t\tbfs(vx, visited, queue, dest); //begin recursion\n\n\t\t\tqueue.enqueue(dest); //if successful adds destination to queue\n\n\t\t\treturn queue;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthrow new NoSuchElementException(\"List is empty or start or end elements don't exist\");\n\t\t}\n\t}",
"public Node getTarget() {\n return target;\n }",
"Ontology getTargetOntology();",
"public boolean addVertex(String label, Object value)\n\t{\n\t\tif(!hasVertex(label)) //if edge does not already exist add it\n\t\t{\n\t\t\tDSAGraphVertex v = new DSAGraphVertex(label, value);\n\t\t\tvertices.insertLast(v); //inserts into vertices list at end\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}",
"public static GotoExpression break_(LabelTarget labelTarget, Expression expression, Class clazz) { throw Extensions.todo(); }",
"DatasetLabel getLabel();",
"public int getNodeLabel ();",
"@objid (\"19651663-f981-4f11-802a-d5d7cbd6f88a\")\n Instance getTarget();",
"public static GotoExpression goto_(LabelTarget labelTarget, Expression expression, Class type) { throw Extensions.todo(); }",
"Object getTargetexists();",
"public Vertex(L l) {\n\t\tlabel = l;\n\t}",
"public DNode getTo() { return targetnode; }",
"public Iterator<Point> getPointAt(ModelObject target, int pos);",
"boolean exists(String label) throws IOException;",
"Attribute getTarget();",
"public native VertexList insertAfter(VertexNode target, VertexNode vertex);",
"private List<Edge<T>> getPath(T target) {\n List<Edge<T>> path = new LinkedList<>();\n T step = target;\n // check if a path exists\n if (predecessors.get(step) == null) {\n return path;\n }\n while (predecessors.get(step) != null) {\n T endVertex = step;\n step = predecessors.get(step);\n T startVertex = step;\n path.add(getEdge(startVertex, endVertex));\n }\n // Put it into the correct order\n Collections.reverse(path);\n return path;\n }",
"public ArrayList<PathXNode> generatePath(PathXNode destination)throws VertexNotFoundException{\r\n \r\n String destState = destination.getState();\r\n if (destState.indexOf(\"MOUSE_OVER\") >= 0)\r\n destState = destState.substring(0, destState.indexOf(\"_MOUSE_OVER\"));\r\n \r\n if (path != null && !path.isEmpty())\r\n return null;\r\n \r\n Graph graph = getLevel().getGraph();\r\n \r\n //The shortest path from the current intersection/vertex to the destination\r\n //intersection/vertex as an ArrayList of vertices.\r\n ArrayList<Vertex> shortestPath = graph.findPath(getIntersection().getVertex(), destination.getVertex());\r\n \r\n ArrayList<PathXNode> newPath = new ArrayList();\r\n \r\n //Convert the shortestPath ArrayList of Vertices to PathXNodes.\r\n ArrayList<PathXNode> nodes = getLevel().getDataModel().getNodes();\r\n for (Vertex v : shortestPath){\r\n for (PathXNode node : nodes)\r\n if (node.getVertex() == v){\r\n newPath.add(node);\r\n break;\r\n }\r\n }\r\n \r\n \r\n newPath.remove(0);\r\n \r\n //Highlight the nodes.\r\n for (PathXNode node : newPath)\r\n node.setState(node.getState() + \"_HIGHLIGHTED\");\r\n \r\n destination.setState(destState + \"_HIGHLIGHTED\");\r\n if (newPath != null && !newPath.isEmpty()) {\r\n targetX = newPath.get(0).getConstantXPos();\r\n targetY = newPath.get(0).getConstantYPos();\r\n }\r\n return newPath; \r\n }",
"State getTarget();",
"@Override\r\n public boolean contains(V label) {\r\n return map.containsKey(label);\r\n }",
"public static GotoExpression break_(LabelTarget labelTarget, Expression expression) { throw Extensions.todo(); }",
"@Test(expected = IllegalLabelException.class)\n\tpublic void testIllegalLabelException() throws Exception {\n\t\tnew GraphPoetFactory().parse(\"Edge=<ab!,WordNeighborhood,1,a,b,Yes>\");\n\t}",
"protected String printablePath(IVertex<String> target){\n\n String lineout = \"\";\n\n LinkedList<IVertex<String>> path = this.getPath(target);\n\n IVertex<String> previous = null;\n\n IVertex<String> next = null;\n\n if(path!=null) {\n Iterator<IVertex<String>> it = path.iterator();\n\n while (it.hasNext()) {\n\n previous = next;\n\n next = it.next();\n\n IWeightedEdge<String> prevedge = null;\n\n if(previous!=null && next!=null){\n prevedge = this.weightedGraph.getEdge(previous,next);\n }\n\n if(prevedge!=null)\n lineout+= \" \" +prevedge.getWeight() + \" \";\n\n lineout += \" \" + next.getValue() + \" \";\n }\n }\n return lineout;\n }",
"com.google.protobuf.ByteString getTargetBytes();"
] | [
"0.6781299",
"0.61927456",
"0.59917843",
"0.5975193",
"0.5965004",
"0.5811919",
"0.5805305",
"0.5723981",
"0.5688698",
"0.56641215",
"0.556658",
"0.5521683",
"0.5506656",
"0.5500174",
"0.5498116",
"0.5497758",
"0.5494687",
"0.5476171",
"0.54476786",
"0.5436345",
"0.53971",
"0.5390427",
"0.53630793",
"0.5341682",
"0.5334628",
"0.5285761",
"0.5272617",
"0.5271594",
"0.5264126",
"0.5215111",
"0.5203969",
"0.52005917",
"0.51721543",
"0.5158281",
"0.5154115",
"0.5150492",
"0.5149663",
"0.51288295",
"0.50922334",
"0.50844413",
"0.5082545",
"0.50764513",
"0.5074666",
"0.5068797",
"0.5043001",
"0.503941",
"0.5033116",
"0.5018888",
"0.5015005",
"0.5014036",
"0.5013774",
"0.5004241",
"0.49916232",
"0.49916232",
"0.49916232",
"0.49739122",
"0.49626514",
"0.4959614",
"0.49532387",
"0.4942747",
"0.49394017",
"0.49353397",
"0.49310786",
"0.49307337",
"0.4910999",
"0.49021378",
"0.49019235",
"0.49019235",
"0.4900706",
"0.48961392",
"0.48947415",
"0.488626",
"0.48772386",
"0.48772386",
"0.48638764",
"0.48638764",
"0.4848479",
"0.48456642",
"0.4844636",
"0.4827669",
"0.48274022",
"0.48271742",
"0.482131",
"0.48173684",
"0.48139518",
"0.4810188",
"0.48082274",
"0.48009223",
"0.47930372",
"0.47918063",
"0.47915673",
"0.4783461",
"0.47818118",
"0.47817934",
"0.47790888",
"0.47745574",
"0.47741455",
"0.47738197",
"0.47712794",
"0.47614855"
] | 0.7484672 | 0 |
IMPORT: label (String) EXPORT: getAdjacent (DSALinkedList) ASSERTION: returns the adjacency list from vxnode using label | public DSALinkedList getAdjacent(String label)
{
DSAGraphVertex vx = getVertex(label);
return vx.getAdjacent();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"ArrayList<Edge> getAdjacencies();",
"public abstract ArrayList<String> neighbours(String vertLabel);",
"List<V> getAdjacentVertexList(V v);",
"public DSALinkedList<DSAGraphNode<E>> getAdjacent()\n {\n return links;\n }",
"public DSALinkedList getAdjacent()\n\t\t{\n\t\t\treturn links;\n\t\t}",
"@Override\r\n\tpublic ArrayList<E> getAdjacent(E key) {\r\n\t\tArrayList<E> adj = new ArrayList<>();\r\n\t\tif(containsVertex(key)) {\r\n\t\t\tfor(Edge<E> ale : adjacencyLists.get(key)) {\r\n\t\t\t\tadj.add(ale.getDst());\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn adj;\r\n\t}",
"List<Node> getAdjacentNodes(String data) {\n return adjacentNodes.get(new Node(data));\n }",
"public List neighbors(int vertex) {\n// your code here\n LinkedList<Integer> result = new LinkedList<>();\n LinkedList<Edge> list = adjLists[vertex];\n for (Edge a : list) {\n result.add(a.to());\n }\n//List<Integer> list = new List<Integer>();\n return result;\n }",
"public boolean isAdjacent(String label1, String label2)\n\t{\n\t\tboolean found = false;\n\t\ttry {\n\t\t\tDSAGraphVertex temp, vx1 = getVertex(label1);\n\t\t\tDSALinkedList adjList = vx1.getAdjacent();\n\t\t\tIterator<DSAGraphVertex> itr = adjList.iterator(); // - Maybe needs to check instance?\n\t\t\tif(!adjList.isEmpty()) // if list is not empty\n\t\t\t{\n\t\t\t\twhile(itr.hasNext()) //iterates until target is found\n\t\t\t\t{\n\t\t\t\t\ttemp = itr.next();\n\t\t\t\t\tif(temp.getLabel().equals(label2))\n\t\t\t\t\t{\n\t\t\t\t\t\tfound = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (NoSuchElementException e) {\n\t\t\t//Handles exception thrown by getVertex()\n\t\t\tfound = false;\n\t\t}\n\t\treturn found;\n\t}",
"public List<Node> getAdjacent(Node node){\n\n int nodeX, x = node.getX();\n int nodeY, y = node.getY();\n List<Node> adj = new ArrayList<Node>();\n\n for(Node n:allNodes){\n if(n.isReachable()) {\n nodeX = n.getX();\n nodeY = n.getY();\n if ((Math.abs(nodeX - x) == 1 && nodeY == y) || (nodeX == x && Math.abs(nodeY - y) == 1)) {\n adj.add(n);\n //if(node.getCost()==n.getCost()||n.getCost()==1) n.setCost(node.getCost()+1);\n }\n }\n }\n\n return adj;\n }",
"Iterable<Long> adjacent(long v) {\n List<Node> adjNodes = adj.get(v);\n List<Long> adjVertices = new ArrayList<>();\n for (int i = 1; i < adjNodes.size(); i++) {\n adjVertices.add(adjNodes.get(i).getID());\n }\n return adjVertices;\n }",
"public void inAdjacentVertices() {\r\n\t\tfor (int i = 0; i < currentVertex.inList.size(); i++) {\r\n\t\t\tSystem.out.print(currentVertex.inList.get(i).vertex.label + \" \");\r\n\t\t}\r\n\t\tprintLine();\r\n\t}",
"public abstract DBResult getAdjacentLinks(int nodeId) throws SQLException;",
"@Override\r\n public List<Vertex> getNeighbors(Vertex v) {\r\n ArrayList<Vertex> neighborsList = new ArrayList<>();\r\n neighborsList = adjacencyList.get(v);\r\n Collections.sort(neighborsList, Comparator.comparing(Vertex::getLabel));\r\n return neighborsList; //getting the list of all adjacent vertices of vertex v\r\n }",
"public boolean isAdjacent(int from, int to) {\n//your code here\n// LinkedList<Edge> list = adjLists[from];\n// for (Edge a : list) {\n// if(a.from()==from&&a.to()==to){\n// return true;\n// }\n// };\n// return false;\n return pathExists(from, to);\n }",
"public DSALinkedList<DSAGraphEdge<E>> getAdjacentEdges()\n {\n return edgeList;\n }",
"@Override\n public Iterable<V> adjacentTo(V from)\n {\n if (from.equals(null)){\n throw new IllegalArgumentException();\n }\n Iterator graphIterator = graph.entrySet().iterator();\n \t Map.Entry graphElement = (Map.Entry) graphIterator.next();\n \t V vert = (V)graphElement.getKey();\n \t while (graphIterator.hasNext() && vert != from){\n \t\tgraphElement = (Map.Entry) graphIterator.next();\n \t\tvert = (V)graphElement.getKey();\n \t }\n \t ArrayList <V> edges = graph.get(vert);\n \t //Iterable <V> e = edges;\n \t return edges;\n }",
"public Vector getAdjacentNodes()\n\t{\n\t\tVector vAdjNodes = new Vector();\n\t\t\n\t\tfor (int i = 0; i < m_vConnectedNodes.size(); i++)\n\t\t{\n\t\t\tif ( ((NodeConnection)m_vConnectedNodes.get(i)).getCost() > 0 )\n\t\t\t{\n\t\t\t\tvAdjNodes.add(((NodeConnection)m_vConnectedNodes.get(i)).getLinkedNode());\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn vAdjNodes;\n\t}",
"public ArrayList< Vertex > adjacentVertices( ) {\n return adjacentVertices;\n }",
"public ArrayList<Edge> getAdjacencies(){\r\n return adjacencies;\r\n }",
"public abstract DBResult getAdjacentContinuousLinks(int nodeId) throws SQLException;",
"abstract ArrayList<Pair<Integer,Double>> adjacentNodes(int i);",
"public Iterable<Vertex> adjacentTo(String name) {\n Vertex v = getVertex(name);\n if (v == null) return EMPTY_SET;\n return mAdjList.get(getVertex(name));\n }",
"Iterable<Long> adjacent(long v) {\n return nodes.get(v).adjs;\n }",
"public ArrayList<ChessCoordinate> getAdjacencyList() {\n\t\tint dx, dy;\n\t\tArrayList<ChessCoordinate> adjacencyList = new ArrayList<ChessCoordinate>();\n\n\t\tfor (dx = -1; dx <= 1; dx++) {\n\t\t\tfor (dy = -1; dy <= 1; dy++) {\n\t\t\t\tif (dx == dy) {\n\t\t\t\t\tcontinue;\n\t\t\t\t} else {\n\t\t\t\t\tadjacencyList.add(StandardCoordinate.make(x + dx, y + dy));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn adjacencyList;\n\t}",
"public Collection<Vertex> adjacentVertices(Vertex v) {\n Vertex parameterVertex = new Vertex(v.getLabel());\n if(!myGraph.containsKey(parameterVertex)){\n throw new IllegalArgumentException(\"Vertex is not valid\");\n }\n\n //create a copy of the passed in vertex to restrict any reference\n //to interals of this class\n Collection<Vertex> adjVertices = new ArrayList<Vertex>();\n\n Iterator<Edge> edges = myGraph.get(parameterVertex).iterator();\n while(edges.hasNext()) {\n adjVertices.add(edges.next().getDestination());\n }\n return adjVertices;\n }",
"Iterable<Long> adjacent(long v) {\n return world.get(v).adj;\n }",
"public Iterable<Vertex> adjacentTo(Vertex v) {\n if (!mAdjList.containsKey(v)) return EMPTY_SET;\n return mAdjList.get(v);\n }",
"private List<Integer> getAdjacent(int node) {\n List<Integer> adjacent = new ArrayList<>();\n for (int i = 0; i < this.matrix[node].length; i++) {\n if (this.matrix[node][i]) {\n adjacent.add(i);\n }\n }\n return adjacent;\n }",
"List<WeightedEdge<Vertex>> neighbors(Vertex v);",
"ArrayList<PathFindingNode> neighbours(PathFindingNode node);",
"java.util.List<rina.object.gpb.Neighbour_t.neighbor_t> \n getNeighborList();",
"public void outAdjacentVertices() {\r\n\t\tfor (int i = 0; i < currentVertex.outList.size(); i++) {\r\n\t\t\tSystem.out.print(currentVertex.outList.get(i).vertex.label + \" \");\r\n\t\t}\r\n\t\tprintLine();\r\n\t}",
"private Set<Integer>[] getKernelDAG(List<Integer>[] adjacent) {\n Set<Integer>[] adjacentComponents = (HashSet<Integer>[]) new HashSet[sccCount];\n for (int i = 0; i < adjacentComponents.length; i++) {\n adjacentComponents[i] = new HashSet<>();\n }\n\n for (int vertexId = 0; vertexId < adjacent.length; vertexId++) {\n int currentComponent = sccIds[vertexId];\n\n for (int neighbor : adjacent[vertexId]) {\n if (currentComponent != sccIds[neighbor]) {\n adjacentComponents[currentComponent].add(sccIds[neighbor]);\n }\n }\n }\n return adjacentComponents;\n }",
"List<GraphEdge> getNeighbors(NodeKey key);",
"public List<Aresta> getAdjacentes(Ponto ponto) {\n\t\treturn getAdjacentes(Arrays.asList(ponto));\n\t}",
"public List<Location> neighbors (Location pos);",
"public abstract List<AStarNode> getNeighbours();",
"List<Integer> adj(int v) {\n return adj[v];\n }",
"private List<routerNode> getPathVertexList(routerNode beginNode, routerNode endNode) {\r\n\t\tTransformer<routerLink, Integer> wtTransformer; // transformer for getting edge weight\r\n\t\twtTransformer = new Transformer<routerLink, Integer>() {\r\n public Integer transform(routerLink link) {\r\n return link.getWeight();\r\n \t}\r\n };\t\t\r\n\r\n\t\t\r\n\t\tList<routerNode> vlist;\r\n\t\tDijkstraShortestPath<routerNode, routerLink> DSPath = \r\n\t \t new DijkstraShortestPath<routerNode, routerLink>(gGraph, wtTransformer);\r\n \t// get the shortest path in the form of edge list \r\n List<routerLink> elist = DSPath.getPath(beginNode, endNode);\r\n\t\t\r\n \t\t// get the node list form the shortest path\r\n\t Iterator<routerLink> ebIter = elist.iterator();\r\n\t vlist = new ArrayList<routerNode>(elist.size() + 1);\r\n \tvlist.add(0, beginNode);\r\n\t for(int i=0; i<elist.size(); i++){\r\n\t\t routerLink aLink = ebIter.next();\r\n\t \t \t// get the nodes corresponding to the edge\r\n \t\tPair<routerNode> endpoints = gGraph.getEndpoints(aLink);\r\n\t routerNode V1 = endpoints.getFirst();\r\n\t routerNode V2 = endpoints.getSecond();\r\n\t \tif(vlist.get(i) == V1)\r\n\t \t vlist.add(i+1, V2);\r\n\t else\r\n\t \tvlist.add(i+1, V1);\r\n\t }\r\n\t return vlist;\r\n\t}",
"private List<Vertex> prepareGraphAdjacencyList() {\n\n\t\tList<Vertex> graph = new ArrayList<Vertex>();\n\t\tVertex vertexA = new Vertex(\"A\");\n\t\tVertex vertexB = new Vertex(\"B\");\n\t\tVertex vertexC = new Vertex(\"C\");\n\t\tVertex vertexD = new Vertex(\"D\");\n\t\tVertex vertexE = new Vertex(\"E\");\n\t\tVertex vertexF = new Vertex(\"F\");\n\t\tVertex vertexG = new Vertex(\"G\");\n\n\t\tList<Edge> edges = new ArrayList<Edge>();\n\t\tedges.add(new Edge(vertexB, 2));\n\t\tedges.add(new Edge(vertexD, 6));\n\t\tedges.add(new Edge(vertexF, 5));\n\t\tvertexA.incidentEdges = edges;\n\n\t\tedges = new ArrayList<Edge>();\n\t\tedges.add(new Edge(vertexA, 2));\n\t\tedges.add(new Edge(vertexC, 7));\n\t\tvertexB.incidentEdges = edges;\n\n\t\tedges = new ArrayList<Edge>();\n\t\tedges.add(new Edge(vertexB, 7));\n\t\tedges.add(new Edge(vertexD, 9));\n\t\tedges.add(new Edge(vertexF, 1));\n\t\tvertexC.incidentEdges = edges;\n\n\t\tedges = new ArrayList<Edge>();\n\t\tedges.add(new Edge(vertexA, 6));\n\t\tedges.add(new Edge(vertexC, 9));\n\t\tedges.add(new Edge(vertexE, 4));\n\t\tedges.add(new Edge(vertexG, 8));\n\t\tvertexD.incidentEdges = edges;\n\n\t\tedges = new ArrayList<Edge>();\n\t\tedges.add(new Edge(vertexD, 4));\n\t\tedges.add(new Edge(vertexF, 3));\n\t\tvertexE.incidentEdges = edges;\n\n\t\tedges = new ArrayList<Edge>();\n\t\tedges.add(new Edge(vertexA, 5));\n\t\tedges.add(new Edge(vertexC, 1));\n\t\tedges.add(new Edge(vertexE, 3));\n\t\tvertexF.incidentEdges = edges;\n\n\t\tedges = new ArrayList<Edge>();\n\t\tedges.add(new Edge(vertexD, 8));\n\t\tvertexG.incidentEdges = edges;\n\n\t\tgraph.add(vertexA);\n\t\tgraph.add(vertexB);\n\t\tgraph.add(vertexC);\n\t\tgraph.add(vertexD);\n\t\tgraph.add(vertexE);\n\t\tgraph.add(vertexF);\n\t\tgraph.add(vertexG);\n\n\t\treturn graph;\n\t}",
"public Map<V,List<E>> adjacencyMap(){\n\t\tMap<V,List<E>> ret = new HashMap<V,List<E>>();\n\t\tfor (E e : edges){\n\t\t\tif (virtualEdges.contains(e))\n\t\t\t\tcontinue;\n\t\t\tList<E> list;\n\t\t\tif (!ret.containsKey(e.getOrigin())){\n\t\t\t\tlist = new ArrayList<E>();\n\t\t\t\tret.put(e.getOrigin(), list);\n\t\t\t}\n\t\t\telse\n\t\t\t\tlist = ret.get(e.getOrigin());\n\t\t\tlist.add(e);\n\t\t\t\n\t\t\tif (!ret.containsKey(e.getDestination())){\n\t\t\t\tlist = new ArrayList<E>();\n\t\t\t\tret.put(e.getDestination(), list);\n\t\t\t}\n\t\t\telse\n\t\t\t\tlist = ret.get(e.getDestination());\n\t\t\tlist.add(e);\n\t\t}\n\t\treturn ret;\n\t}",
"public abstract List<? extends DiGraphEdge<N, E>> getInEdges(N nodeValue);",
"@Override\n public List<V> getNeighbors(V v, TimeFrame pTimeFrame) {\n List<V> lstNeighbors = new ArrayList<>();\n// System.out.println(\"DynamicGraph.getNeighbor() : \" + darrGlobalAdjList.get(v.getId()).get(pTimeFrame));\n if (darrGlobalAdjList.get(v.getId()).containsKey(pTimeFrame)) {\n for (E e : darrGlobalAdjList.get(v.getId()).get(pTimeFrame)){\n if (e.getOtherEndPoint(v) != null) {\n lstNeighbors.add(e.getOtherEndPoint(v));\n }\n }\n }\n return lstNeighbors;\n }",
"public Iterable<DirectedEdge> adj(int v) \n {\n return adj[v];\n }",
"public List<Integer> neighbors(int vertex) {\r\n \tArrayList<Integer> vertices = new ArrayList<Integer>();\r\n \tLinkedList<Edge> testList = myAdjLists[vertex];\r\n int counter = 0;\r\n while (counter < testList.size()) {\r\n \tvertices.add(testList.get(counter).myTo);\r\n \tcounter++;\r\n }\r\n return vertices;\r\n }",
"@DisplayName(\"Add directed edge\")\n @Test\n public void testAddEdgeDirected() {\n graph.addEdge(new Edge(3, 4));\n List<Integer> l = new ArrayList<>();\n l.add(2);\n l.add(4);\n Assertions.assertArrayEquals(l.toArray(), graph.getNeighbours(3).toArray());\n }",
"private List<Node> getAdjacentNodes(Node current, List<Node> closedSet, Node dest) {\n\t\tList<Node> adjacent = new ArrayList<Node>();\n\t\t\n\t\tfor (int i = -1; i <=1; i++) {\n\t\t\tinner:\n\t\t\tfor (int j = -1; j <=1; j++) {\n\t\t\t\tif (i == 0 && j == 0) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tint x = current.getX() + i;\n\t\t\t\tint y = current.getY() + j;\n\t\t\t\tif (!currentState.inBounds(x, y)\n\t\t\t\t\t\t|| board.getHasTree(x, y)\n\t\t\t\t\t\t|| peasantAt(x,y)\n\t\t\t\t\t\t|| board.getTowerProbability(x, y) == 1\n\t\t\t\t\t\t|| isTownHallAt(x, y, dest)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tNode node = new Node(x, y, getHitProbability(x, y), current);\n\t\t\t\tfor (Node visitedNode : closedSet) {\n\t\t\t\t\tif (node.equals(visitedNode)) {\n\t\t\t\t\t\tcontinue inner;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tadjacent.add(node);\n\t\t\t}\n\t\t}\n//\t\tSystem.out.println(\"AT \" + current);\n//\t\tSystem.out.println(\"NEIGHBORS:\");\n//\t\tfor (Node node : adjacent) {\n//\t\t\tSystem.out.println(\"\\t\" + node);\n//\t\t}\n\t\t\n\t\treturn adjacent;\n\t}",
"public void addEdge(){\n Node[] newAdjacent = new Node[adjacent.length + 1];\n for (int i = 0; i < adjacent.length; i++) {\n newAdjacent[i] = adjacent[i];\n }\n adjacent = newAdjacent;\n }",
"public List neighbors(int vertex) {\n // your code here\n \tList toReturn = new ArrayList<Integer>();\n \tfor (Edge e : myAdjLists[vertex]) {\n \t\ttoReturn.add(e.to());\n \t}\n return toReturn;\n }",
"@Test\n void test08_getAllAdjacentVertices() {\n graph.addEdge(\"a\", \"b\");\n graph.addEdge(\"a\", \"c\"); // add two edges\n\n List<String> check = new ArrayList<>();\n check.add(\"b\");\n check.add(\"c\"); // create mock up adjacent list\n\n if (!check.equals(graph.getAdjacentVerticesOf(\"a\"))) { // checks if both are same\n fail(\"graph didn't record adjacent vertices correctly\");\n }\n }",
"public DoublyLinkedList getAdjacencyList()\n \t{\n\t return adjacencyList ;\n \t}",
"public List<Edge> getEdgesForward(Node sourceNode) {\r\n\r\n\t\tList<Edge> edgeReferences = new LinkedList<>();\r\n\r\n\t\tfor (Edge to : edges) {\r\n\t\t\tif (to.getSourceNode().getLabel().equals(sourceNode.getLabel())) {\r\n\t\t\t\tedgeReferences.add(to);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn edgeReferences;\r\n\t}",
"List<Integer> getNeighboursOf(int node) {\n\t\treturn adjList.get(node);\n\t}",
"@SuppressWarnings(\"unchecked\")\n\tpublic ArrayList<Node<A>> neighbours(){\n\t\t\n\t\tArrayList<Node<A>> output = new ArrayList<Node<A>>();\n\t\t\n\t\tif (g == null) return output;\n\t\t\n\t\tfor (Object o: g.getEdges()){\n\n\t\t\t\n\t\t\tif (((Edge<?>)o).getTo().equals(this)) {\n\t\t\t\t\n\t\t\t\tif (!output.contains(((Edge<?>)o).getFrom()))\n\t\t\t\t\t\toutput.add((Node<A>) ((Edge<?>)o).getFrom());\n\t\t\t\t\n\t\t\t}\n\n\t\t} \n\t\treturn output;\n\t\t\n\t}",
"List<Edge<V>> getEdgeList();",
"public Iterable<Integer> adj(int v)\n { return adj[v]; }",
"public AdjacentListGraph(String[] vertexes) {\n this.vertexes = Arrays.copyOf(vertexes, vertexes.length);\n this.heads = new LinkedList[vertexes.length];\n\n // init the heads to save code: if(heads != null)\n for (int i = 0; i < heads.length; i++) {\n this.heads[i] = new LinkedList<>();\n }\n }",
"public static strictfp void main(String... args) {\n\t\tArrayList<Vertex> graph = new ArrayList<>();\r\n\t\tHashMap<Character, Vertex> map = new HashMap<>();\r\n\t\t// add vertices\r\n\t\tfor (char c = 'a'; c <= 'i'; c++) {\r\n\t\t\tVertex v = new Vertex(c);\r\n\t\t\tgraph.add(v);\r\n\t\t\tmap.put(c, v);\r\n\t\t}\r\n\t\t// add edges\r\n\t\tfor (Vertex v: graph) {\r\n\t\t\tif (v.getNodeId() == 'a') {\r\n\t\t\t\tv.getAdjacents().add(map.get('b'));\r\n\t\t\t\tv.getAdjacents().add(map.get('h'));\r\n\t\t\t} else if (v.getNodeId() == 'b') {\r\n\t\t\t\tv.getAdjacents().add(map.get('a'));\r\n\t\t\t\tv.getAdjacents().add(map.get('c'));\r\n\t\t\t\tv.getAdjacents().add(map.get('h'));\r\n\t\t\t} else if (v.getNodeId() == 'c') {\r\n\t\t\t\tv.getAdjacents().add(map.get('b'));\r\n\t\t\t\tv.getAdjacents().add(map.get('d'));\r\n\t\t\t\tv.getAdjacents().add(map.get('f'));\r\n\t\t\t\tv.getAdjacents().add(map.get('i'));\r\n\t\t\t} else if (v.getNodeId() == 'd') {\r\n\t\t\t\tv.getAdjacents().add(map.get('c'));\r\n\t\t\t\tv.getAdjacents().add(map.get('e'));\r\n\t\t\t\tv.getAdjacents().add(map.get('f'));\r\n\t\t\t} else if (v.getNodeId() == 'e') {\r\n\t\t\t\tv.getAdjacents().add(map.get('d'));\r\n\t\t\t\tv.getAdjacents().add(map.get('f'));\r\n\t\t\t} else if (v.getNodeId() == 'f') {\r\n\t\t\t\tv.getAdjacents().add(map.get('c'));\r\n\t\t\t\tv.getAdjacents().add(map.get('d'));\r\n\t\t\t\tv.getAdjacents().add(map.get('e'));\r\n\t\t\t\tv.getAdjacents().add(map.get('g'));\r\n\t\t\t} else if (v.getNodeId() == 'g') {\r\n\t\t\t\tv.getAdjacents().add(map.get('f'));\r\n\t\t\t\tv.getAdjacents().add(map.get('h'));\r\n\t\t\t\tv.getAdjacents().add(map.get('i'));\r\n\t\t\t} else if (v.getNodeId() == 'h') {\r\n\t\t\t\tv.getAdjacents().add(map.get('a'));\r\n\t\t\t\tv.getAdjacents().add(map.get('b'));\r\n\t\t\t\tv.getAdjacents().add(map.get('g'));\r\n\t\t\t\tv.getAdjacents().add(map.get('i'));\r\n\t\t\t} else if (v.getNodeId() == 'i') {\r\n\t\t\t\tv.getAdjacents().add(map.get('c'));\r\n\t\t\t\tv.getAdjacents().add(map.get('g'));\r\n\t\t\t\tv.getAdjacents().add(map.get('h'));\r\n\t\t\t}\t\r\n\t\t}\r\n\t\t// graph created\r\n\t\t// create disjoint sets\r\n\t\tDisjointSet S = null, V_S = null;\r\n\t\tfor (Vertex v: graph) {\r\n\t\t\tchar c = v.getNodeId();\r\n\t\t\tif (c == 'a' || c == 'b' || c == 'd' || c == 'e') {\r\n\t\t\t\tif (S == null) {\r\n\t\t\t\t\tS = v.getDisjointSet();\r\n\t\t\t\t} else {\r\n\t\t\t\t\tDisjointSet set = DisjointSet.union(S, v.getDisjointSet());\r\n\t\t\t\t\tv.setDisjointSet(set);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tif (V_S == null) {\r\n\t\t\t\t\tV_S = v.getDisjointSet();\r\n\t\t\t\t} else {\r\n\t\t\t\t\tDisjointSet set = DisjointSet.union(V_S, v.getDisjointSet());\r\n\t\t\t\t\tv.setDisjointSet(set);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t// Disjoint sets created\r\n\t\tfor (Vertex u: graph) {\r\n\t\t\tfor (Vertex v: u.getAdjacents()) {\r\n\t\t\t\tif (DisjointSet.findSet((DisjointSet) u.getDisjointSet()) == \r\n\t\t\t\t DisjointSet.findSet((DisjointSet) v.getDisjointSet())) {\r\n\t\t\t\t\tSystem.out.println(\"The cut respects (\" + u.getNodeId() + \", \" + v.getNodeId() + \").\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public boolean isAdjacent(int from, int to) {\n //your code here\n \tfor (Edge e : myAdjLists[from]) {\n \t\tif (e.to() == to) {\n \t\t\treturn true;\n \t\t}\n \t}\n return false;\n }",
"public Enumeration adjacentVertices(Position vp) throws InvalidPositionException;",
"public void dfs(LinkedList<Node>[] adjList){\n Set<Integer> visited = new HashSet<>();\n\n for(LinkedList<Node> node: adjList){\n Node curr = node.getFirst();\n if(!visited.contains(curr)){\n ArrayList<Integer> components = new ArrayList<>();\n components = getConnectedComponets(curr, visited, components);\n System.out.printf(\"do something %s\", components.toString());\n }\n }\n }",
"public Iterable<Edge> adj(int v) {\n return adj[v];\n }",
"public DSAGraphVertex getVertex(String label)\n\t{\n\t\tDSAGraphVertex temp, target = null;\n\t\tIterator<DSAGraphVertex> itr = vertices.iterator();\n\t\tif(vertices.isEmpty()) // case: list is empty\n\t\t{\n\t\t\tthrow new NoSuchElementException(\"Vertices list is empty.\");\n\t\t}\n\t\telse //searches for target\n\t\t{\n\t\t\twhile(itr.hasNext()) //iterates until target is found\n\t\t\t{\n\t\t\t\ttemp = itr.next();\n\t\t\t\tif(temp.getLabel().equals(label))\n\t\t\t\t{\n\t\t\t\t\ttarget = temp;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(target == null) // case: not found\n\t\t{\n\t\t\tthrow new NoSuchElementException(\"Label |\" + label + \"| not found\");\n\t\t}\n\n\t\treturn target;\n\t}",
"public static List<Edge> getNei(int u){\n return adj.get(u);\n }",
"public static ArrayList<String> connectors2(Graph g) {\n boolean[] visits = new boolean[g.members.length]; \n for (int i=0;i<=g.members.length-1;i++) {\n \tvisits[i]=false;\n }\n int[] dfsnum = new int[g.members.length];\n int[] back = new int[g.members.length];\n ArrayList<String> answer = new ArrayList<String>();\n\n //driver portion\n for (Person person : g.members) {\n //if it hasn't been visited\n if (visits[g.map.get(person.name)]==false){\n //for different islands\n dfsnum = new int[g.members.length];\n dfs(g.map.get(person.name), g.map.get(person.name), g, visits, dfsnum, back, answer);\n }\n }\n \n //check if vertex has one neighbor\n for (int i = 0; i < answer.size(); i++) {\n Friend ptr = g.members[g.map.get(answer.get(i))].first;\n //counts number of neighbors\n int count = 0;\n while (ptr != null) {\n ptr = ptr.next;\n count++;\n }\n if (count == 1) answer.remove(i);\n if (count == 0) answer.remove(i);\n } \n for (Person member : g.members) {\n if (member.first!=null&& member.first.next == null) {\n if (answer.contains(g.members[member.first.fnum].name)==false)\n \t\t answer.add(g.members[member.first.fnum].name);\n }\n }\n answer=modify(answer,g);\n if (answer==null||answer.size()==0) return null;\n return answer;\n }",
"List<CyEdge> getInternalEdgeList();",
"public abstract List<GraphNode<N, E>> getNeighborNodes(N value);",
"public boolean isAdjacent(int from, int to) {\r\n LinkedList<Edge> testList = myAdjLists[from];\r\n int counter = 0;\r\n while (counter < testList.size()) {\r\n \tif (testList.get(counter).myTo == to) {\r\n \t\treturn true;\r\n \t}\r\n \tcounter++;\r\n }\r\n return false;\r\n }",
"private Set<Edge> reachableDAG(Vertex start, Vertex obstacle) {\n \tHashSet<Edge> result = new HashSet<Edge>();\n \tVector<Vertex> currentVertexes = new Vector<Vertex>();\n \tint lastResultNumber = 0;\n \tcurrentVertexes.add(start);\n \t\n \tdo {\n \t\t//System.out.println(\"size of currentVertexes:\" + currentVertexes.size());\n \t\t\n \t\tVector<Vertex> newVertexes = new Vector<Vertex>();\n \t\tlastResultNumber = result.size();\n \t\t\n \t\tfor (Vertex v : currentVertexes) {\n \t\t\t//System.out.println(\"layerID:\" + v.layerID + \"\\tlabel:\" + v.label);\n \t\t\taddIncomingEdges(v, obstacle, result, newVertexes);\n \t\t\taddOutgoingEdges(v, obstacle, result, newVertexes);\n \t\t}\n \t\t\n \t\t//System.out.println(\"size of newVertexes:\" + newVertexes.size());\n \t\t\n \t\tcurrentVertexes = newVertexes;\t\n \t\t//System.out.println(\"lastResultNumber:\" + lastResultNumber);\n \t\t//System.out.println(\"result.size():\" + result.size());\n \t} while (lastResultNumber != result.size());\n \t\n\t\treturn result;\n }",
"public List<NetworkNode> listNetworkNode();",
"java.util.List<uk.ac.cam.acr31.features.javac.proto.GraphProtos.FeatureEdge> \n getEdgeList();",
"protected abstract List<Integer> getNeighbors(int vertex);",
"@Override\n\tpublic List<Location> getNeighbors(Location vertex) {\n\n\t\tArrayList<Location> neighbors = new ArrayList<Location>();\n\n\t\tfor (Path p : getOutEdges(vertex))\n\t\t\tneighbors.add(p.getDestination());\n\n\t\treturn neighbors;\n\n\n\t}",
"List<Edge<V>> getIncidentEdgeList(V v);",
"List<Tile> getAdjacentTiles();",
"public abstract int[] getConnected(int vertexIndex);",
"ArrayList<Node> DFSIter( Graph graph, final Node start, final Node end)\n {\n boolean visited[] = new boolean[graph.numNodes];\n Stack<Node> stack = new Stack<Node>();\n Map< Node,Node> parentPath = new HashMap< Node,Node>(); \n stack.push(start);\n\n while ( !stack.isEmpty() )\n {\n Node currNode = stack.pop();\n // end loop when goal node is found\n if ( currNode == end )\n break;\n // If node has already been visited, skip it\n if ( visited[currNode.id] )\n continue;\n else\n {\n visited[currNode.id] = true;\n int numEdges = currNode.connectedNodes.size();\n\n for ( int i = 0; i < numEdges; i++ )\n {\n Node edgeNode = currNode.connectedNodes.get(i);\n if ( !visited[edgeNode.id] )\n {\n stack.push( edgeNode );\n parentPath.put( edgeNode, currNode);\n }\n }\n \n }\n }\n\n ArrayList<Node> path = new ArrayList<Node>();\n Node currNode = end;\n while ( currNode != null )\n {\n path.add(0, currNode);\n currNode = parentPath.get(currNode);\n }\n\n return path;\n }",
"Set<CyEdge> getExternalEdgeList();",
"public ArrayList<Position> getAdjacents(Board board){\r\n\t\tArrayList<Position> adjacents = new ArrayList<Position>(0);\r\n\t\t/* First get tiles to left and right */\r\n\t\tif(this.x>0){\r\n\t\t\tadjacents.add(board.getNodes()[this.y][this.x-1]);\r\n\t\t}\r\n\t\t/* Length of a row is given by\r\n\t\t * Math.min(size+y, 2*size-1)\r\n\t\t */\r\n\t\tif(this.x<Math.min(board.getArraySize()+this.y, 2*board.getArraySize()-2)){\r\n\t\t\tadjacents.add(board.getNodes()[this.y][this.x+1]);\r\n\t\t}\r\n\t\t/* Next, find the adjacent positions in the rows above and below\r\n\t\t * For the tile at [y,x] these are located at\r\n\t\t * [y-1,x-1],[y-1,x],[y+1,x] and [y+1,x+1] \r\n\t\t */\r\n\t\tif(this.y>0){\r\n\t\t\t// Row above exists\r\n\t\t\tif(this.x < board.getArraySize()-1+this.y){\r\n\t\t\t\t// Check tile above and to the right exists\r\n\t\t\t\tadjacents.add(board.getNodes()[this.y-1][this.x]);\r\n\t\t\t}\r\n\t\t\tif(this.x > 0){\r\n\t\t\t\t// Check tile above and to the left exists\r\n\t\t\t\tadjacents.add(board.getNodes()[this.y-1][this.x-1]);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(this.y<2*board.getArraySize()-2){\r\n\t\t\t// Row below exists\r\n\t\t\tif(this.x < 2*board.getArraySize()-2){\r\n\t\t\t\t// Check tile below and to the right exists\r\n\t\t\t\tadjacents.add(board.getNodes()[y+1][x+1]);\r\n\t\t\t}\r\n\t\t\tif(this.x > this.y-board.getArraySize()+1){\r\n\t\t\t\t// Check tile below and to the left exists\r\n\t\t\t\tadjacents.add(board.getNodes()[y+1][x]);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn adjacents;\r\n\t}",
"public ArrayList<Node> getNeighbors(){\n ArrayList<Node> result = new ArrayList<Node>();\n for(Edge edge: edges){\n result.add(edge.end());\n }\n return result;\n }",
"public int inDegree(int vertex) {\n int count = 0;\n//your code here\n for(int i=0; i<adjLists.length; i++){\n if(i==vertex){ continue;}\n if(isAdjacent(i,vertex)){\n count++;\n continue;\n }\n }\n return count;\n }",
"public Iterable<FlowEdge> adj(int v) {\n return adj[v];\n }",
"public boolean findInEdge(String label){\n\t\tfor(Entry<String, LinkedList<Edge>> s: vertices.entrySet()){\n\t\t\tfor(int i=0; i < vertices.get(s.getKey()).size();i++){\n\t\t\t\tif(vertices.get(s.getKey()).get(i).getDLabel().equals(label)){\n\t\t\t\t\tdelEdge(s.getKey(),label);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}",
"public abstract LinkedList<Integer> getNeighbours(int index);",
"public static ArrayList<Vertex> createArrayList(Vertex[] adjacentVertexes) {\n\t\tArrayList<Vertex> vertexesList = new ArrayList<>();\n\t\tfor (int counter = 0; counter < adjacentVertexes.length; counter ++ ) {\n\t\t\tvertexesList.add(adjacentVertexes[counter]);\n\t\t}\n\t\treturn vertexesList;\n\t}",
"private void addEdgeWithLabel(NasmInst source, NasmLabel destination) {\n if (source == null || destination == null)\n throw new FgException(\"ERROR: Can't create an edge without a source and a destination\");\n\n if (systemCalls.contains(destination.toString()))\n return; // System call: iprintLF, readline or atoi. No edge needed\n\n NasmInst destinationInst = label2Inst.get(destination.toString());\n if (destinationInst == null)\n throw new FgException(\"ERROR: No instruction matching with the given label\");\n addEdgeWithInst(source, destinationInst);\n }",
"public LinkedList<String> adjacentNodes(String last) {\r\n\r\n LinkedHashSet<String> adjacent = map.get(last);\r\n if (adjacent == null) {\r\n return new LinkedList<String>();\r\n }\r\n return new LinkedList<String>(adjacent);// add adjacent to the list if it's not null\r\n\r\n }",
"public Enumeration directedEdges();",
"public void setList(Node in_adjacentcyList[]){\n adjacentcyList = in_adjacentcyList;\n }",
"public ArrayList<Integer> getInNeighbors (int nodeId) {\r\n\t\tArrayList<Integer> inNeighbors = new ArrayList<Integer>();\r\n\t\t// the set of incoming edge ids\r\n\t\tSet<Integer> edgeSet = mInEdges.get(nodeId);\r\n\t\tfor(Integer edgeId: edgeSet) {\r\n\t\t\tinNeighbors.add( getEdge(edgeId).getFromId() );\r\n\t\t}\r\n\t\treturn inNeighbors;\r\n\t}",
"int[] getEdgesIncidentTo(int... nodes);",
"public List<DataNodeId> getDataNodeIds();",
"public int getNodeLabel ();",
"public List<CountryId> getAdjacentCountryIdList() {\r\n return _adjacentCountryIdList;\r\n }",
"public Vertex(int label) {\r\n isVisited = false;\r\n this.label = label;\r\n }",
"private ArrayList<Edge>getFullyConnectedGraph(){\n\t\tArrayList<Edge> edges = new ArrayList<>();\n\t\tfor(int i=0;i<nodes.size();i++){\n\t\t\tfor(int j=i+1;j<nodes.size();j++){\n\t\t\t\tEdge edge = new Edge(nodes.get(i), nodes.get(j),Utils.distance(nodes.get(i), nodes.get(j)));\n\t\t\t\tedges.add(edge);\n\t\t\t}\n\t\t}\n\t\treturn edges;\n\t}",
"public Map<String,Integer> getAdjacentVertices(String vertexName)\r\n\t{\r\n\t\treturn this.adjacencyMap.get(vertexName);\r\n\t}",
"private List<Edge<String>> getPath(Vertex<String> end,\n Vertex<String> start) {\n if (graph.label(end) != null) {\n List<Edge<String>> path = new ArrayList<>();\n\n Vertex<String> cur = end;\n Edge<String> road;\n while (cur != start) {\n road = (Edge<String>) graph.label(cur); // unchecked cast ok\n path.add(road);\n cur = graph.from(road);\n }\n return path;\n }\n return null;\n }",
"int[] getInEdges(int... nodes);"
] | [
"0.6951748",
"0.6647131",
"0.651783",
"0.6454309",
"0.6453793",
"0.6358138",
"0.6357033",
"0.6283512",
"0.6238615",
"0.62248904",
"0.61672795",
"0.61507845",
"0.61220074",
"0.61186564",
"0.6117685",
"0.60796916",
"0.6065699",
"0.60430604",
"0.6031561",
"0.60273904",
"0.60194737",
"0.60080636",
"0.5990479",
"0.5976745",
"0.59526867",
"0.58123523",
"0.5784803",
"0.57443786",
"0.5740774",
"0.57094026",
"0.5697443",
"0.5695216",
"0.56810176",
"0.5650331",
"0.56493366",
"0.56395537",
"0.56166685",
"0.5613382",
"0.55885905",
"0.5567263",
"0.5561426",
"0.55609596",
"0.5534221",
"0.5521117",
"0.54974616",
"0.54893386",
"0.548552",
"0.5482906",
"0.5476818",
"0.5457749",
"0.5431716",
"0.54163617",
"0.5402158",
"0.53958035",
"0.5394858",
"0.534834",
"0.534257",
"0.5307831",
"0.5290868",
"0.5287901",
"0.5268315",
"0.525587",
"0.52412385",
"0.5235768",
"0.5231007",
"0.52287686",
"0.5227143",
"0.52262366",
"0.5223319",
"0.5199727",
"0.5194737",
"0.5188619",
"0.5187042",
"0.51863426",
"0.5180555",
"0.51805097",
"0.5158578",
"0.5154498",
"0.51540196",
"0.5149976",
"0.5148427",
"0.5144706",
"0.5139705",
"0.51326704",
"0.51302487",
"0.51301813",
"0.51193106",
"0.5114642",
"0.5109189",
"0.5088045",
"0.50849533",
"0.5066819",
"0.5065418",
"0.5057615",
"0.50570804",
"0.50447094",
"0.50419956",
"0.5039831",
"0.50380087",
"0.50362474"
] | 0.8315236 | 0 |
IMPORT: none EXPORT: count (integer) ASSERTION: iterates through vertices list and returns count | public int getVertexCount()
{
int count = 0;
Iterator<DSAGraphVertex> itr = vertices.iterator();
while(itr.hasNext())
{
count++;
itr.next();
}
return count;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int getVertexCount();",
"int getNumberOfVertexes();",
"public abstract int getVertexCount();",
"public int getNumVertices();",
"public int getNumberOfVertices();",
"public int numVertices();",
"public int numVertices();",
"public abstract int getNumberOfVertices();",
"public long getVertexCount(){\n return vertexCount;\n }",
"public int getNumVertices() {\n\t\treturn vertices.size();\n\t}",
"@Override\r\n public int size() {\r\n return vertices.size();\r\n }",
"public String getVerticesCount() {\n long res = 0;\n Iterator<Vertex> itty = g.vertices();\n Vertex v;\n while (itty.hasNext()) {\n v = itty.next();\n res++;\n }\n return Long.toString(res);\n }",
"public int getVertexCount() {\n return vertexCount;\n }",
"public int size() {\n\t\treturn vertices.size();\n\t}",
"int getVertices();",
"public int getNumVertices()\n\t{\n\t\t//TODO: Implement this method in WEEK 3\n\t\treturn numVertices;\n\t}",
"public int getVertexCount() {\n\t\treturn this._vertices.size();\n\t}",
"public int numVertices() { return numV; }",
"public int getNumVertices(){\n return numVertices;\n }",
"public int getVertexCount() {\n\t\treturn vertexCount;\n\t}",
"public int getChildCount(V vertex);",
"public native int getVertexCount(GPolyline self)/*-{\r\n\t\treturn self.getVertexCount();\r\n\t}-*/;",
"@Override\n\t\tpublic int getRowCount() {\n\t\t\treturn app.graph.verticesCount;\n\t\t}",
"public int getVertexCount() {\n return map.keySet().size();\n }",
"public int getNumberOfVerticesFound(){\n\t\t\treturn searchOrder.size();\n\t\t}",
"public int getNumVertices() {\n return num_vertices;\n }",
"public int getNumberOfVertices() {\n\t\treturn n;\n\t}",
"public int getVertices() {\n return verticesNumber;\n }",
"public int getVertexCount() {\n if (hasIndices())\n return indices.length;\n if (hasVertices())\n return vertices.length / 3;\n logger.warn(\"No indices or vertices set, vertex count returning 0!\");\n return 0;\n }",
"@Test\r\n public void testGetVertices() {\r\n System.out.println(\"getVertices\");\r\n Polygon instance = new Polygon();\r\n int expResult = 0;\r\n int result = instance.getVertices().size();\r\n assertEquals(expResult, result);\r\n }",
"@Test\r\n public void testNumVertices() {\r\n System.out.println(\"numVertices\");\r\n MyDigraph instance = new MyDigraph();\r\n\r\n int expResult = 0;\r\n int result = instance.numVertices();\r\n assertEquals(expResult, result);\r\n\r\n Object v1Element = 1;\r\n Vertex v1 = instance.insertVertex(v1Element);\r\n\r\n expResult = 1;\r\n result = instance.numVertices();\r\n assertEquals(expResult, result);\r\n }",
"@Test\n\tpublic void verticesTest() {\n\t\tgraph.addVertex(A);\n\t\tgraph.addVertex(B);\n\t\tgraph.addVertex(C);\n\t\tgraph.addVertex(D);\n\t\tassertEquals(4, graph.vertices().size());\n\t\tassertTrue(graph.vertices().contains(A));\n\t\tassertTrue(graph.vertices().contains(D));\n\t}",
"public void testVerticesSet() {\n System.out.println(\"verticesSet\");\n\n Assert.assertTrue(generateGraph().verticesSet().size() == 25);\n }",
"public int getNrVertices(){\n return nrVertices;\n }",
"public int inDegree(int vertex) {\n int count = 0;\n//your code here\n for(int i=0; i<adjLists.length; i++){\n if(i==vertex){ continue;}\n if(isAdjacent(i,vertex)){\n count++;\n continue;\n }\n }\n return count;\n }",
"int getEdgeCount();",
"public int getVertexCount() {\n \tif (vertBuf == null)\n \t\treturn 0;\n \treturn vertBuf.asFloatBuffer().limit()/3;\n }",
"private int size() {\n assert _vertices.size() == _edges.size();\n return _edges.size();\n }",
"int getIndexesCount();",
"public int getVertexSize() {\n\t\treturn graph.vertexSet().size();\r\n\t}",
"@Test\n public void testElementCounts() {\n assertEquals(0, model3d.getBlocks().size());\n\n assertEquals(28, model3d.getEdges().size());\n assertEquals(16, model3d.getFaces().size());\n assertEquals(14, model3d.getPoints().size());\n }",
"public int inDegree(int vertex) {\n int count = 0;\n //your code here\n for (LinkedList<Edge> l : myAdjLists) {\n \tfor (Edge e : l) {\n \t\tif (e.to() == vertex) {\n \t\t\tcount++;\n \t\t\tbreak;\n \t\t}\n \t}\n }\n return count;\n }",
"int getPointsCount();",
"@Test\n void test04_checkOrder() {\n graph.addVertex(\"a\");\n graph.addVertex(\"b\");\n graph.addVertex(\"c\");\n graph.addVertex(\"d\");\n graph.addVertex(\"e\");\n graph.addVertex(\"f\"); // added 6 items\n if (graph.order() != 6) {\n fail(\"graph has counted incorrect number of vertices\");\n }\n }",
"private int getAgentsVertexNumber(Vertex vertex){\n if (vertexAgentsNumber.get(vertex) == null)\n return 0;\n else\n return vertexAgentsNumber.get(vertex).size();\n }",
"@Test\n public void getVertexes() {\n\n for (int i = 0; i < 6; i++) {\n\n Vertex temp = new Vertex(i + \"\", \"Location number \" + i);\n assertTrue(temp.equals(testGraph.getVertices ().get(i)));\n\n }\n }",
"int getIndicesCount();",
"int getNodeCount();",
"int getNodeCount();",
"@Override\n public int degree(V vertex)\n {\n if (contains(vertex)){\n Iterator graphIterator = graph.entrySet().iterator();\n Map.Entry graphElement = (Map.Entry) graphIterator.next();\n V vert = (V)graphElement.getKey();\n while (graphIterator.hasNext() && vert != vertex){\n graphElement = (Map.Entry) graphIterator.next();\n vert = (V)graphElement.getKey();\n }\n ArrayList<V> edges = graph.get(vert);\n return edges.size();\n }\n else{\n throw new RuntimeException();\n }\n\n }",
"public int getVertices() {\n return mPolygonShapeSpec.getNumVertex();\n }",
"public void testContainsVertex() {\n System.out.println(\"containsVertex\");\n\n Graph<Integer, Edge<Integer>> graph = generateGraph();\n\n for (int i = 0; i < 25; i++) {\n Assert.assertTrue(graph.containsVertex(new Integer(i)));\n }\n }",
"@Test\n void test05_checkSize() {\n graph.addVertex(\"a\");\n graph.addVertex(\"b\");\n graph.addVertex(\"c\"); // adds three vertices\n graph.addEdge(\"a\", \"b\");\n graph.addEdge(\"b\", \"c\");\n graph.addEdge(\"c\", \"b\"); // add three edges\n if (graph.size() != 3) {\n fail(\"graph has counted incorrect number of edges\");\n }\n }",
"public int getMinimumVertexCount()\r\n {\r\n return theMinimumVertexCount;\r\n }",
"@Test\r\n\tvoid testCount() {\r\n\t\tSimpleList test = new SimpleList();\r\n\t\ttest.add(7);\r\n\t\ttest.add(10);\r\n\t\ttest.add(9);\r\n\t\tint output = test.count();\r\n\t\tassertEquals(3, output);\r\n\t}",
"int getParticipantsCount();",
"int getParticipantsCount();",
"public Long getElementCount();",
"@Override\n public long[ ][ ] count() {\n // precompute common nodes\n for (int x = 0; x < n; x++) {\n for (int n1 = 0; n1 < deg[x]; n1++) {\n int a = adj[x][n1];\n for (int n2 = n1 + 1; n2 < deg[x]; n2++) {\n int b = adj[x][n2];\n Tuple ab = createTuple(a, b);\n common2.put(ab, common2.getOrDefault(ab, 0) + 1);\n for (int n3 = n2 + 1; n3 < deg[x]; n3++) {\n int c = adj[x][n3];\n boolean st = adjacent(adj[a], b) ? (adjacent(adj[a], c) || adjacent(adj[b], c)) :\n (adjacent(adj[a], c) && adjacent(adj[b], c));\n if (!st) continue;\n Tuple abc = createTuple(a, b, c);\n common3.put(abc, common3.getOrDefault(abc, 0) + 1);\n }\n }\n }\n }\n\n // precompute triangles that span over edges\n int[ ] tri = countTriangles();\n\n // count full graphlets\n long[ ] C5 = new long[n];\n int[ ] neigh = new int[n];\n int[ ] neigh2 = new int[n];\n int nn, nn2;\n for (int x = 0; x < n; x++) {\n for (int nx = 0; nx < deg[x]; nx++) {\n int y = adj[x][nx];\n if (y >= x) break;\n nn = 0;\n for (int ny = 0; ny < deg[y]; ny++) {\n int z = adj[y][ny];\n if (z >= y) break;\n if (adjacent(adj[x], z)) {\n neigh[nn++] = z;\n }\n }\n for (int i = 0; i < nn; i++) {\n int z = neigh[i];\n nn2 = 0;\n for (int j = i + 1; j < nn; j++) {\n int zz = neigh[j];\n if (adjacent(adj[z], zz)) {\n neigh2[nn2++] = zz;\n }\n }\n for (int i2 = 0; i2 < nn2; i2++) {\n int zz = neigh2[i2];\n for (int j2 = i2 + 1; j2 < nn2; j2++) {\n int zzz = neigh2[j2];\n if (adjacent(adj[zz], zzz)) {\n C5[x]++;\n C5[y]++;\n C5[z]++;\n C5[zz]++;\n C5[zzz]++;\n }\n }\n }\n }\n }\n }\n\n int[ ] common_x = new int[n];\n int[ ] common_x_list = new int[n];\n int ncx = 0;\n int[ ] common_a = new int[n];\n int[ ] common_a_list = new int[n];\n int nca = 0;\n\n // set up a system of equations relating orbit counts\n for (int x = 0; x < n; x++) {\n for (int i = 0; i < ncx; i++) common_x[common_x_list[i]] = 0;\n ncx = 0;\n\n // smaller graphlets\n orbit[x][0] = deg[x];\n for (int nx1 = 0; nx1 < deg[x]; nx1++) {\n int a = adj[x][nx1];\n for (int nx2 = nx1 + 1; nx2 < deg[x]; nx2++) {\n int b = adj[x][nx2];\n if (adjacent(adj[a], b)) orbit[x][3]++;\n else orbit[x][2]++;\n }\n for (int na = 0; na < deg[a]; na++) {\n int b = adj[a][na];\n if (b != x && !adjacent(adj[x], b)) {\n orbit[x][1]++;\n if (common_x[b] == 0) common_x_list[ncx++] = b;\n common_x[b]++;\n }\n }\n }\n\n long f_71 = 0, f_70 = 0, f_67 = 0, f_66 = 0, f_58 = 0, f_57 = 0; // 14\n long f_69 = 0, f_68 = 0, f_64 = 0, f_61 = 0, f_60 = 0, f_55 = 0, f_48 = 0, f_42 = 0, f_41 = 0; // 13\n long f_65 = 0, f_63 = 0, f_59 = 0, f_54 = 0, f_47 = 0, f_46 = 0, f_40 = 0; // 12\n long f_62 = 0, f_53 = 0, f_51 = 0, f_50 = 0, f_49 = 0, f_38 = 0, f_37 = 0, f_36 = 0; // 8\n long f_44 = 0, f_33 = 0, f_30 = 0, f_26 = 0; // 11\n long f_52 = 0, f_43 = 0, f_32 = 0, f_29 = 0, f_25 = 0; // 10\n long f_56 = 0, f_45 = 0, f_39 = 0, f_31 = 0, f_28 = 0, f_24 = 0; // 9\n long f_35 = 0, f_34 = 0, f_27 = 0, f_18 = 0, f_16 = 0, f_15 = 0; // 4\n long f_17 = 0; // 5\n long f_22 = 0, f_20 = 0, f_19 = 0; // 6\n long f_23 = 0, f_21 = 0; // 7\n\n for (int nx1 = 0; nx1 < deg[x]; nx1++) {\n int a = inc[x][nx1]._1, xa = inc[x][nx1]._2;\n\n for (int i = 0; i < nca; i++) common_a[common_a_list[i]] = 0;\n nca = 0;\n for (int na = 0; na < deg[a]; na++) {\n int b = adj[a][na];\n for (int nb = 0; nb < deg[b]; nb++) {\n int c = adj[b][nb];\n if (c == a || adjacent(adj[a], c)) continue;\n if (common_a[c] == 0) common_a_list[nca++] = c;\n common_a[c]++;\n }\n }\n\n // x = orbit-14 (tetrahedron)\n for (int nx2 = nx1 + 1; nx2 < deg[x]; nx2++) {\n int b = inc[x][nx2]._1, xb = inc[x][nx2]._2;\n if (!adjacent(adj[a], b)) continue;\n for (int nx3 = nx2 + 1; nx3 < deg[x]; nx3++) {\n int c = inc[x][nx3]._1, xc = inc[x][nx3]._2;\n if (!adjacent(adj[a], c) || !adjacent(adj[b], c)) continue;\n orbit[x][14]++;\n f_70 += common3.getOrDefault(createTuple(a, b, c), 0) - 1;\n f_71 += (tri[xa] > 2 && tri[xb] > 2) ? (common3.getOrDefault(createTuple(x, a, b), 0) - 1) : 0;\n f_71 += (tri[xa] > 2 && tri[xc] > 2) ? (common3.getOrDefault(createTuple(x, a, c), 0) - 1) : 0;\n f_71 += (tri[xb] > 2 && tri[xc] > 2) ? (common3.getOrDefault(createTuple(x, b, c), 0) - 1) : 0;\n f_67 += tri[xa] - 2 + tri[xb] - 2 + tri[xc] - 2;\n f_66 += common2.getOrDefault(createTuple(a, b), 0) - 2;\n f_66 += common2.getOrDefault(createTuple(a, c), 0) - 2;\n f_66 += common2.getOrDefault(createTuple(b, c), 0) - 2;\n f_58 += deg[x] - 3;\n f_57 += deg[a] - 3 + deg[b] - 3 + deg[c] - 3;\n }\n }\n\n // x = orbit-13 (diamond)\n for (int nx2 = 0; nx2 < deg[x]; nx2++) {\n int b = inc[x][nx2]._1, xb = inc[x][nx2]._2;\n if (!adjacent(adj[a], b)) continue;\n for (int nx3 = nx2 + 1; nx3 < deg[x]; nx3++) {\n int c = inc[x][nx3]._1, xc = inc[x][nx3]._2;\n if (!adjacent(adj[a], c) || adjacent(adj[b], c)) continue;\n orbit[x][13]++;\n f_69 += (tri[xb] > 1 && tri[xc] > 1) ? (common3.getOrDefault(createTuple(x, b, c), 0) - 1) : 0;\n f_68 += common3.getOrDefault(createTuple(a, b, c), 0) - 1;\n f_64 += common2.getOrDefault(createTuple(b, c), 0) - 2;\n f_61 += tri[xb] - 1 + tri[xc] - 1;\n f_60 += common2.getOrDefault(createTuple(a, b), 0) - 1;\n f_60 += common2.getOrDefault(createTuple(a, c), 0) - 1;\n f_55 += tri[xa] - 2;\n f_48 += deg[b] - 2 + deg[c] - 2;\n f_42 += deg[x] - 3;\n f_41 += deg[a] - 3;\n }\n }\n\n // x = orbit-12 (diamond)\n for (int nx2 = nx1 + 1; nx2 < deg[x]; nx2++) {\n int b = inc[x][nx2]._1, xb = inc[x][nx2]._2;\n if (!adjacent(adj[a], b)) continue;\n for (int na = 0; na < deg[a]; na++) {\n int c = inc[a][na]._1, ac = inc[a][na]._2;\n if (c == x || adjacent(adj[x], c) || !adjacent(adj[b], c)) continue;\n orbit[x][12]++;\n f_65 += (tri[ac] > 1) ? common3.getOrDefault(createTuple(a, b, c), 0) : 0;\n f_63 += common_x[c] - 2;\n f_59 += tri[ac] - 1 + common2.getOrDefault(createTuple(b, c), 0) - 1;\n f_54 += common2.getOrDefault(createTuple(a, b), 0) - 2;\n f_47 += deg[x] - 2;\n f_46 += deg[c] - 2;\n f_40 += deg[a] - 3 + deg[b] - 3;\n }\n }\n\n // x = orbit-8 (cycle)\n for (int nx2 = nx1 + 1; nx2 < deg[x]; nx2++) {\n int b = inc[x][nx2]._1, xb = inc[x][nx2]._2;\n if (adjacent(adj[a], b)) continue;\n for (int na = 0; na < deg[a]; na++) {\n int c = inc[a][na]._1, ac = inc[a][na]._2;\n if (c == x || adjacent(adj[x], c) || !adjacent(adj[b], c)) continue;\n orbit[x][8]++;\n f_62 += (tri[ac] > 0) ? common3.getOrDefault(createTuple(a, b, c), 0) : 0;\n f_53 += tri[xa] + tri[xb];\n f_51 += tri[ac] + common2.getOrDefault(createTuple(c, b), 0);\n f_50 += common_x[c] - 2;\n f_49 += common_a[b] - 2;\n f_38 += deg[x] - 2;\n f_37 += deg[a] - 2 + deg[b] - 2;\n f_36 += deg[c] - 2;\n }\n }\n\n // x = orbit-11 (paw)\n for (int nx2 = nx1 + 1; nx2 < deg[x]; nx2++) {\n int b = inc[x][nx2]._1, xb = inc[x][nx2]._2;\n if (!adjacent(adj[a], b)) continue;\n for (int nx3 = 0; nx3 < deg[x]; nx3++) {\n int c = inc[x][nx3]._1, xc = inc[x][nx3]._2;\n if (c == a || c == b || adjacent(adj[a], c) || adjacent(adj[b], c)) continue;\n orbit[x][11]++;\n f_44 += tri[xc];\n f_33 += deg[x] - 3;\n f_30 += deg[c] - 1;\n f_26 += deg[a] - 2 + deg[b] - 2;\n }\n }\n\n // x = orbit-10 (paw)\n for (int nx2 = 0; nx2 < deg[x]; nx2++) {\n int b = inc[x][nx2]._1, xb = inc[x][nx2]._2;\n if (!adjacent(adj[a], b)) continue;\n for (int nb = 0; nb < deg[b]; nb++) {\n int c = inc[b][nb]._1, bc = inc[b][nb]._2;\n if (c == x || c == a || adjacent(adj[a], c) || adjacent(adj[x], c)) continue;\n orbit[x][10]++;\n f_52 += common_a[c] - 1;\n f_43 += tri[bc];\n f_32 += deg[b] - 3;\n f_29 += deg[c] - 1;\n f_25 += deg[a] - 2;\n }\n }\n\n // x = orbit-9 (paw)\n for (int na1 = 0; na1 < deg[a]; na1++) {\n int b = inc[a][na1]._1, ab = inc[a][na1]._2;\n if (b == x || adjacent(adj[x], b)) continue;\n for (int na2 = na1 + 1; na2 < deg[a]; na2++) {\n int c = inc[a][na2]._1, ac = inc[a][na2]._2;\n if (c == x || !adjacent(adj[b], c) || adjacent(adj[x], c)) continue;\n orbit[x][9]++;\n f_56 += (tri[ab] > 1 && tri[ac] > 1) ? common3.getOrDefault(createTuple(a, b, c), 0) : 0;\n f_45 += common2.getOrDefault(createTuple(b, c), 0) - 1;\n f_39 += tri[ab] - 1 + tri[ac] - 1;\n f_31 += deg[a] - 3;\n f_28 += deg[x] - 1;\n f_24 += deg[b] - 2 + deg[c] - 2;\n }\n }\n\n // x = orbit-4 (path)\n for (int na = 0; na < deg[a]; na++) {\n int b = inc[a][na]._1, ab = inc[a][na]._2;\n if (b == x || adjacent(adj[x], b)) continue;\n for (int nb = 0; nb < deg[b]; nb++) {\n int c = inc[b][nb]._1, bc = inc[b][nb]._2;\n if (c == a || adjacent(adj[a], c) || adjacent(adj[x], c)) continue;\n orbit[x][4]++;\n f_35 += common_a[c] - 1;\n f_34 += common_x[c];\n f_27 += tri[bc];\n f_18 += deg[b] - 2;\n f_16 += deg[x] - 1;\n f_15 += deg[c] - 1;\n }\n }\n\n // x = orbit-5 (path)\n for (int nx2 = 0; nx2 < deg[x]; nx2++) {\n int b = inc[x][nx2]._1, xb = inc[x][nx2]._2;\n if (b == a || adjacent(adj[a], b)) continue;\n for (int nb = 0; nb < deg[b]; nb++) {\n int c = inc[b][nb]._1, bc = inc[b][nb]._2;\n if (c == x || adjacent(adj[a], c) || adjacent(adj[x], c)) continue;\n orbit[x][5]++;\n f_17 += deg[a] - 1;\n }\n }\n\n // x = orbit-6 (claw)\n for (int na1 = 0; na1 < deg[a]; na1++) {\n int b = inc[a][na1]._1, ab = inc[a][na1]._2;\n if (b == x || adjacent(adj[x], b)) continue;\n for (int na2 = na1 + 1; na2 < deg[a]; na2++) {\n int c = inc[a][na2]._1, ac = inc[a][na2]._2;\n if (c == x || adjacent(adj[x], c) || adjacent(adj[b], c)) continue;\n orbit[x][6]++;\n f_22 += deg[a] - 3;\n f_20 += deg[x] - 1;\n f_19 += deg[b] - 1 + deg[c] - 1;\n }\n }\n\n // x = orbit-7 (claw)\n for (int nx2 = nx1 + 1; nx2 < deg[x]; nx2++) {\n int b = inc[x][nx2]._1, xb = inc[x][nx2]._2;\n if (adjacent(adj[a], b)) continue;\n for (int nx3 = nx2 + 1; nx3 < deg[x]; nx3++) {\n int c = inc[x][nx3]._1, xc = inc[x][nx3]._2;\n if (adjacent(adj[a], c) || adjacent(adj[b], c)) continue;\n orbit[x][7]++;\n f_23 += deg[x] - 3;\n f_21 += deg[a] - 1 + deg[b] - 1 + deg[c] - 1;\n }\n }\n }\n\n // solve equations\n orbit[x][72] = C5[x];\n orbit[x][71] = (f_71 - 12 * orbit[x][72]) / 2;\n orbit[x][70] = (f_70 - 4 * orbit[x][72]);\n orbit[x][69] = (f_69 - 2 * orbit[x][71]) / 4;\n orbit[x][68] = (f_68 - 2 * orbit[x][71]);\n orbit[x][67] = (f_67 - 12 * orbit[x][72] - 4 * orbit[x][71]);\n orbit[x][66] = (f_66 - 12 * orbit[x][72] - 2 * orbit[x][71] - 3 * orbit[x][70]);\n orbit[x][65] = (f_65 - 3 * orbit[x][70]) / 2;\n orbit[x][64] = (f_64 - 2 * orbit[x][71] - 4 * orbit[x][69] - 1 * orbit[x][68]);\n orbit[x][63] = (f_63 - 3 * orbit[x][70] - 2 * orbit[x][68]);\n orbit[x][62] = (f_62 - 1 * orbit[x][68]) / 2;\n orbit[x][61] = (f_61 - 4 * orbit[x][71] - 8 * orbit[x][69] - 2 * orbit[x][67]) / 2;\n orbit[x][60] = (f_60 - 4 * orbit[x][71] - 2 * orbit[x][68] - 2 * orbit[x][67]);\n orbit[x][59] = (f_59 - 6 * orbit[x][70] - 2 * orbit[x][68] - 4 * orbit[x][65]);\n orbit[x][58] = (f_58 - 4 * orbit[x][72] - 2 * orbit[x][71] - 1 * orbit[x][67]);\n orbit[x][57] = (f_57 - 12 * orbit[x][72] - 4 * orbit[x][71] - 3 * orbit[x][70] - 1 * orbit[x][67] - 2 * orbit[x][66]);\n orbit[x][56] = (f_56 - 2 * orbit[x][65]) / 3;\n orbit[x][55] = (f_55 - 2 * orbit[x][71] - 2 * orbit[x][67]) / 3;\n orbit[x][54] = (f_54 - 3 * orbit[x][70] - 1 * orbit[x][66] - 2 * orbit[x][65]) / 2;\n orbit[x][53] = (f_53 - 2 * orbit[x][68] - 2 * orbit[x][64] - 2 * orbit[x][63]);\n orbit[x][52] = (f_52 - 2 * orbit[x][66] - 2 * orbit[x][64] - 1 * orbit[x][59]) / 2;\n orbit[x][51] = (f_51 - 2 * orbit[x][68] - 2 * orbit[x][63] - 4 * orbit[x][62]);\n orbit[x][50] = (f_50 - 1 * orbit[x][68] - 2 * orbit[x][63]) / 3;\n orbit[x][49] = (f_49 - 1 * orbit[x][68] - 1 * orbit[x][64] - 2 * orbit[x][62]) / 2;\n orbit[x][48] = (f_48 - 4 * orbit[x][71] - 8 * orbit[x][69] - 2 * orbit[x][68] - 2 * orbit[x][67] - 2 * orbit[x][64] - 2 * orbit[x][61] - 1 * orbit[x][60]);\n orbit[x][47] = (f_47 - 3 * orbit[x][70] - 2 * orbit[x][68] - 1 * orbit[x][66] - 1 * orbit[x][63] - 1 * orbit[x][60]);\n orbit[x][46] = (f_46 - 3 * orbit[x][70] - 2 * orbit[x][68] - 2 * orbit[x][65] - 1 * orbit[x][63] - 1 * orbit[x][59]);\n orbit[x][45] = (f_45 - 2 * orbit[x][65] - 2 * orbit[x][62] - 3 * orbit[x][56]);\n orbit[x][44] = (f_44 - 1 * orbit[x][67] - 2 * orbit[x][61]) / 4;\n orbit[x][43] = (f_43 - 2 * orbit[x][66] - 1 * orbit[x][60] - 1 * orbit[x][59]) / 2;\n orbit[x][42] = (f_42 - 2 * orbit[x][71] - 4 * orbit[x][69] - 2 * orbit[x][67] - 2 * orbit[x][61] - 3 * orbit[x][55]);\n orbit[x][41] = (f_41 - 2 * orbit[x][71] - 1 * orbit[x][68] - 2 * orbit[x][67] - 1 * orbit[x][60] - 3 * orbit[x][55]);\n orbit[x][40] = (f_40 - 6 * orbit[x][70] - 2 * orbit[x][68] - 2 * orbit[x][66] - 4 * orbit[x][65] - 1 * orbit[x][60] - 1 * orbit[x][59] - 4 * orbit[x][54]);\n orbit[x][39] = (f_39 - 4 * orbit[x][65] - 1 * orbit[x][59] - 6 * orbit[x][56]) / 2;\n orbit[x][38] = (f_38 - 1 * orbit[x][68] - 1 * orbit[x][64] - 2 * orbit[x][63] - 1 * orbit[x][53] - 3 * orbit[x][50]);\n orbit[x][37] = (f_37 - 2 * orbit[x][68] - 2 * orbit[x][64] - 2 * orbit[x][63] - 4 * orbit[x][62] - 1 * orbit[x][53] - 1 * orbit[x][51] - 4 * orbit[x][49]);\n orbit[x][36] = (f_36 - 1 * orbit[x][68] - 2 * orbit[x][63] - 2 * orbit[x][62] - 1 * orbit[x][51] - 3 * orbit[x][50]);\n orbit[x][35] = (f_35 - 1 * orbit[x][59] - 2 * orbit[x][52] - 2 * orbit[x][45]) / 2;\n orbit[x][34] = (f_34 - 1 * orbit[x][59] - 2 * orbit[x][52] - 1 * orbit[x][51]) / 2;\n orbit[x][33] = (f_33 - 1 * orbit[x][67] - 2 * orbit[x][61] - 3 * orbit[x][58] - 4 * orbit[x][44] - 2 * orbit[x][42]) / 2;\n orbit[x][32] = (f_32 - 2 * orbit[x][66] - 1 * orbit[x][60] - 1 * orbit[x][59] - 2 * orbit[x][57] - 2 * orbit[x][43] - 2 * orbit[x][41] - 1 * orbit[x][40]) / 2;\n orbit[x][31] = (f_31 - 2 * orbit[x][65] - 1 * orbit[x][59] - 3 * orbit[x][56] - 1 * orbit[x][43] - 2 * orbit[x][39]);\n orbit[x][30] = (f_30 - 1 * orbit[x][67] - 1 * orbit[x][63] - 2 * orbit[x][61] - 1 * orbit[x][53] - 4 * orbit[x][44]);\n orbit[x][29] = (f_29 - 2 * orbit[x][66] - 2 * orbit[x][64] - 1 * orbit[x][60] - 1 * orbit[x][59] - 1 * orbit[x][53] - 2 * orbit[x][52] - 2 * orbit[x][43]);\n orbit[x][28] = (f_28 - 2 * orbit[x][65] - 2 * orbit[x][62] - 1 * orbit[x][59] - 1 * orbit[x][51] - 1 * orbit[x][43]);\n orbit[x][27] = (f_27 - 1 * orbit[x][59] - 1 * orbit[x][51] - 2 * orbit[x][45]) / 2;\n orbit[x][26] = (f_26 - 2 * orbit[x][67] - 2 * orbit[x][63] - 2 * orbit[x][61] - 6 * orbit[x][58] - 1 * orbit[x][53] - 2 * orbit[x][47] - 2 * orbit[x][42]);\n orbit[x][25] = (f_25 - 2 * orbit[x][66] - 2 * orbit[x][64] - 1 * orbit[x][59] - 2 * orbit[x][57] - 2 * orbit[x][52] - 1 * orbit[x][48] - 1 * orbit[x][40]) / 2;\n orbit[x][24] = (f_24 - 4 * orbit[x][65] - 4 * orbit[x][62] - 1 * orbit[x][59] - 6 * orbit[x][56] - 1 * orbit[x][51] - 2 * orbit[x][45] - 2 * orbit[x][39]);\n orbit[x][23] = (f_23 - 1 * orbit[x][55] - 1 * orbit[x][42] - 2 * orbit[x][33]) / 4;\n orbit[x][22] = (f_22 - 2 * orbit[x][54] - 1 * orbit[x][40] - 1 * orbit[x][39] - 1 * orbit[x][32] - 2 * orbit[x][31]) / 3;\n orbit[x][21] = (f_21 - 3 * orbit[x][55] - 3 * orbit[x][50] - 2 * orbit[x][42] - 2 * orbit[x][38] - 2 * orbit[x][33]);\n orbit[x][20] = (f_20 - 2 * orbit[x][54] - 2 * orbit[x][49] - 1 * orbit[x][40] - 1 * orbit[x][37] - 1 * orbit[x][32]);\n orbit[x][19] = (f_19 - 4 * orbit[x][54] - 4 * orbit[x][49] - 1 * orbit[x][40] - 2 * orbit[x][39] - 1 * orbit[x][37] - 2 * orbit[x][35] - 2 * orbit[x][31]);\n orbit[x][18] = (f_18 - 1 * orbit[x][59] - 1 * orbit[x][51] - 2 * orbit[x][46] - 2 * orbit[x][45] - 2 * orbit[x][36] - 2 * orbit[x][27] - 1 * orbit[x][24]) / 2;\n orbit[x][17] = (f_17 - 1 * orbit[x][60] - 1 * orbit[x][53] - 1 * orbit[x][51] - 1 * orbit[x][48] - 1 * orbit[x][37] - 2 * orbit[x][34] - 2 * orbit[x][30]) / 2;\n orbit[x][16] = (f_16 - 1 * orbit[x][59] - 2 * orbit[x][52] - 1 * orbit[x][51] - 2 * orbit[x][46] - 2 * orbit[x][36] - 2 * orbit[x][34] - 1 * orbit[x][29]);\n orbit[x][15] = (f_15 - 1 * orbit[x][59] - 2 * orbit[x][52] - 1 * orbit[x][51] - 2 * orbit[x][45] - 2 * orbit[x][35] - 2 * orbit[x][34] - 2 * orbit[x][27]);\n }\n\n return orbit;\n }",
"public Integer numUnknownVerts()\n\t{\n\t\tif (total_verts == null) return null;\n\t\treturn total_verts - nodes.size();\n\t}",
"@Override\n public long numParams(boolean backwards) {\n long numParams = super.numParams(backwards);\n for (GraphVertex vertex : getVertices()) {\n numParams += vertex.numParams();\n }\n return numParams;\n }",
"@Test\n public void testCount() {\n System.out.println(\"**** count *****\");\n ConnectedComponentsDepthSearch instance = new ConnectedComponentsDepthSearch(g);\n int expResult = 3;\n int result = instance.count();\n assertEquals(expResult, result);\n }",
"int getBlockLocationsCount();",
"@Override\r\n\tpublic void iterateCount() {\n\t\t\r\n\t}",
"int getPropsCount();",
"int getPeerCount();",
"Iterable<Long> vertices() {\n //YOUR CODE HERE, this currently returns only an empty list.\n return world.keySet();\n }",
"int getPartsCount();",
"int getPartsCount();",
"int getIdsCount();",
"int getNodesCount();",
"int getNodesCount();",
"int getIndexEndpointsCount();",
"public int getNormalVerticesCount() {\n\t\treturn this.normalVertices.size();\n\t}",
"int nodeCount();",
"public int contract(ArrayList<VertexEntry> graph){\n\t setup(graph);\t\n\n\t\twhile (keyPool.size() > 2) {\n int[] randEdge = getRandomEdge();\n\t\t\tmerge(randEdge[0], randEdge[1]);\n\t\t}\n\t\treturn id[keyPool.get(0)].getAdjList().size();\n\t}",
"@Override\r\n\tpublic int getOrder() {\r\n\t\treturn vertices.size();\r\n\t}",
"private List<Integer> vertices(int num) {\n List<Integer> list = new LinkedList<>();\n for (int i = 0; i < num; i++) {\n list.add(i);\n }\n return list;\n }",
"public int inDegree(int vertex) {\r\n int count = 0;\r\n for (LinkedList<Edge> adjList : myAdjLists) {\r\n \tLinkedList<Edge> testList = adjList;\r\n int counter = 0;\r\n while (counter < testList.size()) {\r\n \tif (testList.get(counter).myTo == vertex) {\r\n \t\tcount++;\r\n \t}\r\n \tcounter++;\r\n }\r\n }\r\n return count;\r\n }",
"public int getTriangleCount();",
"public static int count() {\n return segmentList.size();\n }",
"int getBlockNumbersCount();",
"int countComponents() throws Exception;",
"int getFeaturesCount();",
"int getListCount();",
"public int size() { return count; }",
"public int edgeCount() {\n\treturn edgeList.size();\n }",
"@Override\n public int size() {\n return count;\n }",
"@Override\n public int size() {\n return count;\n }",
"int findAllCount() ;",
"int getPropertiesCount();",
"public void addVertices(int num){ \n this.nrVertices += num;\n }",
"@Override\n\tpublic int graphOrder() {\n\t\treturn vertices.size();\n\t}",
"int getXYPairCount();",
"public int order()\n {\n return numVertices;\n }",
"int countFeatures();",
"int countFeatures();",
"public int getMaximumVertexCount()\r\n {\r\n return theMaximumVertexCount;\r\n }",
"@Override\r\n\tpublic int size() {\n\t\treturn count;\r\n\t}",
"@DISPID(11) //= 0xb. The runtime will prefer the VTID if present\r\n @VTID(18)\r\n int count();"
] | [
"0.7934871",
"0.7687724",
"0.7666122",
"0.7637522",
"0.7555889",
"0.7542517",
"0.7542517",
"0.72352606",
"0.7181746",
"0.71685874",
"0.7137891",
"0.71272004",
"0.71189016",
"0.7118583",
"0.7100462",
"0.70739067",
"0.70608735",
"0.7013585",
"0.693803",
"0.69044197",
"0.69031537",
"0.68319744",
"0.6822269",
"0.6810413",
"0.6803149",
"0.6795246",
"0.6750087",
"0.66905826",
"0.66581404",
"0.66267276",
"0.6546097",
"0.6439897",
"0.63900673",
"0.6364828",
"0.63627946",
"0.62835085",
"0.6224679",
"0.61569095",
"0.6146328",
"0.6136471",
"0.61172414",
"0.6112107",
"0.6110245",
"0.6107151",
"0.6070001",
"0.6053633",
"0.60451806",
"0.6032036",
"0.6032036",
"0.6023042",
"0.5963569",
"0.5960377",
"0.59454155",
"0.59408844",
"0.5926267",
"0.5882148",
"0.5882148",
"0.58684886",
"0.5865314",
"0.5857972",
"0.5841255",
"0.5836221",
"0.58243895",
"0.58236504",
"0.5816629",
"0.5809753",
"0.58068955",
"0.58042485",
"0.58042485",
"0.57835925",
"0.577896",
"0.577896",
"0.5759088",
"0.5755437",
"0.57471675",
"0.5740107",
"0.5724844",
"0.5723464",
"0.5722678",
"0.5708293",
"0.57036495",
"0.57024467",
"0.56967366",
"0.5690689",
"0.56890434",
"0.5686426",
"0.56781006",
"0.56679034",
"0.56679034",
"0.56607455",
"0.56604016",
"0.56569487",
"0.56448054",
"0.5618372",
"0.56183004",
"0.56158984",
"0.56158984",
"0.56121624",
"0.5608987",
"0.5608424"
] | 0.7148766 | 10 |
IMPORT: none EXPORT: edgeCount (integer) ASSERTION: accessor for global var edgeCount | public int getEdgeCount()
{
return edgeCount;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public long getEdgeCount() { return edgeCount; }",
"int getEdgeCount();",
"public int getEdgeCount() \n {\n return 3;\n }",
"public int edgeCount() {\n\treturn edgeList.size();\n }",
"public int getEdgeCount() {\n return edge_.size();\n }",
"int getNumberOfEdges();",
"public int getEdgeCount() {\n if (edgeBuilder_ == null) {\n return edge_.size();\n } else {\n return edgeBuilder_.getCount();\n }\n }",
"public int getNumberOfEdges();",
"public int numEdges();",
"private int numEdges()\r\n\t{\r\n\t return eSet.size();\r\n\t}",
"public int getLayerCount(int edge) throws EdgeOutOfRangeException\n {\n if (edge==DataDirector.PAGE_EDGE)\n return 0;\n else\n return 1;\n }",
"public int edgeNum() {\r\n return edges.size();\r\n }",
"public int getNumEdges()\n\t{\n\t\t//TODO: Implement this method in WEEK 3\n\t\treturn numEdges;\n\t}",
"public int getNumEdges();",
"public int getNumEdges(){\n return numEdges;\n }",
"public int getEdgeCount(){\r\n HashSet<FlowGraphNode> visited = new HashSet<>();\r\n LinkedList<FlowGraphNode> queue = new LinkedList<>();\r\n queue.add(start);\r\n visited.add(start);\r\n int counter = 0;\r\n while(!queue.isEmpty()){\r\n FlowGraphNode node = queue.pop();\r\n counter += node.outDeg();\r\n for(FlowGraphNode child : node.to){\r\n if(visited.add(child)){\r\n queue.add(child);\r\n }\r\n }\r\n }\r\n return counter;\r\n }",
"public int localEdgeNum() {\r\n return localEdgeCount;\r\n }",
"@Override\n\tpublic int edgeSize() {\n\t\treturn numOfEdges;\n\t}",
"@Override\n public int edgeSize() {\n return this.numOfEdges;\n }",
"int numEdges() {\n\t\treturn num_edges;\n\t}",
"@Override\n public int edgeCount() {\n int count = 0;\n\n for(MyNode n : graphNodes.values()){\n count += n.inDegree();\n }\n\n return count;\n }",
"public int numEdges() {\r\n\t\treturn edges;\r\n\t}",
"@Override\n\tpublic long numEdges() {\n\t\treturn numEdges;\n\t}",
"public int getVertexCount();",
"public int getEdges() {\n return edgesNumber;\n }",
"int getNumberOfVertexes();",
"public int getNumEdges() {\n return num_edges;\n }",
"public int getOriginalEdgeCount() {\r\n return originalEdgeCount;\r\n }",
"public int getNumEdges() {\n\t\treturn edges.size();\n\t}",
"public abstract int getVertexCount();",
"public int getNumEdges() {\n\t\treturn this.actualTotalEdges;\n\t}",
"private static int getNumTotalEdges(){\r\n\t\t//return getMutMap().keySet().size();\r\n\t\treturn numCols+1;\r\n\t}",
"public int size()\n {\n return numEdges;\n }",
"public int numEdges()\r\n {\r\n\tint s = 0;\r\n\tfor (final EdgeTypeHolder eth : ethMap.values())\r\n\t s += eth.numEdges();\r\n\treturn s;\r\n }",
"@DisplayName(\"Get the number of edges that contains the graph and test if it is correct\")\n @Test\n public void testGetNumEdges() {\n Assertions.assertEquals(8, graph.getNumberEdges());\n }",
"public int getEdgeSixe() {\n\t\treturn graph.edgeSet().size();\r\n\t}",
"public Integer numUnknownEdges()\n\t{\n\t\tif (total_edges == null) return null;\n\n\t\tint edges = 0;\n\t\tfor (Node n : nodes.values())\n\t\t{\n\t\t\tedges += n.neighbors.size();\n\t\t}\n\t\t// double-counts edges, so divide\n\t\treturn total_edges - edges / 2;\n\t}",
"double getEdgeWeight();",
"private int size() {\n assert _vertices.size() == _edges.size();\n return _edges.size();\n }",
"public int numEdges() {\n int tot = 0;\n\n ListIterator<EdgeList> curEdge = edgeListVector.listIterator();\n while (curEdge.hasNext()) {\n tot += curEdge.next().size();\n }\n\n return tot;\n }",
"@Override\n\tpublic int graphSize() {\n\t\treturn edges.size();\n\t}",
"int getNodeCount();",
"int getNodeCount();",
"@Test\r\n public void testNumEdges() {\r\n System.out.println(\"numEdges\");\r\n MyDigraph instance = new MyDigraph();\r\n\r\n int expResult = 0;\r\n int result = instance.numEdges();\r\n assertEquals(expResult, result);\r\n\r\n Object v1Element = 1;\r\n Object v2Element = 2;\r\n\r\n Vertex v1 = instance.insertVertex(v1Element);\r\n Vertex v2 = instance.insertVertex(v2Element);\r\n\r\n Object edgeElement = \"A\";\r\n Edge e = instance.insertEdge(v1Element, v2Element, edgeElement);\r\n\r\n expResult = 1;\r\n result = instance.numEdges();\r\n assertEquals(expResult, result);\r\n }",
"public Object getNumberOfConnectedComponents() {\r\n\t\tConnectivityInspector<Country, DefaultEdge> inspector=new ConnectivityInspector<Country, DefaultEdge>(graph);\r\n\t\treturn inspector.connectedSets().size();\r\n\t}",
"public long getEdgesArrayLength() {\n\t\treturn edgesLength;\n\t}",
"int getNodesCount();",
"int getNodesCount();",
"public long getVertexCount(){\n return vertexCount;\n }",
"public int getVertexCount() {\n return vertexCount;\n }",
"public int numEdges(String edgeTypeName)\r\n {\r\n\tfinal EdgeTypeHolder eth = ethMap.get(edgeTypeName);\r\n\treturn (eth == null) ? 0 : eth.numEdges();\r\n }",
"private long nodesLength(Edge[] E) {\n\t\tlong nodesLength = 0;\n\t\tfor (Edge e:E ) {\n\t\t\tif (e.getTo() > nodesLength) nodesLength = e.getTo();\n\t\t\tif (e.getFrom() > nodesLength) nodesLength = e.getFrom();\n\t\t}\n\t\tnodesLength++;\t\n\t\treturn nodesLength;\t\t\n\t}",
"private static int numEdges(Graph g) {\n\tint sum = 0;\n\t\n\tfor(int i =0;i<g.vertices;i++)\n\t{\n\t LinkedList<Integer> temp = null;\n\t if(g.adjacencyList[i]!=null) {\n\t\ttemp = g.adjacencyList[i];\n\t\tfor(int tmp:temp) {\n\t\t sum++;\n\t\t}\n\t\t\n\t }\n\t}\n\treturn sum/2;\n }",
"private int nonDirectionalEdgesNumber() {\n return selectedNonDirectionalEdges.size();\n }",
"public int getEdgeCount(boolean biDirectional) {\n int count=0;\n for(T v: map.keySet()) {\n count += map.get(v).size();\n }\n\n if(biDirectional) count = count/2;\n\n return count;\n }",
"public int getWeight()\r\n\t{\r\n\t\treturn edgeWeight;\t\t\r\n\t}",
"int nodeCount();",
"public int getWeight(){\n\t\treturn this.edgeWeight;\n\t}",
"public int getVertexCount() {\n\t\treturn vertexCount;\n\t}",
"public int getNumberOfVertices();",
"public int getRiversAlongEdges() {\n return riversAlongEdges;\n }",
"private int createEdges() {\n\t\t// Use random numbers to generate random number of edges for each vertex\n\t\tint avgNumEdgesPerVertex = this.desiredTotalEdges / this.vertices.size();\n\t\tint countSuccessfulEdges = 0;\n\t\t// In order to determine the number of edges to create for each vertex\n\t\t// get a random number between 0 and 2 times the avgNumEdgesPerVertex\n\t\t// then add neighbors (edges are represented by the number of neighbors each\n\t\t// vertex has)\n\t\tfor (int i = 0; i < this.vertices.size(); i++) {\n\t\t\tfor (int j = 0; j <= (this.randomGen(avgNumEdgesPerVertex * 50) + 1); j++) {\n\t\t\t\t// select a random vertex from this.vertices (vertex list) and add as neighbor\n\t\t\t\t// ensure we don't add a vertex as a neighbor of itself\n\t\t\t\tint neighbor = this.randomGen(this.vertices.size());\n\t\t\t\tif (neighbor != i)\n\t\t\t\t\tif (this.vertices.get(i).addNeighbor(this.vertices.get(neighbor))) {\n\t\t\t\t\t\tthis.vertices.get(neighbor).addNeighbor(this.vertices.get(i));\n\t\t\t\t\t\tcountSuccessfulEdges++;\n\t\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\t\treturn countSuccessfulEdges;\n\t}",
"public int getNodeCount() {\n return nodeCount;\n }",
"int nbNode() {\n switch (type) {\n\n case EDGE:\n case PATH:\n case EVAL:\n if (edge.getEdgeVariable() == null) {\n return edge.nbNode();\n } else {\n return edge.nbNode() + 1;\n }\n\n case OPT_BIND:\n return size();\n }\n\n return 0;\n }",
"public int getVertexCount()\n\t{\n\t\tint count = 0;\n\t\tIterator<DSAGraphVertex> itr = vertices.iterator();\n\t\twhile(itr.hasNext())\n\t\t{\n\t\t\tcount++;\n\t\t\titr.next();\n\t\t}\n\t\treturn count;\n\t}",
"@Override\n public int nodeCount() {\n return graphNodes.size();\n }",
"public int getVertexSize() {\n\t\treturn graph.vertexSet().size();\r\n\t}",
"public double getEdge()\n {\n return this.edge;\n }",
"public abstract int getNumberOfVertices();",
"public int getNumVertices();",
"int getPeerCount();",
"public int getMaximumVertexCount()\r\n {\r\n return theMaximumVertexCount;\r\n }",
"public int numVertices();",
"public int numVertices();",
"public int my_node_count();",
"public int countPrimaryEdges() {\n\t\t\tint count = 0;\n\t\t\tArrayNode node = this;\n\t\t\twhile (node.mPrimaryEdge != null) {\n\t\t\t\tnode = node.mPrimaryEdge;\n\t\t\t\tcount++;\n\t\t\t}\n\t\t\treturn count;\n\t\t}",
"public native int getVertexCount(GPolyline self)/*-{\r\n\t\treturn self.getVertexCount();\r\n\t}-*/;",
"@Override\n public double getEdgeWeight() {\n return edgeWeight;\n }",
"int NoOfNodes() {\r\n return noOfNodes;\r\n }",
"public int nodeCount(){\r\n\t\treturn size;\r\n\t}",
"public int getVertexCount() {\n\t\treturn this._vertices.size();\n\t}",
"public int getEdgeExtent(int edge) throws EdgeOutOfRangeException {\n switch (edge) {\n case DataDirector.COLUMN_EDGE:\n return columnCount;\n case DataDirector.ROW_EDGE:\n return rowCount;\n default:\n return pageCount;\n }\n }",
"public int getVertexCount() {\n return map.keySet().size();\n }",
"private int populateEdges(List<Graph.Edge> edges) {\n expand(source, null);\n graph.enableGraphVertices();\n int weight = 0;\n for (Graph.Vertex v : graph) {\n\n Graph.Edge edge = ((XGraph.XVertex) v).stEdge;\n if (edge != null) {\n weight += edge.getWeight();\n }\n edges.add(edge);\n }\n return weight;\n }",
"public int totalNumNodes () { throw new RuntimeException(); }",
"public int getSliceMemberCount(int edge, int slice) throws EdgeOutOfRangeException, SliceOutOfRangeException {\n if (edge==DataDirector.PAGE_EDGE)\n return 0;\n else\n return 1;\n }",
"public int getNodeCount(){\r\n HashSet<FlowGraphNode> visited = new HashSet<>();\r\n LinkedList<FlowGraphNode> queue = new LinkedList<>();\r\n queue.add(start);\r\n visited.add(start);\r\n while(!queue.isEmpty()){\r\n FlowGraphNode node = queue.pop();\r\n for(FlowGraphNode child : node.to){\r\n if(visited.add(child)){\r\n queue.add(child);\r\n }\r\n }\r\n }\r\n return visited.size();\r\n }",
"public int getNodeCount() {\n return node_.size();\n }",
"public int getNumVertices()\n\t{\n\t\t//TODO: Implement this method in WEEK 3\n\t\treturn numVertices;\n\t}",
"public int getNumVertices(){\n return numVertices;\n }",
"public int capacity(Edge e) {\n\t\tif(mcg!=null)\n\t\t{\n\t\t\treturn mcg.capacity(e);\n\t\t}\n\t\treturn 0;\n\t}",
"public double getEdgeCapacity() {\r\n\t\treturn this.capacity;\r\n\t}",
"private int visitedNetworksCount() {\n final HashSet<String> visitedNetworksSet = new HashSet<>(mVisitedNetworks);\n return visitedNetworksSet.size();\n }",
"int getInCount();",
"public int getVertexCount() {\n if (hasIndices())\n return indices.length;\n if (hasVertices())\n return vertices.length / 3;\n logger.warn(\"No indices or vertices set, vertex count returning 0!\");\n return 0;\n }",
"@Test\n public void testCount() {\n System.out.println(\"**** count *****\");\n ConnectedComponentsDepthSearch instance = new ConnectedComponentsDepthSearch(g);\n int expResult = 3;\n int result = instance.count();\n assertEquals(expResult, result);\n }",
"int getBlockNumbersCount();",
"public java.lang.Integer getEdgeType() {\n return edgeType;\n }",
"int getIndexEndpointsCount();",
"public int getMemberDepth(int edge, int layer, int slice) throws EdgeOutOfRangeException, LayerOutOfRangeException, SliceOutOfRangeException\n {\n return 1;\n }"
] | [
"0.84949607",
"0.84844345",
"0.7888447",
"0.78075045",
"0.7771409",
"0.7654481",
"0.7627893",
"0.75601614",
"0.7462938",
"0.72750396",
"0.72646254",
"0.72500837",
"0.72496736",
"0.7221064",
"0.72059804",
"0.7198167",
"0.71708226",
"0.71317685",
"0.7126031",
"0.71161515",
"0.70985776",
"0.7084863",
"0.7029877",
"0.7012872",
"0.70076406",
"0.6992918",
"0.6954217",
"0.6939725",
"0.6909073",
"0.69040805",
"0.68887377",
"0.6875815",
"0.687328",
"0.6855255",
"0.67620933",
"0.6707509",
"0.6674609",
"0.66715115",
"0.6602563",
"0.6574406",
"0.65742576",
"0.6568294",
"0.6568294",
"0.65514535",
"0.6541327",
"0.65317255",
"0.6518955",
"0.6518955",
"0.6518443",
"0.6483165",
"0.64195776",
"0.63765424",
"0.6366361",
"0.63546425",
"0.6329596",
"0.62815446",
"0.62761056",
"0.6269224",
"0.6253265",
"0.6233166",
"0.6229958",
"0.6224191",
"0.6179538",
"0.61733055",
"0.61395955",
"0.60850346",
"0.60642433",
"0.6063988",
"0.6060079",
"0.6057965",
"0.6049264",
"0.60411924",
"0.60223746",
"0.60223746",
"0.5998165",
"0.5986722",
"0.5962105",
"0.59607005",
"0.59528494",
"0.59491265",
"0.5947772",
"0.59275",
"0.5914005",
"0.5903982",
"0.5896103",
"0.58914196",
"0.5890468",
"0.5887226",
"0.5859707",
"0.5858704",
"0.5837244",
"0.5836213",
"0.58053684",
"0.5795637",
"0.57820827",
"0.57777286",
"0.5768705",
"0.5755294",
"0.57395214",
"0.57350564"
] | 0.8033759 | 2 |
IMPORT: none EXPORT: none ASSERTION: Display vertices list | public void displayAsList()
{
System.out.println("Printing all vertices");
vertices.show();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"List<V> getVertexList();",
"public java.util.List<V> getVertices();",
"public List<wVertex> getVertices(){\r\n return vertices;\r\n }",
"public Enumeration vertices();",
"public void printVertices() {\r\n\t\tfor (int i = 0; i < vertices.size(); i++)\r\n\t\t\tSystem.out.print(vertices.get(i).label);\r\n\t}",
"public Collection<V> getVertices();",
"int getVertices();",
"Iterable<Long> vertices() {\n //YOUR CODE HERE, this currently returns only an empty list.\n return world.keySet();\n }",
"public Set<V> getVertices();",
"public Set<V> getVertices();",
"Set<Vertex> getVertices();",
"public List<Vertex> vertices() {\n return Collections.unmodifiableList(this.vertices);\n }",
"public String vertexName();",
"public int getVertices() {\n return verticesNumber;\n }",
"public Collection< VDataT > vertexData();",
"private static ImmutableList<WorldCoord> generateVertexList()\r\n {\n\t return ShapeReader.getWorldCoordsFromResource(RESOURCE);\r\n }",
"void getVertices() {\r\n\t\tSystem.out.println(\"Enter your vertices:\");\r\n\t\tarrIndexToVertexMap = new HashMap<>();\r\n\t\ttry {\r\n\t\t\tfor (int i = 0; i < numberOfVertices; i++) {\r\n\t\t\t\tarrIndexToVertexMap.put(i, sc.next());\r\n\t\t\t}\r\n\t\t\tsc.close();\r\n\t\t} catch (RuntimeException re) {\r\n\t\t\tSystem.out.println(\"Error at method:: getVertices || Description:\" + re);\r\n\t\t}\r\n\t}",
"@Override\r\n\tpublic int getOrder() {\r\n\t\treturn vertices.size();\r\n\t}",
"@Test\n\tpublic void verticesTest() {\n\t\tgraph.addVertex(A);\n\t\tgraph.addVertex(B);\n\t\tgraph.addVertex(C);\n\t\tgraph.addVertex(D);\n\t\tassertEquals(4, graph.vertices().size());\n\t\tassertTrue(graph.vertices().contains(A));\n\t\tassertTrue(graph.vertices().contains(D));\n\t}",
"public ArrayList<Triangle> getOccluderVertexData();",
"@Override\r\n public Iterable<V> vertices() {\r\n LinkedList<V> list = new LinkedList<>();\r\n for(V v : map.keySet())\r\n list.add(v);\r\n return list;\r\n }",
"public float[] getVertices() {\r\n\t\treturn vertices;\r\n\t}",
"@Override\r\n\tpublic ArrayList<E> getVertices() {\r\n\t\tArrayList<E> verts = new ArrayList<>();\r\n\t\tvertices.forEach((E t, Vertex<E> u) -> {\r\n\t\t\tverts.add(t);\r\n\t\t});\r\n\t\treturn verts;\r\n\t}",
"public String toString(){\r\n String result = \"[ \";\r\n result = result + vertex + \" ]\";\r\n return result;\r\n }",
"@Override public Set<L> vertices() {\r\n return new HashSet<L>(vertices);//防御式拷贝\r\n }",
"private List<Integer> vertices(int num) {\n List<Integer> list = new LinkedList<>();\n for (int i = 0; i < num; i++) {\n list.add(i);\n }\n return list;\n }",
"@Override\n public VertexCollection getVertexCollection() {\n return this.vertices.copy();\n }",
"public Set<String> getVertices() {\n\t\treturn vertices;\n\t}",
"public int numVertices() { return numV; }",
"private String vertexNamesAndCoordsToString() {\n \n //make empty string\n String s = \"\";\n \n //add # of vertices & line break\n s += N + \"\\n\";\n \n //for loop to add names/coords to it\n for (int i = 0; i < arrayOfVertices.length; i++) {\n \n //add vertex name, xcoord, & ycoord separated by spaces \n s += arrayOfVertices[i].getName() + \" \" \n + arrayOfVertices[i].getX() + \" \" \n + arrayOfVertices[i].getY() + \"\\n\"; \n \n }\n \n //return the string\n return s;\n \n }",
"public String toString(){\n\t\treturn vertex.toString();\n\t}",
"public Vertex[] getVertices() {\n return arrayOfVertices;\n }",
"@Override\n\tpublic List<Location> getVertices() {\n\t\treturn locations;\n\t}",
"@Override\r\n public List<Vertex> getVertices() {\r\n List<Vertex> verticesList = new LinkedList<>(adjacencyList.keySet()); //getting the key set of adjacencyList i.e, a list of all vertices\r\n Collections.sort(verticesList, Comparator.comparing(Vertex::getLabel));\r\n return verticesList;\r\n }",
"public HashMap<Integer, Vertex> getVertices() {\n\t\treturn vertices;\n\t}",
"public List<Vertex> findAllVertices() throws SQLException {\n\t\treturn rDb.findAllVertices();\n\t}",
"@Override\r\n public int size() {\r\n return vertices.size();\r\n }",
"public Vector3f[] getVertices() {\n return vertices;\n }",
"Iterable<Long> vertices() {\n return nodes.keySet();\n }",
"public String toString()\n\t{\n\t \n\t\tString str = vertexName + \": \" ;\n\t\tfor(int i = 0 ; i < adjacencyList.size(); i++)\n\t\t\tstr = str + adjacencyList.get(i).vertexName + \" \";\n\t\treturn str ;\n\t\t\n\t}",
"public E[] verticesView ()\n {\n E[] allVertices = (E[]) new Object[lastIndex + 1];\n for (int index = 0; index < allVertices.length; index++)\n allVertices[index] = this.vertices[index];\n\n return allVertices;\n }",
"public float[] getVertices() {\n/* 793 */ COSBase base = getCOSObject().getDictionaryObject(COSName.VERTICES);\n/* 794 */ if (base instanceof COSArray)\n/* */ {\n/* 796 */ return ((COSArray)base).toFloatArray();\n/* */ }\n/* 798 */ return null;\n/* */ }",
"private void addVerticesToGraph()\n\t{\n\t\tString vertexName;\n\n\t\tMap<Long, IOFSwitch> switches = this.floodlightProvider.getSwitches();\n\t\tfor(IOFSwitch s :switches.values())\n\t\t{\n\t\t\tvertexName =Long.toString(s.getId());\n\t\t\tm_graph.addVertex(vertexName);\t\t\t \t\t\t \n\t\t}\n\t\tSystem.out.println(m_graph);\n\t}",
"public void addVertex();",
"Iterable<Long> vertices() {\n //YOUR CODE HERE, this currently returns only an empty list.\n ArrayList<Long> verticesIter = new ArrayList<>();\n verticesIter.addAll(adj.keySet());\n return verticesIter;\n }",
"public int getVertexCount();",
"public int getNumberOfVertices();",
"public Set<String> getVertices()\r\n\t{\r\n\t\treturn this.dataMap.keySet();\r\n\t}",
"public void printAdjacencyList() {\n \n for ( int i=0; i<vertex_adjacency_list.size(); i++ ) {\n \n vertex_adjacency_list.get( i ).printVertex();\n \n }\n \n }",
"public void printVertices(PrintWriter os) {\n\n\n // Implement me!\n String s = \"\";\n for (String k : vertices.keySet()) {\n s = s + k + \" \";\n }\n os.println(s);\n\n\n }",
"public List<Vertex> getVertices() {\n\t\treturn AdjacencyMatrixGraph.cloneList(vertexList);\n\t}",
"public int numVertices();",
"public int numVertices();",
"public void setVertices(){\n\t\tvertices = new ArrayList<V>();\n\t\tfor (E e : edges){\n\t\t\tV v1 = e.getOrigin();\n\t\t\tV v2 = e.getDestination();\n\t\t\tif (!vertices.contains(v1))\n\t\t\t\tvertices.add(v1);\n\t\t\tif (!vertices.contains(v2))\n\t\t\t\tvertices.add(v2);\n\t\t}\n\t}",
"public int getNumVertices();",
"int getNumberOfVertexes();",
"protected LinkedList<Vertex> getVertexList() {\n\t\tLinkedList<Vertex> returnList = new LinkedList<Vertex>();\n\n\t\t// Add family\n\t\tif (this.getFamily() != null) {\n\t\t\treturnList = this.getFamily().getFamilyVertexList();\n\t\t}\n\t\treturnList.add(this);\n\t\treturn returnList;\n\t}",
"public void display() {\r\n\t\tArrayList<String> vnames = new ArrayList<>(vces.keySet());\r\n\t\tfor (String vname : vnames) {\r\n\t\t\tString str = vname + \" => \";\r\n\t\t\tVertex vtx = vces.get(vname);\r\n\r\n\t\t\tArrayList<String> nbrnames = new ArrayList<>(vtx.nbrs.keySet());\r\n\t\t\tfor (String nbrname : nbrnames) {\r\n\t\t\t\tstr += nbrname + \"[\" + vtx.nbrs.get(nbrname) + \"], \";\r\n\t\t\t}\r\n\r\n\t\t\tSystem.out.println(str + \".\");\r\n\t\t}\r\n\t}",
"@Override\n public Set<Vertex> getVertices() {\n Set<Vertex> vertices = new HashSet<Vertex>();\n vertices.add(sourceVertex);\n vertices.add(targetVertex);\n return vertices;\n }",
"@Override\n public Iterable<E> getAllVertices() {\n return dictionary.keySet();\n }",
"@Override\n\tpublic int graphOrder() {\n\t\treturn vertices.size();\n\t}",
"public Iterable<Vertex> getVertices() {\n return mVertices.values();\n }",
"public listVertices_args(listVertices_args other) {\n }",
"@Test\n public void getVertexes() {\n\n for (int i = 0; i < 6; i++) {\n\n Vertex temp = new Vertex(i + \"\", \"Location number \" + i);\n assertTrue(temp.equals(testGraph.getVertices ().get(i)));\n\n }\n }",
"public void testVerticesSet() {\n System.out.println(\"verticesSet\");\n\n Assert.assertTrue(generateGraph().verticesSet().size() == 25);\n }",
"public Collection< VKeyT > vertexKeys();",
"public Object getVertex(){\r\n return this.vertex;\r\n }",
"public int getNumVertices(){\n return numVertices;\n }",
"@Test\r\n public void testVertices() {\r\n System.out.println(\"vertices\");\r\n MyDigraph instance = new MyDigraph();\r\n\r\n Object v1Element = 1;\r\n Vertex v1 = instance.insertVertex(v1Element);\r\n\r\n Collection colection = instance.vertices();\r\n boolean result = colection.contains(v1);\r\n boolean expectedResult = true;\r\n assertEquals(expectedResult, result);\r\n\r\n instance.removeVertex(v1);\r\n result = colection.contains(v1);\r\n expectedResult = false;\r\n assertEquals(expectedResult, result);\r\n }",
"public int getNumVertices()\n\t{\n\t\t//TODO: Implement this method in WEEK 3\n\t\treturn numVertices;\n\t}",
"void setVertices(int vertices);",
"public Collection<Vertex> vertices() { \n //return myGraph.keySet(); OLD\n //create a copy of all the vertices in the map to restrict any reference\n //to the interals of this class\n Collection<Vertex> copyOfVertices = new ArrayList<Vertex>();\n copyOfVertices.addAll(myGraph.keySet());\n return copyOfVertices;\n }",
"Vertex getVertex();",
"public Vertex[] getVertices() {\n\t\treturn this._vertices.toArray(new Vertex[0]);\n\t}",
"public Collection<V> getOtherVertices(V v);",
"public int getNumVertices() {\n return num_vertices;\n }",
"public Vector[] getVerts() {\n\t\treturn this.verts;\n\t}",
"public Vertex[] getVertices() {\n return new Vertex[]{v1, v2};\n }",
"public Collection<GJPoint2D> vertices() {\n\t\tArrayList<GJPoint2D> vertices = new ArrayList<GJPoint2D>(this.segments.size());\n\t\t\n\t\t// iterate on segments, and add the control points of each segment\n\t\tfor (Segment seg : this.segments) {\n\t\t\tfor (GJPoint2D p : seg.controlPoints()) {\n\t\t\t\tvertices.add(p);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// return the set of vertices\n\t\treturn vertices;\n\t}",
"public String toString() {\n StringBuilder s = new StringBuilder();\n String NEWLINE = System.getProperty(\"line.separator\");\n s.append(vertices + \" \" + NEWLINE);\n for (int v = 0; v < vertices; v++) {\n s.append(String.format(\"%d: \", v));\n for (Map.Entry<Integer, Integer> e : adjacent(v).entrySet()) {\n s.append(String.format(\"%d (%d) \", e.getKey(), e.getValue()));\n }\n s.append(NEWLINE);\n }\n return s.toString();\n }",
"public void inAdjacentVertices() {\r\n\t\tfor (int i = 0; i < currentVertex.inList.size(); i++) {\r\n\t\t\tSystem.out.print(currentVertex.inList.get(i).vertex.label + \" \");\r\n\t\t}\r\n\t\tprintLine();\r\n\t}",
"Vertex(){}",
"Iterator<Vertex<V, E, M>> getVertices() {\n return this.vertices.values().iterator();\n }",
"public abstract Vector2[] getVertices();",
"public String getVertexName()\n\t{\n\t\treturn vertexName ;\n\t}",
"List<V> getAdjacentVertexList(V v);",
"@Override\n\tpublic String toString() {\n\t\treturn \"(Triangle \"+verts+\")\" ;\n\t}",
"public abstract int getNumberOfVertices();",
"public int getNumVertices() {\n\t\treturn vertices.size();\n\t}",
"public Set<Integer> getVertexKeys() {\n\t\treturn vertices.keySet();\n\t}",
"public int size() {\n\t\treturn vertices.size();\n\t}",
"@Override\r\n\tpublic Vector2f[] getVertices() {\n\t\treturn null;\r\n\t}",
"public abstract int getVertexCount();",
"public ArrayList< Vertex > adjacentVertices( ) {\n return adjacentVertices;\n }",
"public static ArrayList<Vertex> initializeGraph() {\n\t\tVertex uVertex = new Vertex('u');\n\t\tVertex vVertex = new Vertex('v');\n\t\tVertex wVertex = new Vertex('w');\n\t\tVertex xVertex = new Vertex('x');\n\t\tVertex yVertex = new Vertex('y');\n\t\tVertex zVertex = new Vertex('z');\n\t\t\n\t\tVertex[] uAdjacencyList = {xVertex, vVertex};\n\t\tuVertex.setAdjacencyList(createArrayList( uAdjacencyList ));\n\t\t\n\t\tVertex[] vAdjacencyList = {yVertex};\n\t\tvVertex.setAdjacencyList(createArrayList( vAdjacencyList ));\n\t\t\n\t\tVertex[] wAdjacencyList = {zVertex, yVertex};\n\t\twVertex.setAdjacencyList(createArrayList( wAdjacencyList ));\n\t\t\n\t\tVertex[] xAdjacencyList = {vVertex};\n\t\txVertex.setAdjacencyList(createArrayList( xAdjacencyList ));\n\t\t\n\t\tVertex[] yAdjacencyList = {xVertex};\n\t\tyVertex.setAdjacencyList(createArrayList( yAdjacencyList ));\n\t\t\n\t\tVertex[] zAdjacencyList = {zVertex};\n\t\tzVertex.setAdjacencyList(createArrayList( zAdjacencyList ));\n\n\t\tVertex[] graph = { uVertex, vVertex, wVertex, xVertex, yVertex, zVertex};\n\t\treturn createArrayList( graph );\n\n\t}",
"public abstract void updateVertices();",
"boolean hasIsVertexOf();",
"Stream<BaseVertex> vertices(String datasource);",
"boolean ignoreExistingVertices();",
"public void addVertex (){\t\t \n\t\tthis.graph.insert( new MyList<Integer>() );\n\t}"
] | [
"0.7494333",
"0.720641",
"0.699218",
"0.69755286",
"0.69355685",
"0.69214606",
"0.68629664",
"0.682816",
"0.6709331",
"0.6709331",
"0.6642916",
"0.6641221",
"0.65413356",
"0.6499675",
"0.6496907",
"0.6483281",
"0.6473903",
"0.6464069",
"0.64531106",
"0.6440471",
"0.6415114",
"0.64090425",
"0.63819116",
"0.6364683",
"0.63618714",
"0.6358032",
"0.6347211",
"0.634341",
"0.63388973",
"0.6338744",
"0.63257134",
"0.63014877",
"0.6296209",
"0.6272132",
"0.62699383",
"0.62555724",
"0.62391055",
"0.62255394",
"0.62200564",
"0.6218007",
"0.6202739",
"0.6199269",
"0.61974233",
"0.6195514",
"0.6169914",
"0.6158703",
"0.61448354",
"0.6144254",
"0.6067822",
"0.60671717",
"0.60645455",
"0.6063238",
"0.6063238",
"0.6058075",
"0.605778",
"0.60516876",
"0.6051254",
"0.60474837",
"0.6042467",
"0.6032571",
"0.6018426",
"0.60165817",
"0.6016206",
"0.6010245",
"0.6008664",
"0.60026616",
"0.59833467",
"0.5937251",
"0.5924566",
"0.59112734",
"0.5910529",
"0.5907771",
"0.5903905",
"0.58920443",
"0.5887175",
"0.5885452",
"0.5870818",
"0.586885",
"0.58654827",
"0.5864575",
"0.58517414",
"0.5851637",
"0.58496016",
"0.58449095",
"0.5831116",
"0.5810991",
"0.58043605",
"0.58034587",
"0.58014286",
"0.57943356",
"0.5773853",
"0.5768714",
"0.576492",
"0.57598114",
"0.57565385",
"0.57523674",
"0.57491666",
"0.5738256",
"0.5737759",
"0.57361114"
] | 0.7853826 | 0 |
has someone visited node? true or false Constructor: IMPORT: none EXPORT: address of new DSAGraphVertex object ASSERTION: Sets label and value from parameters; visited = false is default | public DSAGraphVertex(String inLabel, Object inValue)
{
label = inLabel;
value = inValue;
links = new DSALinkedList();
visited = false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Vertex(int label) {\r\n isVisited = false;\r\n this.label = label;\r\n }",
"public void setVisited(boolean value){this.visited = value;}",
"public void setVisited(Boolean visited) {\n this.visited = visited;\n }",
"public void setVisited(boolean visited) {\n this.visited = visited;\n }",
"public void setNodeVistied(boolean nodeVisit){\r\n\t \tthis.nodeVisited = nodeVisit;\r\n\t }",
"public void setVisited(boolean visited) {\n isVisited = visited;\n }",
"public void setVisited(boolean visited)\n\t{\n\t\tthis.visited = visited;\n\t}",
"public void setVisited(Boolean b){\n visited = b;\n }",
"public void setVisited(boolean visited) {\r\n\t\t\tthis.visited = visited;\r\n\t\t}",
"public void setVisited()\n {\n visited = true;\n }",
"@PortedFrom(file = \"Taxonomy.h\", name = \"setVisited\")\n public void setVisited(TaxonomyVertex node) {\n node.setChecked(visitedLabel);\n }",
"public boolean isVisited(){\n return visited;\n }",
"public boolean getVisited(){return this.visited;}",
"public boolean WasVisited() { return _visited; }",
"public void setVisited(boolean b) {\n\t\t_visited = b;\n\t}",
"public boolean isVisited()\n\t{\n\t\treturn visited;\n\t}",
"public boolean getNodeVisited(){\r\n\t \treturn this.nodeVisited;\r\n\t }",
"public boolean isVisited() {\n return visited;\n }",
"public void visit() {\n visited = true;\n }",
"public boolean isVisited() {\n\t\treturn visited;\n\t}",
"public boolean isVisited() {\n return visited;\n }",
"public boolean isVisited() {\n\t\treturn _visited;\n\t}",
"public boolean isVisited() {\r\n\t\t\treturn this.visited;\r\n\t\t}",
"public void visit() {\n\t\tvisited = true;\n\t}",
"public boolean addVertex(T vertexLabel);",
"public boolean getVisited() {\n return visited;\n }",
"public boolean getVisited()\n {\n return visited;\n }",
"boolean isVisited();",
"boolean isVisited();",
"@Override\r\n\tpublic boolean isVisited() {\n\t\treturn false;\r\n\t}",
"public void setVisited(boolean flag) {\n\t\tvisited = flag;\n\t}",
"public Vertex(T vertexLabel) {\r\n\t\tlabel = vertexLabel;\r\n\t\tedgeList = new LinkedList<Edge>();\r\n\t\tvisited = false;\r\n\t\tpreviousVertex = null;\r\n\t\tcost = 0;\r\n\t}",
"public Vertex(String label, int index){\n this.label = label;\n this.index = index;\n this.previous = null;\n visited = false;\n }",
"boolean hasIsVertexOf();",
"public boolean hasBeenVisited() {\n\t\treturn visited; // Replace with your code\n\t}",
"public boolean hasVertex(String label)\n\t{\n\t\tboolean sucess = false;\n\t\ttry {\n\t\t\tgetVertex(label);\n\t\t\tsucess = true;\n\t\t} catch (NoSuchElementException e) {\n\t\t\tsucess = false;\n\t\t}\n\t\treturn sucess;\n\t}",
"Vertex(){}",
"public boolean isVisitado() {\n return this.isVisited;\n }",
"public boolean isVisited() {\n return isVisited;\n }",
"public boolean isVisited () {\n if (this.equals(SquareType.VISITED))\n return true;\n else\n return false;\n }",
"protected void visit(Graph<VLabel, ELabel>.Vertex v) {\n }",
"public FlowGraph(boolean bool){\r\n start = new FlowGraphNode();\r\n end = new FlowGraphNode();\r\n if(bool){\r\n start.addTo(end);\r\n }\r\n }",
"public void setVisited(int v) {\n visited.set(v, true);\n nodeEnum.add(v);\n }",
"void DFSUtil(int v, boolean visited[]) {\n\t\t\tvisited[v] = true;\n\t\t\tSystem.out.println(v +\" \");\n\t\t\t\n\t\t\t//Recur all the vertices adjacents to this vertex\n\t\t\tIterator<Integer> i = adj[v].listIterator();\n\t\t\twhile(i.hasNext()) {\n\t\t\t\tint node = i.next();\n\t\t\t\tif(!visited[node]) {\n\t\t\t\t\tDFSUtil(node, visited);\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"void changeVisited(){\n\t \t\tthis.isVisited = true;}",
"void DFSUtil(int v, boolean visited[]) {\n // Mark the current node as visited and print it\n visited [v] = true;\n System.out.print(v + \" \");\n\n // Recur for all the vertices adjacent to this vertex\n Iterator<Integer> i = adj [v].listIterator();\n while (i.hasNext()) {\n int n = i.next();\n if (!visited [n])\n DFSUtil(n, visited);\n }\n }",
"private ProjectedVertex() {\n this.valid = false;\n this.edge = null;\n }",
"public Vertex (String name)\n\t{\n\t vertexName = name ;\n\t adjacencyList = new DoublyLinkedList<>();\n\t indegree = 0;\n\t\t\n\t}",
"public boolean addVertex(String label)\n\t{\n\t\tif(!hasVertex(label)) //if edge does not already exist add it\n\t\t{\n\t\t\tDSAGraphVertex v = new DSAGraphVertex(label, null);\n\t\t\tvertices.insertLast(v); //inserts into vertices list at end\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}",
"Vertex(int id, Vertex prev, int costToReach) {\n this.id = id;\n this.prev = prev;\n this.costToReach = costToReach;\n }",
"public Graph(boolean p_isDirectedGraph) {\n\t\tisDirectedGraph = p_isDirectedGraph;\n\t}",
"@Override\n\tpublic boolean isConnected() {\n\t\tif(this.GA.nodeSize() ==1 || this.GA.nodeSize()==0) return true;\n\t\tgraph copied = this.copy();\n\t\ttagZero(copied);\n\t\tCollection<node_data> s = copied.getV();\n\t\tIterator it = s.iterator();\n\t\tnode_data temp = (node_data) it.next();\n\t\tDFSUtil(copied,temp);\n\t\tfor (node_data node : s) {\n\t\t\tif (node.getTag() == 0) return false;\n\t\t}\n\t\ttransPose(copied);\n\t\ttagZero(copied);\n\t Collection<node_data> s1 = copied.getV();\n\t\tIterator it1 = s1.iterator();\n\t\tnode_data temp1 = (node_data) it1.next();\n\t\tDFSUtil(copied,temp1);\n\t\tfor (node_data node1 : s1) {\n\t\t\tif (node1.getTag() == 0) return false;\n\t\t}\n\n\t\treturn true;\n\t}",
"public boolean addVertex(String label, Object value)\n\t{\n\t\tif(!hasVertex(label)) //if edge does not already exist add it\n\t\t{\n\t\t\tDSAGraphVertex v = new DSAGraphVertex(label, value);\n\t\t\tvertices.insertLast(v); //inserts into vertices list at end\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}",
"void DFS(int v, boolean visited[]) {\n visited[v] = true;\n connected++;\n //LinkedList Iterator to Recursively traverse all adjacent nodes of v\n Iterator<Integer> itr = adj[v].listIterator();\n\n while(itr.hasNext()) {\n int x = itr.next();\n if(visited[x] == false)\n DFS(x,visited);\n }\n }",
"public DSAGraphNode(String inLabel, E inValue)\n {\n label = inLabel;\n value = inValue;\n links = new DSALinkedList<DSAGraphNode<E>>();\n visited = false;\n edgeList = new DSALinkedList<DSAGraphEdge<E>>();\n distanceFromSource = Double.MAX_VALUE;\n previous = null;\n }",
"public Vertex(String name){\r\n this.name = name;\r\n }",
"private void visitDFS(Dot node, Set< Dot > visited ) {\n\n board.getNeighbors( node ).forEach( nbr -> {\n if ( !visited.contains( nbr ) ) {\n visited.add( nbr );\n visitDFS( nbr, visited );\n }\n } );\n }",
"public final boolean visited(Node n)\n {\n return colors[n.nodeId()] != Color.white;\n }",
"public Vertex(String aName)\r\n\t\t{\r\n\t\t\tthis.name = aName;\r\n\t\t\tthis.neighbors = new ArrayList<Edge>();\r\n\t\t}",
"void DFSUtil(int v, boolean visited[]) {\n \t// Mark the current node as visited and print it \n visited[v] = true; \n System.out.print(v + \" \"); \n \n for(int w: adj[v]) \n \tif (!visited[w]) { \n \t\tDFSUtil(w, visited);\n \t}\n }",
"boolean addVertex(V v);",
"@DisplayName(\"Has edge\")\n @Test\n public void testHasEdge() {\n boolean directed1 = true;\n graph = new Graph(edges, directed1, 0, 5, GraphType.RANDOM);\n Assertions.assertTrue(graph.hasEdge(new Edge(0, 1)));\n }",
"Vertex createVertex();",
"void visit(Graph.Vertex u, Graph.Vertex v) {\n\t\tDFSVertex bv = getVertex(v);\n\t\tbv.seen = true;\n\t\tbv.parent = u;\n\t\tbv.distance = distance(u) + 1;\n\t}",
"boolean seen(Graph.Vertex u) {\n\t\treturn getVertex(u).seen;\n\t}",
"@Override\n public boolean isConnected() { //i got help from the site https://www.geeksforgeeks.org/shortest-path-unweighted-graph/\n if(this.ga.edgeSize()<this.ga.nodeSize()-1) return false;\n initializeInfo();//initialize all the info fields to be null for the algorithm to work\n if(this.ga.nodeSize()==0||this.ga.nodeSize()==1) return true;//if there is not node or one its connected\n WGraph_DS copy = (WGraph_DS) (copy());//create a copy graph that the algorithm will on it\n LinkedList<node_info> qValues = new LinkedList<>();//create linked list that will storage all nodes that we didn't visit yet\n int firstNodeKey = copy.getV().iterator().next().getKey();//first key for get the first node(its doesnt matter which node\n node_info first = copy.getNode(firstNodeKey);//get the node\n qValues.add(first);//without limiting generality taking the last node added to graph\n int counterVisitedNodes = 0;//counter the times we change info of node to \"visited\"\n while (qValues.size() != 0) {\n node_info current = qValues.removeFirst();\n if (current.getInfo() != null) continue;//if we visit we can skip to the next loop because we have already marked\n current.setInfo(\"visited\");//remark the info\n counterVisitedNodes++;\n\n Collection<node_info> listNeighbors = copy.getV(current.getKey());//create a collection for the neighbors list\n LinkedList<node_info> Neighbors = new LinkedList<>(listNeighbors);//create the neighbors list\n if (Neighbors == null) continue;\n for (node_info n : Neighbors) {\n if (n.getInfo() == null) {//if there is a node we didn't visited it yet, we will insert it to the linkedList\n qValues.add(n);\n }\n }\n }\n if (this.ga.nodeSize() != counterVisitedNodes) return false;//check that we visited all of the nodes\n\n return true;\n }",
"public Graph(){\r\n this.listEdges = new ArrayList<>();\r\n this.listNodes = new ArrayList<>();\r\n this.shown = true;\r\n }",
"public VISNode() {\n this.model = new VISNodeModel();\n }",
"public Vertex(){\n\n }",
"public boolean DFS_Vist(int vertex ,LinkedList <Integer>adjacencyListArray [],int numofCourses){\n color[vertex] =1;\n start[vertex] = ++time;\n // find all the adjacent vertices in the prerequestie array\n LinkedList<Integer> adjacentVertices = adjacencyListArray[vertex];\n for(Integer v : adjacentVertices){\n // if the color of the adjacent vertex is gray that means it is back edge\n // also it means that cycle exists thus no courses can be completed\n if(color[v] == 1){\n return false;\n }\n if(color[v] == 0 && !DFS_Vist(v,adjacencyListArray,numofCourses) ){\n // if the vertex is unexplored explore the vertex\n pred[v] =vertex;\n return false;\n }\n }\n finish[vertex] =++time;\n topologicalSortOrder.add(vertex);\n // since vertex is completely explored and all the adjacent vertices are explored change the color to black\n color[vertex] =2;\n return true;\n }",
"public void retrieveDF(Vertex vert, boolean[] visited)\r\n\t{\r\n\t}",
"public abstract boolean visit(PathVertexVisitor visitor, SymbolProvider symbols);",
"static void dfs(Node current, Set<Node> visited) {\n System.out.print(\"Node \" + current.val + \", \");\n\n // adds the current node to the set of already visited nodes\n visited.add(current);\n\n // loops over the neighbours of the current node\n for (Node neighbour: current.neighbours) {\n\n // if the neighbour has not been already visited\n if (! visited.contains(neighbour)) {\n\n // recursively processes the neighbour\n dfs(neighbour, visited);\n }\n }\n }",
"void DFS() {\n \t\n \t// Mark all the vertices as not visited(set as false by default in java) \n \tboolean visited[] = new boolean[V];\n \t\n \t// Call the recursive helper function to print DFS traversal \n // starting from all vertices one by one \n \tfor (int i=0; i<V; i++) { \n \t\t if (visited[i] == false)\n \t\t\t DFSUtil(i, visited);\n \t}\n }",
"public boolean addVertex(V vertex);",
"public boolean addVertex(V vertex);",
"private boolean DFSUtil(State state, ArrayList<String> visited, int currentDepth) {\n // Mark the current node as visited and print it\n visited.add(state.joinValues());\n\n this.path.push(state);\n\n if (this.problem.goalTest(state)) {\n return true;\n }\n\n // Recur for all the vertices adjacent to this vertex\n // extend the current node\n ListIterator<State> iterator = this.extend(state).listIterator();\n this.incrementExtendedNumber();\n while (iterator.hasNext()) {\n State state1 = iterator.next();\n if (this.limit > currentDepth) {\n if (this.graphSearch && !visited.contains(state1.joinValues())) {\n this.incrementVisitedNumber();\n if (DFSUtil(state1, visited, currentDepth + 1))\n return true;\n else\n this.path.pop();\n } else if (!this.graphSearch) {\n this.incrementVisitedNumber();\n if (DFSUtil(state1, visited, currentDepth + 1))\n return true;\n else\n this.path.pop();\n }\n }\n\n\n this.setMaxMemory(this.path.size());\n }\n return false;\n }",
"public boolean isDirected();",
"public boolean isDirected();",
"public AdjacencyListGraph(boolean isDirected) {\r\n\t\tthis.isDirected = isDirected;\r\n\t\tvertices = new HashMap<>();\r\n\t\tadjacencyLists = new HashMap<>();\r\n\t}",
"public boolean visit( Vertex vertexToVisit ) {\n VisualVertex visualVertex;\n Arc2D arc;\n double annulusWedgeDegree;\n double positionDegree;\n double startAtDegree;\n int depth;\n VertexDegrees degrees = new VertexDegrees();\n VertexDegrees parentDegrees;\n\n this.logCategory.debug( \"Visiting \" + vertexToVisit );\n\n try {\n visualVertex = this.vGraph.getVisualVertex( vertexToVisit );\n depth = this.tree.getDepth( vertexToVisit );\n this.logCategory.debug( \"Depth: \" + depth );\n\n if( this.tree.getRoot() == vertexToVisit ) {\n // For the root of the tree, set the annulus wedge to 360 degrees\n annulusWedgeDegree = 360;\n center = new Point2D.Double( this.tree.getHeight() * this.radius / 2, this.tree.getHeight() * this.radius / 2 );\n this.logCategory.debug( \"Setting center \" + center );\n visualVertex.setLocation( center.getX(), center.getY() );\n degrees.annulusWedgeDegree = annulusWedgeDegree;\n degrees.positionDegree = 0;\n this.annulusWedgeMap.put( vertexToVisit, degrees );\n this.previousParent = vertexToVisit;\n }\n else {\n // For non-root, set the annulus wedge to:\n // ( leaves of current node / leaves of parent node ) * annulus wedge of parent\n Vertex parent = this.tree.getParent( vertexToVisit );\n parentDegrees = (VertexDegrees) this.annulusWedgeMap.get( parent );\n double parentAnnulusWedge = parentDegrees.annulusWedgeDegree;\n Tree parentSubTree = this.tree.getSubTree( parent );\n Tree subTree = this.tree.getSubTree( vertexToVisit );\n\n // Note that 120 degrees here is valid only if the concentric circles\n // are doubling in radius for every depth.\n // 120 degrees is taken from cos(A)=radius/(radius/2)=0.5\n annulusWedgeDegree =\n Math.min(\n ( (double) subTree.getLeaves().size() / (double) parentSubTree.getLeaves().size() ) * parentAnnulusWedge,\n Math.toDegrees( Math.acos( (this.radius * ( depth - 1 ) ) / (this.radius * depth) ) ) * 2 );\n\n this.logCategory.debug( \"Annulus Wedge: \" + annulusWedgeDegree );\n\n\n if( this.previousDepth != this.tree.getDepth( vertexToVisit ))\n this.depthStartAtDegrees = parentDegrees.positionDegree - ( parentDegrees.annulusWedgeDegree / 2 );\n if( this.previousParent != parent )\n this.depthStartAtDegrees = parentDegrees.positionDegree - ( parentDegrees.annulusWedgeDegree / 2 );\n\n positionDegree = this.depthStartAtDegrees + annulusWedgeDegree / 2;\n\n this.logCategory.debug( \"Start At:\" + this.depthStartAtDegrees );\n this.logCategory.debug( \"Position:\" + positionDegree );\n\n arc = new Arc2D.Double(\n center.getX() - ( this.radius / 2 ) * ( depth - 1 ),\n center.getY() - ( this.radius / 2 ) * ( depth - 1 ),\n (double) ( this.radius * ( depth - 1 )),\n (double) ( this.radius * ( depth - 1 )),\n positionDegree, 1,\n Arc2D.OPEN );\n\n visualVertex.setLocation( arc.getEndPoint().getX(), arc.getEndPoint().getY() );\n\n degrees.annulusWedgeDegree = annulusWedgeDegree;\n degrees.positionDegree = positionDegree;\n this.annulusWedgeMap.put( vertexToVisit, degrees );\n\n this.depthStartAtDegrees += annulusWedgeDegree;\n this.previousDepth = this.tree.getDepth( vertexToVisit );\n this.previousParent = parent;\n }\n }\n catch( Exception ex ) {\n ex.printStackTrace();\n }\n\n return true;\n }",
"public static Map<Integer, Boolean> InitializeVisited() {\n\t\tMap<Integer, Boolean> visited = new HashMap<Integer, Boolean>();\r\n\t\tfor (Entry<Integer, Vertex> currentVertex : vertexes.entrySet())\r\n\t\t\tvisited.put(currentVertex.getKey(), false);\r\n\t\treturn visited;\r\n\t}",
"boolean isDirected();",
"private Boolean depthFirstSearch(HashMap<String, Boolean> visited, String node) {\n \tif (visited.get(node)) {\n \t\t// This can actually never happen\n \t\tif (Flags.semant_debug) {\n \t\t\tSystem.out.println(\"Node: \" + node + \" visited twice\");\n \t\t}\n \t\tsemantError(nameToClass.get(node)).println(\"Class \" + node + \", or its ancestors, is invloved in a cycle\");\n \t\treturn false;\n \t}\n \tvisited.put(node, true);\n \tif (adjacencyList.get(node) == null) {\n \t\treturn true;\n \t}\n \tfor (String child : adjacencyList.get(node)) {\n \t\tif (Flags.semant_debug) {\n \t\t\tSystem.out.println(\"Traversing \" + node + \" --> \" + child);\n \t\t}\n \t\tdepthFirstSearch(visited, child);\n \t}\n \treturn true;\n }",
"public GraphInfo(){}",
"boolean dfs(int node, Map<Integer, List<Integer>> graph, boolean[] visited, Set<Integer> dfsPath) {\n if(dfsPath.contains(node))\n return false;\n\n // If this node is already visited via some other source node then avoid checking further again\n if(visited[node])\n return true;\n\n dfsPath.add(node);\n visited[node] = true;\n\n for(int adjVertex : graph.get(node)) {\n if(!dfs(adjVertex, graph, visited, dfsPath)) {\n return false;\n }\n }\n\n dfsPath.remove(node);\n return true;\n }",
"public boolean connectsVertex(V v);",
"@Test\n void testAddVertexGraph() {\n Assertions.assertTrue(graph.addVertex(v1));\n Assertions.assertTrue(graph.containsVertex(v1));\n Assertions.assertTrue(checkInv());\n }",
"public Vertex(L l) {\n\t\tlabel = l;\n\t}",
"public Vertex(String argName) {\n name = argName;\n }",
"public boolean isVisitedBy(String name) {\n\t\tif(name == null) return false;\n\t\t//Sonderfall: wird als interner code für alle Anwender verwendet\n\t\tif(name.equals(\"\")) return true;\n\t\tfor (Visitor visitor : visitors) {\n\t\t\tif(visitor.getName().equals(name)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"private void DFS(Vertex start, Set<Vertex> visited, Stack<Vertex> stack) {\r\n\t\t// if(visited.contains(start)) return;\r\n\r\n\t\t// Mark the current node as visited and push it\r\n\t\tvisited.add(start);\r\n\t\tstack.push(start);\r\n\r\n\t\tVertex currentNode;\r\n\t\tSet<Vertex> neighbors;\r\n\r\n\t\twhile (stack.size() > 0) {\r\n\t\t\t// Pop a vertex from stack and print it\r\n\t\t\tcurrentNode = stack.pop();\r\n\r\n\t\t\tSystem.out.print(currentNode + \" \");\r\n\r\n\t\t\t// Get all adjacent vertices of the dequeued vertex s\r\n\t\t\t// If a adjacent has not been visited, then mark it\r\n\t\t\t// visited and enqueue it\r\n\t\t\tneighbors = currentNode.getNeighbors();\r\n\r\n\t\t\tfor (Vertex n : neighbors) {\r\n\t\t\t\tif (!visited.contains(n)) {\r\n\t\t\t\t\tvisited.add(n);\r\n\t\t\t\t\tstack.push(n);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public boolean detect_cycle_directed_util(int v,boolean visited[], boolean curr_visited[]) {\n\t\t\n\t\tvisited[v]=true;\n\t\tcurr_visited[v]=true;\n\t\t\n\t\t\n\t\tfor(int neighbour:adj[v]) {\n\t\t\t\n\t\t\tif(curr_visited[neighbour]) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse if(!visited[neighbour]&&detect_cycle_directed_util(neighbour,visited,curr_visited)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\tcurr_visited[v]=false;\n\t\t\n\t\treturn false;\n\t\t\n\t}",
"private void printPath(LinkedList<String> visited) {\r\n\r\n if (flag == false) {\r\n System.out.println(\"Yes there exists a path between \" + START + \" and \" + END);\r\n }\r\n for (String node : visited) { //creating for loop to print the nodes stored in visited array \r\n System.out.print(node);\r\n System.out.print(\" \");\r\n }\r\n System.out.println();\r\n }",
"public Vertex(final Node node, final Drawable icon, final String iden, Point2D point, boolean isRec){\n this.node = node;\n this.icon = icon;\n this.id = iden;\n this.isRecipe = isRec;\n this.position = point;\n }",
"public boolean provideGraphInfo() { return node_size == NodeSize.GRAPHINFO; }",
"protected GraphSubEdge (Object label)\n {\n this.label = label;\n mark = false;\n }",
"protected Vertex() {\n\t\tisInDepot = false;\n\t}",
"public static void main(String[] args) {\n graph.addEdge(\"Mumbai\",\"Warangal\");\n graph.addEdge(\"Warangal\",\"Pennsylvania\");\n graph.addEdge(\"Pennsylvania\",\"California\");\n //graph.addEdge(\"Montevideo\",\"Jameka\");\n\n\n String sourceNode = \"Pennsylvania\";\n\n if(graph.isGraphConnected(sourceNode)){\n System.out.println(\"Yes\");\n } else {\n System.out.println(\"No\");\n }\n }",
"public boolean isConnected() {\n if (this.isEmpty()) return true;\n\n if (this.directed) {\n Deque<Node> toVisit = new LinkedList<>();\n for (Node s : this.nodes.values()) {\n Node current;\n toVisit.addLast(s);\n while (!toVisit.isEmpty()) {\n current = toVisit.removeLast();\n current.setFlag(\"_visited\");\n for (Edge edge : current.getNeighbours()) {\n Node n = edge.getEnd();\n if (!n.getFlag(\"_visited\")) toVisit.addLast(n);\n }\n }\n\n //Check if all nodes have been visited and remove flags\n boolean allVisited = true;\n for (Node n : nodes.values()) {\n allVisited = allVisited && n.getFlag(\"_visited\");\n n.unsetFlag(\"_visited\");\n }\n if (!allVisited) return false;\n }\n return true;\n }\n else {\n //Perform a DFS from a random start node marking nodes as visited\n Node current;\n Deque<Node> toVisit = new LinkedList<>();\n toVisit.addLast(this.nodes.values().iterator().next());\n while (!toVisit.isEmpty()) {\n current = toVisit.removeLast();\n current.setFlag(\"_visited\");\n for (Edge edge : current.getNeighbours()) {\n Node n = edge.getEnd();\n if (!n.getFlag(\"_visited\")) toVisit.addLast(n);\n }\n }\n\n //Check if all nodes have been visited and remove flags\n boolean allVisited = true;\n for (Node n : nodes.values()) {\n allVisited = allVisited && n.getFlag(\"_visited\");\n n.unsetFlag(\"_visited\");\n }\n\n return allVisited;\n }\n }"
] | [
"0.7073958",
"0.69783455",
"0.6639682",
"0.6628552",
"0.66055006",
"0.6581949",
"0.65652114",
"0.65016603",
"0.64980745",
"0.6496293",
"0.64835435",
"0.64572436",
"0.642643",
"0.63330054",
"0.6242082",
"0.62004954",
"0.61954683",
"0.6166741",
"0.6141669",
"0.6138434",
"0.6124075",
"0.60453236",
"0.6042008",
"0.6028541",
"0.60088193",
"0.5959891",
"0.5944324",
"0.5939544",
"0.5939544",
"0.5926488",
"0.59229434",
"0.5916128",
"0.59024477",
"0.5883404",
"0.58519566",
"0.5845211",
"0.5833842",
"0.5817632",
"0.5799865",
"0.57446784",
"0.5695541",
"0.5686561",
"0.56862754",
"0.56861097",
"0.5627326",
"0.55842584",
"0.5552201",
"0.55479205",
"0.55410767",
"0.5520033",
"0.55171436",
"0.5502558",
"0.54987013",
"0.5480553",
"0.5478738",
"0.5475802",
"0.54732877",
"0.54321194",
"0.54118836",
"0.5383384",
"0.53829545",
"0.53708386",
"0.5370009",
"0.5362636",
"0.5358373",
"0.5342076",
"0.53314364",
"0.53275",
"0.53270096",
"0.53253686",
"0.5323758",
"0.5301925",
"0.52898186",
"0.5287561",
"0.52633274",
"0.52633274",
"0.52589434",
"0.52455795",
"0.52455795",
"0.52429247",
"0.5236883",
"0.52354795",
"0.52323437",
"0.52197057",
"0.52150995",
"0.51973736",
"0.5187876",
"0.51776516",
"0.5169342",
"0.5169219",
"0.51541257",
"0.5152563",
"0.51424927",
"0.5134816",
"0.5124488",
"0.51199186",
"0.511858",
"0.51077914",
"0.51067376",
"0.50949484"
] | 0.60686445 | 21 |
should return vertices list | public DSALinkedList getAdjacent()
{
return links;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public java.util.List<V> getVertices();",
"List<V> getVertexList();",
"Set<Vertex> getVertices();",
"public Collection<V> getVertices();",
"@Override\r\n\tpublic ArrayList<E> getVertices() {\r\n\t\tArrayList<E> verts = new ArrayList<>();\r\n\t\tvertices.forEach((E t, Vertex<E> u) -> {\r\n\t\t\tverts.add(t);\r\n\t\t});\r\n\t\treturn verts;\r\n\t}",
"public List<Vertex> vertices() {\n return Collections.unmodifiableList(this.vertices);\n }",
"Iterable<Long> vertices() {\n //YOUR CODE HERE, this currently returns only an empty list.\n return world.keySet();\n }",
"public List<wVertex> getVertices(){\r\n return vertices;\r\n }",
"public Set<V> getVertices();",
"public Set<V> getVertices();",
"Iterable<Long> vertices() {\n //YOUR CODE HERE, this currently returns only an empty list.\n ArrayList<Long> verticesIter = new ArrayList<>();\n verticesIter.addAll(adj.keySet());\n return verticesIter;\n }",
"@Override\r\n public Iterable<V> vertices() {\r\n LinkedList<V> list = new LinkedList<>();\r\n for(V v : map.keySet())\r\n list.add(v);\r\n return list;\r\n }",
"@Override public Set<L> vertices() {\r\n return new HashSet<L>(vertices);//防御式拷贝\r\n }",
"public Vertex[] getVertices() {\n return arrayOfVertices;\n }",
"public E[] verticesView ()\n {\n E[] allVertices = (E[]) new Object[lastIndex + 1];\n for (int index = 0; index < allVertices.length; index++)\n allVertices[index] = this.vertices[index];\n\n return allVertices;\n }",
"public Collection<GJPoint2D> vertices() {\n\t\tArrayList<GJPoint2D> vertices = new ArrayList<GJPoint2D>(this.segments.size());\n\t\t\n\t\t// iterate on segments, and add the control points of each segment\n\t\tfor (Segment seg : this.segments) {\n\t\t\tfor (GJPoint2D p : seg.controlPoints()) {\n\t\t\t\tvertices.add(p);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// return the set of vertices\n\t\treturn vertices;\n\t}",
"@Override\r\n public List<Vertex> getVertices() {\r\n List<Vertex> verticesList = new LinkedList<>(adjacencyList.keySet()); //getting the key set of adjacencyList i.e, a list of all vertices\r\n Collections.sort(verticesList, Comparator.comparing(Vertex::getLabel));\r\n return verticesList;\r\n }",
"public Vertex[] getVertices() {\n\t\treturn this._vertices.toArray(new Vertex[0]);\n\t}",
"private List<Integer> vertices(int num) {\n List<Integer> list = new LinkedList<>();\n for (int i = 0; i < num; i++) {\n list.add(i);\n }\n return list;\n }",
"public Vector3f[] getVertices() {\n return vertices;\n }",
"Iterable<Long> vertices() {\n return nodes.keySet();\n }",
"List<V> getAdjacentVertexList(V v);",
"public Iterable<Vertex> getVertices() {\n return mVertices.values();\n }",
"public Collection<Vertex> vertices() { \n //return myGraph.keySet(); OLD\n //create a copy of all the vertices in the map to restrict any reference\n //to the interals of this class\n Collection<Vertex> copyOfVertices = new ArrayList<Vertex>();\n copyOfVertices.addAll(myGraph.keySet());\n return copyOfVertices;\n }",
"public float[] getVertices() {\r\n\t\treturn vertices;\r\n\t}",
"public List<Vertex> getVertices() {\n\t\treturn AdjacencyMatrixGraph.cloneList(vertexList);\n\t}",
"public abstract Vector2[] getVertices();",
"public Collection<V> getOtherVertices(V v);",
"@Override\n public Set<Vertex> getVertices() {\n Set<Vertex> vertices = new HashSet<Vertex>();\n vertices.add(sourceVertex);\n vertices.add(targetVertex);\n return vertices;\n }",
"public List<Vertex> findAllVertices() throws SQLException {\n\t\treturn rDb.findAllVertices();\n\t}",
"int getVertices();",
"public Vertex[] getVertices() {\n return new Vertex[]{v1, v2};\n }",
"public Enumeration vertices();",
"Iterator<Vertex<V, E, M>> getVertices() {\n return this.vertices.values().iterator();\n }",
"protected LinkedList<Vertex> getVertexList() {\n\t\tLinkedList<Vertex> returnList = new LinkedList<Vertex>();\n\n\t\t// Add family\n\t\tif (this.getFamily() != null) {\n\t\t\treturnList = this.getFamily().getFamilyVertexList();\n\t\t}\n\t\treturnList.add(this);\n\t\treturn returnList;\n\t}",
"public Set<String> getVertices() {\n\t\treturn vertices;\n\t}",
"public HashMap<Integer, Vertex> getVertices() {\n\t\treturn vertices;\n\t}",
"@Override\n public VertexCollection getVertexCollection() {\n return this.vertices.copy();\n }",
"public Set<GeographicPoint> getVertices()\n\t{\n\t\t//TODO: Implement this method in WEEK 3\n\t\tSet<GeographicPoint> ans = new HashSet<GeographicPoint> ();\n\t\tfor (GeographicPoint curr : map.keySet()) {\n\t\t\tif (!ans.contains(curr)) {\n\t\t\t\tans.add(curr);\n\t\t\t}\n\t\t}\n\t\treturn ans;\n\t}",
"public float[] getVertices() {\n/* 793 */ COSBase base = getCOSObject().getDictionaryObject(COSName.VERTICES);\n/* 794 */ if (base instanceof COSArray)\n/* */ {\n/* 796 */ return ((COSArray)base).toFloatArray();\n/* */ }\n/* 798 */ return null;\n/* */ }",
"public Collection<V> getOtherVertices(Collection<V> vs);",
"public Collection< VDataT > vertexData();",
"public Vertice[] getSelectedVertices(){\n\t\tVertice selectedVertice;\n\t\tVertice[] vertices = new Vertice[getSelectedModelVerticeCount()];\n\t\tint index = 0;\n\t\tfor(int i = 0; i < getModelVerticesCount(); i++){\n\t\t\tselectedVertice = getModelVertice(i);\n\t\t\tif(selectedVertice.isSelected)\n\t\t\t\tvertices[index++] = selectedVertice;\n\t\t}\n\t\treturn vertices;\n\t}",
"public IntPoint[] getVertices() {\n\t\treturn PointArrays.copy(vertices);\n\t}",
"public Collection<LazyNode2> getVertices() {\n List<LazyNode2> l = new ArrayList();\n \n for(Path p : getActiveTraverser())\n //TODO: Add cache clearing\n l.add(new LazyNode2(p.endNode().getId()));\n \n return l;\n }",
"public ArrayList< Vertex > adjacentVertices( ) {\n return adjacentVertices;\n }",
"@Override\n\tpublic List<Location> getVertices() {\n\t\treturn locations;\n\t}",
"public HashSet<Town> getVertices() {\r\n\t\treturn (HashSet<Town>) vertices;\r\n\t}",
"public ArrayList<Triangle> getOccluderVertexData();",
"public Set<String> getVertices()\r\n\t{\r\n\t\treturn this.dataMap.keySet();\r\n\t}",
"public Collection< VKeyT > vertexKeys();",
"private List<Vertice> pegaVerticesFolha() {\n List<Vertice> verticesFolha = new ArrayList<Vertice>();\n\n for (Vertice vertice : this.pegaTodosOsVerticesDoGrafo()) {\n if (this.getGrauDeSaida(vertice) == 0) {\n verticesFolha.add(vertice);\n }\n }\n\n return verticesFolha;\n }",
"public int getVertices() {\n return verticesNumber;\n }",
"void getVertices() {\r\n\t\tSystem.out.println(\"Enter your vertices:\");\r\n\t\tarrIndexToVertexMap = new HashMap<>();\r\n\t\ttry {\r\n\t\t\tfor (int i = 0; i < numberOfVertices; i++) {\r\n\t\t\t\tarrIndexToVertexMap.put(i, sc.next());\r\n\t\t\t}\r\n\t\t\tsc.close();\r\n\t\t} catch (RuntimeException re) {\r\n\t\t\tSystem.out.println(\"Error at method:: getVertices || Description:\" + re);\r\n\t\t}\r\n\t}",
"public Vector[] getVerts() {\n\t\treturn this.verts;\n\t}",
"public int[] getVertices() {\n long cPtr = RecastJNI.rcContour_verts_get(swigCPtr, this);\n if (cPtr == 0) {\n return null;\n }\n return Converter.convertToInts(cPtr, getNumberOfVertices() * 4);\n }",
"private static ImmutableList<WorldCoord> generateVertexList()\r\n {\n\t return ShapeReader.getWorldCoordsFromResource(RESOURCE);\r\n }",
"@Override\n public Iterable<E> getAllVertices() {\n return dictionary.keySet();\n }",
"public Vertex [] getSortedVertexArray() {\n\t\tVertex [] array = new Vertex[_vertices.size()];\n\t\tint index = 0;\n\t\tfor (Vertex v : _vertices) {\n\t\t\tarray[index++] = v;\n\t\t}\n\t\t// sort\n\t\tArrays.sort(array);\n\t\treturn array;\n\t}",
"public void setVertices(){\n\t\tvertices = new ArrayList<V>();\n\t\tfor (E e : edges){\n\t\t\tV v1 = e.getOrigin();\n\t\t\tV v2 = e.getDestination();\n\t\t\tif (!vertices.contains(v1))\n\t\t\t\tvertices.add(v1);\n\t\t\tif (!vertices.contains(v2))\n\t\t\t\tvertices.add(v2);\n\t\t}\n\t}",
"@Override\r\n\tpublic Vector2f[] getVertices() {\n\t\treturn null;\r\n\t}",
"@Override\n\tpublic Iterator<E> iterator() {\n\t\treturn vertices.iterator();\n\t}",
"public Collection<Set<V>> getVertexPartitions() {\n\t\tif (vertex_sets == null) {\n\t\t\tthis.vertex_sets = new HashSet<Set<V>>();\n\t\t\tthis.vertex_sets.addAll(vertex_partition_map.values());\n\t\t}\n\t\treturn vertex_sets;\n\t}",
"public ArrayList<ArrayList<Double>> parseVertices() {\n\t\tArrayList<ArrayList<Double>> ret = new ArrayList<ArrayList<Double>>();\n\t\tString file = getFilepath();\n\t\ttry {\n\t\t\tFile myObj = new File(file);\n\t\t\tScanner myReader = new Scanner(myObj);\n\t\t\twhile (myReader.hasNextLine()) {\n\t\t\t\tString data = myReader.nextLine();\n\t\t\t\tif (data.length() > 2 && data.substring(0,2).equals(\"v \")) {\n\t\t\t\t\tString[] s = data.split(\" \");\n\t\t\t\t\tArrayList<Double> v = new ArrayList<Double>();\n\t\t\t\t\tv.add(Double.parseDouble(s[1]));\n\t\t\t\t\tv.add(Double.parseDouble(s[2]));\n\t\t\t\t\tv.add(Double.parseDouble(s[3]));\n\t\t\t\t\tret.add(v);\n\t\t\t\t}\n\t\t\t}\n\t\t\tmyReader.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.out.println(\"An error occurred.\");\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn ret;\n\n\t}",
"Stream<BaseVertex> vertices(String datasource);",
"List<Edge<V>> getEdgeList();",
"@Override\r\n\tpublic int getOrder() {\r\n\t\treturn vertices.size();\r\n\t}",
"public List<FactoryArrayStorage<?>> getVertices() {\n return mFactoryVertices;\n }",
"Vertex getVertex();",
"public static ArrayList<Vertex> initializeGraph() {\n\t\tVertex uVertex = new Vertex('u');\n\t\tVertex vVertex = new Vertex('v');\n\t\tVertex wVertex = new Vertex('w');\n\t\tVertex xVertex = new Vertex('x');\n\t\tVertex yVertex = new Vertex('y');\n\t\tVertex zVertex = new Vertex('z');\n\t\t\n\t\tVertex[] uAdjacencyList = {xVertex, vVertex};\n\t\tuVertex.setAdjacencyList(createArrayList( uAdjacencyList ));\n\t\t\n\t\tVertex[] vAdjacencyList = {yVertex};\n\t\tvVertex.setAdjacencyList(createArrayList( vAdjacencyList ));\n\t\t\n\t\tVertex[] wAdjacencyList = {zVertex, yVertex};\n\t\twVertex.setAdjacencyList(createArrayList( wAdjacencyList ));\n\t\t\n\t\tVertex[] xAdjacencyList = {vVertex};\n\t\txVertex.setAdjacencyList(createArrayList( xAdjacencyList ));\n\t\t\n\t\tVertex[] yAdjacencyList = {xVertex};\n\t\tyVertex.setAdjacencyList(createArrayList( yAdjacencyList ));\n\t\t\n\t\tVertex[] zAdjacencyList = {zVertex};\n\t\tzVertex.setAdjacencyList(createArrayList( zAdjacencyList ));\n\n\t\tVertex[] graph = { uVertex, vVertex, wVertex, xVertex, yVertex, zVertex};\n\t\treturn createArrayList( graph );\n\n\t}",
"public PosicionVertice[] getVertices(PosicionVertice rpv[]) {\n \n // inicializacion\n rpv = (rpv == null) ? new PosicionVertice[2] : rpv;\n for (int i=0; i<rpv.length; i++) {\n rpv[i] = (rpv[i] == null) ? new PosicionVertice() : rpv[i];\n }\n normaliza();\n \n switch(getOrientacion()) {\n case Este:\n rpv[0].setPos(getX(), getY()-1);\n rpv[0].setOrientacion(OrientacionVertice.Sur);\n rpv[1].setPos(getX()+1, getY());\n rpv[1].setOrientacion(OrientacionVertice.Norte);\n break;\n case NorEste:\n rpv[0].setPos(getX(), getY());\n rpv[0].setOrientacion(OrientacionVertice.Norte);\n rpv[1].setPos(getX(), getY()-1);\n rpv[1].setOrientacion(OrientacionVertice.Sur);\n break; \n case NorOeste:\n rpv[0].setPos(getX(), getY());\n rpv[0].setOrientacion(OrientacionVertice.Norte);\n rpv[1].setPos(getX()-1, getY());\n rpv[1].setOrientacion(OrientacionVertice.Sur);\n break; \n }\n return rpv;\n }",
"@Test\n\tpublic void verticesTest() {\n\t\tgraph.addVertex(A);\n\t\tgraph.addVertex(B);\n\t\tgraph.addVertex(C);\n\t\tgraph.addVertex(D);\n\t\tassertEquals(4, graph.vertices().size());\n\t\tassertTrue(graph.vertices().contains(A));\n\t\tassertTrue(graph.vertices().contains(D));\n\t}",
"private ArrayList<Vertex> getProjectedVertices4(){\n\t\t\n\t\tArrayList<Vertex> projectedVertices = new ArrayList<>(); // To store the projection of each vertex\n\t\t\n\t\t// Transform each vertex from world coordinates to eye coordinates\n\t\tfor(Vertex v : vertices){\n\t\t\tprojectedVertices.add(v.transform4());\n\t\t}\n\t\t\n\t\tfor(Vertex v : projectedVertices){\n\n\t\t\t// Get perspective projection onto 3D region\n\t\t\tVertex projection = v.perspectiveProjection4();\n\t\t\tv.setX(projection.getX());\n\t\t\tv.setY(projection.getY());\n\t\t\tv.setZ(projection.getZ());\n\t\t\t\n\t\t\t// Map to viewbox\n\t\t\tprojection = v.mapToViewbox();\n\t\t\tv.setX(projection.getX());\n\t\t\tv.setY(projection.getY());\n\t\t\tv.setZ(projection.getZ());\n\t\t}\n\t\t\n\t\treturn projectedVertices;\n\t}",
"public ArrayList<Point3D> getVertex(Block bl) {\r\n\t\tArrayList<Point3D> pivot = new ArrayList<Point3D>();\r\n\t\tpivot.add(bl.getpoint_BlockTopLeft());\r\n\t\tpivot.add(bl.getpoint_BlockTopRight());\r\n\t\tpivot.add(bl.getPoint_BlockDownRight());\r\n\t\tpivot.add(bl.getpoint_BlockDownleft());\r\n\t\treturn pivot;\r\n\t}",
"public Set<Integer> getVertexKeys() {\n\t\treturn vertices.keySet();\n\t}",
"public Vertex<V>[] getEndpoints() { return endpoints; }",
"public void displayAsList()\n\t{\n\t\tSystem.out.println(\"Printing all vertices\");\n\t\tvertices.show();\n\t}",
"@Test\n public void getVertexes() {\n\n for (int i = 0; i < 6; i++) {\n\n Vertex temp = new Vertex(i + \"\", \"Location number \" + i);\n assertTrue(temp.equals(testGraph.getVertices ().get(i)));\n\n }\n }",
"public Iterator<Integer> getVertexIterator() {\n\t\treturn vertices.keySet().iterator();\n\t}",
"public Object getVertex(){\r\n return this.vertex;\r\n }",
"private List<Vertex> prepareGraphAdjacencyList() {\n\n\t\tList<Vertex> graph = new ArrayList<Vertex>();\n\t\tVertex vertexA = new Vertex(\"A\");\n\t\tVertex vertexB = new Vertex(\"B\");\n\t\tVertex vertexC = new Vertex(\"C\");\n\t\tVertex vertexD = new Vertex(\"D\");\n\t\tVertex vertexE = new Vertex(\"E\");\n\t\tVertex vertexF = new Vertex(\"F\");\n\t\tVertex vertexG = new Vertex(\"G\");\n\n\t\tList<Edge> edges = new ArrayList<Edge>();\n\t\tedges.add(new Edge(vertexB, 2));\n\t\tedges.add(new Edge(vertexD, 6));\n\t\tedges.add(new Edge(vertexF, 5));\n\t\tvertexA.incidentEdges = edges;\n\n\t\tedges = new ArrayList<Edge>();\n\t\tedges.add(new Edge(vertexA, 2));\n\t\tedges.add(new Edge(vertexC, 7));\n\t\tvertexB.incidentEdges = edges;\n\n\t\tedges = new ArrayList<Edge>();\n\t\tedges.add(new Edge(vertexB, 7));\n\t\tedges.add(new Edge(vertexD, 9));\n\t\tedges.add(new Edge(vertexF, 1));\n\t\tvertexC.incidentEdges = edges;\n\n\t\tedges = new ArrayList<Edge>();\n\t\tedges.add(new Edge(vertexA, 6));\n\t\tedges.add(new Edge(vertexC, 9));\n\t\tedges.add(new Edge(vertexE, 4));\n\t\tedges.add(new Edge(vertexG, 8));\n\t\tvertexD.incidentEdges = edges;\n\n\t\tedges = new ArrayList<Edge>();\n\t\tedges.add(new Edge(vertexD, 4));\n\t\tedges.add(new Edge(vertexF, 3));\n\t\tvertexE.incidentEdges = edges;\n\n\t\tedges = new ArrayList<Edge>();\n\t\tedges.add(new Edge(vertexA, 5));\n\t\tedges.add(new Edge(vertexC, 1));\n\t\tedges.add(new Edge(vertexE, 3));\n\t\tvertexF.incidentEdges = edges;\n\n\t\tedges = new ArrayList<Edge>();\n\t\tedges.add(new Edge(vertexD, 8));\n\t\tvertexG.incidentEdges = edges;\n\n\t\tgraph.add(vertexA);\n\t\tgraph.add(vertexB);\n\t\tgraph.add(vertexC);\n\t\tgraph.add(vertexD);\n\t\tgraph.add(vertexE);\n\t\tgraph.add(vertexF);\n\t\tgraph.add(vertexG);\n\n\t\treturn graph;\n\t}",
"public List<Vertice> get_list_roots() {\n\t\tList<Vertice> list_roots = new ArrayList<Vertice>();\n\t\tfor (Vertice v1 : vertices.values()) {\n\t\t\tif (v1.parent == null)\n\t\t\t\tlist_roots.add(v1);\n\t\t}\n\t\treturn list_roots;\n\t}",
"public int getVertexCount();",
"@Override\n public List<Vertex> solution(){\n return solution;\n }",
"@Override\r\n public int size() {\r\n return vertices.size();\r\n }",
"public static Vec2[] verticesOfPath2D(Path2D.Float p, int n) {\n Vec2[] result = new Vec2[n];\n float[] values = new float[6];\n PathIterator pi = p.getPathIterator(null);\n int i = 0;\n while (!pi.isDone() && i < n) {\n int type = pi.currentSegment(values);\n if (type == PathIterator.SEG_LINETO) {\n result[i++] = new Vec2(values[0], values[1]);\n }\n pi.next();\n }\n return result;\n }",
"public V getVertex(int index);",
"public List<V> getPath(int index){\n\t\t\tArrayList<V> path = new ArrayList<V>();\n\t\t\n\t\t\tdo{\n\t\t\t\tpath.add(vertices.get(index));\n\t\t\t\tindex=parent[index];\n\t\t\t}\n\t\t\twhile(index!= -1);\n\t\t\treturn path;\n\t\t}",
"public ArrayList<Integer> visitAll(int startVertex) {\n ArrayList<Integer> result = new ArrayList<Integer>();\n Iterator<Integer> iter = new DFSIterator(startVertex);\n while (iter.hasNext()) {\n result.add(iter.next());\n }\n return result;\n }",
"public static float[] getMeshVertices(GVRMesh mesh) {\n GVRVertexBuffer vertexBuffer = mesh.getVertexBuffer();\n FloatBuffer floatBuffer = vertexBuffer.getFloatVec(\"a_position\");\n int count = floatBuffer.remaining();\n float[] vertices = new float[count];\n floatBuffer.get(vertices);\n // For 3.3 this still works\n// float[] vertices = mesh.getVertices(); // Throws UnsupportedOperationException in 4.0\n return vertices;\n }",
"public Set<V> getNeighbours(V vertex);",
"int getNumberOfVertexes();",
"protected abstract List<Integer> getNeighbors(int vertex);",
"private List<routerNode> getPathVertexList(routerNode beginNode, routerNode endNode) {\r\n\t\tTransformer<routerLink, Integer> wtTransformer; // transformer for getting edge weight\r\n\t\twtTransformer = new Transformer<routerLink, Integer>() {\r\n public Integer transform(routerLink link) {\r\n return link.getWeight();\r\n \t}\r\n };\t\t\r\n\r\n\t\t\r\n\t\tList<routerNode> vlist;\r\n\t\tDijkstraShortestPath<routerNode, routerLink> DSPath = \r\n\t \t new DijkstraShortestPath<routerNode, routerLink>(gGraph, wtTransformer);\r\n \t// get the shortest path in the form of edge list \r\n List<routerLink> elist = DSPath.getPath(beginNode, endNode);\r\n\t\t\r\n \t\t// get the node list form the shortest path\r\n\t Iterator<routerLink> ebIter = elist.iterator();\r\n\t vlist = new ArrayList<routerNode>(elist.size() + 1);\r\n \tvlist.add(0, beginNode);\r\n\t for(int i=0; i<elist.size(); i++){\r\n\t\t routerLink aLink = ebIter.next();\r\n\t \t \t// get the nodes corresponding to the edge\r\n \t\tPair<routerNode> endpoints = gGraph.getEndpoints(aLink);\r\n\t routerNode V1 = endpoints.getFirst();\r\n\t routerNode V2 = endpoints.getSecond();\r\n\t \tif(vlist.get(i) == V1)\r\n\t \t vlist.add(i+1, V2);\r\n\t else\r\n\t \tvlist.add(i+1, V1);\r\n\t }\r\n\t return vlist;\r\n\t}",
"public int numVertices() { return numV; }",
"public Enumeration outAdjacentVertices(Position vp) throws InvalidPositionException;",
"public ArrayList<Integer> visitAll(int startVertex) {\n ArrayList<Integer> result = new ArrayList<Integer>();\n Iterator<Integer> iter = new DFSIterator(startVertex);\n\n while (iter.hasNext()) {\n result.add(iter.next());\n }\n return result;\n }",
"public Position[] getVertexPosition() {\n Position[] positions = new Position[4];\n positions[0] = position;\n positions[1] = new Position(position.getX(), position.getY()+sizeL);\n positions[2] = new Position(position.getX()+sizeL, position.getY()+sizeL);\n positions[3] = new Position(position.getX()+sizeL, position.getY());\n\n return positions;\n }",
"public Collection<V> getChildren(V vertex);",
"public ArrayList<Integer> visitAll(int startVertex) {\r\n ArrayList<Integer> result = new ArrayList<Integer>();\r\n Iterator<Integer> iter = new DFSIterator(startVertex);\r\n\r\n while (iter.hasNext()) {\r\n result.add(iter.next());\r\n }\r\n return result;\r\n }",
"private E3DTexturedVertex getVertexA(){\r\n\t\treturn vertices[0];\r\n\t}"
] | [
"0.84603566",
"0.8436111",
"0.80812085",
"0.79485047",
"0.7814295",
"0.78069687",
"0.7751993",
"0.7724798",
"0.77131873",
"0.77131873",
"0.7649584",
"0.7567216",
"0.7531955",
"0.7504184",
"0.74238956",
"0.73733974",
"0.7368384",
"0.7349069",
"0.7346317",
"0.7327339",
"0.7315737",
"0.72910315",
"0.7287308",
"0.7264174",
"0.72212857",
"0.7216536",
"0.72120386",
"0.7206523",
"0.7205591",
"0.7186581",
"0.71819866",
"0.7165991",
"0.7159877",
"0.70929635",
"0.70498705",
"0.70314294",
"0.70306",
"0.69896483",
"0.698033",
"0.6978205",
"0.6940488",
"0.6932103",
"0.69152904",
"0.69000137",
"0.68606377",
"0.6839842",
"0.6815893",
"0.6793255",
"0.67865634",
"0.678587",
"0.6671237",
"0.6664014",
"0.66589516",
"0.66487837",
"0.66260964",
"0.6594292",
"0.6540429",
"0.653057",
"0.65262836",
"0.6497306",
"0.6478561",
"0.6444795",
"0.64416486",
"0.64415437",
"0.6416056",
"0.63694036",
"0.6367138",
"0.6366868",
"0.63412505",
"0.63226855",
"0.63031876",
"0.6301709",
"0.62861204",
"0.6270352",
"0.62593794",
"0.6246309",
"0.6239659",
"0.6238582",
"0.6235522",
"0.6231001",
"0.6214235",
"0.61755836",
"0.61689985",
"0.6154246",
"0.61438704",
"0.6129922",
"0.61232954",
"0.61017954",
"0.60970277",
"0.6094311",
"0.60898936",
"0.6083087",
"0.6066781",
"0.60630774",
"0.605353",
"0.6048767",
"0.60475713",
"0.6036689",
"0.6036508",
"0.60349387",
"0.6029931"
] | 0.0 | -1 |
Constructor to initialize mapping metadata provider and single index to work with. | public SingleElasticIndexCsdlEdmProvider(MappingMetaDataProvider metaDataProvider,
String index) {
super(metaDataProvider);
this.index = index;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public AutoIndexMap()\n\t\t{\n\t\t\t// Initialise instance variables\n\t\t\tindices = new IdentityHashMap<>();\n\t\t}",
"public SimpleIndexFactory() {\n\t}",
"public Mapping() { this(null); }",
"private Indexers()\r\n {\r\n // Private constructor to prevent instantiation\r\n }",
"public Indexer() {\n }",
"private Document createMapping() {\n return getIndexOperations().createMapping();\n }",
"public H_index() {\n\t\tsuper();\n\t}",
"public IndexRecord()\n {\n }",
"public IndexBeans() {\r\n }",
"private MappingReader() {\n\t}",
"private SolrIndexer()\n {\n fieldMap = new HashMap<String, String[]>();\n transMapMap = new HashMap<String, Map<String, String>>();\n customMethodMap = new HashMap<String, Method>();\n customMixinMap = new HashMap<String, SolrIndexerMixin>();\n indexDate = new Date();\n }",
"public void start() throws Exception {\n if (!getClient().admin().indices().exists(Requests.indicesExistsRequest(INDEX_NAME)).actionGet().isExists()) {\n getClient().admin().indices().prepareCreate(INDEX_NAME).execute().actionGet().isAcknowledged();\n }\n\n //Create mapping for the key. Leave it not_analyzed so it doesn't tokenize the \"-\" delimiters\n PutMappingResponse response = getClient().admin().indices()\n .preparePutMapping(INDEX_NAME)\n .setType(TYPE_NAME)\n .setSource(buildMapping())\n .execute().actionGet();\n if (!response.isAcknowledged()) {\n throw new Exception(\"Could not define mapping.\");\n }\n }",
"public MapEntity() {\n\t}",
"public Mapper() {\n\t\t\n\t\tmirMap = scanMapFile(\"mirMap.txt\");\n\t\tgeneMap = scanMapFile(\"geneMap.txt\");\n\t\t\n\t}",
"public Example() {\n this.api = new MetaMapApiImpl();\n }",
"protected synchronized void init(LiveIndexWriterConfig indexWriterConfig) {\n this.indexWriterConfig = indexWriterConfig;\n infoStream = indexWriterConfig.getInfoStream();\n }",
"public Map() {\n\n\t\t}",
"public MapController() {\r\n\t}",
"public DataMapping(String name, ElasticDataType type) {\n this(name, name, type);\n }",
"public IndexSearchSharderManager() {\n log = LoggerFactory.getLogger(IndexSearchSharderManager.class);\n }",
"public ProductIndexQuery() {\n\t}",
"public LispMappingProvider() {\n super(new ProviderId(SCHEME_NAME, MAPPING_PROVIDER_PACKAGE));\n }",
"@Override\n public void initialize() {\n emissary.core.MetadataDictionary.initialize();\n }",
"void testSetup() {\n\t\t// Delete any existing index\n\t\tdeleteIndex();\n\n\t\t// Create the index\n\t\tcreateIndex();\n\n\t\t// Apply mappings for type and subtypes\n\t\tBufferedReader br;\n\t\tString line;\n\t\tStringBuffer sb;\n\t\ttry {\n\t\t\t// Mappings for index + type\n\t\t\tbr = new BufferedReader(new FileReader(\n\t\t\t\t\t\"./data/mappings_domeo_v2.json\"));\n\t\t\tsb = new StringBuffer();\n\t\t\twhile ((line = br.readLine()) != null) {\n\t\t\t\tsb.append(line + NEWLINE);\n\t\t\t}\n\t\t\tbr.close();\n\t\t\tdoMapping(sb.toString(), false, HTTP_POST);\n\n\t\t\t// Mappings for index + sub-type\n\t\t\tbr = new BufferedReader(new FileReader(\n\t\t\t\t\t\"./data/mappings_domeo_subtype_v2.json\"));\n\t\t\tsb = new StringBuffer();\n\t\t\twhile ((line = br.readLine()) != null) {\n\t\t\t\tsb.append(line + NEWLINE);\n\t\t\t}\n\t\t\tbr.close();\n\t\t\tdoMapping(sb.toString(), true, HTTP_POST);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\t// Index a doc\n\t\ttry {\n\t\t\tbr = new BufferedReader(new FileReader(\"./data/sample_docs.json\"));\n\t\t\tif ((line = br.readLine()) != null) {\n\t\t\t\tinsertDocument(line);\n\t\t\t}\n\t\t\tbr.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\trefreshIndex();\n\t}",
"@Inject\n\tpublic MetaDataCreateIndexService(Settings settings, Environment environment, ThreadPool threadPool,\n\t\t\tClusterService clusterService, IndicesService indicesService, AllocationService allocationService,\n\t\t\tNodeIndexCreatedAction nodeIndexCreatedAction, MetaDataService metaDataService,\n\t\t\t@RiverIndexName String riverIndexName) {\n\t\tsuper(settings);\n\t\tthis.environment = environment;\n\t\tthis.threadPool = threadPool;\n\t\tthis.clusterService = clusterService;\n\t\tthis.indicesService = indicesService;\n\t\tthis.allocationService = allocationService;\n\t\tthis.nodeIndexCreatedAction = nodeIndexCreatedAction;\n\t\tthis.metaDataService = metaDataService;\n\t\tthis.riverIndexName = riverIndexName;\n\t}",
"protected MXBeanMappingFactory() {}",
"public MappingClassImplDynamic() {\n this(null, null);\n }",
"@Override\n\tpublic void init() {\n Objects.requireNonNull(mtbw, \"Freetext indexer failed to initialize temporal index, setMultiTableBatchWriter() was not set.\");\n Objects.requireNonNull(conf, \"Freetext indexer failed to initialize temporal index, setConf() was not set.\");\n try {\n\t\t\tdocTableBw = mtbw.getBatchWriter(getFreeTextDocTablename(conf));\n\t\t\ttermTableBw = mtbw.getBatchWriter(getFreeTextTermTablename(conf));\n\t\t} catch (AccumuloException | AccumuloSecurityException | TableNotFoundException e) {\n\t\t\tlogger.error(\"Unable to initialize index. Throwing Runtime Exception. \", e);\n throw new RuntimeException(e);\t\t\n }\n\t}",
"public AbstractTypeMapping()\n {\n super();\n }",
"public MapContainer() {\n this(new OpenStreetMapProvider());\n }",
"private IndexSettings buildIndexSettings(IndexMetadata metadata) {\n return new IndexSettings(metadata, settings);\n }",
"@Test\n public void testCreateIndexMapping() throws Exception {\n String json = EsJsonUtils.generateItemMapping();\n System.out.println(json);\n elasticSearchDao.createIndexMapping(TENANT_ID+Constants.INDEX_SPLIT+ Constants.ITEM,json);\n }",
"public mapper3c() { super(); }",
"public InnodbIndexStatsExample() {\n oredCriteria = new ArrayList<Criteria>();\n }",
"public TinySearchEngine()\n {\n this.myIndex = new HashMap();\n this.documentData = new HashMap();\n this.sorted = false;\n this.sort = new Sort();\n this.search = new BinarySearch();\n }",
"private LuceneManager(String indexDir) {\n this.indexDir = indexDir;\n }",
"@Ignore \n @Test\n public void testPutMappingToIndex() {\n System.out.println(\"putMappingToIndex\");\n \n Util.commonServiceIPs=\"127.0.0.1\";\n \n EntityManager em=Util.getEntityManagerFactory(100).createEntityManager();\n EntityManager platformEm = Util.getPlatformEntityManagerFactory().createEntityManager();\n \n Client client = ESUtil.getClient(em,platformEm,1,false);\n \n String indexName = \"datastore_100_1_data_event_yearmonth_000000_1\";\n String indexType = \"AAA666_type\";\n \n try\n { \n ESUtil.createIndexWithoutType(client, indexName);\n \n DataobjectType dataobjectType = Util.getDataobjectTypeByIndexTypeName(platformEm, indexType);\n\n XContentBuilder typeMapping = ESUtil.createTypeMapping(platformEm, dataobjectType, true);\n \n ESUtil.putMappingToIndex(client, indexName, indexType, typeMapping);\n }\n catch(Exception e)\n {\n System.out.print(\" failed! e=\"+e);\n }\n }",
"protected Mapping(String name) {\n this.name = name;\n }",
"public interface IndexMetadata extends Freezable<IndexMetadata> {\n\t\n\tAnnotatedFields annotatedFields();\n\t\n\tdefault AnnotatedField mainAnnotatedField() {\n\t return annotatedFields().main();\n\t}\n\t\n default AnnotatedField annotatedField(String name) {\n return annotatedFields().get(name);\n }\n \n\tMetadataFields metadataFields();\n\t\n\tdefault MetadataField metadataField(String name) {\n\t return metadataFields().get(name);\n\t}\n\n\t/**\n\t * Get the display name for the index.\n\t *\n\t * If no display name was specified, returns the name of the index directory.\n\t *\n\t * @return the display name\n\t */\n\tString displayName();\n\n\t/**\n\t * Get a description of the index, if specified\n\t * @return the description\n\t */\n\tString description();\n\n\t/**\n\t * Is the content freely viewable by all users, or is it restricted?\n\t * @return true if the full content may be retrieved by anyone\n\t */\n\tboolean contentViewable();\n\n /**\n * What's the text direction of this corpus?\n * @return text direction\n */\n\tTextDirection textDirection();\n\n\t/**\n\t * What format(s) is/are the documents in?\n\t *\n\t * This is in the form of a format identifier as understood\n\t * by the DocumentFormats class (either an abbreviation or a\n\t * (qualified) class name).\n\t *\n\t * @return the document format(s)\n\t */\n\tString documentFormat();\n\n\t/**\n\t * What version of the index format is this?\n\t * @return the index format version\n\t */\n\tString indexFormat();\n\n\t/**\n\t * When was this index created?\n\t * @return date/time\n\t */\n\tString timeCreated();\n\n\t/**\n\t * When was this index last modified?\n\t * @return date/time\n\t */\n\tString timeModified();\n\n\t/**\n\t * When was the BlackLab.jar used for indexing built?\n\t * @return date/time\n\t */\n\tString indexBlackLabBuildTime();\n\n\t/**\n\t * When was the BlackLab.jar used for indexing built?\n\t * @return date/time stamp\n\t */\n\tString indexBlackLabVersion();\n\n\t/**\n\t * How many tokens are in the index?\n\t * @return number of tokens\n\t */\n\tlong tokenCount();\n\n\t/**\n\t * Is this a new, empty index?\n\t *\n\t * An empty index is one that doesn't have a main contents field yet,\n\t * or has a main contents field but no indexed tokens yet.\n\t *\n\t * @return true if it is, false if not.\n\t */\n\tboolean isNewIndex();\n\n default boolean subannotationsStoredWithParent() {\n return false;\n }\n\t\n}",
"public MapResult() {\n }",
"protected MapImpl() {\n }",
"public boolean initializeIndexReader() {\n return initializeIndexReader(Constants.INDEX_DIRECTORY);\n }",
"public PPIndexManager(FileHelper file_helper) {\n\t\tthis.file_helper = file_helper;\n\t}",
"public MapperBase() {\r\n }",
"private XContentBuilder createMappingObject() throws IOException {\n return XContentFactory.jsonBuilder()\n .startObject()\n .startObject(type)\n .startObject(ES_PROPERTIES)\n .startObject(\"externalId\")\n .field(ES_TYPE, ES_TYPE_STRING)\n .endObject()\n .startObject(\"sourceUri\")\n .field(ES_TYPE, ES_TYPE_STRING)\n .endObject()\n .startObject(\"kind\")\n .field(ES_TYPE, ES_TYPE_STRING)\n .endObject()\n .startObject(\"name\")\n .field(ES_TYPE, ES_TYPE_STRING)\n .endObject()\n .startObject(\"fields\")\n .field(ES_TYPE, ES_TYPE_NESTED)\n .startObject(ES_PROPERTIES)\n .startObject(\"name\")\n .field(ES_TYPE, ES_TYPE_STRING)\n .endObject()\n .startObject(\"value\")\n .field(ES_TYPE, ES_TYPE_STRING)\n .endObject()\n .endObject()\n .endObject()\n .endObject()\n .endObject()\n .endObject();\n }",
"LuceneMemoryIndex createLuceneMemoryIndex();",
"public static void initialize() throws IOException {\n\t\tString config_path = \"./configure.txt\";\n\t\tFile config = new File(config_path);\n\t\tif (!config.exists()) {\n\t\t\tSystem.err.println(\"Cannot find configuration file\");\n\t\t\treturn;\n\t\t}\n\t\tBufferedReader reader = new BufferedReader(new FileReader(config));\n\t\tString data_path = reader.readLine();\n\t\treader.close();\n\n\t\t/* Compression method */\n\t\tString compression = \"Gamma\";\n\t\t/* Get index */\n\t\tString className = \"dm341.index.\" + compression + \"Index\";\n\t\ttry {\n\t\t\tClass<?> indexClass = Class.forName(className);\n\t\t\tindex = (BaseIndex) indexClass.newInstance();\n\t\t} catch (Exception e) {\n\t\t\tSystem.err\n\t\t\t\t\t.println(\"Index method must be \\\"Basic\\\", \\\"VB\\\", or \\\"Gamma\\\"\");\n\t\t\tthrow new RuntimeException(e);\n\t\t}\n\n\t\t/* Get index directory */\n\t\tString input_path = data_path + \"/FEC/output\";\n\t\tFile inputdir = new File(input_path);\n\t\tif (!inputdir.exists() || !inputdir.isDirectory()) {\n\t\t\tSystem.err.println(\"Invalid index directory: \" + input_path);\n\t\t\treturn;\n\t\t}\n\n\t\t/* Index file */\n\t\tindexFile = new RandomAccessFile(new File(input_path,\n\t\t\t\t\"corpus.index\"), \"r\");\n\t\tfc = indexFile.getChannel();\n\n\t\tString line = null;\n\t\t/* Term dictionary */\n\t\tBufferedReader termReader = new BufferedReader(new FileReader(new File(\n\t\t\t\tinput_path, \"term.dict\")));\n\t\twhile ((line = termReader.readLine()) != null) {\n\t\t\tString[] tokens = line.split(\"\\t\");\n\t\t\ttermDict.put(tokens[0], Integer.parseInt(tokens[1]));\n\t\t}\n\t\ttermReader.close();\n\n\t\t/* Com dictionary */\n\t\tBufferedReader docReader = new BufferedReader(new FileReader(new File(\n\t\t\t\tinput_path, \"com.dict\")));\n\t\twhile ((line = docReader.readLine()) != null) {\n\t\t\tString[] tokens = line.split(\"\\t\");\n\t\t\tdocDict.put(Integer.parseInt(tokens[2]), tokens[0] + \"\\t\" + tokens[1]);\n\t\t}\n\t\tdocReader.close();\n\n\t\t/* Posting dictionary */\n\t\tBufferedReader postReader = new BufferedReader(new FileReader(new File(\n\t\t\t\tinput_path, \"posting.dict\")));\n\t\twhile ((line = postReader.readLine()) != null) {\n\t\t\tString[] tokens = line.split(\"\\t\");\n\t\t\tposDict.put(Integer.parseInt(tokens[0]), Long.parseLong(tokens[1]));\n\t\t\tfreqDict.put(Integer.parseInt(tokens[0]),\n\t\t\t\t\tInteger.parseInt(tokens[2]));\n\t\t}\n\t\tpostReader.close();\n\t}",
"public generateIndex() {\n\n\t\tthis.analyzer = \"StandardAnalyzer\";\n\t}",
"public OBOMapper() {\n this(true);\n }",
"public KrillIndex () throws IOException {\n this((Directory) new RAMDirectory());\n }",
"public Mapping(final ClassLoader loader) {\r\n if (loader == null) {\r\n _classLoader = getClass().getClassLoader();\r\n } else {\r\n _classLoader = loader;\r\n }\r\n }",
"private ImageMappings() {}",
"indexSet createindexSet();",
"public FactoryMapImpl()\n {\n super();\n }",
"public InfinispanDirectory(Cache<?, ?> metadataCache, Cache<?, ?> chunksCache, Cache<?, ?> distLocksCache, String indexName, int chunkSize) {\n this(metadataCache, chunksCache, indexName, makeDefaultLockFactory(distLocksCache, indexName),\n chunkSize, makeDefaultSegmentReadLocker(metadataCache, chunksCache, distLocksCache, indexName));\n }",
"public ProcessDataMapper() {\t}",
"public SleepycatIndexedMapTest(String name) {\r\n super(name);\r\n }",
"public static synchronized IndexingManager getInstance() {\n if (indexManager == null) {\n indexManager = new IndexingManager();\n return indexManager;\n } else {\n return indexManager;\n }\n }",
"public Index initIndex(String indexName) {\n return new Index(this, indexName);\n }",
"public MapContainer(MapProvider provider) {\n this(provider, null);\n }",
"public void initMap() {\r\n\r\n\t\tproviders = new AbstractMapProvider[3];\t\r\n\t\tproviders[0] = new Microsoft.HybridProvider();\r\n\t\tproviders[1] = new Microsoft.RoadProvider();\r\n\t\tproviders[2] = new Microsoft.AerialProvider();\r\n\t\t/*\r\n\t\t * providers[3] = new Yahoo.AerialProvider(); providers[4] = new\r\n\t\t * Yahoo.RoadProvider(); providers[5] = new OpenStreetMapProvider();\r\n\t\t */\r\n\t\tcurrentProviderIndex = 0;\r\n\r\n\t\tmap = new InteractiveMap(this, providers[currentProviderIndex],\r\n\t\t\t\tUtilities.mapOffset.x, Utilities.mapOffset.y,\r\n\t\t\t\tUtilities.mapSize.x, Utilities.mapSize.y);\r\n\t\tmap.panTo(locationUSA);\r\n\t\tmap.setZoom(minZoom);\r\n\r\n\t\tupdateCoordinatesLimits();\r\n\t}",
"@Ignore\n @Test\n public void testCreateIndex() {\n System.out.println(\"createIndex\");\n Util.commonServiceIPs=\"127.0.0.1\";\n \n EntityManager em=Util.getEntityManagerFactory(100).createEntityManager();\n EntityManager platformEm = Util.getPlatformEntityManagerFactory().createEntityManager();\n \n Client client = ESUtil.getClient(em,platformEm,1,false);\n \n RuntimeContext.dataobjectTypes = Util.getDataobjectTypes();\n String indexName = \"test000000\";\n try {\n ESUtil.createIndex(platformEm, client, indexName, true);\n }\n catch(Exception e)\n {\n \n }\n \n\n }",
"public IndexDatabase(String index_path) {\n int k;\n long p;\n try {\n pre_file = new RandomAccessFile(index_path + \"/sorted.kmc_pre\", \"r\");\n pre_file.seek(pre_file.length() - 8);\n header_pos = read_int(pre_file);\n pre_file.seek(pre_file.length() - 8 - header_pos);\n // read the index properties \n K = read_int(pre_file);\n mode = read_int(pre_file);\n ctr_size = read_int(pre_file);\n pre_len = read_int(pre_file);\n min_count = read_int(pre_file);\n max_count = read_int(pre_file);\n kmers_num = read_long(pre_file);\n suf_len = K - pre_len;\n key = new kmer(K, pre_len, suf_len);\n System.out.println(\"Indexing \" + kmers_num + \" kmers... \");\n // load the prefix file into the memory \n pre_file.seek(4);\n int q, len = 1 << (2 * pre_len);\n prefix_ptr = new long[len];\n MappedByteBuffer pre_buff;\n for (q = 0, p = 0; p < 8; ++p) {\n pre_buff = pre_file.getChannel().map(FileChannel.MapMode.READ_ONLY, 4 + p * len, len);\n for (k = 0; k < len / 8; ++k, ++q) {\n prefix_ptr[q] = read_long(pre_buff);\n }\n pre_buff = null;\n }\n pre_file.close();\n // mapping suffix file into the memory\n suf_rec_size = ctr_size + suf_len / 4;\n MAX_BYTE_COUNT = MAX_BYTE_COUNT / suf_rec_size * suf_rec_size;\n suf_parts_num = (int) ((kmers_num * suf_rec_size) % MAX_BYTE_COUNT == 0 ? (kmers_num * suf_rec_size) / MAX_BYTE_COUNT : (kmers_num * suf_rec_size) / MAX_BYTE_COUNT + 1);\n suf_parts_size = new long[suf_parts_num];\n suf_file = new RandomAccessFile(index_path + \"/sorted.kmc_suf\", \"r\");\n suf_buff = new MappedByteBuffer[suf_parts_num];\n for (k = 0; k < suf_parts_num; ++k) {\n suf_parts_size[k] = (int) (k == suf_parts_num - 1 ? (kmers_num * suf_rec_size) % MAX_BYTE_COUNT : MAX_BYTE_COUNT);\n suf_buff[k] = suf_file.getChannel().map(FileChannel.MapMode.READ_ONLY, 4 + k * suf_parts_size[0], suf_parts_size[k]);\n }\n // mapping pointers file into the memory\n MAX_BYTE_COUNT = MAX_BYTE_COUNT / POINTER_LENGTH * POINTER_LENGTH;\n ptr_parts_num = (int) ((kmers_num * POINTER_LENGTH) % MAX_BYTE_COUNT == 0 ? (kmers_num * POINTER_LENGTH) / MAX_BYTE_COUNT : (kmers_num * POINTER_LENGTH) / MAX_BYTE_COUNT + 1);\n ptr_parts_size = new long[ptr_parts_num];\n ptr_file = new RandomAccessFile(index_path + \"/pointers.db\", \"rw\");\n ptr_buff = new MappedByteBuffer[ptr_parts_num];\n for (k = 0; k < ptr_parts_num; ++k) {\n ptr_parts_size[k] = (int) (k == ptr_parts_num - 1 ? (kmers_num * POINTER_LENGTH) % MAX_BYTE_COUNT : MAX_BYTE_COUNT);\n ptr_buff[k] = ptr_file.getChannel().map(FileChannel.MapMode.READ_WRITE, k * ptr_parts_size[0], ptr_parts_size[k]);\n }\n } catch (IOException e) {\n System.out.println(e.getMessage());\n System.exit(1);\n }\n }",
"@Override\r\n public ParaMap index(ParaMap inMap) throws Exception {\n return null;\r\n }",
"public static ElasticSearchMapper getInstance() {\n return ElasticSearchMapperHolder.instance;\n }",
"public OIDCProviderEndpointMetadata() {\n }",
"public DataRepository(Mapper<T, K> mapper){\n this.mapper = mapper;\n }",
"ColumnMapping createColumnMapping(JavaTypeMapping mapping, AbstractMemberMetaData fmd, int index, Column column);",
"public SimpleIndexFactory(Directory directory,Analyzer analyzer) {\n\t\tsetDirectory(directory);\n\t\tsetAnalyzer(analyzer);\n\t}",
"public IndexableDocument() {\n\t\tthis.id=new ObjectId();\n\t}",
"private Map getMapping() {\n return getIndexOperations().getMapping();\n }",
"private XContentBuilder prepareLoanIndexMapping() throws IOException {\n\t\tXContentBuilder loanMapping = XContentFactory.jsonBuilder()\n\t\t\t\t// entity..\n\t\t\t\t.startObject().startObject(TYPE_ENTITY).startObject(PROPERTIES)\n\t\t\t\t// identification no..\n\t\t\t\t.startObject(Tag.IDENTIFICATION_NO).field(TYPE, KEYWORD).endObject()\n\t\t\t\t// name..\n\t\t\t\t.startObject(Tag.NAME).field(TYPE, TEXT).endObject()\n\t\t\t\t// surname..\n\t\t\t\t.startObject(Tag.SURNAME).field(TYPE, TEXT).endObject()\n\t\t\t\t// monthly income..\n\t\t\t\t.startObject(Tag.MONTHLY_INCOME).field(TYPE, DOUBLE).endObject()\n\t\t\t\t// phone no..\n\t\t\t\t.startObject(Tag.PHONE_NO).field(TYPE, TEXT).endObject()\n\t\t\t\t// credit limit..\n\t\t\t\t.startObject(Tag.CREDIT_RESULT).field(TYPE, BOOLEAN).endObject()\n\t\t\t\t// credit limit..\n\t\t\t\t.startObject(Tag.CREDIT_LIMIT).field(TYPE, DOUBLE).endObject()\n\t\t\t\t// credit score..\n\t\t\t\t.startObject(Tag.CREDIT_SCORE).field(TYPE, DOUBLE).endObject().endObject().endObject().endObject();\n\t\treturn loanMapping;\n\t}",
"public void start() throws Exception {\n\n createIndex();\n }",
"public indexing() {\n initComponents();\n }",
"public void setIndexObjectFactory(BLIndexObjectFactory factory) {\n this.indexObjectFactory = factory;\n }",
"public abstract void factory(Dictionary dictionary, Suggester suggester, IndexFacade aprioriIndex, String aprioriIndexField, Analyzer aprioriAnalyzer, IndexWriter.MaxFieldLength mfl) throws IOException, QueryException;",
"public AbstractSearchEngine() {}",
"public IndexWriter(String indexDir) {\n\t\t//TODO : YOU MUST IMPLEMENT THIS\n\tif (indexDir!=null)\n\t{System.setProperty(\"INDEX.DIR\",(this.indexDir=indexDir));\n\tisvaliddir=true;\n\tiutil=new IndexUtil(indexDir);\n\t}\n\t\n\t}",
"private IndexMetadata createUpdatedIndexMetadata(IndexMetadata indexMetadata) {\n return IndexMetadata.builder(indexMetadata)\n .putMapping(\n createUpdatedIndexMetadata(\n indexMetadata.mapping(),\n indexMetadata.getIndex().getName()\n ))\n .build();\n }",
"protected void constructIndex(DocumentInfo doc, Map index,\n KeyDefinition keydef,\n BuiltInAtomicType soughtItemType,\n Set foundItemTypes, XPathContext context,\n boolean isFirst)\n throws XPathException \n {\n PatternFinder match = keydef.getMatch();\n if (match instanceof NodeTestPattern) {\n match = new FastNodeTestPattern(((NodeTestPattern)match).getNodeTest());\n KeyDefinition oldDef = keydef;\n keydef = new KeyDefinition(match, \n oldDef.getUse(),\n oldDef.getCollationName(), \n oldDef.getCollation());\n }\n super.constructIndex(doc, index, keydef, soughtItemType,\n foundItemTypes, context, isFirst);\n }",
"private static RDFIndex createDefaultIndex() {\n defaultIndex = new RDFIndex(com.hp.hpl.jena.graph.Factory.createGraphMem());\n try {\n File indexFile = new File(INDEX_FILE);\n if(indexFile.exists()) {\n defaultIndex.read(new FileReader(indexFile),Constants.RESOURCE_URL);\n }\n } catch(Throwable t) {\n t.printStackTrace();\n }\n return defaultIndex;\n }",
"private BrowseIndex(String baseName) {\n this(baseName, \"item\");\n }",
"protected StandardEntrySet() {}",
"public void setUp() throws Exception {\n Project project = new Project();\n\n IndexTask task = new IndexTask();\n FileSet fs = new FileSet();\n fs.setDir(new File(docsDir));\n task.addFileset(fs);\n task.setOverwrite(true);\n task.setDocumentHandler(docHandler);\n task.setIndex(new File(indexDir));\n task.setProject(project);\n task.execute();\n\n searcher = new IndexSearcher(indexDir);\n analyzer = new StopAnalyzer();\n }",
"@Test\n public void testMetadataMapping() {\n PathMappingConfig filterConfig = new PathMappingConfig();\n filterConfig.setMapSource(Metadata);\n filterConfig.setMetadataName(mappingMetadataName);\n\n SyncOptions options = new SyncOptions();\n\n TestStorage source = initializeSourceStorage(options, true);\n\n // build sync config\n SyncConfig syncConfig = new SyncConfig();\n syncConfig.setOptions(options);\n syncConfig.setFilters(Collections.singletonList(filterConfig));\n syncConfig.setTarget(testConfig);\n EcsSync sync = new EcsSync();\n sync.setSyncConfig(syncConfig);\n sync.setSource(source);\n TestUtil.run(sync);\n\n validateMappingResults((TestStorage) sync.getTarget());\n }",
"private void init() {\n\t\tmap = new LinkedHashMap<String, HeaderData>();\r\n\t\tList<HeaderData> list = config.getColumns();\r\n\t\tfor(HeaderData info: list){\r\n\t\t\tString id = info.getId();\r\n\t\t\tif(id == null) throw new IllegalArgumentException(\"Null id found for \"+info.getClass().getName());\r\n\t\t\t// Map the id to info\r\n\t\t\tmap.put(info.getId(), info);\r\n\t\t}\r\n\t}",
"public ConfigMetadataProcessor() {\n }",
"public FeatureGroupMappingFactoryImpl()\r\n {\r\n super();\r\n }",
"public AttributeMap()\r\n\t{\r\n\t\tsuper();\r\n\t}",
"public Mapping createInstance(List<Document> xbrlDocuments) {\n Mapping mapping = buildXmlBasedMapping();\n MappingDiscoverer discoverer = buildBasicDiscoverer(xbrlDocuments, mapping);\n discoverer.discoverMapping();\n return mapping;\n }",
"private void init(int bytesPerId, int bytesPerType, int bytesPerPath) throws IOException {\n this.indexVersion = INDEX_VERSION;\n this.bytesPerId = bytesPerId;\n this.bytesPerType = bytesPerType;\n this.bytesPerPath = bytesPerPath;\n this.bytesPerSlot = bytesPerId + bytesPerType + bytesPerPath;\n this.entries = 0;\n \n logger.info(\"Creating uri index with {} bytes per entry\", bytesPerSlot);\n \n // Write header\n idx.seek(IDX_START_OF_HEADER);\n idx.writeInt(indexVersion);\n idx.writeInt(bytesPerId);\n idx.writeInt(bytesPerType);\n idx.writeInt(bytesPerPath);\n idx.writeLong(slots);\n idx.writeLong(entries);\n \n // If this file used to contain entries, we just null out the rest\n try {\n byte[] bytes = new byte[bytesPerSlot - 2];\n while (idx.getFilePointer() < idx.length()) {\n idx.writeChar('\\n');\n idx.write(bytes);\n }\n } catch (EOFException e) {\n // That's ok, we wanted to write until the very end\n }\n \n logger.debug(\"Uri index created\");\n }",
"public MetadataScanner()\n {\n this(\"\");\n }",
"public MapOther() {\n }",
"public void createIndex(Configuration configuration){\n }",
"public OwnMap() {\n super();\n keySet = new OwnSet();\n }",
"private BrowseIndex() {\n }",
"private IndexBitmapObject() {\n\t}",
"public HashEntityMap()\n\t\t{\n\t\t\tmapNameToValue = new HashMap<String, Integer>();\n\t\t}",
"public MongoManager()\n\t{\n\t\ttry\n\t\t{\n\t\t/*\tmorphia = new Morphia();\n\t\t\tclient = new MongoClient();\n\t\t\tmorphia.mapPackage(\"com.glenwood.kernai.data.entity\");\n\t\t\tdatastore = morphia.createDatastore(client, \"Kernai\");\n\t\t\tdatastore.ensureIndexes();\n\t\t*/\t\n\t\t}\n\t\tcatch(Exception ex)\n\t\t{\n\t\t\tthrow ex;\n\t\t}\n\t\n\t}",
"@Override\n public boolean initializeIndexReader(String filename) {\n try {\n READER = DirectoryReader.open(FSDirectory.open(FileSystems.getDefault().getPath(filename)));\n } catch (IOException e) {\n READER = null;\n log.error(\"Failed to instantiate the index api.reader with directory: \" + filename);\n }\n return isInitialized();\n }"
] | [
"0.72981954",
"0.67768586",
"0.65010625",
"0.6403421",
"0.63089454",
"0.6243386",
"0.6208882",
"0.6088878",
"0.5942625",
"0.5903637",
"0.584453",
"0.58438885",
"0.58133096",
"0.5774515",
"0.5758679",
"0.57504267",
"0.57300436",
"0.5729148",
"0.5705123",
"0.5641265",
"0.563508",
"0.5629508",
"0.5618353",
"0.5594643",
"0.558711",
"0.5583888",
"0.55773324",
"0.5555958",
"0.55496055",
"0.55296725",
"0.55177397",
"0.5516212",
"0.54891765",
"0.5480573",
"0.54680437",
"0.5467634",
"0.54539675",
"0.5447281",
"0.5444605",
"0.5443531",
"0.5438775",
"0.5404007",
"0.54031545",
"0.5390467",
"0.5340508",
"0.53355336",
"0.532247",
"0.53191596",
"0.5309956",
"0.5301793",
"0.5298193",
"0.52971506",
"0.52964187",
"0.5272584",
"0.5267816",
"0.5254962",
"0.5253359",
"0.524944",
"0.5247395",
"0.5244125",
"0.52423143",
"0.5240638",
"0.52341145",
"0.52294695",
"0.52278906",
"0.5222728",
"0.52205604",
"0.5210886",
"0.5209066",
"0.5204873",
"0.5204816",
"0.5202737",
"0.5202497",
"0.5191681",
"0.5187",
"0.5176956",
"0.51760817",
"0.5175033",
"0.5174396",
"0.5161118",
"0.51591444",
"0.5142465",
"0.51399106",
"0.51378965",
"0.51249343",
"0.512163",
"0.51196635",
"0.51191735",
"0.51137835",
"0.51098645",
"0.51068926",
"0.510515",
"0.5100579",
"0.5098905",
"0.50987554",
"0.509829",
"0.50750375",
"0.5074746",
"0.50720394",
"0.50651056"
] | 0.6539216 | 2 |
Gets the value of the Product field. | @gw.internal.gosu.parser.ExtendedProperty
public entity.APDProduct getProduct(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public java.lang.String getProduct() {\n return product;\n }",
"public String getProduct() {\r\n return this.product;\r\n }",
"public String getProduct() {\n return this.product;\n }",
"public String getProduct() {\n return product;\n }",
"public String getProduct() {\n return product;\n }",
"public String product() {\n return this.product;\n }",
"public String getProduct()\n {\n return product;\n }",
"public T getProduct() {\n return this.product;\n }",
"public String getProductAttrValue() {\n return (String)getAttributeInternal(PRODUCTATTRVALUE);\n }",
"public Product getProduct() {\n\t\treturn product;\n\t}",
"@Override\n\tpublic Product getProduct() {\n\t\treturn product;\n\t}",
"public ProductType getProduct() {\n return product;\n }",
"public String getProductId() {\n return productId;\n }",
"public String getProductId() {\n return productId;\n }",
"public String getProductId() {\n return productId;\n }",
"public String getProductId() {\n return productId;\n }",
"public String getProductId() {\n return productId;\n }",
"public String getProductId() ;",
"public String getProductNo() {\n\t\treturn productNo;\n\t}",
"public ProductModel getProduct()\n\t{\n\t\treturn product;\n\t}",
"public String getProductNumber() {\n\t\treturn productNumber;\n\t}",
"public String getProductCode() {\n return productCode;\n }",
"public String getProductID() {\r\n return productID;\r\n }",
"public String getProductId();",
"public org.mrk.grpc.catalog.Product getProduct() {\n return product_ == null ? org.mrk.grpc.catalog.Product.getDefaultInstance() : product_;\n }",
"Object getProduct();",
"public String getProductCode() {\n return this.productCode;\n }",
"public org.mrk.grpc.catalog.Product getProduct() {\n if (productBuilder_ == null) {\n return product_ == null ? org.mrk.grpc.catalog.Product.getDefaultInstance() : product_;\n } else {\n return productBuilder_.getMessage();\n }\n }",
"protected String getProductId() {\n return productId;\n }",
"String getProduct();",
"public String getProductId() {\r\n\t\treturn productId;\r\n\t}",
"@Override\n\tpublic int getPrice() {\n\t\treturn product.getPrice();\n\t}",
"public double getProductPrice() {\n return productPrice;\n }",
"public String getProductid() {\n return productid;\n }",
"public Integer getProductId() {\r\n return productId;\r\n }",
"public Integer getProductId() {\r\n return productId;\r\n }",
"public String getProductno() {\n return productno;\n }",
"public String getProduct_id() {\n return product_id;\n }",
"public String getProduct_id() {\n return product_id;\n }",
"public Integer getProductId() {\n return productId;\n }",
"public Integer getProductId() {\n return productId;\n }",
"public Integer getProductId() {\n return productId;\n }",
"public Integer getProductId() {\n return productId;\n }",
"public Integer getProductId() {\n return productId;\n }",
"public Integer getProductId() {\n return productId;\n }",
"public Integer getProductPrice() {\n\t\treturn productPrice;\n\t}",
"public String getProductReference() {\n return productReference;\n }",
"public Integer getProductCode() {\n\t\treturn productCode;\n\t}",
"@Override\n\tpublic Product getProduct() {\n\t\treturn productDao.getProduct();\n\t}",
"String getProductId();",
"public Integer getProductAttributeValueId() {\n return productAttributeValueId;\n }",
"public String getProductName() {\n return productName;\n }",
"public String getProductName() {\n return productName;\n }",
"public String getProductName() {\n return productName;\n }",
"public java.lang.String getProductName() {\n return productName;\n }",
"public String getProductName() {\r\n return productName;\r\n }",
"public double getPrice(){\n\t\treturn Price; // Return the product's price\n\t}",
"public Long getProductId() {\n\t\treturn productId;\n\t}",
"public String getProdDetailsPrice(){\n String prodPrice = productDetailsPrice.toString();\n return prodPrice;\n }",
"public String getProductLine() {\n return productLine;\n }",
"public Integer getProductId() {\n\t\treturn productId;\n\t}",
"public int getProductId() {\n return productId;\n }",
"public int getProductId() {\n return productId;\n }",
"public double getValorProduto() {\n return valorProduto;\n }",
"public Double getProductQty() {\n return productQty;\n }",
"@JsonGetter(\"product_id\")\n public Integer getProductId ( ) { \n return this.productId;\n }",
"public List<ProductInner> value() {\n return this.value;\n }",
"x0401.oecdStandardAuditFileTaxPT1.ProductDocument.Product getProduct();",
"public byte getIProduct() {\r\n\t\treturn iProduct;\r\n\t}",
"public String getProductToCompare() {\n return mProductToCompare;\n }",
"@ManyToOne(fetch=FetchType.LAZY)\r\n\t@JoinColumn(name=\"PID\")\r\n\tpublic Product getProduct() {\r\n\t\treturn this.product;\r\n\t}",
"public String getProductName() {\r\n\t\treturn productName;\r\n\t}",
"public int getProductId() {\n\t\treturn productId;\n\t}",
"public Producto getProducto() {\n\t\treturn producto;\n\t}",
"public String getProductName() {\n\t\treturn productName;\n\t}",
"public short getIdProduct() {\r\n\t\treturn idProduct;\r\n\t}",
"public String getXpeProductId() {\n return (String) getAttributeInternal(XPEPRODUCTID);\n }",
"public java.lang.String getProductName () {\r\n\t\treturn productName;\r\n\t}",
"public int getProduct_id() {\r\n\t\treturn product_id;\r\n\t}",
"java.lang.String getProductCode();",
"public String getProductType() {\n\t\treturn productType;\n\t}",
"public String getProductCode() {\r\n/* 211 */ return this._productCode;\r\n/* */ }",
"public int getProduct_id() {\n\t\treturn product_id;\n\t}",
"public java.lang.String getProductInfo () {\n\t\treturn productInfo;\n\t}",
"public java.lang.Double getProductPrice () {\r\n\t\treturn productPrice;\r\n\t}",
"public String getProductProcess() {\n return productProcess;\n }",
"public int getProductPrice(){\n return this.productRelation.getCost();\n }",
"public String getAcsProduct() {\n return acsProduct;\n }",
"public String getUserecommendedproduct() {\r\n return userecommendedproduct;\r\n }",
"public String getCodProd() {\n return this.codProd;\n }",
"String getTheirProductId();",
"public String getPricePro() {\n return pricePro;\n }",
"public ProductInfoType getProductInfo() {\n\t return this.productInfo;\n\t}",
"public int getOrderProductNum()\r\n {\n return this.orderProductNum;\r\n }",
"public String getValue() {\r\n\t\tAllowedKey tp = this.getAllowedKey();\r\n\t\tKeyMask km = this.getKeyMask();\r\n\r\n\t\tif (tp == TextFieldExt.AllowedKey.AK_SOLO_NUMEROS) {\r\n\t\t\tif (km == TextFieldExt.KeyMask.KM_Moneda)\r\n\t\t\t\treturn StringTools.parseFromQuantityToNumber(this.getText().trim());\r\n\t\t\telse {\r\n\t\t\t\tif (km == TextFieldExt.KeyMask.KM_Numero)\r\n\t\t\t\t\treturn StringTools.parseFromQuantityToNumber(this.getText().trim());\r\n\t\t\t\telse\r\n\t\t\t\t\treturn this.getText().trim();\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tif (tp == TextFieldExt.AllowedKey.AK_NUMEROS_CON_FRACCION) {\r\n\t\t\t\tif (km == TextFieldExt.KeyMask.KM_Moneda)\r\n\t\t\t\t\treturn StringTools.parseFromQuantityToNumber(this.getText().trim());\r\n\t\t\t\telse {\r\n\t\t\t\t\tif (km == TextFieldExt.KeyMask.KM_Numero)\r\n\t\t\t\t\t\treturn StringTools.parseFromQuantityToNumber(this.getText().trim());\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\treturn this.getText().trim();\r\n\t\t\t\t}\r\n\t\t\t} else\r\n\t\t\t\treturn this.getText().trim();\r\n\t\t}\r\n\t}",
"@Override\r\n\tpublic Porduct GetResult() {\n\t\treturn product;\r\n\t}",
"public com.monitor.webService.VoProducto getProducto() {\r\n return producto;\r\n }",
"public String getProd_id() {\r\n\t\treturn prod_id;\r\n\t}",
"public void setProduct(entity.APDProduct value);",
"public org.mrk.grpc.catalog.ProductOrBuilder getProductOrBuilder() {\n if (productBuilder_ != null) {\n return productBuilder_.getMessageOrBuilder();\n } else {\n return product_ == null ?\n org.mrk.grpc.catalog.Product.getDefaultInstance() : product_;\n }\n }"
] | [
"0.7565016",
"0.75535846",
"0.7521575",
"0.75013363",
"0.75013363",
"0.7425641",
"0.7371239",
"0.7288672",
"0.7136345",
"0.71098506",
"0.70088726",
"0.69489926",
"0.6820733",
"0.6820733",
"0.6820733",
"0.6820733",
"0.6820733",
"0.6818324",
"0.6804304",
"0.67813665",
"0.67433566",
"0.67380625",
"0.67335296",
"0.67303556",
"0.67155516",
"0.6713054",
"0.67070967",
"0.66919446",
"0.66749185",
"0.66580915",
"0.6654489",
"0.6615305",
"0.6587708",
"0.658707",
"0.65853095",
"0.65853095",
"0.65848124",
"0.6571227",
"0.6571227",
"0.65495515",
"0.65495515",
"0.65495515",
"0.65495515",
"0.65495515",
"0.65495515",
"0.6543833",
"0.65350133",
"0.6504627",
"0.65035635",
"0.65013933",
"0.64946467",
"0.64174736",
"0.64174736",
"0.64174736",
"0.6412861",
"0.6407554",
"0.6406459",
"0.6392215",
"0.63801414",
"0.6378503",
"0.63741505",
"0.635486",
"0.635486",
"0.63440037",
"0.6339882",
"0.6293504",
"0.6281739",
"0.6280859",
"0.6274038",
"0.6268985",
"0.6268229",
"0.6244057",
"0.6238028",
"0.62289184",
"0.6226014",
"0.6222733",
"0.6215868",
"0.6201038",
"0.6198564",
"0.6191915",
"0.6184958",
"0.6173504",
"0.616846",
"0.616814",
"0.6157162",
"0.61519164",
"0.61449593",
"0.6141499",
"0.61270684",
"0.6096291",
"0.6075061",
"0.6060734",
"0.60603756",
"0.6053538",
"0.6048828",
"0.60463625",
"0.6044873",
"0.60431135",
"0.60427713",
"0.60392374"
] | 0.6865983 | 12 |
Gets the value of the ProductLine field. | @gw.internal.gosu.parser.ExtendedProperty
public entity.APDProductLine getProductLine(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getProductLine() {\n return productLine;\n }",
"public void setProductLine(entity.APDProductLine value);",
"public void setProductLine(String productLine) {\n this.productLine = productLine == null ? null : productLine.trim();\n }",
"public String getLine() {\n\t\treturn line.toString();\n\t}",
"public String getProduct() {\r\n return this.product;\r\n }",
"public BigDecimal getLINE_NO() {\r\n return LINE_NO;\r\n }",
"public BigDecimal getLINE_NO() {\r\n return LINE_NO;\r\n }",
"public BigDecimal getLINE_NO() {\r\n return LINE_NO;\r\n }",
"public BigDecimal getLINE_NO() {\r\n return LINE_NO;\r\n }",
"public String getProduct() {\n return this.product;\n }",
"public EI getProviderProductServiceLineItemNumber() { \r\n\t\tEI retVal = this.getTypedField(1, 0);\r\n\t\treturn retVal;\r\n }",
"public String getLine() {\n return this.line;\n }",
"public java.lang.String getProduct() {\n return product;\n }",
"@JsonProperty(\"OrderLine\")\r\n\tpublic OrderLine getOrderLine() {\r\n\t\treturn orderLine;\r\n\t}",
"public String getProductNo() {\n\t\treturn productNo;\n\t}",
"public String getProduct() {\n return product;\n }",
"public String getProduct() {\n return product;\n }",
"public EI getPayerProductServiceLineItemNumber() { \r\n\t\tEI retVal = this.getTypedField(2, 0);\r\n\t\treturn retVal;\r\n }",
"public EI getPsl2_PayerProductServiceLineItemNumber() { \r\n\t\tEI retVal = this.getTypedField(2, 0);\r\n\t\treturn retVal;\r\n }",
"public EI getPsl1_ProviderProductServiceLineItemNumber() { \r\n\t\tEI retVal = this.getTypedField(1, 0);\r\n\t\treturn retVal;\r\n }",
"public String product() {\n return this.product;\n }",
"public String getline() {\n\t\treturn _line;\n\t}",
"public Long getLineCarriageprice() {\n return lineCarriageprice;\n }",
"public Line getLine()\n {\n return line;\n }",
"public String getProduct()\n {\n return product;\n }",
"public String getOrderLineNum() {\n return orderLineNum;\n }",
"public Line getLine ()\r\n {\r\n if (line == null) {\r\n computeLine();\r\n }\r\n\r\n return line;\r\n }",
"@RequestMapping(value = \"/Productlines/{productlines_productLine}\", method = RequestMethod.GET)\n\tpublic Productlines loadProductlines(@PathVariable String productlines_productLine) {\n\t\treturn productlinesDAO.findProductlinesByPrimaryKey(productlines_productLine);\n\t}",
"public Number getProdLId() {\n return (Number)getAttributeInternal(PRODLID);\n }",
"public String getLineId() {\n return lineId;\n }",
"public Number getLineId() {\n return (Number) getAttributeInternal(LINEID);\n }",
"public String getProductno() {\n return productno;\n }",
"public String getProductProcess() {\n return productProcess;\n }",
"public ProductLine productLineById(ProductLine productLine, Connection con) throws SQLException {\r\n\r\n\t\tStatement stmt = con.createStatement();\r\n\t\tString productlineid = productLine.getProductLine();\r\n\t\tString query = \"select product_line,text_description,html_description,image from productlines where product_line= '\"\r\n\t\t\t\t+ productlineid + \"'And record_status>0\";\r\n\t\tResultSet rs = stmt.executeQuery(query);\r\n\t\twhile (rs.next()) {\r\n\t\t\tproductLine.setProductLine(rs.getString(\"product_line\"));\r\n\t\t\tproductLine.setTextDescription(rs.getString(\"text_description\"));\r\n\t\t\tproductLine.setHtmlDescription(rs.getString(\"html_description\"));\r\n\t\t\tproductLine.setImage(rs.getBytes(\"image\"));\r\n\t\t}\r\n\r\n\t\treturn productLine;\r\n\r\n\t}",
"@Override\n public Line getLine() {\n return line;\n }",
"public Number getLineId() {\n return (Number)getAttributeInternal(LINEID);\n }",
"public Number getLineId() {\n return (Number)getAttributeInternal(LINEID);\n }",
"public String getProductCode() {\n return this.productCode;\n }",
"public String getProductNumber() {\n\t\treturn productNumber;\n\t}",
"public String getProductCode() {\n return productCode;\n }",
"@XmlElement(name =\"RECEIPTLINE\",defaultValue = \"\")\n public String getReceiptLine() {\n return receiptLine;\n }",
"public void setLineCarriageprice(Long lineCarriageprice) {\n this.lineCarriageprice = lineCarriageprice;\n }",
"public CommandLine getLine() {\n return line;\n }",
"public Double getProductQty() {\n return productQty;\n }",
"public String getLine() {\n \treturn this.lineColor;\n }",
"public String getProductReference() {\n return productReference;\n }",
"@RequestMapping(value = \"/Productlines/{productlines_productLine}/productses\", method = RequestMethod.GET)\n\tpublic List<Products> getProductlinesProductses(@PathVariable String productlines_productLine) {\n\t\treturn new java.util.ArrayList<Products>(productlinesDAO.findProductlinesByPrimaryKey(productlines_productLine).getProductses());\n\t}",
"public SI getProductServiceLineItemSequenceNumber() { \r\n\t\tSI retVal = this.getTypedField(3, 0);\r\n\t\treturn retVal;\r\n }",
"public com.commercetools.history.models.common.LocalizedString getCustomLineItem() {\n return this.customLineItem;\n }",
"public String getProductID() {\r\n return productID;\r\n }",
"Productline_decl getProductline_decl();",
"@Override\n public PurchaseOrderLine getOrderLine(int index) {\n return orderLines.get(index);\n }",
"@SuppressWarnings(\"unchecked\")\n public PropertyValue<String> getLineColor() {\n return (PropertyValue<String>) new PropertyValue(nativeGetLineColor());\n }",
"public Product getProduct() {\n\t\treturn product;\n\t}",
"public String getProductId() {\n return productId;\n }",
"public String getProductId() {\n return productId;\n }",
"public String getProductId() {\n return productId;\n }",
"public String getProductId() {\n return productId;\n }",
"public String getProductId() {\n return productId;\n }",
"@gw.internal.gosu.parser.ExtendedProperty\n public entity.APDProduct getProduct();",
"protected String getProductId() {\n return productId;\n }",
"public T getProduct() {\n return this.product;\n }",
"public String getCustomLineItemId() {\n return this.customLineItemId;\n }",
"public String getProduct_id() {\n return product_id;\n }",
"public String getProduct_id() {\n return product_id;\n }",
"public String getProductId() {\r\n\t\treturn productId;\r\n\t}",
"public String getLine ()\n {\n return line;\n }",
"public org.mrk.grpc.catalog.Product getProduct() {\n return product_ == null ? org.mrk.grpc.catalog.Product.getDefaultInstance() : product_;\n }",
"public int getSelectedLine() {\n\t\treturn selectedLine;\n\t}",
"public Integer getProductCode() {\n\t\treturn productCode;\n\t}",
"public SI getPsl3_ProductServiceLineItemSequenceNumber() { \r\n\t\tSI retVal = this.getTypedField(3, 0);\r\n\t\treturn retVal;\r\n }",
"public String getProductid() {\n return productid;\n }",
"public int getLine() {\n return line;\n }",
"x0401.oecdStandardAuditFileTaxPT1.ProductDocument.Product getProduct();",
"public BigDecimal getSUB_LINE_NO() {\r\n return SUB_LINE_NO;\r\n }",
"public double getProductPrice() {\n return productPrice;\n }",
"public String getCodProd() {\n return this.codProd;\n }",
"public int getLine() {\n return line;\n }",
"public String getAddressLine() {\n\t\treturn this.addressLine;\n\t}",
"public ProductType getProduct() {\n return product;\n }",
"public int getC_OrderLine_ID() {\n\t\tInteger ii = (Integer) get_Value(\"C_OrderLine_ID\");\n\t\tif (ii == null)\n\t\t\treturn 0;\n\t\treturn ii.intValue();\n\t}",
"@Override\n\tpublic Product getProduct() {\n\t\treturn product;\n\t}",
"public String getProductAttrValue() {\n return (String)getAttributeInternal(PRODUCTATTRVALUE);\n }",
"public int getLine() {\r\n return line;\r\n }",
"public String getProductCode() {\r\n/* 211 */ return this._productCode;\r\n/* */ }",
"@RequestMapping(value = \"/ProductlinesJson/{productlines_productLine}/productses\", method = RequestMethod.GET, produces=\"application/json\")\n\t@ResponseBody\n\tpublic List<Products> getProductlinesProductsesJson(@PathVariable String productlines_productLine) {\n\t\treturn new java.util.ArrayList<Products>(productlinesDAO.findProductlinesByPrimaryKey(productlines_productLine).getProductses());\n\t}",
"@ManyToOne(fetch=FetchType.LAZY)\r\n\t@JoinColumn(name=\"PID\")\r\n\tpublic Product getProduct() {\r\n\t\treturn this.product;\r\n\t}",
"public String getProd_id() {\r\n\t\treturn prod_id;\r\n\t}",
"public Integer getProductPrice() {\n\t\treturn productPrice;\n\t}",
"public Color getLineColor() {\n return lineColor;\n }",
"public org.mrk.grpc.catalog.Product getProduct() {\n if (productBuilder_ == null) {\n return product_ == null ? org.mrk.grpc.catalog.Product.getDefaultInstance() : product_;\n } else {\n return productBuilder_.getMessage();\n }\n }",
"public String getProdDetailsPrice(){\n String prodPrice = productDetailsPrice.toString();\n return prodPrice;\n }",
"@JsonProperty(\"OrderLine\")\r\n\tpublic void setOrderLine(OrderLine orderLine) {\r\n\t\tthis.orderLine = orderLine;\r\n\t}",
"public List getPoLineItems() {\r\n return poLineItems;\r\n }",
"@Override\n\tpublic int getPrice() {\n\t\treturn product.getPrice();\n\t}",
"public int getLine() {\n\t\treturn line;\n\t}",
"public LineItem(Product product, int quantity) {\n this.product = product;\n this.quantity = quantity;\n }",
"public int getLine() {\r\n\t\treturn line;\r\n\t}",
"@RequestMapping(value = \"/Productlines/{productlines_productLine}/productses/{products_productCode}\", method = RequestMethod.GET)\n\tpublic Products loadProductlinesProductses(@PathVariable String productlines_productLine, @PathVariable String related_productses_productCode) {\n\t\tProducts products = productsDAO.findProductsByPrimaryKey(related_productses_productCode, -1, -1);\n\n\t\treturn products;\n\t}",
"public int getLineType() {\n return lineType;\n }"
] | [
"0.8505578",
"0.71562195",
"0.7080872",
"0.6430066",
"0.64222455",
"0.6392476",
"0.6392476",
"0.6392476",
"0.6392476",
"0.6391266",
"0.639004",
"0.636592",
"0.6343104",
"0.63408023",
"0.63351744",
"0.6333398",
"0.6333398",
"0.6323958",
"0.6315287",
"0.63085717",
"0.63053894",
"0.628104",
"0.62716925",
"0.621167",
"0.6205023",
"0.6199689",
"0.61759806",
"0.6163918",
"0.613547",
"0.61296266",
"0.6117779",
"0.61163783",
"0.6110688",
"0.6074304",
"0.60618",
"0.6033829",
"0.6033829",
"0.5991743",
"0.59794235",
"0.5977261",
"0.59755385",
"0.59494126",
"0.5940682",
"0.59234583",
"0.5922937",
"0.59051925",
"0.58855367",
"0.588279",
"0.58412737",
"0.58112395",
"0.5805903",
"0.57986486",
"0.5790331",
"0.57832986",
"0.5782919",
"0.5782919",
"0.5782919",
"0.5782919",
"0.5782919",
"0.57729363",
"0.57545406",
"0.57415766",
"0.5739129",
"0.57305765",
"0.57305765",
"0.5717204",
"0.5716506",
"0.57103384",
"0.5706091",
"0.57051855",
"0.5699803",
"0.56895155",
"0.5677181",
"0.56568366",
"0.56521916",
"0.56479436",
"0.5643343",
"0.5643264",
"0.56417036",
"0.56411237",
"0.5640614",
"0.5640374",
"0.5635486",
"0.562786",
"0.5626601",
"0.5621153",
"0.56169987",
"0.5598858",
"0.55976856",
"0.5586469",
"0.55786455",
"0.5557378",
"0.55550736",
"0.55466485",
"0.5543086",
"0.5541265",
"0.55405134",
"0.5522572",
"0.55189127",
"0.55177164"
] | 0.7986941 | 1 |
Sets the value of the Product field. | public void setProduct(entity.APDProduct value); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setProduct(final String productValue) {\n this.product = productValue;\n }",
"public void setProduct(Product product) {\n this.product = product;\n }",
"public void setProduct(Product product) {\n this.product = product;\n this.updateTotalPrice();\n }",
"public void setProduct(String product) {\r\n this.product = product;\r\n }",
"public void setProduct(Product product){\n\t\tthis.product = product;\n\t\tnameField.setText(product.getName());\n\t\tamountAvailableField.setText(String.valueOf(product.getAmountAvailable()));\n\t\tamountSoldField.setText(String.valueOf(product.getAmountSold()));\n\t\tpriceEachField.setText(String.valueOf(product.getPriceEach()));\n\t\tpriceMakeField.setText(String.valueOf(product.getPriceMake()));\n\t}",
"public Builder setProduct(org.mrk.grpc.catalog.Product value) {\n if (productBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n product_ = value;\n onChanged();\n } else {\n productBuilder_.setMessage(value);\n }\n\n return this;\n }",
"public void setProduct(java.lang.String product) {\n this.product = product;\n }",
"public void setProduct(final ProductReference product);",
"public void setProductId(String productId) ;",
"public void setProduct(Product selectedProduct) {\n\t\t\n\t\tthis.modifiedProduct = selectedProduct;\n\n\t\tidField.setText(Integer.toString(modifiedProduct.getId()));\n\t\tproductNameField.setText(modifiedProduct.getName());\n\t\tpriceField.setText(Double.toString(modifiedProduct.getPrice()));\n\t\tinvField.setText(Integer.toString(modifiedProduct.getStock()));\n\t\tmaxField.setText(Integer.toString(modifiedProduct.getMax()));\n\t\tminField.setText(Integer.toString(modifiedProduct.getMin()));\n\t\t\t\t\n\t\tdummyList = modifiedProduct.getAllAssociatedParts();\n\t\tpartListProductTable.setItems(dummyList);\n\t}",
"public void setProduct(Product product) {\n mProduct = product;\n mBeaut = mProduct.getBeaut();\n }",
"public void setProductLine(entity.APDProductLine value);",
"protected void setProductId(String productId) {\n this.productId = productId;\n }",
"public void setProduct(Product product) {\n binder.setBean(product);\n }",
"public void setProduct(Product product){\n //set the product fields\n productIdField.setText(String.valueOf(product.getId()));\n productNameField.setText(product.getName());\n productInvField.setText(String.valueOf(product.getInv()));\n productPriceField.setText(Double.toString(product.getPrice()));\n productMaxField.setText(String.valueOf(product.getMax()));\n productMinField.setText(String.valueOf(product.getMin()));\n\n //set the associated parts to the associatedPartTableView\n tmpAssociatedParts.addAll(product.getAllAssociatedParts());\n associatedPartTableView.setItems(tmpAssociatedParts);\n\n }",
"public void setProductPrice(double productPrice) {\n this.productPrice = productPrice;\n }",
"public void setProductId(int productId) {\n this.productId = productId;\n }",
"public void setProductId(int productId) {\n this.productId = productId;\n }",
"public void setPrice (Product product) {\n\t\tpriceLbl.setText(product.getPrice() + \"\");\n\t\tpriceLbl.repaint();\n\t}",
"void setProduct(x0401.oecdStandardAuditFileTaxPT1.ProductDocument.Product product);",
"void setProductCode(java.lang.String productCode);",
"public void setProductQty(Double productQty) {\n this.productQty = productQty;\n }",
"public void setProductId(Integer productId) {\r\n this.productId = productId;\r\n }",
"public void setProductId(Integer productId) {\r\n this.productId = productId;\r\n }",
"public void setProductId(Integer productId) {\n this.productId = productId;\n }",
"public void setProductId(Integer productId) {\n this.productId = productId;\n }",
"public void setProductId(Integer productId) {\n this.productId = productId;\n }",
"public void setProductId(Integer productId) {\n this.productId = productId;\n }",
"public void setProductId(Integer productId) {\n this.productId = productId;\n }",
"public void setProductId(Integer productId) {\n this.productId = productId;\n }",
"public Builder setProduct(\n org.mrk.grpc.catalog.Product.Builder builderForValue) {\n if (productBuilder_ == null) {\n product_ = builderForValue.build();\n onChanged();\n } else {\n productBuilder_.setMessage(builderForValue.build());\n }\n\n return this;\n }",
"@Override\n\tpublic void updateProduct(Product p) {\n\t\tProduct product = productRepository.getOne(p.getId());\n\t\tproduct.setName(p.getName());\n\t\tproduct.setPrice(150000);\n\t\tproductRepository.save(product);\n\t}",
"public void setProductId(String productId) {\n this.productId = productId;\n }",
"public String getProduct() {\r\n return this.product;\r\n }",
"@JsonSetter(\"product_details\")\n public void setProductDetails (ProductData value) { \n this.productDetails = value;\n }",
"public void setM_Product_ID (int M_Product_ID);",
"public void setM_Product_ID (int M_Product_ID);",
"public String getProduct() {\n return this.product;\n }",
"public void setProductName(final String productName);",
"public void setProductCode(String productCode) {\r\n/* 427 */ this._productCode = productCode;\r\n/* */ }",
"public void setProductId(String productId) {\n this.productId = productId == null ? null : productId.trim();\n }",
"public void setProductId(String productId) {\n this.productId = productId == null ? null : productId.trim();\n }",
"public void setProductId(String productId) {\n this.productId = productId == null ? null : productId.trim();\n }",
"public void setProductId(String productId) {\r\n\t\tthis.productId = productId;\r\n\t}",
"public String getProduct() {\n return product;\n }",
"public String getProduct() {\n return product;\n }",
"@Override\r\n\tpublic void ManageProduct() {\n\t\tint id = this.view.enterId();\r\n\t\tString name = this.view.enterName();\r\n\t\tfloat price = this.view.enterPrice();\r\n\t\tint quantity = this.view.enterQuantity();\r\n\t\t\r\n\t\tthis.model.updProduct(id, name, price, quantity);\r\n\t}",
"public void setProductId(Integer productId) {\n\t\tthis.productId = productId;\n\t}",
"public void setProduct_id(int product_id) {\r\n\t\tthis.product_id = product_id;\r\n\t}",
"public void Editproduct(Product objproduct) {\n\t\t\n\t}",
"public void setProductName(String productName) {\r\n this.productName = productName;\r\n }",
"public void setProductId(Long productId) {\n\t\tthis.productId = productId;\n\t}",
"public void setProductAttrValue(String value) {\n setAttributeInternal(PRODUCTATTRVALUE, value);\n }",
"void setProductNumberCode(java.lang.String productNumberCode);",
"public void setProductId(int v) throws TorqueException\n {\n \n if (this.productId != v)\n {\n this.productId = v;\n setModified(true);\n }\n \n \n if (aProductRelatedByProductId != null && !(aProductRelatedByProductId.getProductId() == v))\n {\n aProductRelatedByProductId = null;\n }\n \n }",
"public void setProductDescription(String productDescription) {\r\n/* 438 */ this._productDescription = productDescription;\r\n/* */ }",
"@Test\n public void setProduct() throws NullReferenceException {\n cartItem.setProduct(product1);\n assertSame(product1, cartItem.getProduct());\n }",
"public void setAttribute(String string, Product product) {\n\t\t\n\t}",
"public void setXpeProductId(String value) {\n setAttributeInternal(XPEPRODUCTID, value);\n }",
"void setProductDescription(java.lang.String productDescription);",
"public Builder setProduct(ProductType product) {\n this.product = product;\n return this;\n }",
"public void setIdProducto(int value) {\n this.idProducto = value;\n }",
"public void setProductName(String productName) {\n this.productName = productName;\n }",
"public void setProductName(String productName) {\n this.productName = productName;\n }",
"public void setProductName(String productName) {\n this.productName = productName;\n }",
"public void retrieveProduct(Product product) {\n // Place string values in TextFields.\n productIdField.setPromptText(String.valueOf(product.getId()));\n productNameField.setText(product.getName());\n productInvField.setText(String.valueOf(product.getStock()));\n productPriceField.setText(String.valueOf(product.getPrice()));\n productMaxField.setText(String.valueOf(product.getMax()));\n productMinField.setText(String.valueOf(product.getMin()));\n // load the TableViews after copying necessary values to instance.\n associatedPartsCopyMachine(product);\n this.product.setId(product.getId());\n super.initialize();\n }",
"public void setProductInfo(ProductInfoType productInfo) {\n\t this.productInfo = productInfo;\n\t}",
"public String getProduct()\n {\n return product;\n }",
"public void setProductID(String ProductID) {\n try {\n if(ProductID!=null)\n this.productID = ProductID;\n else {\n this.productID = \"\";\n throw new SupplyOrderException(\"Invalid Product ID\");\n }\n } catch(SupplyOrderException soe){\n soe.getMessage();\n }\n }",
"@JsonSetter(\"product_id\")\n public void setProductId (Integer value) { \n this.productId = value;\n }",
"public UpdateProduct() {\n\t\tsuper();\t\t\n\t}",
"public void setProductLine(String productLine) {\n this.productLine = productLine == null ? null : productLine.trim();\n }",
"public void setProductCount(Integer productCount) {\n this.productCount = productCount;\n }",
"@Override\r\n\tpublic int updateProduct(Product product) {\n\t\treturn 0;\r\n\t}",
"public void setProductName(java.lang.String productName) {\n this.productName = productName;\n }",
"public void setProductRelatedByProductId(Product v) throws TorqueException\n {\n if (v == null)\n {\n setProductId( 1000);\n }\n else\n {\n setProductId(v.getProductId());\n }\n aProductRelatedByProductId = v;\n }",
"public void update(Product product) {\n\n\t}",
"public void setProductPrice (java.lang.Double productPrice) {\r\n\t\tthis.productPrice = productPrice;\r\n\t}",
"public void setProductPrice(Integer productPrice) {\n\t\tthis.productPrice = productPrice;\n\t}",
"public void setProd(BigInteger prod)\n {\n this.prod = prod;\n }",
"public void setProductName (java.lang.String productName) {\r\n\t\tthis.productName = productName;\r\n\t}",
"public java.lang.String getProduct() {\n return product;\n }",
"public String product() {\n return this.product;\n }",
"@Override\r\n\tpublic Product updateProduct(Product s) {\n\t\treturn null;\r\n\t}",
"public void setProductName(String productName) {\r\n\t\tthis.productName = productName;\r\n\t}",
"public com.autodesk.ws.avro.Call.Builder setRequestingProductId(java.lang.CharSequence value) {\n validate(fields()[1], value);\n this.requesting_product_id = value;\n fieldSetFlags()[1] = true;\n return this; \n }",
"public void setProductCode(String productCode) {\n this.productCode = productCode;\n }",
"public void setProductNo(String productNo) {\n\t\tthis.productNo = productNo;\n\t}",
"public void setProducts(List<Product> products) {\n this.products = products;\n }",
"public void updateProduct(SiteProduct product) {\n dataProvider.save(product);\n }",
"public void setProductPack(String value) {\n setAttributeInternal(PRODUCTPACK, value);\n }",
"public void setProductClass(String value) {\n setAttributeInternal(PRODUCTCLASS, value);\n }",
"@JsonSetter(\"product_identifiers\")\n public void setProductIdentifiers (ProductIdentifiers value) { \n this.productIdentifiers = value;\n }",
"public void setValorProduto(double valorProduto) {\n this.valorProduto = valorProduto;\n }",
"@PutMapping(\"/products\")\r\n\t@ApiOperation(value=\"Change a product details.\")\r\n\tpublic Product changeProduct(@RequestBody Product product) {\r\n\t\treturn productRepository.save(product);\r\n\t}",
"public void setProductRelatedByProductIdKey(ObjectKey key) throws TorqueException\n {\n \n setProductId(((NumberKey) key).intValue());\n }",
"public void setProductOff(double productOff) {\n\t\tthis.productOff = productOff;\n\t}",
"public Product getProduct() {\n\t\treturn product;\n\t}",
"public void setProductType(final ProductTypeReference productType);",
"public void setProductWeight(double productWeight) {\n\t\tthis.productWeight = productWeight;\n\t}"
] | [
"0.79172176",
"0.77153623",
"0.7611357",
"0.75091016",
"0.7401655",
"0.73705614",
"0.73429173",
"0.7260106",
"0.7226766",
"0.7177389",
"0.71299005",
"0.71298414",
"0.7035388",
"0.6964807",
"0.6938476",
"0.6900487",
"0.68001395",
"0.68001395",
"0.67648643",
"0.6763212",
"0.67393106",
"0.6640051",
"0.6631793",
"0.6631793",
"0.65915567",
"0.65915567",
"0.65915567",
"0.65915567",
"0.65915567",
"0.65915567",
"0.6560793",
"0.6549986",
"0.6540784",
"0.6540073",
"0.65177196",
"0.6497338",
"0.6497338",
"0.6493082",
"0.6485594",
"0.64699703",
"0.64619035",
"0.64619035",
"0.64619035",
"0.6449992",
"0.64260185",
"0.64260185",
"0.6413378",
"0.637555",
"0.6355508",
"0.6351316",
"0.63260776",
"0.63215756",
"0.6309415",
"0.6308005",
"0.63055116",
"0.6299203",
"0.62841284",
"0.62834334",
"0.62791467",
"0.6274353",
"0.627001",
"0.626652",
"0.6258977",
"0.6258977",
"0.6258977",
"0.625816",
"0.62338674",
"0.6225613",
"0.62244314",
"0.6223242",
"0.6208019",
"0.6203124",
"0.61896646",
"0.61809963",
"0.61800855",
"0.617669",
"0.61623144",
"0.6159573",
"0.61587524",
"0.61555797",
"0.6145009",
"0.61353844",
"0.6127545",
"0.61214584",
"0.61105126",
"0.61066484",
"0.61000943",
"0.60848254",
"0.60736406",
"0.60735166",
"0.606735",
"0.6058588",
"0.605553",
"0.6043344",
"0.6029146",
"0.601922",
"0.6019068",
"0.6015265",
"0.60132825",
"0.60123116"
] | 0.8129546 | 0 |
Sets the value of the ProductLine field. | public void setProductLine(entity.APDProductLine value); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setProductLine(String productLine) {\n this.productLine = productLine == null ? null : productLine.trim();\n }",
"public String getProductLine() {\n return productLine;\n }",
"@gw.internal.gosu.parser.ExtendedProperty\n public entity.APDProductLine getProductLine();",
"public void setProduct(final String productValue) {\n this.product = productValue;\n }",
"public void setOrderLine (MOrderLine oLine, int M_Locator_ID, BigDecimal Qty)\n\t{\n\t\tMOrgPOS orgpos = MOrgPOS.getOrgPos(getCtx(), oLine.getParent().getAD_Org_ID(), get_Trx());\n\t\tif(M_Locator_ID > 0 && (oLine.getParent().getC_DocTypeTarget_ID() == orgpos.getDocType_Ticket_ID()))\n\t\t\tM_Locator_ID = oLine.get_ValueAsInt(\"M_Locator_ID\")>0?oLine.get_ValueAsInt(\"M_Locator_ID\"):orgpos.getM_LocatorStock_ID();\n\t\tsetC_OrderLine_ID(oLine.getC_OrderLine_ID());\n\t\tsetLine(oLine.getLine());\n\t\tsetC_UOM_ID(oLine.getC_UOM_ID());\n\t\tMProduct product = oLine.getProduct();\n\t\tif (product == null)\n\t\t{\n\t\t\tsetM_Product_ID(0);\n\t\t\tsetM_AttributeSetInstance_ID(0);\n\t\t\tsuper.setM_Locator_ID(0);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tsetM_Product_ID(oLine.getM_Product_ID());\n\t\t\tsetM_AttributeSetInstance_ID(oLine.getM_AttributeSetInstance_ID());\n\t\t\t//\n\t\t\tif (product.isItem())\n\t\t\t{\n\t\t\t\tif (M_Locator_ID == 0)\n\t\t\t\t\tsetM_Locator_ID(Qty);\t//\trequires warehouse, product, asi\n\t\t\t\telse\n\t\t\t\t\tsetM_Locator_ID(M_Locator_ID);\n\t\t\t}\n\t\t\telse\n\t\t\t\tsuper.setM_Locator_ID(0);\n\t\t}\n\t\tsetC_Charge_ID(oLine.getC_Charge_ID());\n\t\tsetDescription(oLine.getDescription());\n\t\tsetIsDescription(oLine.isDescription());\n\t\t//\n\t\tsetAD_Org_ID(oLine.getAD_Org_ID());\n\t\tsetC_Project_ID(oLine.getC_Project_ID());\n\t\tsetC_ProjectPhase_ID(oLine.getC_ProjectPhase_ID());\n\t\tsetC_ProjectTask_ID(oLine.getC_ProjectTask_ID());\n\t\tsetC_Activity_ID(oLine.getC_Activity_ID());\n\t\tsetC_Campaign_ID(oLine.getC_Campaign_ID());\n\t\tsetAD_OrgTrx_ID(oLine.getAD_OrgTrx_ID());\n\t\tsetUser1_ID(oLine.getUser1_ID());\n\t\tsetUser2_ID(oLine.getUser2_ID());\n\t}",
"public void setLine ( String value )\n {\n line = value;\n }",
"public void setProduct(Product product) {\n this.product = product;\n this.updateTotalPrice();\n }",
"public ProductLine productLineById(ProductLine productLine, Connection con) throws SQLException {\r\n\r\n\t\tStatement stmt = con.createStatement();\r\n\t\tString productlineid = productLine.getProductLine();\r\n\t\tString query = \"select product_line,text_description,html_description,image from productlines where product_line= '\"\r\n\t\t\t\t+ productlineid + \"'And record_status>0\";\r\n\t\tResultSet rs = stmt.executeQuery(query);\r\n\t\twhile (rs.next()) {\r\n\t\t\tproductLine.setProductLine(rs.getString(\"product_line\"));\r\n\t\t\tproductLine.setTextDescription(rs.getString(\"text_description\"));\r\n\t\t\tproductLine.setHtmlDescription(rs.getString(\"html_description\"));\r\n\t\t\tproductLine.setImage(rs.getBytes(\"image\"));\r\n\t\t}\r\n\r\n\t\treturn productLine;\r\n\r\n\t}",
"@RequestMapping(value = \"/Productlines/{productlines_productLine}/productses\", method = RequestMethod.PUT)\n\tpublic Products saveProductlinesProductses(@PathVariable String productlines_productLine, @ModelAttribute Products productses) {\n\t\tproductlinesService.saveProductlinesProductses(productlines_productLine, productses);\n\t\treturn productsDAO.findProductsByPrimaryKey(productses.getProductCode());\n\t}",
"public void setInvoiceLine (MInvoiceLine iLine, int M_Locator_ID, BigDecimal Qty)\n\t{\n\t\tsetC_OrderLine_ID(iLine.getC_OrderLine_ID());\n\t\tsetLine(iLine.getLine());\n\t\tsetC_UOM_ID(iLine.getC_UOM_ID());\n\t\tint M_Product_ID = iLine.getM_Product_ID();\n\t\tif (M_Product_ID == 0)\n\t\t{\n\t\t\tset_ValueNoCheck(\"M_Product_ID\", null);\n\t\t\tset_ValueNoCheck(\"M_Locator_ID\", null);\n\t\t\tset_ValueNoCheck(\"M_AttributeSetInstance_ID\", null);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tsetM_Product_ID(M_Product_ID);\n\t\t\tsetM_AttributeSetInstance_ID(iLine.getM_AttributeSetInstance_ID());\t\t\t\n\t\t\tif (M_Locator_ID == 0)\n\t\t\t\tsetM_Locator_ID(Qty);\t//\trequires warehouse, product, asi\n\t\t\telse\n\t\t\t\tsetM_Locator_ID(M_Locator_ID);\n\t\t}\n\t\tsetC_Charge_ID(iLine.getC_Charge_ID());\n\t\tsetDescription(iLine.getDescription());\n\t\tsetIsDescription(iLine.isDescription());\n\t\t//\n\t\tsetC_Project_ID(iLine.getC_Project_ID());\n\t\tsetC_ProjectPhase_ID(iLine.getC_ProjectPhase_ID());\n\t\tsetC_ProjectTask_ID(iLine.getC_ProjectTask_ID());\n\t\tsetC_Activity_ID(iLine.getC_Activity_ID());\n\t\tsetC_Campaign_ID(iLine.getC_Campaign_ID());\n\t\tsetAD_OrgTrx_ID(iLine.getAD_OrgTrx_ID());\n\t\tsetUser1_ID(iLine.getUser1_ID());\n\t\tsetUser2_ID(iLine.getUser2_ID());\n\t}",
"public void setLineCarriageprice(Long lineCarriageprice) {\n this.lineCarriageprice = lineCarriageprice;\n }",
"public LineItem(Product product, int quantity) {\n this.product = product;\n this.quantity = quantity;\n }",
"public void setline(String line) {\n\t\t_line = line;\n\t}",
"public void setProduct(Product product) {\n this.product = product;\n }",
"public void setProduct(entity.APDProduct value);",
"public void setLineId(String line_id)\r\n {\r\n this.line_id = line_id;\r\n }",
"public void setLINE_NO(BigDecimal LINE_NO) {\r\n this.LINE_NO = LINE_NO;\r\n }",
"public void setLINE_NO(BigDecimal LINE_NO) {\r\n this.LINE_NO = LINE_NO;\r\n }",
"public void setLINE_NO(BigDecimal LINE_NO) {\r\n this.LINE_NO = LINE_NO;\r\n }",
"public void setLINE_NO(BigDecimal LINE_NO) {\r\n this.LINE_NO = LINE_NO;\r\n }",
"public void setProduct(String product) {\r\n this.product = product;\r\n }",
"public void setLineId(String lineId) {\n this.lineId = lineId == null ? null : lineId.trim();\n }",
"public void setLine(String line) {\n this.line = line;\n //System.out.println(this.line + \" \" + line);\n }",
"public void setProduct(final ProductReference product);",
"@JsonProperty(\"OrderLine\")\r\n\tpublic void setOrderLine(OrderLine orderLine) {\r\n\t\tthis.orderLine = orderLine;\r\n\t}",
"public void setProduct(Product selectedProduct) {\n\t\t\n\t\tthis.modifiedProduct = selectedProduct;\n\n\t\tidField.setText(Integer.toString(modifiedProduct.getId()));\n\t\tproductNameField.setText(modifiedProduct.getName());\n\t\tpriceField.setText(Double.toString(modifiedProduct.getPrice()));\n\t\tinvField.setText(Integer.toString(modifiedProduct.getStock()));\n\t\tmaxField.setText(Integer.toString(modifiedProduct.getMax()));\n\t\tminField.setText(Integer.toString(modifiedProduct.getMin()));\n\t\t\t\t\n\t\tdummyList = modifiedProduct.getAllAssociatedParts();\n\t\tpartListProductTable.setItems(dummyList);\n\t}",
"public void setProduct(java.lang.String product) {\n this.product = product;\n }",
"@RequestMapping(value = \"/Productlines/{productlines_productLine}/productses\", method = RequestMethod.POST)\n\tpublic Products newProductlinesProductses(@PathVariable String productlines_productLine, @ModelAttribute Products products) {\n\t\tproductlinesService.saveProductlinesProductses(productlines_productLine, products);\n\t\treturn productsDAO.findProductsByPrimaryKey(products.getProductCode());\n\t}",
"protected void setProductId(String productId) {\n this.productId = productId;\n }",
"void setProduct(x0401.oecdStandardAuditFileTaxPT1.ProductDocument.Product product);",
"@RequestMapping(value = \"/Productlines/{productlines_productLine}\", method = RequestMethod.GET)\n\tpublic Productlines loadProductlines(@PathVariable String productlines_productLine) {\n\t\treturn productlinesDAO.findProductlinesByPrimaryKey(productlines_productLine);\n\t}",
"public void setC_OrderLine_ID (int C_OrderLine_ID);",
"public void removeLine(Product product) {\n\t\tgetCartLineList().removeIf(l -> l.getProduct().getId().equals(product.getId()));\n\t}",
"public void setLinePos(int linePos) {\n this.linePos = linePos;\n }",
"public void setProductQty(Double productQty) {\n this.productQty = productQty;\n }",
"public void setPOffrSkuLineId(Number value) {\n\t\tsetNumber(P_OFFR_SKU_LINE_ID, value);\n\t}",
"public OrderLine() {\n products = new ArrayList<>();\n price = new BigDecimal(0);\n }",
"public void setLineID(int lineID)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(LINEID$2, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(LINEID$2);\n }\n target.setIntValue(lineID);\n }\n }",
"public Builder setProduct(org.mrk.grpc.catalog.Product value) {\n if (productBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n product_ = value;\n onChanged();\n } else {\n productBuilder_.setMessage(value);\n }\n\n return this;\n }",
"public void setLineNo(int lineNo)\n\t{\n\t\tsetIntColumn(lineNo, OFF_LINE_NO, LEN_LINE_NO);\n\t}",
"public void setLineId(Number value) {\n setAttributeInternal(LINEID, value);\n }",
"public void setLineId(Number value) {\n setAttributeInternal(LINEID, value);\n }",
"public void setLineId(Number value) {\n setAttributeInternal(LINEID, value);\n }",
"public void setProductId(String productId) ;",
"public void setProductPrice(double productPrice) {\n this.productPrice = productPrice;\n }",
"public void setProductId(String productId) {\n this.productId = productId == null ? null : productId.trim();\n }",
"public void setProductId(String productId) {\n this.productId = productId == null ? null : productId.trim();\n }",
"public void setProductId(String productId) {\n this.productId = productId == null ? null : productId.trim();\n }",
"public void updatePartiallyLine(long objectId, SupplierSettlementLine line) throws CoreException {\n try (Response response = clientApi.post(path + \"/\" + objectId + LINES + line.getId(), line)) {\n readResponse(response, String.class);\n }\n }",
"void setProductCode(java.lang.String productCode);",
"public void setProduct(Product product){\n //set the product fields\n productIdField.setText(String.valueOf(product.getId()));\n productNameField.setText(product.getName());\n productInvField.setText(String.valueOf(product.getInv()));\n productPriceField.setText(Double.toString(product.getPrice()));\n productMaxField.setText(String.valueOf(product.getMax()));\n productMinField.setText(String.valueOf(product.getMin()));\n\n //set the associated parts to the associatedPartTableView\n tmpAssociatedParts.addAll(product.getAllAssociatedParts());\n associatedPartTableView.setItems(tmpAssociatedParts);\n\n }",
"public void setLineColor(Color lineColor) {\r\n myLineColor = lineColor;\r\n }",
"public void setLine (int Line);",
"public void setProductId(int productId) {\n this.productId = productId;\n }",
"public void setProductId(int productId) {\n this.productId = productId;\n }",
"public void setPrice (Product product) {\n\t\tpriceLbl.setText(product.getPrice() + \"\");\n\t\tpriceLbl.repaint();\n\t}",
"public void setProduct(Product product) {\n mProduct = product;\n mBeaut = mProduct.getBeaut();\n }",
"@RequestMapping(value = \"/Productlines/{productlines_productLine}/productses\", method = RequestMethod.GET)\n\tpublic List<Products> getProductlinesProductses(@PathVariable String productlines_productLine) {\n\t\treturn new java.util.ArrayList<Products>(productlinesDAO.findProductlinesByPrimaryKey(productlines_productLine).getProductses());\n\t}",
"public void setLine(int line);",
"public void setC_OrderLine_ID (int C_OrderLine_ID)\n\t{\n\t\tif (C_OrderLine_ID < 1) \n\t\t\tset_Value (COLUMNNAME_C_OrderLine_ID, null);\n\t\telse \n\t\t\tset_Value (COLUMNNAME_C_OrderLine_ID, Integer.valueOf(C_OrderLine_ID));\n\t}",
"public SalesOrderLine put(final SalesOrderLine newSalesOrderLine) throws ClientException {\n return send(HttpMethod.PUT, newSalesOrderLine);\n }",
"public void setProduct(Product product){\n\t\tthis.product = product;\n\t\tnameField.setText(product.getName());\n\t\tamountAvailableField.setText(String.valueOf(product.getAmountAvailable()));\n\t\tamountSoldField.setText(String.valueOf(product.getAmountSold()));\n\t\tpriceEachField.setText(String.valueOf(product.getPriceEach()));\n\t\tpriceMakeField.setText(String.valueOf(product.getPriceMake()));\n\t}",
"public void setProductType(final ProductTypeReference productType);",
"public void setProdLId(Number value) {\n setAttributeInternal(PRODLID, value);\n }",
"@Test\n\tpublic void saveOrderLineProduct() {\n\t\t// TODO: JUnit - Populate test inputs for operation: saveOrderLineProduct \n\t\tInteger id_1 = 0;\n\t\tProduct related_product = new ecom.domain.Product();\n\t\tOrderLine response = null;\n\t\tresponse = service.saveOrderLineProduct(id_1, related_product);\n\t\t// TODO: JUnit - Add assertions to test outputs of operation: saveOrderLineProduct\n\t}",
"public void setProductId(String productId) {\n this.productId = productId;\n }",
"@RequestMapping(value = \"/Productlines\", method = RequestMethod.PUT)\n\tpublic Productlines saveProductlines(@ModelAttribute Productlines productlines) {\n\t\tproductlinesService.saveProductlines(productlines);\n\t\treturn productlinesDAO.findProductlinesByPrimaryKey(productlines.getProductLine());\n\t}",
"public void replaceOrderline(int lineIndex, Interface_IngredientReadOnly nutrient, int amount, double price) {\n orderLines.set(lineIndex, new PurchaseOrderLine(nutrient, amount, price));\n pendingUpdate = true;\n }",
"public void setProductId(String productId) {\r\n\t\tthis.productId = productId;\r\n\t}",
"public void setProductCode(String productCode) {\r\n/* 427 */ this._productCode = productCode;\r\n/* */ }",
"public void setAddressLine(String addressLine) {\n\t\tthis.addressLine = addressLine;\n\t}",
"public ProductLine productLineInsert(ProductLine productLine, Connection con) throws SQLException {\r\n\r\n\t\tPreparedStatement ps = con.prepareStatement(\r\n\t\t\t\t\"insert into productlines(product_line,text_description,html_description,image,created_by,created_at,record_status) values (?,?,?,?,?,NOW(),1)\");\r\n\r\n\t\tps.setString(1, productLine.getProductLine());\r\n\t\tps.setString(2, productLine.getTextDescription());\r\n\t\tps.setString(3, productLine.getHtmlDescription());\r\n\t\tps.setBytes(4, productLine.getImage());\r\n\t\tps.setString(5, productLine.getProductLine());\r\n\t\tps.executeUpdate();\r\n\r\n\t\treturn productLine;\r\n\t}",
"void setProductNumberCode(java.lang.String productNumberCode);",
"@RequestMapping(value = \"/Productlines/{productlines_productLine}\", method = RequestMethod.DELETE)\n\tpublic void deleteProductlines(@PathVariable String productlines_productLine) {\n\t\tProductlines productlines = productlinesDAO.findProductlinesByPrimaryKey(productlines_productLine);\n\t\tproductlinesService.deleteProductlines(productlines);\n\t}",
"public void setProductId(Integer productId) {\r\n this.productId = productId;\r\n }",
"public void setProductId(Integer productId) {\r\n this.productId = productId;\r\n }",
"public void setProductId(Integer productId) {\n this.productId = productId;\n }",
"public void setProductId(Integer productId) {\n this.productId = productId;\n }",
"public void setProductId(Integer productId) {\n this.productId = productId;\n }",
"public void setProductId(Integer productId) {\n this.productId = productId;\n }",
"public void setProductId(Integer productId) {\n this.productId = productId;\n }",
"public void setProductId(Integer productId) {\n this.productId = productId;\n }",
"public void setProductId(Long productId) {\n\t\tthis.productId = productId;\n\t}",
"public void setProductNo(String productNo) {\n\t\tthis.productNo = productNo;\n\t}",
"public void setXpeContractLine(String value) {\n setAttributeInternal(XPECONTRACTLINE, value);\n }",
"public void setLinePosition(int pos) {\n this.linePosition = pos;\n }",
"public void setProduct(Product product) {\n binder.setBean(product);\n }",
"public void ler(String[] lineData) {\n this.setRoomId(Integer.parseInt(lineData[0]));\n this.setHostId(Integer.parseInt(lineData[1]));\n this.setRoomType(lineData[2]);\n this.setCountry(lineData[3]);\n this.setCity(lineData[4]);\n this.setNeighbourhood(lineData[5]);\n this.setReviews(Integer.parseInt(lineData[6]));\n this.setOverallSatisfaction(Double.parseDouble(lineData[7]));\n this.setAccommodates(Integer.parseInt(lineData[8]));\n this.setBedrooms(Double.parseDouble(lineData[9]));\n this.setPrice(Double.parseDouble(lineData[10]));\n this.setPropertyType(lineData[11]);\n }",
"public void enterItem(String productId) {\r\n\t\tproduct = ProductCatalog.getProductCatalogMap().get(productId);\r\n\t\tBigDecimal subTotal = fetchSaleLineItem();\r\n\t\ttaxModel.setTaxTypeModelList(TaxCalculationHelper.fetchAllTaxTypes());\r\n\t\ttaxModel.setProductPriceIncludingTax(TaxCalculationHelper.calculatePriceWithTax(subTotal));\r\n\t\tpublishPropertyEventBeforeSale();\r\n\t}",
"public void generateLineItems(){\n for(int i=0; i<purch.getProdIdx().length; i++){\r\n \r\n prod= new Product(db.getProductDbItem(purch.getProductItem(i)));\r\n \r\n LineItem[] tempL=new LineItem[lineItem.length+1];\r\n System.arraycopy(lineItem,0,tempL,0,lineItem.length);\r\n lineItem=tempL;\r\n lineItem[lineItem.length-1]= new LineItem(prod.getProdId(),purch.getQtyAmtItm(i), \r\n prod.getProdUnitPrice(), prod.getProdDesc(), prod.getProdDiscCode()); \r\n totalPurch += (purch.getQtyAmtItm(i) * prod.getProdUnitPrice());\r\n totalDisc += lineItem[lineItem.length-1].getDiscAmt();\r\n \r\n }\r\n }",
"public void updateLine(long objectId, SupplierSettlementLine line) throws CoreException {\n try (Response response = clientApi.put(path + \"/\" + objectId + LINES + line.getId(), line)) {\n readResponse(response, String.class);\n }\n }",
"public void setLine(int line, String value) {\n VirtualTeam team = getOrCreateTeam(line);\n String old = team.getCurrentPlayer();\n\n if (old != null && created)\n getPlayer().sendPacket(removeLine(old));\n\n team.setValue(value);\n sendLine(line);\n }",
"public void setLBR_ProductSource (String LBR_ProductSource);",
"public void setProductId(Integer productId) {\n\t\tthis.productId = productId;\n\t}",
"public void setProductProcess(String productProcess) {\n this.productProcess = productProcess == null ? null : productProcess.trim();\n }",
"public void setProductCode(String productCode) {\n this.productCode = productCode;\n }",
"public void setLineToStart(final int lineToStart) {\r\n\t\tthis.lineToStart = lineToStart;\r\n\t}",
"@RequestMapping(value = \"/Productlines/{productlines_productLine}/productses/{products_productCode}\", method = RequestMethod.GET)\n\tpublic Products loadProductlinesProductses(@PathVariable String productlines_productLine, @PathVariable String related_productses_productCode) {\n\t\tProducts products = productsDAO.findProductsByPrimaryKey(related_productses_productCode, -1, -1);\n\n\t\treturn products;\n\t}",
"public void setLine1(String line1) {\n this.line1 = line1;\n }",
"public void setLineName(String lineName) {\n this.lineName = lineName == null ? null : lineName.trim();\n }"
] | [
"0.8400367",
"0.72055864",
"0.67521757",
"0.6540431",
"0.64804745",
"0.6440526",
"0.64091796",
"0.6400208",
"0.638491",
"0.6369469",
"0.6364349",
"0.634362",
"0.63029164",
"0.6289701",
"0.6254445",
"0.6242704",
"0.6226088",
"0.6226088",
"0.6226088",
"0.6226088",
"0.62187815",
"0.6206006",
"0.61952096",
"0.6193028",
"0.6179955",
"0.61655873",
"0.61614937",
"0.6134417",
"0.6127618",
"0.6113999",
"0.60726565",
"0.60493433",
"0.6043359",
"0.6032044",
"0.60286427",
"0.6025859",
"0.5996738",
"0.5971578",
"0.5943041",
"0.5907723",
"0.5900841",
"0.5900841",
"0.5900841",
"0.58888304",
"0.5885426",
"0.58763295",
"0.58763295",
"0.58763295",
"0.58461255",
"0.5845537",
"0.5843301",
"0.58335793",
"0.58225757",
"0.58182156",
"0.58182156",
"0.58073705",
"0.58071524",
"0.5784455",
"0.57770485",
"0.57611316",
"0.5750602",
"0.5750308",
"0.5743294",
"0.5732594",
"0.5727141",
"0.5725161",
"0.5724685",
"0.5715885",
"0.5678616",
"0.56615645",
"0.5657833",
"0.56439173",
"0.56314445",
"0.56222534",
"0.56090593",
"0.56090593",
"0.5606654",
"0.5606654",
"0.5606654",
"0.5606654",
"0.5606654",
"0.5606654",
"0.55953664",
"0.5592673",
"0.55891234",
"0.558464",
"0.5577011",
"0.5570806",
"0.55680144",
"0.5566808",
"0.55605465",
"0.55502045",
"0.55458343",
"0.5517667",
"0.55166644",
"0.55048347",
"0.5473409",
"0.54629093",
"0.543173",
"0.54301757"
] | 0.83606344 | 1 |
Sets up the displayer | public ParticleDisplayer(int width, int height, VisualizerMain vm){
this.setPreferredSize(new Dimension(width, height));
this.setBackground(Color.magenta);
this.vm = vm;
FlowLayout flowLayout = new FlowLayout();
flowLayout.setVgap(0);
flowLayout.setHgap(0);
this.setLayout(flowLayout);
displayPred = new JList();
displayPred.setLayout(flowLayout);
displayPred.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
displayPred.setLayoutOrientation(JList.VERTICAL);
displayPred.addListSelectionListener(this);
displayPred.setName("pred");
JScrollPane listScroller = new JScrollPane(displayPred);
listScroller.setPreferredSize(new Dimension(width, height-100));
displayPrey = new JList();
displayPrey.setLayout(flowLayout);
displayPrey.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
displayPrey.setLayoutOrientation(JList.VERTICAL);
displayPrey.addListSelectionListener(this);
displayPrey.setName("prey");
JScrollPane listScroller2 = new JScrollPane(displayPrey);
listScroller2.setPreferredSize(new Dimension(width, height-100));
JTabbedPane tp = new JTabbedPane();
tp.add("Predator", listScroller);
tp.add("Prey", listScroller2);
tp.setTabPlacement(JTabbedPane.BOTTOM);
this.add(tp);
this.add(new JLabel("Epoch:"));
SpinnerNumberModel model1 = new SpinnerNumberModel(minEpoch, minEpoch, maxEpoch, 1);
epochSelector = new JSpinner(model1);
epochSelector.setValue(0);
epochSelector.setPreferredSize(new Dimension(width-50, 50));
epochSelector.addChangeListener(this);
this.add(epochSelector);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void setupDisplay() {\n sizeFirstField_.setText(Double.toString(af_.SIZE_FIRST));\n numFirstField_.setText(Double.toString(af_.NUM_FIRST));\n sizeSecondField_.setText(Double.toString(af_.SIZE_SECOND));\n numSecondField_.setText(Double.toString(af_.NUM_SECOND));\n cropSizeField_.setText(Double.toString(af_.CROP_SIZE));\n thresField_.setText(Double.toString(af_.THRES));\n channelField1_.setText(af_.CHANNEL1);\n channelField2_.setText(af_.CHANNEL2);\n }",
"public StreamRecorderDisplay() {\n initialize();\n }",
"private void setDisplay() {\n\t\tDisplayOpt.add(\"-sd\");\n\t\tDisplayOpt.add(\"/sd\");\n\t\tDisplayOpt.add(\"showdetails\");\n\n\t}",
"public Display() {\n initComponents();\n }",
"public RegisterDisplay() {\n initComponents();\n }",
"private void makeDisplay() {\n\n\t\t// setLayout to be a BoxLayout\n\t\tsetLayout(new BoxLayout(this, BoxLayout.Y_AXIS));\n\t\t// call these methods ???? to be defined later\n\n\t\taddOscServerAddressPanel();\n\t\taddGlobalControlPanel();\n\t\taddFirstSynthPanel();\n\t\taddSecondSynthPanel();\n\t\taddThirdSynthPanel();\n\t}",
"protected void setupUI() {\n\n }",
"public void setup() {\r\n\t\thumanCardsPanel.setHumanCards(players.get(0).getCards());\r\n\t\tfor ( Player p : players ) {\r\n\t\t\tp.setBoard(board);\r\n\t\t\tp.setGame(this);\r\n\t\t}\r\n\t\tboard.setGame(this);\r\n\t\tboard.repaint();\r\n\t\tJOptionPane popup = new JOptionPane();\r\n\t\tString message = \"You are Miss Scarlet. Press Next Player to begin.\\n Hint: Use File > Detective Notes to help you win!\";\r\n\t\tpopup.showMessageDialog(this, message, \"Welcome to Clue!\", JOptionPane.INFORMATION_MESSAGE);\r\n\t}",
"private void setupUI(){\n this.setupTimerSchedule(controller, 0, 500);\n this.setupFocusable(); \n this.setupSensSlider();\n this.setupInitEnable();\n this.setupDebugger();\n }",
"public void launchSetupScreen() {\n\t\tnew SetUpScreen(this);\n\t}",
"@Override\n public void display() {\n display.display();\n }",
"public SetupScreen() \r\n { \r\n _userLabel = new LabelField(Ipoki._resources.getString(LBL_USER), DrawStyle.ELLIPSIS);\r\n add(_userLabel);\r\n _userEdit = new EditField(\"\", Ipoki._user, 20, Field.EDITABLE);\r\n add(_userEdit);\r\n _passLabel = new LabelField(Ipoki._resources.getString(LBL_PASSWORD), DrawStyle.ELLIPSIS);\r\n add(_passLabel);\r\n _passEdit = new PasswordEditField(\"\", Ipoki._pass, 20, Field.EDITABLE);\r\n add(_passEdit);\r\n _freqLabel = new LabelField(Ipoki._resources.getString(LBL_FREQ), DrawStyle.ELLIPSIS);\r\n add(_freqLabel);\r\n _freqEdit = new EditField(\"\", String.valueOf(Ipoki._freq), 20, Field.EDITABLE | EditField.FILTER_INTEGER);\r\n add(_freqEdit);\r\n }",
"private void setupPanel()\n\t{\n\t\tthis.setLayout(baseLayout);\n\t\tqueryButton = new JButton(\"query\");\n\t\tthis.add(queryButton);\n\t\tthis.add(displayPane);\n\t\tdisplayArea = new JTextArea(10,30);\n\t\tadd(displayArea);\n\t\t\n\t\t\n\t}",
"private void showDisplay() {\n this.display.displayScreen();\n }",
"private DisplayDevice(){\t\t\r\n\t\t\r\n\t}",
"@Override\r\n\tpublic void display() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void display() {\n\t\t\r\n\t}",
"public void setup() {\n space = null;\n rabbitList = new ArrayList<>();\n schedule = new Schedule(1);\n\n //recreate main window\n if (displaySurf != null) {\n displaySurf.dispose();\n }\n displaySurf = null;\n displaySurf = new DisplaySurface(this, \"Rabbits Grass Simulation 1\");\n registerDisplaySurface(\"Rabbits Grass Simulation 1\", displaySurf);\n\n //recreate population plot\n if (populationPlot != null) {\n populationPlot.dispose();\n }\n populationPlot = null;\n populationPlot = new OpenSequenceGraph(\"Population Plot\", this);\n populationPlot.setYAutoExpand(false);\n populationPlot.setYRange(0, 200);\n this.registerMediaProducer(\"Plot\", populationPlot);\n }",
"protected void display() {\n\r\n\t}",
"private void setup() {\n\t\tJTextArea jta = new JTextArea();\n\t\tsetLayout(new BorderLayout());\n\t\tadd(new JScrollPane(jta), BorderLayout.CENTER);\n\t\tsetTitle(SERVER_NAME);\n\t\tjta.setEditable(false);\n\t\tsetSize(500, 300);\n\t\tsetDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tsetVisible(true);\n\t\tjta.append(new Date().toString());\n\t}",
"public UserInterface() {\n \t setTitle(\"The Cancer Specialist - Diagnostic Application\");\n initComponents();\n }",
"public void display() {\n\t\t\n\t}",
"public void display() {\n\t\t\n\t}",
"public void display() {\n\t\ttry{\n\t\t\tload();\n\t\t}\n\t\tcatch(Exception e){\n\t\t\tSystem.out.println(\"error\");\n\t\t}\n\t\tfor (ModelObserver mo : controllers){\n\t\t\tmo.init();\n\t\t}\n\t}",
"@Override\n\tpublic void display() {\n\t\t\n\t}",
"@Override\n\tpublic void display() {\n\t\t\n\t}",
"@Override\n protected void display() {\n System.out.println(\"Welcome to team builder tool!\");\n System.out.println(\"Current team: \" + team.getName());\n }",
"public void buildDisplay() {\n ColorMap map = new ColorMap();\n\n for (int i = 1; i <= maxGrassPerCell; i++) {\n map.mapColor(i, new Color(0, Math.max(256 - i * 12, 50), 0));\n }\n map.mapColor(0, Color.white);\n\n Value2DDisplay displayMoney =\n new Value2DDisplay(space.getCurrentGrassSpace(), map);\n\n Object2DDisplay displayRabbits = new Object2DDisplay(space.getCurrentRabbitSpace());\n displayRabbits.setObjectList(rabbitList);\n\n displaySurf.addDisplayableProbeable(displayMoney, \"Grass\");\n displaySurf.addDisplayableProbeable(displayRabbits, \"Rabbits\");\n\n populationPlot.addSequence(\"Number of Rabbits\", new rabbitCount(), Color.BLUE);\n populationPlot.addSequence(\"Number of Grass\", new grassCount(), new Color(0, 150, 0));\n }",
"public Main() {\n\t\tsuper();\n\t\tInitScreen screen = new InitScreen();\n\t\tpushScreen(screen);\n\t\tUiApplication.getUiApplication().repaint();\n\t}",
"@Override\n\tpublic void display() {\n\n\t}",
"@Override\n\tpublic void display() {\n\n\t}",
"@Override\n\tpublic void display() {\n\n\t}",
"@Override\r\n\tpublic void display() {\n\t\tSystem.out.println(\"Displaying...\");\r\n\t}",
"public void startUp() {\n\t\t/* Language of App */\n\t\t\n\t\t/* Init Icons */\n\t\tPaintShop.initIcons(display);\n\t\t/* Init all components */\n\t\tinitComponents();\n\t\t\n\t\t\n\t}",
"public static void display() {\n\n\t\tSystem.out.println(\"************************************************************\");\n\t\tSystem.out.println(\"* Omar Oraby\t \t\t\t\t\t *\");\n\t\tSystem.out.println(\"* 900133379\t \t\t\t\t\t *\");\n\t\tSystem.out.println(\"* Salma Talaat *\");\n\t\tSystem.out.println(\"* 900161560\t \t\t\t\t\t *\");\n\t\tSystem.out.println(\"* Ahmed Elshafey *\");\n\t\tSystem.out.println(\"* 900131045 *\");\n\t\tSystem.out.println(\"* Programming in Java *\");\n\t\tSystem.out.println(\"* (2018 Fall) *\");\n\t\tSystem.out.println(\"************************************************************\");\n\t\tSystem.out.println();\n }",
"public Display()\n {\n setSize(W, H);\n setBackground(Color.BLACK);\n }",
"@Override\r\n\tpublic void display() {\n\r\n\t}",
"@Override\n public void display() {\n\n }",
"private void init() {\n setLayout(new BorderLayout());\n setBackground(ProgramPresets.COLOR_BACKGROUND);\n add(getTitlePanel(), BorderLayout.NORTH);\n add(getTextPanel(), BorderLayout.CENTER);\n add(getLinkPanel(), BorderLayout.SOUTH);\n }",
"public void onDisplay() {\n\n\t}",
"protected void setupUI()\n {\n showLetter = (TextView) findViewById(R.id.showHelpLetter);\n myLetters = (ListView)findViewById(R.id.letterList);\n myLetters.setClickable(true);\n }",
"public void setup() {\n font = loadFont(\"Georgia-Italic-24.vlw\"); \n textFont(font,24);\n \n system = new System();\n keyboard = new Keyboard();\n //hmmm... controller definitions:\n //application = new Controller(); // this could contain subcontrollers?\n analyze = new Analyze();\n header = new Header();\n server = new Server();\n \n //size(640, 480, P2D);\n //size(1280, 720, P2D);\n // Or run full screen, more fun! Use with Sketch -> Present\n size(screen.width, screen.height-20, P2D);\n \n //video = new Video(this,640,480,0);\n video = new Video(this,1280,720,0);\n spectrum = new Spectrum(int (height-headerHeight)/2,int (height*(0.18))); //history (length),samplerow (row # to begin sampling)\n filter = new Filter(this);\n }",
"public void setDisplay(String display);",
"public void display() {\n\t}",
"private void init() {\n\t\t\n\t\tdisplay = new Display(title, width, height);\n\t\tdisplay.getFrame().addKeyListener(keyManager);\n\t\tdisplay.getFrame().addMouseListener(mouseManager);\n\t\tdisplay.getFrame().addMouseMotionListener(mouseManager);\n\t\t\n\t\t//Adding the mouseManager to the canvas reduces glitches\n\t\tdisplay.getCanvas().addMouseListener(mouseManager); \n\t\tdisplay.getCanvas().addMouseMotionListener(mouseManager);\n\t\t\n\t\t\n\t\tVisuals.init();\n\n\t\tManager.init(this); // Setting up our manager singleton\n\n\t\tgameCamera = new GameCamera(0, 0);\n\t\tgameTimer = new GameTimer();\n\n\t\tgameState = new GameState();\n\t\t//We want to initialise the states we may switch to for easy access\n\t\t//The main menu state\n\t\tState menuState = new MenuState();\n\t\t//The state for the settings menu\n\t\tState settingState = new SettingState();\n\t\t\n\t\tState.setState(gameState); //This sets the state of the program to our game\n\t\t\n\t}",
"private void init() {\r\n\r\n createGUI();\r\n\r\n setSize(new Dimension(600, 600));\r\n setTitle(\"Grid - Regular Grid Renderer\");\r\n }",
"public void display() {\n startPreview();\n }",
"private void init() {\n\t\n\t\tthis.setSize(DEFAULT_W, DEFAULT_H);\n\t\tthis.setLocation(DEFAULT_X, DEFAULT_X);\n\t\tthis.setTitle(DEFAULT_TITLE);\n\n\t}",
"public DisplayReceiver(Sequencer sequencer) {\n\tthis.sequencer = sequencer;\n\tgui = new MidiGUI(sequencer);\n }",
"public void main(@Observes ContainerInitialized event) {\n try {\n for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {\n if (\"Nimbus\".equals(info.getName())) {\n javax.swing.UIManager.setLookAndFeel(info.getClassName());\n break;\n }\n }\n } catch (ClassNotFoundException | InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException ex) {\n java.util.logging.Logger.getLogger(Main.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n }\n\n setTitle(\"Vier Gewinnt © Kevin Sapper\");\n setResizable(false);\n setPreferredSize(new Dimension(GameConstants.WIDTH, GameConstants.HEIGHT));\n setLayout(new CardLayout());\n // Center frame\n setLocationRelativeTo(null);\n\n initMenu();\n\n cards = getContentPane();\n initGameCard();\n initStartCard();\n\n switchToCard(startCard);\n\n setVisible(true);\n }",
"private void initialize()\n {\n this.setTitle( \"SerialComm\" ); // Generated\n this.setSize( 500, 300 );\n this.setContentPane( getJContentPane() );\n }",
"public ClockDisplay()\r\n\t{\t\t\r\n\t\t\r\n\t\tthis.numberDisplay1 = new NumberDisplay();\r\n\t}",
"public void display() {\r\n\t\tsetVisible(true);\r\n\t}",
"private void setUp() {\n\t\tthis.setLayout(new BorderLayout());\n\t\tsetupMessagePanel();\n\t\tsetupHomeButtonPanel();\n\t}",
"private void initialize() {\r\n\t\tthis.setSize(392, 496);\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t\tthis.setTitle(\"Informações\");\r\n\t}",
"final void setup() {\n frame.add(label, BorderLayout.CENTER);\n }",
"private void initialize() {\n\ttry {\n\t\t// user code begin {1}\n\t\t// user code end\n\t\tsetName(\"PlatformInfoPanel\");\n\t\tsetLayout(null);\n\t\tsetSize(353, 240);\n\t\tadd(getPnlOS(), getPnlOS().getName());\n\t\tadd(getPnlJava(), getPnlJava().getName());\n\t} catch (java.lang.Throwable ivjExc) {\n\t\thandleException(ivjExc);\n\t}\n\t// user code begin {2}\n\tgetTxtOSName().setText(System.getProperty(\"os.name\"));\n\tgetTxtOSArchitecture().setText(System.getProperty(\"os.arch\"));\n\tgetTxtOSVersion().setText(System.getProperty(\"os.version\"));\n\tgetTxtOSLocale().setText(java.util.Locale.getDefault().toString());\n\tgetTxtJavaVersion().setText(System.getProperty(\"java.version\"));\n\tgetTxtJavaVMVersion().setText(System.getProperty(\"java.vm.version\"));\n\t// user code end\n}",
"public void display()\r\n\t{\r\n\t\t\r\n\t}",
"void init() {\n setVisible(true);\n\n }",
"private void buildDisplay() {\n\t\tColorMap map = new ColorMap();\n\n\t\tfor (int i = 1; i < MAX_COLORS; i++) {\n\t\t\tmap.mapColor(i, new Color(0, (int) (i + 127), 0));\n\t\t}\n\n\t\t// When noting, it is white\n\t\tmap.mapColor(0, Color.WHITE);\n\n\t\tValue2DDisplay displayGrass = new Value2DDisplay(rabbitSpace.getGrassSpace(), map);\n\n\t\tObject2DDisplay displayRabbits = new Object2DDisplay(rabbitSpace.getRabbitSpace());\n\t\tdisplayRabbits.setObjectList(rabbitList);\n\n\t\tdisplaySurf.addDisplayable(displayGrass, \"Grass\");\n\t\tdisplaySurf.addDisplayable(displayRabbits, \"Rabbits\");\n\n\t\trabbitsAndGrassInSpace.addSequence(\"Number of Rabbits in Space\", new RabbitsInSpace());\n\t\trabbitsAndGrassInSpace.addSequence(\"Amount of Grass\", new GrassInSpace());\n\t}",
"public void setDisplay(Display display) {\n\t\tthis.display = display;\n\t}",
"private void initialize() {\n this.setLayout(new CardLayout());\n this.setName(Constant.messages.getString(\"ports.options.title\"));\n this.add(getPanelPortScan(), getPanelPortScan().getName());\n }",
"private void $$$setupUI$$$() {\n\t\tpanel_overview = new JPanel();\n\t\tpanel_overview.setLayout(new BorderLayout(0, 0));\n\t\twebView = new WebbrowserPanel();\n\t\tpanel_overview.add(webView, BorderLayout.CENTER);\n\t}",
"public void display() {\n\t\tSystem.out.println(\"display..\");\n\t}",
"private void setup() {\n setPreferredSize(DEFAULT_SIZE);\n setBackground(Color.WHITE);\n addComponentsTopane();\n \n File f = new File(\"icons/title.png\");\n try {\n myImage = ImageIO.read(f);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public void viewOptions()\r\n {\r\n SetupScreen setupScreen = new SetupScreen();\r\n pushScreen(setupScreen);\r\n }",
"@Override\n public void init() // set up GUI\n {\n setLayout(new FlowLayout());\n\n customerView = new CustomerView(); // initialize customerView\n \n add(customerView); // add customerView to the GUI\n }",
"public final void setDisplay(Display display) {\r\n\t\tthis.display = display;\r\n\t}",
"private void initializeDisplayText() {\n // Title and field labels\n Stage stage = (Stage) titleLabel.getScene().getWindow();\n stage.setTitle(rb.getString(\"windowTitle\"));\n if (action.equals(Constants.ADD)) {\n titleLabel.setText(rb.getString(\"addTitleLabel\"));\n } else if (action.equals(Constants.UPDATE)) {\n titleLabel.setText(rb.getString(\"updateTitleLabel\"));\n }\n idLabel.setText(rb.getString(\"idLabel\"));\n nameLabel.setText(rb.getString(\"nameLabel\"));\n addressLabel.setText(rb.getString(\"addressLabel\"));\n cityLabel.setText(rb.getString(\"cityLabel\"));\n countryLabel.setText(rb.getString(\"countryLabel\"));\n divisionLabel.setText(rb.getString(\"divisionLabel\"));\n postalLabel.setText(rb.getString(\"postalLabel\"));\n phoneLabel.setText(rb.getString(\"phoneLabel\"));\n\n // Prompt text\n idField.setPromptText(rb.getString(\"idPrompt\"));\n nameField.setPromptText(rb.getString(\"namePrompt\"));\n addressField.setPromptText(rb.getString(\"addressPrompt\"));\n cityField.setPromptText(rb.getString(\"cityPrompt\"));\n countryComboBox.setPromptText(rb.getString(\"countryPrompt\"));\n divisionComboBox.setPromptText(rb.getString(\"divisionPrompt\"));\n postalField.setPromptText(rb.getString(\"postalPrompt\"));\n phoneField.setPromptText(rb.getString(\"phonePrompt\"));\n\n // Button labels\n Common.scaleButton(saveBtn, rb.getString(\"saveBtn\"));\n Common.scaleButton(cancelBtn, rb.getString(\"cancelBtn\"));\n\n // Error label; initially blank\n errorLabel.setText(\"\");\n }",
"public void setDisplaySettings_(DisplaySettings displaySettings_) {\n this.displaySettings_ = displaySettings_;\n }",
"public void runDisplay()\n\t{\n\t\tscFrame = new SpellCheckFrame();\n\t\tscFrame.setVisible(true);\n\t}",
"private void initUI() {\n }",
"public WorkingOutScreenV1() {\n initComponents();\n }",
"public void setup() {\n\t\t//This throws an exception and causes us to reenter once \"frame\" exists\n\t\tsize(VIEW_WIDTH,VIEW_HEIGHT,P2D);\n\t\ttxt = createFont(\"Vera.ttf\",90,true);\n\t\tframeRate(60);\n\t\tif (!frame.isResizable()){\n\t\t\tframe.setResizable(true);\n\t\t}\n\t}",
"public void initialize(){\n\n //load Settings\n settings = new Settings(settingsFile);\n if (settings.isExcludeCupboard()){\n cupboardCheckBox.setSelected(true);\n }\n\n //The first pane to see when the program starts is the meals Browse pane\n mealsBtnClicked();\n\n //set up focus and out of focus styling for all the Panes\n styleIngredientBrowsePane();\n styleIngredientAddPane();\n styleMealAddPane();\n styleMealBrowsePane();\n stylePlanShoppingListPane();\n stylePlanWeeklyPlanner();\n stylePlanCupboard();\n\n //setup the Ingredients Browse Pane\n setupBrowseIngredientsPane();\n\n //setup up the main menu hoover button effects\n setupHoverMainMenuButtons();\n\n //setup the meal Add Pane\n MealAddPaneSetUp();\n\n //setup the meal Browse Pane\n mealBrowsePaneSetup();\n\n //setup up the meal planner weekly pane\n weeklyPlannerSetup();\n\n //setup the planner shopping list pane\n plannerShoppingListSetup();\n\n //setup the planner cupboard pane\n plannerCupboardSetup();\n\n //Load the meals from the database\n loadMeals();\n\n //set up the focus styling for the minimise and exit buttons\n setupWindowButtons();\n\n //when the program loads, load the shopping list and meal planner from previous usage\n loadShoppingList();\n loadMealPlanner();\n\n //Set up the information boxes instance for ingredient pane, meal pane and planner pane\n plannerBox = new InformationBox(PlannerPlanPane, plannerColor, plannerColorDark,\n \"images/icons8_planner_96px_Black.png\");\n mealBox = new InformationBox(MealsBrowsePane, mealColor, mealColorDark,\n \"images/icons8_cutlery_96px_Black.png\");\n ingredientBox = new InformationBox(IngredientsBrowsePane, ingredientColor, ingredientColorDark,\n \"images/icons8_apple_96px_Black.png\");\n\n }",
"public void initUI() {\n\t\tadd(board);\r\n\t\t//Set if frame is resizable by user\r\n\t\tsetResizable(false);\r\n\t\t//call pack method to fit the \r\n\t\t//preferred size and layout of subcomponents\r\n\t\t//***important head might not work correctly with collision of bottom and right borders\r\n\t\tpack();\r\n\t\t//set title for frame\r\n\t\tsetTitle(\"Snake\");\r\n\t\t//set location on screen(null centers it)\r\n\t\tsetLocationRelativeTo(null);\r\n\t\t//set default for close button of frame\r\n\t\tsetDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t}",
"public void init() {\n setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n setSize(new Dimension(windowWidth, windowHeight));\n setTitle(\"Weather - \" \n + webAddress.getCapitalizedCity() + \", \" \n + webAddress.getCapitalizedCountry());\n setVisible(true);\n }",
"@Override protected void startup() {\n show(new FFTView(this));\n }",
"public SportsCentreGUI() {\n\t\tsetDefaultCloseOperation(EXIT_ON_CLOSE);\n\t\tsetTitle(\"Boyd-Orr Sports Centre\");\n\t\tsetSize(700, 300);\n\t\tdisplay = new JTextArea();\n\t\tdisplay.setFont(new Font(\"Courier\", Font.PLAIN, 14));\n\t\tadd(display, BorderLayout.CENTER);\n\t\tlayoutTop();\n\t\tlayoutBottom();\n\t\t\n\t\tinitLadiesDay(); //calls method which reads data from ClassesIn file\n\t\tinitAttendances(); //calls method which reads data from AttendancesIn file\n\t\t\n\n\t}",
"private void initialize() {\r\n\t\t// this.setSize(271, 295);\r\n\t\tthis.setSize(495, 392);\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t\tthis.setTitle(ResourceBundle.getBundle(\"Etiquetas\").getString(\"MainTitle\"));\r\n\t}",
"@Override\n\tprotected void UpdateUI() {\n\t\tFineModulationDisplay(FineModulation);\n\t\tAutoGreaseDisplay(AutoGrease);\n\t\tQuickcouplerDisplay(Quickcoupler);\n\t\tRideControlDisplay(RideControl);\n\t\tBeaconLampDisplay(BeaconLamp);\n\t\tMirrorHeatDisplay(MirrorHeat);\n//\t\tFNKeyDisplay(ParentActivity.LockEntertainment);\n\t}",
"private void init() {\n setText(\"Case Name\");\n createFieldsComp();\n GuiUtil.addSeparator(shell, SWT.HORIZONTAL);\n createBottomActionButtons();\n }",
"@Override \n protected void startup() {\n GretellaView view = new GretellaView(this);\n show( view );\n view.initView(); \n }",
"private void setup(){\n getSupportActionBar().setTitle(\"Search Results\");\n\n ArrayList<TodoData> todos = this.getTodos();\n presenter = new SearchResultPresenter(this, todos);\n presenter.onCreate();\n }",
"public void init() {\n\t\t// Read the data text file and load up the local database\n\t\tinitData();\n\n\t\t// Create the labels and the textbox\n\t\taddNameLabel();\n\t\taddNameBox();\n\t\taddGraphButton();\n\t\taddClearButton();\n\n\t\t// Set up the graph object\n\t\tgraph = new NameSurferGraph();\n\t\tadd(graph);\n\n\t}",
"public static void showGUI() {\n Display display = Display.getDefault();\n Shell shell = new Shell(display);\n EntropyUIconfig inst = new EntropyUIconfig(shell, SWT.NULL);\n Point size = inst.getSize();\n shell.setLayout(new FillLayout());\n shell.layout();\n if (size.x == 0 && size.y == 0) {\n inst.pack();\n shell.pack();\n } else {\n Rectangle shellBounds = shell.computeTrim(0, 0, size.x, size.y);\n shell.setSize(shellBounds.width, shellBounds.height);\n }\n shell.open();\n while (!shell.isDisposed()) {\n if (!display.readAndDispatch())\n display.sleep();\n }\n }",
"private void initializeUI() {\n MedUtils.displayMedInfo(coverArt, playBinding.thumbIv, playBinding.titleTv,\n playBinding.subtitleTv, selectedMed);\n\n playBinding.playPauseBt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n switch (MediaPlayerService.getState()) {\n case Constants.STATE_PLAY:\n mediaPlayerService.pauseAction();\n break;\n case Constants.STATE_PAUSE:\n mediaPlayerService.playAction();\n break;\n case Constants.STATE_NOT_INIT:\n startMediaPlayerService();\n break;\n }\n }\n });\n\n playBinding.stopBt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n mediaPlayerService.stopAction();\n }\n });\n }",
"public GUI(Display display) {\n\t\t/* Init fields */\n\t\tGUI.display = display;\n\t\tGUI.gui = this;\n\t\t// displayThread = Thread.currentThread();\n\t\t/* Startup process */\n\t}",
"private void setDisplay() {\n\t\tDimension d = new Dimension(160,40);\n\t\tsetPreferredSize(d);\n\t\tsetMaximumSize(d);\n\t\tsetMinimumSize(d);\n\t\tsetLayout(new BorderLayout());\n\t\tsetBorder(new EmptyBorder(3,0,3,0));\n\t\tbtnUser = new RoundedButton(new Color(0xEEEEEE), new Color(0xCCCCCC));\n\t\tJPanel pnlInner = new JPanel(new FlowLayout(FlowLayout.LEFT));\n\t\t\n\t\tpnlIcon = new JPanel(new BorderLayout());\n\t\tpnlIcon.add(lblUserListIcon, BorderLayout.CENTER);\n//\t\tpnlIcon.setBackground(new Color(0xEEEEEE));\n\t\tpnlIcon.setOpaque(false);\n\t\t\n\t\tpnlIcon.setBorder(new EmptyBorder(0,5, 0, 5));\n\t\t\n\t\tpnlName = new JPanel(new BorderLayout());\n\t\tpnlName.add(lblUserListName, BorderLayout.CENTER);\n//\t\tpnlName.setBackground(new Color(0xEEEEEE));\n\t\tpnlName.setOpaque(false);\n\t\t\n\t\tpnlInner.add(pnlIcon);\n\t\tpnlInner.add(pnlName);\n\t\t\n\t\tsetOpaque(true);\n\t\tsetBackground(Color.WHITE);\n\t\t\n\t\tbtnUser.add(pnlIcon, BorderLayout.WEST);\n\t\tbtnUser.add(pnlName, BorderLayout.CENTER);\n\t\tadd(btnUser, BorderLayout.CENTER);\n\t}",
"private void initialize() {\r\n\t\tthis.setSize(378, 283);\r\n\t\tthis.setJMenuBar(getMenubar());\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t\tthis.setTitle(\"JAVIER\");\r\n\t}",
"private void initUI() {\r\n\t\t//Äußeres Panel\r\n\t\tContainer pane = getContentPane();\r\n\t\tGroupLayout gl = new GroupLayout(pane);\r\n\t\tpane.setLayout(gl);\r\n\t\t//Abstende von den Containern und dem äußeren Rand\r\n\t\tgl.setAutoCreateContainerGaps(true);\r\n\t\tgl.setAutoCreateGaps(true);\r\n\t\t//TextFeld für die Ausgabe\r\n\t\tJTextField output = view.getTextField();\r\n\t\t//Die jeweiligen Panels für die jeweiigen Buttons\r\n\t\tJPanel brackets = view.getBracketPanel();\r\n\t\tJPanel remove = view.getTop2Panel();\r\n\t\tJPanel numbers = view.getNumbersPanel();\r\n\t\tJPanel last = view.getBottomPanel();\r\n\t\t//Anordnung der jeweiligen Panels durch den Layout Manager\r\n\t\tgl.setHorizontalGroup(gl.createParallelGroup().addComponent(output).addComponent(brackets).addComponent(remove).addComponent(numbers).addComponent(last));\r\n\t\tgl.setVerticalGroup(gl.createSequentialGroup().addComponent(output).addComponent(brackets).addComponent(remove).addComponent(numbers).addComponent(last));\r\n\t\tpack();\r\n\t\tsetTitle(\"Basic - Taschenrechner\");\r\n\t\tsetDefaultCloseOperation(EXIT_ON_CLOSE);\r\n\t\tsetResizable(false);\r\n\t}",
"@Override\r\n\tpublic void display() {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tSystem.out.println(\"Im a mallard Duck!\");\r\n\t}",
"private static void displayOwner() {\n // Clear the screen\n clearScreen();\n\n // Display UI\n System.out.println(\"Welcome, Owner.\\n\\n\"\n + \"Choose an option:\\n\"\n + \"- (O)ccupancy - View occupancy of rooms\\n\"\n + \"- (D)ata [(c)ounts|(d)ays|(r)evenue] - View data on \"\n + \"counts, days, or revenue of each room\\n\"\n + \"- (S)tays - Browse list of reservations\\n\"\n + \"- (R)ooms - View list of rooms\\n\"\n + \"- (B)ack - Goes back to main menu\\n\");\n }",
"public void initializeDisplayBaseInfo() {\n DisplayInfo newDisplayInfo;\n DisplayManagerInternal displayManagerInternal = this.mWmService.mDisplayManagerInternal;\n if (!(displayManagerInternal == null || (newDisplayInfo = displayManagerInternal.getDisplayInfo(this.mDisplayId)) == null)) {\n this.mDisplayInfo.copyFrom(newDisplayInfo);\n }\n updateBaseDisplayMetrics(this.mDisplayInfo.logicalWidth, this.mDisplayInfo.logicalHeight, this.mDisplayInfo.logicalDensityDpi);\n this.mInitialDisplayWidth = this.mDisplayInfo.logicalWidth;\n this.mInitialDisplayHeight = this.mDisplayInfo.logicalHeight;\n this.mInitialDisplayDensity = this.mDisplayInfo.logicalDensityDpi;\n this.mInitialDisplayCutout = this.mDisplayInfo.displayCutout;\n }",
"void infoSetUp() {\r\n\t\tJPanel imageInfo = new JPanel();\r\n\t\timageInfo.setLayout(new GridLayout(2, 0));\r\n\t\tJPanel mButtons = new JPanel();\r\n\r\n\t\tJButton save = new JButton(\"save\");\r\n\t\tJButton upload = new JButton(\"upload\");\r\n\t\tJButton delete = new JButton(\"delete\");\r\n\t\tJButton view = new JButton(\"open\");\r\n\r\n\t\tupload.setActionCommand(\"upload\");\r\n\t\tview.setActionCommand(\"view\");\r\n\t\tActionListener upList = new UpList();\r\n\t\tupload.addActionListener(upList);\r\n\t\tview.addActionListener(upList);\r\n\t\tmButtons.add(save);\r\n\t\tmButtons.add(upload);\r\n\t\tmButtons.add(delete);\r\n\t\tmButtons.add(view);\r\n\r\n\t\tJTextArea info = new JTextArea(\"Path: \");\r\n\t\tinfo.setEditable(false);\r\n\t\timageInfo.add(info);\r\n\t\timageInfo.add(mButtons);\r\n\t\tmainFrame.add(imageInfo);\r\n\t\tinfoText = info;\r\n\t}",
"private void initProductDisplay() {\n\t\tif (isScannednAddingFinished()) {\n\t\t\tarticleInqList = new ArrayList<ArticleInq>();\n\t\t\tarticleImageList = new ArrayList<ArticleImage>();\n\t\t}\n\t\tif (isBasketAddingFinished()\n\t\t\t\t&& (CommonBasketValues.getInstance().Basket == null || CommonBasketValues\n\t\t\t\t\t\t.getInstance().Basket.OrderNo == 0)) {\n\t\t\tdisplayArticleList = new ArrayList<ArticleInq>();\n\n\t\t}\n\n\t\tlastScanTime = 0;\n\t\tlastEan = \"\";\n\t\tcurrentEan = \"\";\n\t\tif (light_on) {\n//\t\t\tCameraManager.get().turn_onFlash();\n\t\t\tgetCameraManager().setTorch(true);\n\t\t}\n\t\tif (calledFromCreate) {\n//\t\t\tCameraManager.get().requestAutoFocus(handler, R.id.auto_focus);\n\t\t\tcalledFromCreate = false;\n\t\t}\n\n\t}",
"@Override protected void startup() {\n show(new MIDLetParamsView(this));\n }",
"public void initializeMixer() {\n\t\tinitializeSlidersAndTextFields();\n\t\tinitializeTooltips();\n\t\tinitializeRecorderListener();\n\t}",
"public void display() {\n System.out.println(\"Title: \" + this.title);\n System.out.println(\"Description: \" + this.des);\n System.out.println(\"Price Per Night: $\" + this.price);\n System.out.println(\"Max Guests: \" + this.guests);\n System.out.println(\"Length of stay: \" + this.days + \" days\");\n System.out.println(\"Total for stay: $\" + this.total);\n System.out.println(\"-----------------------------------\");\n }",
"public void init()\n {\n buildUI(getContentPane());\n }",
"private void setUpScreen() {\n if (getView() != null) {\n setAmount(account.getArmedAmount());\n curIndex = 0;\n cvp.setPagingEnabled(false);\n if (account.getActiveCurrency() == CurrencyDAO.CURRENCY_BITCOIN) {\n // Bitcoin configurations are handled specially\n updateBitcoinDenominations();\n } else {\n new SetupArmImagesTask().execute(this);\n }\n }\n }"
] | [
"0.748355",
"0.70909137",
"0.68812203",
"0.67853373",
"0.6618815",
"0.65552443",
"0.6502502",
"0.65008235",
"0.64871526",
"0.6472102",
"0.6446036",
"0.64397323",
"0.64324456",
"0.6428348",
"0.64014494",
"0.63777864",
"0.63777864",
"0.6376245",
"0.63459057",
"0.63388103",
"0.63312364",
"0.63138556",
"0.63138556",
"0.6302718",
"0.62995136",
"0.62995136",
"0.6280757",
"0.6273694",
"0.62724054",
"0.62692094",
"0.62692094",
"0.62692094",
"0.6260093",
"0.6254189",
"0.624625",
"0.6241229",
"0.6227851",
"0.6218607",
"0.62064964",
"0.61965615",
"0.619435",
"0.61858845",
"0.6181464",
"0.61736035",
"0.6156352",
"0.61557335",
"0.6151279",
"0.615093",
"0.6138911",
"0.61359686",
"0.61299765",
"0.61284536",
"0.6124642",
"0.6123224",
"0.6122243",
"0.6121485",
"0.6108609",
"0.61055946",
"0.6099301",
"0.6093125",
"0.60921985",
"0.60907435",
"0.60825384",
"0.6082243",
"0.6078052",
"0.60627025",
"0.6046446",
"0.60446966",
"0.6035046",
"0.60334903",
"0.60281175",
"0.60279983",
"0.60270643",
"0.6021868",
"0.6021578",
"0.60123557",
"0.60087144",
"0.60063994",
"0.5999693",
"0.5999361",
"0.5991536",
"0.59851754",
"0.598379",
"0.5975474",
"0.5975227",
"0.59751254",
"0.59748715",
"0.5964053",
"0.5963433",
"0.5946555",
"0.5943036",
"0.59381294",
"0.5936323",
"0.5934632",
"0.5923559",
"0.59233403",
"0.59204423",
"0.59193873",
"0.59170556",
"0.59155536",
"0.5914216"
] | 0.0 | -1 |
Updates the available particles | public void update(){
if (!VisualizerMain.selectedRun.equals("")){
updateEpochNum();
updateParticles();
this.repaint();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void update() {\n\t\t\n\t\t// Fill the background for every call\n\t\tUtility.background(Utility.color(235, 213, 186));\n\t\t\n\t\t// Create 10 new random particles\n\t\tcreateNewParticles(10);\n\t\t\n\t\t// Track every particle in the array then update their feature\n\t\tfor (int i = 0; i < particles.length; i++) {\n\t\t\tif (particles[i] != null) {\n\t\t\t\tupdateParticle(i);\n\t\t\t}\n\n\t\t}\n\n\t}",
"protected void updateParticles() {\n\n\t\tfor (int i = 0; i < particles.size(); i++) {\n\t\t\tVParticle p = particles.get(i);\n\t\t\tif (p.neighbors == null) {\n\t\t\t\tp.neighbors = particles;\n\t\t\t}\n\t\t\tfor (BehaviorInterface b : behaviors) {\n\t\t\t\tb.apply(p);\n\t\t\t}\n\t\t}\n\t\tfor (int i = 0; i < particles.size(); i++) {\n\t\t\tVParticle p = particles.get(i);\n\t\t\tp.scaleVelocity(friction);\n\t\t\tp.update();\n\t\t}\n\t}",
"public void update() {\n Iterator<Particle> iter = particles.iterator();\n\n while (iter.hasNext()) {\n Particle p = iter.next();\n if (p.isDead()) {\n iter.remove();\n } else {\n p.update();\n }\n }\n }",
"private static void updateParticle(int index) {\n\n\t\tfloat posX = particles[index].getPositionX(); // Current X position of the particle\n\t\tfloat posY = particles[index].getPositionY(); // Current Y position of the particle\n\t\tfloat vX = particles[index].getVelocityX(); // Current horizontal velocity of the particle\n\t\tfloat vY = particles[index].getVelocityY();\t// Current vertical velocity of the particle\n\t\tint age = particles[index].getAge();\t// Current age of the particle\n\t\t\n\t\t// Fill the circle's color and transparency\n\t\tUtility.fill(particles[index].getColor(), particles[index].getTransparency());\n\t\t\n\t\t// Draw the circle\n\t\tUtility.circle(posX, posY, particles[index].getSize());\n\t\t\n\t\t// Update vertical velocity effected by gravity\n\t\tvY = vY + 0.3f;\n\t\t// Update the particle's vertical velocity, XY positions and its age\n\t\tparticles[index].setVelocityY(vY);\n\t\tparticles[index].setPositionX(posX + vX);\n\t\tparticles[index].setPositionY(posY + vY);\n\t\tparticles[index].setAge(age + 1);\n\t\t\n\t\t// Call this method to remove the old particles\n\t\tremoveOldParticles(80);\n\t\t\n\n\t}",
"public void update(){\n\t\tfor(ParticleEffect effect : effects){\n\t\t\teffect.update();\n\t\t}\n\t}",
"public void setParticles(int particles) {\r\n\t\tthis.particles = particles;\r\n\t}",
"public void updateParticles() {\n\n // Update walkingAnimation particle effect\n walkingParticleEffect.update(Gdx.graphics.getDeltaTime());\n if(walkingParticleEffect.isComplete()) {\n walkingParticleEffect.reset();\n }\n\n // Update getting hit particle effect\n if(damaged) {\n gettingHitParticleEffect.update(Gdx.graphics.getDeltaTime());\n if(gettingHitParticleEffect.isComplete() && !dead) {\n damaged = false;\n gettingHitParticleEffect.reset();\n }\n }\n }",
"public void update() {\n\t\tupdateParticles();\n\t\tupdateSprings();\n\n\t\tif (groups != null) {\n\t\t\tfor (VParticleGroup g : groups) {\n\t\t\t\tg.update();\n\t\t\t}\n\t\t}\n\t}",
"private static boolean testUpdateParticle() {\n\t\tparticles = new Particle[1];\n\t\tparticles[0] = new Particle(3, 3, 10, 10);\n\t\t\n\t\tparticles[0].setVelocityX(-1);\n\t\tparticles[0].setVelocityY(-2);\n\t\tupdateParticle(0);\n\t\t\n\t\tif (particles[0].getPositionX() != 2 || particles[0].getPositionY() != 1.3) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false; \n\t}",
"List<? extends Particle> update(double timeDelta);",
"public void updateWorld() {\n\t\t/*\n\t\t * The particles are created during the simulation, this prevents some strange behaviors\n\t\t * that rises when all the particles are added at the start of a simulation, for example \n\t\t * the it was noticed that the random generation for the position followed some sort of pattern\n\t\t * and this influenced the formation the DLA cluster, resulting in an unxpected formation\n\t\t * */\n\t\tif( elements < getInitialParticleNumber() ){\n\t\t\tcreateParticleOutsideOfBB();\t\t\n\t\t\telements++;\n\t\t}\n\t\t//now for the each particles that are still floating a movement update is made,\n\t\t//according to the type of movement\n\t\tfor(int i=0; i<particleCollection.size(); i++){\n\t\t\tif( particleCollection.get(i).isFloating() == false ){\n\t\t\t\tparticleCollection.remove(i);\n\t\t\t}\n\t\t\t//If the particle has gone outside of the boundaries then \n\t\t\t//a new one is created to replace it, this can happen only if the movementType is 2 or 3 (balistic or square spiral)\n\t\t\telse if( particleCollection.get(i).isOutsideOfTheWorld() == true ){\n\t\t\t\tparticleCollection.remove(i);\n\t\t\t\tcreateParticleOutsideOfBB();\n\t\t\t}\n\t\t\telse{\n\t\t\t\tswitch(movementType){\n\t\t\t\tcase 0:\n\t\t\t\t\t/*\n\t\t\t\t\t * each movement method return a boolean if it's false it mean that the particle ha moved and\n\t\t\t\t\t * the collided to the cluster and so the static particle counter il incremented by one\n\t\t\t\t\t * */\n\t\t\t\t\tif( particleCollection.get(i).snowFlakeFallMove() == false ){\n\t\t\t\t\t\tcollisionIteration.add(new Integer(particleCollection.get(i).getIterationNumber()));\n\t\t\t\t\t\tupdateBB(i);\n\t\t\t\t\t\tstaticParticles++;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 1: \n\t\t\t\t\tif( particleCollection.get(i).randomMove() == false ){\n\t\t\t\t\t\tcollisionIteration.add(new Integer(particleCollection.get(i).getIterationNumber()));\n\t\t\t\t\t\tupdateBB(i);\n\t\t\t\t\t\tstaticParticles++;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\tif( particleCollection.get(i).straightMove() == false ){\n\t\t\t\t\t\tcollisionIteration.add(new Integer(particleCollection.get(i).getIterationNumber()));\n\t\t\t\t\t\tupdateBB(i);\n\t\t\t\t\t\tstaticParticles++;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\tif( particleCollection.get(i).squareSpiralMove() == false ){\n\t\t\t\t\t\tcollisionIteration.add(new Integer(particleCollection.get(i).getIterationNumber()));\n\t\t\t\t\t\tupdateBB(i);\n\t\t\t\t\t\tstaticParticles++;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"@Test\n public void testUpdateParticle() {\n\n pe.updateParticle(p, 0.0f, new Vector3f(), new Vector3f());\n // at the very start of the anim, the particle should be its start size\n assertThat(p.size, is(0.2f));\n // when some time has passed the particle should have a different size\n p.life -= 2.0f;\n pe.updateParticle(p, 2.0f, new Vector3f(), new Vector3f());\n assertThat(p.size, is(0.56f));\n // updating start-size should change the value\n pe.setStartSize(0.7f);\n // please note that there is no change in life here!\n pe.updateParticle(p, 0.0f, new Vector3f(), new Vector3f());\n assertThat(p.size, is(0.96000004f));\n // same goes for endSize\n pe.setEndSize(3.0f);\n pe.updateParticle(p, 0.0f, new Vector3f(), new Vector3f());\n assertThat(p.size, is(1.1600001f));\n }",
"Particles particles();",
"private void updateParticles() {\n\t\t// TODO Auto-generated method stub\n\t\tpredParticles = new ArrayList<File>();\n\t\tpreyParticles = new ArrayList<File>();\n\t\tFile f = new File(VisualizerMain.experimentBaseLocation+\"/\"+VisualizerMain.selectedRun+\"/Epoch-\"+epochSelected+\"/\");\n\t\tFile[] listFolders = f.listFiles();\n\t\tfor(File file : listFolders){\n\t\t\tpredParticles.add(file);\n\t\t}\n\t\t\n\t\tDefaultListModel listModelPredator = new DefaultListModel();\n\t\tfor (File file: predParticles){\n\t\t\tlistModelPredator.addElement(file.getName());\n\t\t}\n\t\tdisplayPred.setModel(listModelPredator);\n\t\t\n\t\tDefaultListModel listModelPrey = new DefaultListModel();\n\t\tfor (File file: preyParticles){\n\t\t\tlistModelPrey.addElement(file.getName());\n\t\t}\n\t\tdisplayPrey.setModel(listModelPrey);\n\t}",
"private void draw() {\n ctx.clearRect(0, 0, width, height);\n\n for (ImageParticle p : particles) {\n p.opacity = p.remainingLife / p.life * 0.5;\n\n // Draw particle from image\n ctx.save();\n ctx.translate(p.x, p.y);\n ctx.scale(p.size, p.size);\n //ctx.translate(p.image.getWidth() * (-0.5), p.image.getHeight() * (-0.5));\n ctx.translate(-HALF_WIDTH, -HALF_HEIGHT);\n ctx.setGlobalAlpha(p.opacity);\n ctx.drawImage(p.image, 0, 0);\n ctx.restore();\n\n //p.remainingLife--;\n p.remainingLife *= 0.98;\n //p.size *= 0.99;\n p.x += p.vX;\n p.y += p.vY;\n\n //regenerate particles\n if (p.remainingLife < 0 || p.size < 0 || p.opacity < 0.01) {\n if (running) {\n p.reInit();\n } else {\n particles.remove(p);\n }\n }\n }\n }",
"public void drawParticles() {}",
"public void update(){\r\n\t\tList<Point> list = new ArrayList<Point>();\r\n\t\t\r\n\t\tlist.addAll(Arrays.asList(points));\r\n\t\t\r\n\t\tsetPoints(list);\r\n\t}",
"private void updatePhysics() {\n long now = System.currentTimeMillis();\n // Do nothing if mLastTime is in the future.\n // This allows the game-start to delay the start of the physics\n // by 100ms or whatever.\n if (mLastTime > now) return;\n int n = particles.length;\n tree.clear();\n for (int i = 0; i < n; i++) {\n tree.insert(particles[i]);\n }\n // Determine if there are any collisions\n // http://www.kirupa.com/developer/actionscript/multiple_collision2.htm\n for (int i = 0; i < n; i++) {\n \tparticles[i].update(now);\n \tparticles[i].disappearsFromEdge(canvasWidth, canvasHeight);\n\t\t\tSet<Particle> nearBy = tree.retrieve(particles[i]);\n\t\t\tfor (Particle particle : nearBy) {\n\t\t\t\tif (particle != particles[i])\n\t\t\t\t\tparticles[i].collidesWith(particle);\n\t\t\t}\n }\n }",
"private synchronized void updateData() {\n if (nanoseconds >= 1000000000) {\n fps = frames;\n ups = updates;\n nanoseconds = nanoseconds - 1000000000;\n frames = 0;\n updates = 0;\n }\n\n long elapsedTime = System.nanoTime() - oldTime;\n oldTime = oldTime + elapsedTime;\n nanoseconds = nanoseconds + elapsedTime;\n\n particleSimulator.update(elapsedTime * 1e-9);\n\n // An update occurred, increment.\n updates++;\n\n // Ask for a repaint if we know of a component to repaint\n if (gameDrawingComponent != null) {\n gameDrawingComponent.repaint();\n }\n }",
"private static void createNewParticles(int number) {\n\t\t// The following declarations are to initialize the random range for the \n\t\t// particle's feature\n\t\tint maxX = Fountain.positionX + 3;\n\t\tint minX = Fountain.positionX - 3;\n\t\tint boundX = maxX - minX;\n\t\tint maxY = Fountain.positionY + 3;\n\t\tint minY = Fountain.positionY - 3;\n\t\tint boundY = maxY - minY;\n\t\t\n\t\tint particleCount = 0; // For counting the new particles' amount\n\n\t\t\n\t\t\tfor (int i = 0; i < particles.length; i++) {\n\t\t\t\tif (particles[i] == null) {\n\t\t\t\t\t++particleCount;\n\t\t\t\t\t\n\t\t\t\t\t// Following codes are to prepare the setting for the particle\n\t\t\t\t\tint positionX = randGen.nextInt(boundX + 1) + maxX;\n\t\t\t\t\tint positionY = randGen.nextInt(boundY + 1) + maxY;\n\t\t\t\t\tfloat xVelocity = -1 + randGen.nextFloat() * (2);\n\t\t\t\t\tfloat yVelocity = -10 + randGen.nextFloat() * (5);\n\t\t\t\t\tfloat amount = randGen.nextFloat() * 1;\n\t\t\t\t\tint color = Utility.lerpColor(Fountain.startColor, Fountain.endColor, amount);\n\t\t\t\t\tfloat size = randGen.nextFloat() * (11 - 4);\n\t\t\t\t\tint age = randGen.nextInt(40 + 1);\n\t\t\t\t\tint transparency = randGen.nextInt((96)) + 32;\n\t\t\t\t\t\n\t\t\t\t\t// TO set the new particle with random feature\n\t\t\t\t\tparticles[i] = new Particle();\n\t\t\t\t\tparticles[i].setPositionX(positionX);\n\t\t\t\t\tparticles[i].setPositionY(positionY);\n\t\t\t\t\tparticles[i].setVelocityX(xVelocity);\n\t\t\t\t\tparticles[i].setVelocityY(yVelocity);\n\t\t\t\t\tparticles[i].setSize(size);\n\t\t\t\t\tparticles[i].setColor(color);\n\t\t\t\t\tparticles[i].setAge(age);\n\t\t\t\t\tparticles[i].setTransparency(transparency);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Once after creating 10 new particles, ends this method\n\t\t\t\tif (particleCount >= number) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"protected void playParticle(){\n\t\teffectData.getPlayParticles().playParticles(effectData, effectData.getDisplayAt());\n\t}",
"public void updateUniverse(int dimension)\n\t{\n\t\tfor(int i = 0; i < this.particles.size(); i++)\n\t\t{\n\t\t\tVector force = new Vector(this.dimension);\n\t\t\t\n\t\t\tfor(int x = 0; x < this.particles.size(); x++)\n\t\t\t{\n\t\t\t\tif(x == i) continue;\n\t\t\t\t\n\t\t\t\tif(checkCollision(i, x) == true)\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\tparticles.get(i).setVelocity(\n\t\t\t\t\t\t\tparticles.get(i).getVelocity().multiply(particles.get(i).getMass()).add(particles.get(x).getVelocity().multiply(particles.get(x).getMass())).divide(\n\t\t\t\t\t\t\t\t\tparticles.get(i).getMass()+particles.get(x).getMass())\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\n\t\t\t\t\tthis.particles.get(i).increaseMass(this.particles.get(x).getMass());\n\t\t\t\t\tparticles.remove(x);\n\t\t\t\t\t\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tdouble gForce = GRAV_CONST * (particles.get(i).getMass() * particles.get(x).getMass()) / Math.pow((this.particles.get(i).getPosition().distance(this.particles.get(x).getPosition())), 2);\n\t\t\t\tVector directon = particles.get(i).getPosition().direction(particles.get(x).getPosition());\n\t\t\t\t\n\t\t\t\tforce = force.add(directon.multiply(gForce));\n\t\t\t}\n\t\t\t\n\t\t\tparticles.get(i).setAcceleration(force.divide(particles.get(i).getMass()));\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < this.particles.size(); i++)\n\t\t{\n\t\t\tparticles.get(i).update(timebase);\n\t\t}\n\t\t\n\t\telapsedTime += timebase;\n\t}",
"public void updateFitness() {\n Particle p;\n for (int i = 0; i < SWARM_SIZE; i++) {\n p = swarm.get(i);\n p.setFitnessValue(getFitnessValue(p.getVector().getPos()));\n p.setpBestFitness(getFitnessValue(p.getpBest().getPos()));\n }\n }",
"public void onUpdate() {\n super.onUpdate();\n\n if (this.world.isRemote) {\n double d0 = this.posX + (this.rand.nextDouble() * 2.0D - 1.0D) * (double) this.width * 0.5D;\n double d1 = this.posY + 0.05D + this.rand.nextDouble() * 1.0D;\n double d2 = this.posZ + (this.rand.nextDouble() * 2.0D - 1.0D) * (double) this.width * 0.5D;\n //double d3 = (this.rand.nextDouble() * 2.0D - 1.0D) * 0.3D;\n double d4 = this.rand.nextDouble() * 0.1D;\n //double d5 = (this.rand.nextDouble() * 2.0D - 1.0D) * 0.3D;\n this.world.spawnParticle(ticksExisted % 2 == 0 ? EnumParticleTypes.FLAME : EnumParticleTypes.SMOKE_NORMAL, d0, d1, d2, 0, d4, 0);\n } else if (--this.lifeTicks < 0) {\n this.setDead();\n }\n }",
"public void calc()\n\t\t\t\t\t\t{\n\t\t\t\t\t\tif(oldInfo.calcInfo!=null)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\toldInfo.calcInfo.calc();\n\t\t\t\t\t\t\toldInfo.calcInfo=null;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t//Filter particles\n\t\t\t\t\t\tfor(int id:oldInfo.keySet())\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\tParticleInfo pInfo=oldInfo.get(id);\n\t\t\t\t\t\t\tif(filter.acceptParticle(id, pInfo))\n\t\t\t\t\t\t\t\tnewInfo.put(id,pInfo);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}",
"public int getParticles() {\r\n\t\treturn particles;\r\n\t}",
"protected void updateImpl(@NotNull final ParticleData particleData, final float tpf) {\n\n }",
"private void updateSimulation(double frameRate) {\n\n GraphicsContext g = canvas.getGraphicsContext2D();\n double w = canvas.getWidth();\n double h = canvas.getHeight();\n double x = w / 2;\n double y = h - 10;\n\n // Clear the canvas\n g.setGlobalAlpha(1.0);\n g.setGlobalBlendMode(BlendMode.SRC_OVER);\n g.setFill(Color.BLACK);\n g.fillRect(0, 0, w, h);\n\n // Generate new particles and them the collection to be drawn.\n particles.addAll(emitter.emit(x, y));\n\n // (Re)draw the particles.\n for (Iterator<Particle> it = particles.iterator(); it.hasNext();) {\n Particle p = it.next();\n\n // Update the particle's position, color and age.\n p.update(frameRate);\n\n // Remove expired particles.\n if (!p.isAlive()) {\n it.remove();\n continue;\n }\n // Draw\n p.render(g);\n }\n fpsLabel.setText(String.format(\"Current frame rate: %.3f\", frameRate));\n countLabel.setText(String.format(\"Particle count: %d\", particles.size()));\n\n }",
"public static void tick() {\n try {\n getActiveParticles().stream().filter((p) -> (p != null)).filter((p) -> (p.active)).forEach((p) -> {\n p.tick();\n });\n } catch (java.util.ConcurrentModificationException ex) {}\n }",
"private synchronized void update() {\n nPoints++;\n int n = points.size();\n if (n < 1) {\n return;\n }\n PathPoint p = points.get(points.size() - 1); // take last point\n if (p.getNEvents() == 0) {\n return;\n }\n if (n > length) {\n removeOldestPoint(); // discard data beyond range length\n }\n n = n > length ? length : n; // n grows to max length\n float t = p.t - firstTimestamp; // t is time since cluster formed, limits absolute t for numerics\n st += t;\n sx += p.x;\n sy += p.y;\n stt += t * t;\n sxt += p.x * t;\n syt += p.y * t;\n// if(n<length) return; // don't estimate velocityPPT until we have all necessary points, results very noisy and send cluster off to infinity very often, would give NaN\n float den = (n * stt - st * st);\n if (den != 0) {\n valid = true;\n xVelocity = (n * sxt - st * sx) / den;\n yVelocity = (n * syt - st * sy) / den;\n } else {\n valid = false;\n }\n }",
"public void update()\n {\n // start from the bottom of the world\n\n for (int y = height - 1; y >= 0; --y)\n {\n // compute offset to this and next line\n\n int thisOffset = y * width;\n \n // are we at top or bottom?\n\n boolean atTop = y == 0;\n boolean atBot = y == height - 1;\n\n // process line in random order\n \n for (int x: xRndIndex[rnd.nextInt(RND_INDEX_CNT)])\n {\n // index of this pixel\n \n int ip = thisOffset + x;\n \n // value of this pixel\n\n int p = pixels[ip];\n\n // don't process inert matter\n\n if (p == AIR || p == ROCK || p == EARTH)\n continue;\n\n // are we on a left or right edge?\n\n boolean atLeft = x == 0;\n boolean atRight = x == width - 1;\n\n // indices of pixels around this particle\n\n int iuc = ip - width;\n int idc = ip + width;\n int idl = idc - 1;\n int idr = idc + 1;\n int il = ip - 1;\n int ir = ip + 1;\n\n // get pixels for each index\n\n int uc = atTop ? ROCK : pixels[iuc];\n int dc = atBot ? ROCK : pixels[idc];\n int dl = atBot || atLeft ? ROCK : pixels[idl];\n int dr = atBot || atRight ? ROCK : pixels[idr];\n int l = atLeft ? ROCK : pixels[il];\n int r = atRight ? ROCK : pixels[ir];\n \n // the following actions propogate elements around the\n // world, they do not conserve matter\n\n // if fire, propogate fire\n\n if (p == FIRE1 || p == FIRE2 || p == FIRE3 || \n p == FIRE4 || p == FIRE5 || p == FIRE6)\n {\n int[] burn = {atLeft ? ip : il,\n atRight ? ip : ir,\n atTop ? ip : iuc,\n atBot ? ip : idc};\n\n\n for (int ib: burn)\n {\n int b = pixels[ib];\n\t\t\t\t\t \n\t\t\t\t\t // fire burns plants and oil, makes steam out of water\n\t\t\t\t\t \n if ((b == PLANT || b == OIL || b == COLUMBINE) &&\n rnd.nextInt(FIRE_CHANCE_IN) == 0)\n pixels[ib] = FIRE1;\n else\n if (b == WATER)\n {\n pixels[ib] = STEAM;\n pixels[ip] = STEAM;\n\t\t\t\t\t\t pixels[iuc] = STEAM;\n p = STEAM;\n break;\n }\n }\n // move fire along\n\n if (p == FIRE1)\n {\n pixels[ip] = FIRE3;\n continue;\n }\n if (p == FIRE2)\n {\n pixels[ip] = FIRE3;\n continue;\n }\n if (p == FIRE3)\n {\n pixels[ip] = FIRE4;\n continue;\n }\n if (p == FIRE4)\n {\n pixels[ip] = FIRE5;\n continue;\n }\n if (p == FIRE5)\n {\n pixels[ip] = FIRE6;\n continue;\n }\n if (p == FIRE6)\n {\n pixels[ip] = AIR;\n continue;\n }\n }\n // if this is steam, evaporate into air\n\n if (p == STEAM)\n { pixels[ip] = AIR;\n continue;\n\t\t\t }\n\n // if this is an everything sucker\n\n if (p == AIR_SOURCE)\n {\n int[] targets = {atLeft ? ip : il,\n atRight ? ip : ir,\n atTop ? ip : iuc,\n atBot ? ip : idc};\n for (int it: targets)\n pixels[it] = AIR;\n continue;\n }\n // if this is a water source\n\n if (p == WATER_SOURCE)\n {\n int[] targets = {atLeft ? ip : il,\n atRight ? ip : ir,\n atTop ? ip : iuc,\n atBot ? ip : idc};\n for (int it: targets)\n if (pixels[it] == AIR &&\n rnd.nextInt(WATER_CHANCE_IN) == 0)\n pixels[it] = WATER;\n continue;\n }\n // if this is a fire source\n\n if (p == OIL_SOURCE)\n {\n int[] targets = {atRight ? ip : ir,\n atLeft ? ip : il,\n atTop ? ip : iuc,\n atBot ? ip : idc};\n for (int it: targets)\n if (pixels[it] == AIR)\n pixels[it] = OIL;\n continue;\n }\n // if this is a sand source\n\n if (p == SAND_SOURCE)\n {\n int[] targets = {atLeft ? ip : il,\n atRight ? ip : ir,\n atTop ? ip : iuc,\n atBot ? ip : idc};\n for (int it: targets)\n if (pixels[it] == AIR &&\n rnd.nextInt(SAND_CHANCE_IN) == 0)\n pixels[it] = SAND;\n continue;\n }\n // if this is a plant, propogate growth\n\n if (p == PLANT)\n {\n\n int iul = iuc - 1;\n int iur = iuc + 1;\n\n int[] targets = {atLeft ? ip : il,\n atLeft || atTop ? ip : iul,\n atRight ? ip : ir,\n atRight || atTop ? ip : iur,\n atTop ? ip : iuc,\n atBot ? ip : idc,\n atBot || atLeft ? ip : idl,\n atBot || atRight ? ip : idr,\n };\n\t\t\t\t if (pixels[idl] == PLANT && pixels[idc] == PLANT && \n\t\t\t\t pixels[idr] == PLANT && pixels[ir] == PLANT && \n\t\t\t\t\t pixels[il] == PLANT && pixels[iuc] == WATER)\n\t\t\t\t\t pixels[ip] = COLUMBINE;\n for (int ix: targets)\n if (pixels[ix] == AIR)\n for (int it: targets)\n if (pixels[it] == WATER && rnd.nextInt(PLANT_CHANCE_IN) == 0)\n pixels[it] = PLANT;\n\t\t\t\t continue;\n }\n // if this is a flower\n\n if (p == COLUMBINE)\n\t\t\t {\n\t\t\t continue;\n\t\t\t }\n // if this is a fire source\n\n if (p == FIRE_SOURCE)\n {\n int[] targets = {atLeft ? ip : il,\n atRight ? ip : ir,\n atTop ? ip : iuc,\n atBot ? ip : idc};\n for (int it: targets)\n if (pixels[it] == PLANT || pixels[it] == OIL)\n pixels[it] = FIRE1;\n continue;\n }\n // all actions from this point on conserve matter\n // we only calculate the place to which this particle\n // will move, the the default is to do nothing\n\n int dest = NO_CHANGE;\n \n // if it's a oil\n\n if (p == OIL)\n {\n // compute indices for up left and up right\n\n int iul = iuc - 1;\n int iur = iuc + 1;\n\n // get pixels for each index\n\n int ul = atTop || atLeft ? ROCK : pixels[iul];\n int ur = atTop || atRight ? ROCK : pixels[iur];\n\n // if there is sand/earth above, erode that\n\n if (uc == EARTH || uc == SAND)\n dest = iuc; \n\n // if pixles up left and up right sand/water\n\n else if ((ul == EARTH || ul == SAND) && \n (ur == EARTH || ur == SAND))\n dest = rnd.nextBoolean() ? iul : iur;\n\n // if air underneath, go down\n \n else if (dc == AIR)\n dest = idc;\n \n // if air on both sides below, pick one\n\n else if (dl == AIR && dr == AIR)\n dest = rnd.nextBoolean() ? idl : idr;\n\n // if air only down left, go left\n\n else if (dl == AIR)\n dest = idl;\n\n // if air only down right, go right\n\n else if (dr == AIR)\n dest = idr;\n\n // if air on both sides below, pick one\n\n else if ((l == AIR || l == EARTH || l == SAND) &&\n (r == AIR || r == EARTH || r == SAND))\n dest = rnd.nextBoolean() ? il : ir;\n\n // if air only down left, go left\n\n else if (l == AIR || l == EARTH || l == SAND)\n dest = il;\n\n // if air only down right, go right\n\n else if (r == AIR || r == EARTH || r == SAND)\n dest = ir;\n\n // the case where water flows out two pixels\n \n else\n {\n // get items 2 pixels on either side of this one\n\n int ill = ip - 2;\n int irr = ip + 2;\n int ll = x < 2 ? ROCK : pixels[ill];\n int rr = x > width - 3 ? ROCK : pixels[irr];\n\n // if air on both sides, pick one\n\n if (ll == AIR && rr == AIR)\n dest = rnd.nextBoolean() ? irr : ill;\n \n // if air only right right, go right right\n \n else if (rr == AIR)\n dest = irr;\n \n // if air only left left, go left left\n\n else if (ll == AIR)\n dest = ill;\n }\n }\n // if it's water\n\n else if (p == WATER)\n {\n // compute indices for up left and up right\n\n int iul = iuc - 1;\n int iur = iuc + 1;\n\n // get pixels for each index\n\n int ul = atTop || atLeft ? ROCK : pixels[iul];\n int ur = atTop || atRight ? ROCK : pixels[iur];\n\n // if there is sand/earth above, erode that\n\n if (uc == EARTH || uc == SAND)\n dest = iuc; \n\n // if pixles up left and up right sand/water\n\n else if ((ul == EARTH || ul == SAND) && \n (ur == EARTH || ur == SAND))\n dest = rnd.nextBoolean() ? iul : iur;\n\n // if air underneath, go down\n \n else if (dc == AIR || dc == OIL)\n dest = idc;\n\n // if air on both sides below, pick one\n\n else if ((dl == AIR || dl == OIL) && (dr == AIR || dr == OIL))\n dest = rnd.nextBoolean() ? idl : idr;\n\n // if air only down left, go left\n\n else if (dl == AIR || dl == OIL)\n dest = idl;\n\n // if air only down right, go right\n\n else if (dr == AIR || dr == OIL)\n dest = idr;\n\n // if air on both sides below, pick one\n\n else if ((l == AIR || l == EARTH || l == SAND) &&\n (r == AIR || r == EARTH || r == SAND))\n dest = rnd.nextBoolean() ? il : ir;\n\n // if air only down left, go left\n\n else if (l == AIR || l == EARTH || l == SAND)\n dest = il;\n\n // if air only down right, go right\n\n else if (r == AIR || r == EARTH || r == SAND)\n dest = ir;\n\n // the case where water flows out two pixels\n \n else\n {\n // get items 2 pixels on either side of this one\n\n int ill = ip - 2;\n int irr = ip + 2;\n int ll = x < 2 ? ROCK : pixels[ill];\n int rr = x > width - 3 ? ROCK : pixels[irr];\n\n // if air on both sides, pick one\n\n if (ll == AIR && rr == AIR)\n dest = rnd.nextBoolean() ? irr : ill;\n \n // if air only right right, go right right\n \n else if (rr == AIR)\n dest = irr;\n \n // if air only left left, go left left\n\n else if (ll == AIR)\n dest = ill;\n }\n }\n // all other elements behave like sand\n\n else\n {\n // if air underneath, go down\n \n if (dc == AIR || dc == WATER)\n dest = idc;\n\n // if air on both sides below, pick one\n\n else if ((dl == AIR || dl == WATER) && \n (dr == AIR || dr == WATER))\n dest = rnd.nextBoolean() ? idl : idr;\n\n // if air only down left, go left\n\n else if (dl == AIR || dl == WATER)\n dest = idl;\n\n // if air only down right, go right\n\n else if (dr == AIR || dr == WATER)\n dest = idr;\n }\n // if a change is requried, swap pixles\n\n try\n {\n if (dest != NO_CHANGE)\n {\n if (pixels[ip] == WATER_SOURCE)\n out.println(\"swap1 WS & \" + Element.lookup(pixels[dest]));\n if (pixels[dest] == WATER_SOURCE)\n out.println(\"swap2 WS & \" + Element.lookup(pixels[ip]));\n\n pixels[ip] = pixels[dest];\n pixels[dest] = p;\n }\n }\n catch (Exception ex)\n {\n ex.printStackTrace();\n out.println(\" X: \" + x);\n out.println(\" Y: \" + y);\n out.println(\"Source: \" + Element.lookup(p));\n out.println(\"Source: \" + Element.lookup(pixels[ip]));\n out.println(\" Dest: \" + Element.lookup(pixels[dest]));\n \n }\n }\n }\n }",
"public void onTick() {\n // Tick all particles\n Iterator<Particle> iterator = this.particles.iterator();\n while (iterator.hasNext()) {\n Particle particle = iterator.next();\n\n // Tick this particle\n particle.onTick();\n\n // Remove particle when removed flag is set\n if (particle.removed) {\n iterator.remove();\n }\n }\n }",
"public void updateVelocity(int particleSize, double[] globalBest, double w, double c1, double c2) {\n\r\n\t\tdouble[] newVelocity = new double[particleSize];\r\n\r\n\t\tdouble[] currentPrice = Arrays.copyOf(getPrices(), getPrices().length);\r\n\r\n\t\tfor (int i = 0; i < particleSize; i++) {\r\n\r\n\t\t\tnewVelocity[i] = w * this.getVelocity()[i]\r\n\t\t\t\t\t+ c1 * Math.random() * (this.getPersonalBest()[i] - this.getPrices()[i])\r\n\t\t\t\t\t+ c2 * Math.random() * (globalBest[i] - this.getPrices()[i]);\r\n\r\n\t\t\tcurrentPrice[i] = currentPrice[i] + newVelocity[i];\r\n\r\n\t\t\tif (newVelocity[i] > 10) {\r\n\r\n\t\t\t\tnewVelocity[i] = 10;\r\n\r\n\t\t\t}\r\n\r\n\t\t\tif (currentPrice[i] > 10) {\r\n\r\n\t\t\t\tcurrentPrice[i] = 10;\r\n\r\n\t\t\t} else if (currentPrice[i] < 0.01) {\r\n\r\n\t\t\t\tcurrentPrice[i] = 0.01;\r\n\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.setprices(Arrays.copyOf(currentPrice, currentPrice.length));\r\n\r\n\t\tthis.setVelocity(Arrays.copyOf(newVelocity, newVelocity.length));\r\n\r\n\t}",
"void updatePercepts() {\n clearPercepts();\n \n Location r1Loc = model.getAgPos(0);\n //Location r2Loc = model.getAgPos(1);\n \n Literal pos1 = Literal.parseLiteral(\"pos(r1,\" + r1Loc.x + \",\" + r1Loc.y + \")\");\n // Literal pos2 = Literal.parseLiteral(\"pos(r2,\" + r2Loc.x + \",\" + r2Loc.y + \")\");\n\n addPercept(pos1);\n //addPercept(pos2);\n \n if (model.hasObject(Const.ObstacleCode, r1Loc)) {\n addPercept(Const.v1);\n }\n// if (model.hasObject(Const.ObstacleCode, r2Loc)) {\n// addPercept(Const.v2);\n// }\n }",
"public void update(){\n\t\tint lasers[] = new int[activePointers()];\n\t\tPVector positions[] = new PVector[activePointers()];\n\t\tfor (int i = 0; i < activePointers(); i++) {\n\t\t\tpositions[i].set(parent.mouseX,parent.mouseY);\n\t\t\tlasers[i] = pointers.get(i).laser;\n\t\t}\n\n\t\tupdate( positions, lasers);\n\t}",
"public void update(int dt) {\n if(player != null) player.update(dt);\n\n // ENTITIES //\n\n // Update Entities\n for(Entity e : ents) {\n e.update(dt);\n }\n\n // Add Queued Entities\n for(Entity e : sub_queue) {\n ents.add(e);\n }\n sub_queue.clear(); // Clear the sub_queue\n\n // Remove Queued Entities\n for(Entity e : unsub_queue) {\n if(!ents.remove(e)) {\n// System.out.println(\"ERROR: Could Not Remove: \" + e.toString()); // DEBUG //\n }\n }\n unsub_queue.clear(); // Clear the unsub_queue\n\n // COLLISION BOXES //\n\n // Check for collisions\n checkCollisions();\n\n // Add Queued Collision Boxes\n for(CollisionBox e : sub_cueue) {\n cols.add(e);\n }\n sub_cueue.clear(); // Clear the sub_cueue\n\n // Remove Unsubbed Collision Boxes\n for(CollisionBox e : unsub_cueue) {\n if(e == null) continue;\n if(!cols.remove(e)) {\n // DEBUG CODE //\n// try {\n// System.out.println(\"ERROR: Could Not Remove: \" + e.toString());\n// } catch (NullPointerException ex) {\n// ex.printStackTrace();\n// }\n }\n }\n unsub_cueue.clear(); // Clear the unsub_cueue\n\n // PARTICLES //\n\n // Limit Particles to Maximum Allowed Particles\n while(particles.size() > Settings.max_particles) {\n Particle particleToRemove = particles.get(0);\n particles.remove(particleToRemove);\n }\n\n // Update Particles\n for(Particle p : particles) {\n p.update(dt);\n }\n\n // Add Queued Particles\n for(Particle p : p_sub_queue) {\n particles.add(p);\n }\n p_sub_queue.clear(); // Clear the sub_queue\n\n // Remove Queued Particles\n for(Particle p : p_unsub_queue) {\n particles.remove(p);\n }\n p_unsub_queue.clear(); // Clear the unsub_queue\n }",
"public void _applyModifier(Particle particle) {\n this.particle = particle;\n life = particle.life;\n outer = particle.outer;\n texture = particle.texture;\n sprite = particle.sprite;\n isInnerScreen = particle.isInnerScreen;\n this.physicParticle = particle.physicParticle;\n x = physicParticle.x;\n y = physicParticle.y;\n mass = physicParticle.mass;\n charge = physicParticle.charge;\n\n modify();\n }",
"public void update() {\n for (int i = 0; i < rows; i++) {\n for (int j = 0; j < columns; j++) {\n Point point = getPointAtLocation(i, j);\n WorldItem item = point.getContainedItem();\n calculatePointTemp(point);\n point.update();\n if (item instanceof FlammableItem) {\n updateIgnition(point);\n } else if (item instanceof SimulatedSensor) {\n updateAlarm(point);\n }\n }\n }\n }",
"public void updateRunning(float delta) {\n\n\n EntityManager.update(delta);\n playerShip.update(delta);\n EnemySpawner.update();\n particleManager.update();\n\n }",
"public void update() {\n for (int i = 0; i < activePickups.size(); i++) {\n\n Pickup p = activePickups.get(i);\n p.update();\n\n if (p.posY > MooseGame.HEIGHT || p.isActive == false) {\n activePickups.remove(p);\n }\n }\n\n }",
"public void update(float delta){\n\t\tint size = bloodActivePool.size;\n\t\twhile(--size >= 0){\n\t\t\tBlood b = bloodActivePool.get(size);\n\t\t\t\n\t\t\tb.update(delta);\n\t\t\t\n\t\t\tif(b.DEAD == true)\n\t\t\t{\n\t\t\t\tbloodActivePool.removeIndex(size);\n\t\t\t\tbloodPool.add(b);\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(SPLATTER_QUEUED){\n\t\t\tsplatter(Qx, Qy, Qcount);\n\t\t\tSPLATTER_QUEUED = false;\n\t\t}\n\t}",
"public static void setup() {\n\t\ttestUpdateParticle();\n\t\ttestRemoveOldParticles();\n\t\t\n\t\tif (testUpdateParticle() == true || testRemoveOldParticles() == true) {\n\t\t\tSystem.out.println(\"FAILED\");\n\t\t}\n\t\t\n\t\t// Build a new random field.\n\t\trandGen = new Random();\n\n\t\tpositionX = 400; // middle of the screen (left to right): 400\n\t\tpositionY = 300; // middle of the screen (top to bottom): 300\n\t\tstartColor = Utility.color(23, 141, 235); // blue: Utility.color(23,141,235)\n\t\tendColor = Utility.color(23, 200, 255); // lighter blue: Utility.color(23,200,255)\n\t\t\n\t\t// This array can store 800 particles\n\t\tparticles = new Particle[800];\n\n\t}",
"public ArrayList<Particle> getParticles()\n\t{\n\t\treturn particles;\n\t}",
"private synchronized void update() {\n int numberOfPoints = buffer.get(0).size();\n if (numberOfPoints == 0) return;\n\n for (int i = 0; i < getNumberOfSeries(); i++) {\n final List<Double> bufferSeries = buffer.get(i);\n final List<Double> dataSeries = data.get(i);\n dataSeries.clear();\n dataSeries.addAll(bufferSeries);\n bufferSeries.clear();\n }\n\n //D.info(SineSignalGenerator.this, \"Update triggered, ready: \" + getNumberOfSeries() + \" series, each: \" + data[0].length + \" points\");\n bufferIdx = 0;\n\n // Don't want to create event, just \"ping\" listeners\n setDataReady(true);\n setDataReady(false);\n }",
"private void update() {\n setPieceType();\n initBackground(pieceIndex);\n }",
"public abstract void updateVertices();",
"public void update()\n {\n this.lastProgress = this.progress;\n\n if (this.lastProgress >= 1.0F)\n {\n this.func_184322_i();\n this.worldObj.removeTileEntity(this.pos);\n this.invalidate();\n\n if (this.worldObj.getBlockState(this.pos).getBlock() == Blocks.piston_extension)\n {\n this.worldObj.setBlockState(this.pos, this.pistonState, 3);\n this.worldObj.notifyBlockOfStateChange(this.pos, this.pistonState.getBlock());\n }\n }\n else\n {\n this.progress += 0.5F;\n\n if (this.progress >= 1.0F)\n {\n this.progress = 1.0F;\n }\n\n this.func_184322_i();\n }\n }",
"abstract public void updatePositionsAfterBetaReduction();",
"public void enqueue ()\n {\n // update the transform state if necessary\n if (_ownTransformState) {\n _parentViewTransform.compose(_config.transform, _transformState.getModelview());\n _transformState.setDirty(true);\n }\n\n // sort by depth if so required (TODO: radix or incremental sort?)\n ParticleSystemConfig.Layer psconfig = (ParticleSystemConfig.Layer)_config;\n if (psconfig.depthSort) {\n Transform3D xform = _transformState.getModelview();\n for (int ii = 0, nn = _living.value; ii < nn; ii++) {\n Particle particle = _particles[ii];\n particle.depth = xform.transformPointZ(particle.getPosition());\n }\n QuickSort.sort(_particles, 0, _living.value - 1, DEPTH_COMP);\n }\n\n // update the center if necessary\n GroupPriority priorityMode = psconfig.priorityMode;\n if (priorityMode != null) {\n Box bounds = ((ParticleSystem)_parentScope).getGroupBounds(priorityMode.group);\n bounds.getCenter(_center);\n Transform3D xform = _ctx.getCompositor().getCamera().getWorldTransform();\n xform.getRotation().transformUnitZ(_vector).multLocal(\n priorityMode.priority * 0.0001f);\n pointToLayer(_center.addLocal(_vector), false);\n }\n }",
"public void update()\n {\n //Update the asteroids\n for (int i = 0; i < numAsteroids; i++)\n {\n asteroids[i].update(i);\n }\n }",
"private void init(int numberOfParticles, int dimensions) {\n MersenneTwisterFast mt = Utils.getMTInstance();\n double pos;\n double vel;\n \n Particle p = null;\n for (int i = 0; i < numberOfParticles; i++) {\n\n\n List<Double> tempPosition = new ArrayList<Double>(dimensions);\n List<Double> tempVelocity = new ArrayList<Double>(dimensions);\n for (int j = 0; j < dimensions; j++) {\n pos = this.getLowerBound().get(j) + (mt.nextDouble() * (this.getUpperBound().get(j) - this.getLowerBound().get(j)));\n vel = (this.getLowerBound().get(j) - this.getUpperBound().get(j)) / 2 + (mt.nextDouble() * (((this.getUpperBound().get(j)\n - this.getLowerBound().get(j)) / 2 - (this.getLowerBound().get(j) - this.getUpperBound().get(j)) / 2) + 1));\n tempPosition.add(pos);\n tempVelocity.add(vel);\n }\n if (this.phi == 0) {\n p = new Particle(this, tempPosition, this.informantsPerParticle);\n } else {\n p = new Particle(this, tempPosition, this.informantsPerParticle, this.phi);\n }\n\n p.setBestPosition(Utils.doubleListDeepCopy(tempPosition));\n p.setVelocity(tempVelocity);\n p.evaluate(getCostFunction());\n this.getPopulation().add(p);\n\n }\n \n }",
"void updatePercepts() {\n clearPercepts();\n\n Location r1Loc = model.getAgPos(0);\n Location r2Loc = model.getAgPos(1);\n\t\tLocation r3Loc = model.getAgPos(2);\n\t\tLocation r4Loc = model.getAgPos(3);\n\t\t\n Literal pos1 = Literal.parseLiteral(\"pos(r1,\" + r1Loc.x + \",\" + r1Loc.y + \")\");\n Literal pos2 = Literal.parseLiteral(\"pos(r2,\" + r2Loc.x + \",\" + r2Loc.y + \")\");\n\t\tLiteral pos3 = Literal.parseLiteral(\"pos(r3,\" + r3Loc.x + \",\" + r3Loc.y + \")\");\n\t\tLiteral pos4 = Literal.parseLiteral(\"pos(r4,\" + r4Loc.x + \",\" + r4Loc.y + \")\");\n\n addPercept(pos1);\n addPercept(pos2);\n\t\taddPercept(pos3);\n\t\taddPercept(pos4);\n\n if (model.hasObject(GARB, r1Loc)) {\n addPercept(g1);\n }\n if (model.hasObject(GARB, r2Loc)) {\n addPercept(g2);\n }\n\t\tif (model.hasObject(COAL, r4Loc)) {\n\t\t\taddPercept(c4);\t\n\t\t}\n }",
"public void spawnParticle(String particle, double x, double y, double z, double dx, double dy, double dz, double speed, int count);",
"public void update() {\n\t\t\n\t}",
"public void update() {\n\t\tif (c.getResamplingFactor() != 1) return;\n\t\trenderer.getVolume().updateData();\n\t}",
"public void update(){\r\n\t\t\r\n\t}",
"public void onLivingUpdate() {\n if (!this.onGround && this.motionY < 0.0D)\n this.motionY *= 0.6D;\n\n\n if (this.ticksExisted % 20 == 0 && this.getHealth() != this.getMaxHealth() && this.getHealth() >= 1)\n this.setHealth(this.getHealth() + 1);\n\n if (worldObj.isRemote) {\n if (this.isSitting())\n worldObj.spawnParticle(EnumParticleTypes.REDSTONE, posX, posY + 1.5, posZ, 0, 0, 0);\n }\n\n if (worldObj.isRemote) {\n MoWitchAndWizard.proxy.spawnParticles(\"air_normal\", this);\n }\n\n super.onLivingUpdate();\n }",
"public void update() {\n\t\tVec2 newPos = calculatePos();\n\t\t/* energy bar */\n\t\tfloat newEnergy = actor.getEnergy();\n\t\tfloat maxEnergy = actor.getEnergyLimit();\n\t\tenergy.setPosition(newPos.getX(), newPos.getY() + paddingHealth / Application.s_Viewport.getX(), newEnergy,\n\t\t\t\tmaxEnergy);\n\t\t/* health bar */\n\t\tfloat newHealth = actor.getHealth();\n\t\tfloat maxHealth = actor.getHealthLimit();\n\t\thealth.setPosition(newPos.getX(), newPos.getY() + paddingEnergy / Application.s_Viewport.getX(), newHealth,\n\t\t\t\tmaxHealth);\n\t\t/* name label */\n\t\tplayerName.setPosition(newPos.getX(), newPos.getY() + paddingName / Application.s_Viewport.getY());\n\t}",
"public void update() {}",
"public void update() {\r\n\t\t\r\n\t}",
"public void update() {\n\t\tupdate(1);\n\t}",
"public void updateOnAction(int update)\n {\n this.points += update;\n }",
"@Override\n public SpriteParticleSystem build(Engine engine, float fontX, float fontY)\n {\n\t final float particlesXSpawn = fontX;\n\t final float particlesYSpawn = fontY;\n\n\t //Max & min rate are the maximum particles per second and the minimum particles per second.\n\t final float maxRate = 100;\n\t final float minRate = 80;\n\n\t //This variable determines the maximum particles in the particle system.\n\t final int maxParticles = 30;\n\n\t //Particle emitter which will set all of the particles at a ertain point when they are initialized.\n\t final PointParticleEmitter pointParticleEmtitter = new PointParticleEmitter(particlesXSpawn, particlesYSpawn);\n\n\t //Creating the particle system.\n\t\tparticleSystem = new SpriteParticleSystem (pointParticleEmtitter, maxRate, minRate, maxParticles, ResourcesManager.getInstance().waterDrop, vbom);\n\n\t //And now, lets create the initiallizers and modifiers.\n\t //Velocity initiallizer - will pick a random velocity from -20 to 20 on the x & y axes. Play around with this value.\n\t particleSystem.addParticleInitializer(new VelocityParticleInitializer<Sprite>(-25, 25, 0, 150));\n\n\t //Acceleration initializer - gives all the particles the earth gravity (so they accelerate down).\n\t particleSystem.addParticleInitializer(new GravityParticleInitializer<Sprite>());\n\n\t //And now, adding an alpha modifier, so particles slowly fade out. This makes a particle go from alpha = 1 to alpha = 0 in 3 seconds, starting exactly when the particle is spawned.\n\t //particleSystem.addParticleModifier(new AlphaParticleModifier<Sprite>(1, 0, 0, 0));\n\n\t //Lastly, expire modifier. Make particles die after 3 seconds - their alpha reached 0.\n\t particleSystem.addParticleInitializer(new ExpireParticleInitializer<Sprite>(3)); \n\n\t return particleSystem;\n}",
"public void update() {\r\n\t\tremoveAll();\r\n\t\tdrawGrid();\r\n\t\tplotDecades();\r\n\t\tgetEntries();\r\n\t}",
"public void update(){\r\n }",
"public void update() ;",
"public void update() {\n\t}",
"public void update() {\n\t}",
"public void update() {\n\t}",
"public void update() {\n\t}",
"@Override\r\n\tpublic void onUpdate()\r\n {\r\n \t//update pos\r\n\t\tthis.prevPosX = this.posX;\r\n this.prevPosY = this.posY;\r\n this.prevPosZ = this.posZ;\r\n \r\n if(host != null)\r\n {\r\n \tupdateHostPosition();\r\n }\r\n \r\n //fade state\r\n switch (this.fadeState)\r\n {\r\n case 0: //fade in\r\n \tthis.fadeTick++;\r\n \tthis.particleAlpha = this.fadeTick * 0.2F;\r\n \t\r\n \tif (this.fadeTick > 5) this.fadeState = 1;\r\n \tbreak;\r\n case 1: //age++\r\n \tthis.playSpeedCount += this.playSpeed;\r\n \tthis.particleAge = this.frameSize * (int)this.playSpeedCount;\r\n \tthis.particleAlpha = 1F;\r\n \tbreak;\r\n case 2: //fade out\r\n \tthis.fadeTick--;\r\n \tthis.particleAlpha = this.fadeTick * 0.2F;\r\n \t\r\n \tif (this.fadeTick < 1)\r\n \t{\r\n \t\tthis.setExpired();\r\n \t\treturn;\r\n \t}\r\n \tbreak;\r\n \tdefault:\r\n \t\tthis.setExpired();\r\n \t\treturn;\r\n }\r\n \r\n //stay at last frame\r\n if (this.particleAge >= particleMaxAge)\r\n {\r\n \t\tthis.particleAge = this.particleMaxAge;\r\n \t\t\r\n \t\t//count stay ticks\r\n \t\tif (this.stayTickCount > this.stayTick)\r\n \t\t{\r\n \t\t\tthis.particleAge = this.particleMaxAge + 1; //next loop flag\r\n \t\t\tthis.stayTickCount = 0;\r\n \t\t}\r\n \t\telse\r\n \t\t{\r\n \t\t\tthis.stayTickCount += 1;\r\n \t\t}\r\n \t}\r\n\r\n //loop play\r\n if (this.particleAge > this.particleMaxAge)\r\n {\r\n \t//loop times--\r\n \tif (--this.playTimes <= 0)\r\n \t{\r\n \t\tthis.fadeState = 2; //change to fade out\r\n \t}\r\n \telse\r\n \t{\r\n \t\tthis.particleAge = 0;\r\n \t\tthis.playSpeedCount = 0F;\r\n \t}\r\n }\r\n }",
"public void onUpdateVertices() {\n getVertexBufferObject().onUpdateVertices(this);\n }",
"@Override\n\tpublic void update() {\n\t\tage++;\n\t\tpoints = Globals.points;\n\t}",
"private void calculateRecForces(){\n\t\t\n\t\t\n\t\tfor(Particle p : this){\n\t\t\t//Pg 183 Lee[05]\n\t\t\t//For each grid point that this particle has been interpolated to\n\t\t\tfor(int dx = -ASSIGNMENT_SCHEME_ORDER; dx < ASSIGNMENT_SCHEME_ORDER; dx++)\n\t\t\t{\n\t\t\t\tfor(int dy = -ASSIGNMENT_SCHEME_ORDER; dy < ASSIGNMENT_SCHEME_ORDER; dy++)\n\t\t\t\t{\n\t\t\t\t\tdouble uX = p.getPosition().re()/1.0 * CELL_SIDE_COUNT;//Scaled fractional coordinate\n\t\t\t\t\tdouble uY = p.getPosition().im()/1.0 * CELL_SIDE_COUNT;//Scaled fractional coordinate\n\t\t\t\t\tint particleCellX = (int)Math.round(p.getPosition().re()/1.0 * CELL_SIDE_COUNT);\n\t\t\t\t\tint particleCellY = (int)Math.round(p.getPosition().im()/1.0 * CELL_SIDE_COUNT);\n\t\t\t\t\tint thisX = particleCellX + dx;\n\t\t\t\t\tint thisY = particleCellY + dy;\n\t\t\t\t\tif(thisX >= 0 && thisY >= 0 && thisX < CELL_SIDE_COUNT && thisY < CELL_SIDE_COUNT)\n\t\t\t\t\t{\n\t\t\t\t\t\tdouble dQdx = p.getCharge() * M.evaluateDerivative(uX - thisX) * M.evaluate(uY - thisY);\n\t\t\t\t\t\tdouble dQdy = p.getCharge() * M.evaluate(uX - thisX) * M.evaluateDerivative(uY - thisY);\n\t\t\t\t\t\tp.addToForce(-dQdx * convolutedMatrix[thisX][thisY].re(), -dQdy * convolutedMatrix[thisX][thisY].re()); //FIXME .re()?\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t}",
"public void update() {\n }",
"void update();",
"void update();",
"void update();",
"void update();",
"void update();",
"void update();",
"void update();",
"void update();",
"public void update();",
"public void update();",
"public void update();",
"public void update();",
"public void update();",
"public void update();",
"public void update();",
"public void spawnParticle ( Particle particle , double x , double y , double z , int count , double offsetX ,\n\t\t\tdouble offsetY , double offsetZ , double extra ) {\n\t\tspawnParticle ( particle , x , y , z , count , offsetX , offsetY , offsetZ );\n\t}",
"public void update(){\n }",
"@Override\n public void update() {\n updateHealth();\n updateActiveWeapon();\n updateAmmunition();\n updateWaveCounter();\n updateReloading();\n }",
"public void updatePositions(LinkedList<IConstellation> activeConstellations) {\n activePositions.clear();\n for (int i = 0; i < Math.min(activeConstellations.size(), availablePositions.size()); i++) {\n activePositions.put(activeConstellations.get(i), availablePositions.get(i));\n }\n }",
"@Override\n \t\t\t\tpublic void doCreateQuadParticle() {\n \n \t\t\t\t}",
"@Override\n public void update ( long t )\n {\n try\n { \n // Iterate through all entities, filtering by those that contain the specific set of components, that this system is intended to work with.\n \n for ( ECSEntity entity : engine.getEntities ().values () )\n { \n if ( entity.hasComponents ( transform, physics ) )\n { \n // Update physics simulation.\n \n updatePhysics ( entity, t );\n \n // Console logger.\n \n logger.log ();\n }\n } \n \n // Swap the double buffers.\n \n engine.swapBuffer ();\n }\n catch ( Exception e )\n { \n TextFormat.printFormattedException ( e, true );\n }\n }",
"public void update() {\r\n\t\tdiffuse();\r\n\t\tdecay();\r\n\t}",
"public void poke(int mouse_x, int mouse_y) {\n\t\tint distance = 0;\n\t\tint i=0;\n\t\tfor (Particle p : pm.particlesystem) {\n\t\t\t//distance = p.getDistance(mouse_x, mouse_y);\n\t\t\tif(distance <= orad+200){//Ändern!\n\t\t\t\tSystem.out.println(i);\n\t\t\t\tparticle = p;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\ti++;\n\t\t}\n\t\t\n\t\tSystem.out.println(\"Poke erkannt!\");\n\t\tSystem.out.println(particle.getSpeed(0));\n\t\tSystem.out.println(particle.getSpeed(1));\n\t\tparticle.setSpeed(20, 20);\n\t\t\n\t\t\n\t\tSystem.out.println(particle.getSpeed(0));\n\t\tSystem.out.println(particle.getSpeed(1));\n\t\t\n\t\t\n//\t\tfor(int i = 0; i < 100; i++){\n//\t\t\tTestController.wait(300);\n//\t\t\tgui.repaint();\n//\t\t}\n\t\t\n\t}",
"boolean emitParticleMaybe(RenderState renderData, IParticle reusedParticle, PointF point, PointF vec);",
"@Override\r\n\tpublic void update() {\n\t\tsuper.update();\r\n\t}"
] | [
"0.7809311",
"0.7686586",
"0.74112105",
"0.73157054",
"0.7207914",
"0.71913844",
"0.7174879",
"0.70131004",
"0.6882732",
"0.685134",
"0.6721795",
"0.66643417",
"0.65908027",
"0.65712184",
"0.65355676",
"0.6518545",
"0.6357512",
"0.62743217",
"0.62606996",
"0.6259613",
"0.62017506",
"0.6154829",
"0.6136952",
"0.6126949",
"0.6110742",
"0.6092791",
"0.60908484",
"0.5991823",
"0.5981176",
"0.59453523",
"0.5941843",
"0.5875168",
"0.58643055",
"0.58529526",
"0.5848804",
"0.58132565",
"0.58101755",
"0.5774534",
"0.5746793",
"0.5744347",
"0.5727541",
"0.57219064",
"0.56878847",
"0.56777614",
"0.56711215",
"0.5662872",
"0.56514025",
"0.5645839",
"0.56345373",
"0.5630205",
"0.56226337",
"0.56128335",
"0.55792373",
"0.55365616",
"0.55335546",
"0.55334127",
"0.55258745",
"0.5520242",
"0.5519062",
"0.5515571",
"0.55141354",
"0.5510918",
"0.5510378",
"0.55083084",
"0.55081666",
"0.5503548",
"0.5501309",
"0.5501309",
"0.5501309",
"0.5501309",
"0.5461788",
"0.54554546",
"0.54429275",
"0.5427453",
"0.54260015",
"0.5422914",
"0.5422914",
"0.5422914",
"0.5422914",
"0.5422914",
"0.5422914",
"0.5422914",
"0.5422914",
"0.5406484",
"0.5406484",
"0.5406484",
"0.5406484",
"0.5406484",
"0.5406484",
"0.5406484",
"0.5396389",
"0.5379113",
"0.5368476",
"0.5368027",
"0.53672326",
"0.53374714",
"0.5336545",
"0.5335671",
"0.53318506",
"0.5320798"
] | 0.6255083 | 20 |
Reads in the list of particles that are available | private void updateParticles() {
// TODO Auto-generated method stub
predParticles = new ArrayList<File>();
preyParticles = new ArrayList<File>();
File f = new File(VisualizerMain.experimentBaseLocation+"/"+VisualizerMain.selectedRun+"/Epoch-"+epochSelected+"/");
File[] listFolders = f.listFiles();
for(File file : listFolders){
predParticles.add(file);
}
DefaultListModel listModelPredator = new DefaultListModel();
for (File file: predParticles){
listModelPredator.addElement(file.getName());
}
displayPred.setModel(listModelPredator);
DefaultListModel listModelPrey = new DefaultListModel();
for (File file: preyParticles){
listModelPrey.addElement(file.getName());
}
displayPrey.setModel(listModelPrey);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int getParticles() {\r\n\t\treturn particles;\r\n\t}",
"public ArrayList<Particle> getParticles()\n\t{\n\t\treturn particles;\n\t}",
"Particles particles();",
"private static void createNewParticles(int number) {\n\t\t// The following declarations are to initialize the random range for the \n\t\t// particle's feature\n\t\tint maxX = Fountain.positionX + 3;\n\t\tint minX = Fountain.positionX - 3;\n\t\tint boundX = maxX - minX;\n\t\tint maxY = Fountain.positionY + 3;\n\t\tint minY = Fountain.positionY - 3;\n\t\tint boundY = maxY - minY;\n\t\t\n\t\tint particleCount = 0; // For counting the new particles' amount\n\n\t\t\n\t\t\tfor (int i = 0; i < particles.length; i++) {\n\t\t\t\tif (particles[i] == null) {\n\t\t\t\t\t++particleCount;\n\t\t\t\t\t\n\t\t\t\t\t// Following codes are to prepare the setting for the particle\n\t\t\t\t\tint positionX = randGen.nextInt(boundX + 1) + maxX;\n\t\t\t\t\tint positionY = randGen.nextInt(boundY + 1) + maxY;\n\t\t\t\t\tfloat xVelocity = -1 + randGen.nextFloat() * (2);\n\t\t\t\t\tfloat yVelocity = -10 + randGen.nextFloat() * (5);\n\t\t\t\t\tfloat amount = randGen.nextFloat() * 1;\n\t\t\t\t\tint color = Utility.lerpColor(Fountain.startColor, Fountain.endColor, amount);\n\t\t\t\t\tfloat size = randGen.nextFloat() * (11 - 4);\n\t\t\t\t\tint age = randGen.nextInt(40 + 1);\n\t\t\t\t\tint transparency = randGen.nextInt((96)) + 32;\n\t\t\t\t\t\n\t\t\t\t\t// TO set the new particle with random feature\n\t\t\t\t\tparticles[i] = new Particle();\n\t\t\t\t\tparticles[i].setPositionX(positionX);\n\t\t\t\t\tparticles[i].setPositionY(positionY);\n\t\t\t\t\tparticles[i].setVelocityX(xVelocity);\n\t\t\t\t\tparticles[i].setVelocityY(yVelocity);\n\t\t\t\t\tparticles[i].setSize(size);\n\t\t\t\t\tparticles[i].setColor(color);\n\t\t\t\t\tparticles[i].setAge(age);\n\t\t\t\t\tparticles[i].setTransparency(transparency);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Once after creating 10 new particles, ends this method\n\t\t\t\tif (particleCount >= number) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"public static synchronized List<ActiveParticle> getActiveParticles() {\n return activeParticles;\n }",
"public void setParticles(int particles) {\r\n\t\tthis.particles = particles;\r\n\t}",
"public Array<Particle> getParticlesListIteration() {\n return new Array(masterList);\n }",
"private float[] generateParticleVelocities()\n {\n float velocities[] = new float[mEmitRate * 3];\n for ( int i = 0; i < mEmitRate * 3; i +=3 )\n {\n Vector3f nexVel = getNextVelocity();\n velocities[i] = nexVel.x;\n velocities[i+1] = nexVel.y;\n velocities[i+2] = nexVel.z;\n }\n return velocities;\n }",
"public void readMSP() throws IOException\n\t{\n\t\tString line = \"\";\t\t\t\t\t\t//Line for reading\n\t\tString fragType = \"\";\t\t\t\t\t//Fragment type\n\t\tString polarity = \"\";\t\t\t\t\t//Polarity of entry\n\t\tDouble precursor = 0.0;\t\t\t\t\t//Precursor mass\n\t\tString name = \"\";\t\t\t\t\t\t//Lipid name\n\t\tLibrarySpectrum entryTemp = null;\t\t//Temp library entry\n\t\tboolean peakStart = false;\t\t\t\t//Boolean if peak list beginning\n\t\tboolean isLipidex = false;\t\t\t\t//Boolean if spectra was generated using LipiDex\n\t\tboolean optimalPolarity = false;\t\t//Boolean if optimal polarity for class\n\t\tString[] split;\t\t\t\t\t\t\t//String array for parsing transitions\n\n\t\tfor (int i=0; i<lipidLibs.size(); i++)\n\t\t{\n\t\t\tupdateProgress((int)(Double.valueOf(i+1)\n\t\t\t\t\t/Double.valueOf(lipidLibs.size())*100.0),\"% - Reading Libraries\",true);\n\n\t\t\tBufferedReader reader = new BufferedReader(new FileReader(lipidLibs.get(i)));\n\n\t\t\t//read line if not empty\n\t\t\twhile ((line = reader.readLine()) != null)\n\t\t\t{\n\t\t\t\t//read in retention time\n\t\t\t\tif (line.contains(\"Name:\") || line.contains(\"NAME:\"))\n\t\t\t\t{\n\t\t\t\t\t//Add entry\n\t\t\t\t\tif (precursor>0.0) \n\t\t\t\t\t\taddSpectrum(entryTemp);\n\n\t\t\t\t\t//Erase entry\n\t\t\t\t\tpolarity = \"\";\n\t\t\t\t\tprecursor = 0.0;\n\t\t\t\t\tname = \"\";\n\t\t\t\t\tfragType = \"\";\n\t\t\t\t\tpeakStart = false;\n\t\t\t\t\tisLipidex = false;\n\t\t\t\t\toptimalPolarity = false;\n\n\t\t\t\t\tif (line.contains(\"]+\")) polarity = \"+\";\n\t\t\t\t\telse polarity = \"-\";\n\n\t\t\t\t\tname = line.substring(line.indexOf(\":\")+1);\n\t\t\t\t}\n\n\t\t\t\t//read in optimal polarity\n\t\t\t\tif (line.contains(\"OptimalPolarity=true\"))\n\t\t\t\t{\n\t\t\t\t\toptimalPolarity = true;\n\t\t\t\t}\n\n\t\t\t\tif (line.contains(\"LipiDex\")) isLipidex = true;\n\n\t\t\t\tif (line.contains(\"Num Peaks:\"))\n\t\t\t\t{\n\t\t\t\t\tpeakStart = true;\n\t\t\t\t\tentryTemp = new LibrarySpectrum(precursor, polarity, name, lipidLibs.get(i).getName(), isLipidex, optimalPolarity);\n\t\t\t\t}\n\n\t\t\t\tif (peakStart && line.contains(\".\") && !line.contains(\"Num\"))\n\t\t\t\t{\n\t\t\t\t\tif (line.contains(\"\t\")) \n\t\t\t\t\t\tsplit = line.split(\"\t\");\n\t\t\t\t\telse \n\t\t\t\t\t\tsplit = line.split(\" \");\n\n\t\t\t\t\tif (isLipidex)\n\t\t\t\t\t\tfragType = line.substring(line.indexOf(\"\\\"\")+1,line.lastIndexOf(\"\\\"\"));\n\n\t\t\t\t\tif (precursor-Double.valueOf(split[0])>2.0)\n\t\t\t\t\t\tentryTemp.addFrag(Double.valueOf(split[0]), Double.valueOf(split[1]), fragType, getTransitionType(fragType));\n\n\t\t\t\t}\n\n\t\t\t\tif (line.contains(\"PRECURSORMZ:\"))\n\t\t\t\t{\n\t\t\t\t\tprecursor = Double.valueOf(line.substring(line.lastIndexOf(\" \")+1));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\taddSpectrum(entryTemp);\n\t\t\treader.close();\n\t\t}\n\t}",
"protected int[] getParticlesByIndexInside( ArrayList<Object> geomObjects,PointXY[] boundingBox ){\r\n\t\t\r\n\t\tArrayList<Integer> pset = new ArrayList<Integer>() ;\r\n\t\tPoint2D testP2D;\r\n\t\tRepulsionFieldParticle particle;\r\n\t\tObject geomObject;\r\n\t\t\r\n\t\tboolean covered;\r\n\t\t\r\n\t\t\r\n\r\n\t\tfor (int i= 0; i<particles.size() ;i++){\r\n\t\t\t\r\n\t\t\tparticle = particles.get(i) ;\r\n\t\t\t\r\n\t\t\t// within bounding box? no? skip the rest , -> next particle by index value\r\n\t\t\tif ((particle.x<boundingBox[0].x-averageDistance*1.1) || (particle.x>boundingBox[1].x+averageDistance*1.1)){\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tif ((particle.y<boundingBox[0].y-averageDistance*1.1) || (particle.y>boundingBox[3].y+averageDistance*1.1)){\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t \r\n\t\t\t\r\n\t\t\ttestP2D = new Point2D( particle.x, particle.y);\r\n\t\t\t\r\n\t\t\t// test particle across all ellipses\r\n\t\t\tfor (int s=0;s<geomObjects.size();s++){\r\n\t\t\t\t\r\n\t\t\t\tgeomObject = geomObjects.get(s) ;\r\n\t\t\t\t \r\n\t\t\t\tcovered = isInsideGeomObject(geomObject,testP2D);\r\n\t\t\t\t\r\n\t\t\t\tif (covered) {\r\n\t\t\t\t\tif (pset.contains(i)==false){\r\n\t\t\t\t\t\tpset.add(i) ;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// out.print(2, \"+++ particle added, index:\"+i+\", location x,y:\" + df.format(particle.x)+\",\" + df.format(particle.y)+\" +++\");\r\n\t\t\t\t}else{\r\n\t\t\t\t\t// out.print(2, \"--- particle NOT added, index:\"+i+\", location x,y:\" + df.format(particle.x)+\",\" + df.format(particle.y)+\" ---\");\r\n\t\t\t\t}\r\n\t\t\t} // s->\r\n\t\t\t\r\n\t\t} // i->\r\n\t\t\r\n\t\t\r\n\t\tint[] particleIndexes = new int[pset.size()] ;\r\n\t\t\r\n\t\tfor (int i=0;i< pset.size();i++){\r\n\t\t\tparticleIndexes[i] = pset.get(i) ;\r\n\t\t}\r\n\t\treturn particleIndexes;\r\n\t}",
"private PotCollection loadPotList(){\n SharedPreferences preferences = getSharedPreferences(SHAREDPREF_SET, MODE_PRIVATE);\n int sizeOfPotList = preferences.getInt(SHAREDPREF_ITEM_POTLIST_SIZE, 0);\n for(int i = 0; i<sizeOfPotList; i++){\n Log.i(\"serving calculator\", \"once\");\n String potName = preferences.getString(SHAREDPREF_ITEM_POTLIST_NAME+i, \"N\");\n int potWeight = preferences.getInt(SHAREDPREF_ITEM_POTLIST_WEIGHT+i, 0);\n Pot tempPot = new Pot(potName, potWeight);\n potList.addPot(tempPot);\n }\n return potList;\n }",
"public static void update() {\n\t\t\n\t\t// Fill the background for every call\n\t\tUtility.background(Utility.color(235, 213, 186));\n\t\t\n\t\t// Create 10 new random particles\n\t\tcreateNewParticles(10);\n\t\t\n\t\t// Track every particle in the array then update their feature\n\t\tfor (int i = 0; i < particles.length; i++) {\n\t\t\tif (particles[i] != null) {\n\t\t\t\tupdateParticle(i);\n\t\t\t}\n\n\t\t}\n\n\t}",
"public final Set<Particle> getNoCollisionElements()\n {\n return noCollisionElements;\n }",
"private void readFromInternalStorage() {\n ArrayList<GeofenceObjects> returnlist = new ArrayList<>();\n if (!isExternalStorageReadable()) {\n System.out.println(\"not readable\");\n } else {\n returnlist = new ArrayList<>();\n try {\n FileInputStream fis = openFileInput(\"GeoFences\");\n ObjectInputStream ois = new ObjectInputStream(fis);\n returnlist = (ArrayList<GeofenceObjects>) ois.readObject();\n ois.close();\n System.out.println(returnlist);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n currentList = returnlist;\n }",
"private void init(int numberOfParticles, int dimensions) {\n MersenneTwisterFast mt = Utils.getMTInstance();\n double pos;\n double vel;\n \n Particle p = null;\n for (int i = 0; i < numberOfParticles; i++) {\n\n\n List<Double> tempPosition = new ArrayList<Double>(dimensions);\n List<Double> tempVelocity = new ArrayList<Double>(dimensions);\n for (int j = 0; j < dimensions; j++) {\n pos = this.getLowerBound().get(j) + (mt.nextDouble() * (this.getUpperBound().get(j) - this.getLowerBound().get(j)));\n vel = (this.getLowerBound().get(j) - this.getUpperBound().get(j)) / 2 + (mt.nextDouble() * (((this.getUpperBound().get(j)\n - this.getLowerBound().get(j)) / 2 - (this.getLowerBound().get(j) - this.getUpperBound().get(j)) / 2) + 1));\n tempPosition.add(pos);\n tempVelocity.add(vel);\n }\n if (this.phi == 0) {\n p = new Particle(this, tempPosition, this.informantsPerParticle);\n } else {\n p = new Particle(this, tempPosition, this.informantsPerParticle, this.phi);\n }\n\n p.setBestPosition(Utils.doubleListDeepCopy(tempPosition));\n p.setVelocity(tempVelocity);\n p.evaluate(getCostFunction());\n this.getPopulation().add(p);\n\n }\n \n }",
"public ArrayList<Particle> getNearParticles(Complex p, int range)\n\t{\n\t\tint cellX = (int)Math.floor(p.re() / meshWidth);\n\t\tint cellY = (int)Math.floor(p.im() / meshWidth);\n\t\treturn proximityList[cellX][cellY];\n\t}",
"void wildcardParticle(ParticleSG particle) throws SAXException;",
"public static void setup() {\n\t\ttestUpdateParticle();\n\t\ttestRemoveOldParticles();\n\t\t\n\t\tif (testUpdateParticle() == true || testRemoveOldParticles() == true) {\n\t\t\tSystem.out.println(\"FAILED\");\n\t\t}\n\t\t\n\t\t// Build a new random field.\n\t\trandGen = new Random();\n\n\t\tpositionX = 400; // middle of the screen (left to right): 400\n\t\tpositionY = 300; // middle of the screen (top to bottom): 300\n\t\tstartColor = Utility.color(23, 141, 235); // blue: Utility.color(23,141,235)\n\t\tendColor = Utility.color(23, 200, 255); // lighter blue: Utility.color(23,200,255)\n\t\t\n\t\t// This array can store 800 particles\n\t\tparticles = new Particle[800];\n\n\t}",
"private void readScores() {\n final List<Pair<String, Integer>> list = new LinkedList<>();\n try (DataInputStream in = new DataInputStream(new FileInputStream(this.file))) {\n while (true) {\n /* reads the name of the player */\n final String name = in.readUTF();\n /* reads the score of the relative player */\n final Integer score = Integer.valueOf(in.readInt());\n list.add(new Pair<String, Integer>(name, score));\n }\n } catch (final Exception ex) {\n }\n this.sortScores(list);\n /* if the list was modified by the cutting method i need to save it */\n if (this.cutScores(list)) {\n this.toSave = true;\n }\n this.list = Optional.of(list);\n\n }",
"public List<Tailor> read();",
"public void addRandomParticles(int n, Compound c, double temperature) {\r\n\t\tVector dim = Vector.sub(phys.getboundBR(), phys.getboundTL());\r\n\t\tVector center = Vector.add(phys.getboundBR(), phys.getboundTL()).mul(0.5);\r\n\t\tfor (int i = 0; i < n; i++) {\r\n\t\t\tdouble angle = Math.random()*2.0*Math.PI;\r\n\t\t\tdouble speed = Math.sqrt(PhysicsSimulation.BOLTZMANN * temperature * 3.0 / c.getmass());\r\n\t\t\tParticle p = new Particle((Math.random() - 0.5)*dim.x + center.x, (Math.random() - 0.5)*dim.y + center.y, speed * Math.cos(angle), speed * Math.sin(angle), c);\r\n\t\t\tphys.addParticle(p);\r\n\r\n\t\t\t//System.out.println(p.getVelocity());\r\n\t\t\t//System.out.println(p.getPosition());\r\n\t\t\t\r\n\t\t}\r\n\t}",
"List<? extends Particle> update(double timeDelta);",
"@External\r\n\t@ClientFunc\r\n\tpublic MetaVarNumber GetNumActiveParticles();",
"public void readParameters() {\r\n File directory = new File(OptionItems.XML_DEFINITION_PATH);\r\n if (directory.exists()) {\r\n parameterParserXML.readParameterDefinition(configData.getParameterList());\r\n parameterParserXML.processParameterDependency();\r\n }\r\n\r\n Log.info(\"info.progress_control.load_parameter_description\");\r\n }",
"void getVertices() {\r\n\t\tSystem.out.println(\"Enter your vertices:\");\r\n\t\tarrIndexToVertexMap = new HashMap<>();\r\n\t\ttry {\r\n\t\t\tfor (int i = 0; i < numberOfVertices; i++) {\r\n\t\t\t\tarrIndexToVertexMap.put(i, sc.next());\r\n\t\t\t}\r\n\t\t\tsc.close();\r\n\t\t} catch (RuntimeException re) {\r\n\t\t\tSystem.out.println(\"Error at method:: getVertices || Description:\" + re);\r\n\t\t}\r\n\t}",
"private Particle[] createParticles(int N){\n Particle[] arr = new Particle[N];\n double v = 0, avgV = 0;\n\n int i = 0;\n while(i < N) {\n double sum = 0, d = (1.0 / N);\n if(T < 150.0) d *= 0.5;\n if(T < 50.0) d *= 0.5;\n while (sum < 1.0 / (N + 1)) {\n sum += func(v) * d;\n v += d;\n }\n System.out.println(\"v=\" + v + \", func(v)=\" + func(v));\n\n arr[i] = new Particle(0, 0, 400);\n double dir = Math.random() * 2 * Math.PI;\n arr[i].setVelocity(v, dir);\n\n avgV += v;\n\n i += 1;\n }\n\n avgV /= N;\n System.out.println(\"AvgV=\" + avgV);\n return arr;\n }",
"public void drawParticles() {}",
"public boolean getShowParticles()\r\n/* 90: */ {\r\n/* 91: 91 */ return this.showParticles;\r\n/* 92: */ }",
"public ObjectArrayList getPrimings(String name, String sequence) throws IOException, InterruptedException{\n\t\tBufferedReader reader = getPrimingsInternal(name, sequence);\n\t\t\n\t\tObjectArrayList hits = new ObjectArrayList();\n\t\tString ln;\n\t\twhile((ln = reader.readLine()) != null){\n\t\t\tString[] values = ln.split(\"\\t\");\n\t\t\tif(values.length == 21 && !values[0].equals(\"match\")){\n\t\t\t\t// prune hits\n\t\t\t\tint queryLength = Integer.parseInt(values[10]);\n//\t\t\t\tint queryStart = Integer.parseInt(values[11]);\n\t\t\t\tint queryEnd = Integer.parseInt(values[12]);\n\t\t\t\t\n\t\t\t\t// prune misprimings with NO end priming\n\t\t\t\tif(isDangerousMispriming(queryLength, queryEnd)){\n\t\t\t\t\t//hits.add(new IndexHitImpl(new SimpleContig(values[13].replace('_', ' ').substring(0, values[13].length() - 1)), Integer.parseInt(values[15]), values[8].equals(\"+\") ? true : false));\n\t\t\t\t\thits.add(new IndexHitImpl(new SimpleSlimContig(values[13]), Integer.parseInt(values[15]), values[8].equals(\"+\") ? true : false));\n\t\t\t\t}\n\t\t\t\telse continue;\n\t\t\t}\n\t\t}\n\t\t//System.out.println(\"Found \" + hits.size() + \" hits for query \" + sequence);\n\t\treturn hits;\n\t}",
"private static void readFile(ArrayList<Process> processList, int availableRes[]){\n String processInfo;\n Scanner inputFile = openFile();\n if(inputFile == null){System.exit(-1);}\n\n initializeResArray(availableRes, inputFile);\n\n int processID = 0;\n while(inputFile.hasNextLine()){\n processInfo = inputFile.nextLine();\n Process toAdd = createProcessFromInput(processInfo);\n toAdd.setPID(processID);\n processList.add(toAdd);\n processID++;\n }\n inputFile.close();\n }",
"private void readItems() {\n // open file\n File file = getFilesDir();\n File todoFile = new File(file, \"scores.txt\");\n // try to find items to add\n try {\n items = new ArrayList<>(FileUtils.readLines(todoFile));\n } catch (IOException e) {\n items = new ArrayList<>();\n }\n }",
"public static void readLocations() throws ProgressionException\n\t{\n\t\t//File file = GeoDis_GUI.inputfile;\n\t\t//infilename = file.getPath();\n\t\t//System.err.println(file.getPath());\n\t\t//infile = new TextInputStream(file.getPath());\n\t\tlogfile.print(\"\\nReading geographical locations ...\");\n\t\tinfile = new TextInputStream(GeoDis.infilename);\n\t\t\n\t\tdataName = infile.readLine(); \n\t\t//System.err.println (dataName);\n \t\n\t\tnumLocations = infile.readInt(); \n\t\t//System.err.println(numLocations);\n\t\n\t\n\t\tlocationName = new String[numLocations]; \n\t\tsampleSize = new int[numLocations]; \n\t\tLatitude = new double[numLocations]; \n\t\tLongitude = new double[numLocations]; \n\t\t\n\t\tfor(j = 0; j < numLocations; j++)\n\t\t{\n\t\t\t//trash = infile.readLine(); // read the \\n character in PC's\n\t\t\t\n\t\t\tlocationName[j] = infile.readLine(); \n\n\t\t\tif (locationName[j].length() == 0)\t\t\t\n\t\t\t\tlocationName[j] = infile.readLine(); \n\t\t\t\n\t\t\tsampleSize[j] = infile.readInt();\n\n\n\t\t\tif (usingDecimalDegrees) \n\t\t\t{\n\t\t\t\tLatitude[j] = infile.readFloat();\n\t\t\t\tLongitude[j] = infile.readFloat();\n\t\t\t}\t\n\n\t\t\telse\n\t\t\t{\n\t\t\t\tlat_deg = infile.readInt();\n\t\t\t\tlat_min = infile.readInt();\n\t\t\t\tlat_sec = infile.readInt();\n\t\t\t\tlat_coor = infile.readWord();\n\t\t\t\tlon_deg = infile.readInt();\n\t\t\t\tlon_min = infile.readInt();\t\t\t\t\n\t\t\t\tlon_sec = infile.readInt();\n\t\t\t\tlon_coor = infile.readWord();\n\t\t\t\n\t\t\t\t//System.err.println (sampleSize[j] + \" \" + lat_deg + \" \" + lat_min + \" \" + lat_sec + \" \" + lat_coor + \" \" + \n\t\t\t\t //lon_deg + \" \" + lon_min + \" \" + lon_sec + \" \" + lon_coor);\n\t\t\t\t\n\t\t\t\tdec_lat = (double)lat_deg + ((double)lat_min/60.0) + ((double)lat_sec/3600.0);\n\t\t\t\tdec_lon = (double)lon_deg + ((double)lon_min/60.0) + ((double)lon_sec/3600.0);\n\t\t\t\t\n\n\t\t\t\tif (lat_coor.equalsIgnoreCase(\"N\"))\n\t\t\t\t\tLatitude[j] = dec_lat;\n\t\t\t\telse if (lat_coor.equalsIgnoreCase(\"S\"))\n\t\t\t\t\tLatitude[j] = -1.0 * dec_lat; \n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tStringBuffer str = new StringBuffer();\n\t\t\t\t\tstr.append(\"The letter for the latitude is neither N nor S.\");\n\t\t\t\t\tstr.append(\"\\nNote that latitude should come before longitude.\");\n\t\t\t\t\tif(!Mediator.isCommandLineApp()){\n\t\t\t\t\t\tJOptionPane.showMessageDialog(frame,\"The letter for the latitude is neither N nor S.\" + \n\t\t \t\t\t\"\\n Note that latitude should come before longitude\",\n \t\t\t\"GeoDis warning\", JOptionPane.WARNING_MESSAGE);\n\t\t\t\t \t\t//frame.dispose();\t\t\t\t\n\t\t\t\t\t\t//System.exit(0);\n\t\t\t\t\t\tthrow new ProgressionException(str.toString());\n\t\t\t\t\t} else {\n\t\t\t\t\t\tstr.append(\"[GeoDis]\\n\");\n\t\t\t\t\t\tMediator.writeError(str.toString());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\n\t\t\t\tif (lon_coor.equalsIgnoreCase(\"E\"))\n\t\t\t\t\tLongitude[j] = dec_lon;\n\t\t\t\telse if (lon_coor.equalsIgnoreCase(\"W\"))\n\t\t\t\t\tLongitude[j] = -1.0 * dec_lon;\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tStringBuffer str = new StringBuffer();\n\t\t\t\t\tstr.append(\"The letter for the longitude is neither E nor W.\");\n\t\t\t\t\tstr.append(\"\\nNote that latitude should come before longitude.\");\n\t\t\t\t\tif(!Mediator.isCommandLineApp()){\n\t\t\t\t\t\tJOptionPane.showMessageDialog(frame,\"The letter for the longitude is neither E nor W.\" + \n\t\t \t\t\t\"\\n See that latitude come first than longitude\",\n \t\t\t\"GeoDis warning\", JOptionPane.WARNING_MESSAGE);\n\t\t\t\t \t\t//frame.dispose();\t\t\t\t\n\t\t\t\t\t\t//System.exit(0);\n\t\t\t\t\t\tthrow new ProgressionException(str.toString());\n\t\t\t\t\t} else {\n\t\t\t\t\t\tstr.append(\"[GeoDis]\\n\");\n\t\t\t\t\t\tMediator.writeError(str.toString());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (locationName[i] == null || sampleSize[i] <= 0 || Latitude[j] > 90 || Latitude[j]< -90 || Longitude[j] < -180 || Longitude[j] > 180) \n\t\t\t{\n\t\t\t\t\n\t\t\t\tif (locationName[i] == null)\n\t\t\t\t\tif(!Mediator.isCommandLineApp()){\n\t\t\t\t\t\tSystem.err.println (\"\\nlocationName [i] == null\");\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (sampleSize[i] <= 0)\n\t\t\t\t\tif(!Mediator.isCommandLineApp()){\n\t\t\t\t\t\tSystem.err.println (\"\\nsampleSize[i] <= 0\");\n\t\t\t\t\t}\n\n\t\t\t\tif (Latitude[j] > 90)\n\t\t\t\t\tif(!Mediator.isCommandLineApp()){\n\t\t\t\t\t\tSystem.err.println (\"\\nLatitude[j] > 90\");\n\t\t\t\t\t}\n\n\t\t\t\tif (Latitude[j]< -90)\n\t\t\t\t\tif(!Mediator.isCommandLineApp()){\n\t\t\t\t\t\tSystem.err.println (\"\\nLatitude[j]< -90\");\n\t\t\t\t\t}\n\n\t\t\t\tif (Longitude[j] < -180)\n\t\t\t\t\tif(!Mediator.isCommandLineApp()){\n\t\t\t\t\t\tSystem.err.println (\"\\nLongitude[j] < -180\");\n\t\t\t\t\t}\n\n\t\t\t\tif (Longitude[j] > 180)\n\t\t\t\t\tif(!Mediator.isCommandLineApp()){\n\t\t\t\t\t\tSystem.err.println (\"\\nLongitude[j] > 180\");\n\t\t\t\t\t}\n\n\t\t\t\tStringBuffer str = new StringBuffer();\n\t\t\t\tstr.append(\"There was an error reading the population description\");\n\t\t\t\tstr.append(\"\\nor its coordinates. If your coordinates are in decimal degrees, have you checked that box?\");\n\t\t\t\tif(!Mediator.isCommandLineApp()){\n\t\t\t\t\tJOptionPane.showMessageDialog(frame,\"There was an error reading the population description\" +\n\t\t\t\t\t\t\"\\nor its coordinates. If your coordinates are in decimal degrees, have you checked that box?\",\n \"GeoDis warning\", JOptionPane.WARNING_MESSAGE);\n\t\t\t\t\t//frame.dispose();\t\t\t\t\n\t\t\t\t\t//System.exit(0);\n\t\t\t\t\tthrow new ProgressionException(str.toString());\n\t\t\t\t} else {\n\t\t\t\t\tstr.append(\"[GeoDis]\\n\");\n\t\t\t\t\tMediator.writeError(str.toString());\n\t\t\t\t}\n\t\t\t}\n\t\t\tlogfile.print(\"\\nreading \" + locationName[j] + \" \" + sampleSize[j] + \" \");\n\t\t\tlogfile.printf(\" %6.4f\",Latitude[j]);\n\t\t\tlogfile.printf(\" %6.4f\",Longitude[j]);\n\t\t\t//System.err.println (locationName[j]);\n\t\t\t//System.err.println(sampleSize[j] + \" \" + Latitude[j] + \" \" + Longitude[j]);\t\t\t\n\t\t}\n\n\t \t/* TRANSFORM DEGREES TO RADIANS */\n\t\tfor(j = 0; j < numLocations; j++)\n\t\t{\n\t\t\tLatitude[j] *= D2R;\n\t\t\tLongitude[j] *= D2R;\n\t\t} \n\t\tlogfile.println(\"\\nOK\");\n\n \t}",
"public void getProbe () {\n double prxg;\n int index;\n double effaoa = effective_aoa();\n /* get variables in the generating plane */\n if (Math.abs(ypval) < .01) ypval = .05;\n getPoints(xpval,ypval);\n\n solver.getVel(lrg,lthg);\n loadProbe();\n\n pxg = lxgt;\n pyg = lygt;\n prg = lrgt;\n pthg = lthgt;\n pxm = lxmt;\n pym = lymt;\n /* smoke */\n if (pboflag == 3 ) {\n prxg = xpval;\n for (index =1; index <=POINTS_COUNT; ++ index) {\n getPoints(prxg,ypval);\n xg[19][index] = lxgt;\n yg[19][index] = lygt;\n rg[19][index] = lrgt;\n thg[19][index] = lthgt;\n xm[19][index] = lxmt;\n ym[19][index] = lymt;\n if (stall_model_type != STALL_MODEL_IDEAL_FLOW) { // stall model\n double apos = stall_model_type == STALL_MODEL_DFLT ? +10 : stall_model_apos;\n double aneg = stall_model_type == STALL_MODEL_DFLT ? -10 : stall_model_aneg;\n if (xpval > 0.0) {\n if (effaoa > apos && ypval > 0.0) { \n ym[19][index] = ym[19][1];\n } \n if (effaoa < aneg && ypval < 0.0) {\n ym[19][index] = ym[19][1];\n }\n }\n if (xpval < 0.0) {\n if (effaoa > apos && ypval > 0.0) { \n if (xm[19][index] > 0.0) {\n ym[19][index] = ym[19][index-1];\n }\n } \n if (effaoa < aneg && ypval < 0.0) {\n if (xm[19][index] > 0.0) {\n ym[19][index] = ym[19][index-1];\n }\n }\n }\n }\n solver.getVel(lrg,lthg);\n prxg = prxg + vxdir*STEP_X;\n }\n }\n return;\n }",
"public void loadList(PluviometerPojo pluviometerPojo) {\r\n\t\tthis.pluviometerPojo = pluviometerPojo;\r\n\t\treadingList = new ArrayList<Integer>();\r\n\t\tfor (int reading : pluviometerPojo.getVector()) {\r\n\t\t\treadingList.add(reading);\r\n\t\t}\r\n\t}",
"protected void updateParticles() {\n\n\t\tfor (int i = 0; i < particles.size(); i++) {\n\t\t\tVParticle p = particles.get(i);\n\t\t\tif (p.neighbors == null) {\n\t\t\t\tp.neighbors = particles;\n\t\t\t}\n\t\t\tfor (BehaviorInterface b : behaviors) {\n\t\t\t\tb.apply(p);\n\t\t\t}\n\t\t}\n\t\tfor (int i = 0; i < particles.size(); i++) {\n\t\t\tVParticle p = particles.get(i);\n\t\t\tp.scaleVelocity(friction);\n\t\t\tp.update();\n\t\t}\n\t}",
"@Override\n\tpublic Array<AssetDescriptor> getDependencies(String arg0, FileHandle arg1,\n\t\t\tParticleEffectParameter arg2) {\n\t\treturn null;\n\t}",
"public void readSampless(){\n\t\tif (loop) {\n\t\t\treadBytesLoop();\n\t\t} else {\n\t\t\treadBytes();\n\t\t}\n\t\t// convert them to floating point\n\t\t// hand those arrays to our effect\n\t\t// and convert back to bytes\n\t\tprocess();\n\t\t\n\t\t// write to the line.\n\t\twriteBytes();\n\t\t// send samples to the listener\n\t\t// these will be what we just put into the line\n\t\t// which means they should be pretty well sync'd\n\t\t// with the audible result\n\t\tbroadcast();\n\t}",
"private void readItems() {\n }",
"public void checkParticles4Destruction(){\n\t\t\tif(System.nanoTime() - creationTime > 3*Math.pow(10, 9)){\n\t\t\t\t\n\t\t\t\twhile(!particles.isEmpty()){\n\t\t\t\t\tParticle p = particles.poll();\n\t\t\t\t\tp.destroy(); \n\t\t\t\t}\n\t\t\t}\n\t}",
"public ArrayList<String> loadToRead() {\n\n\t\tSAVE_FILE = TO_READ_FILE;\n\t\tArrayList<String> list = new ArrayList<String>();\n\t\tlist = loadIds();\n\t\treturn list;\n\t}",
"public void updateParticles() {\n\n // Update walkingAnimation particle effect\n walkingParticleEffect.update(Gdx.graphics.getDeltaTime());\n if(walkingParticleEffect.isComplete()) {\n walkingParticleEffect.reset();\n }\n\n // Update getting hit particle effect\n if(damaged) {\n gettingHitParticleEffect.update(Gdx.graphics.getDeltaTime());\n if(gettingHitParticleEffect.isComplete() && !dead) {\n damaged = false;\n gettingHitParticleEffect.reset();\n }\n }\n }",
"public void read_from_buffer(DataInputStream in) throws IOException\r\n {\r\n for (int i = 0; i < 2*dimension; ++i)\r\n bounces[i] = in.readFloat();\r\n son = in.readInt();\r\n num_of_data = in.readInt();\r\n }",
"Sprite[] readRomSprites(boolean unownSprites) throws IOException\r\n {\n\r\n Sprite[] sprites = (unownSprites) ? new Sprite[N_UNOWN] : new Sprite[N_POKEMON];\r\n int ptrOffset = (unownSprites) ? OFFSET_SPRITE_POINTERS_U : OFFSET_SPRITE_POINTERS;\r\n\r\n for (int i = 0; i < sprites.length; i++)\r\n {\r\n byte[] ptr; // pointer to sprite\r\n int[] pos = new int[2];\r\n int length;\r\n\r\n ptr = readFromRom(ch, ptrOffset + 6 * i, 3);\r\n pos[0] = Sprite.pointerToOffset(ptr);\r\n length = (!unownSprites && i == INDEX_UNOWN - 1) ? 0 : getPicSize(pos[0]);\r\n\r\n byte[] front = readFromRom(ch, pos[0], length);\r\n\r\n ptr = readFromRom(ch, ptrOffset + 6 * i + 3, 3);\r\n pos[1] = Sprite.pointerToOffset(ptr);\r\n length = (!unownSprites && i == INDEX_UNOWN - 1) ? 0 : getPicSize(pos[1]);\r\n\r\n byte[] back = readFromRom(ch, pos[1], length);\r\n\r\n byte dim;\r\n if (unownSprites)\r\n {\r\n dim = readByteFromRom(ch, OFFSET_POKEMON_1 + 0x11 + (0x20 * (INDEX_UNOWN - 1))); // read only the relevant byte\r\n }\r\n else\r\n {\r\n dim = readByteFromRom(ch, OFFSET_POKEMON_1 + 0x11 + (0x20 * i)); // read only the relevant byte\r\n }\r\n sprites[i] = new Sprite(front, back, dim, pos);\r\n }\r\n\r\n return sprites;\r\n }",
"public void update() {\n Iterator<Particle> iter = particles.iterator();\n\n while (iter.hasNext()) {\n Particle p = iter.next();\n if (p.isDead()) {\n iter.remove();\n } else {\n p.update();\n }\n }\n }",
"private Collection<Point2D> loadAllPoints(Node seriesNode) {\n\t\tlong allPointsCount = 0;\n\t\tCollection<Point2D> allPoints = new LinkedList<Point2D>();\n\t\t\n if (seriesNode.getNodeName().equalsIgnoreCase(SERIES_TAG)) {\n \tNode allPtsNode = seriesNode.getFirstChild();\n \twhile (allPtsNode != null) {\n \t\tif (allPtsNode.getNodeName().equals(ALL_POINTS_TAG)) {\n \t\t\tallPointsCount = Util.getLong(allPtsNode, POSITION_COUNT_TAG);\n \t\t\t\n \t\t\tSystem.out.println(\"Preaparing to load \" + allPointsCount + \" points from the XML node structure.\");\n \t\t\tNode pointNode = allPtsNode.getFirstChild();\n \t\t\twhile (pointNode != null) {\n \t\t\t\tif (pointNode.getNodeName().equals(POSITION_TAG)) {\n \t\t\t\t\tallPoints.add(new Position(pointNode));\n \t\t\t\t}\n \t\t\t\tpointNode = pointNode.getNextSibling();\n \t\t\t} // end while\n \t\t}\n \t\t\tallPtsNode = allPtsNode.getNextSibling();\n \t} // end while\n }\n return allPoints;\n\t}",
"public void readParameters()\n {\n readParameters(getData());\n }",
"private void loadInformation(){\n\t\ttry{\n\t\t\tFileReader fr = new FileReader(\"SpaceProgramGaussDistribution.txt\");\n\t\t\tBufferedReader br = new BufferedReader(fr);\n\t\t\tScanner sc = new Scanner(br);\n\t\t\t\n\t\t\tString info = \"\";\n\t\t\t\n\t\t\twhile(sc.hasNextLine()){\n\t\t\t\tinfo += sc.nextLine();\n\t\t\t}\n\t\t\t\n\t\t\tString split[] = info.split(\"#\");\n\t\t\t\n\t\t\tfor(int i = 0; i < split.length; i++){\n\t\t\t\tpopulationInfo += split[i]+\"\\n\";\n\t\t\t}\n\t\t\tsc.close();\n\t\t\tbr.close();\n\t\t\tfr.close();\n\t\t\t\n\t\t}catch(Exception e){\n\t\t\tSystem.out.println(\"File not found: SpaceProgramGaussDistribution.txt\");\n\t\t}\n\t}",
"public void spawnParticle(String particle, double x, double y, double z, double dx, double dy, double dz, double speed, int count);",
"public ArrayList getAll() {\r\n\t\tArrayList list = new ArrayList();\r\n\t\tlist.addAll(getParticles());\r\n\t\tlist.addAll(getConstraints());\r\n\t\tlist.addAll(getComposites());\r\n\t\treturn list;\r\n\t}",
"private static ArrayList<String> loadParameters() throws IOException {\r\n BufferedReader br = new BufferedReader(new FileReader(new File(\"conf.data\")));\r\n\r\n ArrayList<String> params = new ArrayList<>();\r\n\r\n String param;\r\n while ((param = br.readLine()) != null ){\r\n params.add(param);\r\n }\r\n\r\n return params;\r\n }",
"protected long getAvailableData_EM() {\n long result = 0;\n IGregTechTileEntity baseMetaTileEntity = getBaseMetaTileEntity();\n Vec3Impl pos = new Vec3Impl(baseMetaTileEntity.getXCoord(), baseMetaTileEntity.getYCoord(), baseMetaTileEntity.getZCoord());\n for (GT_MetaTileEntity_Hatch_InputData in : eInputData) {\n if (in.q != null) {\n Long value = in.q.contentIfNotInTrace(pos);\n if (value != null) {\n result += value;\n }\n }\n }\n return result;\n }",
"public void update()\n {\n // start from the bottom of the world\n\n for (int y = height - 1; y >= 0; --y)\n {\n // compute offset to this and next line\n\n int thisOffset = y * width;\n \n // are we at top or bottom?\n\n boolean atTop = y == 0;\n boolean atBot = y == height - 1;\n\n // process line in random order\n \n for (int x: xRndIndex[rnd.nextInt(RND_INDEX_CNT)])\n {\n // index of this pixel\n \n int ip = thisOffset + x;\n \n // value of this pixel\n\n int p = pixels[ip];\n\n // don't process inert matter\n\n if (p == AIR || p == ROCK || p == EARTH)\n continue;\n\n // are we on a left or right edge?\n\n boolean atLeft = x == 0;\n boolean atRight = x == width - 1;\n\n // indices of pixels around this particle\n\n int iuc = ip - width;\n int idc = ip + width;\n int idl = idc - 1;\n int idr = idc + 1;\n int il = ip - 1;\n int ir = ip + 1;\n\n // get pixels for each index\n\n int uc = atTop ? ROCK : pixels[iuc];\n int dc = atBot ? ROCK : pixels[idc];\n int dl = atBot || atLeft ? ROCK : pixels[idl];\n int dr = atBot || atRight ? ROCK : pixels[idr];\n int l = atLeft ? ROCK : pixels[il];\n int r = atRight ? ROCK : pixels[ir];\n \n // the following actions propogate elements around the\n // world, they do not conserve matter\n\n // if fire, propogate fire\n\n if (p == FIRE1 || p == FIRE2 || p == FIRE3 || \n p == FIRE4 || p == FIRE5 || p == FIRE6)\n {\n int[] burn = {atLeft ? ip : il,\n atRight ? ip : ir,\n atTop ? ip : iuc,\n atBot ? ip : idc};\n\n\n for (int ib: burn)\n {\n int b = pixels[ib];\n\t\t\t\t\t \n\t\t\t\t\t // fire burns plants and oil, makes steam out of water\n\t\t\t\t\t \n if ((b == PLANT || b == OIL || b == COLUMBINE) &&\n rnd.nextInt(FIRE_CHANCE_IN) == 0)\n pixels[ib] = FIRE1;\n else\n if (b == WATER)\n {\n pixels[ib] = STEAM;\n pixels[ip] = STEAM;\n\t\t\t\t\t\t pixels[iuc] = STEAM;\n p = STEAM;\n break;\n }\n }\n // move fire along\n\n if (p == FIRE1)\n {\n pixels[ip] = FIRE3;\n continue;\n }\n if (p == FIRE2)\n {\n pixels[ip] = FIRE3;\n continue;\n }\n if (p == FIRE3)\n {\n pixels[ip] = FIRE4;\n continue;\n }\n if (p == FIRE4)\n {\n pixels[ip] = FIRE5;\n continue;\n }\n if (p == FIRE5)\n {\n pixels[ip] = FIRE6;\n continue;\n }\n if (p == FIRE6)\n {\n pixels[ip] = AIR;\n continue;\n }\n }\n // if this is steam, evaporate into air\n\n if (p == STEAM)\n { pixels[ip] = AIR;\n continue;\n\t\t\t }\n\n // if this is an everything sucker\n\n if (p == AIR_SOURCE)\n {\n int[] targets = {atLeft ? ip : il,\n atRight ? ip : ir,\n atTop ? ip : iuc,\n atBot ? ip : idc};\n for (int it: targets)\n pixels[it] = AIR;\n continue;\n }\n // if this is a water source\n\n if (p == WATER_SOURCE)\n {\n int[] targets = {atLeft ? ip : il,\n atRight ? ip : ir,\n atTop ? ip : iuc,\n atBot ? ip : idc};\n for (int it: targets)\n if (pixels[it] == AIR &&\n rnd.nextInt(WATER_CHANCE_IN) == 0)\n pixels[it] = WATER;\n continue;\n }\n // if this is a fire source\n\n if (p == OIL_SOURCE)\n {\n int[] targets = {atRight ? ip : ir,\n atLeft ? ip : il,\n atTop ? ip : iuc,\n atBot ? ip : idc};\n for (int it: targets)\n if (pixels[it] == AIR)\n pixels[it] = OIL;\n continue;\n }\n // if this is a sand source\n\n if (p == SAND_SOURCE)\n {\n int[] targets = {atLeft ? ip : il,\n atRight ? ip : ir,\n atTop ? ip : iuc,\n atBot ? ip : idc};\n for (int it: targets)\n if (pixels[it] == AIR &&\n rnd.nextInt(SAND_CHANCE_IN) == 0)\n pixels[it] = SAND;\n continue;\n }\n // if this is a plant, propogate growth\n\n if (p == PLANT)\n {\n\n int iul = iuc - 1;\n int iur = iuc + 1;\n\n int[] targets = {atLeft ? ip : il,\n atLeft || atTop ? ip : iul,\n atRight ? ip : ir,\n atRight || atTop ? ip : iur,\n atTop ? ip : iuc,\n atBot ? ip : idc,\n atBot || atLeft ? ip : idl,\n atBot || atRight ? ip : idr,\n };\n\t\t\t\t if (pixels[idl] == PLANT && pixels[idc] == PLANT && \n\t\t\t\t pixels[idr] == PLANT && pixels[ir] == PLANT && \n\t\t\t\t\t pixels[il] == PLANT && pixels[iuc] == WATER)\n\t\t\t\t\t pixels[ip] = COLUMBINE;\n for (int ix: targets)\n if (pixels[ix] == AIR)\n for (int it: targets)\n if (pixels[it] == WATER && rnd.nextInt(PLANT_CHANCE_IN) == 0)\n pixels[it] = PLANT;\n\t\t\t\t continue;\n }\n // if this is a flower\n\n if (p == COLUMBINE)\n\t\t\t {\n\t\t\t continue;\n\t\t\t }\n // if this is a fire source\n\n if (p == FIRE_SOURCE)\n {\n int[] targets = {atLeft ? ip : il,\n atRight ? ip : ir,\n atTop ? ip : iuc,\n atBot ? ip : idc};\n for (int it: targets)\n if (pixels[it] == PLANT || pixels[it] == OIL)\n pixels[it] = FIRE1;\n continue;\n }\n // all actions from this point on conserve matter\n // we only calculate the place to which this particle\n // will move, the the default is to do nothing\n\n int dest = NO_CHANGE;\n \n // if it's a oil\n\n if (p == OIL)\n {\n // compute indices for up left and up right\n\n int iul = iuc - 1;\n int iur = iuc + 1;\n\n // get pixels for each index\n\n int ul = atTop || atLeft ? ROCK : pixels[iul];\n int ur = atTop || atRight ? ROCK : pixels[iur];\n\n // if there is sand/earth above, erode that\n\n if (uc == EARTH || uc == SAND)\n dest = iuc; \n\n // if pixles up left and up right sand/water\n\n else if ((ul == EARTH || ul == SAND) && \n (ur == EARTH || ur == SAND))\n dest = rnd.nextBoolean() ? iul : iur;\n\n // if air underneath, go down\n \n else if (dc == AIR)\n dest = idc;\n \n // if air on both sides below, pick one\n\n else if (dl == AIR && dr == AIR)\n dest = rnd.nextBoolean() ? idl : idr;\n\n // if air only down left, go left\n\n else if (dl == AIR)\n dest = idl;\n\n // if air only down right, go right\n\n else if (dr == AIR)\n dest = idr;\n\n // if air on both sides below, pick one\n\n else if ((l == AIR || l == EARTH || l == SAND) &&\n (r == AIR || r == EARTH || r == SAND))\n dest = rnd.nextBoolean() ? il : ir;\n\n // if air only down left, go left\n\n else if (l == AIR || l == EARTH || l == SAND)\n dest = il;\n\n // if air only down right, go right\n\n else if (r == AIR || r == EARTH || r == SAND)\n dest = ir;\n\n // the case where water flows out two pixels\n \n else\n {\n // get items 2 pixels on either side of this one\n\n int ill = ip - 2;\n int irr = ip + 2;\n int ll = x < 2 ? ROCK : pixels[ill];\n int rr = x > width - 3 ? ROCK : pixels[irr];\n\n // if air on both sides, pick one\n\n if (ll == AIR && rr == AIR)\n dest = rnd.nextBoolean() ? irr : ill;\n \n // if air only right right, go right right\n \n else if (rr == AIR)\n dest = irr;\n \n // if air only left left, go left left\n\n else if (ll == AIR)\n dest = ill;\n }\n }\n // if it's water\n\n else if (p == WATER)\n {\n // compute indices for up left and up right\n\n int iul = iuc - 1;\n int iur = iuc + 1;\n\n // get pixels for each index\n\n int ul = atTop || atLeft ? ROCK : pixels[iul];\n int ur = atTop || atRight ? ROCK : pixels[iur];\n\n // if there is sand/earth above, erode that\n\n if (uc == EARTH || uc == SAND)\n dest = iuc; \n\n // if pixles up left and up right sand/water\n\n else if ((ul == EARTH || ul == SAND) && \n (ur == EARTH || ur == SAND))\n dest = rnd.nextBoolean() ? iul : iur;\n\n // if air underneath, go down\n \n else if (dc == AIR || dc == OIL)\n dest = idc;\n\n // if air on both sides below, pick one\n\n else if ((dl == AIR || dl == OIL) && (dr == AIR || dr == OIL))\n dest = rnd.nextBoolean() ? idl : idr;\n\n // if air only down left, go left\n\n else if (dl == AIR || dl == OIL)\n dest = idl;\n\n // if air only down right, go right\n\n else if (dr == AIR || dr == OIL)\n dest = idr;\n\n // if air on both sides below, pick one\n\n else if ((l == AIR || l == EARTH || l == SAND) &&\n (r == AIR || r == EARTH || r == SAND))\n dest = rnd.nextBoolean() ? il : ir;\n\n // if air only down left, go left\n\n else if (l == AIR || l == EARTH || l == SAND)\n dest = il;\n\n // if air only down right, go right\n\n else if (r == AIR || r == EARTH || r == SAND)\n dest = ir;\n\n // the case where water flows out two pixels\n \n else\n {\n // get items 2 pixels on either side of this one\n\n int ill = ip - 2;\n int irr = ip + 2;\n int ll = x < 2 ? ROCK : pixels[ill];\n int rr = x > width - 3 ? ROCK : pixels[irr];\n\n // if air on both sides, pick one\n\n if (ll == AIR && rr == AIR)\n dest = rnd.nextBoolean() ? irr : ill;\n \n // if air only right right, go right right\n \n else if (rr == AIR)\n dest = irr;\n \n // if air only left left, go left left\n\n else if (ll == AIR)\n dest = ill;\n }\n }\n // all other elements behave like sand\n\n else\n {\n // if air underneath, go down\n \n if (dc == AIR || dc == WATER)\n dest = idc;\n\n // if air on both sides below, pick one\n\n else if ((dl == AIR || dl == WATER) && \n (dr == AIR || dr == WATER))\n dest = rnd.nextBoolean() ? idl : idr;\n\n // if air only down left, go left\n\n else if (dl == AIR || dl == WATER)\n dest = idl;\n\n // if air only down right, go right\n\n else if (dr == AIR || dr == WATER)\n dest = idr;\n }\n // if a change is requried, swap pixles\n\n try\n {\n if (dest != NO_CHANGE)\n {\n if (pixels[ip] == WATER_SOURCE)\n out.println(\"swap1 WS & \" + Element.lookup(pixels[dest]));\n if (pixels[dest] == WATER_SOURCE)\n out.println(\"swap2 WS & \" + Element.lookup(pixels[ip]));\n\n pixels[ip] = pixels[dest];\n pixels[dest] = p;\n }\n }\n catch (Exception ex)\n {\n ex.printStackTrace();\n out.println(\" X: \" + x);\n out.println(\" Y: \" + y);\n out.println(\"Source: \" + Element.lookup(p));\n out.println(\"Source: \" + Element.lookup(pixels[ip]));\n out.println(\" Dest: \" + Element.lookup(pixels[dest]));\n \n }\n }\n }\n }",
"public static int loadAllVertices(String filePath) throws IOException{\r\n\t\tBufferedReader bufferedReader = new BufferedReader(new FileReader(filePath));\r\n\t\tString line = bufferedReader.readLine();\r\n\t\tint index = 0;\r\n\t\twhile((line = bufferedReader.readLine()) != null){\r\n\t\t\tString[] details = line.split(\" \");\r\n\t\t\tVertex vertex = new Vertex(details[1],index,CONSTGREYCOL); // grey color\r\n\t\t\tallVertices.put(Integer.parseInt(details[1]), vertex);\r\n\t\t\tif(!allSC.containsKey(Integer.parseInt(details[1]))){\r\n\t\t\t\tdemandVertices.put(Integer.parseInt(details[1]),vertex);\r\n\t\t\t\tdnIDs.add(Integer.parseInt(details[1]));\r\n\t\t\t\t//\t\t\t\tSystem.out.println(\"It is demand node \"+vertex.getnodeID()+\" at Pos: \"+index+\"/\"+vertex.getVertexIndex());\r\n\t\t\t} else {\r\n\t\t\t\t//\t\t\t\tSystem.out.println(\"It is service node \"+vertex.getnodeID()+\" at Pos: \"+index+\"/\"+vertex.getVertexIndex());\r\n\t\t\t}\r\n\t\t\tindex++;\r\n\r\n\t\t}\r\n\t\tSystem.out.println(\"Total no of all vertices are \"+allVertices.size());\r\n\t\tSystem.out.println(\"Total no of demand vertices are \"+demandVertices.size());\r\n\t\tbufferedReader.close();\r\n\t\treturn allVertices.size();\r\n\t}",
"public Object[] getList() {\n\t\treturn new Object[]{pitch, duration, velocity};\n\t}",
"private static List<GenomeSegment> loadSegments() {\n JamLogger.info(\"Loading genome segments...\");\n\n ArrayList<GenomeSegment> segments =\n new ArrayList<GenomeSegment>();\n\n DataReader reader =\n DataReader.open(resolveDefinitionFile(),\n DEFINITION_FILE_COMMENT);\n\n try {\n for (String line : reader)\n segments.add(parseSegment(line));\n }\n finally {\n reader.close();\n }\n\n segments.trimToSize();\n return Collections.unmodifiableList(segments);\n }",
"protected void playParticle(){\n\t\teffectData.getPlayParticles().playParticles(effectData, effectData.getDisplayAt());\n\t}",
"protected void initializeImpl(@NotNull final ParticleData particleData) {\n }",
"@Override\n public SpriteParticleSystem build(Engine engine, float fontX, float fontY)\n {\n\t final float particlesXSpawn = fontX;\n\t final float particlesYSpawn = fontY;\n\n\t //Max & min rate are the maximum particles per second and the minimum particles per second.\n\t final float maxRate = 100;\n\t final float minRate = 80;\n\n\t //This variable determines the maximum particles in the particle system.\n\t final int maxParticles = 30;\n\n\t //Particle emitter which will set all of the particles at a ertain point when they are initialized.\n\t final PointParticleEmitter pointParticleEmtitter = new PointParticleEmitter(particlesXSpawn, particlesYSpawn);\n\n\t //Creating the particle system.\n\t\tparticleSystem = new SpriteParticleSystem (pointParticleEmtitter, maxRate, minRate, maxParticles, ResourcesManager.getInstance().waterDrop, vbom);\n\n\t //And now, lets create the initiallizers and modifiers.\n\t //Velocity initiallizer - will pick a random velocity from -20 to 20 on the x & y axes. Play around with this value.\n\t particleSystem.addParticleInitializer(new VelocityParticleInitializer<Sprite>(-25, 25, 0, 150));\n\n\t //Acceleration initializer - gives all the particles the earth gravity (so they accelerate down).\n\t particleSystem.addParticleInitializer(new GravityParticleInitializer<Sprite>());\n\n\t //And now, adding an alpha modifier, so particles slowly fade out. This makes a particle go from alpha = 1 to alpha = 0 in 3 seconds, starting exactly when the particle is spawned.\n\t //particleSystem.addParticleModifier(new AlphaParticleModifier<Sprite>(1, 0, 0, 0));\n\n\t //Lastly, expire modifier. Make particles die after 3 seconds - their alpha reached 0.\n\t particleSystem.addParticleInitializer(new ExpireParticleInitializer<Sprite>(3)); \n\n\t return particleSystem;\n}",
"public void spawnParticle ( Particle particle , double x , double y , double z , int count , double offsetX ,\n\t\t\tdouble offsetY , double offsetZ , double extra ) {\n\t\tspawnParticle ( particle , x , y , z , count , offsetX , offsetY , offsetZ );\n\t}",
"private static void updateParticle(int index) {\n\n\t\tfloat posX = particles[index].getPositionX(); // Current X position of the particle\n\t\tfloat posY = particles[index].getPositionY(); // Current Y position of the particle\n\t\tfloat vX = particles[index].getVelocityX(); // Current horizontal velocity of the particle\n\t\tfloat vY = particles[index].getVelocityY();\t// Current vertical velocity of the particle\n\t\tint age = particles[index].getAge();\t// Current age of the particle\n\t\t\n\t\t// Fill the circle's color and transparency\n\t\tUtility.fill(particles[index].getColor(), particles[index].getTransparency());\n\t\t\n\t\t// Draw the circle\n\t\tUtility.circle(posX, posY, particles[index].getSize());\n\t\t\n\t\t// Update vertical velocity effected by gravity\n\t\tvY = vY + 0.3f;\n\t\t// Update the particle's vertical velocity, XY positions and its age\n\t\tparticles[index].setVelocityY(vY);\n\t\tparticles[index].setPositionX(posX + vX);\n\t\tparticles[index].setPositionY(posY + vY);\n\t\tparticles[index].setAge(age + 1);\n\t\t\n\t\t// Call this method to remove the old particles\n\t\tremoveOldParticles(80);\n\t\t\n\n\t}",
"public void loadItems() {\n\t\tArrayList<String> lines = readData();\n\t\tfor (int i = 1; i < lines.size(); i++) {\n\t\t\tString line = lines.get(i);\n\t\t\t\n\t\t\tString[] parts = line.split(\",\");\n\t\t\t\n//\t\t\tSystem.out.println(\"Name: \" + parts[0]);\n//\t\t\tSystem.out.println(\"Amount: \" + parts[1]);\n//\t\t\tSystem.out.println(\"Price: \" + parts[2]);\n//\t\t\tSystem.out.println(\"-------\");\n\t\t\t\n\t\t\tString name = parts[0].trim();\n\t\t\tint amount = Integer.parseInt(parts[1].trim());\n\t\t\tdouble price = Double.parseDouble(parts[2].trim());\n\t\t\t\n\t\t\tItem item = new Item(name, amount, price);\n\t\t\titemsInStock.add(item);\n\t\t}\n\t}",
"private void readSerial() {\r\n\t\twhile(myPort.available() > 0) {\r\n\t\t\tbyte[] newBuffer = new byte[512];\r\n\t\t\tint n = myPort.readBytes(newBuffer);\r\n\t\t\tnewBuffer = PApplet.subset(newBuffer,0,n);\r\n\t\t\tif(debug) System.out.println(\"readSerial() reads in \"+n+\" bytes\");\r\n\t\t\tif(newBuffer != null) {\r\n\t\t\t\tinBuffer = PApplet.concat(inBuffer, newBuffer);\r\n\t\t\t\tif(inBuffer.length > 0) checkBuffer();\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"private void readData()\n {\n while(System.currentTimeMillis() - start <= durationMillis)\n {\n counters.numRequested.incrementAndGet();\n readRate.acquire();\n\n if (state.get() == SimulationState.TEARING_DOWN)\n break;\n }\n }",
"public void readInputFile(){\n no_of_videos = 5;\n video_size = new int [no_of_videos];\n\n }",
"public void onTick() {\n // Tick all particles\n Iterator<Particle> iterator = this.particles.iterator();\n while (iterator.hasNext()) {\n Particle particle = iterator.next();\n\n // Tick this particle\n particle.onTick();\n\n // Remove particle when removed flag is set\n if (particle.removed) {\n iterator.remove();\n }\n }\n }",
"public ArrayList<Instance> read() throws IOException{\n ArrayList<Instance> instances;\n instances = new ArrayList<>();\n String s;\n String[] c;\n Instance i;\n while(reader.ready()){\n s = getInstanceFromFile();\n i = new Instance();\n c = s.split(\",\");\n for(int j = 0; j < c.length - 1; j++)\n i.addFeature(Double.parseDouble(c[j]));\n // The last part of a line is the class label\n // See dataset that is used\n i.setClassification(c[c.length - 1]);\n instances.add(i);\n }\n return instances;\n }",
"public static native void OpenMM_AmoebaVdwForce_getParticleExclusions(PointerByReference target, int particleIndex, PointerByReference exclusions);",
"public static void initializePreqs() { \r\n\t\tlist = new ArrayList<Freebody>();\r\n\t\ttrackers = new ArrayList<TrackingPoint>();\r\n\t\tcamPos=new int[3];\r\n\t}",
"public void getInformation() throws IOException {\n\t\tList<Fire> listFeux = new ArrayList<Fire>();\n\t listFeux = this.collectData();\n\t \n\t if(this.previousIntensity > this.real_intensity) {\n\t \tthis.previousIntensity = this.real_intensity;\n\t }\n\t\t\n\t\tthis.alerte.resetIntensity();\t//on reset l'intensite\n\t\tthis.real_intensity = 0;\n\t\t\n\t for (Fire feu: listFeux) {\t\t//on recalcul l'intensite\n\t \tfor (CoordEntity coord: feu.getLocation()) {\n\t\t \tif ( (Math.abs(coord.getX() - this.localisation.x) < this.range) &&\n\t\t \t\t\t(Math.abs(coord.getY() - this.localisation.y) < this.range) ) {\n\t\t \t\tint intensity = this.getIntensityFromFire(feu);\n\t\t \t\tthis.addRealIntensity(intensity);\n\t\t \t\tif (this.isDetectable(feu) == true) {\n\t\t \t\t\tSystem.out.println(\"Detectable\");\n\t\t\t \t\tif (this.applyErrors() == true) {\n\t\t\t \t\t\tthis.alerte.setIntensity(intensity);\t\n\t\t\t \t\t}\n\t\t \t\t}\n\t }\t\t\n\t }\n\t }\n\t System.err.println(previousIntensity + \"/\" + this.real_intensity + \"/\" + this.alerte.getIntensity() );\n\t\t if (this.alerte.getIntensity() > previousIntensity) {\n\t\t \tthis.previousIntensity = this.real_intensity;\t//on recupere l'intensite mesuree precedement\n\t\t \tSystem.err.println(\"Alarme\");\n\t\t \tthis.triggerAlarm();\t//si il y a eu aggravation de l'etat du feu\n\t\t }\n\t}",
"List<T> read();",
"public static List<Person> loadTrainingSet(){\n List<Person> list_of_persons = new LinkedList<Person>();\n String[] names = getAllNames();\n\n try (Connection con = DriverManager.getConnection(url, user, password)){\n for(int i=0; i<names.length; i++){\n List<Histogram> histograms = new ArrayList<>();\n String query = \"SELECT h_json FROM \"+DATABASE_NAME+\".\"+names[i]+\";\";\n \n Statement st = con.createStatement();\n ResultSet rs = st.executeQuery(query);\n\n while (rs.next()) {\n Map<Integer, Integer> map = new HashMap<>();\n JSONObject obje = new JSONObject(rs.getString(1));\n for(int y=0; y<255; y++){\n map.put(y, (int)obje.get(\"\"+y));\n }\n histograms.add(new Histogram(map));\n }\n\n list_of_persons.add(new Person(names[i], histograms));\n }\n con.close();\n } catch (SQLException ex) {\n ex.printStackTrace();\n } \n\n return list_of_persons;\n }",
"@Override\r\n\tpublic float[] get(String ponits) {\n\t\treturn null;\r\n\t}",
"private void loadParkingLots() {\n ParkingLot metrotown = new ParkingLot(\"Metrotown\", 4);\n ParkingLot pacificcenter = new ParkingLot(\"PacificCenter\", 5);\n\n for (int i = 0; i < 3; i++) {\n metrotown.addParkingSpot(new ParkingSpot(\"M\" + i, \"medium\", 5));\n pacificcenter.addParkingSpot(new ParkingSpot(\"PC\" + i, \"large\", 4));\n }\n\n parkinglots.add(metrotown);\n parkinglots.add(pacificcenter);\n }",
"private void getObjects() {\n\t\tmeteors = go.getMeteors();\n\t\texplosions = go.getExplosions();\n\t\ttargets = go.getTargets();\n\t\tcrosses = go.getCrosses();\n\t\trockets = go.getRockets();\n\t\tearth = go.getEarth();\n\t}",
"public static void LoadSpritesIntoArray() {\r\n\t\t// Get all nodes for the settings\r\n\t\t// Node main = document.getElementById(\"main\");\r\n\t\t// Node textures = document.getElementById(\"textures\");\r\n\t\t// NodeList nList = document.getElementsByTagName(\"TexturePath\");\r\n\r\n\t\t// for (Element texPath : texturePathElements) {\r\n\t\t// System.out.println(texPath.getAttribute(\"name\") + \" \" +\r\n\t\t// texPath.getAttribute(\"name\"));\r\n\t\t// sprites.add(new Sprite(texPath.getAttribute(\"name\"),\r\n\t\t// texPath.getAttribute(\"path\")));\r\n\t\t// }\r\n\r\n\t\tsprites = ImageTools.LoadAllSpriteTexturesFromSpriteSheet(\"In_Game\");\r\n\r\n\t\t/*\r\n\t\t * This method i got from a stack overflow question\r\n\t\t * https://stackoverflow.com/questions/22610526/how-to-append-elements-\r\n\t\t * at-the-end-of-arraylist-in-java\r\n\t\t */\r\n\t\tint endOfList = sprites.size();\r\n\t\tsprites.addAll(endOfList, ImageTools.LoadAllSpriteTexturesFromSpriteSheet(\"In_Game_HUD\"));\r\n\t\tendOfList = sprites.size();\r\n\t\tsprites.addAll(endOfList, ImageTools.LoadAllSpriteTexturesFromSpriteSheet(\"In_Game_Custom\"));\r\n\t\tSystem.out.println(endOfList);\r\n\r\n\t\tfor (Element el : texturePathElements) {\r\n\r\n\t\t\ttry {\r\n\t\t\t\tsprites.add(new Sprite(el.getAttribute(\"name\"), el.getAttribute(\"path\")));\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\tisTexturesDone = true;\r\n\t}",
"public interface IParticleProviderModel extends IBakedModel {\n\n// /**\n// * Gets the textures to use for hit particles at the given face and hit vector.\n// *\n// * @param hitVec The vector.\n// * @param faceHit The face.\n// * @param world The world.\n// * @param pos The position.\n// * @param state The state.\n// * @return The textures to use.\n// */\n// Iterable<TextureAtlasSprite> getHitEffects(Vector3 hitVec, EnumFacing faceHit, IBlockAccess world, BlockPos pos, IBlockState state);\n//\n// /**\n// * Gets the textures to use for destroy particles.\n// *\n// * @param world The world.\n// * @param pos The position.\n// * @param state The state.\n// * @return The textures to use.\n// */\n// Iterable<TextureAtlasSprite> getDestroyEffects(IBlockAccess world, BlockPos pos, IBlockState state);\n\n}",
"private void draw() {\n ctx.clearRect(0, 0, width, height);\n\n for (ImageParticle p : particles) {\n p.opacity = p.remainingLife / p.life * 0.5;\n\n // Draw particle from image\n ctx.save();\n ctx.translate(p.x, p.y);\n ctx.scale(p.size, p.size);\n //ctx.translate(p.image.getWidth() * (-0.5), p.image.getHeight() * (-0.5));\n ctx.translate(-HALF_WIDTH, -HALF_HEIGHT);\n ctx.setGlobalAlpha(p.opacity);\n ctx.drawImage(p.image, 0, 0);\n ctx.restore();\n\n //p.remainingLife--;\n p.remainingLife *= 0.98;\n //p.size *= 0.99;\n p.x += p.vX;\n p.y += p.vY;\n\n //regenerate particles\n if (p.remainingLife < 0 || p.size < 0 || p.opacity < 0.01) {\n if (running) {\n p.reInit();\n } else {\n particles.remove(p);\n }\n }\n }\n }",
"public ArrayList<String> loadRead() {\n\n\t\tSAVE_FILE = READ_FILE;\n\t\tArrayList<String> list = new ArrayList<String>();\n\t\tlist = loadIds();\n\t\treturn list;\n\t}",
"private static boolean testUpdateParticle() {\n\t\tparticles = new Particle[1];\n\t\tparticles[0] = new Particle(3, 3, 10, 10);\n\t\t\n\t\tparticles[0].setVelocityX(-1);\n\t\tparticles[0].setVelocityY(-2);\n\t\tupdateParticle(0);\n\t\t\n\t\tif (particles[0].getPositionX() != 2 || particles[0].getPositionY() != 1.3) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false; \n\t}",
"public static native void OpenMM_AmoebaPiTorsionForce_getPiTorsionParameters(PointerByReference target, int index, IntBuffer particle1, IntBuffer particle2, IntBuffer particle3, IntBuffer particle4, IntBuffer particle5, IntBuffer particle6, DoubleBuffer k);",
"private void createParticle(double par1, double par3, double par5, double par7, double par9, double par11, int[] par13ArrayOfInteger, int[] par14ArrayOfInteger, boolean par15, boolean par16)\n {\n EntityFireworkSparkFX entityfireworksparkfx = new EntityFireworkSparkFX(this.worldObj, par1, par3, par5, par7, par9, par11, this.theEffectRenderer);\n entityfireworksparkfx.setTrail(par15);\n entityfireworksparkfx.setTwinkle(par16);\n int i = this.rand.nextInt(par13ArrayOfInteger.length);\n entityfireworksparkfx.setColour(par13ArrayOfInteger[i]);\n\n if (par14ArrayOfInteger != null && par14ArrayOfInteger.length > 0)\n {\n entityfireworksparkfx.setFadeColour(par14ArrayOfInteger[this.rand.nextInt(par14ArrayOfInteger.length)]);\n }\n\n this.theEffectRenderer.addEffect(entityfireworksparkfx);\n }",
"void readPointers(String path){\n try\r\n {\r\n String line = \"\";\r\n String splitBy = \",\";\r\n BufferedReader br = new BufferedReader(new FileReader(path));\r\n while ((line = br.readLine()) != null) //returns a Boolean value\r\n {\r\n line = removeUnwantedChars(line);\r\n String[] temp = line.split(splitBy); // use comma as separator\r\n heapObject parent = heap.get(Integer.parseInt(temp[0]));\r\n heapObject child = heap.get(Integer.parseInt(temp[1]));\r\n parent.addChild(child);\r\n }\r\n }\r\n catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }",
"public List<String> read()\n\t{\n\t\treturn null;\n\t}",
"public void add(Particle particle) {\n this.particles.add(particle);\n }",
"@SuppressWarnings(\"unchecked\")\n public List readList() throws IOException {\n List list = new ArrayList();\n Object obj = read();\n while (obj != null) {\n list.add(obj);\n obj = read();\n }\n return list;\n }",
"private String[] readMaterials() throws IOException\n {\n final int materialCount = this.reader.readByte();\n final String[] materials = new String[materialCount];\n for (int i = 0; i < materialCount; i++)\n {\n materials[i] = this.reader.readString(this.reader.readByte());\n }\n return materials;\n }",
"public static native int OpenMM_HippoNonbondedForce_getNumParticles(PointerByReference target);",
"private List<Q3Peptide> readFraction(PepXmlFraction fraction, File mzXmlFile)\r\n {\r\n calculateLabelMasses(fraction);\r\n\r\n ArrayList<Q3Peptide> results = new ArrayList<Q3Peptide>();\r\n\r\n PeptideIterator pi = fraction.getPeptideIterator();\r\n int peptideId = 0;\r\n while (pi.hasNext())\r\n {\r\n peptideId++; // Count each feature within a fraction so we can join up results later..\r\n PepXmlPeptide peptide = (PepXmlPeptide) pi.next();\r\n\r\n // Filter by PeptideProphet probability, if requested and available\r\n if (filterByMinPeptideProphet)\r\n {\r\n PeptideProphetHandler.PeptideProphetResult pepProphet = peptide.getPeptideProphetResult();\r\n if (null != pepProphet && pepProphet.getProbability() < minPeptideProphet)\r\n continue;\r\n }\r\n\r\n // Filter by fractional delta mass\r\n if (filterByMaxFracDeltaMass)\r\n {\r\n double deltaMass = peptide.getDeltaMass();\r\n double fracDeltaMass = Math.abs(deltaMass - Math.round(deltaMass));\r\n if (maxFracDeltaMassIsPPM)\r\n fracDeltaMass = 1000000f * fracDeltaMass / peptide.getCalculatedNeutralMass();\r\n if (fracDeltaMass > maxFracDeltaMass)\r\n continue;\r\n }\r\n\r\n char[] trimmed = peptide.getTrimmedPeptide().toCharArray();\r\n ModifiedAminoAcid[] mods = peptide.getModifiedAminoAcids();\r\n\r\n float totalMassDiff = 0f;\r\n int countPotential = 0;\r\n int countLight = 0;\r\n int countHeavy = 0;\r\n\r\n/**********************************************************************\r\n ???? Pending commit of PepXmlLoader updates...\r\n char[] termini = {'n', 'c'};\r\n\r\n // Look for terminal labeling first\r\n for (char terminus : termini)\r\n {\r\n IsotopicLabel label = labels.get(terminus);\r\n if (null != label)\r\n {\r\n countPotential++;\r\n totalMassDiff += label.getMassDiff();\r\n\r\n float mass = (terminus == 'n' ?\r\n peptide.getNtermModificationMass() :\r\n peptide.getCtermModificationMass());\r\n if (mass == 0f || closeEnough(mass, label.getLightMass()))\r\n countLight++;\r\n else if (closeEnough(mass, label.getHeavyMass()))\r\n countHeavy++;\r\n }\r\n }\r\n**********************************************************************/\r\n\r\n for (int i = 0; i < trimmed.length; i++)\r\n {\r\n IsotopicLabel label = labels.get(trimmed[i]);\r\n if (null != label)\r\n {\r\n countPotential++;\r\n totalMassDiff += label.getMassDiff();\r\n\r\n // Unmodified is assumed light (e.g. 12C lysine in SILAC)\r\n if (null == mods || null == mods[i])\r\n {\r\n countLight++;\r\n }\r\n else\r\n {\r\n float mass = (float) mods[i].getMass();\r\n if (mass == 0f || closeEnough(mass, label.getLightMass()))\r\n countLight++;\r\n else if (closeEnough(mass, label.getHeavyMass()))\r\n countHeavy++;\r\n }\r\n }\r\n\r\n }\r\n\r\n // Output only peptides that contain at least one label;\r\n // skip partially labeled peptides\r\n if (countPotential > 0)\r\n {\r\n String type = \"\";\r\n if (countLight < countPotential && countHeavy < countPotential)\r\n type = \"Partial\";\r\n else\r\n type = (countHeavy == countPotential ? \"Heavy\" : \"Light\");\r\n\r\n _log.debug(peptide.getPeptide() + \" : \" + type + \" \" + totalMassDiff + \"Da \" + countPotential + \" \" + countLight + \" \" + countHeavy);\r\n if (countLight < countPotential && countHeavy < countPotential)\r\n {\r\n _log.warn(\"Skipping partially labeled peptide: \" + peptide.getPeptide());\r\n }\r\n else\r\n {\r\n boolean isHeavy = (countHeavy == countPotential);\r\n results.add(new Q3Peptide(peptideId, peptide, totalMassDiff, isHeavy));\r\n }\r\n }\r\n }\r\n return results;\r\n }",
"protected void notifyRead(){\n indexList.clear();\n int rows = bank.getRows();\n for(int i = 0; i < rows; i++){\n int value = bank.getInt(filterVar, i);\n if (filterList.contains(value)) indexList.add(i);\n }\n }",
"public void addNoCollisionElementsFree(Collection<Particle> ps)\n {\n noCollisionElements.addAll(ps);\n }",
"public static native int OpenMM_AmoebaWcaDispersionForce_getNumParticles(PointerByReference target);",
"public void readVariates() {\n // get all variate from database marked as Traits\n this.variatesDTO = this.servicioApp.getListVariateTraits(study.getStudyid());\n// this.variatesDTO = this.servicioApp.getListVariateTraitsByEffectid(study.getStudyid(), effectid);\n log.info(\"fill all variate as traits\");\n for (Variate variateDTO : this.variatesDTO) {\n variateDTO = HelperVariate.getVariateFillingFull(\n variateDTO,\n this.localServices,\n this.centralServices,\n this.servicioApp,\n 802);\n }\n \n String trialName = \"TRIAL_\"+ this.study.getSname();\n Represtn effect = localServices.getReprestnForStudyId(this.study.getStudyid(), trialName);\n // get all variate from database marked as Traits\n this.variatesDtoConstants = this.servicioApp.getListVariateConstants(effect.getEffectid());\n\n // fill all variate as traits\n for (Variate variateDTO : this.variatesDtoConstants) {\n variateDTO = HelperVariate.getVariateConstantsFillingFull(\n variateDTO,\n // this.localServices,\n // this.centralServices,\n this.servicioApp,\n 802);\n }\n }",
"public void readData() throws FileNotFoundException {\n this.plane = readPlaneDimensions();\n this.groupBookingsList = readBookingsList();\n }",
"private MeshPolygons[] readMeshPolygons() throws IOException\n {\n final int groupCount = this.reader.readShort();\n final MeshPolygons[] groups = new MeshPolygons[groupCount];\n log.trace(\" Number of groups: \" + groupCount);\n for (int i = 0; i < groupCount; i++)\n {\n log.trace(\" Loading group \" + this.id);\n groups[i] = readMeshPolygon();\n }\n return groups;\n }",
"public static void main(String[] args) throws IOException {\n ArrayList<String> in = GetInput.get(\"10.txt\");\n for (String star : in) {\n Sky.addStar(new Star(\n Integer.parseInt(star.substring(10, 16).replaceAll(\" \", \"\")),\n Integer.parseInt(star.substring(18, 24).replaceAll(\" \", \"\")),\n Integer.parseInt(star.substring(36, 38).replaceAll(\" \", \"\")),\n Integer.parseInt(star.substring(40, 42).replaceAll(\" \", \"\"))\n ));\n }\n for (int i = 0; i < 20000; i++) {\n Sky.printSky(i);\n }\n\n }",
"@Override\n\tpublic void startElement(final String pUri, final String pLocalName, final String pQualifiedName, final Attributes pAttributes) throws SAXException {\n\t\tif(pLocalName.equals(TAG_PCONF)){\n\t\t\tthis.mInPX = true;\n\t\t} else if(pLocalName.equals(TAG_SYSTEM)){\n\t\t\tthis.mInSystem = true;\n\t\t\tif (mPXEmitter == null) {\n\t\t\t\tthrow new PXParseException(\"Must define emitter before system.\");\n\t\t\t}\n\t\t\tif ((mTextureFile = pAttributes.getValue(TAG_SYSTEM_TEXTURE)) == null) {\n\t\t\t\tthrow new PXParseException(\"Texture is required.\");\n\t\t\t}\n\t\t\t\n\t\t\tmParticleTexture = new Texture(32, 32, TextureOptions.BILINEAR_PREMULTIPLYALPHA);\n\t\t\tmParticleTextureRegion = TextureRegionFactory.createFromAsset(this.mParticleTexture, mContext, mTextureFile, 0, 0);\n\t\t\tmTextureManager.loadTexture(this.mParticleTexture);\n\t\t\tmPXSystem = new ParticleSystem(mPXEmitter, \n\t\t\t\t\tnew Integer(pAttributes.getValue(TAG_SYSTEM_MIN_RATE)), \n\t\t\t\t\tnew Integer(pAttributes.getValue(TAG_SYSTEM_MAX_RATE)), \n\t\t\t\t\tnew Integer(pAttributes.getValue(TAG_SYSTEM_MAX_PARTICLES)), \n\t\t\t\t\tmParticleTextureRegion);\n\t\t} else if(pLocalName.equals(TAG_EMITTER)){\n\t\tthis.mInEmitter = true;\n\t\tmEmitter = pAttributes.getValue(TAG_EMITTER_ATTRIBUTE_SHAPE);\n\t\t\tif (mEmitter.equals(TAG_EMITTER_ATTRIBUTE_SHAPE_VALUE_CIRCLE)) {\n\t\t\t\tmPXEmitter = new CircleParticleEmitter(\n\t\t\t\t\t\tnew Float(pAttributes.getValue(TAG_EMITTER_ATTRIBUTE_CENTER_X)), \n\t\t\t\t\t\tnew Float(pAttributes.getValue(TAG_EMITTER_ATTRIBUTE_CENTER_Y)), \n\t\t\t\t\t\tnew Float(pAttributes.getValue(TAG_EMITTER_ATTRIBUTE_RADIUS_X)), \n\t\t\t\t\t\tnew Float(pAttributes.getValue(TAG_EMITTER_ATTRIBUTE_RADIUS_Y))\n\t\t\t\t);\n\t\t\t} else if (mEmitter.equals(TAG_EMITTER_ATTRIBUTE_SHAPE_VALUE_CIRCLE_OUTLINE)) {\n\t\t\t\tmPXEmitter = new CircleOutlineParticleEmitter(\n\t\t\t\t\t\tnew Float(pAttributes.getValue(TAG_EMITTER_ATTRIBUTE_CENTER_X)), \n\t\t\t\t\t\tnew Float(pAttributes.getValue(TAG_EMITTER_ATTRIBUTE_CENTER_Y)), \n\t\t\t\t\t\tnew Float(pAttributes.getValue(TAG_EMITTER_ATTRIBUTE_RADIUS_X)), \n\t\t\t\t\t\tnew Float(pAttributes.getValue(TAG_EMITTER_ATTRIBUTE_RADIUS_Y))\n\t\t\t\t\t);\t\t\t\t\n\t\t\t\t} else if (mEmitter.equals(TAG_EMITTER_ATTRIBUTE_SHAPE_VALUE_POINT)) {\n\t\t\t\t\tmPXEmitter = new PointParticleEmitter(\n\t\t\t\t\t\t\tnew Float(pAttributes.getValue(TAG_EMITTER_ATTRIBUTE_CENTER_X)), \n\t\t\t\t\t\t\tnew Float(pAttributes.getValue(TAG_EMITTER_ATTRIBUTE_CENTER_Y))\n\t\t\t\t\t);\n\t\t\t\t} else if (mEmitter.equals(TAG_EMITTER_ATTRIBUTE_SHAPE_VALUE_RECTANGLE)) {\n\t\t\t\t\tmPXEmitter = new RectangleParticleEmitter(\n\t\t\t\t\t\t\tnew Float(pAttributes.getValue(TAG_EMITTER_ATTRIBUTE_CENTER_X)), \n\t\t\t\t\t\t\tnew Float(pAttributes.getValue(TAG_EMITTER_ATTRIBUTE_CENTER_Y)), \n\t\t\t\t\t\t\tnew Float(pAttributes.getValue(TAG_EMITTER_ATTRIBUTE_WIDTH)), \n\t\t\t\t\t\t\tnew Float(pAttributes.getValue(TAG_EMITTER_ATTRIBUTE_HEIGHT))\n\t\t\t\t\t);\t\n\t\t\t\t} else if (mEmitter.equals(TAG_EMITTER_ATTRIBUTE_SHAPE_VALUE_RECTANGLE_OUTLINE)) {\n\t\t\t\t\tmPXEmitter = new RectangleOutlineParticleEmitter(\n\t\t\t\t\t\t\tnew Float(pAttributes.getValue(TAG_EMITTER_ATTRIBUTE_CENTER_X)), \n\t\t\t\t\t\t\tnew Float(pAttributes.getValue(TAG_EMITTER_ATTRIBUTE_CENTER_Y)), \n\t\t\t\t\t\t\tnew Float(pAttributes.getValue(TAG_EMITTER_ATTRIBUTE_WIDTH)), \n\t\t\t\t\t\t\tnew Float(pAttributes.getValue(TAG_EMITTER_ATTRIBUTE_HEIGHT))\n\t\t\t\t\t);\t\n\t\t\t\t}\n\t\t} else if(pLocalName.equals(TAG_INITIAL_ACCELERATION)){\n\t\t\tif (!mInSystem) {\n\t\t\t\tthrow new PXParseException(\"Must define initial acceleration inside system.\");\n\t\t\t}\n\t\t\tthis.mInInitAccel = true;\n\t\t\tmPXSystem.addParticleInitializer(new AccelerationInitializer(\n\t\t\t\t\tnew Float(pAttributes.getValue(TAG_INITIAL_ACCELERATION_ATTRIBUTE_MIN_X)),\n\t\t\t\t\tnew Float(pAttributes.getValue(TAG_INITIAL_ACCELERATION_ATTRIBUTE_MAX_X)),\n\t\t\t\t\tnew Float(pAttributes.getValue(TAG_INITIAL_ACCELERATION_ATTRIBUTE_MIN_Y)),\n\t\t\t\t\tnew Float(pAttributes.getValue(TAG_INITIAL_ACCELERATION_ATTRIBUTE_MAX_Y))\n\t\t\t));\n\t\t} else if(pLocalName.equals(TAG_INITIAL_ALPHA)) {\n\t\t\tif (!mInSystem) {\n\t\t\t\tthrow new PXParseException(\"Must define initial alpha inside system.\");\n\t\t\t}\n\t\t\tthis.mInInitAlpha = true;\n\t\t\tmPXSystem.addParticleInitializer(new AlphaInitializer(\n\t\t\t\t\tnew Float(pAttributes.getValue(TAG_INITIAL_ALPHA_ATTRIBUTE_MIN_ALPHA)),\n\t\t\t\t\tnew Float(pAttributes.getValue(TAG_INITIAL_ALPHA_ATTRIBUTE_MAX_ALPHA))\n\t\t\t));\n\t\t} else if(pLocalName.equals(TAG_INITIAL_COLOR)) {\n\t\t\tif (!mInSystem) {\n\t\t\t\tthrow new PXParseException(\"Must define initial color inside system.\");\n\t\t\t}\n\t\t\tthis.mInInitColor = true;\n\t\t\tmPXSystem.addParticleInitializer(new ColorInitializer(\n\t\t\t\tnew Float(pAttributes.getValue(TAG_INITIAL_COLOR_ATTRIBUTE_MIN_RED)),\n\t\t\t\tnew Float(pAttributes.getValue(TAG_INITIAL_COLOR_ATTRIBUTE_MAX_RED)),\n\t\t\t\tnew Float(pAttributes.getValue(TAG_INITIAL_COLOR_ATTRIBUTE_MIN_GREEN)),\n\t\t\t\tnew Float(pAttributes.getValue(TAG_INITIAL_COLOR_ATTRIBUTE_MAX_GREEN)),\n\t\t\t\tnew Float(pAttributes.getValue(TAG_INITIAL_COLOR_ATTRIBUTE_MIN_BLUE)),\n\t\t\t\tnew Float(pAttributes.getValue(TAG_INITIAL_COLOR_ATTRIBUTE_MAX_BLUE))\n\t\t\t\t));\n\t\t\t\n\t\t} else if(pLocalName.equals(TAG_INITIAL_GRAVITY)) {\n\t\t\tif (!mInSystem) {\n\t\t\t\tthrow new PXParseException(\"Must define initial gravity inside system.\");\n\t\t\t}\n\t\t\tthis.mInInitGravity = true;\n\t\t\tmGravity = new Boolean(pAttributes.getValue(TAG_INITIAL_GRAVITY_ATTRIBUTE_VALUE));\n\t\t\tif (mGravity) mPXSystem.addParticleInitializer(new GravityInitializer());\n\t\t} else if(pLocalName.equals(TAG_INITIAL_ROTATION)) {\n\t\t\tif (!mInSystem) {\n\t\t\t\tthrow new PXParseException(\"Must define initial rotation inside system.\");\n\t\t\t}\n\t\t\tthis.mInInitRotation = true;\n\t\t\tmPXSystem.addParticleInitializer(new RotationInitializer(\n\t\t\t\t\tnew Float(pAttributes.getValue(TAG_INITIAL_ROTATION_ATTRIBUTE_MIN_ROTATION)), \n\t\t\t\t\tnew Float(pAttributes.getValue(TAG_INITIAL_ROTATION_ATTRIBUTE_MAX_ROTATION))\n\t\t\t));\n\t\t} else if(pLocalName.equals(TAG_INITIAL_VELOCITY)) {\n\t\t\tif (!mInSystem) {\n\t\t\t\tthrow new PXParseException(\"Must define initial velocity inside system.\");\n\t\t\t}\n\t\t\tthis.mInInitVelocity = true;\n\t\t\tmPXSystem.addParticleInitializer(new VelocityInitializer(\n\t\t\t\t\tnew Float(pAttributes.getValue(TAG_INITIAL_VELOCITY_ATTRIBUTE_MIN_X)), \n\t\t\t\t\tnew Float(pAttributes.getValue(TAG_INITIAL_VELOCITY_ATTRIBUTE_MAX_X)), \n\t\t\t\t\tnew Float(pAttributes.getValue(TAG_INITIAL_VELOCITY_ATTRIBUTE_MIN_Y)), \n\t\t\t\t\tnew Float(pAttributes.getValue(TAG_INITIAL_VELOCITY_ATTRIBUTE_MAX_Y))\n\t\t\t));\n\t\t} else if(pLocalName.equals(TAG_MODIFY_ALPHA)) {\n\t\t\tif (!mInSystem) {\n\t\t\t\tthrow new PXParseException(\"Must define alpha modifier inside system.\");\n\t\t\t}\n\t\t\tthis.mInModAlpha = true;\n\t\t\tmPXSystem.addParticleModifier(new AlphaModifier(\n\t\t\t\t\tnew Float(pAttributes.getValue(TAG_MODIFY_ALPHA_ATTRIBUTE_FROM_ALPHA)),\n\t\t\t\t\tnew Float(pAttributes.getValue(TAG_MODIFY_ALPHA_ATTRIBUTE_TO_ALPHA)),\n\t\t\t\t\tnew Float(pAttributes.getValue(TAG_MODIFY_ALPHA_ATTRIBUTE_FROM_TIME)),\n\t\t\t\t\tnew Float(pAttributes.getValue(TAG_MODIFY_ALPHA_ATTRIBUTE_TO_TIME))\n\t\t\t));\n\t\t} else if(pLocalName.equals(TAG_MODIFY_COLOR)) {\n\t\t\tif (!mInSystem) {\n\t\t\t\tthrow new PXParseException(\"Must define color modifier inside system.\");\n\t\t\t}\n\t\t\tthis.mInModColor = true;\n\t\t\tmPXSystem.addParticleModifier(new ColorModifier(\n\t\t\t\t\tnew Float(pAttributes.getValue(TAG_MODIFY_COLOR_ATTRIBUTE_FROM_RED)),\n\t\t\t\t\tnew Float(pAttributes.getValue(TAG_MODIFY_COLOR_ATTRIBUTE_TO_RED)),\n\t\t\t\t\tnew Float(pAttributes.getValue(TAG_MODIFY_COLOR_ATTRIBUTE_FROM_GREEN)),\n\t\t\t\t\tnew Float(pAttributes.getValue(TAG_MODIFY_COLOR_ATTRIBUTE_TO_GREEN)),\n\t\t\t\t\tnew Float(pAttributes.getValue(TAG_MODIFY_COLOR_ATTRIBUTE_FROM_BLUE)),\n\t\t\t\t\tnew Float(pAttributes.getValue(TAG_MODIFY_COLOR_ATTRIBUTE_TO_BLUE)),\n\t\t\t\t\tnew Float(pAttributes.getValue(TAG_MODIFY_COLOR_ATTRIBUTE_FROM_TIME)),\n\t\t\t\t\tnew Float(pAttributes.getValue(TAG_MODIFY_COLOR_ATTRIBUTE_TO_TIME))\n\t\t\t));\n\t\t} else if(pLocalName.equals(TAG_MODIFY_EXPIRE)) {\n\t\t\tif (!mInSystem) {\n\t\t\t\tthrow new PXParseException(\"Must define expire modifier inside system.\");\n\t\t\t}\n\t\t\tthis.mInModExpire = true;\n\t\t\tmPXSystem.addParticleModifier(new ExpireModifier(\n\t\t\t\t\tnew Float(pAttributes.getValue(TAG_MODIFY_EXPIRE_ATTRIBUTE_MIN_LIFETIME)),\n\t\t\t\t\tnew Float(pAttributes.getValue(TAG_MODIFY_EXPIRE_ATTRIBUTE_MAX_LIFETIME))\n\t\t\t));\n\t\t} else if(pLocalName.equals(TAG_MODIFY_ROTATION)) {\n\t\t\tif (!mInSystem) {\n\t\t\t\tthrow new PXParseException(\"Must define rotation modifier inside system.\");\n\t\t\t}\n\t\t\tthis.mInModRotation = true;\n\t\t\tmPXSystem.addParticleModifier(new RotationModifier(\n\t\t\t\t\tnew Float(pAttributes.getValue(TAG_MODIFY_ROTATION_ATTRIBUTE_FROM_ROTATION)),\n\t\t\t\t\tnew Float(pAttributes.getValue(TAG_MODIFY_ROTATION_ATTRIBUTE_TO_ROTATION)),\n\t\t\t\t\tnew Float(pAttributes.getValue(TAG_MODIFY_ROTATION_ATTRIBUTE_FROM_TIME)),\n\t\t\t\t\tnew Float(pAttributes.getValue(TAG_MODIFY_ROTATION_ATTRIBUTE_TO_TIME))\n\t\t\t));\n\t\t} else if(pLocalName.equals(TAG_MODIFY_SCALE)) {\n\t\t\tif (!mInSystem) {\n\t\t\t\tthrow new PXParseException(\"Must define scale modifier inside system.\");\n\t\t\t}\n\t\t\tthis.mInModScale = true;\n\t\t\tmPXSystem.addParticleModifier(new ScaleModifier(\n\t\t\t\t\tnew Float(pAttributes.getValue(TAG_MODIFY_SCALE_ATTRIBUTE_FROM_SCALE_X)),\n\t\t\t\t\tnew Float(pAttributes.getValue(TAG_MODIFY_SCALE_ATTRIBUTE_TO_SCALE_X)),\n\t\t\t\t\tnew Float(pAttributes.getValue(TAG_MODIFY_SCALE_ATTRIBUTE_FROM_SCALE_Y)),\n\t\t\t\t\tnew Float(pAttributes.getValue(TAG_MODIFY_SCALE_ATTRIBUTE_TO_SCALE_Y)),\n\t\t\t\t\tnew Float(pAttributes.getValue(TAG_MODIFY_SCALE_ATTRIBUTE_FROM_TIME)),\n\t\t\t\t\tnew Float(pAttributes.getValue(TAG_MODIFY_SCALE_ATTRIBUTE_TO_TIME))\n\t\t\t));\n\t\t}\n\t}",
"public static PVector[] readFromFile(String filename) {\n ArrayList<PVector> ledPositionsList= new ArrayList<PVector> ();\n //try to read data from file\n try {\n File file = new File(filename);\n Scanner scanner = new Scanner(file);\n while (scanner.hasNextLine()) {\n String line = scanner.nextLine();\n String[] pieces = line.split(\"\\t\");\n if (pieces.length>3) {\n ledPositionsList.add(new PVector( (Float.parseFloat(pieces[1])/4.0f), Float.parseFloat(pieces[2])/4.0f, Float.parseFloat(pieces[3])/4.0f)); //initialize Leds x,y,z,r,g,b\n }\n }\n scanner.close();\n } \n catch (FileNotFoundException ex) {\n ex.printStackTrace();\n }\n //convert to vanilla Java Array\n PVector[] ledPositions= new PVector[ledPositionsList.size()];\n for (int i=0; i<ledPositionsList.size(); i++) {\n ledPositions[i]=ledPositionsList.get(i);\n }\n return ledPositions;\n }",
"public List<Float> calculatePitches(){\n\t\tList<Integer> res = new ArrayList<Integer>();\n\t\tint size = data.size();\n\t\tint maxAmp = 0;\n\t\tint startPos = 0;\n\t\t// get the first pitch in the basic period\n\t\tfor (int i = 0; i < BASE_FRAGMENT; i ++){\n\t\t\tif (maxAmp < data.get(i)){\n\t\t\t\tmaxAmp = data.get(i);\n\t\t\t\t// set this position as the start position\n\t\t\t\tstartPos = i;\n\t\t\t}\n\t\t}\n\t\tLog.v(\"startPos\", String.valueOf(startPos));\n\t\t// find every pitch in all the fragments\n\t\tint pos = startPos + OFFSET; // set current position\n\t\tint posAmpMax;\n\t\twhile(startPos < 1000){\n\t\t\tif(data.get(pos) > 0) { // only read the positive data\n\n\t\t\t\tposAmpMax = 0;\n\t\t\t\tmaxAmp = 0;\n\t\t\t\t// access to all the data in this fragment\n\t\t\t\twhile (pos < startPos + BASE_FRAGMENT) {\n\t\t\t\t\t// find the pitch and mark this position\n\t\t\t\t\tif (maxAmp < data.get(pos)) {\n\t\t\t\t\t\tmaxAmp = data.get(pos);\n\t\t\t\t\t\tposAmpMax = pos;\n\t\t\t\t\t}\n\t\t\t\t\tpos++;\n\t\t\t\t}\n\t\t\t\t// add pitch position into the list\n\t\t\t\tpitchPositions.add(posAmpMax);\n\t\t\t\tres.add(posAmpMax);\n\t\t\t\t// update the start position and the current position\n\t\t\t\tstartPos = posAmpMax;\n\t\t\t\tpos = startPos + OFFSET;\n\t\t\t}else{\n\t\t\t\tpos ++;\n\t\t\t}\n\t\t}\n\n\t\t// calculate all periods and add them into list\n\t\tfor(int i = 0; i < pitchPositions.size() - 1; i++){\n\t\t\tfloat period = (float)(pitchPositions.get(i+1) - pitchPositions.get(i));\n\t\t\tT.add(period);\n\t\t\tpitches.add(PeriodToPitch(period));\n\t\t}\n\t\tpitchPositions.clear();\n\t\treturn pitches;\n\t}",
"List<T> readList();",
"private void startParsing(){\r\n pondred = new ArrayList<>();\r\n //extract docs from corpus\r\n for (String xml:parseDocsFile(docs_file))\r\n {\r\n try {\r\n pondred.add(loadXMLFromString(xml));\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n System.out.println(\"Ending parsing\");\r\n for (Core pon:pondred){\r\n for (String string:pon.abstractTerm){\r\n Double tf = pon.getAbstractFerq(string)/pon.getAbstractSize();\r\n Double idf = Math.log10(Core.count/countingDuplicates(string));\r\n pon.abstractFrequence.put(string,tf*idf);\r\n }\r\n pon.finish();\r\n }\r\n }"
] | [
"0.6180746",
"0.61502224",
"0.609511",
"0.5879041",
"0.5803792",
"0.5727523",
"0.570396",
"0.55024713",
"0.5316164",
"0.52304095",
"0.5219801",
"0.51602393",
"0.51463205",
"0.5140178",
"0.51324284",
"0.51297927",
"0.50831604",
"0.50812656",
"0.50258213",
"0.5024929",
"0.5022137",
"0.5017648",
"0.5008932",
"0.5005603",
"0.4999988",
"0.49966148",
"0.49899077",
"0.49815387",
"0.49778667",
"0.49761367",
"0.49600258",
"0.49486238",
"0.49108008",
"0.48834643",
"0.48711756",
"0.48407963",
"0.48395115",
"0.48214176",
"0.4797421",
"0.4790028",
"0.47873604",
"0.47867382",
"0.47777593",
"0.47735435",
"0.4758008",
"0.4755591",
"0.47469714",
"0.47413626",
"0.47332913",
"0.4726614",
"0.47155377",
"0.47039235",
"0.4702878",
"0.4687526",
"0.46872565",
"0.4683958",
"0.4670917",
"0.46672925",
"0.4664524",
"0.4661817",
"0.46612167",
"0.46554384",
"0.46324778",
"0.46268633",
"0.4623844",
"0.46162766",
"0.46159193",
"0.46132353",
"0.4611931",
"0.46106905",
"0.4600479",
"0.45981294",
"0.45915282",
"0.45896667",
"0.45814118",
"0.45798165",
"0.45754796",
"0.4574709",
"0.45634216",
"0.45631176",
"0.45566094",
"0.45554104",
"0.45548102",
"0.4554401",
"0.45442042",
"0.45379284",
"0.4530887",
"0.45298055",
"0.4525541",
"0.45251614",
"0.45172584",
"0.45111403",
"0.45101988",
"0.4508803",
"0.45081803",
"0.45061585",
"0.45042825",
"0.4501138",
"0.45005432",
"0.4498299"
] | 0.53475946 | 8 |
Updates the number of epochs that are available | private void updateEpochNum() {
// TODO Auto-generated method stub
File epCount = new File(VisualizerMain.experimentBaseLocation+"/"+VisualizerMain.selectedRun);
File[] list = epCount.listFiles();
int count = 0;
for (File file : list){
if (file.isDirectory())
count++;
}
System.out.println("Folder Count: " + count);
maxEpoch = count-1;
SpinnerNumberModel model1 = new SpinnerNumberModel(((Number)epochSelector.getValue()).intValue(), minEpoch, maxEpoch, 1);
epochSelector.setModel(model1);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public Builder epochs(int numEpochs) {\n super.epochs(numEpochs);\n return this;\n }",
"public double getMaxNumberOfEpochs() {\n return maxNumberOfEpochs;\n }",
"public Builder saveEveryEpoch(){\n return saveEveryNEpochs(1);\n }",
"public void train() {\r\n // For each epoch, call setInputValue on input nodes\r\n for (int i = 0; i < maxEpoch; i++) {\r\n Collections.shuffle(trainingSet, random);\r\n\r\n // get each training instance\r\n for (int k = 0; k < trainingSet.size(); k++) {\r\n\r\n Instance instance = trainingSet.get(k);\r\n\r\n // set the input value in the input nodes from the training instance\r\n for (int j = 0; j < instance.attributes.size(); j++) {\r\n inputNodes.get(j).setInput(instance.attributes.get(j));\r\n }\r\n\r\n //set the target value in output nodes\r\n for (int j = 0; j < instance.classValues.size(); j++) {\r\n outputNodes.get(j).setTargetValue((double) instance.classValues.get(j));\r\n }\r\n\r\n // calculate values for hidden nodes\r\n for (int j = 0; j < hiddenNodes.size(); j++) {\r\n // for each hidden node\r\n Node hiddenNode = hiddenNodes.get(j);\r\n hiddenNode.calculateOutput();\r\n }\r\n\r\n //calculate values for output nodes\r\n double sumOfExponents = 0.0;\r\n for (int j = 0; j < outputNodes.size(); j++) {\r\n // for each output node\r\n Node outputNode = outputNodes.get(j);\r\n outputNode.calculateOutput();\r\n sumOfExponents += outputNode.getOutput();\r\n }\r\n\r\n //update output values of output nodes\r\n for (int j = 0; j < outputNodes.size(); j++) {\r\n Node outputNode = outputNodes.get(j);\r\n outputNode.updateOutputValue(sumOfExponents);\r\n }\r\n\r\n // calculate delta values for output nodes\r\n for (int j = 0; j < outputNodes.size(); j++) {\r\n Node outputNode = outputNodes.get(j);\r\n outputNode.calculateDelta();\r\n }\r\n\r\n // calculate delta values for hidden nodes\r\n for (int j = 0; j < hiddenNodes.size(); j++) {\r\n Node hiddenNode = hiddenNodes.get(j);\r\n hiddenNode.calculateDelta();\r\n hiddenNode.resetSumOfPartialDelta();\r\n }\r\n\r\n // update weights going from input layer to hidden layer\r\n for (int j = 0; j < hiddenNodes.size(); j++) {\r\n Node hiddenNode = hiddenNodes.get(j);\r\n hiddenNode.updateWeight(learningRate);\r\n }\r\n\r\n // update weights going from hidden layer to output layer\r\n for (int j = 0; j < outputNodes.size(); j++) {\r\n Node outputNode = outputNodes.get(j);\r\n outputNode.updateWeight(learningRate);\r\n }\r\n\r\n /*if (k == 0 && i==0) {\r\n for (int j = 0; j < outputNodes.size(); j++) {\r\n Node outputNode = outputNodes.get(j);\r\n for (NodeWeightPair pair : outputNode.parents) {\r\n System.out.println(pair.weight);\r\n }\r\n }\r\n }\r\n\r\n if (k == 0 && i == 0) {\r\n for (int j = 0; j < hiddenNodes.size(); j++) {\r\n Node hiddenNode = hiddenNodes.get(j);\r\n if (hiddenNode.parents != null) {\r\n for (NodeWeightPair pair : hiddenNode.parents) {\r\n System.out.println(pair.weight);\r\n }\r\n }\r\n }\r\n }*/\r\n }\r\n\r\n /* if (i==29) {\r\n for (int j = 0; j < outputNodes.size(); j++) {\r\n Node outputNode = outputNodes.get(j);\r\n for (NodeWeightPair pair : outputNode.parents) {\r\n System.out.println(pair.weight);\r\n }\r\n }\r\n }*/\r\n\r\n double totalLoss = 0.0;\r\n // Calculate loss and sum for each training instance, and then take average\r\n for (int k = 0; k < trainingSet.size(); k++) {\r\n Instance instance = trainingSet.get(k);\r\n totalLoss += loss(instance);\r\n }\r\n totalLoss /= trainingSet.size();\r\n System.out.println(\"Epoch: \" + i + \", \" + \"Loss: \" + String.format(\"%.3e\", totalLoss));\r\n }\r\n }",
"public void updateBallCount() {\n mBallCount = (int) NetworkTableInstance.getDefault().getTable(\"SmartDashboard\").getEntry(\"Driver/Set Ball Count\")\n .getDouble(3);\n }",
"public void epoch(double learningRate, int times, int testSize){\r\n int count = 1;\r\n System.out.println(\"The untrained whole set accuracy is \" + testWholeSetAccuracy());\r\n while(count <= times){\r\n double loss = 0;\r\n scramble();\r\n for (int i = 0; i < data.length - testSize; i++ ){\r\n calculateOutput(i);\r\n calculateGradients(i, learningRate);\r\n loss += calculateLoss(i);\r\n }\r\n System.out.println(\"This is the \" + count + \" epoch. The loss is \" + loss / (data.length - testSize));\r\n System.out.println(\"The test set accuracy is \" + testAccuracy(testSize));\r\n System.out.println(\"The whole set accuracy is \" + testWholeSetAccuracy());\r\n count++;\r\n }\r\n }",
"private int indexUntilCheckpointCount() {\n int total = 0;\n for (int i = 0; i < MAX_CHECKPOINTS_BEHIND; i++) {\n final int numDocs = randomIntBetween(1, 5);\n for (int j = 0; j < numDocs; ++j) {\n indexDoc();\n }\n total += numDocs;\n refresh(INDEX_NAME);\n }\n return total;\n }",
"public void update(){\n\t\tif (!VisualizerMain.selectedRun.equals(\"\")){\n\t\t\tupdateEpochNum();\n\t\t\tupdateParticles();\n\t\t\tthis.repaint();\n\t\t}\n\t\t\n\t}",
"@Override\n\tpublic void trainLocal() throws Exception {\n\t\tdouble [][] input = parameters.getInput();\n\t\tdouble [][] result = ann.getResults(parameters);\n\t\tif (state == preTraining) {//in this case, it is running in the pre-training mode.\n\t\t\tinput = newInput;\n\t\t\tresult = newInput;\n\t\t}\n\t\terr = 0; \n\t\tfor (int i = 0; i < mb; i++) {\t\n\t\t\tif (pos > input.length - 1) {\n\t\t\t\tpos = 0;\n\t\t\t}\n\t\t\terr = err + ann.runEpoch(input[pos], pos, result[pos], parameters);\n\t\t\tpos++;\n\t\t}\n\t}",
"public void setUpdateOften(int i){\n countNum = i;\n }",
"@Override\n public void eventEpoch(int eventNum, int val, long epoch) {\n }",
"public void incrNormalRunners() {\n this.runnerStats.incrNormalRunners();\n }",
"@Override\n public boolean isEpochCheckEnabled() {\n return false;\n }",
"private void nextTraining() {\n\t\tif(!training_queue.isEmpty()) {\n\t\t\tPair<Soldier, Integer> tmp = training_queue.remove();\n\t\t\tif(tmp!=null) {\n\t\t\t\tcurrent = tmp.getKey();\n\t\t\t\tnb_to_train = tmp.getValue();\t\t\n\t\t\t\tnb_rounds = current.getTime_prod();\n\t\t\t}else {\n\t\t\t\tcurrent = null;\n\t\t\t\tnb_to_train = 1;\n\t\t\t\tnb_rounds = 100+50*(owner_castle.getLevel()+1);\n\t\t\t\tupgrade = true;\n\t\t\t}\n\t\t}else\n\t\t\tcurrent = null;\n\t}",
"public void train()\r\n\t{\r\n\t\tfor(int i=0; i < this.maxEpoch; i++)\r\n\t\t{\r\n\t\t\tfor(Instance temp_example: this.trainingSet)\r\n\t\t\t{\r\n\t\t\t\tdouble O = calculateOutputForInstance(temp_example);\r\n\t\t\t\tdouble T = temp_example.output;\r\n\t\t\t\tdouble err = T - O;\r\n\r\n\t\t\t\t//w_jk (hidden to output)\r\n\t\t\t\tdouble g_p_out = (outputNode.getSum() <= 0) ? 0 : 1;\r\n\t\t\t\tfor(NodeWeightPair hiddenNode: outputNode.parents)\r\n\t\t\t\t{\r\n\t\t\t\t\thiddenNode.set_deltaw_pq(this.learningRate*\r\n\t\t\t\t\t\t\thiddenNode.node.getOutput()*err*g_p_out);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//w_ij (input to hidden)\r\n\t\t\t\tint hid_count =0;\r\n\t\t\t\tfor(Node hiddenNode: hiddenNodes){\r\n\t\t\t\t\tdouble g_p_hid = (hiddenNode.getSum() <= 0) ? 0 : 1;\r\n\t\t\t\t\tif(hiddenNode.getType()==2)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tfor(NodeWeightPair inputNode: hiddenNode.parents){\r\n\t\t\t\t\t\t\tdouble a_i = inputNode.node.getOutput();\r\n\t\t\t\t\t\t\tinputNode.set_deltaw_pq\r\n\t\t\t\t\t\t\t(\r\n\t\t\t\t\t\t\t\t\tthis.learningRate*\r\n\t\t\t\t\t\t\t\t\ta_i*g_p_hid*(err*\r\n\t\t\t\t\t\t\t\t\toutputNode.parents.get(hid_count).weight*\r\n\t\t\t\t\t\t\t\t\tg_p_out)\r\n\t\t\t\t\t\t\t\t\t);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\thid_count++;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// for all w_pq, update weights\r\n\t\t\t\tfor(Node hiddenNode: hiddenNodes){\r\n\t\t\t\t\tif(hiddenNode.getType()==2){\r\n\t\t\t\t\t\tfor(NodeWeightPair inputNode: hiddenNode.parents){\r\n\t\t\t\t\t\t\tinputNode.weight += inputNode.get_deltaw_pq();\r\n\t\t\t\t\t\t\tinputNode.set_deltaw_pq(new Double (0.00));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tfor(NodeWeightPair hiddenNode: outputNode.parents)\r\n\t\t\t\t{\r\n\t\t\t\t\thiddenNode.weight += hiddenNode.get_deltaw_pq();\r\n\t\t\t\t\thiddenNode.set_deltaw_pq(new Double (0.00));\r\n\t\t\t\t}\r\n\r\n\t\t\t} // end of an instance \r\n\t\t} // end of an epoch\r\n\t}",
"private int validateEpoch (int epoch)\n throws ControlDataInvalidException\n {\n if (!(epoch >= 0)) {\n throw new ControlDataInvalidException(\n \"Epoch must be equal to or greater than 0. epoch=[\" + epoch + \"]\");\n }\n\n return epoch;\n }",
"private void trainNetwork(long iterations) {\n\t\ttrainer.startTraining(network, iterations);\r\n\r\n\t}",
"public Builder saveEveryNEpochs(int n){\n this.saveEveryNEpochs = n;\n return this;\n }",
"public void removeEpochs(int limit) {\n epochsLock.lock();\n\n for(Integer key : (Integer[])epochs.keySet().toArray(new Integer[0])) {\n if(key > limit) {\n Epoch epoch = epochs.remove(key);\n epoch.setRemoved();\n //epoch.getTimeoutTask().cancel();\n }\n }\n\n epochsLock.unlock();\n }",
"int updateCount(double dist);",
"@Override\n public void train() {\n actual = observations.toArray();\n min_val_error = Double.MAX_VALUE;\n if (findDecayConstant)\n for (float alpha = 0f; alpha <= 1f; alpha += 0.01f)\n initializeAndTrainModel(alpha);\n else\n initializeAndTrainModel(optAlpha);\n }",
"private void updateExpectedTotalOffices() {\n mExpectedTotalOffices++;\n }",
"public abstract long getNumUpdate();",
"public void updateLives() {\r\n\r\n\t\tif (enhanced == true && (numScore >= 4000 && numLiveUpdated == 0) || (numScore >= 8000 && numLiveUpdated == 1)\r\n\t\t\t\t|| (numScore >= 12000 && numLiveUpdated == 2)) {\r\n\t\t\tlives += 1;\r\n\t\t\tnumLiveUpdated += 1;\r\n\t\t}\r\n\r\n\t}",
"public void update(long value) {\n\t\tcount.incrementAndGet();\n\t\tsample.update(value);\n\t\tsetMax(value);\n\t\tsetMin(value);\n\t\t_sum.getAndAdd(value);\n\t\tupdateVariance(value);\n\t}",
"public void resetRunCount() {\n\n }",
"private void numberResults ()\r\n {\r\n int partIndex = 0;\r\n\r\n for (Result result : connection.getResultMap().keySet()) {\r\n ScorePart scorePart = (ScorePart) result.getUnderlyingObject();\r\n scorePart.setId(++partIndex);\r\n }\r\n }",
"public void updateBallCount(){\n\t\tif (validBall.getxLoc() < 0 || validBall.getxLoc() > screenWidth)\n\t\t\tballCount = 0;\n\t\telse if (validBall.getyLoc() < 0 || validBall.getyLoc() > screenHeight)\n\t\t\tballCount = 0;\n\t\telse\n\t\t\tballCount = 1;\n\t}",
"@Override\n\tpublic void stateChanged(ChangeEvent e) {\n\t\t// TODO Auto-generated method stub\n\t\tepochSelected = ((Number)epochSelector.getValue()).intValue();\n\t\tupdateParticles();\n\t\tthis.repaint();\n\t}",
"private void updateNumberOfConnections(int delta)\n\t{\n\t\tint count = numberOfConnections.addAndGet(delta);\t\t\n\t\tLOG.debug(\"Active connections count = {}\", count);\n\t}",
"public void updateNumberOfVehicles() {\r\n numberOfVehicles = getVehicles().size();\r\n }",
"@Test(timeout = 4000)\n public void test070() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = new double[7];\n evaluation0.updateNumericScores(doubleArray0, doubleArray0, 0.0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }",
"@Test\n public void setFetchCount() throws Exception {\n //Given we have a new Fectch count\n\n final int NEW_FETCH_COUNT =15;\n\n //when we set the timeline fetchCount to New_Fetch_Count\n\n timeline.setFetchCount(NEW_FETCH_COUNT);\n\n //Then the New_Fetch_Count is equal to timeline.getFetchCount()\n assertTrue(timeline.getFetchCount()==NEW_FETCH_COUNT);\n\n }",
"public void train(int n_epochs) {\n TrainModel train_model = null;\n\n int lenW = vocabulary.length;\n int W = 3 * lenW + 3;\n\n // randomly initialize U_Ot, values are randomly selected between -0.1 to 0.1;\n double[][] U_Ot = new double[D][W];\n\n // randomly initialize U_R, values are randomly selected between -0.1 and 0.1\n double[][] U_R = new double[D][W];\n\n double prev_err = 0D;\n for (int epoch = 0; epoch < n_epochs; epoch++) {\n double total_error = 0D;\n int n_wrong = 0;\n\n for (int i = 0; i < train_lines.size(); i++) {\n Instance line = train_lines.get(i);\n if (\"q\".equals(line.type)) { // indicates question\n List<Integer> refs = line.refs; // Indexing from 1\n List<Integer> f = refs.stream()\n .map(ref -> ref-1)\n .collect(Collectors.toList()); // Indexing from 0\n int id = line.ID - 1; // Indexing from 0\n\n // all indices from\n List<Integer> indices = range(i-id, i+1);\n List<double[]> memory_list = indices.stream()\n .map(idx -> L_train[idx])\n .collect(Collectors.toList());\n\n\n if (train_model == null) {\n train_model = new TrainModel(lenW, f.size());\n }\n\n List<Integer> m = f;\n // TODO\n List<Integer> mm = new ArrayList<>(); //TODO\n for (int j = 0; j < f.size(); j++) {\n mm.add(O_t(\n newM,\n memory_list\n ));\n }\n\n double err = train_model(H.get(\"answer\"),\n gamma, memory_list, V, id, ???)[0];\n total_error += err;\n System.out.println(\"epoch: \" + epoch + \"\\terr: \" + (total_error / train_lines.size()));\n }\n }\n }\n }",
"public void setRuns(int runs);",
"private void run() {\n\t\tfor (int i = 0; i < 1000; i++){\n\t\t\t\n\t\t\tdouble sample = Math.random()*2.0;\n\t\t\tdataset.addObservation(sample);\n\t\t\t\n\t\t\t// stats\n\t\t\tsum += sample;\n\t\t\tn++;\n\t\t\tav = sum/n;\n\n\t\t\t// create new xy dataset\n\t\t\n\t\t\ttry {Thread.sleep(1000L);} catch (Exception e) {}\n\t\t\t\n\t\t}\n\t\t\n\t\t \n\t}",
"public void incrementNumModifyRequests() {\n this.numModifyRequests.incrementAndGet();\n }",
"void trainingBatch(GenerateRandom rnd);",
"public void updateScore(){\r\n if (this.isArtist || winners.contains(this)) {\r\n this.score += pointsGainedLastRound;\r\n }\r\n pointsGainedLastRound = 0;\r\n placeLastRound = 0;\r\n }",
"public int getNumInstances() {\n return this.train_values.get(0).length;\n }",
"public void train(SieveDocuments trainingInfo) {\r\n\t\t// no training\r\n\t}",
"@Override\n\tpublic void update() {\n\t\tage++;\n\t\tpoints = Globals.points;\n\t}",
"public void increaseFeatureCount() {\n this.featureCount++;\n }",
"private int getLatestRuns() {\n // return 90 for simplicity\n return 90;\n }",
"void updateCellNumbers() {\n cells.stream().forEach(row -> row.stream().filter(cell -> !cell.isMine()).forEach(cell -> {\n int numNeighbouringMines =\n (int) getNeighboursOf(cell).stream().filter(neighbour -> neighbour.isMine()).count();\n cell.setNumber(numNeighbouringMines);\n }));\n }",
"public void defaultUpdateCount(AcBatchFlight e)\n {\n }",
"private void train() throws IOException {\r\n\r\n // Set Listeners, to see results of evaluation during training process and testing\r\n vgg16Transfer.setListeners(new ScoreIterationListener(100));\r\n trainWriter.write(\"\\n Train model....\");\r\n System.out.println(\"\\n Train model....\");\r\n int iterationsCounter = 0;\r\n // Go through all data \"epochs\" - number of times\r\n for(int n = 0; n < epochs; n++) {\r\n System.out.println(String.format(\"Epoch %d started training\", n + 1));\r\n trainWriter.write(String.format(\"Epoch %d started training\", n + 1));\r\n\r\n //Reset training iterator to the new epoch\r\n trainIterator.reset();\r\n // Go through all data once, till it's end\r\n while (trainIterator.hasNext()) {\r\n iterationsCounter++;\r\n trainingData = trainIterator.next();\r\n normalizer.fit(trainingData);\r\n vgg16Transfer.fit(trainingData);\r\n System.out.println(\"*** Completed iteration number # \" + iterationsCounter + \" ***\");\r\n trainWriter.write(\"*** Completed iteration number # \" + iterationsCounter + \" ***\");\r\n\r\n }\r\n System.out.println(String.format(\"Epoch %d finished training\", n + 1));\r\n trainWriter.write(\"*** Completed iteration number # \" + iterationsCounter + \" ***\");\r\n // Get results and check them\r\n Evaluation eval = new Evaluation(numLabels);\r\n testIterator.reset();\r\n while(testIterator.hasNext()) {\r\n testData = testIterator.next();\r\n normalizer.fit(testData);\r\n INDArray features = testData.getFeatures();\r\n INDArray labels = testData.getLabels();\r\n INDArray predicted = vgg16Transfer.outputSingle(features);\r\n eval.eval(labels, predicted);\r\n }\r\n System.out.println(String.format(\"Evaluation on test data - [Epoch %d] [Accuracy: %.3f, P: %.3f, R: %.3f, F1: %.3f] \",\r\n n + 1, eval.accuracy(), eval.precision(), eval.recall(), eval.f1()));\r\n System.out.println(eval.stats());\r\n System.out.println(eval.confusionToString());\r\n trainWriter.write(String.format(\"Evaluation on test data - [Epoch %d] [Accuracy: %.3f, P: %.3f, R: %.3f, F1: %.3f] \",\r\n n + 1, eval.accuracy(), eval.precision(), eval.recall(), eval.f1()));\r\n trainWriter.write(eval.stats());\r\n trainWriter.write(eval.confusionToString());\r\n }\r\n System.out.println(\"\\n *** Training finished! *** \");\r\n trainWriter.write(\"\\n *** Training finished! *** \");\r\n }",
"int batchSize();",
"public void documents_per_label_count(Instance[] trainingData) {\n\n\t\tm_sports_count = 0;\n\t\tm_business_count = 0;\n\n\t\t// iterate the instances (i.e., articles) in the training data\n\t\tfor (int i = 0; i < m_trainingData.length; i++) {\n\t\t\tInstance article = m_trainingData[i];\n\t\t\t// if this article belongs to sports\n\t\t\tif (article.label.equals(Label.SPORTS)) {\n\t\t\t\tm_sports_count++;\n\t\t\t}\n\t\t\t// if this article belongs to business (i.e., non-sports)\n\t\t\telse {\n\t\t\t\tm_business_count++;\n\t\t\t}\n\t\t}\n\t}",
"private void increment() {\n for (int i=0; i < 10000; i++) {\n count++;\n }\n }",
"public void setLastCount(double n)\n {\n\n this.lastCount = n;\n }",
"public void train() {\n\n int w;\n double sum = 0, avg;\n double forecast;\n double[][] trainMatrix = new double[trainPoints][2];\n double[][] valMatrix = new double[validationPoints][2];\n actual = observations.toArray();\n\n for (int i = 0; i < step * slices; i++)\n sum += actual[i];\n\n avg = sum / slices;\n\n for (int pos = 0; pos < trainPoints; pos++) {\n sum = 0;\n w = 0;\n\n if (pos >= step * slices) {\n for (int k = pos - step * slices; k < pos; k += step)\n sum += actual[k] * weights[w++];\n forecast = sum / slices;\n } else forecast = avg;\n\n trainMatrix[pos][0] = actual[pos];\n trainMatrix[pos][1] = forecast;\n }\n\n for (int pos = actual.length - validationPoints, j = 0; pos < actual.length; pos++) {\n sum = 0;\n w = 0;\n for (int k = pos - step * slices; k < pos; k += step)\n sum += actual[k] * weights[w++];\n forecast = sum / slices;\n valMatrix[j][0] = actual[pos];\n valMatrix[j][1] = forecast;\n j++;\n }\n double biasness = BiasnessHandler.handleOffset(valMatrix);\n accuracyIndicators.setBias(biasness);\n ModelUtil.computeAccuracyIndicators(accuracyIndicators, trainMatrix, valMatrix, dof);\n errorBound = ErrorBoundsHandler.computeErrorBoundInterval(trainMatrix);\n }",
"public void updateNumfaces(int newNumFaces)\n {\n if(newNumFaces<MIN_FACES)\n numFaces = newNumFaces;\n }",
"public void doValidation(int currentRound)\n {\n getData(currentRound);\n// System.out.println(\"training unterminated ones\");\n kMeans.setItems(trainingData.get(0));\n kMeans.k=k1;\n kMeans.init();\n List<Cluster> unterminatedClusters=kMeans.doCluster();\n for (int i=0;i<unterminatedClusters.size();i++)\n {\n unterminatedClusters.get(i).label=0;\n }\n \n// System.out.println(\"training terminated ones\");\n kMeans.setItems(trainingData.get(1));\n kMeans.k=k2;\n kMeans.init();\n List<Cluster> terminatedClusters=kMeans.doCluster();\n for (int i=0;i<terminatedClusters.size();i++)\n {\n terminatedClusters.get(i).label=1;\n }\n \n List<Cluster> clusters=new ArrayList<Cluster>();\n clusters.addAll(unterminatedClusters);\n clusters.addAll(terminatedClusters);\n kMeans.setClusters(clusters);\n int[] corrects=new int[2];\n int[] counts=new int[2];\n for (int i=0;i<2;i++)\n {\n corrects[i]=0;\n counts[i]=0;\n }\n for (Item item:testData)\n {\n int label=kMeans.getNearestCluster(item).label;\n counts[label]++;\n if (label==item.type)\n {\n corrects[item.type]++;\n }\n }\n correctness+=corrects[1]*1.0/counts[1];\n correctCount+=corrects[1];\n// for (int i=0;i<2;i++)\n// System.out.println(\"for type \"+i+\": \" +corrects[i]+\" correct out of \"+counts[i]+\" in total (\"+corrects[i]*1.0/counts[i]+\")\");\n }",
"Update withReplicaCount(int count);",
"private synchronized void updateData() {\n if (nanoseconds >= 1000000000) {\n fps = frames;\n ups = updates;\n nanoseconds = nanoseconds - 1000000000;\n frames = 0;\n updates = 0;\n }\n\n long elapsedTime = System.nanoTime() - oldTime;\n oldTime = oldTime + elapsedTime;\n nanoseconds = nanoseconds + elapsedTime;\n\n particleSimulator.update(elapsedTime * 1e-9);\n\n // An update occurred, increment.\n updates++;\n\n // Ask for a repaint if we know of a component to repaint\n if (gameDrawingComponent != null) {\n gameDrawingComponent.repaint();\n }\n }",
"protected float computeModelScoreOnTraining() {\n/* 508 */ float s = computeModelScoreOnTraining(0, this.samples.size() - 1, 0);\n/* 509 */ s /= this.samples.size();\n/* 510 */ return s;\n/* */ }",
"public void incrementNumAddRequests() {\n this.numAddRequests.incrementAndGet();\n }",
"@Override\n public void playStart(long epoch) {\n }",
"public void incrementNumModifyDNRequests() {\n this.numModifyDNRequests.incrementAndGet();\n }",
"public void incrementLoopCount() {\n this.loopCount++;\n }",
"public Builder setUpdateCount(long value) {\n \n updateCount_ = value;\n onChanged();\n return this;\n }",
"private synchronized void updateErrorCount(int errorCount) {\r\n\t\tthis.errorCount += errorCount;\r\n\t}",
"@Override\n\tpublic void trainOnline(TLongList timestamps, Collection<Instance> instances) {\n\t\ttrainOnline(instances);\n\t}",
"void updateFrequencyCount() {\n //Always increments by 1 so there is no need for a parameter to specify a number\n this.count++;\n }",
"int getUpdateCountsCount();",
"@Test\n public void reduceNumber() throws Exception {\n Date date = new Date();\n int updateCount = seckillDao.reduceNumber(1000,date);\n System.out.println(updateCount);\n }",
"public void resetBallCount() {\r\n\t\tballCount = 30;\r\n\t}",
"public void updateTotalQuestions() {\n\t\ttotalQuestionsNum.setText(Integer.toString(noOfQuestions));\n\t}",
"public void train(){\r\n\t\tdouble output = 0.0;\r\n\t\tList<Integer> teacher = null;\r\n\t\tdouble adjustedWeight = 0.0;\r\n\t\tdouble error = 0.0;\r\n\t\tdouble deltaK = 0.0;\r\n\r\n\t\tfor(int counter = 0; counter < maxEpoch; counter++){\r\n\t\t\tfor(Instance inst : trainingSet){\r\n\t\t\t\tcalculateOutputForInstance(inst);\r\n\t\t\t\tteacher = inst.classValues;\r\n\t\t\t\t//jk weight\r\n\t\t\t\tfor(int i = 0; i < outputNodes.size(); i++){\r\n\t\t\t\t\tNode kNode = outputNodes.get(i);\r\n\t\t\t\t\toutput = kNode.getOutput();\r\n\t\t\t\t\terror = teacher.get(i) - output;\r\n\t\t\t\t\tdeltaK = error*getReLU(kNode.getSum());\r\n\t\t\t\t\tfor(int j = 0; j < kNode.parents.size(); j++){\r\n\t\t\t\t\t\tNodeWeightPair jkWeight = kNode.parents.get(j);\r\n\t\t\t\t\t\tNode jNode = jkWeight.node;\r\n\t\t\t\t\t\tadjustedWeight = getJK(jNode, deltaK);\r\n\t\t\t\t\t\tjkWeight.weight += adjustedWeight;\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t//ij weight\r\n\t\t\t\tfor(int i = 0; i < hiddenNodes.size(); i++){\r\n\t\t\t\t\tNode jNode = hiddenNodes.get(i);\r\n\t\t\t\t\tif(jNode.parents == null) continue;\r\n\t\t\t\t\tfor(int j = 0; j < jNode.parents.size(); j++){\r\n\t\t\t\t\t\tNodeWeightPair ijWeight = jNode.parents.get(j);\r\n\t\t\t\t\t\tNode iNode = ijWeight.node;\r\n\t\t\t\t\t\tadjustedWeight = getIJ(iNode, jNode, teacher, i);\r\n\t\t\t\t\t\tijWeight.weight += adjustedWeight;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void train() {\n\t\tfor (Instance ins : arrTrainInstances) {\n\t\t\tif (ins.scorePmi_E1E2 > largestPMI)\n\t\t\t\tlargestPMI = ins.scorePmi_E1E2;\n\t\t}\n\t\tSystem.out.println(\"Largest PMI: \" + largestPMI);\n\n\t\tfor (Instance ins : arrTrainInstances) {\n\t\t\tins.scorePmi_E1E2 = ins.scorePmi_E1E2 / largestPMI;\n\t\t}\n\n\t\tfor (Instance ins : arrTestInstances) {\n\t\t\tins.scorePmi_E1E2 = ins.scorePmi_E1E2 / largestPMI;\n\t\t}\n\n\t\tint sizeD0 = arrD0.size();\n\t\tint sizeD1 = arrD1.size();\n\t\tint sizeD2 = arrD2.size();\n\t\tint sizeD3 = arrD3.size();\n\n\t\tint sizeMin = Math.min(sizeD0, Math.min(sizeD1, Math\n\t\t\t\t.min(sizeD2, sizeD3)));\n\t\tSystem.out.println(\"sizeMin=\" + sizeMin);\n\n\t\tint n = instanceNums.length;\n\n\t\tboolean flag = false;\n\n\t\tint count = 0;\n\n\t\tfor (int i = 0; i < n; i++) {\n\n\t\t\tint k = instanceNums[i];\n\n\t\t\tif (k > sizeMin) {\n\t\t\t\tk = sizeMin;\n\t\t\t\tinstanceNums[i] = k;\n\t\t\t\tflag = true;\n\t\t\t}\n\n\t\t\tSystem.out.println(\"\\nk=\" + k);\n\n\t\t\tArrayList<Instance> arrSub0 = getInstances(arrD0, k);\n\t\t\tArrayList<Instance> arrSub1 = getInstances(arrD1, k);\n\t\t\tArrayList<Instance> arrSub2 = getInstances(arrD2, k);\n\t\t\tArrayList<Instance> arrSub3 = getInstances(arrD3, k);\n\n\t\t\tArrayList<Instance> arrTrains = new ArrayList<Instance>();\n\t\t\tarrTrains.addAll(arrSub0);\n\t\t\tarrTrains.addAll(arrSub1);\n\t\t\tarrTrains.addAll(arrSub2);\n\t\t\tarrTrains.addAll(arrSub3);\n\t\t\tCollections.shuffle(arrTrains);\n\n\t\t\tSystem.out.println(\"Training size: \" + arrTrains.size());\n\n\t\t\ttrain(arrTrains);\n\n\t\t\tdouble acc = test();\n\t\t\tacc = test();\n\n\t\t\taccuracies[i] = acc;\n\n\t\t\tcount++;\n\n\t\t\tif (flag == true)\n\t\t\t\tbreak;\n\n\t\t}\n\n\t\tfor (int i = 0; i < count; i++) {\n\t\t\tSystem.out.print(\" | \" + \"K=\" + instanceNums[i]);\n\t\t}\n\t\tSystem.out.println();\n\n\t\tfor (int i = 0; i < count; i++) {\n\n\t\t\tDecimalFormat df = new DecimalFormat(\"#.####\");\n\t\t\tString res = df.format(accuracies[i]);\n\t\t\tSystem.out.print(\" | \" + res);\n\t\t}\n\t\tSystem.out.println();\n\t}",
"private void adjustThreadCount() {\n \t\tif (adjusting > 0) {\n \t\t\tadjusting--;\n \t\t\treturn;\n \t\t}\n \t\tint active = activeThreads.size();\n \t\tint idle = idleThreads.size();\n \t\tint count = idle + active;\n \n \t\tif (Http.DEBUG) {\n \t\t\thttp.logDebug(\"Current thread count: \" + idle + \" idle, \" + active + \" active\"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$\n \t\t}\n \n \t\tif (idle < 2) {\n \t\t\tcount += 5;\n \t\t} else {\n \t\t\tif (idle > 10) {\n \t\t\t\tcount -= 5;\n \t\t\t}\n \t\t}\n \n \t\tif (count > upper) {\n \t\t\tcount = upper;\n \t\t}\n \n \t\tif (count < lower) {\n \t\t\tcount = lower;\n \t\t}\n \n \t\tint delta = count - (idle + active);\n \t\tif (Http.DEBUG) {\n \t\t\thttp.logDebug(\"New thread count: \" + count + \", delta: \" + delta); //$NON-NLS-1$ //$NON-NLS-2$\n \t\t}\n \n \t\tif (delta < 0) /* remove threads */\n \t\t{\n \t\t\tdelta = -delta; /* invert sign */\n \t\t\tif (delta < idle) {\n \t\t\t\tfor (int i = idle - 1; delta > 0; i--, delta--) {\n \t\t\t\t\tHttpThread thread = (HttpThread) idleThreads.elementAt(i);\n \t\t\t\t\tidleThreads.removeElementAt(i);\n \t\t\t\t\tthread.close();\n \t\t\t\t}\n \t\t\t} else {\n \t\t\t\thitCount += delta - idle;\n \t\t\t\tfor (int i = 0; i < idle; i++) {\n \t\t\t\t\tHttpThread thread = (HttpThread) idleThreads.elementAt(i);\n \t\t\t\t\tthread.close();\n \t\t\t\t}\n \t\t\t\tidleThreads.removeAllElements();\n \t\t\t}\n \t\t} else {\n \t\t\tif (delta > 0) /* add threads */\n \t\t\t{\n \t\t\t\tadjusting = delta; /* new threads will call this method */\n \t\t\t\tif (delta > hitCount) {\n \t\t\t\t\tdelta -= hitCount;\n \t\t\t\t\thitCount = 0;\n \t\t\t\t\tidleThreads.ensureCapacity(count);\n \t\t\t\t\tfor (int i = 0; i < delta; i++) {\n \t\t\t\t\t\tnumber++;\n\t\t\t\t\t\tfinal String threadName = \"HttpThread_\" + number; //$NON-NLS-1$\n \t\t\t\t\t\ttry {\n \t\t\t\t\t\t\tAccessController.doPrivileged(new PrivilegedAction() {\n \t\t\t\t\t\t\t\tpublic Object run() {\n \t\t\t\t\t\t\t\t\tHttpThread thread = new HttpThread(http, HttpThreadPool.this, threadName);\n \t\t\t\t\t\t\t\t\tthread.start(); /* thread will add itself to the pool */\n \t\t\t\t\t\t\t\t\treturn null;\n \t\t\t\t\t\t\t\t}\n \t\t\t\t\t\t\t});\n \t\t\t\t\t\t} catch (RuntimeException e) {\n \t\t\t\t\t\t\t/* No resources to create another thread */\n \t\t\t\t\t\t\thttp.logError(NLS.bind(HttpMsg.HTTP_THREAD_POOL_CREATE_NUMBER_ERROR, new Integer(number)), e);\n \n \t\t\t\t\t\t\tnumber--;\n \n \t\t\t\t\t\t\t/* Readjust the upper bound of the thread pool */\n \t\t\t\t\t\t\tupper -= delta - i;\n \n \t\t\t\t\t\t\tbreak;\n \t\t\t\t\t\t}\n \t\t\t\t\t}\n \t\t\t\t} else {\n \t\t\t\t\thitCount -= delta;\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t}",
"public void setEpochLongitude(double value) {\n this.epochLongitude = value;\n }",
"@Override\r\n\tpublic void iterateCount() {\n\t\t\r\n\t}",
"public void update(Limit limit);",
"public static void updateAge() {\n\t\tfor (int i =0; i < data.size(); i++){\n\t\t\tdata.get(i).setAge(data.get(i).getAge()+1);\n\t\t}\n\t}",
"@Test(timeout = 4000)\n public void test068() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(360, (-336.251));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }",
"public void incrementNumConnects() {\n this.numConnects.incrementAndGet();\n }",
"public void incrementNumSearchRequests() {\n this.numSearchRequests.incrementAndGet();\n }",
"public void updateTicksCount(int ticks) {\r\n\t\tsimTicks.setText(\"Ticks: \" + ticks);\r\n\t}",
"public void incrementNumCompareRequests() {\n this.numCompareRequests.incrementAndGet();\n }",
"public long getInstancesSeen() {\n\t\treturn this.getLearningNode().getInstancesSeen();\n\t}",
"private void incrementUsageCount() {\n usageCount++;\n }",
"public void setEpochLongitudeDelta(double value) {\n this.epochLongitudeDelta = value;\n }",
"public void incrementNumExtendedRequests() {\n this.numExtendedRequests.incrementAndGet();\n }",
"public void batchUpdateWeights() {\n\t\tObject[] keys = nextLayerNodes.keySet().toArray();\n\t\tfor (Object key : keys) {\n\t\t\tNode nextLayerNode = (Node) key;\n\t\t\t// System.out.printf(\"Updating weight from %f to %f%n\", nextLayerNodes.get(nextLayerNode), nextLayerNodesUpdateMap.get(nextLayerNode));\n\t\t\tdouble oldWeight = nextLayerNodes.get(nextLayerNode);\n\t\t\tnextLayerNodes.put(nextLayerNode, nextLayerNodesUpdateMap.get(nextLayerNode));\n\t\t\tdouble newWeight = nextLayerNodes.get(nextLayerNode);\n\t\t\tdouble deltaWeight = oldWeight-newWeight;\n\t\t\tSystem.out.printf(\"Changed from %f to %f%n\", oldWeight, newWeight);\n\t\t\tif (deltaWeight > 0.0) {\n\t\t\t\tif (nextLayerNodesArrayList.get(0).nextLayerNodes.size() == 0) {\n\t\t\t\t\tSystem.out.print(\"Hidden Node connected to output layer \");\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.print(\"Node connected to another hidden layer \");\n\t\t\t\t}\n\t\t\t\tSystem.out.printf (\"Increased!! Delta weight = %.10f%n\", deltaWeight);\n\t\t\t} else if (deltaWeight < 0.0) {\n\t\t\t\tif (nextLayerNodesArrayList.get(0).nextLayerNodes.size() == 0) {\n\t\t\t\t\tSystem.out.print(\"Hidden Node connected to output layer \");\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.print(\"Node connected to another hidden layer \");\n\t\t\t\t}\n\t\t\t\tSystem.out.printf(\"Decreased!! Delta weight = %.10f%n\", deltaWeight);\n\t\t\t}\n\t\t}\n\t}",
"public void train(){\n recoApp.training(idsToTest);\n }",
"public void incDraws() {\n draws++;\n }",
"@Override\r\n\tpublic int update() throws Exception {\n\t\treturn 0;\r\n\t}",
"long getUpdateCount();",
"public void incrementLoopCounter() throws EndTaskException {\n\t\tgoToBeeperStock();\n\t\tpickBeeper();\n\t\tgoToLoopCounter();\n\t\tputBeeper();\n\t}",
"public void setIterations(int iter) {\n\t\tnumIterations = iter;\n\t}",
"private void follow_updates() {\n new Thread() {\n public void run() {\n while(true) {\n try {\n Thread.sleep(1000);\n GUI.setUps(upd_count);\n upd_count = 0;\n }\n catch(Exception e) {\n e.printStackTrace();\n }\n }\n }\n }.start();\n }",
"public void updateMetrics(int iterations, int num, float time) {\n final int n = num;\n final float t = time / 1000;\n final int i= iterations;\n \n java.text.NumberFormat formatter = new java.text.DecimalFormat(\"#######.###\");\n \n Runnable doUpdate = new Runnable() {\n public void run() {\n metricsNumLabels[i].setText(\"\" + n);\n metricsTimeLabels[i].setText(\"\" + t + \" sec\");\n \n if (t > 1)\n metricsTimeLabels[i].setForeground(Color.red);\n else\n metricsTimeLabels[i].setForeground(Color.black);\n }\n };\n SwingUtilities.invokeLater(doUpdate);\n }",
"protected synchronized void increaseThreadsNumber() {\r\n threadNumber++;\r\n }",
"public int getNumUpdates() {\n return (Integer) getProperty(\"numUpdates\");\n }",
"public void incrementNumBindRequests() {\n this.numBindRequests.incrementAndGet();\n }",
"public void setNumTasks(int n) {\n if (latch != null && latch.getCount() > 0) {\n throw new IllegalStateException(\"Method called during wait period\");\n }\n\n latch = new CountDownLatch(n);\n }",
"public int getRuns();",
"public void setNumBalls(int numBalls) {\n this.numBalls += numBalls;\n setScoreText();\n }"
] | [
"0.6767479",
"0.6002292",
"0.59232205",
"0.5918436",
"0.5907136",
"0.5893823",
"0.58501697",
"0.5837081",
"0.57559806",
"0.57025707",
"0.55272496",
"0.552027",
"0.54736346",
"0.5469163",
"0.5414397",
"0.54042035",
"0.5374182",
"0.5366902",
"0.52887565",
"0.5264947",
"0.5254674",
"0.52513283",
"0.52399474",
"0.52338254",
"0.52292",
"0.52174014",
"0.5213306",
"0.5200963",
"0.5197599",
"0.5196458",
"0.5171848",
"0.51455927",
"0.51415384",
"0.51380473",
"0.5129605",
"0.51236886",
"0.51197886",
"0.5118537",
"0.5113637",
"0.51103455",
"0.51022416",
"0.5092343",
"0.5086406",
"0.5079466",
"0.5074532",
"0.5057937",
"0.5056735",
"0.5054594",
"0.50425166",
"0.5040573",
"0.50355566",
"0.5028534",
"0.5027412",
"0.5021603",
"0.5004467",
"0.5002315",
"0.50019765",
"0.4998366",
"0.49953416",
"0.49908012",
"0.4983604",
"0.49750456",
"0.49733257",
"0.49714124",
"0.4957624",
"0.4957449",
"0.4953008",
"0.49439973",
"0.49428254",
"0.49215767",
"0.49155954",
"0.4914949",
"0.4912189",
"0.49111605",
"0.49054915",
"0.49049565",
"0.4904207",
"0.4902129",
"0.48976377",
"0.48904425",
"0.48883083",
"0.48875785",
"0.48862106",
"0.48822355",
"0.4878065",
"0.48772985",
"0.48715198",
"0.48713362",
"0.48707277",
"0.48679617",
"0.48553815",
"0.48534083",
"0.48484692",
"0.48469505",
"0.48461223",
"0.48455545",
"0.48427692",
"0.48309943",
"0.48274",
"0.48237473"
] | 0.7306579 | 0 |
If the epoch is updated, then load new particles that are available | @Override
public void stateChanged(ChangeEvent e) {
// TODO Auto-generated method stub
epochSelected = ((Number)epochSelector.getValue()).intValue();
updateParticles();
this.repaint();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void updateParticles() {\n\t\t// TODO Auto-generated method stub\n\t\tpredParticles = new ArrayList<File>();\n\t\tpreyParticles = new ArrayList<File>();\n\t\tFile f = new File(VisualizerMain.experimentBaseLocation+\"/\"+VisualizerMain.selectedRun+\"/Epoch-\"+epochSelected+\"/\");\n\t\tFile[] listFolders = f.listFiles();\n\t\tfor(File file : listFolders){\n\t\t\tpredParticles.add(file);\n\t\t}\n\t\t\n\t\tDefaultListModel listModelPredator = new DefaultListModel();\n\t\tfor (File file: predParticles){\n\t\t\tlistModelPredator.addElement(file.getName());\n\t\t}\n\t\tdisplayPred.setModel(listModelPredator);\n\t\t\n\t\tDefaultListModel listModelPrey = new DefaultListModel();\n\t\tfor (File file: preyParticles){\n\t\t\tlistModelPrey.addElement(file.getName());\n\t\t}\n\t\tdisplayPrey.setModel(listModelPrey);\n\t}",
"public static void update() {\n\t\t\n\t\t// Fill the background for every call\n\t\tUtility.background(Utility.color(235, 213, 186));\n\t\t\n\t\t// Create 10 new random particles\n\t\tcreateNewParticles(10);\n\t\t\n\t\t// Track every particle in the array then update their feature\n\t\tfor (int i = 0; i < particles.length; i++) {\n\t\t\tif (particles[i] != null) {\n\t\t\t\tupdateParticle(i);\n\t\t\t}\n\n\t\t}\n\n\t}",
"public void update(){\n\t\tif (!VisualizerMain.selectedRun.equals(\"\")){\n\t\t\tupdateEpochNum();\n\t\t\tupdateParticles();\n\t\t\tthis.repaint();\n\t\t}\n\t\t\n\t}",
"public void update() {\n Iterator<Particle> iter = particles.iterator();\n\n while (iter.hasNext()) {\n Particle p = iter.next();\n if (p.isDead()) {\n iter.remove();\n } else {\n p.update();\n }\n }\n }",
"public void onUpdate() {\n super.onUpdate();\n\n if (this.world.isRemote) {\n double d0 = this.posX + (this.rand.nextDouble() * 2.0D - 1.0D) * (double) this.width * 0.5D;\n double d1 = this.posY + 0.05D + this.rand.nextDouble() * 1.0D;\n double d2 = this.posZ + (this.rand.nextDouble() * 2.0D - 1.0D) * (double) this.width * 0.5D;\n //double d3 = (this.rand.nextDouble() * 2.0D - 1.0D) * 0.3D;\n double d4 = this.rand.nextDouble() * 0.1D;\n //double d5 = (this.rand.nextDouble() * 2.0D - 1.0D) * 0.3D;\n this.world.spawnParticle(ticksExisted % 2 == 0 ? EnumParticleTypes.FLAME : EnumParticleTypes.SMOKE_NORMAL, d0, d1, d2, 0, d4, 0);\n } else if (--this.lifeTicks < 0) {\n this.setDead();\n }\n }",
"protected void updateParticles() {\n\n\t\tfor (int i = 0; i < particles.size(); i++) {\n\t\t\tVParticle p = particles.get(i);\n\t\t\tif (p.neighbors == null) {\n\t\t\t\tp.neighbors = particles;\n\t\t\t}\n\t\t\tfor (BehaviorInterface b : behaviors) {\n\t\t\t\tb.apply(p);\n\t\t\t}\n\t\t}\n\t\tfor (int i = 0; i < particles.size(); i++) {\n\t\t\tVParticle p = particles.get(i);\n\t\t\tp.scaleVelocity(friction);\n\t\t\tp.update();\n\t\t}\n\t}",
"public void update() {\n\t\tif (loading) return;\n\t\t\n\t\tinstances.clear();\n\t\tfor (int x = 0; x < Board.DIMENSION; x++) {\n\t\t\tfor (int y = 0; y < Board.DIMENSION; y++) {\n\t\t\t\tTile tile = game.getBoard().getTile(x, y);\n\t\t\t\t\n\t\t\t\tif (tile != Tile.EMPTY) {\n\t\t\t\t\tModelInstance instance = new ModelInstance(ballModel);\n\t\t\t\t\t\n\t\t\t\t\tsetTransform(instance, x, y, tile);\n\t\t\t\t\t\n\t\t\t\t\tinstances.add(instance);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"List<? extends Particle> update(double timeDelta);",
"private synchronized void updateData() {\n if (nanoseconds >= 1000000000) {\n fps = frames;\n ups = updates;\n nanoseconds = nanoseconds - 1000000000;\n frames = 0;\n updates = 0;\n }\n\n long elapsedTime = System.nanoTime() - oldTime;\n oldTime = oldTime + elapsedTime;\n nanoseconds = nanoseconds + elapsedTime;\n\n particleSimulator.update(elapsedTime * 1e-9);\n\n // An update occurred, increment.\n updates++;\n\n // Ask for a repaint if we know of a component to repaint\n if (gameDrawingComponent != null) {\n gameDrawingComponent.repaint();\n }\n }",
"private static boolean testUpdateParticle() {\n\t\tparticles = new Particle[1];\n\t\tparticles[0] = new Particle(3, 3, 10, 10);\n\t\t\n\t\tparticles[0].setVelocityX(-1);\n\t\tparticles[0].setVelocityY(-2);\n\t\tupdateParticle(0);\n\t\t\n\t\tif (particles[0].getPositionX() != 2 || particles[0].getPositionY() != 1.3) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false; \n\t}",
"private void run() {\n\t\tfor (int i = 0; i < 1000; i++){\n\t\t\t\n\t\t\tdouble sample = Math.random()*2.0;\n\t\t\tdataset.addObservation(sample);\n\t\t\t\n\t\t\t// stats\n\t\t\tsum += sample;\n\t\t\tn++;\n\t\t\tav = sum/n;\n\n\t\t\t// create new xy dataset\n\t\t\n\t\t\ttry {Thread.sleep(1000L);} catch (Exception e) {}\n\t\t\t\n\t\t}\n\t\t\n\t\t \n\t}",
"public void updateParticles() {\n\n // Update walkingAnimation particle effect\n walkingParticleEffect.update(Gdx.graphics.getDeltaTime());\n if(walkingParticleEffect.isComplete()) {\n walkingParticleEffect.reset();\n }\n\n // Update getting hit particle effect\n if(damaged) {\n gettingHitParticleEffect.update(Gdx.graphics.getDeltaTime());\n if(gettingHitParticleEffect.isComplete() && !dead) {\n damaged = false;\n gettingHitParticleEffect.reset();\n }\n }\n }",
"private void draw() {\n ctx.clearRect(0, 0, width, height);\n\n for (ImageParticle p : particles) {\n p.opacity = p.remainingLife / p.life * 0.5;\n\n // Draw particle from image\n ctx.save();\n ctx.translate(p.x, p.y);\n ctx.scale(p.size, p.size);\n //ctx.translate(p.image.getWidth() * (-0.5), p.image.getHeight() * (-0.5));\n ctx.translate(-HALF_WIDTH, -HALF_HEIGHT);\n ctx.setGlobalAlpha(p.opacity);\n ctx.drawImage(p.image, 0, 0);\n ctx.restore();\n\n //p.remainingLife--;\n p.remainingLife *= 0.98;\n //p.size *= 0.99;\n p.x += p.vX;\n p.y += p.vY;\n\n //regenerate particles\n if (p.remainingLife < 0 || p.size < 0 || p.opacity < 0.01) {\n if (running) {\n p.reInit();\n } else {\n particles.remove(p);\n }\n }\n }\n }",
"public void preSaveInit() {\n persistentData.clear();\n for (int i = 0; i < getNumPoints(); i++) {\n persistentData.add(getPoint(i));\n }\n }",
"private static void createNewParticles(int number) {\n\t\t// The following declarations are to initialize the random range for the \n\t\t// particle's feature\n\t\tint maxX = Fountain.positionX + 3;\n\t\tint minX = Fountain.positionX - 3;\n\t\tint boundX = maxX - minX;\n\t\tint maxY = Fountain.positionY + 3;\n\t\tint minY = Fountain.positionY - 3;\n\t\tint boundY = maxY - minY;\n\t\t\n\t\tint particleCount = 0; // For counting the new particles' amount\n\n\t\t\n\t\t\tfor (int i = 0; i < particles.length; i++) {\n\t\t\t\tif (particles[i] == null) {\n\t\t\t\t\t++particleCount;\n\t\t\t\t\t\n\t\t\t\t\t// Following codes are to prepare the setting for the particle\n\t\t\t\t\tint positionX = randGen.nextInt(boundX + 1) + maxX;\n\t\t\t\t\tint positionY = randGen.nextInt(boundY + 1) + maxY;\n\t\t\t\t\tfloat xVelocity = -1 + randGen.nextFloat() * (2);\n\t\t\t\t\tfloat yVelocity = -10 + randGen.nextFloat() * (5);\n\t\t\t\t\tfloat amount = randGen.nextFloat() * 1;\n\t\t\t\t\tint color = Utility.lerpColor(Fountain.startColor, Fountain.endColor, amount);\n\t\t\t\t\tfloat size = randGen.nextFloat() * (11 - 4);\n\t\t\t\t\tint age = randGen.nextInt(40 + 1);\n\t\t\t\t\tint transparency = randGen.nextInt((96)) + 32;\n\t\t\t\t\t\n\t\t\t\t\t// TO set the new particle with random feature\n\t\t\t\t\tparticles[i] = new Particle();\n\t\t\t\t\tparticles[i].setPositionX(positionX);\n\t\t\t\t\tparticles[i].setPositionY(positionY);\n\t\t\t\t\tparticles[i].setVelocityX(xVelocity);\n\t\t\t\t\tparticles[i].setVelocityY(yVelocity);\n\t\t\t\t\tparticles[i].setSize(size);\n\t\t\t\t\tparticles[i].setColor(color);\n\t\t\t\t\tparticles[i].setAge(age);\n\t\t\t\t\tparticles[i].setTransparency(transparency);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Once after creating 10 new particles, ends this method\n\t\t\t\tif (particleCount >= number) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"private synchronized void update() {\n nPoints++;\n int n = points.size();\n if (n < 1) {\n return;\n }\n PathPoint p = points.get(points.size() - 1); // take last point\n if (p.getNEvents() == 0) {\n return;\n }\n if (n > length) {\n removeOldestPoint(); // discard data beyond range length\n }\n n = n > length ? length : n; // n grows to max length\n float t = p.t - firstTimestamp; // t is time since cluster formed, limits absolute t for numerics\n st += t;\n sx += p.x;\n sy += p.y;\n stt += t * t;\n sxt += p.x * t;\n syt += p.y * t;\n// if(n<length) return; // don't estimate velocityPPT until we have all necessary points, results very noisy and send cluster off to infinity very often, would give NaN\n float den = (n * stt - st * st);\n if (den != 0) {\n valid = true;\n xVelocity = (n * sxt - st * sx) / den;\n yVelocity = (n * syt - st * sy) / den;\n } else {\n valid = false;\n }\n }",
"public void updateExperimentalData() {\n experimentalData = dataProducer.getExperimentDataset();\n }",
"public void onTick() {\n // Tick all particles\n Iterator<Particle> iterator = this.particles.iterator();\n while (iterator.hasNext()) {\n Particle particle = iterator.next();\n\n // Tick this particle\n particle.onTick();\n\n // Remove particle when removed flag is set\n if (particle.removed) {\n iterator.remove();\n }\n }\n }",
"public void setParticles(int particles) {\r\n\t\tthis.particles = particles;\r\n\t}",
"public void begin(){\n\t\tfor(ParticleBatch<?> batch : batches)\n\t\t\tbatch.begin();\n\t}",
"public void update() {\n\t\tupdateParticles();\n\t\tupdateSprings();\n\n\t\tif (groups != null) {\n\t\t\tfor (VParticleGroup g : groups) {\n\t\t\t\tg.update();\n\t\t\t}\n\t\t}\n\t}",
"public void update(){\r\n\t\tList<Point> list = new ArrayList<Point>();\r\n\t\t\r\n\t\tlist.addAll(Arrays.asList(points));\r\n\t\t\r\n\t\tsetPoints(list);\r\n\t}",
"@Test\n public void testUpdateParticle() {\n\n pe.updateParticle(p, 0.0f, new Vector3f(), new Vector3f());\n // at the very start of the anim, the particle should be its start size\n assertThat(p.size, is(0.2f));\n // when some time has passed the particle should have a different size\n p.life -= 2.0f;\n pe.updateParticle(p, 2.0f, new Vector3f(), new Vector3f());\n assertThat(p.size, is(0.56f));\n // updating start-size should change the value\n pe.setStartSize(0.7f);\n // please note that there is no change in life here!\n pe.updateParticle(p, 0.0f, new Vector3f(), new Vector3f());\n assertThat(p.size, is(0.96000004f));\n // same goes for endSize\n pe.setEndSize(3.0f);\n pe.updateParticle(p, 0.0f, new Vector3f(), new Vector3f());\n assertThat(p.size, is(1.1600001f));\n }",
"public void postOpenInit() {\n logger = Logger.getLogger(Dataset.class);\n clear();\n for (DataPoint point : persistentData) {\n addPoint(point);\n }\n }",
"private static boolean testRemoveOldParticles() {\n\t\tparticles = new Particle[3];\n\t\tparticles[0] = new Particle();\n\t\tparticles[1] = new Particle();\n\t\tparticles[2] = new Particle();\n\t\tparticles[0].setAge(7);\n\t\tparticles[1].setAge(7);\n\t\tparticles[2].setAge(3);\n\t\tremoveOldParticles(6);\n\t\t\n\t\tif (particles[0] != null || particles[1] != null || particles[2].getAge() != 3) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false; \n\t}",
"public void prefetch () throws IOException {\n\t\t\tlong latestEpoch = -1;\n\t\t\t\tbyte[] latestEpochBytes = cloudBlockSnapshotStore.get(\"EpochCount\");\n\t\t\t\tif (latestEpochBytes == null) {\n\t\t\t\t\tif (debugPrintoutFlag) {\n\t\t\t\t\t\tSystem.out.println(\"Prefetcher thread gets interrupted, exit the main loop here\");\n\t\t\t\t\t}\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tlatestEpoch = ByteUtils.bytesToLong(latestEpochBytes);\n\t\t\t\tif (debugPrintoutFlag) {\n\t\t\t\t\tSystem.out.println(\"latestEpoch=\" + latestEpoch);\n\t\t\t\t}\n\t\t\t\t//byte[] myPrefetchedEpochBytes = blockDataStore.get(\"PrefetchedEpoch-\" + RockyController.nodeID);\n\t\t\t\t//if (myPrefetchedEpochBytes == null) {\n\t\t\t\t//\tblockDataStore.put(\"PrefetchedEpoch-\" + RockyController.nodeID, ByteUtils.longToBytes(myPrefetchedEpoch));\n\t\t\t\t//}\n\t\t\t\t//myPrefetchedEpoch = ByteUtils.bytesToLong(myPrefetchedEpochBytes);\n\t\t\tif (debugPrintoutFlag) { \n\t\t\t\tSystem.out.println(\"prefetchedEpoch=\" + RockyStorage.prefetchedEpoch);\n\t\t\t\tSystem.out.println(\"epochCnt=\" + epochCnt);\n\t\t\t}\n\t\t\tif (latestEpoch > RockyStorage.prefetchedEpoch) { // if I am nonOwner with nothing more to prefetch, I don't prefetch\n\t\t\t\t// Get all epoch bitmaps\n\t\t\t\t//List<BitSet> epochBitmapList = fetchNextEpochBitmaps(latestEpoch, myPrefetchedEpoch);\n\t\t\t\tList<BitSet> epochBitmapList = fetchNextEpochBitmaps(latestEpoch, RockyStorage.prefetchedEpoch);\n\t\t\t\t\n\t\t\t\t// Get a list of blockIDs to prefetch\n\t\t\t\tHashSet<Integer> blockIDList = getPrefetchBlockIDList(epochBitmapList);\n\t\t\t\n\t\t\t\tif (blockIDList != null) { // if blockIDList is null, we don't need to prefetch anything\n\t\t\t\t\t// Prefetch loop\n\t\t\t\t\tprefetchBlocks(this, blockIDList);\n\t\t\t\t\t\n\t\t\t\t\t// Update PrefetchedEpoch-<nodeID> on cloud and prefetchedEpoch\n\t\t\t\t\ttry {\n\t\t\t\t\t\tcloudBlockSnapshotStore.put(\"PrefetchedEpoch-\" + RockyController.nodeID, ByteUtils.longToBytes(latestEpoch));\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t\tprefetchedEpoch = latestEpoch;\n\t\t\t\t}\n\t\t\t}\t\n\t\t}",
"protected void updateLoading()\n {\n scheduled = false;\n\n if (!valid)\n return;\n\n while (loading.size() < numConnections) {\n updateActiveStats();\n\n final TileInfo tile;\n synchronized (toLoad) {\n if (toLoad.isEmpty())\n break;\n tile = toLoad.last();\n if (tile != null) {\n toLoad.remove(tile);\n }\n }\n if (tile == null) {\n break;\n }\n\n tile.state = TileInfoState.Loading;\n synchronized (loading) {\n if (!loading.add(tile)) {\n Log.w(\"RemoteTileFetcher\", \"Tile already loading: \" + tile.toString());\n }\n }\n\n if (debugMode)\n Log.d(\"RemoteTileFetcher\",\"Starting load of request: \" + tile.fetchInfo.urlReq);\n\n // Set up the fetching task\n tile.task = client.newCall(tile.fetchInfo.urlReq);\n\n if (tile.isLocal) {\n // Try reading the data in the background\n new CacheTask(this,tile).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR,(Void)null);\n } else {\n startFetch(tile);\n }\n }\n\n updateActiveStats();\n }",
"Particles particles();",
"@Override\n\tpublic void trainLocal() throws Exception {\n\t\tdouble [][] input = parameters.getInput();\n\t\tdouble [][] result = ann.getResults(parameters);\n\t\tif (state == preTraining) {//in this case, it is running in the pre-training mode.\n\t\t\tinput = newInput;\n\t\t\tresult = newInput;\n\t\t}\n\t\terr = 0; \n\t\tfor (int i = 0; i < mb; i++) {\t\n\t\t\tif (pos > input.length - 1) {\n\t\t\t\tpos = 0;\n\t\t\t}\n\t\t\terr = err + ann.runEpoch(input[pos], pos, result[pos], parameters);\n\t\t\tpos++;\n\t\t}\n\t}",
"public void update(){\n\t\tfor(ParticleEffect effect : effects){\n\t\t\teffect.update();\n\t\t}\n\t}",
"private synchronized void update() {\n int numberOfPoints = buffer.get(0).size();\n if (numberOfPoints == 0) return;\n\n for (int i = 0; i < getNumberOfSeries(); i++) {\n final List<Double> bufferSeries = buffer.get(i);\n final List<Double> dataSeries = data.get(i);\n dataSeries.clear();\n dataSeries.addAll(bufferSeries);\n bufferSeries.clear();\n }\n\n //D.info(SineSignalGenerator.this, \"Update triggered, ready: \" + getNumberOfSeries() + \" series, each: \" + data[0].length + \" points\");\n bufferIdx = 0;\n\n // Don't want to create event, just \"ping\" listeners\n setDataReady(true);\n setDataReady(false);\n }",
"@Override\n \tpublic void update() {\n \t\tif (!constructing) {\n \t\t\t// not constructing means the pellet is still traveling through\n \t\t\t// space\n \n \t\t\t// move the pellet\n \t\t\tVector3f.add(pos, vel, pos);\n \n \t\t\t// if it's too old, kill it\n \t\t\tif (Main.timer.getTime() - birthday > 5) {\n \t\t\t\talive = false;\n \t\t\t} else {\n \t\t\t\t// if the pellet is not dead yet, see if it intersected anything\n \n \t\t\t\t// did it hit another pellet?\n \t\t\t\tPellet neighbor_pellet = queryOtherPellets();\n \n \t\t\t\t// did it hit a line or plane?\n \t\t\t\tVector3f closest_point = queryScaffoldGeometry();\n \n \t\t\t\tif (neighbor_pellet != null) {\n \t\t\t\t\talive = false;\n \n\t\t\t\t\tif (neighbor_pellet == current_cycle.lastElement()){\n\t\t\t\t\t\tSystem.out.println(\"shot at same pellet\");\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\t\n \t\t\t\t\tif (!(neighbor_pellet instanceof PolygonPellet)) {\n \t\t\t\t\t\tMain.all_dead_pellets_in_world.add(neighbor_pellet);\n \t\t\t\t\t\tneighbor_pellet = new PolygonPellet(neighbor_pellet);\n \t\t\t\t\t\tMain.new_pellets_to_add_to_world.add(neighbor_pellet);\n \t\t\t\t\t}\n \n \t\t\t\t\t// if neighbor pellet's class is not PolygonPellet...\n \t\t\t\t\t// neighbor_pellet = new PolygonPellet(neighbor_pellet)\n \t\t\t\t\t// copy the position and stuff from the line/plane\n \t\t\t\t\t// pellet into the new polygon pellet\n \t\t\t\t\t// then go and add it to this cycle\n \t\t\t\t\t// hopefully it changes in the actual array of world\n \t\t\t\t\t// pellets\n \t\t\t\t\t// if not, remove that pellet from all world pelelts and\n \t\t\t\t\t// then add the new one to the end\n \n \t\t\t\t\tcurrent_cycle.add((PolygonPellet) neighbor_pellet);\n \t\t\t\t\tif (current_cycle.size() > 1) {\n \t\t\t\t\t\tmakeLine();\n \t\t\t\t\t}\n \n \t\t\t\t\tif (current_cycle.size() > 2\n \t\t\t\t\t\t\t&& current_cycle.get(0) == current_cycle\n \t\t\t\t\t\t\t\t\t.get(current_cycle.size() - 1)) {\n \t\t\t\t\t\tmakePolygon();\n \t\t\t\t\t} else {\n \t\t\t\t\t\tActionTracker.newPolygonPellet(this);\n \t\t\t\t\t}\n \n \t\t\t\t} else if (closest_point != null) {\n \t\t\t\t\tSystem.out.println(\"pellet stuck to some geometry\");\n \t\t\t\t\tconstructing = true;\n \n \t\t\t\t\tpos.set(closest_point);\n \n \t\t\t\t\tif (CONNECT_TO_PREVIOUS)\n \t\t\t\t\t\tcurrent_cycle.add(this);\n \n \t\t\t\t\tif (CONNECT_TO_PREVIOUS && current_cycle.size() > 1) {\n \t\t\t\t\t\tmakeLine();\n \t\t\t\t\t}\n \n \t\t\t\t\tif (current_cycle.size() > 2\n \t\t\t\t\t\t\t&& current_cycle.get(0) == current_cycle\n \t\t\t\t\t\t\t\t\t.get(current_cycle.size() - 1))\n \t\t\t\t\t\tmakePolygon();\n \t\t\t\t} else if (Main.draw_points) {\n \t\t\t\t\t// if it's not dead yet and also didn't hit a\n \t\t\t\t\t// neighboring\n \t\t\t\t\t// pellet, look for nearby points in model\n \t\t\t\t\tint neighbors = queryKdTree(pos.x, pos.y, pos.z, radius);\n \n \t\t\t\t\t// is it near some points?!\n \t\t\t\t\tif (neighbors > 0) {\n \t\t\t\t\t\tconstructing = true;\n \t\t\t\t\t\tsetInPlace();\n \n \t\t\t\t\t\tsnapToCenterOfPoints();\n \n \t\t\t\t\t\tif (CONNECT_TO_PREVIOUS)\n \t\t\t\t\t\t\tcurrent_cycle.add(this);\n \n \t\t\t\t\t\tif (CONNECT_TO_PREVIOUS && current_cycle.size() > 1) {\n \t\t\t\t\t\t\tmakeLine();\n \t\t\t\t\t\t}\n \t\t\t\t\t}\n \t\t\t\t}\n \n \t\t\t\tif (current_cycle.size() > 0)\n \t\t\t\t\tcurrent_cycle.get(0).setAsFirstInCycle();\n \n \t\t\t\tif (constructing == true) {\n \t\t\t\t\tActionTracker.newPolygonPellet(this);\n \t\t\t\t}\n \t\t\t}\n \t\t} else {\n \t\t\t// the pellet has stuck... here we just give it a nice growing\n \t\t\t// bubble animation\n \t\t\tif (radius < max_radius) {\n \t\t\t\tradius *= 1.1;\n \t\t\t}\n \t\t}\n \t}",
"public void updateWorld() {\n\t\t/*\n\t\t * The particles are created during the simulation, this prevents some strange behaviors\n\t\t * that rises when all the particles are added at the start of a simulation, for example \n\t\t * the it was noticed that the random generation for the position followed some sort of pattern\n\t\t * and this influenced the formation the DLA cluster, resulting in an unxpected formation\n\t\t * */\n\t\tif( elements < getInitialParticleNumber() ){\n\t\t\tcreateParticleOutsideOfBB();\t\t\n\t\t\telements++;\n\t\t}\n\t\t//now for the each particles that are still floating a movement update is made,\n\t\t//according to the type of movement\n\t\tfor(int i=0; i<particleCollection.size(); i++){\n\t\t\tif( particleCollection.get(i).isFloating() == false ){\n\t\t\t\tparticleCollection.remove(i);\n\t\t\t}\n\t\t\t//If the particle has gone outside of the boundaries then \n\t\t\t//a new one is created to replace it, this can happen only if the movementType is 2 or 3 (balistic or square spiral)\n\t\t\telse if( particleCollection.get(i).isOutsideOfTheWorld() == true ){\n\t\t\t\tparticleCollection.remove(i);\n\t\t\t\tcreateParticleOutsideOfBB();\n\t\t\t}\n\t\t\telse{\n\t\t\t\tswitch(movementType){\n\t\t\t\tcase 0:\n\t\t\t\t\t/*\n\t\t\t\t\t * each movement method return a boolean if it's false it mean that the particle ha moved and\n\t\t\t\t\t * the collided to the cluster and so the static particle counter il incremented by one\n\t\t\t\t\t * */\n\t\t\t\t\tif( particleCollection.get(i).snowFlakeFallMove() == false ){\n\t\t\t\t\t\tcollisionIteration.add(new Integer(particleCollection.get(i).getIterationNumber()));\n\t\t\t\t\t\tupdateBB(i);\n\t\t\t\t\t\tstaticParticles++;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 1: \n\t\t\t\t\tif( particleCollection.get(i).randomMove() == false ){\n\t\t\t\t\t\tcollisionIteration.add(new Integer(particleCollection.get(i).getIterationNumber()));\n\t\t\t\t\t\tupdateBB(i);\n\t\t\t\t\t\tstaticParticles++;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\tif( particleCollection.get(i).straightMove() == false ){\n\t\t\t\t\t\tcollisionIteration.add(new Integer(particleCollection.get(i).getIterationNumber()));\n\t\t\t\t\t\tupdateBB(i);\n\t\t\t\t\t\tstaticParticles++;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\tif( particleCollection.get(i).squareSpiralMove() == false ){\n\t\t\t\t\t\tcollisionIteration.add(new Integer(particleCollection.get(i).getIterationNumber()));\n\t\t\t\t\t\tupdateBB(i);\n\t\t\t\t\t\tstaticParticles++;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public void drawParticles() {}",
"private void updatePhysics() {\n long now = System.currentTimeMillis();\n // Do nothing if mLastTime is in the future.\n // This allows the game-start to delay the start of the physics\n // by 100ms or whatever.\n if (mLastTime > now) return;\n int n = particles.length;\n tree.clear();\n for (int i = 0; i < n; i++) {\n tree.insert(particles[i]);\n }\n // Determine if there are any collisions\n // http://www.kirupa.com/developer/actionscript/multiple_collision2.htm\n for (int i = 0; i < n; i++) {\n \tparticles[i].update(now);\n \tparticles[i].disappearsFromEdge(canvasWidth, canvasHeight);\n\t\t\tSet<Particle> nearBy = tree.retrieve(particles[i]);\n\t\t\tfor (Particle particle : nearBy) {\n\t\t\t\tif (particle != particles[i])\n\t\t\t\t\tparticles[i].collidesWith(particle);\n\t\t\t}\n }\n }",
"private static void updateParticle(int index) {\n\n\t\tfloat posX = particles[index].getPositionX(); // Current X position of the particle\n\t\tfloat posY = particles[index].getPositionY(); // Current Y position of the particle\n\t\tfloat vX = particles[index].getVelocityX(); // Current horizontal velocity of the particle\n\t\tfloat vY = particles[index].getVelocityY();\t// Current vertical velocity of the particle\n\t\tint age = particles[index].getAge();\t// Current age of the particle\n\t\t\n\t\t// Fill the circle's color and transparency\n\t\tUtility.fill(particles[index].getColor(), particles[index].getTransparency());\n\t\t\n\t\t// Draw the circle\n\t\tUtility.circle(posX, posY, particles[index].getSize());\n\t\t\n\t\t// Update vertical velocity effected by gravity\n\t\tvY = vY + 0.3f;\n\t\t// Update the particle's vertical velocity, XY positions and its age\n\t\tparticles[index].setVelocityY(vY);\n\t\tparticles[index].setPositionX(posX + vX);\n\t\tparticles[index].setPositionY(posY + vY);\n\t\tparticles[index].setAge(age + 1);\n\t\t\n\t\t// Call this method to remove the old particles\n\t\tremoveOldParticles(80);\n\t\t\n\n\t}",
"protected void updateLoadTime() {\r\n\t\tthis.loadTime = new Timestamp(System.currentTimeMillis());\r\n\t}",
"@Override\r\n\tpublic void onUpdate()\r\n {\r\n \t//update pos\r\n\t\tthis.prevPosX = this.posX;\r\n this.prevPosY = this.posY;\r\n this.prevPosZ = this.posZ;\r\n \r\n if(host != null)\r\n {\r\n \tupdateHostPosition();\r\n }\r\n \r\n //fade state\r\n switch (this.fadeState)\r\n {\r\n case 0: //fade in\r\n \tthis.fadeTick++;\r\n \tthis.particleAlpha = this.fadeTick * 0.2F;\r\n \t\r\n \tif (this.fadeTick > 5) this.fadeState = 1;\r\n \tbreak;\r\n case 1: //age++\r\n \tthis.playSpeedCount += this.playSpeed;\r\n \tthis.particleAge = this.frameSize * (int)this.playSpeedCount;\r\n \tthis.particleAlpha = 1F;\r\n \tbreak;\r\n case 2: //fade out\r\n \tthis.fadeTick--;\r\n \tthis.particleAlpha = this.fadeTick * 0.2F;\r\n \t\r\n \tif (this.fadeTick < 1)\r\n \t{\r\n \t\tthis.setExpired();\r\n \t\treturn;\r\n \t}\r\n \tbreak;\r\n \tdefault:\r\n \t\tthis.setExpired();\r\n \t\treturn;\r\n }\r\n \r\n //stay at last frame\r\n if (this.particleAge >= particleMaxAge)\r\n {\r\n \t\tthis.particleAge = this.particleMaxAge;\r\n \t\t\r\n \t\t//count stay ticks\r\n \t\tif (this.stayTickCount > this.stayTick)\r\n \t\t{\r\n \t\t\tthis.particleAge = this.particleMaxAge + 1; //next loop flag\r\n \t\t\tthis.stayTickCount = 0;\r\n \t\t}\r\n \t\telse\r\n \t\t{\r\n \t\t\tthis.stayTickCount += 1;\r\n \t\t}\r\n \t}\r\n\r\n //loop play\r\n if (this.particleAge > this.particleMaxAge)\r\n {\r\n \t//loop times--\r\n \tif (--this.playTimes <= 0)\r\n \t{\r\n \t\tthis.fadeState = 2; //change to fade out\r\n \t}\r\n \telse\r\n \t{\r\n \t\tthis.particleAge = 0;\r\n \t\tthis.playSpeedCount = 0F;\r\n \t}\r\n }\r\n }",
"private void preloadData()\n {\n ICardinality cardinality = newCardinality();\n\n byte[] scratchBytes = new byte[8];\n ByteBuffer scratch = ByteBuffer.wrap(scratchBytes);\n long numToFlush;\n int lastFlushed = 0;\n long lastLogged = System.currentTimeMillis();\n long maxBytesToInsert = (long) datasetSizeGB << 30;\n long bytesInserted = 0;\n int i = 0;\n\n logger.info(\"Inserting up to {}\", FBUtilities.prettyPrintMemory(maxBytesToInsert));\n\n try\n {\n while(bytesInserted < maxBytesToInsert)\n {\n scratch.clear();\n scratch.putLong(0, i);\n long hash = MurmurHash.hash64(scratchBytes, scratchBytes.length);\n cardinality.offerHashed(hash);\n\n counters.numInserted.incrementAndGet();\n bytesInserted += valueSize;\n\n i++;\n if (i == maxKey)\n i = 0;\n\n if (System.currentTimeMillis()- lastLogged >= TimeUnit.SECONDS.toMillis(1))\n {\n lastLogged = System.currentTimeMillis();\n logger.debug(\"Ins: {}, keys: {}, live sstables: {}, compacting: {}, pending compactions: {}\",\n FBUtilities.prettyPrintMemory(bytesInserted),\n i,\n dataTracker.getLiveSSTables().size(),\n dataTracker.getCompacting().size(),\n compactions.size() + strategy.getEstimatedRemainingTasks());\n }\n\n if (i >= (lastFlushed + uniqueKeysPerSStable) && // no point in checking the cardinality until we've inserted uniqueKeysPerSStable more entries\n (numToFlush = cardinality.cardinality()) >= uniqueKeysPerSStable)\n {\n counters.numFlushed.addAndGet(numToFlush);\n lastFlushed = i;\n generateSSTables(cardinality, numToFlush, partitioner.getMinimumToken(), partitioner.getMaximumToken(), \"preload\", true);\n\n cardinality = newCardinality();\n }\n\n if (i % 1000 == 0 && state.get() == SimulationState.TEARING_DOWN)\n { // this happens if the compaction threads fail\n logger.debug(\"Interrupting preload, simulation is tearing down\");\n break;\n }\n }\n\n if ((numToFlush = cardinality.cardinality()) > 0)\n {\n counters.numFlushed.addAndGet(numToFlush);\n generateSSTables(cardinality, numToFlush, partitioner.getMinimumToken(), partitioner.getMaximumToken(), \"preload\", true);\n }\n }\n catch (Exception e)\n {\n logger.error(\"Exception happen during preloading\", e);\n }\n }",
"public static void tick() {\n try {\n getActiveParticles().stream().filter((p) -> (p != null)).filter((p) -> (p.active)).forEach((p) -> {\n p.tick();\n });\n } catch (java.util.ConcurrentModificationException ex) {}\n }",
"@Override\n public void playStart(long epoch) {\n }",
"public void calc()\n\t\t\t\t\t\t{\n\t\t\t\t\t\tif(oldInfo.calcInfo!=null)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\toldInfo.calcInfo.calc();\n\t\t\t\t\t\t\toldInfo.calcInfo=null;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t//Filter particles\n\t\t\t\t\t\tfor(int id:oldInfo.keySet())\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\tParticleInfo pInfo=oldInfo.get(id);\n\t\t\t\t\t\t\tif(filter.acceptParticle(id, pInfo))\n\t\t\t\t\t\t\t\tnewInfo.put(id,pInfo);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}",
"void loadAll() {\n\t\tsynchronized (this) {\n\t\t\tif (isFullyLoaded) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tfor (Entry<Integer, Supplier<ChunkMeta<?>>> generator : ChunkMetaFactory.getInstance()\n\t\t\t\t\t.getEmptyChunkFunctions()) {\n\t\t\t\tChunkMeta<?> chunk = generator.getValue().get();\n\t\t\t\tchunk.setChunkCoord(this);\n\t\t\t\tchunk.setPluginID(generator.getKey());\n\t\t\t\ttry {\n\t\t\t\t\tchunk.populate();\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t// need to catch everything here, otherwise we block the main thread forever\n\t\t\t\t\t// once it tries to read this\n\t\t\t\t\tCivModCorePlugin.getInstance().getLogger().log(Level.SEVERE, \n\t\t\t\t\t\t\t\"Failed to load chunk data\", e);\n\t\t\t\t}\n\t\t\t\taddChunkMeta(chunk);\n\t\t\t}\n\t\t\tisFullyLoaded = true;\n\t\t\tthis.notifyAll();\n\t\t}\n\t}",
"boolean emitParticleMaybe(RenderState renderData, IParticle reusedParticle, PointF point, PointF vec);",
"public void reload()\r\n\t{\r\n\t\tmEntities.clear();\r\n\t\tmParticles.clear();\r\n\t\tStats.instance().setBananaLevel();\r\n\t\tloadBlocks();\r\n\t}",
"private void reloadData() throws IOException\n {\n /* Reload data from file, if it is modified after last scan */\n long mtime = loader.getModificationTime();\n if (mtime < lastKnownMtime) {\n return;\n }\n lastKnownMtime = mtime;\n\n InputStream in = loader.getInputStream();\n BufferedReader bin = new BufferedReader(new InputStreamReader(in));\n cache.clear();\n String line;\n while ((line = bin.readLine()) != null) {\n try {\n Map<String, Object> tuple = reader.readValue(line);\n updateLookupCache(tuple);\n } catch (JsonProcessingException parseExp) {\n logger.info(\"Unable to parse line {}\", line);\n }\n }\n IOUtils.closeQuietly(bin);\n IOUtils.closeQuietly(in);\n }",
"public void update() {\n\t\tif (c.getResamplingFactor() != 1) return;\n\t\trenderer.getVolume().updateData();\n\t}",
"public void enqueue ()\n {\n // update the transform state if necessary\n if (_ownTransformState) {\n _parentViewTransform.compose(_config.transform, _transformState.getModelview());\n _transformState.setDirty(true);\n }\n\n // sort by depth if so required (TODO: radix or incremental sort?)\n ParticleSystemConfig.Layer psconfig = (ParticleSystemConfig.Layer)_config;\n if (psconfig.depthSort) {\n Transform3D xform = _transformState.getModelview();\n for (int ii = 0, nn = _living.value; ii < nn; ii++) {\n Particle particle = _particles[ii];\n particle.depth = xform.transformPointZ(particle.getPosition());\n }\n QuickSort.sort(_particles, 0, _living.value - 1, DEPTH_COMP);\n }\n\n // update the center if necessary\n GroupPriority priorityMode = psconfig.priorityMode;\n if (priorityMode != null) {\n Box bounds = ((ParticleSystem)_parentScope).getGroupBounds(priorityMode.group);\n bounds.getCenter(_center);\n Transform3D xform = _ctx.getCompositor().getCamera().getWorldTransform();\n xform.getRotation().transformUnitZ(_vector).multLocal(\n priorityMode.priority * 0.0001f);\n pointToLayer(_center.addLocal(_vector), false);\n }\n }",
"synchronized public void flush() {\n \t\tp = null;\n \t\tp_layer = null;\n \t\tn_points = -1; // flag that points exist but are not loaded\n \t}",
"public static void setup() {\n\t\ttestUpdateParticle();\n\t\ttestRemoveOldParticles();\n\t\t\n\t\tif (testUpdateParticle() == true || testRemoveOldParticles() == true) {\n\t\t\tSystem.out.println(\"FAILED\");\n\t\t}\n\t\t\n\t\t// Build a new random field.\n\t\trandGen = new Random();\n\n\t\tpositionX = 400; // middle of the screen (left to right): 400\n\t\tpositionY = 300; // middle of the screen (top to bottom): 300\n\t\tstartColor = Utility.color(23, 141, 235); // blue: Utility.color(23,141,235)\n\t\tendColor = Utility.color(23, 200, 255); // lighter blue: Utility.color(23,200,255)\n\t\t\n\t\t// This array can store 800 particles\n\t\tparticles = new Particle[800];\n\n\t}",
"void onLocationChanged()\n\t{\n\t\tgetLoaderManager().restartLoader(FORECAST_LOADER_ID, null, this);\n\t}",
"public void onLivingUpdate() {\n if (!this.onGround && this.motionY < 0.0D)\n this.motionY *= 0.6D;\n\n\n if (this.ticksExisted % 20 == 0 && this.getHealth() != this.getMaxHealth() && this.getHealth() >= 1)\n this.setHealth(this.getHealth() + 1);\n\n if (worldObj.isRemote) {\n if (this.isSitting())\n worldObj.spawnParticle(EnumParticleTypes.REDSTONE, posX, posY + 1.5, posZ, 0, 0, 0);\n }\n\n if (worldObj.isRemote) {\n MoWitchAndWizard.proxy.spawnParticles(\"air_normal\", this);\n }\n\n super.onLivingUpdate();\n }",
"public void reload(boolean training) {\n if (training) {\n this.train = getTrainingIterator();\n } else {\n this.test = getTestingIterator();\n }\n }",
"@Override\r\n public void update(\r\n ) {\r\n \tsuper.update();\r\n \t\r\n\t\tString activeLoading = mLoadingScene;\r\n\t\tif ( (activeLoading != null) && (mActiveElement != null) ) {\r\n\t \tmUpdateCounter += 1;\r\n\t if ( mUpdateCounter == 10 ) {\r\n\t \tStringBuilder aBuffer = new StringBuilder( 256 );\r\n\t \taBuffer.append( \"** LOADING ==> \" )\r\n\t \t .append( activeLoading )\r\n\t \t .append( \" -- \" );\r\n\t \tmActiveElement.reportStatus( aBuffer, false );\r\n\t \t\r\n\t\t\t\tCSGTestDriver.postText( this, mTextDisplay, aBuffer.toString(), false );\r\n\t mUpdateCounter = 0;\r\n\t }\r\n\t\t}\t\r\n \tif ( mLoadedSpatial != null ) {\r\n \t\tattachLoadedSpatial( mLoadedSpatial );\r\n \t\tmLoadedSpatial = null;\r\n \t}\r\n }",
"public void update()\n {\n // start from the bottom of the world\n\n for (int y = height - 1; y >= 0; --y)\n {\n // compute offset to this and next line\n\n int thisOffset = y * width;\n \n // are we at top or bottom?\n\n boolean atTop = y == 0;\n boolean atBot = y == height - 1;\n\n // process line in random order\n \n for (int x: xRndIndex[rnd.nextInt(RND_INDEX_CNT)])\n {\n // index of this pixel\n \n int ip = thisOffset + x;\n \n // value of this pixel\n\n int p = pixels[ip];\n\n // don't process inert matter\n\n if (p == AIR || p == ROCK || p == EARTH)\n continue;\n\n // are we on a left or right edge?\n\n boolean atLeft = x == 0;\n boolean atRight = x == width - 1;\n\n // indices of pixels around this particle\n\n int iuc = ip - width;\n int idc = ip + width;\n int idl = idc - 1;\n int idr = idc + 1;\n int il = ip - 1;\n int ir = ip + 1;\n\n // get pixels for each index\n\n int uc = atTop ? ROCK : pixels[iuc];\n int dc = atBot ? ROCK : pixels[idc];\n int dl = atBot || atLeft ? ROCK : pixels[idl];\n int dr = atBot || atRight ? ROCK : pixels[idr];\n int l = atLeft ? ROCK : pixels[il];\n int r = atRight ? ROCK : pixels[ir];\n \n // the following actions propogate elements around the\n // world, they do not conserve matter\n\n // if fire, propogate fire\n\n if (p == FIRE1 || p == FIRE2 || p == FIRE3 || \n p == FIRE4 || p == FIRE5 || p == FIRE6)\n {\n int[] burn = {atLeft ? ip : il,\n atRight ? ip : ir,\n atTop ? ip : iuc,\n atBot ? ip : idc};\n\n\n for (int ib: burn)\n {\n int b = pixels[ib];\n\t\t\t\t\t \n\t\t\t\t\t // fire burns plants and oil, makes steam out of water\n\t\t\t\t\t \n if ((b == PLANT || b == OIL || b == COLUMBINE) &&\n rnd.nextInt(FIRE_CHANCE_IN) == 0)\n pixels[ib] = FIRE1;\n else\n if (b == WATER)\n {\n pixels[ib] = STEAM;\n pixels[ip] = STEAM;\n\t\t\t\t\t\t pixels[iuc] = STEAM;\n p = STEAM;\n break;\n }\n }\n // move fire along\n\n if (p == FIRE1)\n {\n pixels[ip] = FIRE3;\n continue;\n }\n if (p == FIRE2)\n {\n pixels[ip] = FIRE3;\n continue;\n }\n if (p == FIRE3)\n {\n pixels[ip] = FIRE4;\n continue;\n }\n if (p == FIRE4)\n {\n pixels[ip] = FIRE5;\n continue;\n }\n if (p == FIRE5)\n {\n pixels[ip] = FIRE6;\n continue;\n }\n if (p == FIRE6)\n {\n pixels[ip] = AIR;\n continue;\n }\n }\n // if this is steam, evaporate into air\n\n if (p == STEAM)\n { pixels[ip] = AIR;\n continue;\n\t\t\t }\n\n // if this is an everything sucker\n\n if (p == AIR_SOURCE)\n {\n int[] targets = {atLeft ? ip : il,\n atRight ? ip : ir,\n atTop ? ip : iuc,\n atBot ? ip : idc};\n for (int it: targets)\n pixels[it] = AIR;\n continue;\n }\n // if this is a water source\n\n if (p == WATER_SOURCE)\n {\n int[] targets = {atLeft ? ip : il,\n atRight ? ip : ir,\n atTop ? ip : iuc,\n atBot ? ip : idc};\n for (int it: targets)\n if (pixels[it] == AIR &&\n rnd.nextInt(WATER_CHANCE_IN) == 0)\n pixels[it] = WATER;\n continue;\n }\n // if this is a fire source\n\n if (p == OIL_SOURCE)\n {\n int[] targets = {atRight ? ip : ir,\n atLeft ? ip : il,\n atTop ? ip : iuc,\n atBot ? ip : idc};\n for (int it: targets)\n if (pixels[it] == AIR)\n pixels[it] = OIL;\n continue;\n }\n // if this is a sand source\n\n if (p == SAND_SOURCE)\n {\n int[] targets = {atLeft ? ip : il,\n atRight ? ip : ir,\n atTop ? ip : iuc,\n atBot ? ip : idc};\n for (int it: targets)\n if (pixels[it] == AIR &&\n rnd.nextInt(SAND_CHANCE_IN) == 0)\n pixels[it] = SAND;\n continue;\n }\n // if this is a plant, propogate growth\n\n if (p == PLANT)\n {\n\n int iul = iuc - 1;\n int iur = iuc + 1;\n\n int[] targets = {atLeft ? ip : il,\n atLeft || atTop ? ip : iul,\n atRight ? ip : ir,\n atRight || atTop ? ip : iur,\n atTop ? ip : iuc,\n atBot ? ip : idc,\n atBot || atLeft ? ip : idl,\n atBot || atRight ? ip : idr,\n };\n\t\t\t\t if (pixels[idl] == PLANT && pixels[idc] == PLANT && \n\t\t\t\t pixels[idr] == PLANT && pixels[ir] == PLANT && \n\t\t\t\t\t pixels[il] == PLANT && pixels[iuc] == WATER)\n\t\t\t\t\t pixels[ip] = COLUMBINE;\n for (int ix: targets)\n if (pixels[ix] == AIR)\n for (int it: targets)\n if (pixels[it] == WATER && rnd.nextInt(PLANT_CHANCE_IN) == 0)\n pixels[it] = PLANT;\n\t\t\t\t continue;\n }\n // if this is a flower\n\n if (p == COLUMBINE)\n\t\t\t {\n\t\t\t continue;\n\t\t\t }\n // if this is a fire source\n\n if (p == FIRE_SOURCE)\n {\n int[] targets = {atLeft ? ip : il,\n atRight ? ip : ir,\n atTop ? ip : iuc,\n atBot ? ip : idc};\n for (int it: targets)\n if (pixels[it] == PLANT || pixels[it] == OIL)\n pixels[it] = FIRE1;\n continue;\n }\n // all actions from this point on conserve matter\n // we only calculate the place to which this particle\n // will move, the the default is to do nothing\n\n int dest = NO_CHANGE;\n \n // if it's a oil\n\n if (p == OIL)\n {\n // compute indices for up left and up right\n\n int iul = iuc - 1;\n int iur = iuc + 1;\n\n // get pixels for each index\n\n int ul = atTop || atLeft ? ROCK : pixels[iul];\n int ur = atTop || atRight ? ROCK : pixels[iur];\n\n // if there is sand/earth above, erode that\n\n if (uc == EARTH || uc == SAND)\n dest = iuc; \n\n // if pixles up left and up right sand/water\n\n else if ((ul == EARTH || ul == SAND) && \n (ur == EARTH || ur == SAND))\n dest = rnd.nextBoolean() ? iul : iur;\n\n // if air underneath, go down\n \n else if (dc == AIR)\n dest = idc;\n \n // if air on both sides below, pick one\n\n else if (dl == AIR && dr == AIR)\n dest = rnd.nextBoolean() ? idl : idr;\n\n // if air only down left, go left\n\n else if (dl == AIR)\n dest = idl;\n\n // if air only down right, go right\n\n else if (dr == AIR)\n dest = idr;\n\n // if air on both sides below, pick one\n\n else if ((l == AIR || l == EARTH || l == SAND) &&\n (r == AIR || r == EARTH || r == SAND))\n dest = rnd.nextBoolean() ? il : ir;\n\n // if air only down left, go left\n\n else if (l == AIR || l == EARTH || l == SAND)\n dest = il;\n\n // if air only down right, go right\n\n else if (r == AIR || r == EARTH || r == SAND)\n dest = ir;\n\n // the case where water flows out two pixels\n \n else\n {\n // get items 2 pixels on either side of this one\n\n int ill = ip - 2;\n int irr = ip + 2;\n int ll = x < 2 ? ROCK : pixels[ill];\n int rr = x > width - 3 ? ROCK : pixels[irr];\n\n // if air on both sides, pick one\n\n if (ll == AIR && rr == AIR)\n dest = rnd.nextBoolean() ? irr : ill;\n \n // if air only right right, go right right\n \n else if (rr == AIR)\n dest = irr;\n \n // if air only left left, go left left\n\n else if (ll == AIR)\n dest = ill;\n }\n }\n // if it's water\n\n else if (p == WATER)\n {\n // compute indices for up left and up right\n\n int iul = iuc - 1;\n int iur = iuc + 1;\n\n // get pixels for each index\n\n int ul = atTop || atLeft ? ROCK : pixels[iul];\n int ur = atTop || atRight ? ROCK : pixels[iur];\n\n // if there is sand/earth above, erode that\n\n if (uc == EARTH || uc == SAND)\n dest = iuc; \n\n // if pixles up left and up right sand/water\n\n else if ((ul == EARTH || ul == SAND) && \n (ur == EARTH || ur == SAND))\n dest = rnd.nextBoolean() ? iul : iur;\n\n // if air underneath, go down\n \n else if (dc == AIR || dc == OIL)\n dest = idc;\n\n // if air on both sides below, pick one\n\n else if ((dl == AIR || dl == OIL) && (dr == AIR || dr == OIL))\n dest = rnd.nextBoolean() ? idl : idr;\n\n // if air only down left, go left\n\n else if (dl == AIR || dl == OIL)\n dest = idl;\n\n // if air only down right, go right\n\n else if (dr == AIR || dr == OIL)\n dest = idr;\n\n // if air on both sides below, pick one\n\n else if ((l == AIR || l == EARTH || l == SAND) &&\n (r == AIR || r == EARTH || r == SAND))\n dest = rnd.nextBoolean() ? il : ir;\n\n // if air only down left, go left\n\n else if (l == AIR || l == EARTH || l == SAND)\n dest = il;\n\n // if air only down right, go right\n\n else if (r == AIR || r == EARTH || r == SAND)\n dest = ir;\n\n // the case where water flows out two pixels\n \n else\n {\n // get items 2 pixels on either side of this one\n\n int ill = ip - 2;\n int irr = ip + 2;\n int ll = x < 2 ? ROCK : pixels[ill];\n int rr = x > width - 3 ? ROCK : pixels[irr];\n\n // if air on both sides, pick one\n\n if (ll == AIR && rr == AIR)\n dest = rnd.nextBoolean() ? irr : ill;\n \n // if air only right right, go right right\n \n else if (rr == AIR)\n dest = irr;\n \n // if air only left left, go left left\n\n else if (ll == AIR)\n dest = ill;\n }\n }\n // all other elements behave like sand\n\n else\n {\n // if air underneath, go down\n \n if (dc == AIR || dc == WATER)\n dest = idc;\n\n // if air on both sides below, pick one\n\n else if ((dl == AIR || dl == WATER) && \n (dr == AIR || dr == WATER))\n dest = rnd.nextBoolean() ? idl : idr;\n\n // if air only down left, go left\n\n else if (dl == AIR || dl == WATER)\n dest = idl;\n\n // if air only down right, go right\n\n else if (dr == AIR || dr == WATER)\n dest = idr;\n }\n // if a change is requried, swap pixles\n\n try\n {\n if (dest != NO_CHANGE)\n {\n if (pixels[ip] == WATER_SOURCE)\n out.println(\"swap1 WS & \" + Element.lookup(pixels[dest]));\n if (pixels[dest] == WATER_SOURCE)\n out.println(\"swap2 WS & \" + Element.lookup(pixels[ip]));\n\n pixels[ip] = pixels[dest];\n pixels[dest] = p;\n }\n }\n catch (Exception ex)\n {\n ex.printStackTrace();\n out.println(\" X: \" + x);\n out.println(\" Y: \" + y);\n out.println(\"Source: \" + Element.lookup(p));\n out.println(\"Source: \" + Element.lookup(pixels[ip]));\n out.println(\" Dest: \" + Element.lookup(pixels[dest]));\n \n }\n }\n }\n }",
"public void checkParticles4Destruction(){\n\t\t\tif(System.nanoTime() - creationTime > 3*Math.pow(10, 9)){\n\t\t\t\t\n\t\t\t\twhile(!particles.isEmpty()){\n\t\t\t\t\tParticle p = particles.poll();\n\t\t\t\t\tp.destroy(); \n\t\t\t\t}\n\t\t\t}\n\t}",
"private synchronized void refresh() {\n \t\t\tlastChangeStamp = changeStamp;\n \t\t\tlastFeaturesChangeStamp = featuresChangeStamp;\n \t\t\tlastPluginsChangeStamp = pluginsChangeStamp;\n \t\t\tchangeStampIsValid = false;\n \t\t\tfeaturesChangeStampIsValid = false;\n \t\t\tpluginsChangeStampIsValid = false;\n \t\t\tfeatures = null;\n \t\t\tplugins = null;\n \t\t}",
"@Override\n \t\t\t\tpublic void doCreateLineParticle() {\n \n \t\t\t\t}",
"public void updateRunning(float delta) {\n\n\n EntityManager.update(delta);\n playerShip.update(delta);\n EnemySpawner.update();\n particleManager.update();\n\n }",
"private void loadPersistedData() {\n IntegerRange storedAutoStartOnDisconnectDelayRange =\n AUTOSTART_ON_DISCONNECT_DELAY_RANGE_SETTING.load(mDeviceDict);\n if (storedAutoStartOnDisconnectDelayRange != null) {\n mPilotingItf.getAutoStartOnDisconnectDelay().updateBounds(storedAutoStartOnDisconnectDelayRange);\n }\n\n DoubleRange endingHoveringAltitudeRange = ENDING_HOVERING_ALTITUDE_RANGE_SETTING.load(mDeviceDict);\n if (endingHoveringAltitudeRange != null) {\n mPilotingItf.getEndingHoveringAltitude().updateBounds(endingHoveringAltitudeRange);\n }\n\n DoubleRange minAltitudeRange = MIN_ALTITUDE_RANGE_SETTING.load(mDeviceDict);\n if (minAltitudeRange != null) {\n mPilotingItf.getMinAltitude().updateBounds(minAltitudeRange);\n }\n\n applyPresets();\n }",
"public void loaded(){\n\t\tloaded=true;\n\t}",
"void minecraftChunkLoaded() {\n\t\tthis.lastLoadingTime = System.currentTimeMillis();\n\t}",
"protected void preUpdate() {\n freeX = true;\n freeY = true;\n }",
"@Override\n\tpublic void refresh(){\n\t\tgetLoaderManager().restartLoader(0, null, this);\n\t}",
"public void updateSamples();",
"private void loadData() {\r\n titleProperty.set(TITLE);\r\n imageView.setImage(null);\r\n scrollPane.setContent(null);\r\n final Task<Void> finisher = new Task<Void>() {\r\n @Override\r\n protected Void call() throws Exception {\r\n Platform.runLater(new Runnable() {\r\n @Override\r\n public void run() {\r\n buffer = replay.politicalBuffer;\r\n output = new WritableImage(replay.bufferWidth, replay.bufferHeight);\r\n output.getPixelWriter().setPixels(0, 0, replay.bufferWidth, replay.bufferHeight, PixelFormat.getIntArgbPreInstance(), buffer, 0, replay.bufferWidth);\r\n progressBar.progressProperty().unbind();\r\n progressBar.setProgress(0);\r\n statusLabel.textProperty().unbind();\r\n statusLabel.setText(l10n(\"replay.map.loaded\"));\r\n scrollPane.setContent(null);\r\n imageView.setImage(output);\r\n scrollPane.setContent(imageView);\r\n int fitWidth = Integer.parseInt(settings.getProperty(\"map.fit.width\", \"0\"));\r\n int fitHeight = Integer.parseInt(settings.getProperty(\"map.fit.height\", \"0\"));\r\n imageView.setFitHeight(fitHeight);\r\n imageView.setFitWidth(fitWidth);\r\n lock.release();\r\n }\r\n });\r\n return null;\r\n }\r\n };\r\n progressBar.progressProperty().bind(finisher.progressProperty());\r\n statusLabel.textProperty().bind(finisher.titleProperty());\r\n replay.loadData(finisher);\r\n }",
"public void update(){\r\n\t\tthis.loadRecords();\r\n\t}",
"protected void initializeImpl(@NotNull final ParticleData particleData) {\n }",
"private void processMetadataFromLoader() {\n\n int recordCount = mdi.readInt();\n\n long currentTime = System.currentTimeMillis();\n synchronized (entities) {\n clearOldTempIndexes(currentTime);\n\n for (int i = 0; i < recordCount; i++) {\n int tempIndex = mdi.readInt();\n assert DirectProtocol.isValidTempIndex(tempIndex);\n String symbol = mdi.readCharSequence().toString().intern();\n\n ConstantIdentityKey key;\n int entityIndex = entities.get(symbol, NOT_FOUND_VALUE);\n if (entityIndex == NOT_FOUND_VALUE) {\n entityIndex = entities.size();\n key = new ConstantIdentityKey(symbol);\n entities.put(key, entityIndex);\n } else {\n key = entities.getKeyObject(symbol);\n }\n\n // Note: key is guarantied to be same object as in \"entities\" field\n tempIndexes.put(tempIndex, key);\n\n sendMetadata(symbol, entityIndex);\n }\n if (recordCount > 0) {\n lastTempIndexAdded = currentTime;\n }\n }\n }",
"private static void removeOldParticles(int maxAge) {\n\t\t// Track the whole array\n\t\tfor (int i = 0; i < particles.length; i++) {\n\t\t\t// If the particle is null reference, continue to track\n\t\t\tif (particles[i] == null) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t// If the particle's age is greater than 80\n\t\t\t// change it to a null reference\n\t\t\telse if (particles[i].getAge() > maxAge) {\n\t\t\t\tparticles[i] = null;\n\t\t\t}\n\t\t}\n\t}",
"protected void playParticle(){\n\t\teffectData.getPlayParticles().playParticles(effectData, effectData.getDisplayAt());\n\t}",
"public void requestTracksDataLoad() {\n getSupportLoaderManager().initLoader(TRACK_LOADER_INDEX, null, this).forceLoad();\n }",
"public void loadStart()\n {\n score = 0;\n clear();\n HashMap<Location, State> start = gm.start();\n for (Location add : start.keySet())\n addToBoard(add, start.get(add));\n }",
"public void update(float delta){\n\t\tint size = bloodActivePool.size;\n\t\twhile(--size >= 0){\n\t\t\tBlood b = bloodActivePool.get(size);\n\t\t\t\n\t\t\tb.update(delta);\n\t\t\t\n\t\t\tif(b.DEAD == true)\n\t\t\t{\n\t\t\t\tbloodActivePool.removeIndex(size);\n\t\t\t\tbloodPool.add(b);\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(SPLATTER_QUEUED){\n\t\t\tsplatter(Qx, Qy, Qcount);\n\t\t\tSPLATTER_QUEUED = false;\n\t\t}\n\t}",
"public void initOldStream() {\n ContextHolder.getInstance().setContext();\n if(oldStream == null) {\n /* try {\n oldStream = ContextHolder.getInstance().getOldStreamPool().borrowObject();\n } catch (Exception e) {\n oldStreamFromPool = false;\n oldStream = new cudaStream_t();\n JCuda.cudaStreamCreate(oldStream);\n\n }*/\n\n oldStreamFromPool = false;\n oldStream = new cudaStream_t();\n JCuda.cudaStreamCreate(oldStream);\n\n // oldEvent = new cudaEvent_t();\n // JCuda.cudaEventCreate(oldEvent);\n // oldEventDestroyed = false;\n }\n\n }",
"public List<SGenome> Epoch(List<SGenome> old_pop){\n m_vecPop = old_pop;\n\n //reset the appropriate variables\n Reset();\n\n //sort the population (for scaling and elitism)\n Collections.sort(m_vecPop);\n\n //calculate best, worst, average and total fitness\n CalculateBestWorstAvTot();\n\n //create a temporary vector to store new chromosones\n List <SGenome> vecNewPop = new ArrayList<>();\n\n //Now to add a little elitism we shall add in some copies of the\n //fittest genomes. Make sure we add an EVEN number or the roulette\n //wheel sampling will crash\n if ((CParams.iNumCopiesElite * CParams.iNumElite % 2)==0)\n {\n GrabNBest(CParams.iNumElite, CParams.iNumCopiesElite, vecNewPop);\n }\n\n\n //now we enter the GA loop\n\n //repeat until a new population is generated\n while (vecNewPop.size() < m_iPopSize)\n {\n //grab two chromosones\n SGenome mum = GetChromoRoulette();\n SGenome dad = GetChromoRoulette();\n\n //create some offspring via crossover\n List<Double> baby1 = new ArrayList<>();\n List<Double> baby2 = new ArrayList<>();\n\n CrossoverAtSplits(mum.vecWeights, dad.vecWeights, baby1, baby2);\n\n //now we mutate\n Mutate(baby1);\n Mutate(baby2);\n\n //now copy into vecNewPop population\n vecNewPop.add( new SGenome(baby1, 0) );\n vecNewPop.add( new SGenome(baby2, 0) );\n }\n\n //finished so assign new pop back into m_vecPop\n m_vecPop = vecNewPop;\n //FitnessScaleRank();\n return m_vecPop;\n }",
"private void reload() {\n if (running == false) {\n agentsOnSpawn = new String[][]{{\"random\", \"random\", \"random\"}, {\"random\", \"random\", \"random\"}, {\"random\", \"random\", \"random\"}};\n PlayerPanel.reset();\n playersAgentsMap.clear();\n agentList.clear();\n playerCount = 0;\n playerList.removeAll();\n iPlayerList.entrySet().forEach((pair) -> {\n IPlayer player = pair.getValue();\n try {\n player.setPoints(0);\n player.resetStrategy();\n addNewAgent(player, player.getStrategy());\n } catch (RemoteException ex) {\n Logger.getLogger(ServerFrame.class.getName()).log(Level.SEVERE, null, ex);\n }\n });\n\n }\n\n }",
"public void run() {\n\t\t\t \t \n\t\t\t \t test.load2();\n\t\t\t \t //System.out.println(\"heart beat report\"+System.currentTimeMillis());\n\t\t\t }",
"private void update() {\n setPieceType();\n initBackground(pieceIndex);\n }",
"void loadNext();",
"private void updateEpochNum() {\n\t\t// TODO Auto-generated method stub\n\t\tFile epCount = new File(VisualizerMain.experimentBaseLocation+\"/\"+VisualizerMain.selectedRun);\n\t\tFile[] list = epCount.listFiles();\n\t\tint count = 0;\n\t\tfor (File file : list){\n\t\t\tif (file.isDirectory())\n\t\t\t\tcount++;\n\t\t}\n\t\tSystem.out.println(\"Folder Count: \" + count);\n\t\tmaxEpoch = count-1;\n\t\tSpinnerNumberModel model1 = new SpinnerNumberModel(((Number)epochSelector.getValue()).intValue(), minEpoch, maxEpoch, 1); \n\t\tepochSelector.setModel(model1);\n\t}",
"public void nextTextureIndexX() {\n/* 245 */ this.particleTextureIndexX++;\n/* */ }",
"private void updateBackground() {\n\t\tif (World.getObjects().size() < numOfParticles) {\n\t\t\tfloat x = (float) (Math.random()\n\t\t\t\t\t* (Screen.getWidth() + LEDLogo.WIDTH * 2) - LEDLogo.WIDTH), y = (float) (Math\n\t\t\t\t\t.random() * (Screen.getHeight() + LEDLogo.HEIGHT * 2) - LEDLogo.HEIGHT);\n\t\t\tWorld.add(new LEDLogo(x, y, (float) Math.random() * 0.8f + 0.2f));\n\t\t}\n\t}",
"public void run()\n \t{\n \t\tTerrain t = ExplosionController.getInstance().t;\n \t\twhile (true)\n \t\t{\n \t\t\tsynchronized (collidables) \n \t\t\t{ \n \t\t\t\tfor (int i = collidables.size()-1; i >= 0; i--)\n \t\t\t\t{\n \t\t\t\t\tDrawable d = collidables.get(i);\n \t\t\t\t\t\n \t\t\t\t\td.v.y += GRAVITY;\n \t\t\t\t\t\n \t\t\t\t\td.p.x += d.v.x;\n \t\t\t\t\td.p.y += d.v.y;\n \t\t\t\t\n \t\t\t\t\tint iFromX = (int) (d.p.x / t.segmentWidth);\n \t\t\t\t\tint iFromPreviousX = (int) ((d.p.x-d.v.x) / t.segmentWidth);\n \t\t\t\t\t\n \t\t\t\t\tif(iFromX < 0 || iFromX >= t.points.length-1)\n \t\t\t\t\t{\n \t\t\t\t\t\td.removeFromGLEngine = true;\n \t\t\t\t\t\td.removeFromPhysicsEngine = true;\n \t\t\t\t\t}\n \t\t\t\t\telse\n \t\t\t\t\t{\n \t\t\t\t\t\tdouble percent = (d.p.x % t.segmentWidth) / t.segmentWidth;\n \t\t\t\t\t\tdouble landYatX = t.points[iFromX] + (t.points[iFromX + 1] - t.points[iFromX]) * percent;\n \t\t\t\t\t\t\n \t\t\t\t\t\tif(d.p.y > landYatX)\n \t\t\t\t\t\t{\n \t\t\t\t\t\t\tcontinue;\n \t\t\t\t\t\t}\n \t\t\t\n \t\t\t\t\t\tint minIndex = iFromX;\n \t\t\t\t\t\tint maxIndex = iFromPreviousX;\n \t\t\t\t\t\tif(minIndex > maxIndex)\n \t\t\t\t\t\t{\n \t\t\t\t\t\t\tint temp = minIndex;\n \t\t\t\t\t\t\tminIndex = maxIndex;\n \t\t\t\t\t\t\tmaxIndex = temp;\n \t\t\t\t\t\t}\n \t\t\t\t\t\t\n \t\t\t\t\t\tfor(int s = minIndex; s <= maxIndex; s++)\n \t\t\t\t\t\t{\n \t\t\t\t\t\t\tfloat xFromIndex = s*t.segmentWidth;\n \t\t\t\t\t\t\tfloat xFromNextIndex = (s+1)*t.segmentWidth;\n \t\t\t\t\t\t\tfloat[] intersect = lineIntersect(d.p.x-d.v.x, d.p.y-d.v.y, d.p.x, d.p.y, xFromIndex, t.points[s], xFromNextIndex, t.points[s+1], t.previousPoints[s], t.previousPoints[s+1]);\n \t\t\t\t\t\t\tif(intersect != null)\n \t\t\t\t\t\t\t{\n \t\t\t\t\t\t\t\td.intersectTerrain(intersect[0], intersect[1]);\n \t\t\t\t\t\t\t\tbreak;\n \t\t\t\t\t\t\t}\n \t\t\t\t\t\t}\n \t\t\t\t\t}\n \t\t\t\t\t\n \t\t\t\t\tif(d.removeFromPhysicsEngine)\n \t\t\t\t\t{\n \t\t\t\t\t\tcollidables.remove(i);\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t}\n \t\t\t\n \t\t\tt.update();\n \t\t\t\n \t\t\ttry\n \t\t\t{\n \t\t\t\tThread.currentThread().sleep(20);\n \t\t\t} \n \t\t\tcatch (InterruptedException e)\n \t\t\t{\n \t\t\t\te.printStackTrace();\n \t\t\t}\n \t\t}\n \t}",
"public void updateLives() {\r\n\r\n\t\tif (enhanced == true && (numScore >= 4000 && numLiveUpdated == 0) || (numScore >= 8000 && numLiveUpdated == 1)\r\n\t\t\t\t|| (numScore >= 12000 && numLiveUpdated == 2)) {\r\n\t\t\tlives += 1;\r\n\t\t\tnumLiveUpdated += 1;\r\n\t\t}\r\n\r\n\t}",
"public void update(){\n\t\tint lasers[] = new int[activePointers()];\n\t\tPVector positions[] = new PVector[activePointers()];\n\t\tfor (int i = 0; i < activePointers(); i++) {\n\t\t\tpositions[i].set(parent.mouseX,parent.mouseY);\n\t\t\tlasers[i] = pointers.get(i).laser;\n\t\t}\n\n\t\tupdate( positions, lasers);\n\t}",
"protected void firstInitializeImpl(@NotNull final ParticleData particleData) {\n }",
"private void loadingPhase() {\n try { Thread.sleep(10000); } catch(InterruptedException e) { return; }\n ClickObserver.getInstance().setTerrainFlag(\"\");\n }",
"protected void updateImpl(@NotNull final ParticleData particleData, final float tpf) {\n\n }",
"private void init(int numberOfParticles, int dimensions) {\n MersenneTwisterFast mt = Utils.getMTInstance();\n double pos;\n double vel;\n \n Particle p = null;\n for (int i = 0; i < numberOfParticles; i++) {\n\n\n List<Double> tempPosition = new ArrayList<Double>(dimensions);\n List<Double> tempVelocity = new ArrayList<Double>(dimensions);\n for (int j = 0; j < dimensions; j++) {\n pos = this.getLowerBound().get(j) + (mt.nextDouble() * (this.getUpperBound().get(j) - this.getLowerBound().get(j)));\n vel = (this.getLowerBound().get(j) - this.getUpperBound().get(j)) / 2 + (mt.nextDouble() * (((this.getUpperBound().get(j)\n - this.getLowerBound().get(j)) / 2 - (this.getLowerBound().get(j) - this.getUpperBound().get(j)) / 2) + 1));\n tempPosition.add(pos);\n tempVelocity.add(vel);\n }\n if (this.phi == 0) {\n p = new Particle(this, tempPosition, this.informantsPerParticle);\n } else {\n p = new Particle(this, tempPosition, this.informantsPerParticle, this.phi);\n }\n\n p.setBestPosition(Utils.doubleListDeepCopy(tempPosition));\n p.setVelocity(tempVelocity);\n p.evaluate(getCostFunction());\n this.getPopulation().add(p);\n\n }\n \n }",
"public void run() {\n\t\t\t while (!stopnow) {\n\t\t\t\t if (!stopnow) {\n\t\t\t\t\t ArrayList<Cell> ng = gol.evolve(gridPane.getSeed());\n\t\t\t\t\t gridPane.setSeed(ng);\n\t\t\t\t\t tickCount++;\n\t\t\t\t\t genCountLabel.setText(\"Generation: \"+tickCount); //Update Counter \n\t\t\t\t\t try \n\t\t\t\t\t {\n\t\t\t\t\t Thread.sleep(TIMER_DELAY);\n\t\t\t\t\t } \n\t\t\t\t\t catch(InterruptedException ex) \n\t\t\t\t\t {\n\t\t\t\t\t Thread.currentThread().interrupt();\n\t\t\t\t\t }\n\t\t\t\t }\n\t\t\t }\n\t\t }",
"protected void useDataOld() {\n\t\tfloat x = values[0];\n\t\tfloat y = values[1];\n\t\tfloat z = values[2];\n\n\t\tcallListener(new AccelarationSensorData(millis, nanos, x, y, z));\n\t}",
"public void runLastTime(){\n\t\t/*try {\n\t\t\tlong timeDiff = 100;\n\t\t\t\n\t\t\tFeatureListController controller = new FeatureListController(timeDiff);\n\t\t\tTestSensorListener listener1 = new TestSensorListener();\n\t\t\tcontroller.registerSensorListener(listener1);\n\t\t\tTestSensorListener listener2 = new TestSensorListener();\n\t\t\tcontroller.registerSensorListener(listener2);\n\t\t\t\n\t\t\t\n\t\t\t//20 samples in total\n\t\t\tcontroller.addFeatureList(listener1, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tThread.sleep(10);\n\t\t\tcontroller.addFeatureList(listener2, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tcontroller.addFeatureList(listener1, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tThread.sleep(10);\n\t\t\tcontroller.addFeatureList(listener1, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tThread.sleep(10);\n\t\t\tcontroller.addFeatureList(listener2, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tcontroller.addFeatureList(listener1, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tThread.sleep(10);\n\t\t\tcontroller.addFeatureList(listener1, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tThread.sleep(10);\n\t\t\tcontroller.addFeatureList(listener2, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tcontroller.addFeatureList(listener1, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tThread.sleep(10);\n\t\t\tcontroller.addFeatureList(listener1, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tThread.sleep(10);\n\t\t\tcontroller.addFeatureList(listener2, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tcontroller.addFeatureList(listener1, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tThread.sleep(10);\n\t\t\tcontroller.addFeatureList(listener1, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tThread.sleep(10);\n\t\t\tcontroller.addFeatureList(listener2, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tcontroller.addFeatureList(listener1, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tThread.sleep(10);\n\t\t\tcontroller.addFeatureList(listener1, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tThread.sleep(10);\n\t\t\tcontroller.addFeatureList(listener2, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tcontroller.addFeatureList(listener1, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tThread.sleep(10);\n\t\t\tcontroller.addFeatureList(listener1, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tThread.sleep(10);\n\t\t\tcontroller.addFeatureList(listener2, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tcontroller.addFeatureList(listener1, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tThread.sleep(10);\n\t\t\tcontroller.addFeatureList(listener1, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tThread.sleep(10);\n\t\t\tcontroller.addFeatureList(listener2, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tcontroller.addFeatureList(listener1, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tThread.sleep(10);\n\t\t\tcontroller.addFeatureList(listener1, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tThread.sleep(10);\n\t\t\tcontroller.addFeatureList(listener2, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tcontroller.addFeatureList(listener1, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tThread.sleep(10);\n\t\t\tcontroller.addFeatureList(listener1, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tThread.sleep(10);\n\t\t\tcontroller.addFeatureList(listener2, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tcontroller.addFeatureList(listener1, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\t\n\t\t\t\n\t\t\tfor(int i=0;i<2;++i){\n\t\t\t\tSensorListener listener;\n\t\t\t\tif(i==0)\n\t\t\t\t\tlistener = listener1;\n\t\t\t\telse \n\t\t\t\t\tlistener = listener2;\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"LISTENER\" + (i+1));\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"Now:\" + new Date().getTime());\n\t\t\t\tList<FeatureList> featureLists = controller.getLastFeatureListsInMilliseconds(listener, -1);\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"All feature lists with milliseconds method\");\n\t\t\t\tfor(FeatureList l : featureLists)\n\t\t\t\t\tSystem.out.println(l.getTimestamp().getTime());\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"All feature lists with n method\");\n\t\t\t\tList<FeatureList> featureLists2 = controller.getLastNFeatureList(listener, -1);\n\t\t\t\tfor(FeatureList l : featureLists)\n\t\t\t\t\tSystem.out.println(l.getTimestamp().getTime());\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"Last milliseconds \" + 40);\n\t\t\t\tList<FeatureList> featureLists3 = controller.getLastFeatureListsInMilliseconds(listener, 40);\n\t\t\t\tfor(FeatureList l : featureLists3)\n\t\t\t\t\tSystem.out.println(l.getTimestamp().getTime());\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"Last N Feature Lists \" + 6);\n\t\t\t\tList<FeatureList> featureLists4 = controller.getLastNFeatureList(listener, 6);\n\t\t\t\tfor(FeatureList l : featureLists4)\n\t\t\t\t\tSystem.out.println(l.getTimestamp().getTime());\n\t\t\t}\n\t\t\t\n\n\t\t} catch (InterruptedException ex) {\n\t\t\tSystem.out.println(ex.getLocalizedMessage());\n//Logger.getLogger(CaseFeatureListController.class.getName()).log(Level.SEVERE, new double[10], ex);\n\t\t}*/\n\t\t\n\t}",
"private void prepareDataAnimation() {\n for (SliceValue value : pieChartData.getValues()) {\n value.setTarget((float) Math.random() * 30 + 15);//更新数据\n }\n detailLineChart.startDataAnimation();\n }",
"void reinit() {\n for (int i = 0; i < 2; i++) {\r\n for (int j = 0; j < 2; j++) {\r\n plots[i][j].setObjectives(i, j);\r\n }\r\n }\r\n fireTableDataChanged();\r\n }",
"public void chipChunkLoaded() {\n for (InputPin i : inputPins)\n i.refreshSourceBlocks();\n\n for (int i = 0; i < outputPins.length; i++)\n outputPins[i].setState(circuit.outputs[i]);\n }",
"private void setTrainingData() throws IOException {\r\n\t\ttrainIdBodyMap = readInIdBodiesMap(new File(TRAIN_BODIES_CSV_LOCATION));\r\n\t\ttrainStances = readStances(new File(TRAIN_STANCES_CSV_LOCATION));\r\n\r\n\t}",
"public void train(SieveDocuments trainingInfo) {\r\n\t\t// no training\r\n\t}",
"@Override\n\tpublic void updateIfNeeded() {\n\t\tif(needToUpdate){\n\t\t\tinit();\n\t\t\tneedToUpdate = false;\n\t\t}\n\t}",
"public void updatePlayerInstances()\r\n {\r\n long var1 = this.theWorldServer.getTotalWorldTime();\r\n int var3;\r\n PlayerManager.PlayerInstance var4;\r\n\r\n if (var1 - this.previousTotalWorldTime > 8000L)\r\n {\r\n this.previousTotalWorldTime = var1;\r\n\r\n for (var3 = 0; var3 < this.playerInstanceList.size(); ++var3)\r\n {\r\n var4 = (PlayerManager.PlayerInstance)this.playerInstanceList.get(var3);\r\n var4.onUpdate();\r\n var4.processChunk();\r\n }\r\n }\r\n else\r\n {\r\n for (var3 = 0; var3 < this.playerInstancesToUpdate.size(); ++var3)\r\n {\r\n var4 = (PlayerManager.PlayerInstance)this.playerInstancesToUpdate.get(var3);\r\n var4.onUpdate();\r\n }\r\n }\r\n\r\n this.playerInstancesToUpdate.clear();\r\n\r\n if (this.players.isEmpty())\r\n {\r\n WorldProvider var5 = this.theWorldServer.provider;\r\n\r\n if (!var5.canRespawnHere())\r\n {\r\n this.theWorldServer.theChunkProviderServer.unloadAllChunks();\r\n }\r\n }\r\n }"
] | [
"0.64200824",
"0.63049644",
"0.6294055",
"0.60555595",
"0.5673111",
"0.5667335",
"0.56599337",
"0.56352764",
"0.5625265",
"0.5612822",
"0.5607673",
"0.5539208",
"0.5515015",
"0.5510595",
"0.5508164",
"0.54979897",
"0.5382197",
"0.5366219",
"0.53389716",
"0.53041285",
"0.53037477",
"0.5302197",
"0.5287146",
"0.5254633",
"0.52529764",
"0.5252642",
"0.5243255",
"0.5234321",
"0.5212789",
"0.5201775",
"0.5175883",
"0.51574016",
"0.5139971",
"0.5119185",
"0.50921667",
"0.5089549",
"0.507968",
"0.5070851",
"0.50702727",
"0.50596076",
"0.5038309",
"0.50366193",
"0.502513",
"0.50111395",
"0.5008845",
"0.50049853",
"0.49894938",
"0.49820724",
"0.4967826",
"0.49591023",
"0.49580964",
"0.49510399",
"0.49470612",
"0.492551",
"0.49227893",
"0.491812",
"0.4916035",
"0.49026006",
"0.48914507",
"0.48824117",
"0.4873407",
"0.48687482",
"0.4866885",
"0.4854838",
"0.48538744",
"0.48465693",
"0.48458087",
"0.48416844",
"0.4837864",
"0.48336366",
"0.4832787",
"0.48283073",
"0.48245037",
"0.4821831",
"0.4814819",
"0.48142114",
"0.48116186",
"0.4808774",
"0.4799335",
"0.47963992",
"0.47879693",
"0.47803146",
"0.4779968",
"0.47796163",
"0.47788745",
"0.477793",
"0.47668502",
"0.47660443",
"0.47544953",
"0.47524592",
"0.47516257",
"0.47489786",
"0.47460392",
"0.47447693",
"0.4737678",
"0.47372407",
"0.4732761",
"0.47307536",
"0.4728296",
"0.4728066"
] | 0.49445248 | 53 |
If the selected particle is changed, then show the games played by that particle | @Override
public void valueChanged(ListSelectionEvent e) {
// TODO Auto-generated method stub
String name = ((JList) e.getSource()).getName();
if (name.equals("pred")){
int selected = displayPred.getSelectedIndex();
if (selected == -1)
selected = 0;
String loc = predParticles.get(selected).getPath();
vm.updateParticleGame(loc);
}
else{
int selected = displayPrey.getSelectedIndex();
String loc = preyParticles.get(selected).getPath();
vm.updateParticleGame(loc);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void update(){\n\t\tif (!VisualizerMain.selectedRun.equals(\"\")){\n\t\t\tupdateEpochNum();\n\t\t\tupdateParticles();\n\t\t\tthis.repaint();\n\t\t}\n\t\t\n\t}",
"public void actionPerformed(ActionEvent e) {\n\t\tif (game.gameStatus >= 0){\n\t\t\tp.update();\n\t\t\tupdateBackground();\n\t\t\trepaint();\n\t\t}\n\t\telse{\n\t\t\ttime.stop();\n\t\t\tPlayerData.coins += game.coinsCollected;\n\t\t\tif (game.score > PlayerData.highscore) PlayerData.highscore = game.score;\n\t\t\tPlayerData.saveData();\n\t\t\tMainMenu.jtp.setSelectedIndex(1);\n\t\t\tMainMenu.jtp.setSelectedIndex(0);\n\t\t}\n\t\t//System.out.println(this.p.ID);\n\t}",
"@Override\n\t\t\tpublic void changed(ChangeEvent event, Actor actor) {\n\t\t\t\tbuttonSound.play((game.setting.sfxVol()*(game.setting.masterVol()/100))/100);\n\t\t\t\t//screen.getActions().makeArt(typeSelBox.getSelectedIndex(), subjectSelBox.getSelectedIndex());\n\t\t\t\t\n\t\t\t\t// Call player actor to make art\n\t\t\t\tGameScreen screen = (GameScreen)game.getScreen();\n\t\t\t\t\n\t\t\t\t// If you can make art, make art\n\t\t\t\tif(screen.getActions().canMakeArt(typeSelBox.getSelectedIndex()))\t\n\t\t\t\t\tscreen.getPlayer().makeArt(typeSelBox.getSelectedIndex(), subjectSelBox.getSelectedIndex());\n\n\t\t\t\tclosePopups();\n\t\t\t}",
"public void onClickPlayer() {\n carIcon.setOpacity(1);\n playerIcon.setOpacity(1);\n playerList.getSelectionModel().selectedItemProperty().addListener((observable, oldValue, newValue) -> {\n displayUserInfo(newValue);\n });\n MAIN_MENU_AUDIO.play(Double.parseDouble(getInitData().get(\"SFXVol\")));\n }",
"@Override\n public void actionPerformed(ActionEvent e) {\n m_testGame.setTitle(searchGameText.getText());\n try {\n if(m_fileManager1.isGameInList(m_testGame)){ // if the game is in the file\n m_NewSearchResult = m_fileManager1.gamesSearchResult(m_testGame); //makes a new com.cs_group.objects.GameList with the search Result\n ChangeEvent event = new ChangeEvent(this);\n for (ChangeListener listener : m_addAnotherGame) {\n listener.stateChanged(event);\n }\n }else { JOptionPane.showMessageDialog(null, \"GAME NOT FOUND\", \"ERROR\", JOptionPane.ERROR_MESSAGE);}\n } catch (IOException | ParseException ioException) {\n ioException.printStackTrace();\n }\n }",
"public void stateChanged(ChangeEvent e) {\n\t\tupdatePits();\n\t\tSystem.out.println(\"Player 0 score: \" + model.getMancalas()[0]);\n\t\tSystem.out.println(\"Player 1 score: \" + model.getMancalas()[1]);\n\t\tleftScore.setText( Integer.toString(model.getMancalas()[1]));\n\t\trightScore.setText( Integer.toString(model.getMancalas()[0]));\n\t\tSystem.out.println(\"It is now player: \" + model.getPlayer() + \"'s turn\");\n\t\t\n\t}",
"protected void playParticle(){\n\t\teffectData.getPlayParticles().playParticles(effectData, effectData.getDisplayAt());\n\t}",
"public void changePlayer(int index) {\n currentPlayer.setText(\"Aktueller Spieler: \" + index);\n if(index == 1){\n pointsPlayer2.setOpaque(false);\n pointsPlayer1.setBackground(Color.green);\n pointsPlayer1.setOpaque(true);\n this.repaint();\n }\n else{\n pointsPlayer1.setOpaque(false);\n pointsPlayer2.setBackground(Color.green);\n pointsPlayer2.setOpaque(true);\n this.repaint();\n }\n }",
"@Override\n\tpublic void stateChanged(ChangeEvent e) {\n\t\t// TODO Auto-generated method stub\n\t\tepochSelected = ((Number)epochSelector.getValue()).intValue();\n\t\tupdateParticles();\n\t\tthis.repaint();\n\t}",
"@Override public void choose(String chosen) {\n\t\tif (chosen == Fragments.POPULAR.name()) {\n\t\t\t// F_TimelineFragment time = (F_TimelineFragment) fm.findFragmentById(R.id.popular1_fragment_container);\n\t\t\t// F_PopularFragment p = (F_PopularFragment) fm.findFragmentById(R.id.timeline1_fragment_container);\n\t\t\t// ft.replace(R.id.popular1_fragment_container, new F_TimelineFragment());\n\t\t\t// ft.remove(popular);\n\t\t\t// time.changeText(no);\n\t\t\tFrameLayout pop = (FrameLayout) this.findViewById(R.id.popular1_fragment_container);\n\t\t\tFrameLayout tim = (FrameLayout) this.findViewById(R.id.timeline1_fragment_container);\n\t\t\tpop.setVisibility(View.INVISIBLE);\n\t\t\tpop.setVisibility(View.GONE);\n\t\t\ttim.setVisibility(View.VISIBLE);\n\t\t}\n\n\t\tif (chosen == Fragments.TIMELINE.name()) {\n\n\t\t\tFrameLayout pop = (FrameLayout) this.findViewById(R.id.popular1_fragment_container);\n\t\t\tFrameLayout tim = (FrameLayout) this.findViewById(R.id.timeline1_fragment_container);\n\t\t\ttim.setVisibility(View.INVISIBLE);\n\t\t\ttim.setVisibility(View.GONE);\n\t\t\tpop.setVisibility(View.VISIBLE);\n\t\t}\n\n\t}",
"private boolean updateGUI(){\n // check if there were games found\n if(totalGames == 0){\n resetPieChart();\n resetLabels();\n showAlertSelectionFail(\"Selection error\", \"No games with this constellation were found.\");\n return false;\n }\n\n // fill labels with text\n lblTotalGames.setText(String.valueOf(totalGames));\n lblGamesWithoutWinner.setText(String.valueOf(gamesWithoutWinner));\n if (averageTurns == 0) {\n lblAverageTurns.setText(\"Not available\");\n } else {\n lblAverageTurns.setText(String.valueOf(averageTurns));\n }\n // remove duplicate players -> playerNameListNoDuplicates\n Set<String> playerSet = new HashSet<>(playerNameList);\n List<String> playerNameListNoDuplicates = new ArrayList<>();\n playerNameListNoDuplicates.addAll(playerSet);\n // sort new List\n Collections.sort(playerNameListNoDuplicates);\n int labelCounter = 1;\n for (String playerName : playerNameListNoDuplicates) {\n vBoxDesc.getChildren().add(labelCounter, new Label(playerName + \":\"));\n vBoxNumbers.getChildren().add(labelCounter, new Label(String.valueOf(nameToWins.get(playerName)) + \" wins\"));\n labelCounter++;\n }\n\n // fill pieChart\n fillPieChart();\n\n return true;\n }",
"private void showProgramData(ItemEvent itemEvent) {\n\n if (itemEvent.getStateChange() == ItemEvent.SELECTED) {\n\n setCurrentChannel(itemEvent.getItem().toString());\n scheduledUpdate();\n\n }\n }",
"public void actionPerformed(ActionEvent event)\n {\n label.append(\"\\n\" + pokemonName);\n party.add(pokemon);\n }",
"@FXML\n private void btnShowInfoPressed() {\n Tournament t = tblTournaments.getSelectionModel().getSelectedItem();\n\n // Pass in some way the tournament name to the tournament info scene\n stateManager.TournamentName = t.tournamentName.get();\n\n Renderer.getInstance().show(\"tournamentInfoScene\");\n }",
"@Override\n public void valueChanged(ListSelectionEvent e) {\n if (!ageList.isSelectionEmpty())\n playButton.setEnabled(true);\n }",
"private void updateParticles() {\n\t\t// TODO Auto-generated method stub\n\t\tpredParticles = new ArrayList<File>();\n\t\tpreyParticles = new ArrayList<File>();\n\t\tFile f = new File(VisualizerMain.experimentBaseLocation+\"/\"+VisualizerMain.selectedRun+\"/Epoch-\"+epochSelected+\"/\");\n\t\tFile[] listFolders = f.listFiles();\n\t\tfor(File file : listFolders){\n\t\t\tpredParticles.add(file);\n\t\t}\n\t\t\n\t\tDefaultListModel listModelPredator = new DefaultListModel();\n\t\tfor (File file: predParticles){\n\t\t\tlistModelPredator.addElement(file.getName());\n\t\t}\n\t\tdisplayPred.setModel(listModelPredator);\n\t\t\n\t\tDefaultListModel listModelPrey = new DefaultListModel();\n\t\tfor (File file: preyParticles){\n\t\t\tlistModelPrey.addElement(file.getName());\n\t\t}\n\t\tdisplayPrey.setModel(listModelPrey);\n\t}",
"public void actionPerformed(ActionEvent e) {\n\t\t\t\t\t\t// TODO Think about how to use the key in robots hashtable\n\t \t \tSystem.out.println(x.getName() + \" \" + Robot.getRobotInUse());\n\t \t \tRobot.setRobotInUse(x.getRobotKey());\n\t \t \tSystem.out.println(x.getName() + \" \" + Robot.getRobotInUse());\n\t \t \tjl.setText(x.getName());\n\t \t \t\n\t \t \tvi.showVideo(x);\n\t \t \t\n\t \t \t\n\t\t\t\t\t}",
"public void changeLivesDisplay()\r\n {\r\n removeObject(text);\r\n //Add the lives text\r\n text = new Text(\"Lives: \" + health);\r\n addObject(text, 60, 15);\r\n }",
"@Override\n public void valueChanged(ListSelectionEvent e) {\n if (!strategyList.isSelectionEmpty())\n playButton.setEnabled(true);\n }",
"public void updateGamePanel() {\n\t\tthis.removeAll();\n\t\t\n\t\tButton2 buttonTip = new Button2(\"DICA\", 75, 100, 100, 100);\n\t\tbuttonTip.addActionListener(e -> Controller.game.showTip());\n\t\tthis.add(buttonTip);\n\t\t\n\t\tButton2 menu = new Button2(\"Menu\", 200, 100, 100, 100);\n\t\tmenu.addActionListener(e -> this.frame.setVisible(\"menu\"));\n\t\tthis.add(menu);\n\t\t\n\t\tthis.drawButtons();\n\t\t\n\t\t//Adding labels\n\t\tthis.add(frame.getWordShow());\n\t\tthis.add(frame.getLifeShow());\n\t\t\n\t\tthis.frame.add(this);//Adding the gameJPanel to the frame\n\t}",
"public void actionPerformed(ActionEvent event){ \n\n //se o player clicou em \"play\" os botoes desativados serao reativados\n if(event.getSource() == play){\n\t\t\thint.setEnabled(true);\n singleShot.setEnabled(true);\n commonShot.setEnabled(true);\n cascade.setEnabled(true);\n star.setEnabled(true);\n newGame.setEnabled(true);\n reset.setEnabled(true);\n\n //inicia o stopwatch\n player.setInitialTime(System.currentTimeMillis());\n\n //desabilita o botao de \"play\", visto que a partida ja iniciou\n play.setEnabled(false);\n\n //copia os valuees do arrayPlayer para outro array, ele sera usado caso o jogo seja reiniciado\n for(int line = 0; line < 10; line++){\n for(int column = 0; column < 10; column++){\n arrayPlayerAux[line][column] = arrayPlayer[line][column];\n }\n }\n\t\t}\n \n //atualiza o stopwatch a cada acao do player, somente se um dos botoes que inicialmente estavam desabilitados, estiver habilitado\n if(newGame.isEnabled()){\n player.setFinalTime(System.currentTimeMillis());\n stopwatch.setText(\"\"+player.getSetTime());\n }\n\n //se o player \"clicou\" em exit, a janela sera fechada\n\t\tif(event.getSource() == exit){\n\t\t\tthis.dispose();\n\t\t}\n\n //verifica qual opcao o player clicou e marca ela como selecionada\n if(event.getSource() == singleShot){\n\t\t\tselected = \"single\";\n\t\t}\n if(event.getSource() == commonShot){\n\t\t\tselected = \"common\";\n\t\t}\n if(event.getSource() == cascade){\n\t\t\tselected = \"cascade\";\n\t\t}\n if(event.getSource() == star){\n\t\t\tselected = \"star\";\n\t\t}\n if(event.getSource() == hint){\n\t\t\tselected = \"hint\";\n\t\t}\n if(event.getSource() == aircraft){\n\t\t\tselected = \"aircraft\";\n\t\t}\n if(event.getSource() == submarine){\n\t\t\tselected = \"submarine\";\n\t\t}\n if(event.getSource() == escortShip){\n\t\t\tselected = \"escortShip\";\n\t\t}\n if(event.getSource() == aircraftCarrier){\n selected = \"aircraftCarrier\";\n }\n\n //verifica se foi clicado dentro da tabela do computador, e qual opcao estava selecionada quando isso ocorreu\n\t\tfor(int line = 0; line < 10; line++){\n\t\t\tfor(int column = 0; column < 10; column++){\n if(event.getSource() == tablePc[line][column] && selected != \"\"){\n\n //se foi selecionada a hint\n if(selected == \"hint\"){\n if(countHint < 3){\n auxVer = \"There are no vertical vehicles. \";\n for(int i = 0; i < 10; i++){\n if(arrayPc[i][column] > 0){\n auxVer = \"There are vertical vehicles. \";\n }\n }\n auxHor = \"There are no horizontal vehicles.\";\n for(int i = 0; i < 10; i++){\n if(arrayPc[line][i] > 0){\n auxHor = \"There are horizontal vehicles.\";\n }\n }\n msg2 = auxVer + auxHor;\n msg = \"Line: \"+line+\" Column: \"+column+\"\\n\"+msg2;\n JOptionPane.showMessageDialog(null, msg);\n countHint++;\n\n //reseta a opcao selecionada\n selected = \"\";\n\n //desabilita o botao de hint quando for usado 3 vezes\n }else if(countHint >= 3){\n hint.setEnabled(false);\n }\n //verifica quando foi clicado no board do computador com uma opcao de disparo selecionada\n }else if(selected != \"\"){ \n\n //realiza o disparo do player\n distVehPlayer.tiroPlayer(selected, arrayPc, tablePc, line, column, arrayPlayer, singleShot);\n\n //realiza o disparo do computador\n distVehPc.tiroPc(arrayPlayer, tablePlayer, arrayPc, singleShot, commonShot, cascade, star, player);\n\n //reseta a opcao selecionada\n selected = \"\";\n }\n }\n }\n }\n\n //verifica se foi clicado dentro da tabela do player\n for(int line = 0; line < 10; line++){\n\t\t\tfor(int column = 0; column < 10; column++){\n if(event.getSource() == tablePlayer[line][column] && selected != \"\"){\n if(selected == \"aircraft\" || selected == \"submarine\" || selected == \"escortShip\" || selected == \"aircraftCarrier\"){\n\n //se foi clicado dentro do board do player com uma opcao de veiculo selecionada, sera ativado o metodo para posicionar o veiculo no campo\n distVehPlayer.define(selected, arrayPlayer, tablePlayer, aircraft, submarine, escortShip, aircraftCarrier, line, column);\n\n //reseta a opcao selecionada\n selected = \"\";\n }\n }\n }\n }\n\n //gera um new set board se a opcao for clicada\n if(event.getSource() == newGame){\n\t\t\tthis.dispose();\n\t\t\tSetBoard board = new SetBoard(name);\n\t\t\tboard.setVisible(true);\n\t\t\tJOptionPane.showMessageDialog(this, \"New Game!\");\n\t\t}\n\n //reinicia o set board se a opcao for clicada\n if(event.getSource() == reset){\n\n //atributos para auxiliar no posicionamento das images dos vehicles\n auxC = 0;\n auxS = 0;\n auxN = 0;\n auxP = 0;\n\n //reseta o atributo que contrhello o disparo single do porta aviao\n distVehPc.setAuxSingle(3);\n distVehPlayer.setAuxSingle(3);\n\n //reseta as hints\n countHint = 0;\n\n //habilita os botoes de disparo\n singleShot.setEnabled(true);\n commonShot.setEnabled(true);\n cascade.setEnabled(true);\n star.setEnabled(true);\n\n //repeticao para reposicionar todas as images de ocean e dos vehicles de volta ao campo\n for(int line = 0; line < 10; line++){\n for(int column = 0; column < 10; column++){\n\n //passa os valuees originais de volta aos arrayes e reabilita todo o board\n arrayPlayer[line][column] = arrayPlayerAux[line][column];\n tablePlayer[line][column].setEnabled(true);\n arrayPc[line][column] = arrayPcAux[line][column];\n tablePc[line][column].setEnabled(true);\n\n //coloca a imagem de ocean em todo board do computador\n tablePc[line][column].setIcon(new ImageIcon(RandomBoard.class.getResource(\"/images/ocean.png\")));\n tablePc[line][column].setText(line+\"-\"+column);\n tablePc[line][column].setHorizontalTextPosition(SwingConstants.CENTER);\n tablePc[line][column].setMargin( new Insets(10, 10, 10, 10) );\n tablePc[line][column].addActionListener(this);\n tablePc[line][column].setForeground(Color.WHITE);\n\n //reconstitui o aircraft do player\n if(arrayPlayer[line][column] == 1 && auxC == 0){\n tablePlayer[line][column].setIcon(new ImageIcon(DistributeVehiclesPlayer.class.getResource(\"/images/aircraft1.png\")));\n tablePlayer[line][column+1].setIcon(new ImageIcon(DistributeVehiclesPlayer.class.getResource(\"/images/aircraft2.png\")));\n auxC = 1;\n }\n\n //reconstitui o submarine do player\n if(arrayPlayer[line][column] == 2 && auxS == 0){\n tablePlayer[line][column].setIcon(new ImageIcon(DistributeVehiclesPlayer.class.getResource(\"/images/submarine1.png\")));\n tablePlayer[line][column+1].setIcon(new ImageIcon(DistributeVehiclesPlayer.class.getResource(\"/images/submarine2.png\")));\n auxS = 1;\n }\n\n //reconstitui o navio de escolta do player\n if(arrayPlayer[line][column] == 3 && auxN == 0){\n tablePlayer[line][column].setIcon(new ImageIcon(DistributeVehiclesPlayer.class.getResource(\"/images/escortShip1.png\")));\n tablePlayer[line][column+1].setIcon(new ImageIcon(DistributeVehiclesPlayer.class.getResource(\"/images/escortShip2.png\")));\n tablePlayer[line][column+2].setIcon(new ImageIcon(DistributeVehiclesPlayer.class.getResource(\"/images/escortShip3.png\")));\n auxN = 1;\n }\n\n //reconstitui o porta aviao do player\n if(arrayPlayer[line][column] == 4 && auxP == 0){\n tablePlayer[line][column].setIcon(new ImageIcon(DistributeVehiclesPlayer.class.getResource(\"/images/aircraftCarrier1.png\")));\n tablePlayer[line][column+1].setIcon(new ImageIcon(DistributeVehiclesPlayer.class.getResource(\"/images/aircraftCarrier2.png\")));\n tablePlayer[line][column+2].setIcon(new ImageIcon(DistributeVehiclesPlayer.class.getResource(\"/images/aircraftCarrier3.png\")));\n tablePlayer[line][column+3].setIcon(new ImageIcon(DistributeVehiclesPlayer.class.getResource(\"/images/aircraftCarrier4.png\")));\n auxP = 1;\n }\n }\n }\n\n //reseta o stopwatch e exibe mensagem de jogo reiniciado\n player.setInitialTime(System.currentTimeMillis());\n\t\t\tJOptionPane.showMessageDialog(this, \"Restarted!\");\n\t\t}\n\n //se o board estiver pronto, habilita o botao de \"play\"\n if(!aircraft.isEnabled() && !submarine.isEnabled() && !escortShip.isEnabled() && !aircraftCarrier.isEnabled() && auxPlay == 0){\n play.setEnabled(true);\n auxPlay = 1;\n }\n }",
"public void multiplayerSelected()\n {\n //call Client Controller's setState method with\n //a parameter of new ClientLobbyDiscoveryState()\n clientController.searchForGames();\n\n //populate the GameSelectScreen's text box with the lobbies from the\n //state\n gameSelectScreen.clearGames();\n\n //set state to GAMESELECT\n state = CurrentWindow.GAMESELECT;\n\n //hide the intro screen and show the game select screen\n introScreen.setVisible(false);\n gameSelectScreen.setVisible(true);\n }",
"private void PLAYERS_ComboBox1ActionPerformed(java.awt.event.ActionEvent evt) {\n if(PLAYERS_ComboBox1.getSelectedIndex() == 1)\n Machin_playin = true;\n else\n Machin_playin = false;\n \n }",
"protected void changeSideClicked(ActionEvent e) {\n blackPlayer = 1 - blackPlayer;\n updateTurnInfo();\n startNewGame();\n }",
"public void update() {\n\n if (!isSelected){\n goalManagement();\n }\n\n if (chair != null){ // si une chaise lui est désigné\n if (!hasAGoal && !isSelected){ // et qu'il n'a pas d'objectif\n setSit(true);\n position.setX(chair.getX());\n }\n\n if (isSit){\n chair.setChairState(Chair.ChairState.OCCUPIED);\n }else {\n chair.setChairState(Chair.ChairState.RESERVED);\n }\n }\n\n if (tired > 0 ){\n tired -= Constants.TIRED_LOSE;\n }\n\n if (isSit && comfort>0){\n comfort -= Constants.COMFORT_LOSE;\n }\n\n if (isSitOnSofa && comfort<100){\n comfort += Constants.COMFORT_WIN;\n }\n\n if (!hasAGoal && moveToCoffee && coffeeMachine!=null){\n moveToCoffee = false;\n tired=100;\n\n coffeeMachine.setCoffeeTimer(new GameTimer()) ;\n coffeeMachine.getCoffeeTimer().setTimeLimit(Constants.COFFEE_TIME_TO_AVAILABLE);\n coffeeMachine = null;\n backToSpawn();\n }\n\n if (!hasAGoal && moveToSofa){\n moveToSofa = false;\n isSitOnSofa = true;\n dir = 0 ;\n position.setY(position.getY()-Constants.TILE_SIZE);\n }\n\n if (isSelected){\n flashingColor ++;\n if (flashingColor > 2 * flashingSpeed){\n flashingColor = 0;\n }\n }\n\n }",
"@Override\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\tgameType = \"Quick Play\"; \n\t\t\t\t\t\n\t\t\t\t}",
"@Override\n public void onClick(DialogInterface dialog, int which) {\n\n for (int i = 0; i < p.length; i++) {\n if (pChecked[i]) { // if a player's name has been ticked\n\n selectedPlayers.add(p[i]); // add that name to the selected players list\n pChecked[i] = false; // untick that name\n }\n }\n if (selectedPlayers.size() > 0) { // save the selection in case of repeated use\n editor.putString(\"previousSelection\", selectedPlayers.toString().trim());\n editor.commit();\n showResults();\n\n }\n }",
"@FXML\n\tpublic void useItem(ActionEvent event){\n\t\t\tString itemName=\"\";\n\t\t\titemName = itemselect.getText();\n\t\t\n\t\t\tif(itemName.equals(\"\")) {\t// Checks if selected item is blank\n\t\t\t\n\t\t\t\tevents.appendText(\"Select an item from the Inventory box before clicking this button!\\n\");\t\n\t\t\t\treturn;\n\t\t\t\n\t\t\t} else {\t// Begins getting item information\n\t\t\t\tItem i;\n\t\t\t\tint x;\n\t\t\t\ti=Item.getItem(ItemList, itemName);\t// Get item from the item list\n\t\t\t\t\n\t\t\t\tif(i == null) {\t// Check if the item isnt found in the item list\n\t\t\t\t\t\n\t\t\t\t\tevents.appendText(\"Item not Found!\\n\");\n\t\t\t\t\titemselect.setText(\"\");\n\t\t\t\t\titemStats.setText(\"\");\n\t\t\t\t} else {\t// Check what type of item was used\n\t\t\t\t\tif(i.getStat().equals(\"HP\")) {\n\t\t\t\t\t\tint y=p.getHP()+i.getChange();\n\t\t\t\t\t\tif(y>p.getMaxHP()) {\n\t\t\t\t\t\t\tp.setHP(p.getMaxHP());\n\t\t\t\t\t\t\tevents.appendText(\"Health Restored to Full!\\n\");\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tp.setHP(y);\n\t\t\t\t\t\tevents.appendText(\"Health Restored by \" + i.getChange()+\"\\n\");\n\t\t\t\t\t}\n\t\t\t\t\tcurrentHp.setText(p.getHP()+\"/\"+p.getMaxHP());\n\t\t\t\t\tplayerHPBar.setProgress((double)p.getHP()/p.getMaxHP());\n\t\t\t\t}else if(i.getStat().equals(\"DMG\")) {\n\t\t\t\t\tp.setDMG(p.getDMG()+i.getChange());\n\t\t\t\t\tgdmg.setText(\"\"+p.getDMG());\n\t\t\t\t\tevents.appendText(\"Damage Increased by \" + i.getChange()+\"\\n\");\n\t\t\t\t}else {\n\t\t\t\t\tif(p.getEV()+i.getChange()>100) {\n\t\t\t\t\t\tevents.appendText(\"EV Increased by \" + (100-p.getEV())+\", Max Evasion is 100\\n\");\n\t\t\t\t\t\tp.setEV(100);\n\t\t\t\t\t\tgev.setText(\"\"+p.getEV());\n\t\t\t\t\t}else {\n\t\t\t\t\t\tp.setEV(p.getEV()+i.getChange());\n\t\t\t\t\t\tgev.setText(\"\"+p.getEV());\n\t\t\t\t\t\tevents.appendText(\"EV Increased by \" + i.getChange()+\"\\n\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Remove the item from the inventory\n\t\t\t\tx=Inventory.indexOf(i);\n\t\t\t\tInventory.remove(x);\n\t\t\t\tinventoryList.getItems().remove(x);\n\t\t\t\titemselect.setText(\"\");\n\t\t\t\titemStats.setText(\"\");\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t}",
"@Override\n\t\t\tpublic void changed(ObservableValue<? extends Boolean> observable, Boolean oldValue, Boolean newValue) {\n\t\t\t\t\n\t\t\t\tif(newValue)\tselectedFeatures.add(FEATURES[1]);\n\t\t\t\telse \t\t\tselectedFeatures.remove(FEATURES[1]);\n\n\t\t\t\tif(selectedFeatures.size() > 2){\n\t\t\t\t\tAlert dialogoAviso = new Alert(Alert.AlertType.WARNING);\n\t\t dialogoAviso.setHeaderText(\"Por favor, selcione apenas duas caracteristicas!\");\n\t\t dialogoAviso.showAndWait();\n\t\t energy.setSelected(false);\n\t\t\t\t}\n\n\t\t\t\tfor(Integer i: selectedFeatures) System.out.println(\"caracteristcas selecionadas: \"+i);\n\t\t\t\t\n\t\t\t}",
"@Override\n public void actionPerformed(ActionEvent ae)\n {\n if (time < survivalTime && lives > 0)\n {\n updateTime();\n for (int i = 0; i < numFigs; i++)\n figures[i].hide();\n for (int i = 0; i < numFigs; i++)\n figures[i].move();\n for (int i = 0; i < numFigs; i++)\n figures[i].draw();\n playCollisionSound();\n }\n else\n {\n this.moveTimer.stop();\n for (int i = 0; i < this.numFigs; i++)\n figures[i].hide();\n if (lives > 0)\n {\n this.youWinLabel.setVisible(true);\n playYouWinSound();\n }\n else\n {\n this.gameOverLabel.setVisible(true);\n playGameOverSound();\n }\n }\n \n }",
"public void actionPerformed(ActionEvent e)\n {\n \tif(buttonActionFlag)\n \t{\n \t\tGraphics controlDisplay = new BasicControls();\n \t\tGraphics outwardDisplay = new OutwardDisplay();\n \t\tTimerImpl t = new TimerImpl();\n \t\tt.addObserver(controlDisplay);\n \t\tt.addObserver(outwardDisplay);\n \t\tScoreboardImpl s = new ScoreboardImpl();\n \t\ts.addObserver(controlDisplay);\n \t\ts.addObserver(outwardDisplay);\n \t\tTeamImpl t1 = new TeamImpl(teamName1.getText());\n \t\tt1.addObserver(controlDisplay);\n \t\tt1.addObserver(outwardDisplay);\n \t\tTeamImpl t2 = new TeamImpl(teamName2.getText());\n \t\tt2.addObserver(controlDisplay);\n \t\tt2.addObserver(outwardDisplay);\n \t\tcontrolDisplay.start(t, s, t1, t2);\n \t\toutwardDisplay.start(t, s, t1, t2);\n\t\t\tteamFrame.dispose();\n \t}\n \telse\n \t{\n \t\tArrayList<Player> team1players = new ArrayList<Player>();\n \t\tteam1players.add(new PlayerImpl(team1playerName1.getText(), Integer.valueOf(team1playerNumber1.getText())));\n \t\tteam1players.add(new PlayerImpl(team1playerName2.getText(), Integer.valueOf(team1playerNumber2.getText())));\n \t\tteam1players.add(new PlayerImpl(team1playerName3.getText(), Integer.valueOf(team1playerNumber3.getText())));\n \t\tteam1players.add(new PlayerImpl(team1playerName4.getText(), Integer.valueOf(team1playerNumber4.getText())));\n \t\tteam1players.add(new PlayerImpl(team1playerName5.getText(), Integer.valueOf(team1playerNumber5.getText())));\n \t\tteam1players.add(new PlayerImpl(team1playerName6.getText(), Integer.valueOf(team1playerNumber6.getText())));\n \t\tteam1players.add(new PlayerImpl(team1playerName7.getText(), Integer.valueOf(team1playerNumber7.getText())));\n \t\tArrayList<Player> team2players = new ArrayList<Player>();\n \t\tteam2players.add(new PlayerImpl(team2playerName1.getText(), Integer.valueOf(team2playerNumber1.getText())));\n \t\tteam2players.add(new PlayerImpl(team2playerName2.getText(), Integer.valueOf(team2playerNumber2.getText())));\n \t\tteam2players.add(new PlayerImpl(team2playerName3.getText(), Integer.valueOf(team2playerNumber3.getText())));\n \t\tteam2players.add(new PlayerImpl(team2playerName4.getText(), Integer.valueOf(team2playerNumber4.getText())));\n \t\tteam2players.add(new PlayerImpl(team2playerName5.getText(), Integer.valueOf(team2playerNumber5.getText())));\n \t\tteam2players.add(new PlayerImpl(team2playerName6.getText(), Integer.valueOf(team2playerNumber6.getText())));\n \t\tteam2players.add(new PlayerImpl(team2playerName7.getText(), Integer.valueOf(team2playerNumber7.getText())));\n \t\t\n \t\tGraphics controlDisplay = new AdvancedControls();\n \t\tGraphics outwardDisplay = new OutwardDisplay();\n \t\tTimerImpl t = new TimerImpl();\n \t\tt.addObserver(controlDisplay);\n \t\tt.addObserver(outwardDisplay);\n \t\tScoreboardImpl s = new ScoreboardImpl();\n \t\ts.addObserver(controlDisplay);\n \t\ts.addObserver(outwardDisplay);\n \t\tTeamImpl t1 = new TeamImpl(teamName1.getText());\n \t\tt1.addObserver(controlDisplay);\n \t\tt1.addObserver(outwardDisplay);\n \t\tt1.addPlayers(team1players);\n \t\tTeamImpl t2 = new TeamImpl(teamName2.getText());\n \t\tt2.addObserver(controlDisplay);\n \t\tt2.addObserver(outwardDisplay);\n \t\tt2.addPlayers(team2players);\n \t\tcontrolDisplay.start(t, s, t1, t2);\n \t\toutwardDisplay.start(t, s, t1, t2);\n\t\t\tteamFrame.dispose();\n \t}\n }",
"void selectedEntityChanged(String name);",
"public void gameupdate(){\n game.update();\r\n panel.formUpdate(game.lives);\r\n }",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tChangePanel.replacePanel(mf, hg, new GamePanel(mf, p));\n\t\t\t}",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e)\n\t\t\t{\n\t\t\t\tshowPanel(createReinforcePanel(MainPlayScreen.this.game.getCurrentPlayer()));\t\t\n\t\t\t\n\t\t\t}",
"public boolean getShowParticles()\r\n/* 90: */ {\r\n/* 91: 91 */ return this.showParticles;\r\n/* 92: */ }",
"public void actionPerformed(ActionEvent e) {\n\t\t\t\t\r\n\t\t\t\tcontroller.newShot();\r\n\t\t\t\tint selected = clubList.getSelectedIndex();\r\n\t\t\t\tif (selected >= 0){\r\n\t\t\t\t\tString selectedClub = (String)clubList.getModel().getElementAt(selected);\r\n\t\t\t\t\tcontroller.selectClub(selectedClub);\r\n\t\t\t\t\tcontroller.startShot();\r\n\t\t\t\t\t\r\n\t\t\t\t\tUI.getInstance().show(PanelNames.END_SHOT);\r\n\t\t\t\t\tclubList.clearSelection();\r\n\t\t\t\t}\r\n\t\t\t}",
"@FXML\r\n public void partTypeChange() {\r\n if(this.partType.getSelectedToggle().equals(this.modPartInHouse)) {\r\n isInHouse = true;\r\n machineIdText.setText(\"Machine ID\");\r\n }\r\n else {\r\n isInHouse = false;\r\n machineIdText.setText(\"Company\");\r\n }\r\n }",
"private void checkClick(MouseEvent event) {\n SolarSystem mouseOver = findClosestSolarSystem(new Point((int) event.getX() - 5, (int) event.getY() - 5));\n if (mouseOver != null && travelable.contains(mouseOver)) {\n selectedSolarSystem = mouseOver;\n animateInfoScreen(true);\n solarSystemName.setText(mouseOver.name());\n ObservableList<Planet> planets = FXCollections.observableArrayList(mouseOver.planets());\n planetList.setItems(planets);\n fuelInfo.setText(\"Current:\\n\" + player.getShip().getFuel() + \"\\n\\nCost:\\n\" + player.distanceToSolarSystem(mouseOver) + \"\\n\\nSum:\\n\" + (player.getShip().getFuel() - player.distanceToSolarSystem(mouseOver)));\n drawUniverse();\n } else {\n drawUniverse();\n }\n }",
"@Override\n\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\n\t\t\t\t\tint id = Integer.parseInt((String) pidDropDown.getSelectedItem());\n\n\t\t\t\t\t// go through the Player array list,\n\n\t\t\t\t\t// print the details of the selected Player to a file.\n\t\t\t\t\tfor (Patient p : plist) {\n\n\t\t\t\t\t\tif (id == p.id) {\n\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tPrintWriter fw = new PrintWriter(\"patient.txt\");\n\t\t\t\t\t\t\t\tfw.write(p.toString());\n\n\t\t\t\t\t\t\t\tfw.close();\n\t\t\t\t\t\t\t} catch (Exception ec) {\n\n\t\t\t\t\t\t\t\tSystem.out.println(\" \" + ec);\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t}",
"private void jListStageplaatsenValueChanged(javax.swing.event.ListSelectionEvent evt) {//GEN-FIRST:event_jListStageplaatsenValueChanged\n Stageplaats s = (Stageplaats)jListStageplaatsen.getSelectedValue();\n if (s != null){ this.geselecteerdeStageplaats = s; }\n ClearDisplayedStageplaats();\n refreshDisplayedStageplaats();\n enableButtons();\n }",
"@Override\n public void actionPerformed(ActionEvent event){\n \t\n \tStableFord game = new StableFord(course, group);\n \t\n \tfor (int i = 0; i < stringArray.length; i++){\n \t\tint[] integerArray = new int[18];\n \t\tScanner input = new Scanner(stringArray[i]);\n \t\tfor (int x = 0; x < 18; x++){\n \t\t\tintegerArray[x] = input.nextInt();\n \t\t}\n \t\tgame.setIndividualScore(i, integerArray);\n \t} \n \t\n \tgame.calculateGameScore();\n \tint [] points = game.getArrayScore();\n \tString string =\"\";\n \tfor(int i = 0; i < group.getPlayers().size(); i++){\n \t\tstring = string + String.format(\"Player %s points: %d %n\",\n \t\t\t\tgroup.getPlayers().get(i).getName(), points[i] );\n \t}\n \tJOptionPane.showMessageDialog(null, string);\n }",
"public void actionPerformed (ActionEvent e) {\n \t\tJOptionPane.showMessageDialog(frame3,\n \t\t\t \"Player 1 is blue \\n\"\n \t\t\t \t\t+ \"Player 2 is red \\n\"\n \t\t\t \t\t+ \"Player 3 is green \\n\"\n \t\t\t \t\t+ \"Player 4 is yellow \\n\"\n \t\t\t \t\t+ \"A Warrior's token is a circle. Range:1, Move:3\\n\"\n \t\t\t \t\t+ \"A Ranger's token is a square. Range:4, Move:5\\n\"\n \t\t\t \t\t+ \"A Rogue's token is a triangle. Range:1, Move:6\\n\"\n \t\t\t \t\t+ \"A healer's token is a star. Range:3, Move:4\\n\"\n \t\t\t \t\t+ \"A Damage Mage's token is a pentagon. Range:3, Move:4\\n\", \n \t\t\t \"Key\",\n \t\t\t JOptionPane.PLAIN_MESSAGE);\n \t}",
"@Override\n public void gameChanged(GameChangedEvent<M> evt) {\n if (controller.isDone() && !winnerDialogShown_) {\n winnerDialogShown_ = true;\n showWinnerDialog();\n }\n else if (!winnerDialogShown_) {\n super.gameChanged(evt);\n }\n }",
"private void makeGUIVisible(){\n gameState = GameState.LOAD;\n notifyObservers();\n }",
"public void actionPerformed (ActionEvent event) {\n RainRunGUI.c1.show(RainRunGUI.cards, RainRunGUI.MENUPANEL);\n }",
"private void updateInfoBarOnClick() {\n\t\tif (!selectedList.isEmpty()) {\n\t\t\tStringBuilder label = new StringBuilder(\"Se selecciono: \");\n\t\t\tfor (Render<? extends MovableDrawing> selectedDrawing : selectedList) {\n\t\t\t\tlabel.append(selectedDrawing.getFigure().toString()).append(\", \");\n\t\t\t}\n\t\t\tlabel.setLength(label.length() - 2);\n\t\t\tstatusPane.updateStatus(label.toString());\n\t\t} else {\n\t\t\tstatusPane.updateStatus(\"Ninguna figura encontrada\");\n\t\t}\n\t}",
"private void info(ActionEvent x) {\n\t\tProject p = this.list.getSelectedValue();\n\t\tif (p != null) {\n\t\t\tcontroller.moreinfo(p.getName());\n\t\t}\n\t}",
"public void actionPerformed(ActionEvent e)\n\t{\n\t\tif(e.getSource() == play)\n\t\t{\n\t\t\tcl.show(this, \"Info\");\n\t\t}\n\t\telse if(e.getSource() == inst)\n\t\t{\n\t\t\tcl.show(this, \"Instructions\");\n\t\t}\n\t\telse if(e.getSource() == hs)\n\t\t{\n\t\t\thsp = new HigScoPanel();\n\t\t\tadd(\"High Scores\", hsp);\n\t\t\tcl.show(this, \"High Scores\");\n\t\t}\n\t\telse if(e.getSource() == tePan)\n\t\t{\n\t\t\tcl.show(this, \"Terms\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tcl.show(this, \"Base\");\n\t\t}\n\n\t}",
"private void play(Player p){\r\n\t\tSystem.out.println(\"What pet would you like to play with?\");\r\n\t\tint c = 1;\r\n\t\tArrayList<Toy> toys = p.getToys();\r\n\r\n\t\tfor(Pet pet : p.getPets()){\r\n\t\t\tSystem.out.println(c + \". \" + pet.getPetname());\r\n\t\t\tc++;\r\n\t\t}\r\n\t\tint selectedpetindex = getNumber(1, p.getPets().size());\r\n\t\tPet selectedpet = p.getPets().get(selectedpetindex - 1);\r\n\t\tSystem.out.println(\"What toy do you want to use to play with \" + selectedpet.getPetname());\r\n\r\n\t\tc = 1;\r\n\t\tfor(Toy t : toys){\r\n\t\t\tSystem.out.println(c + \". \" + t.getName());\r\n\t\t\tc++;\r\n\t\t}\r\n\t\tint toyindex = getNumber(1, toys.size());\r\n\t\tToy selectedtoy = toys.get(toyindex);\r\n\r\n\t\tselectedpet.play(selectedtoy);\r\n\t\tselectedtoy.setDurability(selectedtoy.getDurability() - selectedpet.getRoughness());\r\n\r\n\t\tif(selectedtoy.getDurability() < 1){\r\n\t\t\ttoys.remove(toyindex);\r\n\t\t}else{\r\n\t\t\ttoys.set(toyindex, selectedtoy);\r\n\t\t}\r\n\r\n\t\tp.setToys(toys);\r\n\t\tp.setActions(p.getActions() - 1);\r\n\t}",
"public void clickedSpeakerEdit() {\n\t\tif(mainWindow.getSelectedRowSpeaker().length <= 0) ApplicationOutput.printLog(\"YOU DID NOT SELECT ANY PRESENTATION\");\n\t\telse if(mainWindow.getSelectedRowSpeaker().length > 1) ApplicationOutput.printLog(\"Please select only one presentation to edit\");\n\t\telse {\n\t\t\tshowSpeakeerDetails(mainWindow.getSelectedRowSpeaker()[0]);\n\t\t}\t\n\t}",
"@Override\r\n\tpublic void stateChanged(ChangeEvent e) {\n\t\tif(e.getSource() == this.progress){\r\n\t\t\tint value = this.progress.getValue();\r\n\t\t\tif(value == 0 && this.left_button >0){\r\n\t\t\t\tthis.time.stop();\r\n\t\t\t\tthis.is_over = true;\r\n\t\t\t\t//锟斤拷示锟斤拷戏锟斤拷锟斤拷\r\n\t\t\t\tObject[] options = {\"yes\",\" no \"}; \r\n\t\t\t\tint response=JOptionPane.showOptionDialog(this, \"Play again?\", \"Game over!\", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE, null, options, options[0]);\r\n\t\t\t\tif(0 == response){\r\n\t\t\t\t\tthis.init();\t\t\t\t//锟斤拷锟斤拷锟斤拷戏\r\n\t\t\t\t}else if(1 == response){\r\n\t\t\t\t\tSystem.exit(0);\r\n\t\t\t\t}\r\n\t\t\t\tthis.init();\t\t\t\t\t//锟斤拷锟斤拷锟斤拷戏\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void itemStateChanged(ItemEvent e) {\n\t\t\t\tString teamName = teamBox.getSelectedItem().toString();\r\n\t\t\t\tpitm.findByTeam(teamName);\r\n\t\t\t\ttable.revalidate();\r\n\t\t\t\t// table.repaint();\r\n\r\n\t\t\t}",
"public void update() throws IOException {\r\n\t\t//Gets the x and y of the mouse relative to the frame\r\n\t\tint y = mhh.mouseY;\r\n\t\tint x = mhh.mouseX;\r\n\r\n\t\t//Makes sure the x and y doesn't go out of bounds\r\n\t\tif (x < 0) {\r\n\t\t\tx = 0;\r\n\t\t}\r\n\t\tif (y < 0) {\r\n\t\t\ty = 0;\r\n\t\t}\r\n\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t//Creates the hoveredColor based on the pixel rgb that coresponds to the x and y of the screen to the 2D array of the invisMap\r\n\t\tif ((y < imgH && x < imgW)) {\r\n\t\t\thoveredColor = new Color(invisData[x][y]);\r\n\t\t}\r\n\t\t\r\n\t\tif (started == false) {\r\n\t\t\t\r\n\t\t\tsaveButton.setVisible(false);\r\n\t\t\t\r\n\t\t\tcontinentData.setVisible(false);\r\n\t\t\tcardsData.setVisible(false);\r\n\t\t\tcardBackground.setVisible(false);\r\n\t\t\tphaseLabel.setVisible(false);\r\n\t\t\tphaseLabel2.setVisible(false);\r\n\t\t\t\r\n\t\t\tplayerNum.setText(\"SELECT THE NUMBER OF PLAYER: \" + playerPicker.getValue());\r\n\t\t\t\r\n\t\t}\r\n\t\t//If there has been no countries picked then it needs a player to select a country\r\n\t\telse if (CountryPicker.size() > 0 && mch.clicked) {\r\n\t\t\tpickCountry();\r\n\t\t\t\r\n\t\t\t//Once all countries have been selected it will allow the player to spread the initial troops\r\n\t\t} else if (initialtroops > 0 && mch.clicked) {\r\n\t\t\tinitialTroopSpread();\r\n\t\t\t\r\n\t\t\t//Once both of the above have been satisfied, it can start calling the phases (deploy, attack, etc.)\r\n\t\t} else if (mch.clicked) {\r\n\t\t\tphaseManager();\r\n\t\t}\r\n\r\n\t\t// Set phase label based on what phase of the game it is in, as well as how many countries that player has yet to deploy\r\n\t\tif(players.size() > 0) {\r\n\t\t\tif (CountryPicker.size() > 0) {\r\n\t\t\t\tphaseLabel.setText(\"Player \" + (turnCounter + 1) + \" - Select Country\");\r\n\t\t\t\tphaseLabel.setForeground(players.get(turnCounter).getColor());\r\n\t\t\t\tphaseLabel2.setText(\"Player \" + (turnCounter + 1) + \" - Select Country\");\r\n\t\t\t} else if (initialtroops > 0) {\r\n\t\t\t\tphaseLabel.setText(\"Player \" + (turnCounter + 1) + \" - Place Initial Troops\");\r\n\t\t\t\tphaseLabel.setForeground(players.get(turnCounter).getColor());\r\n\t\t\t\tphaseLabel2.setText(\"Player \" + (turnCounter + 1) + \" - Place Initial Troops\");\r\n\t\t\t\ttroopsToDeploy.setText((initialtroops - 1) / players.size() + 1 + \" Troops Remaining\");\r\n\t\t\t} else {\r\n\t\t\t\tphaseLabel.setText(\"Player \" + (turnCounter + 1) + \" - \" + phase);\r\n\t\t\t\tphaseLabel.setForeground(players.get(turnCounter).getColor());\r\n\t\t\t\tphaseLabel2.setText(\"Player \" + (turnCounter + 1) + \" - \" + phase);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif (players.size() > 0) {\r\n\t\t\tfor (Player p : players) {\r\n\t\t\t\tif (p.getCountries().size() == 42) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tendGame(p.getPlayerNum());\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t}\r\n\t\t//render the game base on chanegs made in the update class\r\n\t\trender();\r\n\t\t\r\n\t}",
"public void actionPerformed (ActionEvent e) {\n\t \t\tJOptionPane.showMessageDialog(frame3,\n\t \t\t\t \"Player 1 is blue \\n\"\n\t \t\t\t \t\t+ \"Player 2 is red \\n\"\n\t \t\t\t \t\t+ \"Player 3 is green \\n\"\n\t \t\t\t \t\t+ \"Player 4 is yellow \\n\"\n\t \t\t\t \t\t+ \"A Warrior's token is a circle. Range:1, Move:3\\n\"\n\t \t\t\t \t\t+ \"A Ranger's token is a square. Range:4, Move:5\\n\"\n\t \t\t\t \t\t+ \"A Rogue's token is a triangle. Range:1, Move:6\\n\"\n\t \t\t\t \t\t+ \"A healer's token is a star. Range:3, Move:4\\n\"\n\t \t\t\t \t\t+ \"A Damage Mage's token is a pentagon. Range:3, Move:4\\n\", \n\t \t\t\t \"Key\",\n\t \t\t\t JOptionPane.PLAIN_MESSAGE);\n\t \t}",
"public static void showParticle(Player p, Location loc, EnumParticle particle, int amount){\n PacketPlayOutWorldParticles pckt = new PacketPlayOutWorldParticles(particle, false, (float) loc.getX(), (float) loc.getY(), (float) loc.getZ(), 0f, 0f, 0f, /*speed*/0f, amount);\n ((CraftPlayer) p).getHandle().playerConnection.sendPacket(pckt);\n }",
"public void stampa() {\n GridPane matrice = new GridPane();\n buildGriglia(matrice);\n Text scritta;\n for (int i = 0; i < N; i++) {\n for (int j = 0; j < N; j++) {\n if (getElementAt(griglia, i, j).cerchio.isVisible()) {\n scritta = new Text(\"1\");\n }\n else {\n scritta = new Text(\"0\");\n }\n matrice.add(scritta, j, i);\n }\n }\n Scene scene3 = new Scene(matrice, N * 100, N * 100);\n Stage stage3 = new Stage();\n stage3.setTitle(\"Matrice di occupazione:\");\n stage3.setScene(scene3);\n stage3.show();\n }",
"@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tif (e.getSource() == button1) {\n\t\t prefDisplay();\n\t\t }\n\t}",
"@Override\n\t\t\tpublic void changed(ObservableValue<? extends Boolean> observable, Boolean oldValue, Boolean newValue) {\n\t\t\t\t\n\t\t\t\tif(newValue)\tselectedFeatures.add(FEATURES[3]);\n\t\t\t\telse \t\t\tselectedFeatures.remove(FEATURES[3]);\n\n\t\t\t\tif(selectedFeatures.size() > 2){\n\t\t\t\t\tAlert dialogoAviso = new Alert(Alert.AlertType.WARNING);\n\t\t dialogoAviso.setHeaderText(\"Por favor, selcione apenas duas caracteristicas!\");\n\t\t dialogoAviso.showAndWait();\n\t\t homogeneidade.setSelected(false);\n\t\t\t\t}\n\n\t\t\t\tfor(Integer i: selectedFeatures) System.out.println(\"caracteristcas selecionadas: \"+i);\n\t\t\t}",
"private void showMatch() {\n System.out.println(\"Player 1\");\n game.getOne().getField().showField();\n System.out.println(\"Player 2\");\n game.getTwo().getField().showField();\n }",
"@SneakyThrows\n private void premierLeague(ActionEvent event) {\n final Project project = table.getSelectionModel().getSelectedItem();\n if (project == null) {\n NotificationUtil.warningAlert(\"Warning\", \"Select project first\", NotificationUtil.SHORT);\n return;\n } else if (getFreeInstructors().isEmpty()) {\n NotificationUtil.warningAlert(\"Warning\", \"All instructors are busy\", NotificationUtil.SHORT);\n return;\n }\n\n final FXMLLoader fxmlLoader = new FXMLLoader();\n fxmlLoader.setLocation(getClass().getResource(\"/PremierLeague.fxml\"));\n Parent parent = fxmlLoader.load();\n PremierLeagueController premierLeagueController = fxmlLoader.getController();\n premierLeagueController.loadProjectDetails(project);\n\n final Stage stage = new Stage();\n Scene value = new Scene(parent);\n stage.setScene(value);\n value.getStylesheets().add(\"css/main.css\");\n stage.initModality(Modality.WINDOW_MODAL);\n Window window = ((Node) event.getSource()).getScene().getWindow();\n stage.initOwner(window);\n stage.show();\n\n stage.setOnHiding(e -> loadProjects());\n }",
"void selectPlayers(){\n\t\tframe.repaintAll();\n\t\tint numPlayers = inputNumPlayers();\n\t\t\n\t\t// let each player choose a character\n\t\tfor(int i=0; i<numPlayers; i++){\n\t\t\tJPanel panel = new JPanel(new GridLayout(0, 1));\n\t\t\t\n\t\t\t// determine which characters are available\n\t\t\tList<String> playerNames = new ArrayList<String>();\n\t\t\tfor(Player p : game.getPlayers()){\n\t\t\t\tplayerNames.add(p.getCharacter());\n\t\t\t}\n\t\t\t\n\t\t\t// create buttons\n\t ButtonGroup bg = new ButtonGroup();\n\t\t\tJRadioButton greenBtn = new JRadioButton(GameOfCluedo.GREEN);\n\t\t\tJRadioButton mustardBtn = new JRadioButton(GameOfCluedo.MUSTARD);\n\t\t\tJRadioButton peacockBtn = new JRadioButton(GameOfCluedo.PEACOCK); \n\t\t\tJRadioButton plumBtn = new JRadioButton(GameOfCluedo.PLUM); \n\t\t\tJRadioButton scarlettBtn = new JRadioButton(GameOfCluedo.SCARLETT); \n\t JRadioButton whiteBtn = new JRadioButton(GameOfCluedo.WHITE); \n\t \n\t String playerName = getPlayerName();\n\t \n\t panel.add(new JLabel(\"Who will \"+playerName+\" play as?\"));\n\t addAvailableCharacterOptions(panel, playerNames, bg, greenBtn,\n\t\t\t\t\tmustardBtn, peacockBtn, plumBtn, scarlettBtn, whiteBtn);\n\t\t\tJOptionPane.showMessageDialog(frame, panel, \"Character select\", JOptionPane.QUESTION_MESSAGE);\n\t\t\tgeneratePlayerFromInput(panel, playerName, greenBtn, mustardBtn, peacockBtn,\n\t\t\t\t\tplumBtn, scarlettBtn, whiteBtn);\n\t\t\t\n\t frame.repaintAll();\n\t\t}\n\t}",
"public void actionPerformed(ActionEvent e) {\n\t\t\t\tString technicalStaffName = (String) technicalStaffCombo.getSelectedItem();\n\t\t\t\tString qualityControllerName = (String) qualityControllerCombo.getSelectedItem();\n\n\t\t\t\tString error = null;\n\t\t\t\ttry {\n\t\t\t\t\tDatabase.switchPositions(technicalStaffName, qualityControllerName);\n\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\terror = e1.getMessage();\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\n\t\t\t\tshowResults(error, \"<html>Postions switched <br>\" + technicalStaffName + \"<->\" + qualityControllerName);\n\t\t\t}",
"static void feedPet() {\r\n\t\tJOptionPane.showMessageDialog(null, \"Your \" + pet + \" is happy and full.\");\r\n\t\thappinessLevel+=3;\r\n\t}",
"public void actionPerformed(ActionEvent e) {\n gui.activateTerrains(false);\n\n if (gui.getGUIState() == GUIState.MOVESHEEPFROM) {\n gui.activateTerrains(true);\n gui.setGUIState(GUIState.MOVESHEEPSELECTION);\n gui.activateSheepSelection(true, terrain);\n gui.getLAction2().setText(\"Seleziona quale ovino si vuole muovere\");\n } else if (gui.getGUIState() == GUIState.KILLSHEEP) {\n gui.setGUIState(GUIState.KILLSHEEPSELECTION);\n gui.activateSheepSelection(true, terrain);\n gui.getLAction2().setText(\"Seleziona quale ovino vuoi abbatere\");\n } else if (gui.getGUIState() == GUIState.JOINSHEEPS) {\n gui.setGUIState(GUIState.KILLSHEEPSELECTION);\n gui.sendJoinSheeps(terrain);\n } else if (gui.getGUIState() == GUIState.MOVESHEEPTO) {\n gui.activateDropDown(false);\n gui.setGUIState(GUIState.WAITINGFOROTHERPLAYER);\n gui.sendMoveSheep(terrain);\n }\n\n }",
"public void update (AnActionEvent e)\n {\n Presentation presentation = e.getPresentation ();\n boolean selectable = false;\n Project project = DataKeys.PROJECT.getData (e.getDataContext ());\n UMLDiagramsPanel diagrams = ProjectUtils.get (project, UMLDiagramsPanel.class);\n if (diagrams != null)\n {\n UMLDiagram umlDiagram = diagrams.getCurrentDiagram ();\n selectable = umlDiagram != null;\n }\n presentation.setEnabled (selectable);\n }",
"public void update (AnActionEvent e)\n {\n Presentation presentation = e.getPresentation ();\n boolean selectable = false;\n Project project = DataKeys.PROJECT.getData (e.getDataContext ());\n UMLDiagramsPanel diagrams = ProjectUtils.get (project, UMLDiagramsPanel.class);\n if (diagrams != null)\n {\n UMLDiagram umlDiagram = diagrams.getCurrentDiagram ();\n selectable = umlDiagram != null;\n }\n presentation.setEnabled (selectable);\n }",
"@Override\n public void show () {\n g.prefs = Gdx.app.getPreferences(\"potions_master_preferences\");\n g.lang = g.prefs.getInteger(\"language\", 0);\n g.atlas = new TextureAtlas(\"textures/textures.atlas\");\n g.textSystem = new TextSystem(g.lang);\n g.sounds = new Sounds();\n g.fonts = new Fonts(g.textSystem.get(\"FONT_CHARS\"));\n g.ingredients = new Ingredients(g);\n g.potions = new Potions();\n\n g.w = Gdx.graphics.getWidth();\n g.h = Gdx.graphics.getHeight();\n\n g.pixel_size = .00625f * g.w;\n g.tile_size = g.pixel_size * 16f;\n\n String[] inv = g.prefs.getString(\"inventory\", \"\").split(\" \");\n for (String s : inv) {\n for (Ingredient i : g.ingredients.list) {\n if (i.getId().equals(s))\n g.ingredients.inventory.add(i);\n }\n }\n\n String[] add = g.prefs.getString(\"added\", \"\").split(\" \");\n for (String s : add) {\n for (Ingredient i : g.ingredients.list) {\n if (i.getId().equals(s))\n g.ingredients.added.add(i);\n }\n }\n\n g.is_music = g.prefs.getBoolean(\"is_music_on\", true);\n g.is_sound = g.prefs.getBoolean(\"is_sound_on\", true);\n\n g.music_volume = g.prefs.getFloat(\"music_volume\", 1f);\n g.sound_volume = g.prefs.getFloat(\"sound_volume\", 1f);\n\n g.week = g.prefs.getInteger(\"week\", 1);\n g.money = g.prefs.getInteger(\"money\", 0);\n g.potions_cooked = g.prefs.getInteger(\"potion_cooked\", 0);\n\n g.is_potion_cooked = false;\n g.potion_color = new Color();\n\n for (int i = 0; i < g.potions_cooked; ++i) {\n String[] p_h = g.prefs.getString(\"potion_history_\" + i, \"\").split(\" \");\n g.potions.list.add(new Potion(\n new String[] {p_h[4], p_h[5], p_h[6], p_h[7]},\n new int[] {\n Integer.parseInt(p_h[0]),\n Integer.parseInt(p_h[1]),\n Integer.parseInt(p_h[2]),\n Integer.parseInt(p_h[3])\n },\n Integer.parseInt(p_h[8]),\n Integer.parseInt(p_h[9])\n ));\n }\n\n if (g.is_music) {\n g.sounds.music_1.setLooping(true);\n g.sounds.music_1.setVolume(g.music_volume);\n g.sounds.music_1.play();\n }\n\n }",
"@Override\n\t\t\tpublic void stateChanged(ChangeEvent e) {\n\t\t\t\tif(achatVente.isSelected()) {\n\t\t\t\t\tquantity.setVisible(true);\n\t\t\t\t\tchampPlus.setText(\"Quantité\");\n\t\t\t\t\t}\n\t\t\t\telse quantity.setVisible(false);\n\t\t\t}",
"private void jButton6ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton6ActionPerformed\n // TODO add your handling code here:\n //equipo1.setText(\"hola sdsadad sdasdsad sdsdsdsf dfdsfdsf dfdsfsd dfdsfsdfsd sdfsdfdsf sdfdsfsd fsdfsdf sdfsd fdsf sdf sdf sdfsdf sdfsd fsd fsdfdsf sd fsdf sdfsdfsdf sdf sdfsdf sdf sdfsdf dsf sdf sdf sdfsd fsdf sdf sdfs dfsdf sdf sdfsdfd fdf sdfsd fsdf dsf sdf sdf sd fsdfsdf sdf sdf df sdfsd fsd fsdf sdf sdfsd fsdf sdf sdf sdf sdf sdfsd fsdf sdf \");\n fondeishon2.setVisible(false);\n equipo2.setText(getDatosJugadores(teams[1]));\n \n \n \n }",
"@Override\n\tpublic void update(Observable observable, Object data) {\n\t\tIGameWorld gw = (IGameWorld) data;\n\t\tthis.pointsValueLabel.setText(\"\" + gw.getPlayerScore());\n\t\tthis.missileValueLabel.setText(\"\" + gw.getPSMissileCount());\n\t\tthis.gameTickValueLabel.setText(\"\" + gw.getRealTime());\n\t\tthis.lifeValueLabel.setText(\"\" + gw.getLife());\n\t\t\n\t\t//If sound flag dont match\n\t\tif(gw.getSound() != this.sound) {\n\t\t\tif(gw.getSound() == true) {\n\t\t\t\tthis.soundValueLabel.setText(\"ON\");\n\t\t\t\tthis.sound = true;\n\t\t\t\t//new BGSound(\"bgm.mp3\").play();\n\t\t\t//\tbgm.play();\n\t\t\t\tSystem.out.println(\"Sound ON\");\n\t\t\t\t\n\t\t\t}else {\n\t\t\t\tthis.soundValueLabel.setText(\"OFF\");\n\t\t\t\tthis.sound = false;\n\t\t\t//\tbgm.pause();\n\t\t\t}\n\t\t}\n\n\t\tthis.repaint(); //Redraw PointsView\n\t}",
"public void statusChanged(GameStatusEvent e) {\n gameRunning = false;\n if(e.isGameOver()) {\n gameWon = false;\n hauptfenster.getSounds().playGameOver(); // abspielen der Sounds\n } else if(e.isGameWon()) {\n gameWon = true;\n hauptfenster.getSounds().playGameWon(); // abspielen der Sounds\n }\n hauptfenster.getSpielfeld().drawNew(); // Spielfeld neu zeichnen\n hauptfenster.getToolbar().updateToolbar(hauptfenster.getDionaRapModel().getShootAmount(), hauptfenster.getDionaRapModel().getScore(), hauptfenster.getProgress());\n hauptfenster.getSpielfeld().gameStatusEnd(hauptfenster.getPlayer(), gameWon); // das Icon bei gewonnen oder verloren setzen\n hauptfenster.getToolbar().setEnabled(); // den \"Neues Spiel\"-Button auf aktiv setzen\n hauptfenster.getMenubar().setGameSettingsEnabled(); // den \"Spieleinstellungen\"-Button auf aktiv setzen\n\n int end_position = HighScoreFile.SCORE_TO_LOW_FOR_HIGHSCORE;\n try{\n end_position = HighScoreFile.getInstance().getScorePosition(hauptfenster.getDionaRapModel().getScore()); // auslesen der Position\n } catch (IOException ex) {\n System.err.println(\"File kann nicht gelesen werden: \" + ex);\n }\n if(end_position != HighScoreFile.SCORE_TO_LOW_FOR_HIGHSCORE && gameWon) {\n addBestlist(); // Bestenliste Dialog zeichnen\n }\n addDialog(gameWon); // den Dialog zeichnen\n }",
"@Override public void widgetSelected(SelectionEvent arg0) {\n\t\t\t if((gameAlive == false)&&(! (domain.getText().isEmpty()))&&(! algorithm.getText().isEmpty())&&(! hardLevel.getText().isEmpty())) {\r\n\t\t\t\t //get selected combos and start conversation with the model\r\n\t\t\t\t String s = \"SelectGame \"+domain.getText()+\":\"+hardLevel.getText()+\",SelectAlgoritm \"+algorithm.getText()+\",play\";\r\n\t\t\t\t actions = s.split(\",\");\r\n\t\t\t\t gameAlive = true;\r\n\t\t\t\t if(domain.getText().equals(\"TicTacToe\")) {\r\n\t\t\t\t\t board = new TicTacToeCanvas(shell, SWT.BORDER, view);\r\n\t\t\t\t\t shell.setSize(shell.getSize().x+1, shell.getSize().y+1);\r\n\t\t\t\t\t// board.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 3, 6));\r\n\t\t\t\t }\r\n\t\t\t\t else if(domain.getText().equals(\"Reversi\")) {\r\n\t\t\t\t\t board = new ReversiCanvas(shell, SWT.BORDER, view);\r\n\t\t\t\t\t shell.setSize(shell.getSize().x+1, shell.getSize().y+1);\r\n\t\t\t\t }\r\n\t\t\t\t try {\r\n\t\t\t\t\t startView();\r\n\t\t\t\t } catch (IOException e) {\r\n\t\t\t\t\t getExeptionMessage(e.getMessage());\r\n\t\t\t\t }\r\n\t\t\t }\r\n\t\t }",
"@Override\n\t\t\tpublic void stateChanged(ChangeEvent e) {\n\t\t\t\tif(location.isSelected()) {\n\t\t\t\t\tduree.setVisible(true);\n\t\t\t\t\tchampPlus.setText(\"Durée\");}\n\t\t\t\telse\n\t\t\t\t\tduree.setVisible(false);\n\t\t\t}",
"void gameSelected(boolean isAdmin, boolean isRunning);",
"public void actionPerformed(ActionEvent evt) {\n\t\tString text = ((JButton) evt.getSource()).getName();\n\t\tif (text != null && text.equals(\"quit\")) {\n\t\t\tSystem.exit(0);\n\t\t}\n\t\tif (text != null && text.equals(\"finished\")) {\n\t\t\tfinishedPicking = true;\n\t\t\tbluePickHighlight.setVisible(false);\n\t\t\tpurplePickHighlight.setVisible(false);\n\t\t\tbluePick = false;\n\t\t\tpurplePick = false;\n\t\t\treturn;\n\t\t}\n\t\tString output = text;\n\t\tif (blueBan) {\n\t\t\tint err = banBlueChampion(output);\n\t\t\tif (err == 0) {\n\t\t\t\tpurpleBan = true;\n\t\t\t\tblueBan = false;\n\t\t\t\tblueBanHighlight.setVisible(false);\n\t\t\t\tpurpleBanHighlight.setVisible(true);\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tif (purpleBan) {\n\t\t\tint err = banPurpleChampion(output);\n\t\t\tif (err == 0) {\n\t\t\t\tpurpleBan = false;\n\t\t\t\tpurpleBanHighlight.setVisible(false);\n\t\t\t\tif (numPurpleBans < 3) {\n\t\t\t\t\tblueBan = true;\n\t\t\t\t\tblueBanHighlight.setVisible(true);\n\t\t\t\t} else {\n\t\t\t\t\tbottomPanel.remove(blueBanHighlight);\n\t\t\t\t\tbottomPanel.remove(purpleBanHighlight);\n\t\t\t\t\tbluePick = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tif (bluePick) {\n\t\t\tint err = pickBlueChampion(output);\n\t\t\tif (err == 0) {\n\t\t\t\tif (numBluePicks == 1 || numBluePicks == 3) {\n\t\t\t\t\tbluePick = false;\n\t\t\t\t\tbluePickHighlight.setVisible(false);\n\t\t\t\t\tpurplePickHighlight.setBounds(45, 10 + numPurplePicks*100, 210, 88);\n\t\t\t\t\tpurplePickHighlight.setVisible(true);\n\t\t\t\t\tpurplePick = true;\n\t\t\t\t}\n\t\t\t\telse if (numBluePicks == 5) {\n\t\t\t\t\tbluePickHighlight.setVisible(false);\n\t\t\t\t\tbluePick = false;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tbluePickHighlight.setBounds(18, 10 + numBluePicks*100, 210, 88);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tif (purplePick) {\n\t\t\tint err = pickPurpleChampion(output);\n\t\t\tif (err == 0) {\n\t\t\t\tif (numPurplePicks == 2 || numPurplePicks == 4) {\n\t\t\t\t\tbluePick = true;\n\t\t\t\t\tbluePickHighlight.setBounds(18, 10 + numBluePicks*100, 210, 88);\n\t\t\t\t\tbluePickHighlight.setVisible(true);\n\t\t\t\t\tpurplePick = false;\n\t\t\t\t\tpurplePickHighlight.setVisible(false);\n\t\t\t\t} else {\n\t\t\t\t\tpurplePickHighlight.setBounds(45, 10 + numPurplePicks*100, 210, 88);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t}",
"public void PrevGame(){\n partidaNum --;\n current = current.getAnterior();\n ListaDoble partida = (ListaDoble) current.getDato();\n currentTurn = partida.getInicio();\n String turno = (String) currentTurn.getDato();\n String info[] = turno.split(\"#\");\n\n int infoIn = 4;\n for (int i = 0; i < 10; i++, infoIn += 1) {\n label_list[i].setIcon(new ImageIcon(info[infoIn]));\n this.screen.add(label_list[i]);\n }\n HP.setText(\"HP: \"+info[2]);\n action.setText(\"Action: \"+info[1]);\n mana.setText(\"Mana: \"+info[3]);\n game.setText(\"Game \"+String.valueOf(partidaNum)+\", Turn \"+info[0]);\n\n VerifyButtons();\n\n }",
"@Override\r\n\t\t\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\t\tif(match.getMatchStatus() != MatchStatus.ENDED) {\r\n\t\t\t\t\t\t\tmatch.simMatch(); \r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif (p1==match.getWinner()) { \r\n\t\t\t\t\t\t\t\tPlayer1.setForeground(Color.GREEN);\r\n\t\t\t\t\t\t\t\tPlayer2.setForeground(Color.red); \r\n\t\t\t\t\t\t\t}else { \r\n\t\t\t\t\t\t\t\tPlayer2.setForeground(Color.green);\r\n\t\t\t\t\t\t\t\tPlayer1.setForeground(Color.red); \r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\tmatchStatus.setText(\" Ended\");\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}",
"public static void showPreviousSelectedGameType() {\r\n\t\tGameSetup.threeHanded.setState(Main.isThreeHanded);\r\n\t\tGameSetup.fourHandedSingle.setState(Main.isFourHandedSingle);\r\n\t\tGameSetup.fourHandedTeams.setState(Main.isFourHandedTeams);\r\n\t}",
"public void victory() {\n fieldInerface.setPleasedSmile();\n fieldInerface.timestop();\n int result = fieldInerface.timeGet();\n /*try {\n if (result < Integer.parseInt(best.getProperty(type))) {\n best.setProperty(type, Integer.toString(result));\n fieldInerface.makeChampionWindow(type);\n }\n } catch (NullPointerException e) {\n } catch (NumberFormatException e) {\n best.setProperty(type, Integer.toString(result));\n fieldInerface.makeChampionWindow(type);\n }*/\n\n gamestart = true; // new game isn't started yet!\n for (int j = 0; j < heightOfField; j++)\n for (int i = 0; i < widthOfField; i++)\n if (fieldManager.isCellMined(i, j))\n if (!fieldManager.isCellMarked(i, j)) {\n fieldInerface.putMarkToButton(i, j);\n fieldInerface.decrement();\n }\n gameover = true; // game is over!!\n }",
"@FXML\n void paintSelected(ActionEvent event) {\n\n //Gets all paintings not being sold by you.\n String sqlSelect = \"Select * from artwork, auction where auction.auctionid = artwork.artworkid and auctioncomp = 0 and \" +\n \"artwork.typeOfArtwork = 'painting' and auction.seller <> '\" + this.username + \"';\";\n\n artworkTilePane.getChildren().clear(); //delete all previous artworks.\n getImages(FXCollections.observableArrayList(artworkDatabaseManager.getAllArtworks(sqlSelect)));\n }",
"public void trigger()\r\n\t{\r\n\t\tif(!this.inProgress && this.round >= Config.RoundLimit)\r\n\t\t{\r\n\t\t\tthis.sendMessages(new String[]{\"The game has already ended.\"});\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tint count = this.playerCount();\r\n\t\t\tif(count > 1 && count - this.readyCount() == 0)\r\n\t\t\t{\r\n\t\t\t\tList<String> messages = new LinkedList<>();\r\n\t\t\t\tif(this.inProgress)\r\n\t\t\t\t{\r\n\t\t\t\t\tif(Config.Phases[this.phase].equals(Config.VotePhaseName))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tmessages.add(\"Voting ended. Counting votes.\");\r\n\t\t\t\t\t\t// Sum all the votes from each player.\r\n\t\t\t\t\t\tint[] votes = new int[Config.TableCards];\r\n\t\t\t\t\t\tfor(Player player : this.players)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tif(player != null)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tint[] playerVotes = player.getVotes();\r\n\t\t\t\t\t\t\t\tint i = 0;\r\n\t\t\t\t\t\t\t\twhile(i < playerVotes.length)\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\tif(playerVotes[i] != 0)\r\n\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\tvotes[i] += playerVotes[i];\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t++i;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tplayer.resetVotes();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t// Pick the cards with more yes votes than no votes.\r\n\t\t\t\t\t\tList<Card> picked = new LinkedList<>();\r\n\t\t\t\t\t\tint pos = 0;\r\n\t\t\t\t\t\twhile(pos < this.onTable.size())\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tif(votes[pos] > 0)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tCard card = this.onTable.get(pos);\r\n\t\t\t\t\t\t\t\tpicked.add(card);\r\n\t\t\t\t\t\t\t\tfor(Share price : this.prices)\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\tif(price.getStock().equals(card.stock))\r\n\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\tprice.addShares(card.effect);\r\n\t\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t++pos;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t// Prepare the output string for the picked cards.\r\n\t\t\t\t\t\tString message = \"\";\r\n\t\t\t\t\t\tboolean isNotFirst = false;\r\n\t\t\t\t\t\tfor(Card card : picked)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tif(isNotFirst)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tmessage += \", \";\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tisNotFirst = true;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tmessage += card.stock;\r\n\t\t\t\t\t\t\tif(card.effect > 0)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tmessage += \"+\";\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tmessage += card.effect;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tthis.dealToTable();\r\n\t\t\t\t\t\tmessages.add(\"Picked influence cards: \" + message);\r\n\t\t\t\t\t\tmessages.add(\"\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\t++this.phase;\r\n\t\t\t\t\tif(this.phase >= Config.Phases.length)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tthis.phase = 0;\r\n\t\t\t\t\t\t++this.round;\r\n\t\t\t\t\t\tif(this.round >= Config.RoundLimit)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tthis.stopGame();\r\n\t\t\t\t\t\t\tShare[] prices = this.prices.toArray(new Share[0]);\r\n\t\t\t\t\t\t\tfor(Player player : this.players)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tif(player != null)\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\tplayer.sellAll(prices);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tmessages.add(\"Game over. Scores:\");\r\n\t\t\t\t\t\t\t// Copy and sort the players list by total money.\r\n\t\t\t\t\t\t\tPlayer[] winners = Arrays.copyOf(this.players, this.players.length);\r\n\t\t\t\t\t\t\tArrays.sort(winners, (Player o1, Player o2) -> {\r\n\t\t\t\t\t\t\t\tif(o1 == null && o2 == null)\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\treturn 0;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\telse if(o1 == null)\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\treturn 1;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\telse if(o2 == null)\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\treturn -1;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\treturn o2.getMoney() - o1.getMoney();\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t\tint lastScore = winners[0].getMoney();\r\n\t\t\t\t\t\t\tint num = 0;\r\n\t\t\t\t\t\t\tint i = 0;\r\n\t\t\t\t\t\t\twhile(i < winners.length)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tif(winners[i] == null)\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\tif(lastScore > winners[i].getMoney())\r\n\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\tnum = i;\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\tmessages.add(Config.PlayerPositions[num] + \": Player \" + winners[i].getPlayerNumber() + \", \" + winners[i].getName() + \" - \" + Config.Currency + winners[i].getMoney());\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t++i;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tmessages.add(\"Round \" + (this.round + 1) + \" of \" + Config.RoundLimit + \".\");\r\n\t\t\t\t\t\t\tmessages.add(Config.Phases[this.phase] + \" phase started.\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tmessages.add(Config.Phases[this.phase] + \" phase started.\");\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tthis.inProgress = true;\r\n\t\t\t\t\tmessages.add(\"Game started. Round \" + (this.round + 1) + \" of \" + Config.RoundLimit + \".\");\r\n\t\t\t\t\tmessages.add(Config.Phases[this.phase] + \" phase started.\");\r\n\t\t\t\t}\r\n\t\t\t\tthis.sendMessages(messages.toArray(new String[0]));\r\n\t\t\t\tfor(Player player : this.players)\r\n\t\t\t\t{\r\n\t\t\t\t\tif(player != null)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tplayer.setReady(false);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"@FXML\n public void sculpSelected() {\n\n //Gets all sculpture artworks not being sold by you.\n String sqlSelect = \"Select * from artwork, auction where auction.auctionid = artwork.artworkid and auctioncomp = 0 and artwork.typeOfArtwork = \" +\n \"'sculpture' and auction.seller <> '\" + this.username + \"';\";\n\n artworkTilePane.getChildren().clear(); //delete all previous artworks.\n getImages(FXCollections.observableArrayList(artworkDatabaseManager.getAllArtworks(sqlSelect)));\n }",
"@Override\n\t\t\tpublic void changed(ObservableValue<? extends Boolean> observable, Boolean oldValue, Boolean newValue) {\n\t\t\t\t\n\t\t\t\tif(newValue)\tselectedFeatures.add(FEATURES[2]);\n\t\t\t\telse \t\t\tselectedFeatures.remove(FEATURES[2]);\n\t\t\t\t\n\t\t\t\tif(selectedFeatures.size() > 2){\n\t\t\t\t\tAlert dialogoAviso = new Alert(Alert.AlertType.WARNING);\n\t\t dialogoAviso.setHeaderText(\"Por favor, selcione apenas duas caracteristicas!\");\n\t\t dialogoAviso.showAndWait();\n\t\t entropy.setSelected(false);\n\t\t\t\t}\n\n\t\t\t\tfor(Integer i: selectedFeatures) System.out.println(\"caracteristcas selecionadas: \"+i);\n\t\t\t}",
"@Override\n\t\t\tpublic void stateChanged(ChangeEvent e) {\n\t\t\t\tif(miseEnRelation.isSelected()) {\n\t\t\t\t\ttypeEmploi.setVisible(true);\n\t\t\t\tchampPlus.setText(\"Type emploi\");}\n\t\t\t\telse\n\t\t\t\t\ttypeEmploi.setVisible(false);\n\t\t\t}",
"@FXML\n private void pickDiscThree() {\n activeDisc = \"Disc 3\";\n discSwitchButton.setText(\"Disc 3\");\n displayFilesFromDisc();\n }",
"public void update(double delta){\n \tthis.av.update();\n \t\n \t//checar� a cada update se haver� colis�o\n \tfor(int i=0;i<10;i++){\n \t\t//se houver colis�o entre Avatar e os lixos normais, ser�o acrescidos 10 pontos ao player\n\t\t\tif(this.lixo[i].collision(av, lixo[i])){\n\t\t\t\tScorePanel.score += 10;\n\t\t\t}\n\t\t}\n \t\n \t//Checa se todos os lixos Foram coletados\n<<<<<<< HEAD\n \tif(ScorePanel.getScore() == 100 && telaConcluida == false){\n \t\ttelaConcluida = true;\n \t\t//JOptionPane.showMessageDialog(null, \"Fase 1 conclu�da!!!\");\n \t\t//ScorePanel.setScoreToZero();\n=======\n \tif(Garbage.getScore() == 100){\n \t\tJOptionPane.showMessageDialog(null, \"Fase 1 conclu�da!!!\");\n \t\tGarbage.setScoreToZero();\n>>>>>>> c1516bff6596a16ab28a02b04aa726b8350d9899\n \t}\n \t\n \t//se houver colis�o entre Avatar e o lixo especial, ser�o acrescidos 10 segundos a mais para o player\n \tif(lixoEspecial.collision(av, lixoEspecial)){\n \t\tTimerGameplay.tempo += 10; \n \t}\n }\n \n //atualiza renderização\n public void draw(){\n \tthis.repaint();\n }\n\t\n\t@Override\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t/*/limites do campo e coordenadas\n\t\tSystem.out.println(\"ACTION EVENT\");\n\t\t\n\t\tif(this.av.x<0){\n\t\t\tthis.av.vx = 0;\n\t\t\tthis.av.x = 0;\n\t\t}\n\t\t\n\t\tif(this.av.x> 800){\n\t\t\tthis.av.vx = 0;\n\t\t\tthis.av.x = 800;\n\t\t}\n\t\t\n\t\tif(this.av.y<0){\n\t\t\tthis.av.vy = 0;\n\t\t\tthis.av.y = 0;\n\t\t}\n\t\t\n\t\tif(this.av.y> 570){\n\t\t\tthis.av.vy = 0;\n\t\t\tthis.av.y = 570;\n\t\t}\n\t\tthis.av.x = this.av.x + this.av.vx;\n\t\tthis.av.y = this.av.y + this.av.vy;\n\t\t\n\t\t//repaint();//*/\n\t}//*/\n\n\t@Override\n\tpublic void keyPressed(KeyEvent e) {\n\t\tthis.av.keyPressed(e);\n\t}\n\n\t@Override\n\tpublic void keyReleased(KeyEvent e) {\n\t\tthis.av.keyReleased(e);\n\t}\n\n\t@Override\n\tpublic void keyTyped(KeyEvent e) {}",
"@Override\n public void clicked(InputEvent event, float x, float y) {\n selecionado.play();\n ((Game) Gdx.app.getApplicationListener()).setScreen(new PlayScreen(game, level));\n dispose();\n }",
"@Override\n public void onTracksChanged(TrackGroupArray trackGroups, TrackSelectionArray trackSelections) {\n txtName.setText(\"Playing: \" + getVideoName()[exoPlayerInstance.getCurrentWindowIndex()].toUpperCase());\n }",
"public void updatePlayerPanel()\n {\n playerInfoPanel.updateLabel();\n }",
"public void gameOver() {\r\n\t\tSystem.out.println(\"[DEBUG LOG/Game.java] Game is over. Calculating points\");\r\n\t\tstatus = \"over\";\r\n\t\ttry {\r\n\t\t\tupdateBoard();\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tupdateEvents(false);\r\n\t\tEmbedBuilder embed = new EmbedBuilder();\r\n\t\tembed.setTitle(\"Game Results\");\r\n\t\tMap<Integer, Integer> scores = new HashMap<Integer, Integer>();\r\n\t\t\r\n\t\tfor (int i = 0; i < players.size(); i++) {\r\n\t\t\tscores.put(i,players.get(i).calculatePoints());\r\n\t\t\t// Utils.getName(players.get(i).getPlayerID(),guild)\r\n\t\t}\r\n\t\t\r\n\t\tList<Entry<Integer, Integer>> sortedList = sortScores(scores);\r\n\t\t\r\n\t\t// If tied, add highest artifact values\r\n\t\tif ((playerCount > 1) && (sortedList.get(0).getValue().equals(sortedList.get(1).getValue()))) {\r\n\t\t\tSystem.out.println(\"[DEBUG LOG/Game.java] Scores were tied\");\r\n\t\t\tint highestScore = sortedList.get(0).getValue();\r\n\t\t\tfor (Map.Entry<Integer, Integer> entry : sortedList) {\r\n\t\t\t\t// Only add artifacts to highest scores\r\n\t\t\t\tif (entry.getValue().equals(highestScore)) {\r\n\t\t\t\t\tscores.put(entry.getKey(),entry.getValue()+players.get(entry.getKey()).getHighestArtifactValue());\r\n\t\t\t\t\tplayers.get(entry.getKey()).setAddedArtifactValue(true);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// Sort with added artifact values\r\n\t\tsortedList = sortScores(scores);\r\n\t\t\r\n\t\t// Assigns 1st, 2nd, 3rd\r\n\t\tfor (int i = 0; i < sortedList.size(); i++) {\r\n\t\t\tMap.Entry<Integer, Integer> entry = sortedList.get(i);\r\n\t\t\t// If tie, include artifact\r\n\t\t\tString name = Utils.getName(players.get(entry.getKey()).getPlayerID(),guild);\r\n\t\t\tif (players.get(entry.getKey()).getAddedArtifactValue()) {\r\n\t\t\t\tint artifactValue = players.get(entry.getKey()).getHighestArtifactValue();\r\n\t\t\t\tembed.addField(Utils.endGamePlaces[i],\"**\"+name+\"** - ``\"+(entry.getValue()-artifactValue)+\" (\"+artifactValue+\")``\",true);\r\n\t\t\t} else {\r\n\t\t\t\tembed.addField(Utils.endGamePlaces[i],\"**\"+name+\"** - ``\"+entry.getValue()+\"``\",true);\r\n\t\t\t}\r\n\t\t}\r\n\t\tembed.setFooter(\"Credit to Renegade Game Studios\", null);\r\n\t\tgameChannel.sendMessage(embed.build()).queueAfter(dragonAttackingDelay+3000,TimeUnit.MILLISECONDS);\r\n\t\t\r\n\t\tGlobalVars.remove(this);\r\n\t}",
"@Override\n\tpublic void actionPerformed(ActionEvent e)\n\t{\n\t\tDisplayThree.getInstance().addBox.changeContents(\"CREATURE\", true);\n\t\t\n\t\tif (e.getSource() == upArrowButton)\n\t\t{\n\t\t\tscrollUp();\n\t\t\t\n\t\t} else if (e.getSource() == downArrowButton)\n\t\t{\n\t\t\tscrollDown();\n\t\t\t\n\t\t} else if (e.getSource() == middleButtons[0])\n\t\t{\n\t\t\tselectedCreature = thingsInColumn.get(itemsVisible[0]);\n\t\t\t\n\t\t} else if (e.getSource() == middleButtons[1])\n\t\t{\n\t\t\tselectedCreature = thingsInColumn.get(itemsVisible[1]);\n\t\t\t\n\t\t} else if (e.getSource() == middleButtons[2])\n\t\t{\n\t\t\tselectedCreature = thingsInColumn.get(itemsVisible[2]);\n\t\t\t\n\t\t} else if (e.getSource() == middleButtons[3])\n\t\t{\n\t\t\tselectedCreature = thingsInColumn.get(itemsVisible[3]);\n\t\t}\n\t}",
"private void playButtonActionPerformed(java.awt.event.ActionEvent evt) {\n for(AudioVisualMaterial currentAudio : audio){ //iterates through audio array\n currentMaterial = currentAudio; //passes local variable into class variable\n if(audioCB.getSelectedItem() == currentMaterial.getAuthor()){ //if comboBox selection matches an audio material's author\n currentMaterial.setupSoundClip();\n currentMaterial.playSoundClip(); //play audio sound clip\n }\n }\n\n //enhanced for loop that plays a video soundClip if selected when play button is pressed\n for(AudioVisualMaterial currentVideo : video){ //iterates through video array\n currentMaterial = currentVideo; //passes local variable into class variable\n if(videoCB.getSelectedItem() == currentMaterial.getTitle()){ //if comboBox selection matches a video's title\n currentMaterial.setupSoundClip();\n currentMaterial.playSoundClip(); //play video sound clip\n }\n }\n }",
"@Override\r\n\t public void actionPerformed(ActionEvent event) {\n\t \t\t\tJOptionPane.showMessageDialog(gameFrame,\r\n\t \t\t\t regles,\"Règles du jeu\", JOptionPane.INFORMATION_MESSAGE);\r\n\t \t\t\t\r\n\t }",
"private void randomEventPhase() {\n ClickObserver.getInstance().setTerrainFlag(\"RandomEvents\");\n ArrayList<Piece> randomEvents = new ArrayList<Piece>();\n\n Platform.runLater(new Runnable() {\n @Override\n public void run() {\n Game.getHelpText().setText(\"Random Event Phase. Players may now play 1 Random Event from their racks.\");\n }\n });\n\n try { Thread.sleep(2000); } catch(Exception e) { return; }\n\n for (Player p : playerList) {\n player = p;\n doneClicked = false;\n ClickObserver.getInstance().setActivePlayer(player);\n\n pause();\n\n Platform.runLater(new Runnable() {\n @Override\n public void run() {\n TheCupGUI.update();\n Game.getRackGui().setOwner(player);\n }\n });\n\n Platform.runLater(new Runnable() {\n @Override\n public void run() {\n Game.getHelpText().setText(player.getName() + \", you may now play one of your Random Events.\");\n }\n });\n\n while (isPaused) {\n while (!doneClicked) {\n if (randomEventFlag) {\n System.out.println(randomEvent.getName());\n ((RandomEvent)randomEvent).performAbility();\n break;\n }\n \n try { Thread.sleep(100); } catch( Exception e ){ return; }\n }\n try { Thread.sleep(100); } catch( Exception e ){ return; }\n }\n randomEventFlag = false;\n randomEvent = null;\n }\n ClickObserver.getInstance().setTerrainFlag(\"\"); \n }",
"private void videoCBItemStateChanged(java.awt.event.ItemEvent evt) {\n for(AudioVisualMaterial currentVideo : video){ //iterates through video array\n currentMaterial = currentVideo; //passes local variable into class variable\n if(videoCB.getSelectedItem() == currentMaterial.getTitle()){ //if comboBox selection matches a video's title\n videoText.setText(currentMaterial.displayInfo()); //display that video's info in TextArea\n videoImage.setIcon(currentMaterial.getCoverImage()); //display that video's image\n currentMaterial.setupSoundClip(); //set up sound clip\n currentMaterial.playSoundClip(); //play that video's soundClip\n }\n if(videoCB.getSelectedItem() != currentMaterial.getTitle()){ //if combobox selection does not match a video's title\n currentMaterial.setupSoundClip(); //set up sound clip\n //currentMaterial.stopSoundClip(); //stop sound clip\n }\n if(videoCB.getSelectedItem() == SelectVideo.getTitle()){ //if combobox selection matches default title\n videoText.setText(\"\"); //clear text\n }\n }\n }",
"private void setDisplay(Graph graph){\r\n\r\n if(currentGraph!=null) {\r\n resetHintButtons();\r\n int v=graph.getVertices();\r\n if(v<=10){\r\n Parameters.maxPushOf=30;\r\n }\r\n if(10<v&&v<=20){\r\n Parameters.maxPushOf=20;\r\n }\r\n if(20<v&&v<=30){\r\n Parameters.maxPushOf=10;\r\n }\r\n if(30<v&&v<=40){\r\n Parameters.maxPushOf=9;\r\n }\r\n if(v>40){\r\n Parameters.maxPushOf=8;\r\n }\r\n upper1Label.setText(\"\");\r\n upper2Label.setText(\"\");\r\n upper3Label.setText(\"\");\r\n\r\n if (timer != null) {\r\n timer.stop();\r\n }\r\n\t //for the second gamemode (fixed time):\r\n if (gamemode == 2) {\r\n double time = currentGraph.getVertices()*10;\r\n timing = (int) time;\r\n timer = new Timeline(new KeyFrame(Duration.seconds(1), event -> {\r\n timing--;\r\n upper3Label.setText(\"Time: \"+Double.toString(timing));\r\n }));\r\n\r\n timer.setCycleCount((int) time);\r\n timer.setOnFinished(event -> {\r\n timing = 0;\r\n timerUp();\r\n });\r\n timer.play();\r\n\r\n }\r\n clear();\r\n double myWidth = canvas.getWidth();\r\n double myHeight = canvas.getHeight();\r\n System.out.println(myWidth + \" \" + myHeight);\r\n ArrayList<Dot> list = graph.getList();\r\n Random random = new Random();\r\n for (int i = 0; i < list.size(); i++) {\r\n int x = random.nextInt((int) Math.round(myWidth / 4)) + (int) Math.round((myWidth / 2) - myWidth / 8);\r\n int y = random.nextInt((int) Math.round(myHeight / 4)) + (int) Math.round((myHeight / 2) - myHeight / 8);\r\n list.get(i).setPosition(new Position(x, y));\r\n list.get(i).setParent(this);\r\n if (gamemode == 3) {\r\n list.get(i).gameMode = 3;\r\n list.get(i).removeMain();\r\n }\r\n //list.get(i).setOnAction(graphHandeler);\r\n list.get(i).getStyleClass().add(\"graphButton\");\r\n pane.getChildren().add(list.get(i));\r\n }\r\n Timeline timeline = new Timeline(new KeyFrame(Duration.millis(1), ev -> {\r\n canvas.getGraphicsContext2D().clearRect(0, 0, canvas.getWidth(), canvas.getHeight());\r\n ArrayList<Position> positionArrayList = new ArrayList();\r\n for (int i = 0; i < list.size(); i++) {\r\n Dot d = list.remove(i);\r\n positionArrayList.add(d.calculateVectors(list, d.giveList(), canvas.getWidth(), canvas.getHeight()));\r\n list.add(i, d);\r\n }\r\n for (int i = 0; i < list.size(); i++) {\r\n list.get(i).setPosition(positionArrayList.get(i));\r\n }\r\n for (int i = 0; i < list.size(); i++) {\r\n printDot(list.get(i), true);\r\n printDot(list.get(i), false);\r\n }\r\n }));\r\n timeline.setCycleCount(Parameters.trys);\r\n timeline.play();\r\n if (gamemode == 3) {\r\n list.get(0).getChildren().add(list.get(0).hBox);\r\n\t\thintButtonClick(hintButton5);\r\n \thintButtonClick(hintButton7);\r\n }\r\n }\r\n\r\n }",
"public void singlePlayerChosen(){\n DifficultyViewController dif = new DifficultyViewController(this);\n dif.showView();\n this.hideView();\n }",
"private void displayPlayers() {\n\t\tfor (Player p: game.getPlayers()) {\n\t\t\tview.updateDisplay(p.getId(), p.getDeck().getNumberOfCards());\n\t\t}\n\t}",
"@Override\n\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\tif (model == null){\n\t\t\t\treturn;\n\t\t\t\t//if model is empty, its useless\n\t\t\t}\n\t\t\tString series = (String) episodeView.selectSeries.getSelectedItem();\n\t\t\tString title= episodeView.titleBox.getText();\n\t\t\tString startYear= episodeView.yearBox.getText();\n\t\t\tString seasonNum = episodeView.seasonBox.getText();\n\t\t\tString episodeNum = episodeView.episodeBox.getText();\n\t\t\tboolean suspended = episodeView.isSuspended;\n\t\t\t\n\t\t\tMediaCollection episodes = model.getEpisodes();\n\t\t\tArrayList<Media> episodesList = episodes.getMedia();\n\t\t\tArrayList<String> episodesTitles = new ArrayList<String>();\n\t\t\t\n\t\t\tfor(int index = 0; index < episodesList.size(); ++index){\n\t\t\t\tString temp = episodesList.get(index).getEpisodeTitle();\n\t\t\t\tepisodesTitles.add(temp);\n\t\t\t}\n\t\t\t\n\t\t\tif(episodesTitles.contains(title)){\n\t\t\t\t//Ep is already there\n\t\t\t\t\n\t\t\t\tObject[] options= {\"Cancel\", \"Replace\"};\n\t\t\t\tint answer= JOptionPane.showOptionDialog(null, \"Please choose one\", \"\",\n\t\t\t\t\t\tJOptionPane.DEFAULT_OPTION, JOptionPane.CANCEL_OPTION, null, options, options[0]);\n\t\t\t\t\n\t\t\t\tint response=answer;\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif(response==0){\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse if (response==1){\n\t\t\t\t\t//Call mutator\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t//COULD BE AN ERROR CHECK THIS\n\t\t\t\t\tint releaseYear = Integer.getInteger(startYear);\n\t\t\t\t\tEpisodes newEpisodes= new Episodes(series, title, releaseYear);\n\t\t\t\t\tmodel.addEpisode(newEpisodes);\n\t\t\t\t\t//model.replaceSeries(newSeries);\n\t\t\t\t\t//error bc it hasnt been created yet, do we\n\t\t\t\t\t//even want this?\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t//TODO: error case\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\telse{\n\t\t\t\t//episode not in collection\n\t\t\t\tint releaseYear = Integer.decode(startYear);\n\t\t\t\tEpisodes newEpisode= new Episodes(series, title, releaseYear);\n\t\t\t\tmodel.addEpisode(newEpisode);\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.print(model.getEpisodes().getMedia().toString());\n\t\t\tepisodeView.frame.dispose();\n\t\t}"
] | [
"0.59731424",
"0.5932557",
"0.58840317",
"0.5869413",
"0.58626986",
"0.5845432",
"0.57881117",
"0.57787234",
"0.5753012",
"0.5707953",
"0.5679575",
"0.56589645",
"0.56499135",
"0.56259835",
"0.56104326",
"0.5583174",
"0.555814",
"0.55571854",
"0.555351",
"0.5551728",
"0.5542556",
"0.5522947",
"0.5513635",
"0.5512385",
"0.55056083",
"0.5501009",
"0.548749",
"0.5483508",
"0.5479094",
"0.5476453",
"0.5461385",
"0.5450506",
"0.54454327",
"0.5444719",
"0.54443896",
"0.5443155",
"0.5442071",
"0.5418573",
"0.5410248",
"0.5410097",
"0.54014415",
"0.5397984",
"0.5397854",
"0.5395492",
"0.5392017",
"0.53777635",
"0.53753155",
"0.5374751",
"0.53699386",
"0.5368067",
"0.53672445",
"0.53650206",
"0.5365017",
"0.5363825",
"0.5359358",
"0.53577566",
"0.53567886",
"0.53481007",
"0.5347461",
"0.53414625",
"0.5337942",
"0.533297",
"0.5332672",
"0.53318286",
"0.5322225",
"0.5322046",
"0.5322046",
"0.53099966",
"0.53042775",
"0.53007287",
"0.5293524",
"0.5289414",
"0.5284758",
"0.5282529",
"0.52824736",
"0.52746713",
"0.5273515",
"0.5269005",
"0.52659106",
"0.52649826",
"0.5263834",
"0.526285",
"0.52625436",
"0.52603006",
"0.5259582",
"0.5251601",
"0.5249378",
"0.5244015",
"0.5242385",
"0.5241955",
"0.5241851",
"0.5238609",
"0.52373135",
"0.52369803",
"0.523629",
"0.52268595",
"0.52259713",
"0.522512",
"0.5224038",
"0.52206343"
] | 0.66258955 | 0 |
TODO Autogenerated method stub | public static void main(String[] args) {
ProcedureCancellationDAO dao = new ProcedureCancellationDAO();
String status = dao.orderCancellation("a");
System.out.println(status);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"private stendhal() {\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] | [
"0.66708666",
"0.65675074",
"0.65229905",
"0.6481001",
"0.64770633",
"0.64584893",
"0.6413091",
"0.63764185",
"0.6275735",
"0.62541914",
"0.6236919",
"0.6223816",
"0.62017626",
"0.61944294",
"0.61944294",
"0.61920846",
"0.61867654",
"0.6173323",
"0.61328775",
"0.61276996",
"0.6080555",
"0.6076938",
"0.6041293",
"0.6024541",
"0.6019185",
"0.5998426",
"0.5967487",
"0.5967487",
"0.5964935",
"0.59489644",
"0.59404725",
"0.5922823",
"0.5908894",
"0.5903041",
"0.5893847",
"0.5885641",
"0.5883141",
"0.586924",
"0.5856793",
"0.58503157",
"0.58464456",
"0.5823378",
"0.5809384",
"0.58089525",
"0.58065355",
"0.58065355",
"0.5800514",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57896614",
"0.5789486",
"0.5786597",
"0.5783299",
"0.5783299",
"0.5773351",
"0.5773351",
"0.5773351",
"0.5773351",
"0.5773351",
"0.5760369",
"0.5758614",
"0.5758614",
"0.574912",
"0.574912",
"0.574912",
"0.57482654",
"0.5732775",
"0.5732775",
"0.5732775",
"0.57207066",
"0.57149917",
"0.5714821",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57115865",
"0.57045746",
"0.5699",
"0.5696016",
"0.5687285",
"0.5677473",
"0.5673346",
"0.56716853",
"0.56688815",
"0.5661065",
"0.5657898",
"0.5654782",
"0.5654782",
"0.5654782",
"0.5654563",
"0.56536144",
"0.5652585",
"0.5649566"
] | 0.0 | -1 |
System.out.println(showUrlToDealUrl(" System.out.println(dealUrlToShowUrl(" System.out.println(showUrlToDealUrl(" System.out.println(dealUrlToShowUrl(" | public static void main(String[] args) throws UnsupportedEncodingException, IOException {
BASE64Decoder baseDecoder = new BASE64Decoder();
byte [] b = baseDecoder.decodeBuffer("MTTvvJoxOeadpeS4gOadoeivhOiuug==");
System.out.println(new String(b,"UTF-8"));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void main(String[] args) {\n String redirectUrl1 = DownloadUtil.getRedirectUrl(\"http://www.pc6.com/down.asp?id=68253\");\n String redirectUrl2 = DownloadUtil.getRedirectUrl(redirectUrl1);\n String redirectUrl3 = DownloadUtil.getRedirectUrl(redirectUrl2);\n System.out.println(redirectUrl1);\n System.out.println(redirectUrl2);\n System.out.println(redirectUrl3);\n }",
"@Test\n @Then(\"URL is opened\")\n public void s03_UrlCcheck() {\n currentUrlHP = driver.getCurrentUrl();\n Assert.assertEquals(urlHP, currentUrlHP);\n System.out.println(\"Step03 PASSED\");\n }",
"@Test(priority=2)\r\n\tpublic void getUrl() {\r\n\tObject url=driver.getCurrentUrl();\r\n\t// driver.getCurrentUrl(); method is a string method\r\n\t// we are increasing the scope.\r\n\tObject urlString=url.toString().toUpperCase();\r\n\tSystem.out.println(urlString);\r\n\t}",
"private static void task43() {\n System.out.println(\"Twinkle, twinkle, little star,\");\n System.out.println(\"\\tHow I wonder what you are!\");\n System.out.println(\"\\t\\tUp above the world so high,\");\n System.out.println(\"\\t\\tLike a diamond in the sky!\");\n System.out.println(\"Twinkle, twinkle, little star,\");\n System.out.println(\"How I wonder what you are.\");\n }",
"public static void main(String[] args){\n printcom(0 , 4 , 0 , 2 , \"\");\n \n}",
"private void test() {\n mWebView.loadUrl(\"http://192.168.1.21/WebVest/index.html\");\n new Handler().postDelayed(new Runnable() {\n @Override\n public void run() {\n String link = \"market://details?id=id.danarupiah.weshare.jiekuan&referrer=af_tranid%3DsHNipoE5hT6XsNx8N9Wo_Q%26pid%3Dcashcash_int%26c%3DCashCash_1070228004%26af_click_lookback%3D7d%26clickid%3Dd9e2208b21cac6692a6316474ed47a31%26android_id%3D21b0ee826f6332f4%26advertising_id%3D2dd4fc95-f675-4294-89ec-46ab25f2caa0%26imei%3D868735039268307%26af_siteid%3D7ced3a25b3bb54dd\";\n// openMarketView(MainVestActivity.this, link);\n }\n }, 3000);\n }",
"String displayShotsTaken();",
"CartogramWizardShowURL (String url)\n\t{\n\t\tmUrl = url;\n\t\n\t}",
"public boolean _paymentpage_overrideurl(String _url) throws Exception{\n__c.LogImpl(\"21114113\",_url,0);\n //BA.debugLineNum = 172;BA.debugLine=\"If Url.Contains(\\\"api.com\\\") Then\";\nif (_url.contains(\"api.com\")) { \n };\n //BA.debugLineNum = 175;BA.debugLine=\"Return True\";\nif (true) return __c.True;\n //BA.debugLineNum = 176;BA.debugLine=\"End Sub\";\nreturn false;\n}",
"public void display2(){\n System.out.println(\"codegym\");\n }",
"@Test\n\tpublic void checkDetailedURLGeneration() {\n\t\tint neoID=1234;\n\t\tString expected = genDetailedURL(neoID);\n\t\tString result = urlHelper.getDetailedNeoInfoURL(neoID);\n\t\tassertEquals(expected,result);\n\t}",
"@Test\n @When(\"I open URL\")\n public void s02_UrlOpen() {\n driver.get(urlHP);\n System.out.println(\"Step02 PASSED\");\n }",
"String nextLink();",
"public static void main(String[] args) {\n boolean httpUrl = StringUtil.isHttpUrl(\"https://www.bequgexs.com\");\r\n System.out.println(httpUrl);\r\n\t}",
"public static void main(String[] args){\n System.out.println(\" -----------\");\n System.out.println(\" | WELCOME |\");\n System.out.println(\" -----------\");\n System.out.println(\" ^ ^ ^ ^ ^ ^\");\n System.out.println(\" / \\\\/ \\\\/ \\\\/ \\\\/ \\\\/ \\\\\"); //Use double backslashes to only\n System.out.println(\"|-G--J--J--2--1--5-|\"); //print one of them.\n System.out.println(\" \\\\ /\\\\ /\\\\ /\\\\ /\\\\ /\\\\ /\");\n System.out.println(\" v v v v v v\");\n //Print out short autobioographic statement\n System.out.println(\"I've gone hiking in the Austrian Alps and I plan\");\n System.out.println(\"to go back to backpack Europe for a summer\");\n \n }",
"public static void main(String[] args) {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"C:\\\\selenium driver\\\\chromedriver_win32\\\\chromedriver.exe\");\n\t WebDriver driver= new ChromeDriver();\n\t driver.manage().window().maximize();\n\t driver.get(\"http://demoaut.com\");\n\t List<WebElement> linkNames = driver.findElements(By.tagName(\"a\"));\n\t System.out.println(\"Total No of links\"+linkNames.size());\n\t for(int i=0;i<linkNames.size();i++)\n\t {\n\t \t System.out.println(linkNames.get(i).getText());\n\t \t System.out.println(linkNames.get(i).getText());\n\t }\n\t \n\t driver.findElement(By.linkText(\"Hotels\")).click();\n\t String currentUrl=driver.getCurrentUrl();\n\t System.out.println(\"Current URL\"+currentUrl);\n\t \n\n\t}",
"public static void main(String[] args) {\n System.setProperty(\"webdriver.chrome.driver\", \"/Users/bulut/Selenium/chromedriver\");\n WebDriver driver = new ChromeDriver();\n driver.get(\"https://testpages.herokuapp.com/styled/index.html\");\n\n driver.findElement(By.id(\"alerttest\")).click();\n\n String URL = driver.getCurrentUrl();\n System.out.println(URL);\n\n\n }",
"public void afterReceivedBoardURL(String url) {\r\n \tSystem.out.println(\"[DEBUG LOG/Game.java] Updating board...\");\r\n\t\tboardImageURL = url;\r\n\t\tEmbedBuilder embed = new EmbedBuilder();\r\n\t\tembed.setTitle(\"Board\");\r\n\t\tembed.setColor(Color.GRAY);\r\n\t\t\r\n\t\t// Calculate clank footer\r\n\t\tint totalClank = dragonClank + p1.getClankInBag();\r\n\t\tif (playerCount >= 2) {\r\n\t\t\ttotalClank += p2.getClankInBag();\r\n\t\t\tif (playerCount >= 3) {\r\n\t\t\t\ttotalClank += p3.getClankInBag();\r\n\t\t\t\tif (playerCount >= 4) {\r\n\t\t\t\t\ttotalClank += p4.getClankInBag();\r\n\t\t\t\t\tembed.setFooter(dragonClank+\" BLACK / \"+p1.getClankInBag()+\" (\"+p1.getClankOnBoard()+\") RED / \"+p2.getClankInBag()+\" (\"+p2.getClankOnBoard()+\") BLUE / \"+p3.getClankInBag()+\" (\"+p3.getClankOnBoard()+\") YELLOW / \"+p4.getClankInBag()+\" (\"+p4.getClankOnBoard()+\") GREEN / \"+totalClank+\" TOTAL\", null);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tembed.setFooter(dragonClank+\" BLACK / \"+p1.getClankInBag()+\" (\"+p1.getClankOnBoard()+\") RED / \"+p2.getClankInBag()+\" (\"+p2.getClankOnBoard()+\") BLUE / \"+p3.getClankInBag()+\" (\"+p3.getClankOnBoard()+\") YELLOW / \"+totalClank+\" TOTAL\", null);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tembed.setFooter(dragonClank+\" BLACK / \"+p1.getClankInBag()+\" (\"+p1.getClankOnBoard()+\") RED / \"+p2.getClankInBag()+\" (\"+p2.getClankOnBoard()+\") BLUE / \"+totalClank+\" TOTAL\", null);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tembed.setFooter(dragonClank+\" BLACK / \"+p1.getClankInBag()+\" (\"+p1.getClankOnBoard()+\") RED / \"+totalClank+\" TOTAL\", null);\r\n\t\t}\r\n\t\t// Dragon and Health indicator\r\n\t\tString healthIndicator = \"LEVEL **\"+attackLevel+\"** :dragon: |\";\r\n\t\tfor (int i = 0; i < players.size(); i++) {\r\n\t\t\tPlayer p = players.get(i);\r\n\t\t\tif (!p.hasQuit()) {\r\n\t\t\t\thealthIndicator += \" **\"+p.getHealth()+\"** \"+p.getHeartString();\r\n\t\t\t}\r\n\t\t}\r\n\t\tembed.setDescription(healthIndicator);\r\n\t\tembed.setImage(url);\r\n\t\tif (isFirstBoard) {\r\n\t\t\t// If first board, set delay so it appears in correct order\r\n\t\t\tgameChannel.sendMessage(embed.build()).queueAfter(1000, TimeUnit.MILLISECONDS);;\r\n\t\t\tisFirstBoard = false;\r\n\t\t} else {\r\n\t\t\tgameChannel.editMessageById(boardID, embed.build()).queue();\r\n\t\t}\r\n\t\tSystem.out.println(\"[DEBUG LOG/Game.java] Updated board\");\r\n\t}",
"public String getIdCardUpUrl()\n/* */ {\n/* 89 */ return this.idCardUpUrl;\n/* */ }",
"public String getIdCardDownUrl()\n/* */ {\n/* 107 */ return this.idCardDownUrl;\n/* */ }",
"void show() {\n System.out.print(\"show\");\n }",
"public String toString(){\n\t\tFileHandler fw = new FileHandler(); //Create new object for file write\n \tformatText(title);\n \tformatText(snippet);\n \tsnippet = removeLineBreak(snippet);\n \t\n \t//Print out contents to screen\n \tSystem.out.println(urlLabel + link);\n \tSystem.out.println(titleLabel + title);\n\t\tSystem.out.println(snippetLabel + snippet);\n\t\t\n\t\t//Write contents to file\n\t\tfw.writeToFile(urlLabel, link, fw.file, false);\n\t\tfw.writeToFile(titleLabel, title, fw.file, false);\n\t\tfw.writeToFile(snippetLabel, snippet, fw.file, false);\n\t\tfw.writeToFile(\"---------- END OF RESULT -----------\",\"\", fw.file, false);\n\t return \"\";\n\t}",
"@Test\n @Then(\"Market URL is opened\")\n public void s05_MarketUrlCheck() {\n String currentMUrl = driver.getCurrentUrl();\n Assert.assertTrue(currentMUrl.contains(\"market.yandex.ru\"));\n System.out.println(\"Step05 PASSED\");\n }",
"public void userIsOnHomePage(){\n\n assertURL(\"\\\"https://demo.nopcommerce.com/\\\" \");\n }",
"void display()\r\n\t {\n\t System.out.println(\"a = \" + a + \" b = \" + b);\r\n\t }",
"public void showSir(String nom, String apell1, String apell2){\n System.out.println(\"Bienvenido \"+nom+\" \"+apell1+\" \"+apell2);\n System.out.println(\"\");\n}",
"@Override\n\t\tpublic String toString() {\n\t\t\treturn \"下载链接:\"+showLink;\n\t\t}",
"public void show3() {\n\t\t\n\t}",
"static String printInstructions() {\n return \"Hello, Test Subject 525. I am Charlie, your personal helper bot.\\n\\n\" +\n \"I suggest you pick up the cryonic files in the starting area, and inspect them before proceeding.\" +\n \" You may drop them afterwards if you wish.\\n\\n\" +\n \"You awaken in the Cryostasis Containment Chamber, which only contains 'cryonics files'.\\n\" +\n \"You can traverse the ship by using the north, south, east, or west buttons.\\n\" +\n \"You can see what is in the room you are in by typing 'look', or you can use the current room button.\\n\" +\n \"You can pick things up by typing 'pickup thing' where thing is what you see in the room.\\n\"+\n \"You can drop things you are carrying by typing 'drop thing' where thing names something you have.\\n\"+\n \"You can see your status by typing status, and quit by using the quit button.\\n\" +\n \"If you wish to view the instructions again, press the instructions button.\\n\\n\" +\n \"You can also inspect things you are carrying by typing 'inspect thing' where thing names\" +\n \" something you have.\\n\" +\n \"Inspected things may possess different functions, so inspect them thoroughly.\\n\" +\n \"If you use things in your bag when you're not supposed to, I'll inform you.\" +\n \" If you continually try to use things when you're not supposed to...\\n\" +\n \"you can see for yourself what'll happen.\\n\\n\" +\n \"OBJECTIVE: My sensors have detected a dangerous invader among us...quietly lurking around the ship.\\n\" +\n \"Search the ship for weapons to arm yourself with, and find a transmitter to contact home base.\\n\" +\n \"I suggest you act quickly before this creature finds you first, 525.\\n\\n\";\n }",
"public String getDescription(){\n\t\treturn \"Tests that the URL passed in is the same as our website url.\";\n\t}",
"public void generateQuote(JPanel panel) throws IOException, ParseException {\r\n int rand = (int) (Math.random() * 152 + 1);\r\n String theURL = \"http://www.nokeynoshade.party/api/queens/\" + String.valueOf(rand); //this can point to any URL\r\n URL url = new URL(theURL);\r\n br = new BufferedReader(new InputStreamReader(url.openStream()));\r\n String inputLine;\r\n while ((inputLine = br.readLine()) != null) {\r\n parseAndPrint(panel, inputLine);\r\n }\r\n }",
"public static void main(String h[]) throws IOException\n {\n try {\n String link_url = \"https://www.facebook.com\";\n URL obj1 = new URL(link_url); //URL Connection Created...\n HttpURLConnection con1 = (HttpURLConnection) obj1.openConnection(); //Http URL Connection Created...\n System.out.println(\"https://www.facebook.com\");\n System.out.println(\"Connection Response Message : \");\n con1.disconnect();\n }\n catch (Exception e) {\n System.out.println( e);\n }\n }",
"public static void slashes() {\n\t\tSystem.out.println(\"//////////////////////\");\r\n\r\n\t}",
"public static void show() {\n\t\t\n\t}",
"public void LauncUrl(String url) {\ndriver.get(url);\n\t}",
"public void printInfo() {\n\t\tString url = webDriver.getCurrentUrl();\n\t\tString title = webDriver.getTitle();\n\t\tSystem.out.println(\"Current URL is \"+url);\n\t\tSystem.out.println(title);\n\t}",
"void displayUrl(java.lang.String r8) {\n /*\n r7 = this;\n r4 = \"AirpushSDK\";\n r5 = \"Pushing Web and App Ads.....\";\n android.util.Log.i(r4, r5);\n r3 = \"com.android.browser\";\n r0 = \"com.android.browser.BrowserActivity\";\n r2 = new android.content.Intent;\t Catch:{ ActivityNotFoundException -> 0x002e, Exception -> 0x0077 }\n r4 = \"android.intent.action.VIEW\";\n r5 = android.net.Uri.parse(r8);\t Catch:{ ActivityNotFoundException -> 0x002e, Exception -> 0x0077 }\n r2.<init>(r4, r5);\t Catch:{ ActivityNotFoundException -> 0x002e, Exception -> 0x0077 }\n r4 = 268435456; // 0x10000000 float:2.5243549E-29 double:1.32624737E-315;\n r2.setFlags(r4);\t Catch:{ ActivityNotFoundException -> 0x002e, Exception -> 0x0077 }\n r4 = 8388608; // 0x800000 float:1.17549435E-38 double:4.144523E-317;\n r2.addFlags(r4);\t Catch:{ ActivityNotFoundException -> 0x002e, Exception -> 0x0077 }\n r4 = \"android.intent.category.LAUNCHER\";\n r2.addCategory(r4);\t Catch:{ ActivityNotFoundException -> 0x002e, Exception -> 0x0077 }\n r2.setClassName(r3, r0);\t Catch:{ ActivityNotFoundException -> 0x002e, Exception -> 0x0077 }\n r4 = r7.context;\t Catch:{ ActivityNotFoundException -> 0x002e, Exception -> 0x0077 }\n r4.startActivity(r2);\t Catch:{ ActivityNotFoundException -> 0x002e, Exception -> 0x0077 }\n L_0x002d:\n return;\n L_0x002e:\n r1 = move-exception;\n r4 = \"AirpushSDK\";\n r5 = \"Browser not found.\";\n android.util.Log.i(r4, r5);\t Catch:{ ActivityNotFoundException -> 0x0059, Exception -> 0x0077 }\n r4 = new android.content.Intent;\t Catch:{ ActivityNotFoundException -> 0x0059, Exception -> 0x0077 }\n r5 = \"android.intent.action.VIEW\";\n r6 = android.net.Uri.parse(r8);\t Catch:{ ActivityNotFoundException -> 0x0059, Exception -> 0x0077 }\n r4.<init>(r5, r6);\t Catch:{ ActivityNotFoundException -> 0x0059, Exception -> 0x0077 }\n r7.intent = r4;\t Catch:{ ActivityNotFoundException -> 0x0059, Exception -> 0x0077 }\n r4 = r7.intent;\t Catch:{ ActivityNotFoundException -> 0x0059, Exception -> 0x0077 }\n r5 = 268435456; // 0x10000000 float:2.5243549E-29 double:1.32624737E-315;\n r4.setFlags(r5);\t Catch:{ ActivityNotFoundException -> 0x0059, Exception -> 0x0077 }\n r4 = r7.intent;\t Catch:{ ActivityNotFoundException -> 0x0059, Exception -> 0x0077 }\n r5 = 8388608; // 0x800000 float:1.17549435E-38 double:4.144523E-317;\n r4.addFlags(r5);\t Catch:{ ActivityNotFoundException -> 0x0059, Exception -> 0x0077 }\n r4 = r7.context;\t Catch:{ ActivityNotFoundException -> 0x0059, Exception -> 0x0077 }\n r5 = r7.intent;\t Catch:{ ActivityNotFoundException -> 0x0059, Exception -> 0x0077 }\n r4.startActivity(r5);\t Catch:{ ActivityNotFoundException -> 0x0059, Exception -> 0x0077 }\n goto L_0x002d;\n L_0x0059:\n r1 = move-exception;\n r4 = \"AirpushSDK\";\n r5 = new java.lang.StringBuilder;\n r5.<init>();\n r6 = \"Error whlie displaying push ad......: \";\n r5 = r5.append(r6);\n r6 = r1.getMessage();\n r5 = r5.append(r6);\n r5 = r5.toString();\n android.util.Log.e(r4, r5);\n goto L_0x002d;\n L_0x0077:\n r1 = move-exception;\n r1.printStackTrace();\n goto L_0x002d;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.srortn.bsiubt135868.HandleClicks.displayUrl(java.lang.String):void\");\n }",
"public void show() {\n\tSystem.out.println(\"show-method\");\t\n\t}",
"@Test\r\n\t\tpublic static void LaunchUrl()\r\n\t\t{\r\n\t\t\tdriver.manage().deleteAllCookies();\r\n\t\t\tdriver.get(prop.getProperty(\"url\"));\r\n\t\t\tdriver.manage().window().maximize();\t\r\n\t\t\tdriver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);\t\r\n\t\t\r\n\t\t}",
"@Override\n public void onClick(View v) {\n Toast.makeText(c, \"yes\" + article.getWeblink(), Toast.LENGTH_LONG).show();\n }",
"public void goWebSite() {\n\n if (mIsFirst) {\n mSnackbar.setText(getString(R.string.please_wait)).show();\n } else {\n Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(mSiteData.getUrl()));\n //intent.putExtra(\"url\", webData.getUrl());\n //startActivity(intent);\n startActivityForResult(intent, 100);\n //showToolbarProgressBar();\n overridePendingTransition(R.anim.slide_in_right, R.anim.slide_out_left);\n }\n }",
"private String help(final String hUrl) {\n \tif (hUrl.startsWith(\"http://\")) {\n\t \tDisplay.getDefault().asyncExec(new Runnable() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tBioclipsePlatformManager bioclipse = new BioclipsePlatformManager();\n\t\t\t\t\ttry {\n\t\t\t\t\t\tbioclipse.openURL(new URL(hUrl));\n\t\t\t\t\t} catch (MalformedURLException e) {\n\t\t\t\t\t\tlogger.info(e);\n\t\t\t\t\t} catch (BioclipseException e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\t \t});\n\t\t\treturn \"\";\n \t} else {\n \t\treturn hUrl;\n \t}\n }",
"public static void main(String[] args) throws Exception {\n\tPhishTankBlackList.main(args);\n\tstr=PhishTankBlackList.url();\n\tString mstr=str;\n\tmstr = mstr.replaceAll(\"http://www.\",\"\");\n\tmstr = mstr.replaceAll(\"http://\",\"\");\n\tmstr = mstr.replaceAll(\"https://www.\", \"\");\n\tmstr = mstr.split(\".com\")[0];\n\tmstr = mstr.split(\".in\")[0];\n\tmstr = mstr.split(\".net\")[0];\n\tmstr = mstr.split(\".org\")[0];\n\tmstr = mstr.split(\".uk\")[0];\n\tmstr = mstr.split(\".eu\")[0];\n\tmstr = mstr.split(\".ac.in\")[0];\n\tSystem.out.println(mstr);\n\tint fullLength = mstr.length();\n\tString modifiedString = mstr.replaceAll(\"\\\\p{Punct}\",\"\");\n\tint modStringLength = modifiedString.length();\n\tint numberOfSpecialChars = fullLength - modStringLength;\n\t//number of tokens in domain\n\tSystem.out.println(\"The number of tokens in the domain are\");\n\t\n\tSystem.out.println(numberOfSpecialChars);\n\tSystem.out.println(\"\");\n\tif(numberOfSpecialChars>3)\n\tSystem.out.println(\"Probably Phishing site\");\n\t\n\t\n\t\n\t\n\t//number of dots in domain\n\t\n int ctr=0;\n\tString newstr=mstr;\n\t\t\tfor(int i=0;i<newstr.length();i++)\n\t\t\t{ if(newstr.charAt(i)=='.')\n\t\t\t {ctr = ctr+1;}}\n\t\t\tSystem.out.println(\"number of dots in the domain of the URL\");\n\t\t\tSystem.out.println(ctr);\n\t\t\tif(ctr>=4)\n\t\t\t{\n\t\t\t\tSystem.out.println(\"Probably Phishing\");\n\t\t\t}\n\t\t\t/*ctr=0;\nmstr=mstr.replaceAll(\".\", \"\");\n\t\t String sb=mstr;\n\t\t \n\t\t sb.toCharArray();\n\t\t for(int i=0;i<sb.length();i++)\n\t\t {\n\t\t \n\t\t ctr=ctr+1;\n\t\t }\n\t\t System.out.println(\"The digits present in the domain\");\n\t\t System.out.println(ctr);\n\t\t \n\t\t \n\t\t if(ctr>4)\n\t\t {\n\t\t \tSystem.out.println(\"Probably Phishing\");\n\t\t }}\n\t\t \n\n\n\t\t\t */\n\t\t\t}",
"@Given(\"^User Clicks on url \\\"([^\\\"]*)\\\"$\")\n\tpublic void user_Clicks_on_url(String arg1) throws Throwable {\n\t\tthis.driver.navigate().to(\"https://wallethub.com/profile/test-insurance-company-13732055i\");\n\t}",
"@Test\n public void shopDemoQA() {\n\n\n WebDriverManager.chromedriver().setup();\n WebDriver driver = new ChromeDriver();\n driver.manage().timeouts().implicitlyWait(10,TimeUnit.SECONDS);\n driver.manage().window().maximize();\n\n String targetURL = \"http://shop.demoqa.com/\";\n\n driver.get(targetURL);\n String pageTitle = driver.getTitle();\n int titleLength = pageTitle.length();\n System.out.println(\"Web page title: \" + pageTitle +\", title length: \" + titleLength);\n\n String currentPageURL = driver.getCurrentUrl();\n System.out.println(\"Current URL: \" + currentPageURL);\n\n if (targetURL.replace(\"http://\", \"\").equals\n (currentPageURL.replace(\"http://\", \"\"))) {\n System.out.println(\">>> Target URL corresponds to current URL\");\n } else System.out.println(\">>> Target URL does not correspond to current URL\");\n\n String pageLength = driver.getPageSource();\n System.out.println(\"Page source length is: \" + pageLength.length());\n\n driver.quit();\n }",
"private void presentShowcaseSequence() {\n }",
"@Test\r\n\tpublic void verifyUrlOnClickingListenNow(){\r\n\t\tdriver.get(url+radioUrl+audioUrl);\r\n\t\tObject response = jse.executeScript(\r\n\t\t\t\t\"if(document.readyState === 'complete'){\"\r\n\t\t\t\t+ \"document.querySelector('.cs-has-media').children[0].children[0].click();\"\r\n\t\t\t\t+ \"if(documet.readyState === 'complete'){\"\r\n\t\t\t\t+ \"var currUrl = window.location.href;\"\r\n\t\t\t\t+ \"return currUrl;}}\", \"\");\r\n\t\tAssert.assertTrue(response.toString().equalsIgnoreCase(\"https://radio.abc.net.au/programitem/pg1aGbWlx6?play=true\"), \"Url not redirected as expected.\");\r\n\t}",
"public String calcURLResponse()\n\t{\n\t\treturn\n\t\t\t\t\"https://secure.bluepay.com/interfaces/shpf?\" +\n\t\t\t\t\t\t\"SHPF_FORM_ID=\" + encodeURL(SHPF_FORM_ID) +\n\t\t\t\t\t\t\"&SHPF_ACCOUNT_ID=\" + encodeURL(BP_MERCHANT) +\n\t\t\t\t\t\t\"&SHPF_TPS_DEF=\" + encodeURL(SHPF_TPS_DEF) +\n\t\t\t\t\t\t\"&SHPF_TPS=\" + encodeURL(SHPF_TAMPER_PROOF_SEAL) +\n\t\t\t\t\t\t\"&MODE=\" + encodeURL(BP_MODE) +\n\t\t\t\t\t\t\"&TRANSACTION_TYPE=\" + encodeURL(TRANSACTION_TYPE) +\n\t\t\t\t\t\t\"&DBA=\" + encodeURL(DBA) +\n\t\t\t\t\t\t\"&AMOUNT=\" + encodeURL(AMOUNT) +\n\t\t\t\t\t\t\"&TAMPER_PROOF_SEAL=\" + encodeURL(BP10EMU_TAMPER_PROOF_SEAL) +\n\t\t\t\t\t\t\"&CUSTOM_ID=\" + encodeURL(CUSTOM_ID1) +\n\t\t\t\t\t\t\"&CUSTOM_ID2=\" + encodeURL(CUSTOM_ID2) +\n\t\t\t\t\t\t\"&REBILLING=\" + encodeURL(REBILLING) +\n\t\t\t\t\t\t\"&REB_CYCLES=\" + encodeURL(REB_CYCLES) +\n\t\t\t\t\t\t\"&REB_AMOUNT=\" + encodeURL(REB_AMOUNT) +\n\t\t\t\t\t\t\"&REB_EXPR=\" + encodeURL(REB_EXPR) +\n\t\t\t\t\t\t\"&REB_FIRST_DATE=\" + encodeURL(REB_FIRST_DATE) +\n\t\t\t\t\t\t\"&AMEX_IMAGE=\" + encodeURL(AMEX_IMAGE) +\n\t\t\t\t\t\t\"&DISCOVER_IMAGE=\" + encodeURL(DISCOVER_IMAGE) +\n\t\t\t\t\t\t\"&REDIRECT_URL=\" + encodeURL(RECEIPT_URL) +\n\t\t\t\t\t\t\"&TPS_DEF=\" + encodeURL(BP10EMU_TPS_DEF) +\n\t\t\t\t\t\t\"&CARD_TYPES=\" + encodeURL(CARD_TYPES);\n\t}",
"private void oops(){\n\t\tSystem.out.println(\"Oops! \" +getCandyName() +\" is delicious! I ate that one.\");\n\t}",
"@Test\n\tpublic void Launch_URL() throws Exception {\n\n\t\tThread.sleep(1500);\n\t\torg.openqa.selenium.ScreenOrientation so = driver.getOrientation();\n\t\tdriver.rotate(so.LANDSCAPE);\n\t\tReports.logEvent(\"App in LandScape view\", \"pass\");\n\t\tdriver.rotate(so.PORTRAIT);\n\t\tfor(int i=0;i<3;i++)\n\t\t{\n\t\t\tif(i==0)\n\n\t\t\t{\n\t\t\t\tList<WebElement> links = driver.findElementsByClassName(\"android.widget.RelativeLayout\");\n\t\t\t\tlinks.get(i).click();\n\t\t\t\tThread.sleep(3500);\n\t\t\t\tint j=i+1;\n\t\t\t\tReports.logEvent(\"Link \"+j+\" clicked\", \"pass\");\n\t\t\t\ttakeScreenShot();\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tList<WebElement> back = driver.findElementsByClassName(\"android.widget.ImageButton\");\n\t\t\t\tback.get(0).click();\n\t\t\t\tReports.logEvent(\"Navigated back to home page\", \"pass\");\n\t\t\t\tThread.sleep(1500);\n\t\t\t}\n\t\t\t\telse if(i==3)\n\t\t\t{\n\t\t\t\tThread.sleep(500);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tList<WebElement> links = driver.findElementsByClassName(\"android.widget.RelativeLayout\");\n\t\t\t\tlinks.get(i).click();\n\t\t\t\tThread.sleep(3000);\n\t\t\t\tint j=i+1;\n\t\t\t\tReports.logEvent(\"Link \"+j+\" clicked\", \"pass\");\n\t\t\t\ttakeScreenShot();\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tList<WebElement> back = driver.findElementsByClassName(\"android.widget.ImageButton\");\n\t\t\t\tback.get(0).click();\n\t\t\t\tReports.logEvent(\"Navigated back to home page\", \"pass\");\n\t\t\t\tThread.sleep(1500);\n\t\t\t}\n\t\t\n\t\t}\n\t\t\n\t\ttry\n\t\t{\n\t\t\tint a = 0/0;\n\t\t\tSystem.out.println(a);\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\tReports.logEvent(\"Try catch failed try\", \"fail\");\n\t\t}\n\t}",
"public void cars_of_my_father(){\n System.out.println(\"Royal Rayce, Maruti Suzuki, Mazda\");\n }",
"public String infoline()\n {\n return \" > You see delicious COFFEE being brewed from behind the starbucks counter\";}",
"private void showIntro() { \n \n System.out.println(\" \".repeat(32) + \"DIAMOND\");\n System.out.println(\" \".repeat(14) + \"CREATIVE COMPUTING MORRISTOWN, NEW JERSEY\");\n System.out.println(\"\\n\\n\");\n \n }",
"public void show() {\n\t\tSystem.out.println(\"show..\");\n\t}",
"public static void spider2() {\n System.out.println(\"There was an old woman who swallowed a spider,\");\n System.out.println(\"That wriggled and iggled and jiggled inside her.\");\n spider1();\n }",
"public static void main(String[] args) {\n \n\t\tWebDriverManager.chromedriver().setup();\n\t\t WebDriver driver=new ChromeDriver();\n\t\t driver.get(\"https://www.amazon.com/\");\n\t\t \n\t\tList<WebElement> linkslist= driver.findElements(By.tagName(\"a\"));\n\t\t\n\t\tSystem.out.println(\"Total no:of links: \" +linkslist.size());\n\t\t\n\t\tfor(int i=0;i<linkslist.size();i++)\n\t\t{\n\t\t\tString str=linkslist.get(i).getText();\n\t\t\t\n\t\t\tif(!str.isEmpty()) {\n\t\t\t\n\t\t\tSystem.out.println(i + \"----->\" +str.trim());\n\t\t\t\n\t\t\tString hrefdetails=linkslist.get(i).getAttribute(\"href\");\n\t\t\tSystem.out.println(hrefdetails);\n\t \t}\n\t\t\t\t\t\n\t\t}\t\n\t \n\t}",
"private static void printUsage(){\n\t\tprintLine(USAGE_STRING);\n\t}",
"@Override\r\n\tpublic void alimentar() {\n\t\tSystem.out.print(\" como carne, yummy, yummy\");\r\n\t}",
"public static void main(String[] args) {\n\t\tString url = \"http://hell.com/?pw=8936,id='fsfds'\";\n\t\t\n\t\tint location = url.indexOf(\"pw=\");\n\t\tString str2 = url.substring(location+7);\n\t\tString str1 = url.substring(0,location+3);\n\t\tSystem.out.println(str1+\"****\"+str2);\n\t\t\n\t}",
"public static void show() {\n\n\t}",
"public static String doFourFunc() {\r\n System.out.println(\"What is your first number?\");\r\n int a = Main.sc.nextInt();\r\n System.out.println(\"What is your second number?\");\r\n int b = Main.sc.nextInt();\r\n String a1 = Integer.toString(a + b); // add\r\n String a2 = Integer.toString(a - b); // subtract\r\n String a3 = Integer.toString(a * b); // multiply\r\n String a4 = Integer.toString(a / b); // divide\r\n String a5 = Integer.toString(a % b); // remainder\r\n String toReturn = \"The sum of your numbers is \" + a1 \r\n + \"; the difference of your numbers is \" + a2\r\n + \"; the product of your numbers is \" + a3 \r\n + \"; the quotient of your numbers is \" + a4 + \" R \" + a5;\r\n return toReturn;\r\n }",
"public static void main(String[] args) {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"C:\\\\Users\\\\Rani\\\\Desktop\\\\chromedriver.exe\");\n\t\tWebDriver driver = new ChromeDriver();\n\t\tdriver.get(\"https://www.google.com/\");\n//\n//\t\tString abc = driver.getTitle();\n//\t\tSystem.out.println(\"abc\");\n//\n//\t\tString actual = driver.getTitle();\n//\t\tString expected = (\"Google\");\n//\t\tif (actual.contentEquals(expected)) {\n//\t\t\tSystem.out.println(\"Test case is Pass\");\n//\n//\t\t} else {\n//\t\t\tSystem.out.println(\"Test case is fail\");\n//\n//\t\t}\n//\t\tString A = driver.getCurrentUrl();\n//\t\t// System.out.println(\"A\");\n//\t\tString E = \"https://www.google.com/\";\n//\t\tif (A.contentEquals(E)) {\n//\t\t\tSystem.out.println(\"Test case2 pass\");\n//\t\t} else {\n//\t\t\tSystem.out.println(\"Test case2 fail\");\n//\t\t}\n//\t\n//\t\tdriver.navigate().to(\"https://www.gmail.com/\");\n//\t\tdriver.navigate().back();\n//\t\tdriver.navigate().forward();\n//\t\tdriver.close();\n//\t\tdriver.quit();\n//\t\t\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"C:\\\\Users\\\\Rani\\\\Desktop\\\\chromedriver.exe\");\n\t\tWebDriver driver1 = new ChromeDriver();\n\t\tdriver.get(\"https://www.google.com/\");\n\n\t\tString s = driver1.getTitle();\n\t\tSystem.out.println(\"The title is :\");\n\t\tString A = driver1.getTitle();\n\t\tString E = (\"Google\");\n\t\tif (A.contentEquals(E)) {\n\t\t\tSystem.out.println(\"Test case of gettitle is: pass\");\n\n\t\t}\n\n\t\telse {\n\t\t\tSystem.out.println(\"Test case of gettitle is: Fail\");\n\t\t}\n\n\t\tString Ac = driver1.getCurrentUrl();\n\t\tString Ex = (\"https://www.google.com/\");\n\t\tif (Ac.contentEquals(Ex)) {\n\t\t\tSystem.out.println(\"Test case of url is :pass\");\n\n\t\t} else {\n\t\t\tSystem.out.println(\"Test case of url is:fail\");\n\t\t}\n\t\tdriver1.navigate().to(\"http://staging-admin.sproutlogix.com/\");\n\t\tdriver1.navigate().back();\n\t\tdriver1.navigate().forward();\n\t\tdriver1.close();\n\t\tdriver.quit();\n\t}",
"public void show() {\n System.out.println(\"I am the best\");\n }",
"@java.lang.Deprecated\n /* Code decompiled incorrectly, please refer to instructions dump. */\n public java.lang.String decideUrl(java.lang.String r31, int r32, java.lang.String r33, com.taobao.tao.util.TaobaoImageUrlStrategy.CutType r34, int r35, int r36, boolean r37, boolean r38, boolean r39) {\n /*\n r30 = this;\n r13 = r30\n r14 = r33\n r15 = 0\n if (r31 != 0) goto L_0x0012\n java.lang.String r0 = \"STRATEGY.ALL\"\n java.lang.String r1 = \"origin url is null\"\n java.lang.Object[] r2 = new java.lang.Object[r15]\n com.taobao.tao.image.Logger.i(r0, r1, r2)\n r0 = 0\n return r0\n L_0x0012:\n java.lang.String r0 = r30.changeUrl(r31)\n com.taobao.tao.util.TaobaoImageUrlStrategy$UriCDNInfo r1 = new com.taobao.tao.util.TaobaoImageUrlStrategy$UriCDNInfo\n r1.<init>(r0)\n com.taobao.tao.util.OssImageUrlStrategy r2 = com.taobao.tao.util.OssImageUrlStrategy.getInstance()\n java.lang.String r3 = r1.host\n boolean r2 = r2.isOssDomain(r3)\n if (r2 == 0) goto L_0x003c\n com.taobao.tao.util.OssImageUrlStrategy r1 = com.taobao.tao.util.OssImageUrlStrategy.getInstance()\n java.lang.String r2 = \"default\"\n com.taobao.tao.image.ImageStrategyConfig$Builder r2 = com.taobao.tao.image.ImageStrategyConfig.newBuilderWithName(r2)\n com.taobao.tao.image.ImageStrategyConfig r2 = r2.build()\n r12 = r32\n java.lang.String r0 = r1.decideUrl(r0, r12, r2)\n return r0\n L_0x003c:\n r12 = r32\n boolean r2 = r13.isCdnImage((com.taobao.tao.util.TaobaoImageUrlStrategy.UriCDNInfo) r1)\n r11 = 1\n if (r2 != 0) goto L_0x0051\n java.lang.String r1 = \"STRATEGY.ALL\"\n java.lang.String r2 = \"origin not cdn url:%s\"\n java.lang.Object[] r3 = new java.lang.Object[r11]\n r3[r15] = r0\n com.taobao.tao.image.Logger.w(r1, r2, r3)\n return r0\n L_0x0051:\n boolean r2 = r13.mDomainSwitch\n if (r2 == 0) goto L_0x005b\n java.lang.String[] r0 = r13.convergenceUrl(r1, r15)\n r0 = r0[r15]\n L_0x005b:\n r16 = r0\n com.taobao.tao.util.ImageStrategyExtra$ImageUrlInfo r10 = com.taobao.tao.util.ImageStrategyExtra.getBaseUrlInfo(r16)\n java.lang.String r0 = r10.base\n java.lang.String r1 = \"_sum.jpg\"\n boolean r0 = r0.endsWith(r1)\n if (r0 == 0) goto L_0x007c\n java.lang.String r0 = r10.base\n java.lang.String r1 = r10.base\n int r1 = r1.length()\n int r1 = r1 + -8\n java.lang.String r0 = r0.substring(r15, r1)\n r10.base = r0\n goto L_0x00a0\n L_0x007c:\n java.lang.String r0 = r10.base\n java.lang.String r1 = \"_m.jpg\"\n boolean r0 = r0.endsWith(r1)\n if (r0 != 0) goto L_0x0090\n java.lang.String r0 = r10.base\n java.lang.String r1 = \"_b.jpg\"\n boolean r0 = r0.endsWith(r1)\n if (r0 == 0) goto L_0x00a0\n L_0x0090:\n java.lang.String r0 = r10.base\n java.lang.String r1 = r10.base\n int r1 = r1.length()\n int r1 = r1 + -6\n java.lang.String r0 = r0.substring(r15, r1)\n r10.base = r0\n L_0x00a0:\n java.lang.String r0 = r10.base\n com.taobao.tao.util.ImageStrategyExtra.parseImageUrl(r0, r10)\n java.lang.StringBuffer r8 = new java.lang.StringBuffer\n java.lang.String r0 = r10.base\n int r0 = r0.length()\n int r0 = r0 + 27\n r8.<init>(r0)\n java.lang.String r0 = r10.base\n r8.append(r0)\n java.lang.String r0 = \"\"\n boolean r1 = r13.mIsLowQuality\n if (r1 == 0) goto L_0x00c4\n com.taobao.tao.util.TaobaoImageUrlStrategy$ImageQuality r1 = com.taobao.tao.util.TaobaoImageUrlStrategy.ImageQuality.q50\n L_0x00bf:\n java.lang.String r1 = r1.getImageQuality()\n goto L_0x00c7\n L_0x00c4:\n com.taobao.tao.util.TaobaoImageUrlStrategy$ImageQuality r1 = com.taobao.tao.util.TaobaoImageUrlStrategy.ImageQuality.q75\n goto L_0x00bf\n L_0x00c7:\n boolean r2 = r13.mIsLowQuality\n if (r2 == 0) goto L_0x00d2\n com.taobao.tao.util.TaobaoImageUrlStrategy$ImageQuality r2 = com.taobao.tao.util.TaobaoImageUrlStrategy.ImageQuality.q75\n L_0x00cd:\n java.lang.String r2 = r2.getImageQuality()\n goto L_0x00d5\n L_0x00d2:\n com.taobao.tao.util.TaobaoImageUrlStrategy$ImageQuality r2 = com.taobao.tao.util.TaobaoImageUrlStrategy.ImageQuality.q90\n goto L_0x00cd\n L_0x00d5:\n com.taobao.tao.util.TaobaoImageUrlStrategy$ImageSharpen r3 = com.taobao.tao.util.TaobaoImageUrlStrategy.ImageSharpen.non\n java.lang.String r3 = r3.getImageSharpen()\n com.taobao.tao.util.TaobaoImageUrlStrategy$ImageSharpen r4 = com.taobao.tao.util.TaobaoImageUrlStrategy.ImageSharpen.non\n java.lang.String r4 = r4.getImageSharpen()\n r5 = 4604480259023595110(0x3fe6666666666666, double:0.7)\n r17 = 4607182418800017408(0x3ff0000000000000, double:1.0)\n boolean r7 = r13.mGlobalSwitch\n if (r7 == 0) goto L_0x0131\n java.util.HashMap<java.lang.String, com.taobao.tao.util.TaobaoImageUrlStrategy$ServiceImageSwitch> r7 = r13.mServiceImageSwitchList\n if (r7 == 0) goto L_0x0131\n boolean r7 = android.text.TextUtils.isEmpty(r33)\n if (r7 != 0) goto L_0x0131\n java.util.HashMap<java.lang.String, com.taobao.tao.util.TaobaoImageUrlStrategy$ServiceImageSwitch> r7 = r13.mServiceImageSwitchList\n java.lang.Object r7 = r7.get(r14)\n com.taobao.tao.util.TaobaoImageUrlStrategy$ServiceImageSwitch r7 = (com.taobao.tao.util.TaobaoImageUrlStrategy.ServiceImageSwitch) r7\n if (r7 == 0) goto L_0x0131\n if (r39 == 0) goto L_0x0131\n boolean r0 = r7.isUseWebp()\n java.lang.String r1 = r7.getLowNetQ()\n java.lang.String r2 = r7.getHighNetQ()\n java.lang.String r3 = r7.getLowNetSharpen()\n java.lang.String r4 = r7.getHighNetSharpen()\n double r5 = r7.getLowNetScale()\n double r17 = r7.getHighNetScale()\n java.lang.String r7 = r7.getSuffix()\n r19 = r0\n r9 = r1\n r27 = r5\n r5 = r2\n r2 = r7\n r6 = r27\n r29 = r4\n r4 = r3\n r3 = r29\n goto L_0x013c\n L_0x0131:\n r19 = r37\n r9 = r1\n r6 = r5\n r5 = r2\n r2 = r0\n r27 = r4\n r4 = r3\n r3 = r27\n L_0x013c:\n r1 = 0\n r20 = 1\n r0 = r30\n r15 = r2\n r2 = r8\n r21 = r3\n r3 = r10\n r22 = r4\n r4 = r35\n r23 = r5\n r5 = r36\n r24 = r8\n r25 = r9\n r8 = r17\n r26 = r10\n r10 = r32\n r17 = 1\n r11 = r34\n r12 = r20\n boolean r0 = r0.decideUrlWH(r1, r2, r3, r4, r5, r6, r8, r10, r11, r12)\n if (r38 == 0) goto L_0x0177\n r3 = r23\n r1 = r24\n r2 = r25\n boolean r2 = r13.decideValueByNetwork(r0, r1, r2, r3)\n if (r2 != 0) goto L_0x0175\n if (r0 == 0) goto L_0x0173\n goto L_0x0175\n L_0x0173:\n r0 = 0\n goto L_0x0179\n L_0x0175:\n r0 = 1\n goto L_0x0179\n L_0x0177:\n r1 = r24\n L_0x0179:\n r4 = r21\n r3 = r22\n boolean r2 = r13.decideValueByNetwork(r0, r1, r3, r4)\n if (r2 != 0) goto L_0x0188\n if (r0 == 0) goto L_0x0186\n goto L_0x0188\n L_0x0186:\n r0 = 0\n goto L_0x0189\n L_0x0188:\n r0 = 1\n L_0x0189:\n r13.decideUrlSuffix(r0, r1, r15)\n if (r19 == 0) goto L_0x019c\n r0 = r26\n java.lang.String r2 = r0.suffix\n java.lang.String r3 = \"imgwebptag=0\"\n boolean r2 = r2.contains(r3)\n if (r2 != 0) goto L_0x019e\n r2 = 1\n goto L_0x019f\n L_0x019c:\n r0 = r26\n L_0x019e:\n r2 = 0\n L_0x019f:\n r3 = 0\n r13.decideUrlWebP(r1, r3, r2)\n java.lang.String r0 = r0.suffix\n r1.append(r0)\n java.lang.String r0 = r1.toString()\n r1 = 68\n boolean r1 = com.taobao.tao.image.Logger.isLoggable(r1)\n if (r1 == 0) goto L_0x01d6\n java.lang.String r1 = \"STRATEGY.ALL\"\n java.lang.String r2 = \"[Non-Config] Dip=%.1f UISize=%d Area=%s\\nOriginUrl=%s\\nDecideUrl=%s\"\n r3 = 5\n java.lang.Object[] r3 = new java.lang.Object[r3]\n float r4 = r13.mDip\n java.lang.Float r4 = java.lang.Float.valueOf(r4)\n r5 = 0\n r3[r5] = r4\n java.lang.Integer r4 = java.lang.Integer.valueOf(r32)\n r3[r17] = r4\n r4 = 2\n r3[r4] = r14\n r4 = 3\n r3[r4] = r16\n r4 = 4\n r3[r4] = r0\n com.taobao.tao.image.Logger.d(r1, r2, r3)\n L_0x01d6:\n return r0\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.taobao.tao.util.TaobaoImageUrlStrategy.decideUrl(java.lang.String, int, java.lang.String, com.taobao.tao.util.TaobaoImageUrlStrategy$CutType, int, int, boolean, boolean, boolean):java.lang.String\");\n }",
"public void credit(){\n\n System.out.println(\"HSBC\");\n\n\n }",
"void doShowUri()\n\t{\n\t\ttry\n\t\t{\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\tsb.append(\"URI = \"); //$NON-NLS-1$\n\t\t\tsb.append( m_session.getURI() );\n\t\t\tout( sb.toString() );\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\terr(getLocalizationManager().getLocalizedTextString(\"noUriReceived\")); //$NON-NLS-1$\n\t\t}\n\t}",
"public String openPHPTravels() {\r\n\t\tString URL = CommonProperty.getProperty(\"url\" + PropertyManager.getProperty(\"zone\").toUpperCase());\r\n\t\tLog.info(\"\");\r\n\t\tLog.info(\"Opening URL : \" + URL);\r\n\t\tdriver.navigate().to(URL);\r\n\t\tString title = driver.getTitle();\r\n\t\tLog.info(title);\r\n\t\treturn URL;\r\n\t}",
"public void mo63047b(String str) {\n String str2;\n String str3;\n String str4;\n String str5;\n super.mo63047b(str);\n if (C25352e.m83221d(this.f77546j)) {\n this.f89203a.mo65916c();\n C24961b e = C24958f.m81905a().mo65273b(this.f77546j).mo65266a(\"result_ad\").mo65276b(\"play_over\").mo65283e(\"video\");\n Aweme aweme = this.f77546j;\n C7573i.m23582a((Object) aweme, \"mAweme\");\n Video video = aweme.getVideo();\n C7573i.m23582a((Object) video, \"mAweme.video\");\n e.mo65271b((long) video.getVideoLength()).mo65270a(mo75261ab());\n this.f89214bh++;\n C28418f a = C28418f.m93413a();\n C7573i.m23582a((Object) a, \"FeedSharePlayInfoHelper.inst()\");\n a.f74936f = this.f89214bh;\n if (this.f89214bh >= this.f89215bi) {\n C28418f a2 = C28418f.m93413a();\n C7573i.m23582a((Object) a2, \"FeedSharePlayInfoHelper.inst()\");\n if (!a2.f74934d) {\n Aweme aweme2 = this.f77546j;\n C7573i.m23582a((Object) aweme2, \"mAweme\");\n AwemeRawAd awemeRawAd = aweme2.getAwemeRawAd();\n if (awemeRawAd != null) {\n str3 = awemeRawAd.getWebUrl();\n } else {\n str3 = null;\n }\n if (TextUtils.isEmpty(str3)) {\n C24961b b = C24958f.m81905a().mo65273b(this.f77546j).mo65266a(\"result_ad\").mo65276b(\"play\");\n if (!C25352e.m83224g(this.f77546j) || !TextUtils.equals(mo75290r(), \"general_search\")) {\n str4 = \"\";\n } else {\n str4 = \"video\";\n }\n b.mo65283e(str4).mo65270a(mo75261ab());\n return;\n } else if (mo75314al()) {\n mo75311ai();\n return;\n } else {\n this.f89215bi++;\n C24961b b2 = C24958f.m81905a().mo65273b(this.f77546j).mo65266a(\"result_ad\").mo65276b(\"play\");\n if (!C25352e.m83224g(this.f77546j) || !TextUtils.equals(mo75290r(), \"general_search\")) {\n str5 = \"\";\n } else {\n str5 = \"video\";\n }\n b2.mo65283e(str5).mo65270a(mo75261ab());\n return;\n }\n }\n }\n C24961b b3 = C24958f.m81905a().mo65273b(this.f77546j).mo65266a(\"result_ad\").mo65276b(\"play\");\n if (!C25352e.m83224g(this.f77546j) || !TextUtils.equals(mo75290r(), \"general_search\")) {\n str2 = \"\";\n } else {\n str2 = \"video\";\n }\n b3.mo65283e(str2).mo65270a(mo75261ab());\n }\n }",
"public void show()\n\t{\n\t\tSystem.out.println(\"show\");\n\t}",
"public String show() {\r\n return \"show\";\r\n }",
"public void displayGameInstructions(){\n // System.out.println(\"============\");\n // System.out.println(\" _ | _ | _ \");\n // System.out.println(\"============\");\n // System.out.println(\" _ | _ | _ \");\n\n }",
"public static void main(String[] args) {\n\t\tFistURLTest test = new FistURLTest();\n\t\tString url = \"http://bbs.hupu.com/3712591.html\";\n\t\turl = test.changeUrl(url);\n\t\tSystem.out.println(url);\n\t}",
"public static void RF2() {\r\n System.out.print(\"Gracias,Tenga un Buen Dia \");\r\n\tSystem.out.print(\"Adios :D\");\r\n }",
"default void trip() {\n\t\tSystem.out.println(\"Oh no you fell! :(\");\n\t}",
"public void transQuest(){\n System.out.println(\"Que cantidad desea transferir?\");\n System.out.println(\"\");\n}",
"@Test\n public static void main() {\n myTitle = driver.getTitle();\n myTitleLength = driver.getTitle().length();\n \n // 4) Print Page Title and Title length on the Eclipse Console.\n System.out.println(myTitle);\n System.out.println(\"The Character Length of the Title is: \" + myTitleLength);\n \n\t // 5) Get Page URL and URL length\n myURL = driver.getCurrentUrl();\n myURLLength = driver.getCurrentUrl().length();\n \n\t // 6) Print URL and URL length on the Eclipse Console.\n\t System.out.println(myURL);\n System.out.println(\"The Character Length of the URL is: \" + myURLLength);\n \n\t // 7) Refresh current page\n driver.navigate().refresh();\n \t\n\t // 8) Get Page Source (HTML Source code) and Page Source length\n \n myPageSource = driver.getPageSource();\n myPageSourceLength = driver.getPageSource().length();\n\t\n\t // 9) Print Page Source and length on Eclipse Console.\n\t\n //System.out.println(myPageSource);\n System.out.println(\"The length of the source is: \" + myPageSourceLength); \n \n }",
"@Test(enabled = true)\n public void checkLink() {\n System.out.println(\"We Are Now Testing 20 Test Cases On: \" + driver.getCurrentUrl());\n System.out.println(\"*****************************************************************\");\n\n String expectedLink = \"https://www.expedia.com/\";\n String actualLink = driver.getCurrentUrl();\n\n //Validate Links\n Assert.assertEquals(actualLink, expectedLink, \"Test Failed, Link Does Not Match\");\n\n }",
"private static void showDeckInfo() {\n }",
"@Test\n public void runTest() throws Exception {\n driver.get(\"http://saucelabs.com/test/guinea-pig\");\n Thread.sleep(1000);\n WebElement idElement = driver.findElement(By.id(\"i_am_an_id\"));\n assertNotNull(idElement);\n assertEquals(\"I am a div\", idElement.getText());\n WebElement commentElement = driver.findElement(By.id(\"comments\"));\n assertNotNull(commentElement);\n commentElement.sendKeys(\"This is an awesome comment\");\n WebElement submitElement = driver.findElement(By.id(\"submit\"));\n assertNotNull(submitElement);\n submitElement.click();\n Thread.sleep(7000);\n WebElement yourCommentsElement = driver.findElement(By.id(\"your_comments\"));\n assertNotNull(yourCommentsElement);\n assertTrue(driver.findElement(By.id(\"your_comments\")).getText().contains(\"This is an awesome comment\"));\n\n System.out.println(driver.getCurrentUrl());\n }",
"private String waitPrint(){return \"waiting for other players...\";}",
"public static void helper(){\n System.out.println(\"\\n0: Search Transaction\");\n System.out.println(\"1: New Transaction\");\n System.out.println(\"2: Query Transaction Detail\");\n System.out.println(\"back: return last menu\");\n }",
"public void wapTinyurl() {\n String url = \"http://m.nuomi.com/mianyang/deal/l5kkhcqr\";\r\n Pattern p = Pattern.compile(\"^http://\\\\w+\\\\.nuomi\\\\.com/\\\\w+/deal/(\\\\w+$)\");\r\n Matcher m = p.matcher(url);\r\n if (m.find()) {\r\n p(m.group(1));\r\n }\r\n }",
"@Override\n public void onSuccess(PendingDynamicLinkData pendingDynamicLinkData) {\n Uri deepLink = null;\n if (pendingDynamicLinkData != null) {\n deepLink = pendingDynamicLinkData.getLink();\n\n //String url = deepLink.toString(); https://www.m8s.world/1CV9P8\n String url = method(deepLink.toString());\n Log.d(\"+++++\", \"++ url deep ++\" + url.charAt(12));\n Log.d(\"+++++\", \"++ url deep ++\" + url);\n //Toast.makeText(HomeActivity.this, \"\"+url.charAt(13), Toast.LENGTH_SHORT).show();\n if (url.charAt(12) == 'm') {\n if (url != null) {\n if (dialog!=null)\n dialog.dismiss();\n DescrptedFragment descrptedFragment = new DescrptedFragment();\n Bundle bundle = new Bundle();\n descrptedFragment.setArguments(bundle);\n bundle.putString(\"deeplink\", url.toString());\n FragmentTransaction transaction = fragmentManager.beginTransaction();\n transaction.replace(R.id.framelayout, descrptedFragment);\n transaction.addToBackStack(null);\n transaction.commit();\n }\n } else {\n\n if (url.charAt(11) == 'm') {\n if (url.contains(\"=\"))\n {\n if (dialog!=null)\n dialog.dismiss();\n String[] separated = url.split(\"=\");\n String[] separateditem = separated[1].split(\"&\");\n DetailsFragment descrptedFragment = new DetailsFragment();\n Bundle bundle = new Bundle();\n bundle.putString(\"deeplink\", url.toString());\n bundle.putString(\"ItemId\", separateditem[0]);\n descrptedFragment.setArguments(bundle);\n Log.d(\"+++++\", \"++ url deep ++\" + separateditem[0]);\n Log.d(\"+++++\", \"++ url deep ++\" + separated[2]);\n SharedToken sharedToken = new SharedToken(HomeActivity.this);\n sharedToken.setCatid(separated[2]);\n FragmentTransaction transaction = fragmentManager.beginTransaction();\n transaction.replace(R.id.framelayout, descrptedFragment);\n transaction.addToBackStack(null);\n transaction.commit();\n }\n else\n {\n if (dialog!=null)\n dialog.dismiss();\n SplashScreen.code = deepLink.toString().substring(deepLink.toString().lastIndexOf('/') + 1);\n Intent intent = new Intent(HomeActivity.this, SplashScreen.class);\n startActivity(intent);\n\n finish();\n }\n\n }\n else {\n if (dialog!=null)\n dialog.dismiss();\n SplashScreen.code = deepLink.toString().substring(deepLink.toString().lastIndexOf('/') + 1);\n Intent intent = new Intent(HomeActivity.this, SplashScreen.class);\n startActivity(intent);\n\n finish();\n }\n }\n\n //Log.d(\"deeplink\", \"\" + code);\n }\n // ...\n }",
"private static void showMatchedDeckInfo() {\n }",
"public static void f_menu(){\n System.out.println(\"------------------------------------------------\");\n System.out.println(\"------------------------------------------------\");\n System.out.println(\"-------------Soft_AVERAGE_HEIGHT-----------------\");\n System.out.println(\"-------------version 1.0 23-oct-2020------------\");\n System.out.println(\"-------------make by Esteban Gaona--------------\");\n System.out.println(\"-------------------------------------------------\");\n System.out.println(\"-------------------------------------------------\");\n}",
"public void showBreach();",
"public String printWall(){\n return \"\";\r\n }",
"public static void main(String[] args) {\n\t\tString myUrl = \"http://github.com/abhi20aug\";\n\t\ttry {\n\t\t\tURL newUrl = new URL(myUrl);\n\t\t\tSystem.out.println(\"simple url\"+newUrl.toString());\n\t\t} catch (MalformedURLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t\n\t}",
"public String getUrl(){\n return urlsText;\n }",
"private static void Secondcommentary() {\n\t\tSystem.out.println(\" Ind Scored very Good \");\n\t\t\n\t}",
"public void show()\r\n {\r\n\tshow(\"\");\r\n }",
"public static void main(String[] args) throws AWTException, InterruptedException {\n\r\n\t\tSystem.setProperty(\"webdriver.chrome.driver\",\"C:\\\\Users\\\\SatishPothu\\\\Downloads\\\\chromedriver_win32\\\\chromedriver.exe\");\r\n\t\t\r\n\t\tChromeDriver driver = new ChromeDriver();\r\n\t\tdriver.manage().window().maximize();\r\n\t driver.navigate().to(\"http://realestate.upskills.in/wp-admin/\");\r\n\t WebElement username = driver.findElement(By.id(\"user_login\"));\r\n\t WebElement password = driver.findElement(By.id(\"user_pass\"));\r\n\r\n\t username.sendKeys(\"admin\");\r\n\t password.sendKeys(\"adminuser@12345\");\r\n\t \r\n\t \r\n\t Actions ac = new Actions(driver);\t\r\n\t ac.sendKeys(Keys.ENTER).perform();\r\n\t \r\n WebElement link = driver.findElement(By.xpath(\"//a[text()='Howdy, ']\"));\r\n\t \r\n\t ac.contextClick(link).sendKeys(Keys.ARROW_DOWN).build().perform();\r\n\t Robot rob = new Robot();\r\n\t rob.keyPress(KeyEvent.VK_DOWN);\r\n\t Thread.sleep(2000);\r\n\t rob.keyPress(KeyEvent.VK_ENTER);\r\n\t Thread.sleep(2000);\r\n\t rob.keyPress(KeyEvent.VK_CONTROL);\r\n\t Thread.sleep(2000);\r\n\t rob.keyPress(KeyEvent.VK_TAB);\r\n\t Thread.sleep(2000);\r\n\t String url = driver.getCurrentUrl();\r\n\t System.out.println(url);\r\n\t rob.keyPress(KeyEvent.VK_CONTROL);\r\n\t Thread.sleep(2000);\r\n\t rob.keyPress(KeyEvent.VK_TAB);\r\n\t \r\n\t \r\n\t \r\n\t \r\n\t String url1 = driver.getCurrentUrl();\r\n\t System.out.println(url1);\r\n\t \r\n\t \r\n\t \r\n\t \r\n\t \r\n\t \r\n\t \r\n\t \r\n\t\t\t \r\n\t \r\n\t \r\n\t \r\n\t \r\n\t \r\n\t \r\n\t \r\n\r\n\t \r\n\t \r\n\t \r\n\t \r\n\r\n\t \r\n\t \r\n\t \r\n\t \r\n\t \r\n\t \t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}",
"@Test\n\tpublic void test() {\n\t\tString url = \"URL http://www.nuigalway.ie/c3/documents/3pentanonethermo.dat\";\n\t\t//String url = \"URL http://www.nuigalway.ie/c3/documents/DIB_mechanism.dat\";\n\t\t//String url = \"URL http://www.nuigalway.ie/c3/aramco2/DATA_FILES/AramcoMech2.0.mech\";\n\t\t//String url = \"URL http://web.eng.ucsd.edu/mae/groups/combustion/sdmech/sandiego20141004/sandiego20141004_mechCK.txt\";\n\t\t//String url = \"URL http://web.eng.ucsd.edu/mae/groups/combustion/sdmech/sandiego_nitrogen/NOx_20041209/NOXsandiego20041209.mec\";\n\t\t//String url = \"URL https://combustion.llnl.gov/content/assets/docs/combustion/h2_v1b_mech.txt\";\n\t\t//String url = \"URL http://www.nuigalway.ie/c3/documents/Methanol_2016_mech.inp\";\n\t\t//String url = \"URL http://www.nuigalway.ie/c3/documents/56.55_c3_chem.inp\";\n\t\t//String url = \"URL https://combustion.llnl.gov/content/assets/docs/combustion/i-pentanol_v46_06_release_inp.txt\";\n\t\t//String url = \"URL http://www.nuigalway.ie/c3/documents/c3oh_49.mech\";\n\t\t//String resource = \"RESOURCE info/esblurock/react/resources/mechanisms/LLNLHeptane\";\n\t\tReadToString read = new ReadToString();\n\t\ttry {\n\t\t\t//String input = read.parseFromLineSpecification(resource);\n\t\t\tString input = read.parseFromLineSpecification(url);\n\t\t\t//URLToString urlstring = new URLToString(resource);\n\t\t\t//String input = urlstring.toString();\n\t\t\tString commentChar = \"!\";\n\t\t\tChemkinString lines = new ChemkinString(input, commentChar);\n\t\t\tChemkinMechanism mechanism = new ChemkinMechanism();\n\t\t\tlines.nextToken();\n\t\t\tmechanism.parse(lines, commentChar);\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t//System.out.println(urlstring.toString());\n\n\t}",
"public static void popBillingPage (String url)\n {\n if (CShell.isGuest()) {\n MsoyUI.infoAction(_cmsgs.gobuyMustLogon(), _cmsgs.gobuyLogon(),\n Link.createHandler(Pages.ACCOUNT, \"logon\"));\n\n } else if (CShell.isPermaguest()) {\n MsoyUI.infoAction(_cmsgs.gobuyMustRegister(), _cmsgs.gobuyRegister(),\n NaviUtil.onMustRegister());\n\n } else if (MemberMailUtil.isPlaceholderAddress(CShell.creds.accountName)) {\n MsoyUI.infoAction(_cmsgs.gobuyMustConfigure(), _cmsgs.gobuyConfigure(),\n Link.createHandler(Pages.ACCOUNT, \"config\"));\n\n } else {\n Window.open(getAbsoluteBillingURL(url),\n \"_blank\",\n // For those silly browsers that open this in a new window instead of a new\n // tab, enable all the chrome options on the new window.\n \"resizable=1,menubar=1,toolbar=1,location=1,status=1,scrollbars=1\");\n }\n }",
"private static void printDetail() {\n System.out.println(\"Welcome to LockedMe.com\");\n System.out.println(\"Version: 1.0\");\n System.out.println(\"Developer: Sherman Xu\");\n System.out.println(\"sherman.xu@lockers.com\");\n }",
"final void show() {\n\t\tSystem.out.println(\">> This is show of CC\");\n\t}",
"private void hitURL(String URL){\n Log.v(\".hitURL\", \" now crawling at: \" + URL);\n String refinedURL = NetworkUtils.makeURL(URL).toString();\n visitedLinks.add(refinedURL);\n browser.loadUrl(refinedURL);\n\n\n // OR, you can also load from an HTML string:\n// String summary = \"<html><body>You scored <b>192</b> points.</body></html>\";\n// webview.loadData(summary, \"text/html\", null);\n // ... although note that there are restrictions on what this HTML can do.\n // See the JavaDocs for loadData() and loadDataWithBaseURL() for more info.\n }",
"public static void method1(){\n System.out.println(\"*****\");\n System.out.println(\"*****\");\n System.out.println(\" * *\");\n System.out.println(\" *\");\n System.out.println(\" * *\");\n }",
"public static void main(String args[]) {\n\t String str1 = \"Welcome\";\n\t String str2 = \" to \";\n\t String str3 = \" HOME \";\n\t str1 = str1.concat(str2).concat(str3);\n\t System.out.println(str1);\n\t \n\t \n\t \n\t }",
"static void show(final String string) {\n System.out.println(string);\n }",
"void comer() {\n\t\tSystem.out.println(\"comiendo\");\n\t}"
] | [
"0.5692312",
"0.5566422",
"0.5355571",
"0.53383106",
"0.5322089",
"0.5173849",
"0.5156619",
"0.5154756",
"0.51003706",
"0.5099492",
"0.5092772",
"0.5088626",
"0.5081214",
"0.5053834",
"0.5051026",
"0.50182784",
"0.5014984",
"0.50008804",
"0.4992312",
"0.49908715",
"0.49904773",
"0.4990453",
"0.49830857",
"0.49729785",
"0.49726003",
"0.49673554",
"0.49664044",
"0.49634728",
"0.49528193",
"0.4944594",
"0.49231094",
"0.49094373",
"0.4908634",
"0.4908428",
"0.4906029",
"0.490266",
"0.48940963",
"0.48835042",
"0.4879171",
"0.48788792",
"0.48769844",
"0.48737717",
"0.48715594",
"0.4869264",
"0.48683405",
"0.4863924",
"0.4861879",
"0.48494095",
"0.4848723",
"0.4845164",
"0.4834741",
"0.48317382",
"0.48280436",
"0.48275304",
"0.48189843",
"0.48152763",
"0.48132885",
"0.4813048",
"0.4807794",
"0.48076135",
"0.48016885",
"0.47978774",
"0.47914872",
"0.47910735",
"0.47790408",
"0.47781608",
"0.4774738",
"0.47629073",
"0.47533745",
"0.47494632",
"0.47473314",
"0.47447455",
"0.4743063",
"0.47412124",
"0.47393656",
"0.47359154",
"0.47354782",
"0.4732172",
"0.47279334",
"0.47271666",
"0.47219056",
"0.47214493",
"0.47184986",
"0.47169408",
"0.471513",
"0.47119382",
"0.47104952",
"0.47096765",
"0.47074938",
"0.47067073",
"0.47065833",
"0.47057152",
"0.47038224",
"0.47017258",
"0.47013134",
"0.47010234",
"0.46977845",
"0.46970874",
"0.4695753",
"0.46934897",
"0.46928537"
] | 0.0 | -1 |
Gets the current player state. | @PlayerState
public abstract int getPlayerState(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public PlayerState getPlayerState() {\r\n return playerState;\r\n }",
"public Player getState() {\n\t\treturn state;\n\t}",
"public PlayerState getPlayerState() {\n return this.playerState;\n }",
"PlayerState getPlayerState() {\n return playerState;\n }",
"public boolean getPlayerState()\n\t{\n\t\treturn blnPlayerState;\n\t\t\n\t}",
"public String getPlayerState() {\n String playerState = name + \" \" + actionArray[0] \n + \" \" + actionArray[1] + \" \" + actionArray[2] + \" \" + colorID + \" \";\n return playerState;\n }",
"public GameState GetState(){\n\t\treturn this.state;\n\t}",
"public GameState getState() {\n\t\treturn state;\n\t}",
"public PlaybackStateCompat getPlaybackState() {\n }",
"public PlaybackStateCompat getPlaybackState() {\n }",
"public @Nullable PlaybackState getPlaybackState() {\n try {\n return mSessionBinder.getPlaybackState();\n } catch (RemoteException e) {\n Log.wtf(TAG, \"Error calling getPlaybackState.\", e);\n return null;\n }\n }",
"public GameState getGameState() {\n return this.state;\n }",
"public String getCurrentState() {\n\t\treturn currentState;\n\t}",
"public GameState getGameState() {\n return this.gameState;\n }",
"public int getCurrentState() {\n return myState;\n }",
"public GameObjectState getState() {\r\n\t\treturn state;\r\n\t}",
"public GameState getState(){\n\t\tGameState State=new GameState(this.points, this.currentBoard.getState());\n\t\t\n\t\treturn State;\n\t}",
"public String getCurrentPlayer() {\n return currentPlayer;\n }",
"public byte getState(){\n\t\t/*\n\t\tOFFLINE((byte)0),\n ONLINE((byte)1),\n SAVING((byte)2);\n\t\t */\n\t\t//getWorld().getcWorld().update(this);\n\t\treturn state;\n\t}",
"public GameState getGameState();",
"public S getCurrentState();",
"public int getCurrentPlayer() {\n return player;\n }",
"@Override\n public GameState getGameState() {\n return this.gameState;\n }",
"String getCurrentState() {\n return context.getString(allStates[currentIdx]);\n }",
"public State getCurrentState() {\n \t\treturn currentState;\n \t}",
"public String getLocalState()\n {\n return localState;\n }",
"public GameState getGameState(){\n return this.gameState;\n }",
"public Player getCurrentPlayer() {\n return currentPlayer;\n }",
"public Player getCurrentPlayer() {\n return currentPlayer;\n }",
"public CoreState getCurrentStatus() {\n return doStuffStrategy.determineCurrentStatus(this, 3000);\r\n }",
"public GameStatus getStatus() {\n\t\treturn status;\n\t}",
"public String getCurrentPlayer() {\n\t\treturn _currentPlayer;\n\t}",
"public State getCurrentState() {\n\t\treturn currentState;\n\t}",
"public State getCurrentState() {\n\t\treturn currentState;\n\t}",
"public static States getState() {\r\n\t\treturn currentState;\r\n\t}",
"public State getCurrentState() {\n return currentState;\n }",
"public static Gamestatus getGameStatus() {\r\n\t\treturn STATUS;\r\n\t}",
"public int getCurrentPlayer() {\n\t\treturn player;\n\t}",
"public Player getCurrentPlayer()\n\t{\n\t\treturn current;\n\t}",
"public String getCurrentState() {\n PPPoED.Type lastReceivedPkt = PPPoED.Type.getTypeByValue(this.packetCode);\n switch (lastReceivedPkt) {\n case PADI:\n return PppoeAgentEvent.Type.START.name();\n case PADR:\n case PADO:\n return PppoeAgentEvent.Type.NEGOTIATION.name();\n case PADS:\n return PppoeAgentEvent.Type.SESSION_ESTABLISHED.name();\n case PADT:\n // This case might never happen (entry is being removed on PADT messages).\n return PppoeAgentEvent.Type.TERMINATE.name();\n default:\n return PppoeAgentEvent.Type.UNKNOWN.name();\n }\n }",
"public TurtleState getCurrentState() {\n\t\treturn states.peek();\n\t}",
"public State getMyCurrentState () {\n return myCurrentState;\n }",
"public GameStatus getGameStatus() {\n return gameStatus;\n }",
"int getState();",
"int getState();",
"int getState();",
"int getState();",
"int getState();",
"int getState();",
"public StateName getCurrentState() {\n for (Map.Entry<StateName, StateI> entry : availableStates.entrySet()) {\n if (entry.getValue().equals(curState)) {\n return entry.getKey();\n }\n }\n return null;\n }",
"Player getCurrentPlayer();",
"Player getCurrentPlayer();",
"public String getGameStatus() {\n return gameStatus;\n }",
"public int activePlayer() {\n return this.activePlayer;\n }",
"public int getActivePlayer() {\n return activePlayer;\n }",
"public State getState()\n\t{\n\t\treturn getState(conferenceInfo);\n\t}",
"public State getState() {\n return state.get();\n }",
"public String toString() {\r\n\t\treturn gameState;\r\n\t}",
"public int getPlayState(){\r\n\t\tif(player.getStatus() == BasicPlayer.PLAYING){\r\n\t\t\treturn songsToPlay.isEmpty() ? selectedPreset + 10 : selectedPreset;\r\n\t\t}\r\n\t\treturn -1;\r\n\t}",
"public State getState();",
"public State getState();",
"public boolean isCurrentPlayer() {\n return playerStatus.isActive;\n }",
"GameState getGameState() {\n return gameState;\n }",
"public int getCurrentPlayer(){\n return this.currentPlayer;\n }",
"public Player getCurrentPlayer(){\n return this.currentPlayer;\n }",
"public int getSoundState() {\n return preferences.getInt(\"sound_state\",0);\n }",
"public byte getState() {\n return myState;\n }",
"PowerState getState();",
"public STATE getState() {\n\t\n\t\treturn state;\n\t}",
"public S getState() {\n return currentState;\n }",
"public KetchLeader.State getState() {\n\t\treturn state;\n\t}",
"public State getState()\r\n\t{\r\n\t\treturn this.state;\r\n\t}",
"@Override\n public BattleState getBattleState() {\n return state;\n }",
"State getState();",
"State getState();",
"State getState();",
"State getState();",
"public int getState();",
"public int getState();",
"public int getState();",
"public int getState();",
"public String getCurrentPlayer() {\r\n return this.playerIds[this.currentPlayer];\r\n }",
"String getState();",
"String getState();",
"String getState();",
"public int getState()\r\n\t{\r\n\t\treturn currentstate;\r\n\t}",
"public CoreState currentStatus() {\r\n return currentStatus;\r\n }",
"public String getState() \n\t{\n\t\treturn state;\n\t}",
"public State getState () {\n synchronized (this) {\n return state;\n }\n }",
"public String getState()\n\t{\n\t\treturn state;\n\t}",
"public String getState()\r\n\t{\r\n\t\treturn state;\r\n\t}",
"public String getState()\r\n\t{\r\n\t\treturn state;\r\n\t}",
"public String getState()\n {\n \treturn state;\n }",
"public Player getActivePlayer() {\r\n return activePlayer;\r\n }",
"public State getState() {\n\t\treturn state;\n\t}",
"public State getState() {\n\t\treturn state;\n\t}",
"public char getCurrentPlayer() {\n\t\treturn currentPlayer;\n\t}",
"public ServerPlayer getCurrentPlayer() {\r\n\t\treturn this.currentPlayer;\r\n\t}",
"public String getState() {\r\n\t\treturn state;\t\t\r\n\t}",
"public server.SayHello.shandong.State getState() {\n return state;\n }"
] | [
"0.8363639",
"0.8332977",
"0.82067865",
"0.813922",
"0.78026223",
"0.77854514",
"0.7479641",
"0.73934096",
"0.73931",
"0.72845757",
"0.726812",
"0.70141864",
"0.6984152",
"0.6947488",
"0.69246584",
"0.6864667",
"0.68509346",
"0.6820804",
"0.67704606",
"0.6765139",
"0.67586094",
"0.6737756",
"0.67332345",
"0.67107505",
"0.67072517",
"0.6701802",
"0.66629785",
"0.6638432",
"0.6638432",
"0.6635875",
"0.6632398",
"0.662552",
"0.6617245",
"0.6617245",
"0.66150606",
"0.6600205",
"0.6590748",
"0.65899515",
"0.65787154",
"0.6563373",
"0.6558586",
"0.6555006",
"0.65359026",
"0.6524261",
"0.6524261",
"0.6524261",
"0.6524261",
"0.6524261",
"0.6524261",
"0.6522974",
"0.6505287",
"0.6505287",
"0.6498161",
"0.64973015",
"0.6494362",
"0.64853525",
"0.64816123",
"0.64807564",
"0.64786506",
"0.64718956",
"0.64718956",
"0.64676",
"0.6467225",
"0.64576757",
"0.6456837",
"0.6445594",
"0.64399517",
"0.6435339",
"0.6433083",
"0.6422153",
"0.6421707",
"0.6417012",
"0.64126945",
"0.6409119",
"0.6409119",
"0.6409119",
"0.6409119",
"0.6403073",
"0.6403073",
"0.6403073",
"0.6403073",
"0.64029795",
"0.6399746",
"0.6399746",
"0.6399746",
"0.6397252",
"0.6394623",
"0.6392495",
"0.638278",
"0.63824636",
"0.6373242",
"0.6373242",
"0.6368607",
"0.63667476",
"0.6359795",
"0.6359795",
"0.63460463",
"0.63398904",
"0.6338717",
"0.633446"
] | 0.6720827 | 23 |
Gets the size of the video. | @NonNull
public VideoSize getVideoSize() {
throw new UnsupportedOperationException("getVideoSize is not implemented");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"VideoSize getSize() {\n return size;\n }",
"public double getVideoLength(){\n\t\treturn videoLength;\n\t}",
"public double getVideoWidth() {\n return getElement().getVideoWidth();\n }",
"public double getVideoHeight() {\n return getElement().getVideoHeight();\n }",
"@Override\n\t\tpublic int getVideoWidth() {\n\t\t\tif (mServicePlayerEngine != null) {\n\t\t\t\treturn mServicePlayerEngine.getVideoWidth();\n\t\t\t}\n\t\t\treturn 0;\n\t\t}",
"public int getVideoWidth(StarObjectClass self){ \r\n \t\tStarCLEMediaPlayer mediaplayer = (StarCLEMediaPlayer)WrapAndroidClass.GetAndroidObject(self,\"AndroidObject\");\r\n \t\tif( mediaplayer == null )\r\n \t\t\treturn 0;\r\n \t\treturn mediaplayer.getVideoWidth();\r\n \t}",
"public int getVideoHeight(StarObjectClass self){ \r\n \t\tStarCLEMediaPlayer mediaplayer = (StarCLEMediaPlayer)WrapAndroidClass.GetAndroidObject(self,\"AndroidObject\");\r\n \t\tif( mediaplayer == null )\r\n \t\t\treturn 0;\r\n \t\treturn mediaplayer.getVideoHeight();\r\n \t}",
"@Override\n\t\tpublic int getVideoHeight() {\n\t\t\tif (mServicePlayerEngine != null) {\n\t\t\t\treturn mServicePlayerEngine.getVideoHeight();\n\t\t\t}\n\t\t\treturn 0;\n\t\t}",
"public String getVideoResolution() {\n //Camera.Size s = mCamera.getParameters().getPreviewSize();\n //return s.width + \"x\" + s.height;\n if (mProfile == null)\n return null;\n return mProfile.videoFrameWidth + \"x\" + mProfile.videoFrameHeight;\n }",
"public String getSize() {\n return \"size: \" + movieData.size();\n }",
"public Size getSize() {\n return size;\n }",
"@Schema(example = \"2186\", description = \"Size of the image in bytes.\")\n public Long getSize() {\n return size;\n }",
"public int GetSize() {\n\t\tif(this.V == 0) {\n\t\t\t\n\t\t\t// Read from settings file\n\t\t\ttry {\n\t\t\t\tBufferedReader br = new BufferedReader(new FileReader(\"settings.txt\"));\n\t\t\t\tString line;\n\t\t\t\tif((line = br.readLine()) != null) {\n\t\t\t\t\tthis.V = Integer.parseInt(line.split(\" \")[1]);\n\t\t\t\t}\n\t\t\t} catch(IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t}\n\t\treturn this.V;\n\t}",
"public long getSize() {\n return mSize;\n }",
"public float getSize() {\n\t\treturn size;\n\t}",
"public float getSize() {\n return size;\n }",
"public int getLength() {\n return mySize.getLength();\n }",
"public int getOverrodeVideoDuration() {\n return this.mMaxVideoDurationInMs;\n }",
"public Size getPreviewSize() {\n String pair = get(\"preview-size\");\n if (pair == null)\n return null;\n String[] dims = pair.split(\"x\");\n if (dims.length != 2)\n return null;\n\n return new Size(Integer.parseInt(dims[0]),\n Integer.parseInt(dims[1]));\n\n }",
"public float getSize()\n {\n return size;\n }",
"public final Vector2f getSize() {\r\n return size;\r\n }",
"public long getSize() {\n return size.get();\n }",
"public long getSize() {\n\t\treturn size;\n\t}",
"public String getSize() {\n return fullPhoto.getSize();\n }",
"public long getSize() {\r\n\t\treturn size;\r\n\t}",
"public Point2D.Float getSize() {\r\n\t\treturn size;\r\n\t}",
"public String getSize() {\n return size;\n }",
"public String getSize() {\n return size;\n }",
"public Dimension getSize() {\r\n\t\treturn this.size;\r\n\t}",
"public long getSize() {\n return size;\n }",
"public long getSize() {\n return size;\n }",
"public long getSize() {\n return size;\n }",
"public long getSize() {\n return size;\n }",
"public String getSize() {\r\n return size;\r\n }",
"public Point getSize() {\n\t\treturn p_screenSize;\n\t}",
"public long getSize() {\r\n return size;\r\n }",
"public long getSize() {\n return size;\n }",
"public double getSize()\n\t{\n\t\treturn size;\n\t}",
"public double getSize() {\n return size_;\n }",
"public Dimension getSize()\n\t{\n\t\treturn rect.getSize();\n\t}",
"public double getSize() {\n return size_;\n }",
"@Override\n\tpublic int getMoviePlayLength(int movieID) {\n\t\treturn moviePlayLength;\n\t}",
"public final int getSize() {\n return size;\n }",
"public final long getSize() { return size; }",
"public double getSize() {\n return getElement().getSize();\n }",
"public Dimension getSize()\n\t{\n\t\treturn new Dimension(image.getWidth(),image.getHeight());\n\t}",
"public int getFrameLength() {\n return frameLength;\n }",
"public int getPlayLength()\n\t{\n\t\treturn playbackLength;\n\t}",
"public static int GetSize() {\n\t\t\treturn gridSize.getValue();\n\t\t}",
"public long getSize()\n {\n return getLong(\"Size\");\n }",
"public Dimension getSize() {\n\t\treturn size.getCopy();\n\t}",
"public float getSize() {\n return bufSize;\n }",
"public static byte getSize() {\n return SIZE;\n }",
"public long getSize() {\r\n return mFile.getSize();\r\n }",
"public Size getPictureSize() {\n String pair = get(\"picture-size\");\n if (pair == null)\n return null;\n String[] dims = pair.split(\"x\");\n if (dims.length != 2)\n return null;\n\n return new Size(Integer.parseInt(dims[0]),\n Integer.parseInt(dims[1]));\n\n }",
"public int getSize() {\r\n return _size;\r\n }",
"public static int getSIZE() {\n return SIZE;\n }",
"public TSizeInBytes getSize() {\n\n\t\treturn size;\n\t}",
"int getSize() {\n return size;\n }",
"public double getSize() \n {\n return size;\n }",
"int getSize() {\n return size;\n }",
"@java.lang.Override\n public godot.wire.Wire.Vector2 getSize() {\n return size_ == null ? godot.wire.Wire.Vector2.getDefaultInstance() : size_;\n }",
"public double getVelocitySize() {\r\n return Math.sqrt(this.dx * this.dx + this.dy * this.dy);\r\n }",
"public int size() {\n return 4 + value.length + BufferUtil.paddingLength(value.length, 4);\n }",
"public int getSize() {\n\t\treturn width + length;\n\t}",
"public int getSize() {\n\t\treturn _size;\n\t}",
"public Vector2i getSize() {\n return new Vector2i(getWidth(), getHeight());\n }",
"public int getSize() {\n return size;\n }",
"public int getSize() {\n return size;\n }",
"public int getSize() {\n return size;\n }",
"public int getSize() {\n return size;\n }",
"public int getSize() {\n return size;\n }",
"public int getSize() {\n return size;\n }",
"public int getSize() {\n return size;\n }",
"public int getSize() {\n return size;\n }",
"public final Point getSize() {\r\n return new Point(config.width, config.height);\r\n }",
"public int getVicarPixelSize() {\n\t\treturn vicarPixelSize;\n\t}",
"public int getFrameSize();",
"public godot.wire.Wire.Vector2 getSize() {\n if (sizeBuilder_ == null) {\n return size_ == null ? godot.wire.Wire.Vector2.getDefaultInstance() : size_;\n } else {\n return sizeBuilder_.getMessage();\n }\n }",
"public int getSize() {\n return size;\n }",
"public int getSize() {\r\n return size;\r\n }",
"private int getSize() {\n\t\t\treturn size;\n\t\t}",
"public int getWidth() {\n return mySize.getWidth();\n }",
"public String getVmSize() {\n return vmSize;\n }",
"public int getSize() {\n\t\treturn size;\n\t}",
"public int getSize() {\n\t\treturn size;\n\t}",
"public int getSize() {\n\t\treturn size;\n\t}",
"public int getSize() {\n\t\treturn size;\n\t}",
"public int getSize() {\n\t\treturn size;\n\t}",
"public int getSize() {\n\t\treturn size;\n\t}",
"public int getSize() {\n\t\treturn size;\n\t}",
"public int getSize() {\n\t\treturn size;\n\t}",
"public int getSize() {\n\t\treturn size;\n\t}",
"public int getSize() {\n\t\treturn size;\n\t}",
"public int getSize() {\n\t\treturn size;\n\t}",
"public int getSize() {\n\t\treturn size;\n\t}",
"public int getSize() {\n\t\treturn size;\n\t}",
"public int getSize() {\n\t\treturn m_size;\n\t}",
"public int getSize( )\n {\n return size;\n }",
"public int getSize() {\r\n\t\treturn size;\r\n\t}"
] | [
"0.8366076",
"0.78055257",
"0.77730376",
"0.76728773",
"0.72169346",
"0.71240956",
"0.70531195",
"0.6999558",
"0.69233227",
"0.68576175",
"0.6748991",
"0.6696178",
"0.657099",
"0.65336263",
"0.6529436",
"0.6521649",
"0.6491661",
"0.6473915",
"0.64729995",
"0.6464875",
"0.6461227",
"0.6448752",
"0.64463127",
"0.6445403",
"0.6445312",
"0.6441864",
"0.644013",
"0.644013",
"0.6425727",
"0.64162844",
"0.64162844",
"0.64162844",
"0.64162844",
"0.6414959",
"0.6409431",
"0.6400033",
"0.6367385",
"0.6357075",
"0.63418067",
"0.6327858",
"0.6323903",
"0.63154316",
"0.6311151",
"0.6302219",
"0.6300396",
"0.62960684",
"0.62598777",
"0.6256205",
"0.62498397",
"0.6248797",
"0.6247013",
"0.62285453",
"0.6216117",
"0.6200455",
"0.61925435",
"0.6180498",
"0.617641",
"0.6174538",
"0.6165361",
"0.6150553",
"0.6147331",
"0.61389405",
"0.61350864",
"0.6134595",
"0.6128786",
"0.6111714",
"0.610974",
"0.6108897",
"0.6108897",
"0.6108897",
"0.6108897",
"0.6108897",
"0.6108897",
"0.6108897",
"0.6108897",
"0.610334",
"0.6100157",
"0.6092652",
"0.6088428",
"0.60870326",
"0.6083896",
"0.60796523",
"0.60666335",
"0.60624856",
"0.606169",
"0.606169",
"0.606169",
"0.606169",
"0.606169",
"0.606169",
"0.606169",
"0.606169",
"0.606169",
"0.606169",
"0.606169",
"0.606169",
"0.606169",
"0.6060183",
"0.60597044",
"0.6053588"
] | 0.8089135 | 1 |
Gets the playlist metadata. | @Nullable
public abstract MediaMetadata getPlaylistMetadata(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public SongMetada getMetadata() {\n\t\treturn metadata;\n\t}",
"public Playlist fetchPlaylist() {\n\t\treturn mPlaylist;\n\t}",
"public @Nullable MediaMetadata getMetadata() {\n try {\n return mSessionBinder.getMetadata();\n } catch (RemoteException e) {\n Log.wtf(TAG, \"Error calling getMetadata.\", e);\n return null;\n }\n }",
"public java.util.List<MetadataEntry> getMetadataList() {\n return metadata_;\n }",
"com.google.cloud.talent.v4beta1.ResponseMetadata getMetadata();",
"Metadata getMetaData();",
"public List<Metadata> getMetadata()\n\t{\n\t\treturn mMetadata;\n\t}",
"public Map<String, String> getMetadata() {\n return metadata;\n }",
"public Map<String, String> getMetadata() {\n return metadata;\n }",
"public Hashtable<String, Playlist> getPlaylists() {\n return playlists;\r\n }",
"public Map<String, Object> getMetadata() {\n return metadata;\n }",
"public List<AbstractMetadata> getMetadata() {\n\t\treturn Collections.unmodifiableList(this.metadata);\n\t}",
"Map<String, Object> getAllMetadata();",
"java.util.List<java.lang.String>\n getMetadataList();",
"java.util.List<java.lang.String>\n getMetadataList();",
"List<MediaMetadata> getAll();",
"public @Nullable MediaMetadata2 getMetadata() {\n return mMetadata;\n }",
"public static ArrayList<Metadata> getMetadata() {\n\t\tmetadata.add(new Metadata(\"id\", \"Numero identificativo del lavoro\", \"long\"));\n\t\tmetadata.add(new Metadata(\"role\", \"Ruolo lavorativo\", \"String\"));\n\t\tmetadata.add(new Metadata(\"cname\", \"Nome dell'azienda\", \"String\"));\n\t\tmetadata.add(new Metadata(\"etype\", \"Tipo di impiego\", \"String\"));\n\t\tmetadata.add(new Metadata(\"location\", \"Luogo\", \"String\"));\n\t\tmetadata.add(new Metadata(\"remote\", \"Lavoro a distanza\", \"Bool\"));\n\t\t\n\n\t\treturn metadata;\n\t}",
"@External(readonly = true)\n\tpublic List<String> get_metadata_fields(){\n\t\t\n\t\treturn this.METADATA_FIELDS;\n\t}",
"public List<VueMetadataElement> getMetadata() { return dataList; }",
"public Object getMetadata() {\n return this.metadata;\n }",
"public Map getMetadata() {\n return metadata;\n }",
"public ArrayList<SongInfo> getSongInfoList()\n {\n return songInfos;\n }",
"public String getMetadataURL();",
"@NonNull\n JsonMap getMetadata();",
"public void getArtistsMetaDataFromDevice(){\n // implement a cursorLoader\n ContentResolver resolver = getContentResolver();\n Cursor cursor = resolver.query(MediaStore.Audio.Artists.INTERNAL_CONTENT_URI,null,null,null,MediaStore.Audio.ArtistColumns.ARTIST);\n }",
"public @Nullable PlaybackInfo getPlaybackInfo() {\n try {\n return mSessionBinder.getVolumeAttributes();\n } catch (RemoteException e) {\n Log.wtf(TAG, \"Error calling getAudioInfo.\", e);\n }\n return null;\n }",
"public AbstractMetadata getMetadata() {\n\t\treturn metadata;\n\t}",
"public void onPlaylistMetadataChanged(@NonNull SessionPlayer player,\n @Nullable MediaMetadata metadata) {\n }",
"org.apache.calcite.avatica.proto.Responses.RpcMetadata getMetadata();",
"org.apache.calcite.avatica.proto.Responses.RpcMetadata getMetadata();",
"org.apache.calcite.avatica.proto.Responses.RpcMetadata getMetadata();",
"org.apache.calcite.avatica.proto.Responses.RpcMetadata getMetadata();",
"org.apache.calcite.avatica.proto.Responses.RpcMetadata getMetadata();",
"org.apache.calcite.avatica.proto.Responses.RpcMetadata getMetadata();",
"org.apache.calcite.avatica.proto.Responses.RpcMetadata getMetadata();",
"org.apache.calcite.avatica.proto.Responses.RpcMetadata getMetadata();",
"org.apache.calcite.avatica.proto.Responses.RpcMetadata getMetadata();",
"org.apache.calcite.avatica.proto.Responses.RpcMetadata getMetadata();",
"org.apache.calcite.avatica.proto.Responses.RpcMetadata getMetadata();",
"org.apache.calcite.avatica.proto.Responses.RpcMetadata getMetadata();",
"org.apache.calcite.avatica.proto.Responses.RpcMetadata getMetadata();",
"org.apache.calcite.avatica.proto.Responses.RpcMetadata getMetadata();",
"@java.lang.Override\n public io.grafeas.v1.Metadata getMetadata() {\n return metadata_ == null ? io.grafeas.v1.Metadata.getDefaultInstance() : metadata_;\n }",
"public MetaData getMetaData();",
"public String playlistToString(){\n String out = \"\";\n out =\"********** Playlist **********\\n\"+\n \"** Title: \"+name+\"\\n\"+\n \"** Duration: \"+timeToFormat(updateDuration())+\"\\n\"+\n \"** Genre: \"+changeGendersOfPlaylist(playlistAllGenders())+\"\\n\";\n\n return out;\n }",
"public String getMediaDetails() {\n return mediaListPlayer.currentMrl();\n }",
"public ResourceContent getMetadata() throws IOException;",
"public org.apache.calcite.avatica.proto.Responses.RpcMetadata getMetadata() {\n return metadata_ == null ? org.apache.calcite.avatica.proto.Responses.RpcMetadata.getDefaultInstance() : metadata_;\n }",
"public org.apache.calcite.avatica.proto.Responses.RpcMetadata getMetadata() {\n return metadata_ == null ? org.apache.calcite.avatica.proto.Responses.RpcMetadata.getDefaultInstance() : metadata_;\n }",
"public org.apache.calcite.avatica.proto.Responses.RpcMetadata getMetadata() {\n return metadata_ == null ? org.apache.calcite.avatica.proto.Responses.RpcMetadata.getDefaultInstance() : metadata_;\n }",
"public org.apache.calcite.avatica.proto.Responses.RpcMetadata getMetadata() {\n return metadata_ == null ? org.apache.calcite.avatica.proto.Responses.RpcMetadata.getDefaultInstance() : metadata_;\n }",
"public org.apache.calcite.avatica.proto.Responses.RpcMetadata getMetadata() {\n return metadata_ == null ? org.apache.calcite.avatica.proto.Responses.RpcMetadata.getDefaultInstance() : metadata_;\n }",
"public org.apache.calcite.avatica.proto.Responses.RpcMetadata getMetadata() {\n return metadata_ == null ? org.apache.calcite.avatica.proto.Responses.RpcMetadata.getDefaultInstance() : metadata_;\n }",
"public org.apache.calcite.avatica.proto.Responses.RpcMetadata getMetadata() {\n return metadata_ == null ? org.apache.calcite.avatica.proto.Responses.RpcMetadata.getDefaultInstance() : metadata_;\n }",
"public org.apache.calcite.avatica.proto.Responses.RpcMetadata getMetadata() {\n return metadata_ == null ? org.apache.calcite.avatica.proto.Responses.RpcMetadata.getDefaultInstance() : metadata_;\n }",
"public org.apache.calcite.avatica.proto.Responses.RpcMetadata getMetadata() {\n return metadata_ == null ? org.apache.calcite.avatica.proto.Responses.RpcMetadata.getDefaultInstance() : metadata_;\n }",
"public org.apache.calcite.avatica.proto.Responses.RpcMetadata getMetadata() {\n return metadata_ == null ? org.apache.calcite.avatica.proto.Responses.RpcMetadata.getDefaultInstance() : metadata_;\n }",
"public org.apache.calcite.avatica.proto.Responses.RpcMetadata getMetadata() {\n return metadata_ == null ? org.apache.calcite.avatica.proto.Responses.RpcMetadata.getDefaultInstance() : metadata_;\n }",
"public org.apache.calcite.avatica.proto.Responses.RpcMetadata getMetadata() {\n return metadata_ == null ? org.apache.calcite.avatica.proto.Responses.RpcMetadata.getDefaultInstance() : metadata_;\n }",
"public org.apache.calcite.avatica.proto.Responses.RpcMetadata getMetadata() {\n return metadata_ == null ? org.apache.calcite.avatica.proto.Responses.RpcMetadata.getDefaultInstance() : metadata_;\n }",
"public org.apache.calcite.avatica.proto.Responses.RpcMetadata getMetadata() {\n return metadata_ == null ? org.apache.calcite.avatica.proto.Responses.RpcMetadata.getDefaultInstance() : metadata_;\n }",
"@java.lang.Override\n public com.google.cloud.speech.v2.RecognitionResponseMetadata getMetadata() {\n return metadata_ == null\n ? com.google.cloud.speech.v2.RecognitionResponseMetadata.getDefaultInstance()\n : metadata_;\n }",
"public java.util.List<? extends MetadataEntryOrBuilder> getMetadataOrBuilderList() {\n return metadata_;\n }",
"@Override\n\tpublic List<Playlist> getAll() {\n\t\treturn playlistRepository.findAll();\n\t}",
"public PDMetadata getMetadata() {\n/* 528 */ PDMetadata retval = null;\n/* 529 */ COSBase mdStream = this.stream.getDictionaryObject(COSName.METADATA);\n/* 530 */ if (mdStream != null)\n/* */ {\n/* 532 */ if (mdStream instanceof COSStream) {\n/* */ \n/* 534 */ retval = new PDMetadata((COSStream)mdStream);\n/* */ }\n/* 536 */ else if (!(mdStream instanceof org.apache.pdfbox.cos.COSNull)) {\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 542 */ throw new IllegalStateException(\"Expected a COSStream but was a \" + mdStream\n/* */ \n/* 544 */ .getClass().getSimpleName());\n/* */ } \n/* */ }\n/* 547 */ return retval;\n/* */ }",
"public String getSong() {\n\t\tSystem.out.println(\"PlaylistPanel \" + panel.getName() + \" - song chosen: \" + song);\n\t\treturn song;\n\t}",
"public CCAudioMetaData getMetaData() {\n\t\treturn meta;\n\t}",
"public Map<String, Object> getMetaData() {\n\t\treturn metaData;\n\t}",
"com.google.cloud.talent.v4beta1.ResponseMetadataOrBuilder getMetadataOrBuilder();",
"Map<String, String> getCustomMetadata();",
"@JsonGetter(\"metadata\")\n public Object getMetadata ( ) {\n return this.metadata;\n }",
"java.util.List<io.dstore.engine.MetaInformation> \n getMetaInformationList();",
"java.util.List<io.dstore.engine.MetaInformation> \n getMetaInformationList();",
"java.util.List<io.dstore.engine.MetaInformation> \n getMetaInformationList();",
"java.util.List<io.dstore.engine.MetaInformation> \n getMetaInformationList();",
"java.util.List<io.dstore.engine.MetaInformation> \n getMetaInformationList();",
"public java.util.List<MetadataEntry> getMetadataList() {\n if (metadataBuilder_ == null) {\n return java.util.Collections.unmodifiableList(metadata_);\n } else {\n return metadataBuilder_.getMessageList();\n }\n }",
"com.cmpe275.grpcComm.MetaData getMetaData();",
"public boolean getIsPlaylist() {\n\t\treturn this.isPlaylist;\n\t}",
"public void getSongList() {\n\t\t// retrieve song info\n\t\tsongList = new ArrayList<Song>();\n\t\tContentResolver musicResolver = getContentResolver();\n\t\tUri musicUri = android.provider.MediaStore.Audio.Media.EXTERNAL_CONTENT_URI;\n\t\tCursor musicCursor = musicResolver.query(musicUri, null, null, null,\n\t\t\t\tnull);\n\n\t\tif (musicCursor != null && musicCursor.moveToFirst()) {\n\t\t\t// get columns\n\t\t\tint titleColumn = musicCursor\n\t\t\t\t\t.getColumnIndex(android.provider.MediaStore.Audio.Media.TITLE);\n\t\t\tint idColumn = musicCursor\n\t\t\t\t\t.getColumnIndex(android.provider.MediaStore.Audio.Media._ID);\n\t\t\tint artistColumn = musicCursor\n\t\t\t\t\t.getColumnIndex(android.provider.MediaStore.Audio.Media.ARTIST);\n\t\t\t// add songs to list\n\t\t\tdo {\n\t\t\t\tlong thisId = musicCursor.getLong(idColumn);\n\t\t\t\tString thisTitle = musicCursor.getString(titleColumn);\n\t\t\t\tString thisArtist = musicCursor.getString(artistColumn);\n\t\t\t\tsongList.add(new Song(thisId, thisTitle, thisArtist));\n\t\t\t} while (musicCursor.moveToNext());\n\n\t\t\tmusicCursor.close();\n\t\t}\n\t}",
"public Map<String, Variant<?>> GetMetadata(int position);",
"@java.lang.Override\n public io.grafeas.v1.MetadataOrBuilder getMetadataOrBuilder() {\n return metadata_ == null ? io.grafeas.v1.Metadata.getDefaultInstance() : metadata_;\n }",
"public MetaData getMetaData() {\n return metaData;\n }",
"public WorkspaceUserMetadata getMetadata() {\n\t\t\treturn meta;\n\t\t}",
"public MetadataEntry getMetadata(int index) {\n return metadata_.get(index);\n }",
"public com.google.cloud.speech.v2.RecognitionResponseMetadata getMetadata() {\n if (metadataBuilder_ == null) {\n return metadata_ == null\n ? com.google.cloud.speech.v2.RecognitionResponseMetadata.getDefaultInstance()\n : metadata_;\n } else {\n return metadataBuilder_.getMessage();\n }\n }",
"public PDMetadata getMetadata()\n {\n PDMetadata retval = null;\n COSBase mdStream = stream.getDictionaryObject(COSName.METADATA);\n if (mdStream instanceof COSStream)\n {\n retval = new PDMetadata((COSStream) mdStream);\n } \n else if (mdStream instanceof COSNull)\n {\n // null is authorized\n } \n else if (mdStream != null)\n {\n throw new IllegalStateException(\"Expected a COSStream but was a \"\n + mdStream.getClass().getSimpleName());\n }\n return retval;\n }",
"@java.lang.Override\n public com.google.cloud.speech.v2.RecognitionResponseMetadataOrBuilder getMetadataOrBuilder() {\n return metadata_ == null\n ? com.google.cloud.speech.v2.RecognitionResponseMetadata.getDefaultInstance()\n : metadata_;\n }",
"public MetaData getMetaData() {\r\n \treturn metaData;\r\n }",
"@Override\n public RavenJObject getMetadata() {\n return metadata;\n }",
"public java.util.Map<java.lang.String, java.lang.String> getMetadataMap() {\n return internalGetMetadata().getMap();\n }",
"public java.util.Map<java.lang.String, java.lang.String> getMetadataMap() {\n return internalGetMetadata().getMap();\n }",
"java.util.Map<java.lang.String, java.lang.String>\n getMetadataMap();",
"java.util.Map<java.lang.String, java.lang.String>\n getMetadataMap();",
"@RequestMapping(value = \"/getPlaylist\", method = RequestMethod.GET)\r\n public @ResponseBody List<Playlist> getPlaylists() {\r\n return (List<Playlist>) this.playlistRepository.findAll();\r\n }",
"@Override\r\n\tpublic Map<String, Object> getMetadata() {\n\t\treturn null;\r\n\t}",
"public io.grafeas.v1.Metadata getMetadata() {\n if (metadataBuilder_ == null) {\n return metadata_ == null ? io.grafeas.v1.Metadata.getDefaultInstance() : metadata_;\n } else {\n return metadataBuilder_.getMessage();\n }\n }",
"public List<Song> getSongInfo(int songid) {\n\t\treturn sd.getSonginfo(songid);\r\n\t}",
"@NotNull\n\tpublic StringBuilder getMetadata() {\n\t\tStringBuilder metadata = new StringBuilder();\n\t\tif (title != null)\n\t\t\tmetadata.append(title).append(\" \");\n\t\tif (authors != null)\n\t\t\tfor (String author : authors)\n\t\t\t\tmetadata.append(author).append(\" \");\n\t\tif (miscMetadata != null)\n\t\t\tfor (String metadata0 : miscMetadata)\n\t\t\t\tmetadata.append(metadata0).append(\" \");\n\t\treturn metadata;\n\t}"
] | [
"0.71225184",
"0.6432263",
"0.64245784",
"0.62252635",
"0.62209874",
"0.6214012",
"0.6203937",
"0.61875063",
"0.61875063",
"0.6139014",
"0.60818017",
"0.60662687",
"0.5997407",
"0.5958206",
"0.5958206",
"0.5938407",
"0.5932194",
"0.5921009",
"0.59108853",
"0.59089035",
"0.5837019",
"0.58254033",
"0.5819725",
"0.5818341",
"0.58173305",
"0.58169997",
"0.5816262",
"0.5799463",
"0.5773765",
"0.57704127",
"0.57704127",
"0.57704127",
"0.57704127",
"0.57704127",
"0.57704127",
"0.57704127",
"0.57704127",
"0.57704127",
"0.57704127",
"0.57704127",
"0.57704127",
"0.57704127",
"0.57704127",
"0.57600033",
"0.5741068",
"0.571681",
"0.570585",
"0.56644475",
"0.5661713",
"0.5661713",
"0.5661713",
"0.5661713",
"0.5661713",
"0.5661713",
"0.5661713",
"0.5661713",
"0.5661713",
"0.5661713",
"0.5661713",
"0.5661713",
"0.5661713",
"0.5661713",
"0.5653357",
"0.56266814",
"0.56079",
"0.5557645",
"0.55546343",
"0.5551282",
"0.55493486",
"0.5546244",
"0.5542269",
"0.5518099",
"0.5516093",
"0.5516093",
"0.5516093",
"0.5516093",
"0.5516093",
"0.5494841",
"0.5491828",
"0.54917055",
"0.5489191",
"0.5488065",
"0.5485532",
"0.548065",
"0.54719853",
"0.5466426",
"0.54631895",
"0.54599154",
"0.5457366",
"0.5451433",
"0.54510003",
"0.54461056",
"0.54461056",
"0.5437962",
"0.5437962",
"0.5437294",
"0.54330176",
"0.5430031",
"0.5427601",
"0.5426934"
] | 0.8216436 | 0 |
Gets the repeat mode. | @RepeatMode
public abstract int getRepeatMode(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic int getRepeatMode()\n\t{\n\t\treturn 0;\n\t}",
"public boolean getRepeat() {\n\t\treturn this.repeat;\n\t}",
"public RepeatBehavior getRepeatBehavior() {\n return f_repeatBehavior;\n }",
"public int getRepeat() {\n return repeat;\n }",
"public int getRepeatInterval()\n {\n if (isRepeated()) return repeat;\n else return 0;\n }",
"public Long getRepeatInterval() {\n\t\treturn repeatInterval;\n\t}",
"public final Modes getMode() {\n return mode;\n }",
"String getRepeatPref();",
"public int getMode() {\n\t\treturn currentMode;\n\t}",
"public int getMode() {\n return mode;\n }",
"public Boolean isRepeat()\n\t{\n\t\treturn repeat;\n\t}",
"public int getMode() {\n return this.mode;\n }",
"private void setRepeatMode() {\n tvRepeatMode.setText(data.getRepeateDays());\n }",
"public Mode getMode() {\n return mode;\n }",
"public String getMode() {\n return mode;\n }",
"public String getMode() {\n return mode;\n }",
"public int getMode() {\n\t\treturn this.mode;\n\t}",
"@java.lang.Override\n public int getRepeatCount() {\n return repeatCount_;\n }",
"@java.lang.Override\n public int getRepeatCount() {\n return repeatCount_;\n }",
"public String getMode()\n {\n return mode;\n }",
"public String getMode() {\n\n return mode;\n\n }",
"public String getMode()\n {\n return mode.toString();\n }",
"public SwerveMode nextMode() {\n return values()[(ordinal() + 1) % values().length];\n }",
"public int getMode()\r\n { \r\n return this.mode; // used at the beginning to check if the game has started yet\r\n }",
"public float getRepeatDelay()\n\t{\n\t\treturn repeatDelay;\n\t}",
"public final EnumModesBase getMode() {\r\n\t\treturn this.mode;\r\n\t}",
"public Mode getMode();",
"java.lang.String getMode();",
"public int getRepeatCount()\n\t{\n\t\treturn repeatCnt;\n\t}",
"long getRepeatIntervalPref();",
"public String getMode(){\r\n\t\treturn mode;\r\n\t}",
"public boolean getMode() {\n\t\t\treturn this.mode;\n\t\t}",
"public Mode getMode() {\n\t\tPointer mode_ptr = binding_tv.get_type_mode(ptr);\n\t\tif (mode_ptr == null)\n\t\t\treturn null;\n\t\treturn new Mode(mode_ptr);\n\t}",
"public int getRingtoneMode() {\n return mAudioManager.getRingerMode();\n }",
"@Override\n\tpublic String getMode() {\n\t\treturn this.mode;\n\t}",
"public short getMode() {\n\t\treturn mMode;\n\t}",
"public boolean isMode() {\n return mode;\n }",
"public static String getMode() {\n\t\treturn \"rs232 mode get\" + delimiter + \"rs232 mode get \";\n\t}",
"public BlendMode getMode() {\n return mMode;\n }",
"public boolean isRepeat()\n\t{\n\t\treturn repeatCnt != 0;\n\t}",
"public void setRepeat() {\n\t\tthis.repeat = !this.repeat;\n\t}",
"public T mode();",
"public int getMode()\r\n {\r\n Bundle b = getArguments();\r\n return b.getInt(PARAM_MODE);\r\n }",
"public int value() { return mode; }",
"public IoMode getMode() {\r\n\t\treturn this.mode;\r\n\t}",
"public abstract int getMode();",
"public TriggerType getMode() {\n return mode;\n }",
"public String getMode() {\n\t\treturn (String) getStateHelper().eval(OutputSourceCodePropertyKeys.mode, null);\n\t}",
"int getRepeatCount();",
"public char getGameMode() {\n return gameMode;\n }",
"public String getModeName() {\n return modeName;\n }",
"public Integer getModeId() {\n return modeId;\n }",
"public RepeatElements getRepeatAccess() {\n\t\treturn (pRepeat != null) ? pRepeat : (pRepeat = new RepeatElements());\n\t}",
"public InteractMode getCurrentMode() {\r\n\t\treturn currentMode;\r\n\t}",
"public String getGameMode() {\n return gameMode;\n }",
"private void cycleRepeat() {\n\t\tif (mRepeatMode == REPEAT_NONE) {\n\t\t\tsetRepeatMode(REPEAT_ALL);\n\t\t} else if (mRepeatMode == REPEAT_ALL) {\n\t\t\tsetRepeatMode(REPEAT_CURRENT);\n\t\t\tif (mShuffleMode != SHUFFLE_NONE) {\n\t\t\t\tsetShuffleMode(SHUFFLE_NONE);\n\t\t\t}\n\t\t} else {\n\t\t\tsetRepeatMode(REPEAT_NONE);\n\t\t}\n\t}",
"public PropertyMode getMode() {\n\t\treturn mode;\n\t}",
"public String getMode() {\n if (_avTable.get(ATTR_MODE) == null\n || _avTable.get(ATTR_MODE).equals(\"\")) {\n _avTable.noNotifySet(ATTR_MODE, \"ssb\", 0);\n }\n\n return _avTable.get(ATTR_MODE);\n }",
"public int evalMode() {\n return this.uidState.evalMode(this.op, this.mode);\n }",
"@ShuffleMode\n public abstract int getShuffleMode();",
"public String getPlayMode()\n {\n return playMode;\n }",
"public double mode(){\r\n\t\t\r\n\t\t//make a double to return the mode\r\n\t\tdouble mode = 0.0;\r\n\t\t\r\n\t\t//make 2 possible mode doubles\r\n\t\tdouble maybeMode;\r\n\t\t\r\n\t\t//make 2 mode count integers\r\n\t\tint modeCount1= 0;\r\n\t\tint modeCount= 0;\r\n\t\t\r\n\t\t//outer loop to go through the array\r\n\t\tfor (int i = 0; i < this.data.length; i++)\r\n\t\t{\r\n\t\t\t//assign maybeMode in order to \r\n\t\t\tmaybeMode = this.data[i];\r\n\t\t\t\r\n\t\t\tfor (int j = 0; j < this.data.length; j++)\r\n\t\t\t{\r\n\t\t\t\tif (maybeMode == this.data[j]){\r\n\t\t\t\t\tmodeCount1++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//if the new number (at index i) occurs more \r\n\t\t\t//often than the old number (or is the first one)\r\n\t\t\t//assign the new number to mode\r\n\t\t\t//and its count to modeCount\r\n\t\t\tif (modeCount1 > modeCount)\r\n\t\t\t{\r\n\t\t\t\tmode = maybeMode;\r\n\t\t\t\tmodeCount = modeCount1;\r\n\t\t\t}\r\n\t\t\t//reset mode count\r\n\t\t\tmodeCount1 = 0;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t//outer loop to go through the array again\r\n\t\tfor (int i = 0; i < this.data.length; i++)\r\n\t\t{\r\n\t\t\t//assign maybeMode in order to \r\n\t\t\tmaybeMode = this.data[i];\r\n\t\t\t\r\n\t\t\tfor (int j = 0; j < this.data.length; j++)\r\n\t\t\t{\r\n\t\t\t\tif (maybeMode == this.data[j]){\r\n\t\t\t\t\tmodeCount1++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif ((maybeMode != mode) && (modeCount1 == modeCount)){\r\n\t\t\t\treturn Double.NaN;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//if the mode actually occurs more than once, return it\r\n\t\tif (modeCount > 1)\r\n\t\t{ return mode; }\r\n\t\t//if not, there is no mode and return NaN\r\n\t\telse\r\n\t\t{ return Double.NaN; }\r\n\t\t\r\n\t}",
"public int getModeValue(){\r\n\t\treturn modeValue;\r\n\t}",
"public com.google.protobuf.ByteString\n getModeBytes() {\n java.lang.Object ref = mode_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n mode_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public com.google.protobuf.ByteString\n getModeBytes() {\n java.lang.Object ref = mode_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n mode_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"private void startRepeating(final int mode) {\n\t\trepeatState = mode;\n\t\tif (repeatState != 0) {\n\t\t\trepeatHandler.postDelayed(buttonRepeater, currentRepeatRate);\n\t\t}\n\t\treturn;\n\t}",
"public RetriggerMode getRetriggerMode();",
"public static String getAutostartMode() {\n\t\treturn defaultAutostartMode;\n\t}",
"default boolean isRepeatState() {\n return isRepeatState(FULL_EQUAL);\n }",
"public static int mode()\r\n\t{\r\n\t\tint mode;\r\n\t\tdo {\r\n\t\t\tSystem.out.println(\"Veuillez entrer 1 pour allez en mode Joueur1 contre Joueur2\");\r\n\t\t\tSystem.out.println(\"Veuillez entrer 2 pour aller en mode Joueur1 contre IA\");\r\n\t\t\tSystem.out.println(\"Veuillez entrer 3 pour allez en mode spectateur d'une partie IA contre IA\");\r\n\t\t\tmode = Saisie.litentier();\r\n\t\t} while (mode > 4);\r\n\t\treturn mode;\r\n\t}",
"public java.lang.String getMode() {\n java.lang.Object ref = mode_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n mode_ = s;\n }\n return s;\n }\n }",
"public String getPollMode() {\n return getXproperty(BwXproperty.pollMode);\n }",
"public java.lang.String getMode() {\n java.lang.Object ref = mode_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n mode_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public String modeOfChoice() {\r\n try {\r\n return choice.take();\r\n } catch (Exception e){\r\n return \"\";\r\n }\r\n }",
"public int generateMode() {\n\t\tif(up && !down && !left && !right)\n\t\t\treturn UP;\n\t\telse if(!up && down && !left && !right)\n\t\t\treturn DOWN;\n\t\telse if(!up && !down && left && !right)\n\t\t\treturn LEFT;\n\t\telse if(!up && !down && !left && right)\n\t\t\treturn RIGHT;\n\t\telse return -1;\n\t}",
"public int getPattern() {\n return this.pattern;\n }",
"public Map<String, ArrayList<Integer>> modes() {\n return this.modes;\n }",
"public int getScreenModeValue() {\n return screenMode_;\n }",
"public OutputMode getOutputMode() {\n\t\treturn this.recordingProperties.outputMode();\n\t}",
"com.google.protobuf.ByteString\n getModeBytes();",
"public int getMotionMode() {\n\t\treturn m_motionMode;\n\t}",
"@Override\n public RunMode getMode() {\n return null;\n }",
"@JsonProperty(\"mode\")\n public String getMode() {\n return mode;\n }",
"public static InitializationMode getInitializationMode() {\r\n return initMode.getValue();\r\n }",
"public int getScreenModeValue() {\n return screenMode_;\n }",
"public void setRepeat(boolean repeat) {\n this.repeat = repeat;\n }",
"public Lista modes() {\n Lista modes = new Lista();\n int currentCounter = 1;\n int repeated = this.repeated();\n for (int i = 0; i < this.size() - 1; i++) {\n if(this.getListaAt(i).x == this.getListaAt(i + 1).x) {\n currentCounter += 1;\n }\n else {\n if (currentCounter == repeated) {\n modes.add(this.getListaAt(i).x);\n }\n currentCounter = 1;\n }\n }\n return modes;\n }",
"public synchronized OrbitRelatedUniformEventPattern getPattern() {\n\t\tif (pattern == null) {\n\t\t\tpattern = obtainPattern();\n\t\t}\n\t\treturn pattern;\n\t}",
"public String getPattern() {\r\n return this.currPattern;\r\n }",
"@Override\r\n\tpublic String getModeName()\r\n\t{\r\n\t\treturn MODE_NAME;\r\n\t}",
"public int getDisplayMode() {\n return this.displayMode;\n }",
"public Assignment getRepeatAssignment_4() { return cRepeatAssignment_4; }",
"@Accessor(qualifier = \"mode\", type = Accessor.Type.GETTER)\n\tpublic ImpExValidationModeEnum getMode()\n\t{\n\t\treturn getPersistenceContext().getPropertyValue(MODE);\n\t}",
"public CamMode getCamMode() {\n NetworkTableEntry camMode = m_table.getEntry(\"camMode\");\n double cam = camMode.getDouble(0.0);\n CamMode mode = CamMode.getByValue(cam);\n return mode;\n }",
"@Override\n\tpublic int returnModeNumber() {\n\t\treturn 0;\n\t}",
"public List<Measure> getRepeat(){\n\t\treturn meas;\n\t}",
"public IModeParser getMode();",
"public DistributionModeInternal getMode() {\n return this.mode;\n }",
"public boolean isRepeated() {\n\t\treturn repeated;\n\t}",
"public SwerveMode previousMode() {\n return values()[(this.ordinal() + values().length - 1) % values().length];\n }"
] | [
"0.7530481",
"0.73108727",
"0.7142434",
"0.7055139",
"0.67331827",
"0.66309005",
"0.65750515",
"0.6534392",
"0.6533527",
"0.6490036",
"0.64505523",
"0.6408631",
"0.63919485",
"0.63911575",
"0.6388017",
"0.6388017",
"0.6382969",
"0.6344721",
"0.6327869",
"0.63226956",
"0.62902504",
"0.6289341",
"0.6281665",
"0.62803304",
"0.6277617",
"0.6239523",
"0.6227311",
"0.6181104",
"0.6159681",
"0.614076",
"0.6131113",
"0.61310273",
"0.61245984",
"0.609103",
"0.6084253",
"0.60736614",
"0.6023712",
"0.59734166",
"0.59623396",
"0.59520316",
"0.5948475",
"0.59394264",
"0.5930789",
"0.593031",
"0.58893555",
"0.58868027",
"0.5869175",
"0.5864087",
"0.5844506",
"0.5832101",
"0.58180314",
"0.5780067",
"0.57699084",
"0.57607126",
"0.5746628",
"0.5731362",
"0.57109815",
"0.5669368",
"0.56578636",
"0.5647694",
"0.5643573",
"0.5639674",
"0.5614968",
"0.5610301",
"0.55936307",
"0.5568774",
"0.55550045",
"0.5523831",
"0.5511528",
"0.5507826",
"0.5492148",
"0.54808915",
"0.5480366",
"0.54750913",
"0.54726803",
"0.547089",
"0.5463747",
"0.546237",
"0.5460455",
"0.5446204",
"0.5442126",
"0.54279065",
"0.5425417",
"0.541688",
"0.5410925",
"0.54101914",
"0.5383332",
"0.5379339",
"0.53768",
"0.5372411",
"0.53581774",
"0.535532",
"0.5336207",
"0.53154707",
"0.53044146",
"0.52982086",
"0.5296419",
"0.52944535",
"0.5291199",
"0.5290212"
] | 0.8136372 | 0 |
Gets the shuffle mode. | @ShuffleMode
public abstract int getShuffleMode(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic int getShuffleMode()\n\t{\n\t\treturn 0;\n\t}",
"public boolean getShuffle() {\n\t\treturn this.shuffle;\n\t}",
"public String getMode()\n {\n return mode.toString();\n }",
"public final Modes getMode() {\n return mode;\n }",
"java.lang.String getMode();",
"public int getMode() {\n return mode;\n }",
"public int getMode()\r\n {\r\n Bundle b = getArguments();\r\n return b.getInt(PARAM_MODE);\r\n }",
"public String getMode() {\n return mode;\n }",
"public String getMode() {\n return mode;\n }",
"public final EnumModesBase getMode() {\r\n\t\treturn this.mode;\r\n\t}",
"public int getMode() {\n return this.mode;\n }",
"public int getMode() {\n\t\treturn currentMode;\n\t}",
"public int getMode() {\n\t\treturn this.mode;\n\t}",
"public Mode getMode() {\n return mode;\n }",
"public String getMode() {\n\n return mode;\n\n }",
"public String getMode()\n {\n return mode;\n }",
"public Mode getMode();",
"public abstract int getMode();",
"public int getMode()\r\n { \r\n return this.mode; // used at the beginning to check if the game has started yet\r\n }",
"public String getMode() {\n\t\treturn (String) getStateHelper().eval(OutputSourceCodePropertyKeys.mode, null);\n\t}",
"public String getMode(){\r\n\t\treturn mode;\r\n\t}",
"public boolean shuffleNeeded();",
"public String getGameMode() {\n return gameMode;\n }",
"public String getMode() {\n if (_avTable.get(ATTR_MODE) == null\n || _avTable.get(ATTR_MODE).equals(\"\")) {\n _avTable.noNotifySet(ATTR_MODE, \"ssb\", 0);\n }\n\n return _avTable.get(ATTR_MODE);\n }",
"public short getMode() {\n\t\treturn mMode;\n\t}",
"public SwerveMode nextMode() {\n return values()[(ordinal() + 1) % values().length];\n }",
"public T mode();",
"public int value() { return mode; }",
"public com.google.protobuf.ByteString\n getModeBytes() {\n java.lang.Object ref = mode_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n mode_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public SampleMode getSampleMode();",
"public String getModeName() {\n return modeName;\n }",
"public char getGameMode() {\n return gameMode;\n }",
"public boolean getMode() {\n\t\t\treturn this.mode;\n\t\t}",
"public BlendMode getMode() {\n return mMode;\n }",
"public String getShufflerClassName()\n {\n return (shuffler == null) ? null : shuffler.getClass().getCanonicalName();\n }",
"@Override\n\tpublic String getMode() {\n\t\treturn this.mode;\n\t}",
"public com.google.protobuf.ByteString\n getModeBytes() {\n java.lang.Object ref = mode_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n mode_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public Mode getMode() {\n\t\tPointer mode_ptr = binding_tv.get_type_mode(ptr);\n\t\tif (mode_ptr == null)\n\t\t\treturn null;\n\t\treturn new Mode(mode_ptr);\n\t}",
"public java.lang.String getMode() {\n java.lang.Object ref = mode_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n mode_ = s;\n }\n return s;\n }\n }",
"public Integer getModeId() {\n return modeId;\n }",
"public int getModeValue(){\r\n\t\treturn modeValue;\r\n\t}",
"public CamMode getCamMode() {\n NetworkTableEntry camMode = m_table.getEntry(\"camMode\");\n double cam = camMode.getDouble(0.0);\n CamMode mode = CamMode.getByValue(cam);\n return mode;\n }",
"com.google.protobuf.ByteString\n getModeBytes();",
"public java.lang.String getMode() {\n java.lang.Object ref = mode_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n mode_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public LedMode getLEDMode() {\n NetworkTableEntry ledMode = m_table.getEntry(\"ledMode\");\n double led = ledMode.getDouble(0.0);\n LedMode mode = LedMode.getByValue(led);\n return mode;\n }",
"public int generateMode() {\n\t\tif(up && !down && !left && !right)\n\t\t\treturn UP;\n\t\telse if(!up && down && !left && !right)\n\t\t\treturn DOWN;\n\t\telse if(!up && !down && left && !right)\n\t\t\treturn LEFT;\n\t\telse if(!up && !down && !left && right)\n\t\t\treturn RIGHT;\n\t\telse return -1;\n\t}",
"public int switchMode() {\r\n int mode = GameInfo.getInstance().switchMode();\r\n MazeMap.getInstance().updateMaze(mode);\r\n return mode;\r\n }",
"public String getScrambleAlg() {\n\t\treturn scrambleAlg;\n\t}",
"public boolean isMode() {\n return mode;\n }",
"public int evalMode() {\n return this.uidState.evalMode(this.op, this.mode);\n }",
"public int getAudioMode() {\n AudioManager audio = (AudioManager) mContext.getSystemService(Context.AUDIO_SERVICE);\n return audio.getMode(); //MODE_NORMAL, MODE_RINGTONE, MODE_IN_CALL, MODE_IN_COMMUNICATION\n }",
"public IoMode getMode() {\r\n\t\treturn this.mode;\r\n\t}",
"public static InitializationMode getInitializationMode() {\r\n return initMode.getValue();\r\n }",
"public UI_MODE mode() { \n if (filter_rbmi.isSelected()) return UI_MODE.FILTER;\n else if (edgelens_rbmi.isSelected()) return UI_MODE.EDGELENS;\n else if (timeline_rbmi.isSelected()) return UI_MODE.TIMELINE;\n else return UI_MODE.EDIT;\n }",
"public String getPlayMode()\n {\n return playMode;\n }",
"public ArrayList<Song> getShuffleOrder() {\n\t\treturn this.shuffleOrder;\n\t}",
"public Deck randomShuffle(){\n\t\tshuffleOnceRandom();\n\t\tshuffleOnceRandom();\n\t\treturn ourDeck;\n\t}",
"GameMode mode();",
"public static int mode()\r\n\t{\r\n\t\tint mode;\r\n\t\tdo {\r\n\t\t\tSystem.out.println(\"Veuillez entrer 1 pour allez en mode Joueur1 contre Joueur2\");\r\n\t\t\tSystem.out.println(\"Veuillez entrer 2 pour aller en mode Joueur1 contre IA\");\r\n\t\t\tSystem.out.println(\"Veuillez entrer 3 pour allez en mode spectateur d'une partie IA contre IA\");\r\n\t\t\tmode = Saisie.litentier();\r\n\t\t} while (mode > 4);\r\n\t\treturn mode;\r\n\t}",
"public Map<String, ArrayList<Integer>> modes() {\n return this.modes;\n }",
"@JsonProperty(\"mode\")\n public String getMode() {\n return mode;\n }",
"public String getModeByArrayTypeRandom(int...type){\n\t\tArrayList<String> array = new ArrayList<String>();\n\t\tRandom randomGenerator = new Random();\n\t\tfor (int j = 0; j<type.length; j++){\n\t\t\tfor(int i = 0; i<this.type.size(); i++)\n\t\t\t{\t\n\t\t\t\tif(this.type.get(i) == type[j]) {\n\t\t\t\t\tarray.add(this.mode.get(i));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tint index = randomGenerator.nextInt(array.size());\n\t\tString mode = array.get(index);\n\t\tinfo(\"Mode is: \"+mode);\n\t\treturn mode;\n\t}",
"@Override\r\n\tpublic String getModeName()\r\n\t{\r\n\t\treturn MODE_NAME;\r\n\t}",
"public native int toggleShuffle();",
"@RepeatMode\n public abstract int getRepeatMode();",
"private String getMode(Resource renderletDef) {\n\t\tIterator<Triple> renderletModeIter = configGraph.filter(\n\t\t\t\t(NonLiteral) renderletDef, TYPERENDERING.renderingMode, null);\n\t\tif (renderletModeIter.hasNext()) {\n\t\t\tTypedLiteral renderletMode = (TypedLiteral) renderletModeIter.next().getObject();\n\t\t\treturn LiteralFactory.getInstance().createObject(String.class,\n\t\t\t\t\trenderletMode);\n\t\t}\n\t\treturn null;\n\t}",
"public int getScreenModeValue() {\n return screenMode_;\n }",
"public boolean hasRandomMode()\r\n {\r\n return (random == Toggle.On);\r\n }",
"public static String getMode() {\n\t\treturn \"rs232 mode get\" + delimiter + \"rs232 mode get \";\n\t}",
"public int getStrategy() {\n\t\t \n\t\t return strategyInt;\n\t}",
"public OutputMode getOutputMode() {\n\t\treturn this.recordingProperties.outputMode();\n\t}",
"public double mode(){\r\n\t\t\r\n\t\t//make a double to return the mode\r\n\t\tdouble mode = 0.0;\r\n\t\t\r\n\t\t//make 2 possible mode doubles\r\n\t\tdouble maybeMode;\r\n\t\t\r\n\t\t//make 2 mode count integers\r\n\t\tint modeCount1= 0;\r\n\t\tint modeCount= 0;\r\n\t\t\r\n\t\t//outer loop to go through the array\r\n\t\tfor (int i = 0; i < this.data.length; i++)\r\n\t\t{\r\n\t\t\t//assign maybeMode in order to \r\n\t\t\tmaybeMode = this.data[i];\r\n\t\t\t\r\n\t\t\tfor (int j = 0; j < this.data.length; j++)\r\n\t\t\t{\r\n\t\t\t\tif (maybeMode == this.data[j]){\r\n\t\t\t\t\tmodeCount1++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//if the new number (at index i) occurs more \r\n\t\t\t//often than the old number (or is the first one)\r\n\t\t\t//assign the new number to mode\r\n\t\t\t//and its count to modeCount\r\n\t\t\tif (modeCount1 > modeCount)\r\n\t\t\t{\r\n\t\t\t\tmode = maybeMode;\r\n\t\t\t\tmodeCount = modeCount1;\r\n\t\t\t}\r\n\t\t\t//reset mode count\r\n\t\t\tmodeCount1 = 0;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t//outer loop to go through the array again\r\n\t\tfor (int i = 0; i < this.data.length; i++)\r\n\t\t{\r\n\t\t\t//assign maybeMode in order to \r\n\t\t\tmaybeMode = this.data[i];\r\n\t\t\t\r\n\t\t\tfor (int j = 0; j < this.data.length; j++)\r\n\t\t\t{\r\n\t\t\t\tif (maybeMode == this.data[j]){\r\n\t\t\t\t\tmodeCount1++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif ((maybeMode != mode) && (modeCount1 == modeCount)){\r\n\t\t\t\treturn Double.NaN;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//if the mode actually occurs more than once, return it\r\n\t\tif (modeCount > 1)\r\n\t\t{ return mode; }\r\n\t\t//if not, there is no mode and return NaN\r\n\t\telse\r\n\t\t{ return Double.NaN; }\r\n\t\t\r\n\t}",
"public DistributionModeInternal getMode() {\n return this.mode;\n }",
"public int getScreenModeValue() {\n return screenMode_;\n }",
"public abstract List<MODE> getModes();",
"public void setShuffle() {\n\t\tthis.shuffle = !this.shuffle;\n\t}",
"public void shuffle();",
"public int getResourceMode()\r\n {\r\n return getSemanticObject().getIntProperty(swb_resourceMode);\r\n }",
"public int getShuffleSongIndex() {\n\t\treturn this.shuffleSongIndex;\n\t}",
"public TriggerType getMode() {\n return mode;\n }",
"public String modeOfChoice() {\r\n try {\r\n return choice.take();\r\n } catch (Exception e){\r\n return \"\";\r\n }\r\n }",
"public int getSourceMode() {\n return _mode;\n }",
"public int getMode() {\r\n List<Integer> rbtList = createArray(rbt.root);\r\n int n = rbtList.size();\r\n int max = 0;\r\n int maxCount = 0;\r\n\r\n for (int i = 0; i < n; i++) {\r\n int count = 0;\r\n for (int j = 0; j < n; j++) {\r\n if (rbtList.get(j) == rbtList.get(i)) {\r\n count++;\r\n }\r\n }\r\n if (count > maxCount) {\r\n maxCount = count;\r\n max = rbtList.get(i);\r\n }\r\n }\r\n return max;\r\n }",
"public String getBandMode() {\n return _avTable.get(ATTR_BAND_MODE);\n }",
"int getACMode();",
"public int getSettingsMode() {\n SQLiteDatabase database = getReadableDatabase();\n SQLiteQueryBuilder queryBuilder = new SQLiteQueryBuilder();\n\n String[] sqlSelect = {\"Mode\"};\n String sqlTable =\"Setting\";\n\n //queryBuilder.setTables(SETTINGS_TABLE_NAME);\n queryBuilder.setTables(sqlTable);\n Cursor cursor = queryBuilder.query(database, sqlSelect, null, null, null, null, null);\n cursor.moveToFirst();\n\n return cursor.getInt(cursor.getColumnIndex(\"Mode\"));\n }",
"public final long get_mode_timestamp () {\n\t\treturn mode_timestamp;\n\t}",
"public PropertyMode getMode() {\n\t\treturn mode;\n\t}",
"public String getProgramModeAsString() {\n return getProgramMode().name();\n }",
"public ModeFlags getOriginalModes() {\n return originalModes;\n }",
"public static String getRunMode() {\n if (RUN_MODE != null) {\n return RUN_MODE;\n }\n\n // first get by config file.\n String runModesStr = getConfigValue(PROPNAME_RUN_MODE);\n if (runModesStr == null) {\n // if not in config file, try by system property, default to dev if not available\n runModesStr = System.getProperty(PROPNAME_RUN_MODE);\n\n // default to the dev run mode if one is not supplied\n if (runModesStr == null || runModesStr.isEmpty()) {\n runModesStr = DEFAULT_RUN_MODE;\n }\n }\n\n RUN_MODE = runModesStr;\n return RUN_MODE;\n }",
"public SnapModeEnum getSnapMode()\n\t{\n\t\tString literal = options.getLiteral(\"snapMode\");\n\t\treturn literal == null ? SnapModeEnum.BOTH : SnapModeEnum.valueOf(literal.toUpperCase());\n\t}",
"public SwerveMode previousMode() {\n return values()[(this.ordinal() + values().length - 1) % values().length];\n }",
"public @ColorMode int getColorModes() {\n return mColorModes;\n }",
"public static String modeName(int sortMode) {\r\n String mode = \"\";\r\n switch (sortMode) {\r\n case BUBBLE_SORT:\r\n mode = \"Bubble Sort\";\r\n break;\r\n\r\n case INSERTION_SORT:\r\n mode = \"Insertion Sort\";\r\n break;\r\n\r\n case SELECTION_SORT:\r\n mode = \"Selection Sort\";\r\n break;\r\n\r\n case MERGE_SORT:\r\n mode = \"Merge Sort\";\r\n break;\r\n\r\n case QUICK_SORT:\r\n mode = \"Quick Sort\";\r\n break;\r\n }//end switch\r\n return mode;\r\n }",
"int getOperatingMode();",
"public java.lang.String getModeOfConveyance () {\n\t\treturn modeOfConveyance;\n\t}",
"String getSceneModePref();",
"void shuffle();",
"void shuffle();"
] | [
"0.7490842",
"0.6933545",
"0.64940214",
"0.6412933",
"0.64024645",
"0.63330173",
"0.6321622",
"0.6306882",
"0.6306882",
"0.6287087",
"0.62756276",
"0.6250622",
"0.6243125",
"0.62425506",
"0.62225205",
"0.62063676",
"0.619796",
"0.61016923",
"0.60692894",
"0.6067806",
"0.6063217",
"0.6045549",
"0.6022759",
"0.6020485",
"0.59887564",
"0.5971893",
"0.59468406",
"0.59226537",
"0.5911156",
"0.59084123",
"0.5899651",
"0.589095",
"0.58734983",
"0.5859209",
"0.5836107",
"0.5828151",
"0.5828024",
"0.58095455",
"0.5776524",
"0.57411486",
"0.5737813",
"0.5725673",
"0.5724897",
"0.5706748",
"0.5705619",
"0.5697211",
"0.5629465",
"0.56239843",
"0.55819005",
"0.5573803",
"0.55703235",
"0.5549377",
"0.55488586",
"0.55469555",
"0.55240494",
"0.551946",
"0.55145335",
"0.5504495",
"0.5489303",
"0.54753816",
"0.546833",
"0.545414",
"0.5451947",
"0.5450044",
"0.54372466",
"0.54163724",
"0.54046273",
"0.5400558",
"0.5394014",
"0.53905857",
"0.53866947",
"0.5375203",
"0.53741",
"0.53718925",
"0.53688216",
"0.53608775",
"0.5345352",
"0.53353244",
"0.5330994",
"0.53273314",
"0.52898425",
"0.528355",
"0.52768856",
"0.526355",
"0.5250621",
"0.52248657",
"0.5191833",
"0.51791066",
"0.51677597",
"0.516725",
"0.5158957",
"0.5154298",
"0.51410407",
"0.51210546",
"0.51169187",
"0.5096339",
"0.5089947",
"0.50887245",
"0.5069673",
"0.5069673"
] | 0.8034184 | 0 |
Gets the callbacks with executors for subclasses to notify player events. | @NonNull
protected final List<Pair<PlayerCallback, Executor>> getCallbacks() {
List<Pair<PlayerCallback, Executor>> list = new ArrayList<>();
synchronized (mLock) {
list.addAll(mCallbacks);
}
return list;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Map<String, Callback> getCallbacks() {\n return callbacks;\n }",
"@gw.internal.gosu.parser.ExtendedProperty\n public entity.LoadCallback[] getCallbacks();",
"public interface Callback {\n\t\tvoid onMove(Player player, PlayerMoveEvent event);\n\t\t\n\t\tvoid onTeleport(Player player, PlayerTeleportEvent event);\n\t\t\n\t\tvoid onCombat(Player player);\n\t\t\n\t\tvoid onDeath(Player player);\n\t\t\n\t\tvoid onQuit(Player player);\n\t}",
"public interface Callbacks {\n\t\tvoid onExerciseSelected(Exercise exercise);\n\t}",
"public ArrayList getCallbackListeners() {\n return statusCbL;\n }",
"public interface Callbacks {\n void onStateChanged();\n void onProximityNegative();\n }",
"List<LifecycleCallbackItem> getLifecycleCallbacks();",
"public ArrayList<TweenCallback> getCallbacks()\n\t{\n\t\treturn callbacks;\n\t}",
"private Callback[] getCallbacks() throws LoginException\n {\n if (callbackHandler == null) {\n throwLoginException(\"No CallbackHandler Specified\");\n }\n\n if (database == null) {\n throwLoginException(\"Database not specified\");\n }\n\n Callback[] callbacks;\n callbacks = new Callback[2]; // need one for the user name and one for the password\n\n // add in the password callback\n callbacks[1] = new PasswordCallback(\"password: \",false);\n\n // add in the user name callback\n callbacks[0] = new NameCallback(\"username: \");\n\n // Call the callback handler, who in turn, calls back to the\n // callback objects, handing them the user name and password.\n // These callback objects hold onto the user name and password.\n // The login module retrieves the user name and password from them later.\n try {\n callbackHandler.handle(callbacks);\n } catch (IOException e) {\n throw new LoginException(e.toString());\n } catch (UnsupportedCallbackException e) {\n throwLoginException(e.toString()+\" \"+e.getCallback().toString());\n }\n\n return callbacks;\n }",
"public interface Callbacks {\n void onDrawingSelected(long drawingId);\n void onDrawingCreated(long drawingId);\n void onDrawingRemoved(long drawingId);\n void onDrawingRemoved(ArrayList<Long> drawingIds);\n }",
"List<ContinuousQueryListener<K, ?>> getListeners();",
"private Callback[] getCallbacks()\n throws LoginException\n {\n if ( callbackHandler == null ) {\n throwLoginException( \"No CallbackHandler Specified\" );\n }\n\n Callback[] callbacks;\n if ( isIdentityAssertion ) {\n callbacks = new Callback[1];\n } else {\n callbacks = new Callback[2];\n callbacks[1] = new PasswordCallback( \"password: \", false );\n }\n callbacks[0] = new NameCallback( \"username: \" );\n\n try {\n callbackHandler.handle( callbacks );\n } catch ( IOException e ) {\n throw new LoginException( e.toString() );\n } catch ( UnsupportedCallbackException e ) {\n throwLoginException( e.toString() + \" \" + e.getCallback().toString() );\n }\n\n return callbacks;\n }",
"public List<String> listeners();",
"public interface Callbacks {\n \n /**\n * This is called when the user has confirmed that they wish for the\n * favourite bus stop to be deleted.\n */\n public void onConfirmFavouriteDeletion();\n \n /**\n * This is called when the user has cancelled the deletion of the\n * favourite bus stop.\n */\n public void onCancelFavouriteDeletion();\n }",
"private void setPlayerCallbacks() {\n universalPlayer.setPlayerStateListener(this);\n universalPlayer.setOnAutonomicTrackChangeCallback(new IOperationFinishCallback() {\n @Override\n public void operationFinished() {\n if (isAdded()) {\n playableMediaItem = UniversalPlayer.getInstance().getPlayingMediaItem();\n initPlayerUI();\n configurePlayer();\n initTrackNumbersSection();\n }\n }\n });\n\n IOperationFinishCallback playerFailedCallback = MediaUtils.getPlayerFailCallback(getActivity(), playableMediaItem);\n\n if (universalPlayer.isInErrorState) {\n playerFailedCallback.operationFinished();\n } else {\n universalPlayer.setOnPlayingFailedCallback(playerFailedCallback);\n }\n }",
"public List<Callback> pendingCallbacks() {\n ObjectNode req = makeRequest(\"callbacks\");\n JsonNode resp = this.runtime.requestResponse(req);\n\n JsonNode callbacksResp = resp.get(\"callbacks\");\n if (callbacksResp == null || !callbacksResp.isArray()) {\n throw new JsiiError(\"Expecting a 'callbacks' key with an array in response\");\n }\n\n ArrayNode callbacksArray = (ArrayNode) callbacksResp;\n\n List<Callback> result = new ArrayList<>();\n callbacksArray.forEach(node -> {\n result.add(JsiiObjectMapper.treeToValue(node, NativeType.forClass(Callback.class)));\n });\n\n return result;\n }",
"interface Callbacks {\n void pipelineModeChanged(boolean z) throws ;\n\n void requestSent() throws ;\n\n void serverError(int i) throws ;\n }",
"public Iterator<Object> listeners() {\n return Arrays.asList(fListeners).iterator();\n }",
"List<Runnable> getItemListeners();",
"public interface Callbacks {\n public void onCategorySelected(TaskCategory category);\n }",
"public List<AnimationCallback> getAnimationCallbacks() {\n return callbacks;\n }",
"public void\t\tnotifyUCallbackListeners();",
"public interface\t\tUCallbackList\n{\n /**\n * Removes all the registered callbacks.\n * <p>\n\t */\n\tpublic void\t\tremoveAll();\n\n /**\n * Removes the registered callback associated with the given tag.\n * <p>\n * @param tag The tag associated with the removed callback.\n\t */\n\tpublic void\t\tremoveUCallbackListener(String\t\ttag);\n\n /**\n * Registers a callback associated with the given tag.\n * <p>\n * @param listener The registered callback.\n * @param tag The tag associated with the registered callback.\n\t */\n\tpublic void\t\taddUCallbackListener(UCallbackListener listener,\n\t\t\t\t\t\t\t\t\t\t String tag);\n\n /**\n * Returns the callback associated with the given tag.\n * <p>\n * @param tag The tag associated with the callback.\n\t * @return The callback or null.\n\t */\n\tpublic UCallbackListener\t\tgetUCallbackListener(String tag);\n\n /**\n * Calls the actionPerformed method of all the registered callbacks.\n * <p>\n\t */\n\tpublic void\t\tnotifyUCallbackListeners();\n\n /**\n * Calls the actionPerformed method of a registered callback\n\t * associated with the given event.\n * <p>\n * @param event The event associated with the registered callback.\n\t */\n\tpublic void\t\tnotifyUCallbackListener(URBIEvent event);\n}",
"EventCallbackHandler getCallbackHandler();",
"public interface TIOADExecutorListeners{\n void OnStart();\n void OnStarting(double pro);\n void OnError(int error);\n void OnSuccess();\n}",
"public interface Callback {\n void onExpanded(boolean z);\n\n void onInteraction();\n\n void onPrioritySettings();\n }",
"default void dispatchConsumers() {\n\t\tthis.getItemListeners().forEach(Runnable::run);\n\t}",
"private void\n\t invokeCallbacks( SoEvent e)\n\t //\n\t ////////////////////////////////////////////////////////////////////////\n\t {\n\t // Call all callback funcs interested in this event type\n\t for (int i = 0; i < cblist.getLength(); i++) {\n\t SoEventCallbackData data = (SoEventCallbackData ) cblist.operator_square_bracket(i);\n\t if (e.isOfType(data.eventType)) {\n\t data.func.run (data.userData, this);\n\t }\n\t }\n\t }",
"public static interface TaskCallbacks\n {\n void onPreExecute();\n\n void onMetadataUpdate(String... meta);\n\n void onProgressUpdate(long totalDuration, long currentDuration);\n\n void onCancelled();\n\n void onPostExecute();\n }",
"public ArrayList getTaskListeners(){\n initListener();\n return listeners;\n }",
"public static interface Callbacks\n {\n public abstract void ledClientConnected(LedClient ledclient);\n\n public abstract void ledClientDisconnected(LedClient ledclient);\n }",
"private void registerCallbacks() {\n nations.forEach(this::registerCallback);\n }",
"private void registerEvents(){\n\t\tPluginManager pm = getServer().getPluginManager();\r\n\t\t//PlayerListener stuff\r\n\t pm.registerEvent(Event.Type.PLAYER_CHAT, playerListener, Event.Priority.Normal, this);\r\n\t pm.registerEvent(Event.Type.PLAYER_MOVE, playerListener, Event.Priority.Normal, this);\r\n\t pm.registerEvent(Event.Type.PLAYER_QUIT, playerListener, Event.Priority.Normal, this);\r\n pm.registerEvent(Event.Type.PLAYER_INTERACT, playerListener, Event.Priority.Normal, this);\r\n\t //BlockListener stuff\r\n pm.registerEvent(Event.Type.BLOCK_PLACE, blockListener, Event.Priority.Normal, this);\r\n pm.registerEvent(Event.Type.BLOCK_DAMAGE, blockListener, Event.Priority.Normal, this);\r\n pm.registerEvent(Event.Type.BLOCK_BREAK, blockListener, Event.Priority.Normal, this);\r\n //EntityListener stuff\r\n pm.registerEvent(Event.Type.CREATURE_SPAWN, entityListener, Event.Priority.Normal, this);\r\n pm.registerEvent(Event.Type.ENTITY_DAMAGE, entityListener, Event.Priority.Normal, this);\r\n //ServerListener stuff\r\n pm.registerEvent(Event.Type.PLUGIN_ENABLE, serverListener, Event.Priority.Normal, this);\r\n pm.registerEvent(Event.Type.PLUGIN_DISABLE, serverListener, Event.Priority.Normal, this);\r\n }",
"public interface Callbacks {\n\t\t/**\n\t\t * Callback for when an item has been selected.\n\t\t */\n\t\tpublic void onItemSelected(Long id);\n\t}",
"public interface Callbacks {\n /**\n * Callback for when an item has been selected.\n */\n public void onItemSelected(int id);\n public void onCheckBoxChange(int id);\n }",
"public interface Callbacks {\n void onCrimeSelected(Crime crime);\n }",
"public interface Callbacks {\n void onCrimeSelected(Crime crime);\n }",
"public interface Callbacks {\n void onSubmissionSelected(SubredditSubmission subredditSubmission);\n }",
"public interface Callbacks {\n\t\t/**\n\t\t * Callback for when an item has been selected.\n\t\t */\n\t\tpublic void onItemSelected(String id);\n\t}",
"public interface Callbacks {\n\t\t/**\n\t\t * Callback for when an item has been selected.\n\t\t */\n\t\tpublic void onItemSelected(String id);\n\t}",
"public interface CallbackInterface {\n void execute(String name);\n}",
"public abstract RemoteCallback<?> getRemoteCallback();",
"@Override\r\n\t\tpublic int onCallBack(int type, String url, String ext)\r\n\t\t\t\tthrows RemoteException {\n\t\t\tfor(EventBus handler:mEventBus){\r\n\t\t\t\thandler.onEvent(type,url,ext);\r\n\t\t\t}\r\n\t\t\treturn 0;\r\n\t\t}",
"public Set<ScopeEventListener> getScopeRegistrationListeners();",
"protected List<RunListener> getRunListeners() {\n return Collections.emptyList();\n }",
"public interface LoadFriendsCallback {\n void preExecute();\n void postExecute(ArrayList<Friends> friends);\n}",
"public interface LoadFriendsCallback {\n void preExecute();\n void postExecute(ArrayList<Friends> friends);\n}",
"public void\t\tnotifyUCallbackListeners()\n\t{\n\t\tfor (Enumeration e = tab.elements(); e.hasMoreElements(); )\n\t\t\t{\n\t\t\t\tUCallbackListener listener = (UCallbackListener)tab.get(e.nextElement());\n\n\t\t\t\tlistener.actionPerformed(null);\n\t\t\t}\n\t}",
"@Override\r\n\tprotected void listeners() {\n\t\t\r\n\t}",
"public interface Callback {\n }",
"public synchronized List<EventListener> getListeners() {\n \treturn listeners;\n }",
"public void runCallBack(Class<?> c, TravelingEntity o){\n\t\tIterator<EntityListener> it = externalsCallbacks.iterator();\n\t\twhile (it.hasNext()) {\n\t\t\tEntityListener externalListener = (EntityListener) it.next();\n\t\t\texternalListener.runCallBack(c, o);\n\t\t}\n\t}",
"public interface OnPlayed {\n void runMainThread(Runnable task);\n void onFinished();\n void onBroad(String var);\n}",
"private Object callbacks(final Object o) {\n\t\treturn o instanceof Nil ? ((Nil<?>) o).callbacks : o;\n\t}",
"public interface OggStreamPlayerCallback\n{\n public void playerStarted();\n\n public void playerStopped();\n\n public void playerException(Throwable t);\n}",
"public interface Callbacks {\n /**\n * Callback for when an item has been selected.\n * public modifier left for readability\n */\n public void onItemSelected(int position);\n }",
"void executeCallbacks(CallbackType callbackType) {\n System.out.println(\"Executing callbacks: \" + callbackType);\n List<Method> methods = callbacks.get(callbackType);\n if (methods == null) return;\n for (Method m : methods) {\n try {\n m.setAccessible(true);\n m.invoke(this);\n } catch (IllegalAccessException e) {\n throw new ActiveRecordException(e);\n } catch (InvocationTargetException e) {\n throw new ActiveRecordException(e);\n } finally {\n m.setAccessible(false);\n }\n }\n }",
"public interface CallbacksListener\n {\n public void onPositiveButtonClicked();\n\n public void onNegativeButtonClicked();\n }",
"public interface Callbacks {\n /**\n * Callback for when an item has been selected.\n */\n public void onItemSelected(String id);\n }",
"public interface Callbacks {\n /**\n * Callback for when an item has been selected.\n */\n public void onItemSelected(String id);\n }",
"public void setCallbacks(entity.LoadCallback[] value);",
"public List<OrthoFlickListener> getFlickListeners() {\r\n\t\treturn flickListeners;\r\n\t}",
"public interface Callbacks {\n /**\n * Callback for when an item has been selected.\n */\n public void onItemSelected(String summary, String poster);\n }",
"public interface CallbackListener {\n\n public abstract void callBack(String returnCode, Object result);\n\n}",
"public interface MovieTaskCallBack {\n public void onTaskCallBack (List<Movie> lm);\n}",
"public interface CompletionsCallbacks {\n void onSubscribed();\n\n void onData(String data);\n\n void onError(Throwable error);\n\n void onComplete();\n\n void onCancelled();\n}",
"public abstract EnvioMensajesCallBackInterface getInterfaceCallback();",
"List<String> getListenerTypes();",
"protected abstract List<BlockingQueue<CallRunner>> getQueues();",
"static int findListenerMethods(Class<? extends DownloadListener> listenerClass) {\n int threadMode = 0;\n Integer methodMode = METHOD_CACHE.get(listenerClass);\n if (methodMode == null) {\n Method method;\n ExecuteMode mode;\n\n try {\n method = listenerClass.getDeclaredMethod(\"onStart\", new Class<?>[]{Request.class});\n mode = method.getAnnotation(ExecuteMode.class);\n if (mode != null && mode.threadMode() == ThreadMode.MAIN) {\n threadMode |= 1 << START;\n }\n } catch (NoSuchMethodException e) {\n e.printStackTrace();\n }\n\n try {\n method = listenerClass.getDeclaredMethod(\"onProgress\", new Class[]{Request.class, long.class, long.class});\n mode = method.getAnnotation(ExecuteMode.class);\n if (mode != null && mode.threadMode() == ThreadMode.MAIN) {\n threadMode |= 1 << PROGRESS;\n }\n } catch (NoSuchMethodException e) {\n e.printStackTrace();\n }\n\n try {\n method = listenerClass.getDeclaredMethod(\"onPause\", new Class<?>[]{Request.class});\n mode = method.getAnnotation(ExecuteMode.class);\n if (mode != null && mode.threadMode() == ThreadMode.MAIN) {\n threadMode |= 1 << PAUSE;\n }\n } catch (NoSuchMethodException e) {\n e.printStackTrace();\n }\n\n try {\n method = listenerClass.getDeclaredMethod(\"onRestart\", new Class<?>[]{Request.class});\n mode = method.getAnnotation(ExecuteMode.class);\n if (mode != null && mode.threadMode() == ThreadMode.MAIN) {\n threadMode |= 1 << RESTART;\n }\n } catch (NoSuchMethodException e) {\n e.printStackTrace();\n }\n\n try {\n method = listenerClass.getDeclaredMethod(\"onFinished\", new Class<?>[]{Request.class});\n mode = method.getAnnotation(ExecuteMode.class);\n if (mode != null && mode.threadMode() == ThreadMode.MAIN) {\n threadMode |= 1 << SUCCESS;\n }\n } catch (NoSuchMethodException e) {\n e.printStackTrace();\n }\n\n try {\n method = listenerClass.getDeclaredMethod(\"onCancel\", new Class<?>[]{Request.class});\n mode = method.getAnnotation(ExecuteMode.class);\n if (mode != null && mode.threadMode() == ThreadMode.MAIN) {\n threadMode |= 1 << CANCEL;\n }\n } catch (NoSuchMethodException e) {\n e.printStackTrace();\n }\n\n try {\n method = listenerClass.getDeclaredMethod(\"onFailed\", new Class<?>[]{Request.class, Exception.class});\n mode = method.getAnnotation(ExecuteMode.class);\n if (mode != null && mode.threadMode() == ThreadMode.MAIN) {\n threadMode |= 1 << FAIL;\n }\n } catch (NoSuchMethodException e) {\n e.printStackTrace();\n }\n\n methodMode = threadMode;\n METHOD_CACHE.put(listenerClass, methodMode);\n\n } else {\n threadMode = methodMode;\n }\n\n return threadMode;\n }",
"public interface IBasePresenter {\n void subscribeCallbacks();\n void unSubscribeCallbacks();\n}",
"public interface RoomNbPlayersCallback {\n void onCallback(long value);\n }",
"public List<PersistRequestBean<?>> listenerNotify() {\n return listenerNotify;\n }",
"public List<ObserverAsync<Capteur>> getListObserver() {\n\t\tList<ObserverAsync<Capteur>> ret = new ArrayList<ObserverAsync<Capteur>>();\n\t\tIterator ite = this.listObserver.iterator();\n\t\twhile(ite.hasNext()){\n\t\t\tret.add((ObserverAsync<Capteur>) ite.next());\n\t\t}\n\t\t\n\t\treturn ret;\n\t}",
"public interface CallBacks\n {\n void onChangeMode(Mode mode, String id);\n }",
"public interface EventDelegateCallback {\n void onClick(ArrayList<ButtonEvent> events);\n void onHover(ArrayList<HoverEvent> events);\n void onThumbStickEvent(ArrayList<ThumbStickEvent> events);\n void onWeightedTriggerEvent(ArrayList<TriggerEvent> events);\n void onMove(ArrayList<MoveEvent> events);\n void onControllerStatus(ArrayList<ControllerStatus> events);\n void onHover(int source, Node node, boolean isHovering, float hitLoc[]);\n void onClick(int source, Node node, ClickState clickState, float hitLoc[]);\n }",
"public void registerEvents()\n {\n \t\tfinal pchestPlayerListener playerListener = new pchestPlayerListener(this, chestManager);\n \t\tfinal pchestEntityListener entityListener = new pchestEntityListener(this, chestManager);\n \t\tfinal pchestBlockListener blockListener = new pchestBlockListener(this, chestManager);\n \t\t\n \t\t\n pm = getServer().getPluginManager();\n \n /* Entity events */\n pm.registerEvent(Type.ENTITY_EXPLODE, entityListener, Event.Priority.Normal, this);\n \n /* Player events */\n pm.registerEvent(Type.PLAYER_INTERACT, playerListener, Event.Priority.Normal, this);\n \n /* Block events */\n \t\tpm.registerEvent(Type.BLOCK_PLACE, blockListener, Event.Priority.Normal, this);\n \t\tpm.registerEvent(Type.BLOCK_BREAK, blockListener, Event.Priority.Normal, this);\n \n \t\t\n /* Spout Required events */\n \t\tif(SpoutLoaded)\n \t\t{\n \t\t\tfinal pchestInventoryListener inventoryListener = new pchestInventoryListener(this, chestManager);\n \n \t /* Inventory events */\n \t\t\tpm.registerEvent(Type.CUSTOM_EVENT, inventoryListener, Event.Priority.Normal, this);\n \t\t}\n }",
"protected EventExecutor executor()\r\n/* 49: */ {\r\n/* 50: 87 */ return this.executor;\r\n/* 51: */ }",
"public interface IPlayerListener {\n\n public void onError(String message);\n public void onBufferingStarted();\n public void onBufferingFinished();\n public void onRendereingstarted();\n void onCompletion();\n\n}",
"public void notifyListeners() {\n Handler handler = new Handler(Looper.getMainLooper()); // TODO reuse\n // handler\n Runnable runnable = new Runnable() {\n\n @Override\n public void run() {\n synchronized (listeners) {\n for (IContentRequester requester : listeners) {\n requester.contentChanged(Content.this);\n }\n }\n }\n };\n boolean success = handler.post(runnable);\n if (success) {\n // Log.d(TAG,\n // \"Posted notification for all listeners from \"+this.toString()+\" to \"+listeners.size()+\" listeners.\");\n Log.d(TAG, \"Posted notification for all listeners from content id \"\n + id + \" to \" + listeners.size() + \" listeners.\");\n } else {\n Log.e(TAG, \"Failed to post notification for all listeners\");\n }\n }",
"public interface Callback {\n void call();\n}",
"public void setCallbacks(Queue<EventCallback<T>> callbacks) {\n this.callbacks = callbacks;\n }",
"public interface CallbackMap {\n\n void callbackMap();\n}",
"public interface ReceiveCallback extends MessageReceivedCallback{\n}",
"public interface Callback {\n\n void call();\n\n}",
"public ClientEventListener[] getEventListeners() {\n\tClientEventListener[] ret =\n\t new ClientEventListener[listeners.size()];\n\tlisteners.copyInto(ret);\n\treturn ret;\n }",
"public interface YouTubePlaylistReceiver\n{\n void onPlaylistReceived(List<YouTubePlaylist> youTubePlaylistList);\n\n void onPlaylistNotFound(String playlistId, int errorCode);\n\n void onPlaylistVideoReceived(List<YouTubeVideo> youTubeVideos);\n}",
"public interface Callbacks\n {\n public void onItemSelected(String id);\n }",
"private void triggerBlockListeners() {\r\n \tfor(IStopBlockListener listener : blockListeners){\r\n \t\tlistener.onStoppedBlock();\r\n \t}\r\n }",
"public interface IASyncFetchListener extends EventListener {\n void onComplete(JSONObject item);\n void onComplete(JSONArray jsonArray);\n void onError(Throwable error);\n void onError(Throwable error,JSONObject errorResponse);\n}",
"public ChannelProgressivePromise addListeners(GenericFutureListener<? extends Future<? super Void>>... listeners)\r\n/* 75: */ {\r\n/* 76:107 */ super.addListeners(listeners);\r\n/* 77:108 */ return this;\r\n/* 78: */ }",
"public static interface Callbacks {\n \n /**\n * This is called when the user wants to see the open source licences.\n */\n public void onShowLicences();\n }",
"public interface TaskCallback {\n\n void onStart();\n\n void onComplete();\n\n void onSuccess();\n\n void onFailure(Exception e);\n }",
"public abstract void registerListeners();",
"public interface EventCallback {\n void invoke(String receiver,Object result);\n}",
"public interface Callbacks {\n /**\n * Item Processing - method which handling specified Note (save/update in current version)\n * @param noteModel instance of @{@link NoteModel}\n * @param actionAdd boolean\n */\n void itemProcessing(NoteModel noteModel, boolean actionAdd);\n\n /**\n * ActionBack - method which get previous activity\n */\n void actionBack();\n }",
"public interface ComCallBack {\n public void onCallBack(Object obj);\n}",
"public interface CallBackInterface {\n}",
"public interface FlightTrackingCallbackHandler extends Remote {\n\n /*\n * Callback cuando el vuelo fue asignado a una pista\n */\n void onRunwayAssignment(final String flightId, final String destination, final String runway, final long flightsAhead)\n throws RemoteException;\n\n /*\n * Callback cuando el vuelo cambió su posicion en la cola de espera de la pista\n */\n void onQueuePositionUpdate(final String flightId, final String destination, final String runway, final long flightsAhead)\n throws RemoteException;\n\n /*\n * Callback cuando el vuelo despego\n */\n void onDeparture(final String flightId, final String destination, final String runway)\n throws RemoteException;\n\n /*\n * Callback para eliminar el handler de callbacks\n */\n void endProcess()\n throws RemoteException;\n}",
"public interface AsyncCallback<T>\n{\n\tpublic void onPreExecute();\n\tpublic void onPostExecute(T arg);\n}"
] | [
"0.64622074",
"0.640492",
"0.6027922",
"0.5994896",
"0.5986951",
"0.59864783",
"0.5937078",
"0.59265447",
"0.58430415",
"0.5837809",
"0.57283926",
"0.5723099",
"0.57209367",
"0.56492",
"0.56469285",
"0.5618987",
"0.5580164",
"0.55558646",
"0.55341613",
"0.5512887",
"0.5510633",
"0.5459508",
"0.5386562",
"0.5363596",
"0.5358746",
"0.5315604",
"0.5313514",
"0.53110015",
"0.53056383",
"0.5299898",
"0.5297176",
"0.528956",
"0.52754533",
"0.5268252",
"0.52649355",
"0.5243979",
"0.5243979",
"0.5243507",
"0.5238034",
"0.5238034",
"0.5224935",
"0.52170855",
"0.5212919",
"0.5209209",
"0.51625246",
"0.5145524",
"0.5145524",
"0.5144479",
"0.5141899",
"0.514169",
"0.5128633",
"0.5124023",
"0.5121834",
"0.51179206",
"0.5115714",
"0.5109219",
"0.5104687",
"0.5104591",
"0.5099771",
"0.5099771",
"0.50959486",
"0.5090288",
"0.5089153",
"0.50677246",
"0.50655353",
"0.50601995",
"0.50529665",
"0.50324863",
"0.5030206",
"0.50247246",
"0.50158983",
"0.500814",
"0.50030595",
"0.499354",
"0.49864173",
"0.49821153",
"0.4974704",
"0.49721962",
"0.4971679",
"0.4964127",
"0.4952162",
"0.49513555",
"0.4941023",
"0.49355125",
"0.49337554",
"0.49233305",
"0.49220765",
"0.49171364",
"0.49065816",
"0.49048835",
"0.49001068",
"0.489394",
"0.48894727",
"0.48879632",
"0.48853064",
"0.48824346",
"0.48814705",
"0.48773587",
"0.48661986",
"0.48573893"
] | 0.71297103 | 0 |
WARNING: Adding a new ParcelField may break old library users (b/152830728) Used for VersionedParcelable | TrackInfo() {
// no-op
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void mo5336a(Parcelable parcelable) {\n }",
"public void mo1505a(Parcelable parcelable) {\n }",
"@Override\n public void writeToParcel(Parcel dest, int flags) {\n\n }",
"public interface C0591c extends Parcelable {\n}",
"@Override\n\t\t\tpublic void writeToParcel(Parcel arg0, int arg1) {\n\t\t\t\t\n\t\t\t}",
"@SuppressWarnings(\"unchecked\")\n protected <V extends Parcelable> V getParcelableExtra( final String name )\n {\n return (V) getIntent().getParcelableExtra( name );\n }",
"private ParcelableNameValuePair(Parcel in) {\n\t\tname = in.readString();\n\t\tvalue = in.readString();\n\t}",
"@Override\n\tpublic void writeToParcel(Parcel dest, int flags) {\n\t\t\n\t}",
"@Override // android.os.Parcelable\n /* Code decompiled incorrectly, please refer to instructions dump. */\n public void writeToParcel(@org.jetbrains.annotations.NotNull android.os.Parcel r3, int r4) {\n /*\n r2 = this;\n java.lang.String r4 = \"parcel\"\n kotlin.jvm.internal.Intrinsics.checkNotNullParameter(r3, r4)\n java.lang.String r4 = r2.title\n r3.writeString(r4)\n java.lang.String r4 = r2.description\n r3.writeString(r4)\n com.avito.android.remote.model.category_parameters.slot.cpa_tariff.CpaSlotButton r4 = r2.button\n r0 = 0\n r4.writeToParcel(r3, r0)\n java.util.Map<java.lang.String, java.lang.String> r4 = r2.attributesAndValues\n if (r4 == 0) goto L_0x003b\n r0 = 1\n java.util.Iterator r4 = a2.b.a.a.a.m0(r3, r0, r4)\n L_0x001e:\n boolean r0 = r4.hasNext()\n if (r0 == 0) goto L_0x003e\n java.lang.Object r0 = r4.next()\n java.lang.Object r1 = r0.getKey()\n java.lang.String r1 = (java.lang.String) r1\n r3.writeString(r1)\n java.lang.Object r0 = r0.getValue()\n java.lang.String r0 = (java.lang.String) r0\n r3.writeString(r0)\n goto L_0x001e\n L_0x003b:\n r3.writeInt(r0)\n L_0x003e:\n return\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.avito.android.remote.model.category_parameters.slot.cpa_tariff.CpaTariffSlotConfig.writeToParcel(android.os.Parcel, int):void\");\n }",
"@Override public void writeToParcel(Parcel dest, int flags) { }",
"@Override\n\t\tpublic void writeToParcel(Parcel dest, int flags) {\n\t\t\t\n\t\t}",
"@Override\n\tpublic void writeToParcel(Parcel dest, int flags) {\n\n\t}",
"@Override\n\tpublic void writeToParcel(Parcel dest, int flags) {\n\n\t}",
"@Override\n public void writeToParcel(Parcel parcel, int i) {\n }",
"public final /* synthetic */ java.lang.Object createFromParcel(android.os.Parcel r11) {\n /*\n r10 = this;\n int r0 = com.google.android.gms.common.internal.safeparcel.SafeParcelReader.validateObjectHeader(r11)\n r1 = 0\n r2 = 0\n r4 = r2\n r7 = r4\n r9 = r7\n r5 = 0\n r6 = 0\n r8 = 0\n L_0x000c:\n int r1 = r11.dataPosition()\n if (r1 >= r0) goto L_0x0059\n int r1 = com.google.android.gms.common.internal.safeparcel.SafeParcelReader.readHeader(r11)\n int r2 = com.google.android.gms.common.internal.safeparcel.SafeParcelReader.getFieldId(r1)\n r3 = 2\n if (r2 == r3) goto L_0x004f\n r3 = 3\n if (r2 == r3) goto L_0x004a\n r3 = 4\n if (r2 == r3) goto L_0x0045\n r3 = 5\n if (r2 == r3) goto L_0x003b\n r3 = 7\n if (r2 == r3) goto L_0x0036\n r3 = 8\n if (r2 == r3) goto L_0x0031\n com.google.android.gms.common.internal.safeparcel.SafeParcelReader.skipUnknownField(r11, r1)\n goto L_0x000c\n L_0x0031:\n java.lang.String r9 = com.google.android.gms.common.internal.safeparcel.SafeParcelReader.createString(r11, r1)\n goto L_0x000c\n L_0x0036:\n boolean r8 = com.google.android.gms.common.internal.safeparcel.SafeParcelReader.readBoolean(r11, r1)\n goto L_0x000c\n L_0x003b:\n android.os.Parcelable$Creator<com.google.android.gms.drive.DriveId> r2 = com.google.android.gms.drive.DriveId.CREATOR\n android.os.Parcelable r1 = com.google.android.gms.common.internal.safeparcel.SafeParcelReader.createParcelable(r11, r1, r2)\n r7 = r1\n com.google.android.gms.drive.DriveId r7 = (com.google.android.gms.drive.DriveId) r7\n goto L_0x000c\n L_0x0045:\n int r6 = com.google.android.gms.common.internal.safeparcel.SafeParcelReader.readInt(r11, r1)\n goto L_0x000c\n L_0x004a:\n int r5 = com.google.android.gms.common.internal.safeparcel.SafeParcelReader.readInt(r11, r1)\n goto L_0x000c\n L_0x004f:\n android.os.Parcelable$Creator r2 = android.os.ParcelFileDescriptor.CREATOR\n android.os.Parcelable r1 = com.google.android.gms.common.internal.safeparcel.SafeParcelReader.createParcelable(r11, r1, r2)\n r4 = r1\n android.os.ParcelFileDescriptor r4 = (android.os.ParcelFileDescriptor) r4\n goto L_0x000c\n L_0x0059:\n com.google.android.gms.common.internal.safeparcel.SafeParcelReader.ensureAtEnd(r11, r0)\n com.google.android.gms.drive.Contents r11 = new com.google.android.gms.drive.Contents\n r3 = r11\n r3.<init>(r4, r5, r6, r7, r8, r9)\n return r11\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.drive.zzc.createFromParcel(android.os.Parcel):java.lang.Object\");\n }",
"@Override\n\tpublic void writeToParcel(Parcel dest, int flags) {\n\t\tdest.writeString(vooleAuth);\n\t\tdest.writeString(authCompile);\n\t\tdest.writeString(vooleAgent);\n\t\tdest.writeString(agentCompile);\n\t\tdest.writeString(agentLibs);\n\t\tdest.writeString(upgradeVersion);\n\t\tdest.writeString(terminaLogVersion);\n\t\tdest.writeString(apkStartType);\n\t\tdest.writeString(isAuth);\n\t\tdest.writeString(deviceid);\n\t\tdest.writeString(sn);\n\t\tdest.writeString(sdkModuleVersion);\n\t\tdest.writeString(sdkModuleType);\n\t\tdest.writeString(packageName);\n\t\tdest.writeParcelable(info, PARCELABLE_WRITE_RETURN_VALUE);\n\t}",
"public void writeToParcel(Parcel parcel, int flags) {\n/* 1845 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"@Override\n public void writeToParcel(Parcel parcel, int flags) {\n parcel.writeInt(this.pid);\n parcel.writeInt(this.age);\n parcel.writeInt(this.color);\n parcel.writeInt(this.bpm);\n parcel.writeInt(this.rpm);\n parcel.writeInt(this.o2);\n parcel.writeInt(this.temperature);\n\n parcel.writeByte((byte) (this.nbcContam ? 1 : 0));\n\n parcel.writeString(this.fName);\n parcel.writeString(this.lName);\n parcel.writeString(this.ssn);\n parcel.writeString(this.sex);\n parcel.writeString(this.type);\n parcel.writeString(this.ipaddr);\n parcel.writeString(this.src);\n parcel.writeByte((byte) (this.isSelected ? 1 : 0));\n }",
"private void readFromParcel(Parcel in) \r\n\t{\n\t\tthis.id \t\t\t= in.readInt();\r\n\t\tthis.desc\t\t\t= in.readString();\r\n\t\tthis.titulo_imagem \t= in.readString();\r\n\t\tthis.titulo_som\t\t= in.readString();\r\n\t\tthis.ext\t\t\t= in.readString();\r\n\t\tthis.tipo\t\t\t= in.readString().charAt(0);\r\n\t\tthis.cmd\t\t\t= in.readInt();\r\n\t\tthis.atalho\t\t\t= (in.readInt() == 1) ? true : false;\r\n\t\tthis.pagina\t\t\t= in.readInt();\r\n\t\tthis.ordem\t\t\t= in.readInt();\r\n\t}",
"@Override\n public void writeToParcel(Parcel dest, int flags) {\n super.writeToParcel(dest, flags);\n }",
"public final /* synthetic */ java.lang.Object createFromParcel(android.os.Parcel r14) {\n /*\n r13 = this;\n int r0 = com.google.android.gms.common.internal.safeparcel.SafeParcelReader.validateObjectHeader(r14)\n r1 = 1\n r2 = 1000(0x3e8, float:1.401E-42)\n r3 = 0\n r5 = 0\n r8 = r1\n r9 = r8\n r7 = r2\n r10 = r3\n r12 = r5\n L_0x000f:\n int r2 = r14.dataPosition()\n if (r2 >= r0) goto L_0x004d\n int r2 = com.google.android.gms.common.internal.safeparcel.SafeParcelReader.readHeader(r14)\n int r3 = com.google.android.gms.common.internal.safeparcel.SafeParcelReader.getFieldId(r2)\n if (r3 == r1) goto L_0x0048\n r4 = 2\n if (r3 == r4) goto L_0x0043\n r4 = 3\n if (r3 == r4) goto L_0x003e\n r4 = 4\n if (r3 == r4) goto L_0x0039\n r4 = 5\n if (r3 == r4) goto L_0x002f\n com.google.android.gms.common.internal.safeparcel.SafeParcelReader.skipUnknownField(r14, r2)\n goto L_0x000f\n L_0x002f:\n android.os.Parcelable$Creator<com.google.android.gms.location.zzaj> r3 = com.google.android.gms.location.zzaj.CREATOR\n java.lang.Object[] r2 = com.google.android.gms.common.internal.safeparcel.SafeParcelReader.createTypedArray(r14, r2, r3)\n r12 = r2\n com.google.android.gms.location.zzaj[] r12 = (com.google.android.gms.location.zzaj[]) r12\n goto L_0x000f\n L_0x0039:\n int r7 = com.google.android.gms.common.internal.safeparcel.SafeParcelReader.readInt(r14, r2)\n goto L_0x000f\n L_0x003e:\n long r10 = com.google.android.gms.common.internal.safeparcel.SafeParcelReader.readLong(r14, r2)\n goto L_0x000f\n L_0x0043:\n int r9 = com.google.android.gms.common.internal.safeparcel.SafeParcelReader.readInt(r14, r2)\n goto L_0x000f\n L_0x0048:\n int r8 = com.google.android.gms.common.internal.safeparcel.SafeParcelReader.readInt(r14, r2)\n goto L_0x000f\n L_0x004d:\n com.google.android.gms.common.internal.safeparcel.SafeParcelReader.ensureAtEnd(r14, r0)\n com.google.android.gms.location.LocationAvailability r14 = new com.google.android.gms.location.LocationAvailability\n r6 = r14\n r6.<init>(r7, r8, r9, r10, r12)\n return r14\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.location.zzaa.createFromParcel(android.os.Parcel):java.lang.Object\");\n }",
"@Test\n public void inventoryViewModelIsParcelable() {\n setUpInventoryViewModel();\n isPackedAndUnpackedAsParcelSuccessfully();\n }",
"public Parcelable mo5381n() {\n throw null;\n }",
"public void readFromParcel(Parcel src) {\n\n\t}",
"public final /* synthetic */ java.lang.Object createFromParcel(android.os.Parcel r10) {\n /*\n r9 = this;\n int r0 = com.google.android.gms.common.internal.safeparcel.SafeParcelReader.validateObjectHeader(r10)\n r1 = 0\n r2 = 0\n r4 = r1\n r6 = r4\n r7 = r6\n r8 = r7\n r5 = 0\n L_0x000b:\n int r1 = r10.dataPosition()\n if (r1 >= r0) goto L_0x004f\n int r1 = com.google.android.gms.common.internal.safeparcel.SafeParcelReader.readHeader(r10)\n int r2 = com.google.android.gms.common.internal.safeparcel.SafeParcelReader.getFieldId(r1)\n r3 = 2\n if (r2 == r3) goto L_0x0045\n r3 = 3\n if (r2 == r3) goto L_0x0040\n r3 = 4\n if (r2 == r3) goto L_0x003b\n r3 = 5\n if (r2 == r3) goto L_0x0031\n r3 = 6\n if (r2 == r3) goto L_0x002c\n com.google.android.gms.common.internal.safeparcel.SafeParcelReader.skipUnknownField(r10, r1)\n goto L_0x000b\n L_0x002c:\n java.lang.Integer r8 = com.google.android.gms.common.internal.safeparcel.SafeParcelReader.readIntegerObject(r10, r1)\n goto L_0x000b\n L_0x0031:\n android.os.Parcelable$Creator<com.google.android.gms.drive.DriveId> r2 = com.google.android.gms.drive.DriveId.CREATOR\n android.os.Parcelable r1 = com.google.android.gms.common.internal.safeparcel.SafeParcelReader.createParcelable(r10, r1, r2)\n r7 = r1\n com.google.android.gms.drive.DriveId r7 = (com.google.android.gms.drive.DriveId) r7\n goto L_0x000b\n L_0x003b:\n java.lang.String r6 = com.google.android.gms.common.internal.safeparcel.SafeParcelReader.createString(r10, r1)\n goto L_0x000b\n L_0x0040:\n int r5 = com.google.android.gms.common.internal.safeparcel.SafeParcelReader.readInt(r10, r1)\n goto L_0x000b\n L_0x0045:\n android.os.Parcelable$Creator<com.google.android.gms.drive.metadata.internal.MetadataBundle> r2 = com.google.android.gms.drive.metadata.internal.MetadataBundle.CREATOR\n android.os.Parcelable r1 = com.google.android.gms.common.internal.safeparcel.SafeParcelReader.createParcelable(r10, r1, r2)\n r4 = r1\n com.google.android.gms.drive.metadata.internal.MetadataBundle r4 = (com.google.android.gms.drive.metadata.internal.MetadataBundle) r4\n goto L_0x000b\n L_0x004f:\n com.google.android.gms.common.internal.safeparcel.SafeParcelReader.ensureAtEnd(r10, r0)\n com.google.android.gms.internal.drive.zzu r10 = new com.google.android.gms.internal.drive.zzu\n r3 = r10\n r3.<init>(r4, r5, r6, r7, r8)\n return r10\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.internal.drive.zzv.createFromParcel(android.os.Parcel):java.lang.Object\");\n }",
"public j(@org.jetbrains.annotations.NotNull android.os.Parcel r14) {\n /*\n r13 = this;\n java.lang.String r0 = \"parcel\"\n kotlin.jvm.internal.Intrinsics.checkParameterIsNotNull(r14, r0)\n int r2 = r14.readInt()\n int r3 = r14.readInt()\n int r4 = r14.readInt()\n int r5 = r14.readInt()\n int r6 = r14.readInt()\n float r7 = r14.readFloat()\n int r8 = r14.readInt()\n java.lang.String r9 = r14.readString()\n java.lang.String r0 = \"parcel.readString()\"\n kotlin.jvm.internal.Intrinsics.checkExpressionValueIsNotNull(r9, r0)\n java.lang.String r10 = r14.readString()\n java.lang.String r11 = r14.readString()\n java.lang.String r12 = r14.readString()\n r1 = r13\n r1.<init>(r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, r12)\n return\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.ss.android.ugc.aweme.draft.a.j.<init>(android.os.Parcel):void\");\n }",
"private void readFromParcel(Parcel in){\n name = in.readString();\n phone = in.readString();\n email = in.readString();\n }",
"@Override\n public void writeToParcel(Parcel dest, int flags) {\n dest.writeString(operate_time);\n dest.writeString(operate_name);\n dest.writeString(resume_number);\n dest.writeString(name);\n dest.writeString(echo_yes);\n dest.writeString(sex);\n dest.writeString(year);\n dest.writeString(work_beginyear);\n dest.writeString(high_education);\n dest.writeString(location);\n dest.writeString(pic_filekey);\n dest.writeString(user_id);\n dest.writeString(resume_id);\n dest.writeString(moremajor);\n dest.writeString(isnew);\n }",
"public String get_ParcelId(){ return getString(ParcelId);}",
"@Override\r\n public void writeToParcel(Parcel dest, int flags) {\n dest.writeString(this._id);\r\n dest.writeString(this.code);\r\n dest.writeString(this.company);\r\n dest.writeString(this.direction);\r\n dest.writeString(this.etaGet);\r\n dest.writeString(this.latitude);\r\n dest.writeString(this.locationEnd);\r\n dest.writeString(this.locationStart);\r\n dest.writeString(this.longitude);\r\n dest.writeString(this.name);\r\n dest.writeInt(this.order);\r\n dest.writeString(this.route);\r\n dest.writeString(this.sequence);\r\n dest.writeLong(this.updatedAt);\r\n }",
"private UserAccountInfoParcelableBean(Parcel in) {\n\t\tuserName = in.readString();\n\t\tpassword1 = in.readString();\n\t\tpassword2 = in.readString();\n\t\tfirstName = in.readString();\n\t\tlastName = in.readString();\n\t\teMailAddress = in.readString();\n\t\tuserType = in.readString();\n\t}",
"private PassedData(Parcel p) {\n this.a = p.readInt();\n this.b = p.readLong();\n this.c = p.readString();\n }",
"@Test\n public void dashboardViewModelIsParcelable() {\n setUpDashboardViewModel();\n Parcel parcel = Parcel.obtain();\n dashboardViewModel.writeToParcel(parcel, 0);\n parcel.setDataPosition(0);\n DashboardViewModel parceledViewModel = DashboardViewModel.CREATOR.createFromParcel(parcel);\n assertEquals(dashboardViewModel, parceledViewModel);\n }",
"public Parcelable mo1512c() {\n return null;\n }",
"@Override\n\t\tpublic Info createFromParcel(Parcel source) {\n\t\t\treturn new Info(source);\n\t\t}",
"public /* bridge */ /* synthetic */ java.lang.Object createFromParcel(android.os.Parcel r1) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e9 in method: android.location.GpsClock.1.createFromParcel(android.os.Parcel):java.lang.Object, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.location.GpsClock.1.createFromParcel(android.os.Parcel):java.lang.Object\");\n }",
"public /* bridge */ /* synthetic */ java.lang.Object createFromParcel(android.os.Parcel r1) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e9 in method: android.telephony.SmsCbCmasInfo.1.createFromParcel(android.os.Parcel):java.lang.Object, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.telephony.SmsCbCmasInfo.1.createFromParcel(android.os.Parcel):java.lang.Object\");\n }",
"@Override\r\n\tpublic void writeToParcel(Parcel dest, int flags) {\n\t\tdest.writeInt(Id);\r\n\t\tdest.writeString(Name);\r\n\t\tdest.writeFloat(Mark);\r\n\t\tdest.writeString(Type);\r\n\t\tdest.writeParcelable(Image, flags);\r\n\t\tdest.writeString(City);\r\n\t\tdest.writeDouble(Latitude);\r\n\t\tdest.writeDouble(Longitude);\r\n\t}",
"@Override\n\t\tpublic Parcelable saveState() {\n\t\t\treturn null;\n\t\t}",
"public final /* synthetic */ java.lang.Object createFromParcel(android.os.Parcel r14) {\n /*\n r13 = this;\n int r0 = com.google.android.gms.internal.ej.zzd(r14)\n r1 = 0\n r2 = 0\n r4 = r1\n r5 = r4\n r6 = r5\n r7 = r6\n r8 = 0\n r9 = 0\n r10 = 0\n r11 = 0\n r12 = 0\n L_0x000f:\n int r1 = r14.dataPosition()\n if (r1 >= r0) goto L_0x005b\n int r1 = r14.readInt()\n r2 = 65535(0xffff, float:9.1834E-41)\n r2 = r2 & r1\n switch(r2) {\n case 2: goto L_0x0051;\n case 3: goto L_0x004c;\n case 4: goto L_0x0042;\n case 5: goto L_0x003d;\n case 6: goto L_0x0038;\n case 7: goto L_0x0033;\n case 8: goto L_0x002e;\n case 9: goto L_0x0029;\n case 10: goto L_0x0024;\n default: goto L_0x0020;\n }\n L_0x0020:\n com.google.android.gms.internal.ej.zzb(r14, r1)\n goto L_0x000f\n L_0x0024:\n byte r12 = com.google.android.gms.internal.ej.zze(r14, r1)\n goto L_0x000f\n L_0x0029:\n byte r11 = com.google.android.gms.internal.ej.zze(r14, r1)\n goto L_0x000f\n L_0x002e:\n byte r10 = com.google.android.gms.internal.ej.zze(r14, r1)\n goto L_0x000f\n L_0x0033:\n byte r9 = com.google.android.gms.internal.ej.zze(r14, r1)\n goto L_0x000f\n L_0x0038:\n byte r8 = com.google.android.gms.internal.ej.zze(r14, r1)\n goto L_0x000f\n L_0x003d:\n java.lang.Integer r7 = com.google.android.gms.internal.ej.zzh(r14, r1)\n goto L_0x000f\n L_0x0042:\n android.os.Parcelable$Creator<com.google.android.gms.maps.model.LatLng> r2 = com.google.android.gms.maps.model.LatLng.CREATOR\n android.os.Parcelable r1 = com.google.android.gms.internal.ej.zza(r14, r1, r2)\n r6 = r1\n com.google.android.gms.maps.model.LatLng r6 = (com.google.android.gms.maps.model.LatLng) r6\n goto L_0x000f\n L_0x004c:\n java.lang.String r5 = com.google.android.gms.internal.ej.zzq(r14, r1)\n goto L_0x000f\n L_0x0051:\n android.os.Parcelable$Creator<com.google.android.gms.maps.model.StreetViewPanoramaCamera> r2 = com.google.android.gms.maps.model.StreetViewPanoramaCamera.CREATOR\n android.os.Parcelable r1 = com.google.android.gms.internal.ej.zza(r14, r1, r2)\n r4 = r1\n com.google.android.gms.maps.model.StreetViewPanoramaCamera r4 = (com.google.android.gms.maps.model.StreetViewPanoramaCamera) r4\n goto L_0x000f\n L_0x005b:\n com.google.android.gms.internal.ej.zzaf(r14, r0)\n com.google.android.gms.maps.StreetViewPanoramaOptions r14 = new com.google.android.gms.maps.StreetViewPanoramaOptions\n r3 = r14\n r3.<init>(r4, r5, r6, r7, r8, r9, r10, r11, r12)\n return r14\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.maps.r.createFromParcel(android.os.Parcel):java.lang.Object\");\n }",
"@Override\n public void writeToParcel(Parcel parcel, int flags) {\n parcel.writeParcelable(mCourse,0);\n parcel.writeString(mTitle);\n parcel.writeString(mText);\n }",
"@Override\n protected void dispatchSaveInstanceState(SparseArray<Parcelable> container) {\n }",
"@Override\n public DownLoadResumeInfoBean createFromParcel(Parcel source) {\n DownLoadResumeInfoBean downLoadResumeInfoBean = new DownLoadResumeInfoBean();\n downLoadResumeInfoBean.operate_time = source.readString();\n downLoadResumeInfoBean.resume_number = source.readString();\n downLoadResumeInfoBean.name = source.readString();\n downLoadResumeInfoBean.echo_yes = source.readString();\n downLoadResumeInfoBean.sex = source.readString();\n downLoadResumeInfoBean.year = source.readString();\n downLoadResumeInfoBean.work_beginyear = source.readString();\n downLoadResumeInfoBean.high_education = source.readString();\n downLoadResumeInfoBean.location = source.readString();\n downLoadResumeInfoBean.pic_filekey = source.readString();\n downLoadResumeInfoBean.user_id = source.readString();\n downLoadResumeInfoBean.resume_id = source.readString();\n downLoadResumeInfoBean.moremajor = source.readString();\n downLoadResumeInfoBean.operate_name = source.readString();\n downLoadResumeInfoBean.isnew = source.readString();\n return downLoadResumeInfoBean;\n }",
"public Item createFromParcel(Parcel source) {\n Item item = new Item();\n item.name = source.readString(); \n item.description = source.readString(); \n item.type = source.readString(); \n item.value = source.readString(); \n return item; \n }",
"ParcelableVolumeInfo mo736f() throws RemoteException;",
"public f createFromParcel(Parcel parcel) {\r\n int i = 0;\r\n String str = null;\r\n int b = a.b(parcel);\r\n HashSet hashSet = new HashSet();\r\n String str2 = null;\r\n boolean z = false;\r\n String str3 = null;\r\n String str4 = null;\r\n String str5 = null;\r\n String str6 = null;\r\n String str7 = null;\r\n int i2 = 0;\r\n while (parcel.dataPosition() < b) {\r\n int a = a.a(parcel);\r\n switch (a.a(a)) {\r\n case e.MapAttrs_cameraBearing /*1*/:\r\n i2 = a.f(parcel, a);\r\n hashSet.add(Integer.valueOf(1));\r\n break;\r\n case e.MapAttrs_cameraTargetLat /*2*/:\r\n str7 = a.l(parcel, a);\r\n hashSet.add(Integer.valueOf(2));\r\n break;\r\n case e.MapAttrs_cameraTargetLng /*3*/:\r\n str6 = a.l(parcel, a);\r\n hashSet.add(Integer.valueOf(3));\r\n break;\r\n case e.MapAttrs_cameraTilt /*4*/:\r\n str5 = a.l(parcel, a);\r\n hashSet.add(Integer.valueOf(4));\r\n break;\r\n case e.MapAttrs_cameraZoom /*5*/:\r\n str4 = a.l(parcel, a);\r\n hashSet.add(Integer.valueOf(5));\r\n break;\r\n case e.MapAttrs_uiCompass /*6*/:\r\n str3 = a.l(parcel, a);\r\n hashSet.add(Integer.valueOf(6));\r\n break;\r\n case e.MapAttrs_uiRotateGestures /*7*/:\r\n z = a.c(parcel, a);\r\n hashSet.add(Integer.valueOf(7));\r\n break;\r\n case e.MapAttrs_uiScrollGestures /*8*/:\r\n str2 = a.l(parcel, a);\r\n hashSet.add(Integer.valueOf(8));\r\n break;\r\n case e.MapAttrs_uiTiltGestures /*9*/:\r\n str = a.l(parcel, a);\r\n hashSet.add(Integer.valueOf(9));\r\n break;\r\n case e.MapAttrs_uiZoomControls /*10*/:\r\n i = a.f(parcel, a);\r\n hashSet.add(Integer.valueOf(10));\r\n break;\r\n default:\r\n a.b(parcel, a);\r\n break;\r\n }\r\n }\r\n if (parcel.dataPosition() == b) {\r\n return new f(hashSet, i2, str7, str6, str5, str4, str3, z, str2, str, i);\r\n }\r\n throw new b(\"Overread allowed size end=\" + b, parcel);\r\n }",
"private void writeSelfToParcel(android.os.Parcel r29, int r30) {\r\n /*\r\n r28 = this;\r\n r0 = r28;\r\n r1 = r29;\r\n r2 = r30;\r\n r3 = r0.mFlags;\r\n r5 = r0.mAutofillId;\r\n r6 = 32;\r\n if (r5 == 0) goto L_0x000f;\r\n L_0x000e:\r\n r3 = r3 | r6;\r\n L_0x000f:\r\n r5 = r0.mParentAutofillId;\r\n r8 = 64;\r\n if (r5 == 0) goto L_0x0016;\r\n L_0x0015:\r\n r3 = r3 | r8;\r\n L_0x0016:\r\n r5 = r0.mText;\r\n r10 = 2;\r\n r12 = 1;\r\n if (r5 == 0) goto L_0x0026;\r\n L_0x001e:\r\n r3 = r3 | r12;\r\n r5 = r5.isSimple();\r\n if (r5 != 0) goto L_0x0026;\r\n L_0x0025:\r\n r3 = r3 | r10;\r\n L_0x0026:\r\n r5 = r0.mClassName;\r\n r14 = 16;\r\n if (r5 == 0) goto L_0x002d;\r\n L_0x002c:\r\n r3 = r3 | r14;\r\n L_0x002d:\r\n r5 = r0.mId;\r\n r16 = 128; // 0x80 float:1.794E-43 double:6.32E-322;\r\n r14 = -1;\r\n if (r5 == r14) goto L_0x0036;\r\n L_0x0034:\r\n r3 = r3 | r16;\r\n L_0x0036:\r\n r5 = r0.mX;\r\n r5 = r5 & -32768;\r\n r18 = 256; // 0x100 float:3.59E-43 double:1.265E-321;\r\n if (r5 != 0) goto L_0x0059;\r\n L_0x003e:\r\n r5 = r0.mY;\r\n r5 = r5 & -32768;\r\n if (r5 != 0) goto L_0x0059;\r\n L_0x0044:\r\n r5 = r0.mWidth;\r\n r5 = r5 & -32768;\r\n if (r5 == 0) goto L_0x004c;\r\n L_0x004a:\r\n r5 = 1;\r\n goto L_0x004d;\r\n L_0x004c:\r\n r5 = 0;\r\n L_0x004d:\r\n r15 = r0.mHeight;\r\n r15 = r15 & -32768;\r\n if (r15 == 0) goto L_0x0055;\r\n L_0x0053:\r\n r15 = 1;\r\n goto L_0x0056;\r\n L_0x0055:\r\n r15 = 0;\r\n L_0x0056:\r\n r5 = r5 | r15;\r\n if (r5 == 0) goto L_0x005b;\r\n L_0x0059:\r\n r3 = r3 | r18;\r\n L_0x005b:\r\n r5 = r0.mScrollX;\r\n r20 = 512; // 0x200 float:7.175E-43 double:2.53E-321;\r\n if (r5 != 0) goto L_0x0065;\r\n L_0x0061:\r\n r5 = r0.mScrollY;\r\n if (r5 == 0) goto L_0x0067;\r\n L_0x0065:\r\n r3 = r3 | r20;\r\n L_0x0067:\r\n r5 = r0.mContentDescription;\r\n r22 = 8388608; // 0x800000 float:1.17549435E-38 double:4.144523E-317;\r\n if (r5 == 0) goto L_0x0070;\r\n L_0x006e:\r\n r3 = r3 | r22;\r\n L_0x0070:\r\n r5 = r0.mExtras;\r\n r24 = 16777216; // 0x1000000 float:2.3509887E-38 double:8.289046E-317;\r\n if (r5 == 0) goto L_0x0079;\r\n L_0x0077:\r\n r3 = r3 | r24;\r\n L_0x0079:\r\n r5 = r0.mLocaleList;\r\n if (r5 == 0) goto L_0x0082;\r\n L_0x007d:\r\n r26 = 33554432; // 0x2000000 float:9.403955E-38 double:1.6578092E-316;\r\n r3 = r3 | r26;\r\n L_0x0082:\r\n r5 = r0.mInputType;\r\n if (r5 == 0) goto L_0x008b;\r\n L_0x0086:\r\n r26 = 67108864; // 0x4000000 float:1.5046328E-36 double:3.31561842E-316;\r\n r3 = r3 | r26;\r\n L_0x008b:\r\n r5 = r0.mMinEms;\r\n if (r5 <= r14) goto L_0x0094;\r\n L_0x008f:\r\n r26 = 134217728; // 0x8000000 float:3.85186E-34 double:6.63123685E-316;\r\n r3 = r3 | r26;\r\n L_0x0094:\r\n r5 = r0.mMaxEms;\r\n if (r5 <= r14) goto L_0x009d;\r\n L_0x0098:\r\n r26 = 268435456; // 0x10000000 float:2.5243549E-29 double:1.32624737E-315;\r\n r3 = r3 | r26;\r\n L_0x009d:\r\n r5 = r0.mMaxLength;\r\n if (r5 <= r14) goto L_0x00a6;\r\n L_0x00a1:\r\n r26 = 536870912; // 0x20000000 float:1.0842022E-19 double:2.652494739E-315;\r\n r3 = r3 | r26;\r\n L_0x00a6:\r\n r5 = r0.mTextIdEntry;\r\n if (r5 == 0) goto L_0x00af;\r\n L_0x00aa:\r\n r26 = 1073741824; // 0x40000000 float:2.0 double:5.304989477E-315;\r\n r3 = r3 | r26;\r\n L_0x00af:\r\n r5 = r0.mAutofillValue;\r\n if (r5 == 0) goto L_0x00ba;\r\n L_0x00b3:\r\n r26 = 4294967296; // 0x100000000 float:0.0 double:2.121995791E-314;\r\n r3 = r3 | r26;\r\n L_0x00ba:\r\n r5 = r0.mAutofillType;\r\n if (r5 == 0) goto L_0x00c5;\r\n L_0x00be:\r\n r26 = 2147483648; // 0x80000000 float:-0.0 double:1.0609978955E-314;\r\n r3 = r3 | r26;\r\n L_0x00c5:\r\n r5 = r0.mAutofillHints;\r\n if (r5 == 0) goto L_0x00d0;\r\n L_0x00c9:\r\n r26 = 8589934592; // 0x200000000 float:0.0 double:4.243991582E-314;\r\n r3 = r3 | r26;\r\n L_0x00d0:\r\n r5 = r0.mAutofillOptions;\r\n if (r5 == 0) goto L_0x00db;\r\n L_0x00d4:\r\n r26 = 17179869184; // 0x400000000 float:0.0 double:8.4879831639E-314;\r\n r3 = r3 | r26;\r\n L_0x00db:\r\n r1.writeLong(r3);\r\n r5 = r3 & r6;\r\n r26 = 0;\r\n r5 = (r5 > r26 ? 1 : (r5 == r26 ? 0 : -1));\r\n if (r5 == 0) goto L_0x00eb;\r\n L_0x00e6:\r\n r5 = r0.mAutofillId;\r\n r1.writeParcelable(r5, r2);\r\n L_0x00eb:\r\n r5 = r3 & r8;\r\n r5 = (r5 > r26 ? 1 : (r5 == r26 ? 0 : -1));\r\n if (r5 == 0) goto L_0x00f6;\r\n L_0x00f1:\r\n r5 = r0.mParentAutofillId;\r\n r1.writeParcelable(r5, r2);\r\n L_0x00f6:\r\n r5 = r3 & r12;\r\n r5 = (r5 > r26 ? 1 : (r5 == r26 ? 0 : -1));\r\n if (r5 == 0) goto L_0x010a;\r\n L_0x00fc:\r\n r5 = r0.mText;\r\n r6 = r3 & r10;\r\n r6 = (r6 > r26 ? 1 : (r6 == r26 ? 0 : -1));\r\n if (r6 != 0) goto L_0x0106;\r\n L_0x0104:\r\n r6 = 1;\r\n goto L_0x0107;\r\n L_0x0106:\r\n r6 = 0;\r\n L_0x0107:\r\n r5.writeToParcel(r1, r6);\r\n L_0x010a:\r\n r5 = 16;\r\n r5 = r5 & r3;\r\n r5 = (r5 > r26 ? 1 : (r5 == r26 ? 0 : -1));\r\n if (r5 == 0) goto L_0x0116;\r\n L_0x0111:\r\n r5 = r0.mClassName;\r\n r1.writeString(r5);\r\n L_0x0116:\r\n r5 = r3 & r16;\r\n r5 = (r5 > r26 ? 1 : (r5 == r26 ? 0 : -1));\r\n if (r5 == 0) goto L_0x0138;\r\n L_0x011c:\r\n r5 = r0.mId;\r\n r1.writeInt(r5);\r\n r5 = r0.mId;\r\n if (r5 == r14) goto L_0x0138;\r\n L_0x0125:\r\n r5 = r0.mIdEntry;\r\n r1.writeString(r5);\r\n r5 = r0.mIdEntry;\r\n if (r5 == 0) goto L_0x0138;\r\n L_0x012e:\r\n r5 = r0.mIdType;\r\n r1.writeString(r5);\r\n r5 = r0.mIdPackage;\r\n r1.writeString(r5);\r\n L_0x0138:\r\n r5 = r3 & r18;\r\n r5 = (r5 > r26 ? 1 : (r5 == r26 ? 0 : -1));\r\n if (r5 == 0) goto L_0x0153;\r\n L_0x013e:\r\n r5 = r0.mX;\r\n r1.writeInt(r5);\r\n r5 = r0.mY;\r\n r1.writeInt(r5);\r\n r5 = r0.mWidth;\r\n r1.writeInt(r5);\r\n r5 = r0.mHeight;\r\n r1.writeInt(r5);\r\n goto L_0x0167;\r\n L_0x0153:\r\n r5 = r0.mY;\r\n r5 = r5 << 16;\r\n r6 = r0.mX;\r\n r5 = r5 | r6;\r\n r1.writeInt(r5);\r\n r5 = r0.mHeight;\r\n r5 = r5 << 16;\r\n r6 = r0.mWidth;\r\n r5 = r5 | r6;\r\n r1.writeInt(r5);\r\n L_0x0167:\r\n r5 = r3 & r20;\r\n r5 = (r5 > r26 ? 1 : (r5 == r26 ? 0 : -1));\r\n if (r5 == 0) goto L_0x0177;\r\n L_0x016d:\r\n r5 = r0.mScrollX;\r\n r1.writeInt(r5);\r\n r5 = r0.mScrollY;\r\n r1.writeInt(r5);\r\n L_0x0177:\r\n r5 = r3 & r22;\r\n r5 = (r5 > r26 ? 1 : (r5 == r26 ? 0 : -1));\r\n if (r5 == 0) goto L_0x0183;\r\n L_0x017d:\r\n r5 = r0.mContentDescription;\r\n r6 = 0;\r\n android.text.TextUtils.writeToParcel(r5, r1, r6);\r\n L_0x0183:\r\n r5 = r3 & r24;\r\n r5 = (r5 > r26 ? 1 : (r5 == r26 ? 0 : -1));\r\n if (r5 == 0) goto L_0x018e;\r\n L_0x0189:\r\n r5 = r0.mExtras;\r\n r1.writeBundle(r5);\r\n L_0x018e:\r\n r5 = 33554432; // 0x2000000 float:9.403955E-38 double:1.6578092E-316;\r\n r5 = r5 & r3;\r\n r5 = (r5 > r26 ? 1 : (r5 == r26 ? 0 : -1));\r\n if (r5 == 0) goto L_0x019c;\r\n L_0x0196:\r\n r5 = r0.mLocaleList;\r\n r6 = 0;\r\n r1.writeParcelable(r5, r6);\r\n L_0x019c:\r\n r5 = 67108864; // 0x4000000 float:1.5046328E-36 double:3.31561842E-316;\r\n r5 = r5 & r3;\r\n r5 = (r5 > r26 ? 1 : (r5 == r26 ? 0 : -1));\r\n if (r5 == 0) goto L_0x01a9;\r\n L_0x01a4:\r\n r5 = r0.mInputType;\r\n r1.writeInt(r5);\r\n L_0x01a9:\r\n r5 = 134217728; // 0x8000000 float:3.85186E-34 double:6.63123685E-316;\r\n r5 = r5 & r3;\r\n r5 = (r5 > r26 ? 1 : (r5 == r26 ? 0 : -1));\r\n if (r5 == 0) goto L_0x01b6;\r\n L_0x01b1:\r\n r5 = r0.mMinEms;\r\n r1.writeInt(r5);\r\n L_0x01b6:\r\n r5 = 268435456; // 0x10000000 float:2.5243549E-29 double:1.32624737E-315;\r\n r5 = r5 & r3;\r\n r5 = (r5 > r26 ? 1 : (r5 == r26 ? 0 : -1));\r\n if (r5 == 0) goto L_0x01c3;\r\n L_0x01be:\r\n r5 = r0.mMaxEms;\r\n r1.writeInt(r5);\r\n L_0x01c3:\r\n r5 = 536870912; // 0x20000000 float:1.0842022E-19 double:2.652494739E-315;\r\n r5 = r5 & r3;\r\n r5 = (r5 > r26 ? 1 : (r5 == r26 ? 0 : -1));\r\n if (r5 == 0) goto L_0x01d0;\r\n L_0x01cb:\r\n r5 = r0.mMaxLength;\r\n r1.writeInt(r5);\r\n L_0x01d0:\r\n r5 = 1073741824; // 0x40000000 float:2.0 double:5.304989477E-315;\r\n r5 = r5 & r3;\r\n r5 = (r5 > r26 ? 1 : (r5 == r26 ? 0 : -1));\r\n if (r5 == 0) goto L_0x01dd;\r\n L_0x01d8:\r\n r5 = r0.mTextIdEntry;\r\n r1.writeString(r5);\r\n L_0x01dd:\r\n r5 = 2147483648; // 0x80000000 float:-0.0 double:1.0609978955E-314;\r\n r5 = r5 & r3;\r\n r5 = (r5 > r26 ? 1 : (r5 == r26 ? 0 : -1));\r\n if (r5 == 0) goto L_0x01ec;\r\n L_0x01e7:\r\n r5 = r0.mAutofillType;\r\n r1.writeInt(r5);\r\n L_0x01ec:\r\n r5 = 8589934592; // 0x200000000 float:0.0 double:4.243991582E-314;\r\n r5 = r5 & r3;\r\n r5 = (r5 > r26 ? 1 : (r5 == r26 ? 0 : -1));\r\n if (r5 == 0) goto L_0x01fb;\r\n L_0x01f6:\r\n r5 = r0.mAutofillHints;\r\n r1.writeStringArray(r5);\r\n L_0x01fb:\r\n r5 = 4294967296; // 0x100000000 float:0.0 double:2.121995791E-314;\r\n r5 = r5 & r3;\r\n r5 = (r5 > r26 ? 1 : (r5 == r26 ? 0 : -1));\r\n if (r5 == 0) goto L_0x020b;\r\n L_0x0205:\r\n r5 = r0.mAutofillValue;\r\n r6 = 0;\r\n r1.writeParcelable(r5, r6);\r\n L_0x020b:\r\n r5 = 17179869184; // 0x400000000 float:0.0 double:8.4879831639E-314;\r\n r5 = r5 & r3;\r\n r5 = (r5 > r26 ? 1 : (r5 == r26 ? 0 : -1));\r\n if (r5 == 0) goto L_0x021a;\r\n L_0x0215:\r\n r5 = r0.mAutofillOptions;\r\n r1.writeCharSequenceArray(r5);\r\n L_0x021a:\r\n return;\r\n */\r\n throw new UnsupportedOperationException(\"Method not decompiled: android.view.contentcapture.ViewNode.writeSelfToParcel(android.os.Parcel, int):void\");\r\n }",
"@Test\n public void testParcel() {\n CellIdentityNr cellIdentityNr =\n new CellIdentityNr(PCI, TAC, NRARFCN, BANDS, MCC_STR, MNC_STR, NCI,\n ALPHAL, ALPHAS, Collections.emptyList());\n\n // WHEN write the object to parcel and create another object with that parcel\n Parcel parcel = Parcel.obtain();\n cellIdentityNr.writeToParcel(parcel, 0 /* type */);\n parcel.setDataPosition(0);\n CellIdentityNr anotherCellIdentityNr = CellIdentityNr.CREATOR.createFromParcel(parcel);\n\n // THEN the new object is equal to the old one\n assertThat(anotherCellIdentityNr).isEqualTo(cellIdentityNr);\n assertThat(anotherCellIdentityNr.getType()).isEqualTo(CellInfo.TYPE_NR);\n assertThat(anotherCellIdentityNr.getNrarfcn()).isEqualTo(NRARFCN);\n assertThat(anotherCellIdentityNr.getPci()).isEqualTo(PCI);\n assertThat(anotherCellIdentityNr.getTac()).isEqualTo(TAC);\n assertTrue(Arrays.equals(anotherCellIdentityNr.getBands(), BANDS));\n assertThat(anotherCellIdentityNr.getOperatorAlphaLong()).isEqualTo(ALPHAL);\n assertThat(anotherCellIdentityNr.getOperatorAlphaShort()).isEqualTo(ALPHAS);\n assertThat(anotherCellIdentityNr.getMccString()).isEqualTo(MCC_STR);\n assertThat(anotherCellIdentityNr.getMncString()).isEqualTo(MNC_STR);\n assertThat(anotherCellIdentityNr.getNci()).isEqualTo(NCI);\n }",
"@Override\n public void writeToParcel(Parcel dest, int flags) {\n Bundle bundle = new Bundle();\n\n // insert the key value pairs to the bundle\n bundle.putString(BACK_PATH, backdrop_path);\n bundle.putInt(ID, id);\n bundle.putString(OVERVIEW, overview);\n bundle.putString(RELEASE_DATE, release_date);\n bundle.putString(POSTER_PATH, poster_path);\n bundle.putString(TITLE, original_title);\n bundle.putDouble(VOTE_AVERAGE, vote_average);\n\n // write the key value pairs to the parcel\n dest.writeBundle(bundle);\n }",
"@Override\n\tpublic void writeToParcel(Parcel dest, int flags) {\n\t\tdest.writeString(ID);\n\t\tdest.writeString(Title);\n\t\tdest.writeString(More);\n\t\tdest.writeString(Tag);\n\t\tdest.writeString(PosterUrl);\n\t\tdest.writeString(VideoUrl);\n\t\tdest.writeString(Director);\n\t\tdest.writeString(Actor);\n\t\tdest.writeString(Grade);\n\t\tdest.writeString(Contents);\n\t\tdest.writeString(RunningTime);\n\t\tdest.writeString(HD);\n\t\tdest.writeString(Price);\n\t}",
"@Override\r\n\tpublic void writeToParcel(Parcel dest, int flags)\r\n\t{\n\t\tdest.writeInt(this.id);\r\n\t\tdest.writeString(this.desc);\r\n\t\tdest.writeString(this.titulo_imagem);\r\n\t\tdest.writeString(this.titulo_som);\r\n\t\tdest.writeString(this.ext);\r\n\t\tdest.writeString(\"\" + this.tipo);\r\n\t\tdest.writeInt(this.cmd);\r\n\t\tdest.writeInt((this.atalho) ? 1 : 0);\r\n\t\tdest.writeInt(this.pagina);\r\n\t\tdest.writeInt(this.ordem);\r\n\t\t\r\n\t}",
"public interface IMedia extends Parcelable {\n\n enum Type {\n MOVIE(\"movie\"), TV(\"tv\");\n\n private String name;\n\n Type(String name) {\n this.name = name;\n }\n\n @Override\n public String toString() {\n return name;\n }\n }\n\n String getBackdropPath();\n\n int[] getGenreIds();\n\n Genre[] getGenres();\n\n long getId();\n\n String getOriginalTitle();\n\n String getTitle();\n\n String getOverview();\n\n String getReleaseDate();\n\n String getPosterPath();\n\n String getHomePage();\n\n float getPopularity();\n\n boolean isVideo();\n\n float getVoteAverage();\n\n int getVoteCount();\n\n VideosResponse getVideos();\n\n Type getType();\n\n Creator<IMedia> CREATOR = new Creator<IMedia>() {\n @Override\n public IMedia createFromParcel(Parcel parcel) {\n String type = parcel.readString();\n if(Type.MOVIE.name.equals(type)){\n return Movie.CREATOR.createFromParcel(parcel);\n }else{\n return TV.CREATOR.createFromParcel(parcel);\n }\n }\n\n @Override\n public IMedia[] newArray(int i) {\n return new IMedia[i];\n }\n };\n\n}",
"public Integer getParcelNumber()\n {\n return parcelNumber;\n }",
"public final Bundle mo42888a(Bundle bundle) throws RemoteException {\n Parcel a = mo42696a();\n C16517ez.m53834a(a, (Parcelable) bundle);\n Parcel a2 = mo42697a(1, a);\n Bundle bundle2 = (Bundle) C16517ez.m53832a(a2, Bundle.CREATOR);\n a2.recycle();\n return bundle2;\n }",
"public interface Choiceable extends Parcelable {\n\n String getTitleText();\n\n Long getId();\n\n}",
"public ParcelableMessage(Message message) {\n\t\tsuper(message);\n\t}",
"@Override\n public void writeToParcel(Parcel parcel_out, int flags) {\n parcel_out.writeInt(id);\n parcel_out.writeString(name);\n parcel_out.writeString(slug);\n }",
"amx(Parcel parcel) {\n int n = 1;\n this.a = parcel.readInt();\n this.b = parcel.readInt();\n if (parcel.readInt() != n) {\n n = 0;\n }\n this.c = n;\n }",
"public void my_readFromParcel(Parcel in) {\n x = in.readFloat();\n y = in.readFloat();\n }",
"public void readFromParcel( Parcel source )\n {\n emoticonId = source.readString();\n emoticonName = source.readString();\n emoticonStatic = source.readString();\n emoticonDynamic = source.readString();\n packageId = source.readString();\n emoticonStaticByte = source.createByteArray();\n emoticonDynamicByte = source.createByteArray();\n userPhone = source.readString();\n boolean[] val = new boolean[ 1 ];\n source.readBooleanArray( val );\n isOnlyBrowse = val[ 0 ];\n }",
"@Override\n public void writeToParcel(Parcel out, int flags){\n out.writeParcelable(history, flags);\n out.writeParcelable(historyValues, flags);\n out.writeParcelable(redoEffects, flags);\n out.writeParcelable(redoParams, flags);\n out.writeMap(images);\n }",
"private Person(final Parcel in) {\n super();\n readFromParcel(in);\n }",
"@Override\n public NoteInfo createFromParcel(Parcel parcel) {\n\n return new NoteInfo(parcel);\n }",
"public void readFromParcel(Parcel in) {\n mCityName = in.readString();\n mCityId = in.readInt();\n mCountry = in.readString();\n mState = in.readString();\n mLongitude = in.readDouble();\n mLatitude = in.readDouble();\n mLastUpdated = in.readLong();\n mPosition = in.readInt();\n }",
"@Override\n\t\tpublic photo createFromParcel(Parcel in) {\n\t\t\t return new photo(in);\n\t\t}",
"@Override\n public void writeToParcel(Parcel parcel, int i) {\n parcel.writeString(this.names);\n parcel.writeString(this.lastnames);\n parcel.writeInt(this.age);\n }",
"@Override\n\tpublic void writeToParcel(Parcel dest, int flags) {\n\t\tdest.writeInt(id);\n\t\tdest.writeInt(user_id);\n\t\tdest.writeString(title);\n\t\tdest.writeString(description);\n\t\tdest.writeSerializable(date);\n\t\tdest.writeSerializable(created_at);\n\t\tdest.writeSerializable(updated_at);\n\t}",
"public ParcelableGeneralCellInfo(Parcel parcel) {\n super(parcel.readString(), parcel.readString(), parcel.readString(), parcel.readString(), parcel.readByte() != 0, parcel.readString(), parcel.readString(), parcel.readString(), parcel.readString(), parcel.readByte() != 0, (ParcelableCdmaCellInfo) parcel.readParcelable(ParcelableCdmaCellInfo.class.getClassLoader()));\n }",
"@Override\r\n\tpublic void writeToParcel(Parcel dest, int flags) {\n\t\tdest.writeInt(id);\r\n\t\tdest.writeInt(priority);\r\n\t\tdest.writeString(name);\r\n\t}",
"static /* synthetic */ void m23360a(Parcel parcel, byte[] bArr, int i, int i2) {\n if (VERSION.SDK_INT >= 11) {\n parcel.writeByteArray(bArr, i, i2);\n return;\n }\n byte[] bArr2 = new byte[i2];\n System.arraycopy(bArr, i, bArr2, 0, i2);\n parcel.writeByteArray(bArr2);\n }",
"public VKApiItem(Parcel in) {\n super(in);\n this.id = in.readInt();\n this.owner_id = in.readInt();\n this.title = in.readString();\n this.description = in.readString();\n this.price = in.readParcelable(VKApiPrice.class.getClassLoader());\n this.category = in.readParcelable(VKApiCategory.class.getClassLoader());\n this.date = in.readLong();\n this.availability = in.readInt();\n this.comments = in.readInt();\n this.views_count = in.readInt();\n }",
"@Override\n\tpublic void writeToParcel(Parcel dest, int flags) {\n\t\tdest.writeInt(id);\n\t\tdest.writeString(baoBeiUrl);\n\t\tdest.writeString(baoBeiName);\n\t\tdest.writeString(baoBeiPhone);\n\t\tdest.writeString(baoBeiSelect);\n\t}",
"@Override\n public void writeToParcel(Parcel out, int flags) {\n out.writeString(this.tagId);\n out.writeString(this._tag);\n out.writeDouble(this.probability);\n }",
"@Override\n\tpublic void writeToParcel(Parcel dest, int flags) {\n\t\tdest.writeInt(image);\n\t\tdest.writeString(name);\n\t\t\n\t}",
"@Override\n \n public void writeToParcel(Parcel dest, int flags) {\n \n if (lat == null) {\n \n dest.writeByte((byte) (0x00));\n \n } else {\n \n dest.writeByte((byte) (0x01));\n \n dest.writeDouble(lat);\n \n }\n if (lng == null) {\n \n dest.writeByte((byte) (0x00));\n \n } else {\n \n dest.writeByte((byte) (0x01));\n \n dest.writeDouble(lng);\n \n }\n \n dest.writeString(name);\n \n dest.writeString(iconUrl);\n \n dest.writeString(address);\n \n dest.writeString(operating);\n \n }",
"@Override\n public void writeToParcel(Parcel dest, int flags) {\n\n dest.writeString(title);\n dest.writeString(content);\n dest.writeString(imagePath);\n dest.writeString(participants);\n dest.writeInt(id);\n }",
"public ParcelableDocDetail createFromParcel(Parcel source) {\n\t\t\treturn new ParcelableDocDetail(source);\n\t\t}",
"public void writeToParcel(android.os.Parcel r1, int r2) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e3 in method: android.telephony.SmsCbCmasInfo.writeToParcel(android.os.Parcel, int):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.telephony.SmsCbCmasInfo.writeToParcel(android.os.Parcel, int):void\");\n }",
"@Override\n public void writeToParcel(Parcel dest, int flags) {\n dest.writeString(name);\n dest.writeString(description);\n dest.writeString(type);\n dest.writeString(value);\n }",
"@Override\n public void writeToParcel(Parcel dest, int flags) {\n dest.writeStringArray(new String[] {Objects.toString(this._id, null),\n this.pNote,\n this.pDate});\n }",
"@Override\n public void writeToParcel(Parcel dest, int flags) {\n dest.writeInt(locationID);\n dest.writeDouble(longitude);\n dest.writeDouble(altitude);\n dest.writeDouble(latitude);\n dest.writeFloat(speed);\n dest.writeLong(time);\n\n }",
"public void method_3292(Parcel var1) {\n this.field_4722 = var1.readInt();\n this.field_4723 = var1.readInt();\n }",
"public C1748jj createFromParcel(Parcel parcel) {\n int G = C0721a.m714G(parcel);\n int i = 0;\n int i2 = 0;\n int i3 = 0;\n String str = null;\n IBinder iBinder = null;\n Scope[] scopeArr = null;\n Bundle bundle = null;\n while (parcel.dataPosition() < G) {\n int F = C0721a.m713F(parcel);\n switch (C0721a.m720aH(F)) {\n case 1:\n i = C0721a.m728g(parcel, F);\n break;\n case 2:\n i2 = C0721a.m728g(parcel, F);\n break;\n case 3:\n i3 = C0721a.m728g(parcel, F);\n break;\n case 4:\n str = C0721a.m736o(parcel, F);\n break;\n case 5:\n iBinder = C0721a.m737p(parcel, F);\n break;\n case 6:\n scopeArr = (Scope[]) C0721a.m722b(parcel, F, Scope.CREATOR);\n break;\n case 7:\n bundle = C0721a.m738q(parcel, F);\n break;\n default:\n C0721a.m721b(parcel, F);\n break;\n }\n }\n if (parcel.dataPosition() == G) {\n return new C1748jj(i, i2, i3, str, iBinder, scopeArr, bundle);\n }\n throw new C0721a.C0722a(\"Overread allowed size end=\" + G, parcel);\n }",
"public Parcelable onSaveInstanceState() {\n C17370e eVar = new C17370e(super.onSaveInstanceState());\n eVar.f61237a = this.f61213f > 0 && this.f61212e == 0.0f;\n return eVar;\n }",
"public void readFromParcel(Parcel in) {\n mStreams.clear();\n Parcelable[] parcebleArray = in.readParcelableArray(Stream.class.getClassLoader());\n if(parcebleArray != null) {\n for (Parcelable p : parcebleArray) {\n Stream s = (Stream) p;\n mStreams.add(s);\n }\n }\n }",
"public static void m118a(Object obj, Parcel parcel, int i) {\n ((MediaMetadata) obj).writeToParcel(parcel, i);\n }",
"private static Relative m147582a(Parcel parcel) {\n return new Relative(parcel);\n }",
"Parcelle createParcelle();",
"private void isPackedAndUnpackedAsParcelSuccessfully() {\n Parcel parcel = Parcel.obtain();\n contentViewModel.writeToParcel(parcel, 0);\n parcel.setDataPosition(0);\n ContentViewModel parceledViewModel = ContentViewModel.CREATOR.createFromParcel(parcel);\n assertEquals(contentViewModel, parceledViewModel);\n }",
"@Override\n public void writeToParcel(Parcel dest, int flags) {\n if (DBG) log(\"writeToParcel(Parcel, int): \" + toString());\n dest.writeInt(mSignalStrength);\n dest.writeInt(mBitErrorRate);\n }",
"public ParcelableMessage(Parcel source) {\n\t\tsuper(source.readString(), source.readString(), new Date(\n\t\t\t\tsource.readLong()));\n\t}",
"private SavedState(Parcel parcel) {\n super(parcel);\n boolean bl2 = parcel.readInt() != 0;\n this.isOpen = bl2;\n }",
"public void put(@NonNull final String key, final Parcelable value) {\n put(key, value, -1);\n }",
"@Override\n protected void onRestoreInstanceState(Parcelable state) {\n\n //in onSavedInstance method we returned a Bundle\n //here we are accepting that as input and checking if it is of type Parcelable\n //Bundle class implement Parcelable interface, so they are compatible and be considered to be of type Parcelable also.\n\n if(state instanceof Parcelable){\n\n\n //store the state as a bundle and typecast it\n Bundle bundle = (Bundle) state;\n\n //retrieve the view data from the Bundle\n //this is passed to super.onRestoreInstanceState(state) below\n state = bundle.getParcelable(\"stateOftheView\");\n\n //get our data\n int date = bundle.getInt(\"date\");\n int month = bundle.getInt(\"month\");\n int year = bundle.getInt(\"year\");\n\n //send this data to the update method to update the\n update(date, month, year, 0,0,0);\n\n\n }\n\n //return its view data\n super.onRestoreInstanceState(state);\n\n\n }",
"public C0902id createFromParcel(Parcel parcel) {\n String str = null;\n int n = C0173a.m313n(parcel);\n HashSet hashSet = new HashSet();\n int i = 0;\n C0900ib ibVar = null;\n String str2 = null;\n C0900ib ibVar2 = null;\n String str3 = null;\n while (parcel.dataPosition() < n) {\n int m = C0173a.m311m(parcel);\n switch (C0173a.m292M(m)) {\n case 1:\n i = C0173a.m305g(parcel, m);\n hashSet.add(Integer.valueOf(1));\n break;\n case 2:\n str3 = C0173a.m312m(parcel, m);\n hashSet.add(Integer.valueOf(2));\n break;\n case 4:\n C0900ib ibVar3 = (C0900ib) C0173a.m294a(parcel, m, (Creator<T>) C0900ib.CREATOR);\n hashSet.add(Integer.valueOf(4));\n ibVar2 = ibVar3;\n break;\n case 5:\n str2 = C0173a.m312m(parcel, m);\n hashSet.add(Integer.valueOf(5));\n break;\n case 6:\n C0900ib ibVar4 = (C0900ib) C0173a.m294a(parcel, m, (Creator<T>) C0900ib.CREATOR);\n hashSet.add(Integer.valueOf(6));\n ibVar = ibVar4;\n break;\n case 7:\n str = C0173a.m312m(parcel, m);\n hashSet.add(Integer.valueOf(7));\n break;\n default:\n C0173a.m298b(parcel, m);\n break;\n }\n }\n if (parcel.dataPosition() == n) {\n return new C0902id(hashSet, i, str3, ibVar2, str2, ibVar, str);\n }\n throw new C0174a(\"Overread allowed size end=\" + n, parcel);\n }",
"@Override\n public void writeToParcel(Parcel dest, int flags) {\n dest.writeString(name);\n dest.writeString(phone);\n dest.writeString(email);\n }",
"public final void writeToParcel(Parcel parcel, int i) {\n int a = see.m35030a(parcel);\n see.m35046a(parcel, 2, this.f31150a, false);\n see.m35046a(parcel, 3, this.f31151b, false);\n see.m35065b(parcel, 4, this.f31152c, false);\n see.m35051a(parcel, 5, this.f31153d);\n see.m35046a(parcel, 6, this.f31156g, false);\n see.m35046a(parcel, 7, this.f31157h, false);\n see.m35040a(parcel, 8, this.f31158i, i, false);\n see.m35040a(parcel, 9, this.f31159j, i, false);\n see.m35040a(parcel, 10, this.f31160k, i, false);\n see.m35040a(parcel, 11, this.f31161l, i, false);\n see.m35040a(parcel, 12, this.f31162m, i, false);\n see.m35040a(parcel, 13, this.f31163n, i, false);\n see.m35040a(parcel, 14, this.f31164o, i, false);\n see.m35040a(parcel, 15, this.f31165p, i, false);\n see.m35051a(parcel, 16, this.f31154e);\n see.m35051a(parcel, 17, this.f31155f);\n see.m35040a(parcel, 18, this.f31166q, i, false);\n see.m35062b(parcel, a);\n }",
"private Note(Parcel in) {\n content = in.readString();\n color = (Color) in.readSerializable();\n }",
"static com.qiyukf.nimlib.p470f.p471a.C5826a m23369a(android.os.Parcel r4) {\n /*\n com.qiyukf.nimlib.f.a.a r0 = new com.qiyukf.nimlib.f.a.a\n r1 = 0\n r0.m50001init(r1)\n int r2 = r4.readInt()\n r0.f18499a = r2\n int r2 = r4.readInt()\n if (r2 <= 0) goto L_0x001d\n byte[] r2 = r4.createByteArray()\n java.nio.ByteBuffer r2 = java.nio.ByteBuffer.wrap(r2)\n r0.f18501c = r2\n L_0x001d:\n int r2 = r4.readInt()\n r0.f18500b = r2\n int r2 = r4.readInt()\n if (r2 <= 0) goto L_0x0061\n byte[] r4 = r4.createByteArray()\n int r3 = r0.f18500b\n if (r3 <= 0) goto L_0x005c\n int r1 = r0.f18500b\n if (r1 != r2) goto L_0x0049\n java.nio.ByteBuffer r4 = java.nio.ByteBuffer.wrap(r4)\n r0.f18502d = r4\n java.nio.ByteBuffer r4 = r0.f18502d\n r4.position(r2)\n goto L_0x0068\n L_0x0049:\n int r1 = r0.f18500b\n java.nio.ByteBuffer r1 = java.nio.ByteBuffer.allocate(r1)\n r0.f18502d = r1\n java.nio.ByteBuffer r1 = r0.f18502d\n r1.put(r4)\n goto L_0x0068\n L_0x005c:\n java.nio.ByteBuffer r4 = java.nio.ByteBuffer.wrap(r4, r1, r2)\n goto L_0x0065\n L_0x0061:\n java.nio.ByteBuffer r4 = java.nio.ByteBuffer.allocate(r1)\n L_0x0065:\n r0.f18502d = r4\n L_0x0068:\n boolean r4 = m23372b(r0)\n if (r4 == 0) goto L_0x006f\n return r0\n L_0x006f:\n int r4 = r0.f18500b\n if (r4 <= 0) goto L_0x007d\n android.util.SparseArray<com.qiyukf.nimlib.f.a.a> r4 = f18504a\n int r1 = r0.f18499a\n r4.put(r1, r0)\n goto L_0x00a2\n L_0x007d:\n android.util.SparseArray<com.qiyukf.nimlib.f.a.a> r4 = f18504a\n int r1 = r0.f18499a\n java.lang.Object r4 = r4.get(r1)\n com.qiyukf.nimlib.f.a.a r4 = (com.qiyukf.nimlib.p470f.p471a.C5826a) r4\n if (r4 == 0) goto L_0x00a2\n java.nio.ByteBuffer r1 = r4.f18502d\n java.nio.ByteBuffer r0 = r0.f18502d\n r1.put(r0)\n boolean r0 = m23372b(r4)\n if (r0 == 0) goto L_0x00a2\n android.util.SparseArray<com.qiyukf.nimlib.f.a.a> r0 = f18504a\n int r1 = r4.f18499a\n r0.remove(r1)\n return r4\n L_0x00a2:\n r4 = 0\n return r4\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.qiyukf.nimlib.p470f.p471a.C5826a.C5829b.m23369a(android.os.Parcel):com.qiyukf.nimlib.f.a.a\");\n }",
"public final void writeToParcel(Parcel parcel, int i) {\n int a = see.m35030a(parcel);\n see.m35063b(parcel, 1, this.f10667a);\n see.m35046a(parcel, 2, this.f10668b, false);\n see.m35040a(parcel, 3, this.f10669c, i, false);\n see.m35052a(parcel, 4, this.f10670d, false);\n see.m35051a(parcel, 5, this.f10671e);\n see.m35062b(parcel, a);\n }",
"public final Object mo20825d(Parcel parcel) {\n AppMethodBeat.m2504i(126195);\n C1196a c1196a = new C1196a();\n c1196a.fsJ = (C1331a) C18509c.m28812a(C45414d.class.getName(), parcel);\n if (C4996ah.bqo()) {\n try {\n c1196a.fsK = (C1331a) Class.forName(parcel.readString()).newInstance();\n } catch (Exception e) {\n C4990ab.m7413e(\"MicroMsg.XIPC.CommReqRespTransfer\", \"readFromParcel, mm process initiate resp e = %s\", e);\n c1196a.fsK = new C1331a();\n }\n } else {\n C1331a c1331a = (C1331a) C18509c.m28812a(C45414d.class.getName(), parcel);\n if (c1331a == null) {\n c1331a = new C1331a();\n }\n c1196a.fsK = c1331a;\n }\n c1196a.uri = parcel.readString();\n c1196a.fsI = parcel.readInt();\n c1196a.fsL = parcel.readInt();\n c1196a.fsM = parcel.readInt();\n c1196a.azs = parcel.readInt();\n C7472b acD = c1196a.acD();\n AppMethodBeat.m2505o(126195);\n return acD;\n }"
] | [
"0.64883214",
"0.64556426",
"0.63445616",
"0.6310425",
"0.62709063",
"0.6211469",
"0.6196571",
"0.6168421",
"0.6141888",
"0.6130528",
"0.6121407",
"0.60966617",
"0.60966617",
"0.60695106",
"0.60225034",
"0.5941967",
"0.5922949",
"0.5907245",
"0.5864976",
"0.5844924",
"0.5768916",
"0.5762472",
"0.5716178",
"0.5703222",
"0.57013744",
"0.5678682",
"0.5654356",
"0.5651102",
"0.5610421",
"0.5605322",
"0.5602446",
"0.55769503",
"0.55492646",
"0.5523471",
"0.5518641",
"0.5513394",
"0.55071807",
"0.5495914",
"0.54939216",
"0.5488508",
"0.54764754",
"0.5469256",
"0.5458113",
"0.5457911",
"0.54274553",
"0.5419894",
"0.54141074",
"0.5409729",
"0.5402829",
"0.53974265",
"0.53876925",
"0.5385859",
"0.5379587",
"0.5366091",
"0.53410625",
"0.5334742",
"0.533409",
"0.5328491",
"0.5314966",
"0.53124654",
"0.5310327",
"0.53071487",
"0.5295056",
"0.5279382",
"0.52777565",
"0.52755654",
"0.52739745",
"0.5271326",
"0.526284",
"0.526209",
"0.5255444",
"0.5253914",
"0.52036697",
"0.51915514",
"0.5191286",
"0.517983",
"0.5179404",
"0.51721585",
"0.5168868",
"0.51565725",
"0.51527244",
"0.5147891",
"0.51453865",
"0.514435",
"0.51335025",
"0.5132487",
"0.51305556",
"0.5126592",
"0.5122147",
"0.5118028",
"0.5110593",
"0.5109798",
"0.5102618",
"0.50960416",
"0.5086218",
"0.50799006",
"0.50714934",
"0.50700784",
"0.5066541",
"0.5065822",
"0.50656915"
] | 0.0 | -1 |
Gets the track type. | @MediaTrackType
public int getTrackType() {
return mTrackType;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String trackingType() {\n return this.trackingType;\n }",
"public TrackDescriptor getTrackDescriptor();",
"public static String getType() {\n\t\treturn type;\n\t}",
"public String getType() {\n return (String) getObject(\"type\");\n }",
"public final String type() {\n return type;\n }",
"String getType() {\n return type;\n }",
"public String getType()\n\t\t{\n\t\t\tElement typeElement = XMLUtils.findChild(mediaElement, TYPE_ELEMENT_NAME);\n\t\t\treturn typeElement == null ? null : typeElement.getTextContent();\n\t\t}",
"public String getType() {\n return _type;\n }",
"public Track getTrack() {\n\n return track;\n }",
"public String getType()\r\n {\r\n return type;\r\n }",
"public String getType()\n {\n return type;\n }",
"public synchronized String getType() {\n\t\treturn type;\n\t}",
"public String getType()\n {\n return type;\n }",
"public String getType()\n {\n return type;\n }",
"public String getType()\n {\n return type;\n }",
"public String getType()\n {\n return type;\n }",
"public String getType()\n {\n return type;\n }",
"public String getType()\n {\n return type;\n }",
"public String getType() {\r\n return type;\r\n }",
"public String getType() {\r\n return type;\r\n }",
"public String getType() {\r\n return type;\r\n }",
"public String getType() {\r\n return type;\r\n }",
"public String getType() {\r\n return type;\r\n }",
"public String getType() {\n\t\treturn _type;\n\t}",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getTYPE() {\n return TYPE;\n }",
"public int getType()\n {\n return pref.getInt(KEY_TYPE, 0);\n }",
"public String getType() {\r\n\t\treturn type_;\r\n\t}",
"public String getType () {\n return type;\n }",
"public String getType () {\n return type;\n }",
"public String getType () {\n return type;\n }",
"public java.lang.String getType()\n {\n return m_type;\n }",
"public String getType() {\r\n return type;\r\n }",
"public String getType() {\r\n return type;\r\n }",
"public String getType() \n {\n return type;\n }",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();"
] | [
"0.7200298",
"0.6333263",
"0.62594664",
"0.6256712",
"0.62003434",
"0.6193236",
"0.61529624",
"0.61504954",
"0.61494213",
"0.6139389",
"0.6137441",
"0.61351514",
"0.61235136",
"0.61235136",
"0.61235136",
"0.61235136",
"0.61235136",
"0.61235136",
"0.60899836",
"0.60899836",
"0.60899836",
"0.60899836",
"0.60899836",
"0.6089048",
"0.608722",
"0.608722",
"0.608722",
"0.608722",
"0.608722",
"0.608722",
"0.608722",
"0.608722",
"0.608722",
"0.608722",
"0.608722",
"0.608722",
"0.608722",
"0.608722",
"0.608722",
"0.608722",
"0.608722",
"0.608722",
"0.608722",
"0.608722",
"0.608722",
"0.608722",
"0.608722",
"0.608722",
"0.608722",
"0.608722",
"0.608722",
"0.608722",
"0.608722",
"0.608722",
"0.608722",
"0.608722",
"0.608722",
"0.608722",
"0.608722",
"0.608722",
"0.608722",
"0.608722",
"0.608722",
"0.608722",
"0.608722",
"0.608722",
"0.608722",
"0.608722",
"0.6085222",
"0.607606",
"0.60753757",
"0.6069695",
"0.6069176",
"0.6069176",
"0.6069176",
"0.60677826",
"0.6065079",
"0.60622203",
"0.60605097",
"0.6058262",
"0.6058262",
"0.6058262",
"0.6058262",
"0.6058262",
"0.6058262",
"0.6058262",
"0.6058262",
"0.6058262",
"0.6058262",
"0.6058262",
"0.6058262",
"0.6058262",
"0.6058262",
"0.6058262",
"0.6058262",
"0.6058262",
"0.6058262",
"0.6058262",
"0.6058262",
"0.6058262"
] | 0.7527398 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.