code
stringlengths
3
1.01M
repo_name
stringlengths
5
116
path
stringlengths
3
311
language
stringclasses
30 values
license
stringclasses
15 values
size
int64
3
1.01M
/**************************************************************************** MultiList.c This file contains the implementation of the Picasso List widget. Its functionality is intended to be similar to The Athena List widget, with some extra features added. This code is loosely based on the Athena List source which is why the MIT copyright notice appears below. The code was changed substantially in V3.4 to change the action/callback interface which was unnecessarily ugly. Code using some features of the old interface may need to be changed. Hope the changes don't make people's lives too miserable. ****************************************************************************/ /* * Author: * Brian Totty * Department of Computer Science * University Of Illinois at Urbana-Champaign * 1304 West Springfield Avenue * Urbana, IL 61801 * * totty@cs.uiuc.edu * */ /* * Copyright 1989 Massachusetts Institute of Technology * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that * copyright notice and this permission notice appear in supporting * documentation, and that the name of M.I.T. not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. M.I.T. makes no representations about the * suitability of this software for any purpose. It is provided "as is" * without express or implied warranty. * * M.I.T. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL M.I.T. * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * * Original Athena Author: Chris D. Peterson, MIT X Consortium */ #include <stdio.h> #ifndef NOSTDHDRS #include <stdlib.h> #endif #include <ctype.h> #include <X11/IntrinsicP.h> #include <X11/StringDefs.h> #include "MultiListP.h" /*===========================================================================* D E C L A R A T I O N S A N D D E F I N I T I O N S *===========================================================================*/ Pixmap XmuCreateStippledPixmap(); extern void XawInitializeWidgetSet(); #define SUPERCLASS &(simpleClassRec) #define FontAscent(f) ((f)->max_bounds.ascent) #define FontDescent(f) ((f)->max_bounds.descent) #define FontH(f) (FontAscent(f) + FontDescent(f) + 2) #define FontW(f,s) (XTextWidth(f,s,strlen(s)) + 1) #define FontMaxCharW(f) ((f)->max_bounds.rbearing-(f)->min_bounds.lbearing+1) #ifndef abs #define abs(a) ((a) < 0 ? -(a) : (a)) #endif #define max(a,b) ((a) > (b) ? (a) : (b)) #define min(a,b) ((a) < (b) ? (a) : (b)) #define XtStrlen(s) ((s) ? strlen(s) : 0) #define TypeAlloc(t,n) (t *)malloc(sizeof(t) * n) #define StrCopy(s) strcpy(TypeAlloc(char,strlen(s)+1),s) #define StrCopyRetLength(s,lp) strcpy(TypeAlloc(char,(*lp=(strlen(s)+1))),s) #define CoreFieldOffset(f) XtOffset(Widget,core.f) #define SimpleFieldOffset(f) XtOffset(XfwfMultiListWidget,simple.f) #define MultiListFieldOffset(f) XtOffset(XfwfMultiListWidget,multiList.f) /*===========================================================================* I N T E R N A L P R O C E D U R E D E C L A R A T I O N S *===========================================================================*/ #if (!NeedFunctionPrototypes) static void Initialize(); static void Redisplay(); static XtGeometryResult PreferredGeometry(); static void Resize(); static Boolean SetValues(); static void DestroyOldData(); static void InitializeNewData(); static void CreateNewGCs(); static void RecalcCoords(); static void NegotiateSizeChange(); static Boolean Layout(); static void RedrawAll(); static void RedrawItem(); static void RedrawRowColumn(); static void PixelToRowColumn(); static void RowColumnToPixels(); static Boolean RowColumnToItem(); static Boolean ItemToRowColumn(); static void Select(); static void Unselect(); static void Toggle(); static void Extend(); static void Notify(); #else static void Initialize(Widget request, Widget new); static void Redisplay(XfwfMultiListWidget mlw, XEvent *event, Region rectangle_union); static XtGeometryResult PreferredGeometry(XfwfMultiListWidget mlw, XtWidgetGeometry *parent_idea, XtWidgetGeometry *our_idea); static void Resize(XfwfMultiListWidget mlw); static Boolean SetValues(XfwfMultiListWidget cpl, XfwfMultiListWidget rpl, XfwfMultiListWidget npl); static void DestroyOldData(XfwfMultiListWidget mlw); static void InitializeNewData(XfwfMultiListWidget mlw); static void CreateNewGCs(XfwfMultiListWidget mlw); static void RecalcCoords(XfwfMultiListWidget mlw, Boolean width_changeable, Boolean height_changeable); static void NegotiateSizeChange(XfwfMultiListWidget mlw, Dimension width, Dimension height); static Boolean Layout(XfwfMultiListWidget mlw, Boolean w_changeable, Boolean h_changeable, Dimension *w_ptr, Dimension *h_ptr); static void RedrawAll(XfwfMultiListWidget mlw); static void RedrawItem(XfwfMultiListWidget mlw, int item_index); static void RedrawRowColumn(XfwfMultiListWidget mlw, int row, int column); static void PixelToRowColumn(XfwfMultiListWidget mlw, int x, int y, int *row_ptr, int *column_ptr); static void RowColumnToPixels(XfwfMultiListWidget mlw, int row, int col, int *x_ptr, int *y_ptr, int *w_ptr, int *h_ptr); static Boolean RowColumnToItem(XfwfMultiListWidget mlw, int row, int column, int *item_ptr); static Boolean ItemToRowColumn(XfwfMultiListWidget mlw, int item_index, int *row_ptr, int *column_ptr); static void Select(XfwfMultiListWidget mlw, XEvent *event, String *params, Cardinal *num_params); static void Unselect(XfwfMultiListWidget mlw, XEvent *event, String *params, Cardinal *num_params); static void Toggle(XfwfMultiListWidget mlw, XEvent *event, String *params, Cardinal *num_params); static void Extend(XfwfMultiListWidget mlw, XEvent *event, String *params, Cardinal *num_params); static void Notify(XfwfMultiListWidget mlw, XEvent *event, String *params, Cardinal *num_params); #endif /*===========================================================================* R E S O U R C E I N I T I A L I Z A T I O N *===========================================================================*/ static XtResource resources[] = { {XtNwidth, XtCWidth, XtRDimension, sizeof(Dimension), CoreFieldOffset(width), XtRString, "0"}, {XtNheight, XtCHeight, XtRDimension, sizeof(Dimension), CoreFieldOffset(height), XtRString, "0"}, {XtNbackground, XtCBackground, XtRPixel, sizeof(Pixel), CoreFieldOffset(background_pixel),XtRString,"XtDefaultBackground"}, {XtNcursor, XtCCursor, XtRCursor, sizeof(Cursor), SimpleFieldOffset(cursor), XtRString, "left_ptr"}, {XtNforeground, XtCForeground, XtRPixel, sizeof(Pixel), MultiListFieldOffset(foreground), XtRString,"XtDefaultForeground"}, {XtNhighlightForeground, XtCHForeground, XtRPixel, sizeof(Pixel), MultiListFieldOffset(highlight_fg), XtRString, "XtDefaultBackground"}, {XtNhighlightBackground, XtCHBackground, XtRPixel, sizeof(Pixel), MultiListFieldOffset(highlight_bg), XtRString, "XtDefaultForeground"}, {XtNcolumnSpacing, XtCSpacing, XtRDimension, sizeof(Dimension), MultiListFieldOffset(column_space), XtRImmediate, (caddr_t)8}, {XtNrowSpacing, XtCSpacing, XtRDimension, sizeof(Dimension), MultiListFieldOffset(row_space), XtRImmediate, (caddr_t)0}, {XtNdefaultColumns, XtCColumns, XtRInt, sizeof(int), MultiListFieldOffset(default_cols), XtRImmediate, (caddr_t)1}, {XtNforceColumns, XtCColumns, XtRBoolean, sizeof(Boolean), MultiListFieldOffset(force_cols), XtRString, (caddr_t) "False"}, {XtNpasteBuffer, XtCBoolean, XtRBoolean, sizeof(Boolean), MultiListFieldOffset(paste), XtRString, (caddr_t) "False"}, {XtNverticalList, XtCBoolean, XtRBoolean, sizeof(Boolean), MultiListFieldOffset(row_major), XtRString, (caddr_t) "False"}, {XtNlongest, XtCLongest, XtRInt, sizeof(int), MultiListFieldOffset(longest), XtRImmediate, (caddr_t)0}, {XtNnumberStrings, XtCNumberStrings, XtRInt, sizeof(int), MultiListFieldOffset(nitems), XtRImmediate, (caddr_t)0}, {XtNfont, XtCFont, XtRFontStruct, sizeof(XFontStruct *), MultiListFieldOffset(font),XtRString, "XtDefaultFont"}, {XtNlist, XtCList, XtRPointer, sizeof(char **), MultiListFieldOffset(list), XtRString, NULL}, {XtNsensitiveArray, XtCList, XtRPointer, sizeof(Boolean *), MultiListFieldOffset(sensitive_array), XtRString, NULL}, {XtNcallback, XtCCallback, XtRCallback, sizeof(caddr_t), MultiListFieldOffset(callback), XtRCallback, NULL}, {XtNmaxSelectable, XtCValue, XtRInt, sizeof(int), MultiListFieldOffset(max_selectable), XtRImmediate, (caddr_t) 1}, {XtNshadeSurplus, XtCBoolean, XtRBoolean, sizeof(Boolean), MultiListFieldOffset(shade_surplus), XtRString, "True"}, {XtNcolumnWidth, XtCValue, XtRDimension, sizeof(Dimension), MultiListFieldOffset(col_width), XtRImmediate, (caddr_t)0}, {XtNrowHeight, XtCValue, XtRDimension, sizeof(Dimension), MultiListFieldOffset(row_height), XtRImmediate, (caddr_t)0}, }; /*===========================================================================* A C T I O N A N D T R A N S L A T I O N T A B L E S *===========================================================================*/ static char defaultTranslations[] = " Shift <Btn1Down>: Toggle()\n\ Ctrl <Btn1Down>: Unselect()\n\ <Btn1Down>: Select()\n\ Button1 <Btn1Motion>: Extend()\n\ <Btn1Up>: Notify()"; static XtActionsRec actions[] = { {"Select", (XtActionProc)Select}, {"Unselect", (XtActionProc)Unselect}, {"Toggle", (XtActionProc)Toggle}, {"Extend", (XtActionProc)Extend}, {"Notify", (XtActionProc)Notify}, {NULL, (XtActionProc)NULL} }; /*===========================================================================* C L A S S A L L O C A T I O N *===========================================================================*/ XfwfMultiListClassRec xfwfMultiListClassRec = { { /* superclass */ (WidgetClass)SUPERCLASS, /* class_name */ "XfwfMultiList", /* widget_size */ sizeof(XfwfMultiListRec), /* class_initialize */ NULL, /* class_part_initialize*/ NULL, /* class_inited */ FALSE, /* initialize */ (XtInitProc)Initialize, /* initialize_hook */ NULL, /* realize */ XtInheritRealize, /* actions */ actions, /* num_actions */ XtNumber(actions), /* resources */ resources, /* resource_count */ XtNumber(resources), /* xrm_class */ NULLQUARK, /* compress_motion */ TRUE, /* compress_exposure */ FALSE, /* compress_enterleave */ TRUE, /* visible_interest */ FALSE, /* destroy */ NULL, /* resize */ (XtWidgetProc)Resize, /* expose */ (XtExposeProc)Redisplay, /* set_values */ (XtSetValuesFunc)SetValues, /* set_values_hook */ NULL, /* set_values_almost */ XtInheritSetValuesAlmost, /* get_values_hook */ NULL, /* accept_focus */ NULL, /* version */ XtVersion, /* callback_private */ NULL, /* tm_table */ defaultTranslations, /* query_geometry */ (XtGeometryHandler) PreferredGeometry, /* display_accelerator */ XtInheritDisplayAccelerator, /* extension */ NULL }, /* Core Part */ { /* change_sensitive */ XtInheritChangeSensitive } }; WidgetClass xfwfMultiListWidgetClass = (WidgetClass)&xfwfMultiListClassRec; /*===========================================================================* T O O L K I T M E T H O D S *===========================================================================*/ /*---------------------------------------------------------------------------* Initialize() This procedure is called by the X toolkit to initialize the widget instance. The hook to this routine is in the initialize part of the core part of the class. *---------------------------------------------------------------------------*/ /* ARGSUSED */ static void Initialize(request,new) Widget request,new; { XfwfMultiListWidget mlw; mlw = (XfwfMultiListWidget)new; CreateNewGCs(mlw); InitializeNewData(mlw); RecalcCoords(mlw,(MultiListWidth(mlw) == 0), (MultiListHeight(mlw) == 0)); } /* Initialize */ /*---------------------------------------------------------------------------* Redisplay(mlw,event,rectangle_union) This routine redraws the MultiList widget <mlw> based on the exposure region requested in <event>. *---------------------------------------------------------------------------*/ /* ARGSUSED */ static void Redisplay(mlw,event,rectangle_union) XfwfMultiListWidget mlw; XEvent *event; Region rectangle_union; { GC shade_gc; int i,x1,y1,w,h,x2,y2,row,col,ul_row,ul_col,lr_row,lr_col; if (MultiListShadeSurplus(mlw)) shade_gc = MultiListGrayGC(mlw); else shade_gc = MultiListEraseGC(mlw); if (event == NULL) { XFillRectangle(XtDisplay(mlw),XtWindow(mlw),shade_gc,0,0, MultiListWidth(mlw),MultiListHeight(mlw)); for (i = 0; i < MultiListNumItems(mlw); i++) RedrawItem(mlw,i); } else { x1 = event->xexpose.x; y1 = event->xexpose.y; w = event->xexpose.width; h = event->xexpose.height; x2 = x1 + w; y2 = y1 + h; XFillRectangle(XtDisplay(mlw),XtWindow(mlw), shade_gc,x1,y1,w,h); PixelToRowColumn(mlw,x1,y1,&ul_row,&ul_col); PixelToRowColumn(mlw,x2,y2,&lr_row,&lr_col); lr_row = min(lr_row,MultiListNumRows(mlw) - 1); lr_col = min(lr_col,MultiListNumCols(mlw) - 1); for (col = ul_col; col <= lr_col; col++) { for (row = ul_row; row <= lr_row; row++) { RedrawRowColumn(mlw,row,col); } } } } /* End Redisplay */ /*---------------------------------------------------------------------------* PreferredGeometry(mlw,parent_idea,our_idea) This routine is called by the parent to tell us about the parent's idea of our width and/or height. We then suggest our preference through <our_idea> and return the information to the parent. *---------------------------------------------------------------------------*/ static XtGeometryResult PreferredGeometry(mlw,parent_idea,our_idea) XfwfMultiListWidget mlw; XtWidgetGeometry *parent_idea,*our_idea; { Dimension nw,nh; Boolean parent_wants_w,parent_wants_h,we_changed_size; parent_wants_w = (parent_idea->request_mode) & CWWidth; parent_wants_h = (parent_idea->request_mode) & CWHeight; if (parent_wants_w) nw = parent_idea->width; else nw = MultiListWidth(mlw); if (parent_wants_h) nh = parent_idea->height; else nh = MultiListHeight(mlw); our_idea->request_mode = 0; if (!parent_wants_w && !parent_wants_h) return(XtGeometryYes); we_changed_size = Layout(mlw,!parent_wants_w,!parent_wants_h,&nw,&nh); our_idea->request_mode |= (CWWidth | CWHeight); our_idea->width = nw; our_idea->height = nh; if (we_changed_size) return(XtGeometryAlmost); else return(XtGeometryYes); } /* End PreferredGeometry */ /*---------------------------------------------------------------------------* Resize(mlw) This function is called when the widget is being resized. It recalculates the layout of the widget. *---------------------------------------------------------------------------*/ static void Resize(mlw) XfwfMultiListWidget mlw; { Dimension width,height; width = MultiListWidth(mlw); height = MultiListHeight(mlw); Layout(mlw,False,False,&width,&height); } /* End Resize */ /*---------------------------------------------------------------------------* SetValues(cpl,rpl,npl) This routine is called when the user is changing resources. <cpl> is the current widget before the user's changes have been instituted. <rpl> includes the original changes as requested by the user. <npl> is the new resulting widget with the requested changes and with all superclass changes already made. *---------------------------------------------------------------------------*/ /*ARGSUSED*/ static Boolean SetValues(cpl,rpl,npl) XfwfMultiListWidget cpl,rpl,npl; { Boolean redraw,recalc; redraw = False; recalc = False; /* Graphic Context Changes */ if ((MultiListFG(cpl) != MultiListFG(npl)) || (MultiListBG(cpl) != MultiListBG(npl)) || (MultiListHighlightFG(cpl) != MultiListHighlightFG(npl)) || (MultiListHighlightBG(cpl) != MultiListHighlightBG(npl)) || (MultiListFont(cpl) != MultiListFont(npl))) { XtDestroyGC(MultiListEraseGC(cpl)); XtDestroyGC(MultiListDrawGC(cpl)); XtDestroyGC(MultiListHighlightForeGC(cpl)); XtDestroyGC(MultiListHighlightBackGC(cpl)); XtDestroyGC(MultiListGrayGC(cpl)); CreateNewGCs(npl); redraw = True; } /* Changes That Require Redraw */ if ((MultiListSensitive(cpl) != MultiListSensitive(npl)) || (MultiListAncesSensitive(cpl) != MultiListAncesSensitive(npl))) { redraw = True; } /* Changes That Require Selection Changes */ if ((MultiListMaxSelectable(cpl) != MultiListMaxSelectable(npl))) { XtWarning("Dynamic change to maxSelectable unimplemented"); } /* Changes That Require Data Initialization */ if ((MultiListList(cpl) != MultiListList(npl)) || (MultiListNumItems(cpl) != MultiListNumItems(npl)) || (MultiListSensitiveArray(cpl) != MultiListSensitiveArray(npl))) { DestroyOldData(cpl); InitializeNewData(npl); recalc = True; redraw = True; } /* Changes That Require Recalculating Coordinates */ if ((MultiListWidth(cpl) != MultiListWidth(npl)) || (MultiListHeight(cpl) != MultiListHeight(npl)) || (MultiListColumnSpace(cpl) != MultiListColumnSpace(npl)) || (MultiListRowSpace(cpl) != MultiListRowSpace(npl)) || (MultiListDefaultCols(cpl) != MultiListDefaultCols(npl)) || ((MultiListForceCols(cpl) != MultiListForceCols(npl)) && (MultiListNumCols(cpl) != MultiListNumCols(npl))) || (MultiListRowMajor(cpl) != MultiListRowMajor(npl)) || (MultiListFont(cpl) != MultiListFont(npl)) || (MultiListLongest(cpl) != MultiListLongest(npl))) { recalc = True; redraw = True; } if (MultiListColWidth(cpl) != MultiListColWidth(npl)) { XtWarning("columnWidth Resource Is Read-Only"); MultiListColWidth(npl) = MultiListColWidth(cpl); } if (MultiListRowHeight(cpl) != MultiListRowHeight(npl)) { XtWarning("rowHeight Resource Is Read-Only"); MultiListRowHeight(npl) = MultiListRowHeight(cpl); } if (recalc) { RecalcCoords(npl,!MultiListWidth(npl),!MultiListHeight(npl)); } if (!XtIsRealized((Widget)cpl)) return(False); else return(redraw); } /* End SetValues */ /*===========================================================================* D A T A I N I T I A L I Z A T I O N *===========================================================================*/ /*---------------------------------------------------------------------------* DestroyOldData(mlw) This routine frees the internal list item array and sets the item count to 0. This is normally done immediately before calling InitializeNewData() to rebuild the internal item array from new user specified arrays. *---------------------------------------------------------------------------*/ static void DestroyOldData(mlw) XfwfMultiListWidget mlw; { int i; if (MultiListItemArray(mlw) != NULL) /* Free Old List */ { for (i = 0; i < MultiListNumItems(mlw); i++) { free(MultiListItemString(MultiListNthItem(mlw,i))); } free((char *)MultiListItemArray(mlw)); } if (MultiListSelArray(mlw) != NULL) free((char *)MultiListSelArray(mlw)); MultiListSelArray(mlw) = NULL; MultiListNumSelected(mlw) = 0; MultiListItemArray(mlw) = NULL; MultiListNumItems(mlw) = 0; } /* End DestroyOldData */ /*---------------------------------------------------------------------------* InitializeNewData(mlw) This routine takes a MultiList widget <mlw> and builds up new data item tables based on the string list and the sensitivity array. All previous data should have already been freed. If the number of items is 0, they will be counted, so the array must be NULL terminated. If the list of strings is NULL, this is treated as a list of 0 elements. If the sensitivity array is NULL, all items are treated as sensitive. When this routine is done, the string list and sensitivity array fields will all be set to NULL, and the widget will not reference them again. *---------------------------------------------------------------------------*/ static void InitializeNewData(mlw) XfwfMultiListWidget mlw; { int i; XfwfMultiListItem *item; String *string_array; string_array = MultiListList(mlw); if (string_array == NULL) MultiListNumItems(mlw) = 0; if (MultiListNumItems(mlw) == 0) /* Count Elements */ { if (string_array == NULL) /* No elements */ { MultiListNumItems(mlw) = 0; } else { for (i = 0; string_array[i] != NULL; i++); MultiListNumItems(mlw) = i; } } if (MultiListNumItems(mlw) == 0) /* No Items */ { MultiListItemArray(mlw) = NULL; } else { MultiListItemArray(mlw) = TypeAlloc(XfwfMultiListItem,MultiListNumItems(mlw)); for (i = 0; i < MultiListNumItems(mlw); i++) { item = MultiListNthItem(mlw,i); if (MultiListSensitiveArray(mlw) == NULL || (MultiListSensitiveArray(mlw)[i] == True)) { MultiListItemSensitive(item) = True; } else { MultiListItemSensitive(item) = False; } MultiListItemString(item) = StrCopy(string_array[i]); MultiListItemHighlighted(item) = False; } } if (MultiListMaxSelectable(mlw) == 0) { MultiListSelArray(mlw) = NULL; MultiListNumSelected(mlw) = 0; } else { MultiListSelArray(mlw) = TypeAlloc(int,MultiListMaxSelectable(mlw)); MultiListNumSelected(mlw) = 0; } MultiListList(mlw) = NULL; MultiListSensitiveArray(mlw) = NULL; } /* End InitializeNewData */ /*---------------------------------------------------------------------------* CreateNewGCs(mlw) This routine takes a MultiList widget <mlw> and creates a new set of graphic contexts for the widget based on the colors, fonts, etc. in the widget. Any previous GCs are assumed to have already been destroyed. *---------------------------------------------------------------------------*/ static void CreateNewGCs(mlw) XfwfMultiListWidget mlw; { XGCValues values; unsigned int attribs; attribs = GCForeground | GCBackground | GCFont; values.foreground = MultiListFG(mlw); values.background = MultiListBG(mlw); values.font = MultiListFont(mlw)->fid; MultiListDrawGC(mlw) = XtGetGC((Widget)mlw,attribs,&values); values.foreground = MultiListBG(mlw); MultiListEraseGC(mlw) = XtGetGC((Widget)mlw,attribs,&values); values.foreground = MultiListHighlightFG(mlw); values.background = MultiListHighlightBG(mlw); MultiListHighlightForeGC(mlw) = XtGetGC((Widget)mlw,attribs,&values); values.foreground = MultiListHighlightBG(mlw); values.background = MultiListHighlightBG(mlw); MultiListHighlightBackGC(mlw) = XtGetGC((Widget)mlw,attribs,&values); attribs |= GCTile | GCFillStyle; values.foreground = MultiListFG(mlw); values.background = MultiListBG(mlw); values.fill_style = FillTiled; values.tile = XmuCreateStippledPixmap(XtScreen(mlw),MultiListFG(mlw), MultiListBG(mlw),MultiListDepth(mlw)); MultiListGrayGC(mlw) = XtGetGC((Widget)mlw,attribs,&values); } /* End CreateNewGCs */ /*===========================================================================* L A Y O U T A N D G E O M E T R Y M A N A G E M E N T *===========================================================================*/ /*---------------------------------------------------------------------------* RecalcCoords(mlw,width_changeable,height_changeable) This routine takes a MultiList widget <mlw> and recalculates the coordinates, and item placement based on the current width, height, and list of items. The <width_changeable> and <height_changeable> indicate if the width and/or height can be arbitrarily set. This routine requires that the internal list data be initialized. *---------------------------------------------------------------------------*/ #if NeedFunctionPrototypes static void RecalcCoords(XfwfMultiListWidget mlw, Boolean width_changeable, Boolean height_changeable) #else static void RecalcCoords(mlw,width_changeable,height_changeable) XfwfMultiListWidget mlw; Boolean width_changeable,height_changeable; #endif { String str; Dimension width,height; register int i,text_width; width = MultiListWidth(mlw); height = MultiListHeight(mlw); if (MultiListNumItems(mlw) != 0 && MultiListLongest(mlw) == 0) { for (i = 0; i < MultiListNumItems(mlw); i++) { str = MultiListItemString(MultiListNthItem(mlw,i)); text_width = FontW(MultiListFont(mlw),str); MultiListLongest(mlw) = max(MultiListLongest(mlw), text_width); } } if (Layout(mlw,width_changeable,height_changeable,&width,&height)) { NegotiateSizeChange(mlw,width,height); } } /* End RecalcCoords */ /*---------------------------------------------------------------------------* NegotiateSizeChange(mlw,width,height) This routine tries to change the MultiList widget <mlw> to have the new size <width> by <height>. A negotiation will takes place to try to change the size. The resulting size is not necessarily the requested size. *---------------------------------------------------------------------------*/ #if NeedFunctionPrototypes static void NegotiateSizeChange(XfwfMultiListWidget mlw, Dimension width, Dimension height) #else static void NegotiateSizeChange(mlw,width,height) XfwfMultiListWidget mlw; Dimension width,height; #endif { int attempt_number; Boolean w_fixed,h_fixed; Dimension *w_ptr,*h_ptr; XtWidgetGeometry request,reply; request.request_mode = CWWidth | CWHeight; request.width = width; request.height = height; for (attempt_number = 1; attempt_number <= 3; attempt_number++) { switch (XtMakeGeometryRequest((Widget)mlw,&request,&reply)) { case XtGeometryYes: case XtGeometryNo: return; case XtGeometryAlmost: switch (attempt_number) { case 1: w_fixed = (request.width != reply.width); h_fixed = (request.height != reply.height); w_ptr = &(reply.width); h_ptr = &(reply.height); Layout(mlw,!w_fixed,!h_fixed,w_ptr,h_ptr); break; case 2: w_ptr = &(reply.width); h_ptr = &(reply.height); Layout(mlw,False,False,w_ptr,h_ptr); break; case 3: return; } break; default: XtAppWarning(XtWidgetToApplicationContext((Widget)mlw), "MultiList Widget: Unknown geometry return."); break; } request = reply; } } /* End NegotiateSizeChange */ /*---------------------------------------------------------------------------* Boolean Layout(mlw,w_changeable,h_changeable,w_ptr,h_ptr) This routine tries to generate a layout for the MultiList widget <mlw>. The Layout routine is free to arbitrarily set the width or height if the corresponding variables <w_changeable> and <h_changeable> are set True. Otherwise the original width or height in <w_ptr> and <h_ptr> are used as fixed values. The resulting new width and height are stored back through the <w_ptr> and <h_ptr> pointers. False is returned if no size change was done, True is returned otherwise. *---------------------------------------------------------------------------*/ #if NeedFunctionPrototypes static Boolean Layout(XfwfMultiListWidget mlw, Boolean w_changeable, Boolean h_changeable, Dimension *w_ptr, Dimension *h_ptr) #else static Boolean Layout(mlw,w_changeable,h_changeable,w_ptr,h_ptr) XfwfMultiListWidget mlw; Boolean w_changeable,h_changeable; Dimension *w_ptr,*h_ptr; #endif { Boolean size_changed = False; /* * If force columns is set, then always use the number * of columns specified by default_cols. */ MultiListColWidth(mlw) = MultiListLongest(mlw) + MultiListColumnSpace(mlw); MultiListRowHeight(mlw) = FontH(MultiListFont(mlw)) + MultiListRowSpace(mlw); if (MultiListForceCols(mlw)) { MultiListNumCols(mlw) = max(MultiListDefaultCols(mlw),1); if (MultiListNumItems(mlw) == 0) MultiListNumRows(mlw) = 1; else MultiListNumRows(mlw) = (MultiListNumItems(mlw) - 1) / MultiListNumCols(mlw) + 1; if (w_changeable) { *w_ptr = MultiListNumCols(mlw) * MultiListColWidth(mlw); size_changed = True; } else { MultiListColWidth(mlw) = *w_ptr / (Dimension)MultiListNumCols(mlw); } if (h_changeable) { *h_ptr = MultiListNumRows(mlw) * MultiListRowHeight(mlw); size_changed = True; } return(size_changed); } /* * If both width and height are free to change then use * default_cols to determine the number of columns and set * the new width and height to just fit the window. */ if (w_changeable && h_changeable) { MultiListNumCols(mlw) = max(MultiListDefaultCols(mlw),1); if (MultiListNumItems(mlw) == 0) MultiListNumRows(mlw) = 1; else MultiListNumRows(mlw) = (MultiListNumItems(mlw) - 1) / MultiListNumCols(mlw) + 1; *w_ptr = MultiListNumCols(mlw) * MultiListColWidth(mlw); *h_ptr = MultiListNumRows(mlw) * MultiListRowHeight(mlw); return(True); } /* * If the width is fixed then use it to determine the * number of columns. If the height is free to move * (width still fixed) then resize the height of the * widget to fit the current MultiList exactly. */ if (!w_changeable) { MultiListNumCols(mlw) = *w_ptr / MultiListColWidth(mlw); MultiListNumCols(mlw) = max(MultiListNumCols(mlw),1); MultiListNumRows(mlw) = (MultiListNumItems(mlw) - 1) / MultiListNumCols(mlw) + 1; MultiListColWidth(mlw) = *w_ptr / (Dimension)MultiListNumCols(mlw); if (h_changeable) { *h_ptr = MultiListNumRows(mlw) * MultiListRowHeight(mlw); size_changed = True; } return(size_changed); } /* * The last case is xfree and !yfree we use the height to * determine the number of rows and then set the width to * just fit the resulting number of columns. */ MultiListNumRows(mlw) = *h_ptr / MultiListRowHeight(mlw); MultiListNumRows(mlw) = max(MultiListNumRows(mlw),1); MultiListNumCols(mlw) = (MultiListNumItems(mlw) - 1) / MultiListNumRows(mlw) + 1; *w_ptr = MultiListNumCols(mlw) * MultiListColWidth(mlw); return(True); } /* End Layout */ /*===========================================================================* R E D R A W R O U T I N E S *===========================================================================*/ /*---------------------------------------------------------------------------* RedrawAll(mlw) This routine simple calls Redisplay to redraw the entire MultiList widget <mlw>. *---------------------------------------------------------------------------*/ static void RedrawAll(mlw) XfwfMultiListWidget mlw; { Redisplay(mlw,NULL,NULL); } /* End RedrawAll */ /*---------------------------------------------------------------------------* RedrawItem(mlw,item_index) This routine redraws the item with index <item_index> in the MultiList widget <mlw>. If the item number is bad, nothing is drawn. *---------------------------------------------------------------------------*/ static void RedrawItem(mlw,item_index) XfwfMultiListWidget mlw; int item_index; { int row,column; if (ItemToRowColumn(mlw,item_index,&row,&column)) { RedrawRowColumn(mlw,row,column); } } /* End RedrawItem */ /*---------------------------------------------------------------------------* RedrawRowColumn(mlw,row,column) This routine paints the item in row/column position <row>,<column> on the MultiList widget <mlw>. If the row/column coordinates are outside the widget, nothing is drawn. If the position is empty, blank space is drawn. *---------------------------------------------------------------------------*/ static void RedrawRowColumn(mlw,row,column) XfwfMultiListWidget mlw; int row,column; { GC bg_gc,fg_gc; XfwfMultiListItem *item; int ul_x,ul_y,str_x,str_y,w,h,item_index,has_item,text_h; if (!XtIsRealized((Widget)mlw)) return; has_item = RowColumnToItem(mlw,row,column,&item_index); RowColumnToPixels(mlw,row,column,&ul_x,&ul_y,&w,&h); if (has_item == False) /* No Item */ { if (MultiListShadeSurplus(mlw)) bg_gc = MultiListGrayGC(mlw); else bg_gc = MultiListEraseGC(mlw); } else { item = MultiListNthItem(mlw,item_index); if ((!MultiListSensitive(mlw)) || (!MultiListItemSensitive(item))) /* Insensitive */ { if (MultiListItemHighlighted(item)) /* Selected */ { bg_gc = MultiListGrayGC(mlw); fg_gc = MultiListEraseGC(mlw); } else /* !Selected */ { bg_gc = MultiListEraseGC(mlw); fg_gc = MultiListGrayGC(mlw); } } else /* Sensitive */ { if (MultiListItemHighlighted(item)) /* Selected */ { bg_gc = MultiListHighlightBackGC(mlw); fg_gc = MultiListHighlightForeGC(mlw); } else /* !Selected */ { bg_gc = MultiListEraseGC(mlw); fg_gc = MultiListDrawGC(mlw); } } } XFillRectangle(XtDisplay(mlw),XtWindow(mlw),bg_gc,ul_x,ul_y,w,h); if (has_item == True) { text_h = min(FontH(MultiListFont(mlw)) + (int)MultiListRowSpace(mlw),(int)MultiListRowHeight(mlw)); str_x = ul_x + MultiListColumnSpace(mlw) / 2; str_y = ul_y + FontAscent(MultiListFont(mlw)) + ((int)MultiListRowHeight(mlw) - text_h) / 2; XDrawString(XtDisplay(mlw),XtWindow(mlw),fg_gc, str_x,str_y,MultiListItemString(item), strlen(MultiListItemString(item))); } } /* End RedrawRowColumn */ /*===========================================================================* I T E M L O C A T I O N R O U T I N E S *===========================================================================*/ /*---------------------------------------------------------------------------* void PixelToRowColumn(mlw,x,y,row_ptr,column_ptr) This routine takes pixel coordinates <x>, <y> and converts the pixel coordinate into a row/column coordinate. This row/column coordinate can then easily be converted into the specific item in the list via the function RowColumnToItem(). If the pixel lies in blank space outside of the items, the row & column numbers will be outside of the range of normal row & columns numbers, but will correspond to the row & column of the item, if an item was actually there. *---------------------------------------------------------------------------*/ static void PixelToRowColumn(mlw,x,y,row_ptr,column_ptr) XfwfMultiListWidget mlw; int x,y,*row_ptr,*column_ptr; { *row_ptr = y / (int)MultiListRowHeight(mlw); *column_ptr = x / (int)MultiListColWidth(mlw); } /* End PixelToRowColumn */ /*---------------------------------------------------------------------------* void RowColumnToPixels(mlw,row,col,x_ptr,y_ptr,w_ptr,h_ptr) This routine takes a row/column coordinate <row>,<col> and converts it into the bounding pixel rectangle which is returned. *---------------------------------------------------------------------------*/ static void RowColumnToPixels(mlw,row,col,x_ptr,y_ptr,w_ptr,h_ptr) XfwfMultiListWidget mlw; int row,col,*x_ptr,*y_ptr,*w_ptr,*h_ptr; { *x_ptr = col * MultiListColWidth(mlw); *y_ptr = row * MultiListRowHeight(mlw); *w_ptr = MultiListColWidth(mlw); *h_ptr = MultiListRowHeight(mlw); } /* End RowColumnToPixels */ /*---------------------------------------------------------------------------* Boolean RowColumnToItem(mlw,row,column,item_ptr) This routine takes a row number <row> and a column number <column> and tries to resolve this row and column into the index of the item in this position of the MultiList widget <mlw>. The resulting item index is placed through <item_ptr>. If there is no item at this location, False is returned, else True is returned. *---------------------------------------------------------------------------*/ static Boolean RowColumnToItem(mlw,row,column,item_ptr) XfwfMultiListWidget mlw; int row,column,*item_ptr; { register int x_stride,y_stride; if (row < 0 || row >= MultiListNumRows(mlw) || column < 0 || column >= MultiListNumCols(mlw)) { return(False); } if (MultiListRowMajor(mlw)) { x_stride = 1; y_stride = MultiListNumCols(mlw); } else { x_stride = MultiListNumRows(mlw); y_stride = 1; } *item_ptr = row * y_stride + column * x_stride; if (*item_ptr >= MultiListNumItems(mlw)) return(False); else return(True); } /* End RowColumnToItem */ /*---------------------------------------------------------------------------* Boolean ItemToRowColumn(mlw,item_index,row_ptr,column_ptr) This routine takes an item number <item_index> and attempts to convert the index into row and column numbers stored through <row_ptr> and <column_ptr>. If the item number does not corespond to a valid item, False is returned, else True is returned. *---------------------------------------------------------------------------*/ static Boolean ItemToRowColumn(mlw,item_index,row_ptr,column_ptr) XfwfMultiListWidget mlw; int item_index,*row_ptr,*column_ptr; { if (item_index < 0 || item_index >= MultiListNumItems(mlw)) { return(False); } if (MultiListRowMajor(mlw)) { *row_ptr = item_index / MultiListNumCols(mlw); *column_ptr = item_index % MultiListNumCols(mlw); } else { *row_ptr = item_index % MultiListNumRows(mlw); *column_ptr = item_index / MultiListNumRows(mlw); } return(True); } /* End ItemToRowColumn */ /*===========================================================================* E V E N T A C T I O N H A N D L E R S *===========================================================================*/ /*---------------------------------------------------------------------------* Select(mlw,event,params,num_params) This action handler is called when a user selects an item in the MultiList. This action first unselects all previously selected items, then selects the item under the mouse, if it is not a background gap, and if it is sensitive. The MultiListMostRecentItem(mlw) variable will be set to the item clicked on, or -1 if the item is background or insensitive. The MultiListMostRecentAct(mlw) variable will be set to XfwfMultiListActionHighlight, in case the selection region is extended. *---------------------------------------------------------------------------*/ /* ARGSUSED */ static void Select(mlw,event,params,num_params) XfwfMultiListWidget mlw; XEvent *event; String *params; Cardinal *num_params; { int click_x,click_y; int status,item_index,row,column; click_x = event->xbutton.x; click_y = event->xbutton.y; PixelToRowColumn(mlw,click_x,click_y,&row,&column); XfwfMultiListUnhighlightAll(mlw); MultiListMostRecentAct(mlw) = XfwfMultiListActionHighlight; status = RowColumnToItem(mlw,row,column,&item_index); if ((status == False) || (!MultiListItemSensitive(MultiListNthItem(mlw,item_index)))) { MultiListMostRecentItem(mlw) = -1; } else { MultiListMostRecentItem(mlw) = item_index; XfwfMultiListHighlightItem(mlw,item_index); } } /* End Select */ /*---------------------------------------------------------------------------* Unselect(mlw,event,params,num_params) This function unselects the single text item pointed to by the mouse, if any. Any remaining selected entries are left selected. The MultiListMostRecentItem(mlw) variable will be set to -1, and the MultiListMostRecentAct(mlw) variable will be set to XfwfMultiListActionUnhighlight, in case the deselection region is extended. *---------------------------------------------------------------------------*/ /* ARGSUSED */ static void Unselect(mlw,event,params,num_params) XfwfMultiListWidget mlw; XEvent *event; String *params; Cardinal *num_params; { int click_x,click_y; int status,item_index,row,column; click_x = event->xbutton.x; click_y = event->xbutton.y; PixelToRowColumn(mlw,click_x,click_y,&row,&column); MultiListMostRecentItem(mlw) = -1; MultiListMostRecentAct(mlw) = XfwfMultiListActionUnhighlight; status = RowColumnToItem(mlw,row,column,&item_index); if ((status == True) && (MultiListItemSensitive(MultiListNthItem(mlw,item_index)))) XfwfMultiListHighlightItem(mlw,item_index); } /* End Unselect */ /*---------------------------------------------------------------------------* Toggle(mlw,event,params,num_params) This action handler implements the toggling of selection status for a single item. Any remaining selected entries are left selected. If the mouse is not over a selectable text item, the MultiListMostRecentAct(mlw) variable is set to XfwfMultiListActionHighlight, in case the region is extended into selectable items later. MultiListMostRecentItem(mlw) is set to -1. If the mouse is over a selectable text item, the item highlight is toggled. If the item is currently selected, it becomes deselected. If unselected, the item becomes selected. At the same time, the MultiListMostRecentAct(mlw) variable is set to XfwfMultiListActionHighlight if the item was not previously selected, or XfwfMultiListActionUnhighlight if the item was previously selected. MultiListMostRecentItem(mlw) is set to the index of the item clicked on if the item is selected, or -1 if it is unselected. *---------------------------------------------------------------------------*/ /* ARGSUSED */ static void Toggle(mlw,event,params,num_params) XfwfMultiListWidget mlw; XEvent *event; String *params; Cardinal *num_params; { int click_x,click_y; int status,item_index,row,column; click_x = event->xbutton.x; click_y = event->xbutton.y; PixelToRowColumn(mlw,click_x,click_y,&row,&column); status = RowColumnToItem(mlw,row,column,&item_index); if ((status == False) || (!MultiListItemSensitive(MultiListNthItem(mlw,item_index)))) { MultiListMostRecentAct(mlw) = XfwfMultiListActionHighlight; MultiListMostRecentItem(mlw) = -1; } else { MultiListMostRecentAct(mlw) = XfwfMultiListToggleItem(mlw,item_index); MultiListMostRecentItem(mlw) = item_index; } } /* End Toggle */ /*---------------------------------------------------------------------------* Extend(mlw,event,params,num_params) This action handler implements the extension of a selection/ deselection region. The MultiListMostRecentAct(mlw) variable is used to determine if items are to be selected or unselected. This routine performs select or unselect actions on each item it is called on. *---------------------------------------------------------------------------*/ /* ARGSUSED */ static void Extend(mlw,event,params,num_params) XfwfMultiListWidget mlw; XEvent *event; String *params; Cardinal *num_params; { int click_x,click_y; int status,item_index,row,column; click_x = ((XMotionEvent*)event)->x; click_y = ((XMotionEvent*)event)->y; PixelToRowColumn(mlw,click_x,click_y,&row,&column); status = RowColumnToItem(mlw,row,column,&item_index); if ((status == True) && (MultiListItemSensitive(MultiListNthItem(mlw,item_index)))) { MultiListMostRecentItem(mlw) = item_index; if (MultiListMostRecentAct(mlw) == XfwfMultiListActionHighlight) XfwfMultiListHighlightItem(mlw,item_index); else XfwfMultiListUnhighlightItem(mlw,item_index); } } /* End Extend */ /*---------------------------------------------------------------------------* Notify(mlw,event,params,num_params) This function performs the Notify action, which issues a callback after a selection/unselection has completed. All callbacks on the callback list are invoked, and a XfxfMultiListReturnStruct describing the selection state is returned. In addition, if the XtNpasteBuffer resource is true and at least one text item is selected, all the selected items are placed in the X cut buffer (buf(0)) separated by newlines. *---------------------------------------------------------------------------*/ /* ARGSUSED */ static void Notify(mlw,event,params,num_params) XfwfMultiListWidget mlw; XEvent *event; String *params; Cardinal *num_params; { char *buffer; String string; int i,byte_count,item_index; XfwfMultiListReturnStruct ret_value; if ((MultiListNumSelected(mlw) != 0) && MultiListPaste(mlw)) { byte_count = 0; for (i = 0; i < MultiListNumSelected(mlw); i++) { item_index = MultiListSelArray(mlw)[i]; string = MultiListItemString(MultiListNthItem(mlw, item_index)); byte_count = byte_count + strlen(string) + 1; } buffer = (char *)malloc(byte_count); buffer[0] = '\0'; for (i = 0; i < MultiListNumSelected(mlw); i++) { if (i != 0) strcat(buffer,"\n"); item_index = MultiListSelArray(mlw)[i]; string = MultiListItemString(MultiListNthItem(mlw, item_index)); strcat(buffer,string); } XStoreBytes(XtDisplay(mlw),buffer,byte_count); free(buffer); } ret_value.action = MultiListMostRecentAct(mlw); ret_value.item = MultiListMostRecentItem(mlw); if (ret_value.item == -1) ret_value.string = NULL; else ret_value.string = MultiListItemString(MultiListNthItem(mlw, ret_value.item)); ret_value.num_selected = MultiListNumSelected(mlw); ret_value.selected_items = MultiListSelArray(mlw); XtCallCallbacks((Widget)mlw,XtNcallback,(caddr_t)&ret_value); } /* End Notify */ /*===========================================================================* U S E R C A L L A B L E U T I L I T Y R O U T I N E S *===========================================================================*/ /*---------------------------------------------------------------------------* Boolean XfwfMultiListHighlightItem(mlw,item_index) This routine selects an item with index <item_index> in the MultiList widget <mlw>. If a maximum number of selections is specified and exceeded, the earliest selection will be unselected. If <item_index> doesn't correspond to an item the most recently clicked item will be set to -1 and this routine will immediately return, otherwise the most recently clicked item will be set to the current item. If the clicked on item is not sensitive, or if the click is not on an item, False is returned, else True is returned. *---------------------------------------------------------------------------*/ Boolean XfwfMultiListHighlightItem(mlw,item_index) XfwfMultiListWidget mlw; int item_index; { XfwfMultiListItem *item; if (MultiListMaxSelectable(mlw) == 0) return(False); if (item_index < 0 || item_index >= MultiListNumItems(mlw)) { MultiListMostRecentItem(mlw) = -1; return(False); } item = MultiListNthItem(mlw,item_index); if (MultiListItemSensitive(item) == False) return(False); MultiListMostRecentItem(mlw) = item_index; if (MultiListItemHighlighted(item) == True) return(True); if (MultiListNumSelected(mlw) == MultiListMaxSelectable(mlw)) { XfwfMultiListUnhighlightItem(mlw,MultiListSelArray(mlw)[0]); } MultiListItemHighlighted(item) = True; MultiListSelArray(mlw)[MultiListNumSelected(mlw)] = item_index; ++ MultiListNumSelected(mlw); RedrawItem(mlw,item_index); return(True); } /* End XfwfMultiListHighlightItem */ /*---------------------------------------------------------------------------* XfwfMultiListHighlightAll(mlw) This routine highlights all highlightable items in the MultiList widget <mlw>, up to the maximum number of allowed highlightable items; *---------------------------------------------------------------------------*/ void XfwfMultiListHighlightAll(mlw) XfwfMultiListWidget mlw; { int i; XfwfMultiListItem *item; MultiListNumSelected(mlw) = 0; for (i = 0; i < MultiListNumItems(mlw); i++) { item = MultiListNthItem(mlw,i); MultiListItemHighlighted(item) = False; } for (i = 0; i < MultiListNumItems(mlw); i++) { if (MultiListNumSelected(mlw) == MultiListMaxSelectable(mlw)) break; item = MultiListNthItem(mlw,i); if (MultiListItemSensitive(item) == False) continue; MultiListItemHighlighted(item) = True; MultiListSelArray(mlw)[MultiListNumSelected(mlw)] = i; ++ MultiListNumSelected(mlw); } RedrawAll(mlw); } /* End XfwfMultiListHighlightAll */ /*---------------------------------------------------------------------------* XfwfMultiListUnhighlightItem(mlw,item_index) This routine unselects the item with index <item_index> in the MultiList widget <mlw>. If <item_index> doesn't correspond to a selected item, then nothing will happen. Otherwise, the item is unselected and the selection array and count are updated. *---------------------------------------------------------------------------*/ void XfwfMultiListUnhighlightItem(mlw,item_index) XfwfMultiListWidget mlw; int item_index; { int i; XfwfMultiListItem *item; if (MultiListMaxSelectable(mlw) == 0) return; if (item_index < 0 || item_index >= MultiListNumItems(mlw)) return; item = MultiListNthItem(mlw,item_index); if (MultiListItemHighlighted(item) == False) return; MultiListItemHighlighted(item) = False; for (i = 0; i < MultiListNumSelected(mlw); i++) if (MultiListSelArray(mlw)[i] == item_index) break; for (i = i + 1; i < MultiListNumSelected(mlw); i++) MultiListSelArray(mlw)[i - 1] = MultiListSelArray(mlw)[i]; -- MultiListNumSelected(mlw); RedrawItem(mlw,item_index); } /* End XfwfMultiListUnhighlightItem */ /*---------------------------------------------------------------------------* XfwfMultiListUnhighlightAll(mlw) This routine unhighlights all items in the MultiList widget <mlw>. *---------------------------------------------------------------------------*/ void XfwfMultiListUnhighlightAll(mlw) XfwfMultiListWidget mlw; { int i; XfwfMultiListItem *item; for (i = 0; i < MultiListNumItems(mlw); i++) { item = MultiListNthItem(mlw,i); if (MultiListItemHighlighted(item)) XfwfMultiListUnhighlightItem(mlw,i); } MultiListNumSelected(mlw) = 0; } /* End XfwfMultiListUnhighlightAll */ /*---------------------------------------------------------------------------* int XfwfMultiListToggleItem(mlw,item_index) This routine highlights the item with index <item_index> if it is unhighlighted and unhighlights it if it is already highlighted. The action performed by the toggle is returned (XfwfMultiListActionHighlight or XfwfMultiListActionUnhighlight). *---------------------------------------------------------------------------*/ int XfwfMultiListToggleItem(mlw,item_index) XfwfMultiListWidget mlw; int item_index; { XfwfMultiListItem *item; if (MultiListMaxSelectable(mlw) == 0) return(XfwfMultiListActionNothing); if (item_index < 0 || item_index >= MultiListNumItems(mlw)) return(XfwfMultiListActionNothing); item = MultiListNthItem(mlw,item_index); if (MultiListItemSensitive(item) == False) return(XfwfMultiListActionNothing); if (MultiListItemHighlighted(item)) { XfwfMultiListUnhighlightItem(mlw,item_index); return(XfwfMultiListActionUnhighlight); } else { XfwfMultiListHighlightItem(mlw,item_index); return(XfwfMultiListActionHighlight); } } /* End XfwfMultiListToggleItem */ /*---------------------------------------------------------------------------* XfwfMultiListReturnStruct *XfwfMultiListGetHighlighted(mlw) This routine takes a MultiList widget <mlw> and returns a XfwfMultiListReturnStruct whose num_selected and selected_items fields contain the highlight information. The action field is set to MULTILIST_ACTION_STATUS, and the item_index and string fields are invalid. *---------------------------------------------------------------------------*/ XfwfMultiListReturnStruct *XfwfMultiListGetHighlighted(mlw) XfwfMultiListWidget mlw; { XfwfMultiListItem *item; static XfwfMultiListReturnStruct ret_value; ret_value.action = XfwfMultiListActionStatus; if (MultiListNumSelected(mlw) == 0) { ret_value.item = -1; ret_value.string = NULL; } else { ret_value.item = MultiListSelArray(mlw) [MultiListNumSelected(mlw) - 1]; item = MultiListNthItem(mlw,ret_value.item); ret_value.string = MultiListItemString(item); } ret_value.num_selected = MultiListNumSelected(mlw); ret_value.selected_items = MultiListSelArray(mlw); return(&ret_value); } /* End XfwfMultiListGetHighlighted */ /*---------------------------------------------------------------------------* Boolean XfwfMultiListIsHighlighted(mlw,item_index) This routine checks if the item with index <item_index> is highlighted and returns True or False depending. If <item_index> is invalid, False is returned. *---------------------------------------------------------------------------*/ Boolean XfwfMultiListIsHighlighted(mlw,item_index) XfwfMultiListWidget mlw; int item_index; { XfwfMultiListItem *item; if (item_index < 0 || item_index >= MultiListNumItems(mlw)) return(False); item = MultiListNthItem(mlw,item_index); return(MultiListItemHighlighted(item)); } /* End XfwfMultiListIsHighlighted */ /*---------------------------------------------------------------------------* Boolean XfwfMultiListGetItemInfo(mlw,item_index,str_ptr,h_ptr,s_ptr) This routine returns the string, highlight status and sensitivity information for the item with index <item_index> via the pointers <str_ptr>, <h_ptr> and <s_ptr>. If the item index is invalid, False is returned, else True is returned. *---------------------------------------------------------------------------*/ Boolean XfwfMultiListGetItemInfo(mlw,item_index,str_ptr,h_ptr,s_ptr) XfwfMultiListWidget mlw; int item_index; String *str_ptr; Boolean *h_ptr,*s_ptr; { XfwfMultiListItem *item; if (item_index < 0 || item_index >= MultiListNumItems(mlw)) return(False); item = MultiListNthItem(mlw,item_index); *str_ptr = MultiListItemString(item); *h_ptr = MultiListItemHighlighted(item); *s_ptr = MultiListItemSensitive(item); return(True); } /* End XfwfMultiListGetItemInfo */ /*---------------------------------------------------------------------------* XfwfMultiListSetNewData(mlw,list,nitems,longest,resize, sensitivity_array) This routine will set a new set of strings <list> into the MultiList widget <mlw>. If <resize> is True, the MultiList widget will try to resize itself. *---------------------------------------------------------------------------*/ #if NeedFunctionPrototypes void XfwfMultiListSetNewData(XfwfMultiListWidget mlw, String *list, int nitems, int longest, int resize, Boolean *sensitivity_array) #else void XfwfMultiListSetNewData(mlw,list,nitems,longest,resize,sensitivity_array) XfwfMultiListWidget mlw; String *list; int nitems,longest; int resize; Boolean *sensitivity_array; #endif { DestroyOldData(mlw); MultiListList(mlw) = list; MultiListNumItems(mlw) = max(nitems,0); MultiListLongest(mlw) = max(longest,0); MultiListSensitiveArray(mlw) = sensitivity_array; InitializeNewData(mlw); RecalcCoords(mlw,resize,resize); if (XtIsRealized((Widget)mlw)) Redisplay(mlw,NULL,NULL); } /* End XfwfMultiListSetNewData */
UweBonnes/seyon
MultiList.c
C
gpl-2.0
55,484
/******************************************************************************* * This file is part of OpenNMS(R). * * Copyright (C) 2010-2012 The OpenNMS Group, Inc. * OpenNMS(R) is Copyright (C) 1999-2012 The OpenNMS Group, Inc. * * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc. * * OpenNMS(R) is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation, either version 3 of the License, * or (at your option) any later version. * * OpenNMS(R) is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with OpenNMS(R). If not, see: * http://www.gnu.org/licenses/ * * For more information contact: * OpenNMS(R) Licensing <license@opennms.org> * http://www.opennms.org/ * http://www.opennms.com/ *******************************************************************************/ package org.opennms.features.vaadin.pmatrix.manual; import java.io.File; import java.util.ArrayList; import java.util.Date; import java.util.List; import java.util.Map; import org.opennms.features.vaadin.pmatrix.calculator.PmatrixDpdCalculator; import org.opennms.features.vaadin.pmatrix.calculator.PmatrixDpdCalculatorEmaImpl; import org.opennms.features.vaadin.pmatrix.calculator.PmatrixDpdCalculatorRepository; import org.opennms.features.vaadin.pmatrix.model.NameValuePair; import org.springframework.context.annotation.CommonAnnotationBeanPostProcessor; import org.springframework.context.support.StaticApplicationContext; import junit.framework.TestCase; public class CalculationDataMarshalTest extends TestCase { // values used only for this test //File file = new File("target/data-marshaltestfile.xml"); //private static String archiveFileLocation="file:/home/isawesome/devel/gitrepo/entimoss-misc/opennms-pmatrix/vaadin-pmatrix/PmatrixHistory/historyConfig.xml"; private static String archiveFileDirectoryLocation="file:./PmatrixHistory"; private static String archiveFileName="data-marshaltestfile.xml"; private static int archiveFileMaxNumber=2; // static so that lives between tests on this class private static StaticApplicationContext appContext= new StaticApplicationContext(); // set up application context public void testLoadAppContext(){ System.out.println("start of test:testLoadAppContext()"); // set up app context to load ResourceLoader appContext.registerSingleton("beanPostProcessor", CommonAnnotationBeanPostProcessor.class); appContext.registerSingleton("pmatrixDpdCalculatorRepository", PmatrixDpdCalculatorRepository.class); appContext.refresh(); System.out.println("end of test:testLoadAppContext()"); } public void testMarshalData(){ System.out.println("start of test:testMarshalData()"); PmatrixDpdCalculatorRepository pmatrixDpdCalculatorRepository= (PmatrixDpdCalculatorRepository) appContext.getBean("pmatrixDpdCalculatorRepository"); pmatrixDpdCalculatorRepository.setArchiveFileDirectoryLocation(archiveFileDirectoryLocation); pmatrixDpdCalculatorRepository.setArchiveFileMaxNumber(archiveFileMaxNumber); pmatrixDpdCalculatorRepository.setArchiveFileName(archiveFileName); // create new PmatrixDpdCalculator PmatrixDpdCalculatorEmaImpl pmatrixDpdCalculator= new PmatrixDpdCalculatorEmaImpl(); pmatrixDpdCalculator.setAlpha(10d); pmatrixDpdCalculator.setLatestDataValue(1010d); pmatrixDpdCalculator.setLatestTimestamp(new Date().getTime()); pmatrixDpdCalculator.setMovingAverage(2020d); pmatrixDpdCalculator.setMovingVariance(3030d); pmatrixDpdCalculator.setPrevDataValue(3040d); pmatrixDpdCalculator.setPreviousTimestamp(new Date().getTime()); // create configuration for calculator List<NameValuePair> configuration = new ArrayList<NameValuePair>(); NameValuePair nvp= new NameValuePair(); nvp.setName("first name"); nvp.setValue("first value"); configuration.add(nvp); NameValuePair nvp2= new NameValuePair(); nvp2.setName("second name"); nvp2.setValue("second value"); configuration.add(nvp2); pmatrixDpdCalculator.setConfiguration(configuration ); pmatrixDpdCalculatorRepository.getDataPointMap().put("filename", pmatrixDpdCalculator); //File file = new File("target/data-marshaltestfile.xml"); pmatrixDpdCalculatorRepository.setArchiveFileDirectoryLocation(archiveFileDirectoryLocation); pmatrixDpdCalculatorRepository.setArchiveFileName(archiveFileName); pmatrixDpdCalculatorRepository.setArchiveFileMaxNumber(2); pmatrixDpdCalculatorRepository.setPersistHistoricData(true); boolean success = pmatrixDpdCalculatorRepository.persist(); if(success) { System.out.println("marshalled to file:'"+ pmatrixDpdCalculatorRepository.getArchiveFileDirectoryLocation() +File.separator+pmatrixDpdCalculatorRepository.getArchiveFileName()+"'"); } else { System.out.println("did not marshal to file:'"+ pmatrixDpdCalculatorRepository.getArchiveFileDirectoryLocation() +File.separator+pmatrixDpdCalculatorRepository.getArchiveFileName()+"'"); } appContext.close(); System.out.println("end of test:testMarshalData()"); } public void testUnMarshalData(){ System.out.println("start of test:testUnMarshalData()"); PmatrixDpdCalculatorRepository pmatrixDpdCalculatorRepository= (PmatrixDpdCalculatorRepository) appContext.getBean("pmatrixDpdCalculatorRepository"); pmatrixDpdCalculatorRepository.setArchiveFileDirectoryLocation(archiveFileDirectoryLocation); pmatrixDpdCalculatorRepository.setArchiveFileName(archiveFileName); pmatrixDpdCalculatorRepository.setArchiveFileMaxNumber(2); pmatrixDpdCalculatorRepository.setPersistHistoricData(true); boolean success = pmatrixDpdCalculatorRepository.load(); if(success) { System.out.println("unmarshalled from file:''"+ pmatrixDpdCalculatorRepository.getArchiveFileDirectoryLocation() +File.separator+pmatrixDpdCalculatorRepository.getArchiveFileName()+"'"); Map<String, PmatrixDpdCalculator> dataPointMap = pmatrixDpdCalculatorRepository.getDataPointMap(); PmatrixDpdCalculatorEmaImpl pmatrixDpdCalculator; for (String filename:dataPointMap.keySet()){ pmatrixDpdCalculator = (PmatrixDpdCalculatorEmaImpl)dataPointMap.get(filename); System.out.println("pmatrixDpdCalculator:" + " pmatrixDpdCalculator.getAlpha(10d): "+pmatrixDpdCalculator.getAlpha() + " pmatrixDpdCalculator.getLatestDataValue(1010d): "+pmatrixDpdCalculator.getLatestDataValue() + " : " ); if(pmatrixDpdCalculator.getConfiguration()!=null){ System.out.println(" configuration:"); for (NameValuePair nvp : pmatrixDpdCalculator.getConfiguration()){ System.out.println(" name:"+nvp.getName() + " value:"+nvp.getValue()); } } } } else { System.out.println("did not unmarshal from file:'"+ pmatrixDpdCalculatorRepository.getArchiveFileDirectoryLocation() +File.separator+pmatrixDpdCalculatorRepository.getArchiveFileName()+"'"); } System.out.println("end of test:testUnMarshalData()"); } }
OpenNMS/opennms-pmatrix
vaadin-pmatrix/src/test/java/org/opennms/features/vaadin/pmatrix/manual/CalculationDataMarshalTest.java
Java
gpl-2.0
7,300
<?php /** * @author Amiral Management Corporation amc.amiral.com * @copyright Copyright &copy;2012, Amiral Management Corporation. All Rights Reserved. * @license http://amc.amiral.com/license/amcwm.txt */ /** * This is the model class for table "tenders_translation". * * The followings are the available columns in table 'tenders_translation': * @property string $tender_id * @property string $content_lang * @property string $title * @property string $description * @property string $conditions * @property string $notes * @property string $technical_results * @property string $financial_results * * The followings are the available model relations: * @property Tenders $tender * * @author Amiral Management Corporation * @version 1.0 */ class TendersTranslation extends ChildTranslatedActiveRecord { /** * Returns the static model of the specified AR class. * @param string $className active record class name. * @return TendersTranslation the static model class */ public static function model($className = __CLASS__) { return parent::model($className); } /** * @return string the associated database table name */ public function tableName() { return 'tenders_translation'; } /** * @return array validation rules for model attributes. */ public function rules() { // NOTE: you should only define rules for those attributes that // will receive user inputs. return array( array('content_lang, title, description', 'required'), array('tender_id', 'length', 'max' => 10), array('content_lang', 'length', 'max' => 2), array('title', 'length', 'max' => 255), array('conditions, notes, technical_results, financial_results', 'safe'), // The following rule is used by search(). // Please remove those attributes that should not be searched. array('tender_id, content_lang, title, description, conditions, notes, technical_results, financial_results', 'safe', 'on' => 'search'), ); } /** * @return array relational rules. */ public function relations() { // NOTE: you may need to adjust the relation name and the related // class name for the relations automatically generated below. return array( 'parentContent' => array(self::BELONGS_TO, 'Tenders', 'tender_id'), ); } /** * @return array customized attribute labels (name=>label) */ public function attributeLabels() { return array( 'tender_id' => AmcWm::t("msgsbase.core", 'Tender'), 'content_lang' => AmcWm::t("msgsbase.core", 'Content Lang'), 'title' => AmcWm::t("msgsbase.core", 'Title'), 'description' => AmcWm::t("msgsbase.core", 'Description'), 'conditions' => AmcWm::t("msgsbase.core", 'Conditions'), 'notes' => AmcWm::t("msgsbase.core", 'Notes'), 'technical_results' => AmcWm::t("msgsbase.core", 'Technical Results Data'), 'financial_results' => AmcWm::t("msgsbase.core", 'Financial Results Data'), ); } /** * Retrieves a list of models based on the current search/filter conditions. * @return CActiveDataProvider the data provider that can return the models based on the search/filter conditions. */ public function search() { // Warning: Please modify the following code to remove attributes that // should not be searched. $criteria = new CDbCriteria; $criteria->compare('tender_id', $this->tender_id, true); $criteria->compare('content_lang', $this->content_lang, true); $criteria->compare('title', $this->title, true); $criteria->compare('description', $this->description, true); $criteria->compare('conditions', $this->conditions, true); $criteria->compare('notes', $this->notes, true); $criteria->compare('technical_results', $this->technical_results, true); $criteria->compare('financial_results', $this->financial_results, true); return new CActiveDataProvider($this, array( 'criteria' => $criteria, )); } /** * This method is invoked after each record is instantiated by a find method. * @access public * @return void */ protected function afterFind() { $this->displayTitle = $this->title; parent::afterFind(); } }
amiral-mc/amcwm
modules/tenders/models/TendersTranslation.php
PHP
gpl-2.0
4,533
#!/usr/bin/env python from time import sleep import os import RPi.GPIO as GPIO import subprocess import datetime GPIO.setmode(GPIO.BCM) GPIO.setup(24, GPIO.IN) count = 0 up = False down = False command = "" filename = "" index = 0 camera_pause = "500" def takepic(imageName): print("picture") command = "sudo raspistill -o " + imageName + " -q 100 -t " + camera_pause print(command) os.system(command) while(True): if(up==True): if(GPIO.input(24)==False): now = datetime.datetime.now() timeString = now.strftime("%Y-%m-%d_%H%M%S") filename = "photo-"+timeString+".jpg" takepic(filename) subprocess.call(['./processImage.sh', filename, '&']) up = GPIO.input(24) count = count+1 sleep(.1) print "done"
sgonzalez/wsn-parking-project
sensor-pi/testimages.py
Python
gpl-2.0
764
/** * @file irc.c * * purple * * Copyright (C) 2003, Robbert Haarman <purple@inglorion.net> * Copyright (C) 2003, 2012 Ethan Blanton <elb@pidgin.im> * Copyright (C) 2000-2003, Rob Flynn <rob@tgflinux.com> * Copyright (C) 1998-1999, Mark Spencer <markster@marko.net> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA */ #include "internal.h" #include "accountopt.h" #include "buddylist.h" #include "conversation.h" #include "debug.h" #include "notify.h" #include "protocol.h" #include "plugins.h" #include "util.h" #include "version.h" #include "irc.h" #define PING_TIMEOUT 60 static void irc_ison_buddy_init(char *name, struct irc_buddy *ib, GList **list); static const char *irc_blist_icon(PurpleAccount *a, PurpleBuddy *b); static GList *irc_status_types(PurpleAccount *account); static GList *irc_get_actions(PurpleConnection *gc); /* static GList *irc_chat_info(PurpleConnection *gc); */ static void irc_login(PurpleAccount *account); static void irc_login_cb_ssl(gpointer data, PurpleSslConnection *gsc, PurpleInputCondition cond); static void irc_login_cb(gpointer data, gint source, const gchar *error_message); static void irc_ssl_connect_failure(PurpleSslConnection *gsc, PurpleSslErrorType error, gpointer data); static void irc_close(PurpleConnection *gc); static int irc_im_send(PurpleConnection *gc, PurpleMessage *msg); static int irc_chat_send(PurpleConnection *gc, int id, PurpleMessage *msg); static void irc_chat_join (PurpleConnection *gc, GHashTable *data); static void irc_input_cb(gpointer data, gint source, PurpleInputCondition cond); static void irc_input_cb_ssl(gpointer data, PurpleSslConnection *gsc, PurpleInputCondition cond); static guint irc_nick_hash(const char *nick); static gboolean irc_nick_equal(const char *nick1, const char *nick2); static void irc_buddy_free(struct irc_buddy *ib); PurpleProtocol *_irc_protocol = NULL; static void irc_view_motd(PurpleProtocolAction *action) { PurpleConnection *gc = action->connection; struct irc_conn *irc; char *title, *body; if (gc == NULL || purple_connection_get_protocol_data(gc) == NULL) { purple_debug(PURPLE_DEBUG_ERROR, "irc", "got MOTD request for NULL gc\n"); return; } irc = purple_connection_get_protocol_data(gc); if (irc->motd == NULL) { purple_notify_error(gc, _("Error displaying MOTD"), _("No MOTD available"), _("There is no MOTD associated with this connection."), purple_request_cpar_from_connection(gc)); return; } title = g_strdup_printf(_("MOTD for %s"), irc->server); body = g_strdup_printf("<span style=\"font-family: monospace;\">%s</span>", irc->motd->str); purple_notify_formatted(gc, title, title, NULL, body, NULL, NULL); g_free(title); g_free(body); } static int do_send(struct irc_conn *irc, const char *buf, gsize len) { int ret; if (irc->gsc) { ret = purple_ssl_write(irc->gsc, buf, len); } else { ret = write(irc->fd, buf, len); } return ret; } static int irc_send_raw(PurpleConnection *gc, const char *buf, int len) { struct irc_conn *irc = purple_connection_get_protocol_data(gc); if (len == -1) { len = strlen(buf); } irc_send_len(irc, buf, len); return len; } static void irc_send_cb(gpointer data, gint source, PurpleInputCondition cond) { struct irc_conn *irc = data; int ret, writelen; const gchar *buffer = NULL; writelen = purple_circular_buffer_get_max_read(irc->outbuf); if (writelen == 0) { purple_input_remove(irc->writeh); irc->writeh = 0; return; } buffer = purple_circular_buffer_get_output(irc->outbuf); ret = do_send(irc, buffer, writelen); if (ret < 0 && errno == EAGAIN) return; else if (ret <= 0) { PurpleConnection *gc = purple_account_get_connection(irc->account); gchar *tmp = g_strdup_printf(_("Lost connection with server: %s"), g_strerror(errno)); purple_connection_error (gc, PURPLE_CONNECTION_ERROR_NETWORK_ERROR, tmp); g_free(tmp); return; } purple_circular_buffer_mark_read(irc->outbuf, ret); #if 0 /* We *could* try to write more if we wrote it all */ if (ret == write_len) { irc_send_cb(data, source, cond); } #endif } int irc_send(struct irc_conn *irc, const char *buf) { return irc_send_len(irc, buf, strlen(buf)); } int irc_send_len(struct irc_conn *irc, const char *buf, int buflen) { int ret; char *tosend= g_strdup(buf); purple_signal_emit(_irc_protocol, "irc-sending-text", purple_account_get_connection(irc->account), &tosend); if (tosend == NULL) return 0; /* If we're not buffering writes, try to send immediately */ if (!irc->writeh) ret = do_send(irc, tosend, buflen); else { ret = -1; errno = EAGAIN; } /* purple_debug(PURPLE_DEBUG_MISC, "irc", "sent%s: %s", irc->gsc ? " (ssl)" : "", tosend); */ if (ret <= 0 && errno != EAGAIN) { PurpleConnection *gc = purple_account_get_connection(irc->account); gchar *tmp = g_strdup_printf(_("Lost connection with server: %s"), g_strerror(errno)); purple_connection_error (gc, PURPLE_CONNECTION_ERROR_NETWORK_ERROR, tmp); g_free(tmp); } else if (ret < buflen) { if (ret < 0) ret = 0; if (!irc->writeh) irc->writeh = purple_input_add( irc->gsc ? irc->gsc->fd : irc->fd, PURPLE_INPUT_WRITE, irc_send_cb, irc); purple_circular_buffer_append(irc->outbuf, tosend + ret, buflen - ret); } g_free(tosend); return ret; } /* XXX I don't like messing directly with these buddies */ gboolean irc_blist_timeout(struct irc_conn *irc) { if (irc->ison_outstanding) { return TRUE; } g_hash_table_foreach(irc->buddies, (GHFunc)irc_ison_buddy_init, (gpointer *)&irc->buddies_outstanding); irc_buddy_query(irc); return TRUE; } void irc_buddy_query(struct irc_conn *irc) { GList *lp; GString *string; struct irc_buddy *ib; char *buf; string = g_string_sized_new(512); while ((lp = g_list_first(irc->buddies_outstanding))) { ib = (struct irc_buddy *)lp->data; if (string->len + strlen(ib->name) + 1 > 450) break; g_string_append_printf(string, "%s ", ib->name); ib->new_online_status = FALSE; irc->buddies_outstanding = g_list_delete_link(irc->buddies_outstanding, lp); } if (string->len) { buf = irc_format(irc, "vn", "ISON", string->str); irc_send(irc, buf); g_free(buf); irc->ison_outstanding = TRUE; } else irc->ison_outstanding = FALSE; g_string_free(string, TRUE); } static void irc_ison_buddy_init(char *name, struct irc_buddy *ib, GList **list) { *list = g_list_append(*list, ib); } static void irc_ison_one(struct irc_conn *irc, struct irc_buddy *ib) { char *buf; if (irc->buddies_outstanding != NULL) { irc->buddies_outstanding = g_list_append(irc->buddies_outstanding, ib); return; } ib->new_online_status = FALSE; buf = irc_format(irc, "vn", "ISON", ib->name); irc_send(irc, buf); g_free(buf); } static const char *irc_blist_icon(PurpleAccount *a, PurpleBuddy *b) { return "irc"; } static GList *irc_status_types(PurpleAccount *account) { PurpleStatusType *type; GList *types = NULL; type = purple_status_type_new(PURPLE_STATUS_AVAILABLE, NULL, NULL, TRUE); types = g_list_append(types, type); type = purple_status_type_new_with_attrs( PURPLE_STATUS_AWAY, NULL, NULL, TRUE, TRUE, FALSE, "message", _("Message"), purple_value_new(G_TYPE_STRING), NULL); types = g_list_append(types, type); type = purple_status_type_new(PURPLE_STATUS_OFFLINE, NULL, NULL, TRUE); types = g_list_append(types, type); return types; } static GList *irc_get_actions(PurpleConnection *gc) { GList *list = NULL; PurpleProtocolAction *act = NULL; act = purple_protocol_action_new(_("View MOTD"), irc_view_motd); list = g_list_append(list, act); return list; } static GList *irc_chat_join_info(PurpleConnection *gc) { GList *m = NULL; PurpleProtocolChatEntry *pce; pce = g_new0(PurpleProtocolChatEntry, 1); pce->label = _("_Channel:"); pce->identifier = "channel"; pce->required = TRUE; m = g_list_append(m, pce); pce = g_new0(PurpleProtocolChatEntry, 1); pce->label = _("_Password:"); pce->identifier = "password"; pce->secret = TRUE; m = g_list_append(m, pce); return m; } static GHashTable *irc_chat_info_defaults(PurpleConnection *gc, const char *chat_name) { GHashTable *defaults; defaults = g_hash_table_new_full(g_str_hash, g_str_equal, NULL, g_free); if (chat_name != NULL) g_hash_table_insert(defaults, "channel", g_strdup(chat_name)); return defaults; } static void irc_login(PurpleAccount *account) { PurpleConnection *gc; struct irc_conn *irc; char **userparts; const char *username = purple_account_get_username(account); gc = purple_account_get_connection(account); purple_connection_set_flags(gc, PURPLE_CONNECTION_FLAG_NO_NEWLINES | PURPLE_CONNECTION_FLAG_NO_IMAGES); if (strpbrk(username, " \t\v\r\n") != NULL) { purple_connection_error (gc, PURPLE_CONNECTION_ERROR_INVALID_SETTINGS, _("IRC nick and server may not contain whitespace")); return; } irc = g_new0(struct irc_conn, 1); purple_connection_set_protocol_data(gc, irc); irc->fd = -1; irc->account = account; irc->outbuf = purple_circular_buffer_new(512); userparts = g_strsplit(username, "@", 2); purple_connection_set_display_name(gc, userparts[0]); irc->server = g_strdup(userparts[1]); g_strfreev(userparts); irc->buddies = g_hash_table_new_full((GHashFunc)irc_nick_hash, (GEqualFunc)irc_nick_equal, NULL, (GDestroyNotify)irc_buddy_free); irc->cmds = g_hash_table_new(g_str_hash, g_str_equal); irc_cmd_table_build(irc); irc->msgs = g_hash_table_new(g_str_hash, g_str_equal); irc_msg_table_build(irc); purple_connection_update_progress(gc, _("Connecting"), 1, 2); if (purple_account_get_bool(account, "ssl", FALSE)) { irc->gsc = purple_ssl_connect(account, irc->server, purple_account_get_int(account, "port", IRC_DEFAULT_SSL_PORT), irc_login_cb_ssl, irc_ssl_connect_failure, gc); } if (!irc->gsc) { if (purple_proxy_connect(gc, account, irc->server, purple_account_get_int(account, "port", IRC_DEFAULT_PORT), irc_login_cb, gc) == NULL) { purple_connection_error (gc, PURPLE_CONNECTION_ERROR_NETWORK_ERROR, _("Unable to connect")); return; } } } static gboolean do_login(PurpleConnection *gc) { char *buf, *tmp = NULL; char *server; const char *nickname, *identname, *realname; struct irc_conn *irc = purple_connection_get_protocol_data(gc); const char *pass = purple_connection_get_password(gc); #ifdef HAVE_CYRUS_SASL const gboolean use_sasl = purple_account_get_bool(irc->account, "sasl", FALSE); #endif if (pass && *pass) { #ifdef HAVE_CYRUS_SASL if (use_sasl) buf = irc_format(irc, "vv:", "CAP", "REQ", "sasl"); else /* intended to fall through */ #endif buf = irc_format(irc, "v:", "PASS", pass); if (irc_send(irc, buf) < 0) { g_free(buf); return FALSE; } g_free(buf); } realname = purple_account_get_string(irc->account, "realname", ""); identname = purple_account_get_string(irc->account, "username", ""); if (identname == NULL || *identname == '\0') { identname = g_get_user_name(); } if (identname != NULL && strchr(identname, ' ') != NULL) { tmp = g_strdup(identname); while ((buf = strchr(tmp, ' ')) != NULL) { *buf = '_'; } } if (*irc->server == ':') { /* Same as hostname, above. */ server = g_strdup_printf("0%s", irc->server); } else { server = g_strdup(irc->server); } buf = irc_format(irc, "vvvv:", "USER", tmp ? tmp : identname, "*", server, *realname == '\0' ? IRC_DEFAULT_ALIAS : realname); g_free(tmp); g_free(server); if (irc_send(irc, buf) < 0) { g_free(buf); return FALSE; } g_free(buf); nickname = purple_connection_get_display_name(gc); buf = irc_format(irc, "vn", "NICK", nickname); irc->reqnick = g_strdup(nickname); irc->nickused = FALSE; if (irc_send(irc, buf) < 0) { g_free(buf); return FALSE; } g_free(buf); irc->recv_time = time(NULL); return TRUE; } static void irc_login_cb_ssl(gpointer data, PurpleSslConnection *gsc, PurpleInputCondition cond) { PurpleConnection *gc = data; if (do_login(gc)) { purple_ssl_input_add(gsc, irc_input_cb_ssl, gc); } } static void irc_login_cb(gpointer data, gint source, const gchar *error_message) { PurpleConnection *gc = data; struct irc_conn *irc = purple_connection_get_protocol_data(gc); if (source < 0) { gchar *tmp = g_strdup_printf(_("Unable to connect: %s"), error_message); purple_connection_error (gc, PURPLE_CONNECTION_ERROR_NETWORK_ERROR, tmp); g_free(tmp); return; } irc->fd = source; if (do_login(gc)) { irc->inpa = purple_input_add(irc->fd, PURPLE_INPUT_READ, irc_input_cb, gc); } } static void irc_ssl_connect_failure(PurpleSslConnection *gsc, PurpleSslErrorType error, gpointer data) { PurpleConnection *gc = data; struct irc_conn *irc = purple_connection_get_protocol_data(gc); irc->gsc = NULL; purple_connection_ssl_error (gc, error); } static void irc_close(PurpleConnection *gc) { struct irc_conn *irc = purple_connection_get_protocol_data(gc); if (irc == NULL) return; if (irc->gsc || (irc->fd >= 0)) irc_cmd_quit(irc, "quit", NULL, NULL); if (irc->inpa) { purple_input_remove(irc->inpa); irc->inpa = 0; } g_free(irc->inbuf); if (irc->gsc) { purple_ssl_close(irc->gsc); } else if (irc->fd >= 0) { close(irc->fd); } if (irc->timer) purple_timeout_remove(irc->timer); g_hash_table_destroy(irc->cmds); g_hash_table_destroy(irc->msgs); g_hash_table_destroy(irc->buddies); if (irc->motd) g_string_free(irc->motd, TRUE); g_free(irc->server); if (irc->writeh) purple_input_remove(irc->writeh); g_object_unref(G_OBJECT(irc->outbuf)); g_free(irc->mode_chars); g_free(irc->reqnick); #ifdef HAVE_CYRUS_SASL if (irc->sasl_conn) { sasl_dispose(&irc->sasl_conn); irc->sasl_conn = NULL; } g_free(irc->sasl_cb); if(irc->sasl_mechs) g_string_free(irc->sasl_mechs, TRUE); #endif g_free(irc); } static int irc_im_send(PurpleConnection *gc, PurpleMessage *msg) { struct irc_conn *irc = purple_connection_get_protocol_data(gc); char *plain; const char *args[2]; args[0] = irc_nick_skip_mode(irc, purple_message_get_recipient(msg)); purple_markup_html_to_xhtml(purple_message_get_contents(msg), NULL, &plain); args[1] = plain; irc_cmd_privmsg(irc, "msg", NULL, args); g_free(plain); return 1; } static void irc_get_info(PurpleConnection *gc, const char *who) { struct irc_conn *irc = purple_connection_get_protocol_data(gc); const char *args[2]; args[0] = who; args[1] = NULL; irc_cmd_whois(irc, "whois", NULL, args); } static void irc_set_status(PurpleAccount *account, PurpleStatus *status) { PurpleConnection *gc = purple_account_get_connection(account); struct irc_conn *irc; const char *args[1]; const char *status_id = purple_status_get_id(status); g_return_if_fail(gc != NULL); irc = purple_connection_get_protocol_data(gc); if (!purple_status_is_active(status)) return; args[0] = NULL; if (!strcmp(status_id, "away")) { args[0] = purple_status_get_attr_string(status, "message"); if ((args[0] == NULL) || (*args[0] == '\0')) args[0] = _("Away"); irc_cmd_away(irc, "away", NULL, args); } else if (!strcmp(status_id, "available")) { irc_cmd_away(irc, "back", NULL, args); } } static void irc_add_buddy(PurpleConnection *gc, PurpleBuddy *buddy, PurpleGroup *group, const char *message) { struct irc_conn *irc = purple_connection_get_protocol_data(gc); struct irc_buddy *ib; const char *bname = purple_buddy_get_name(buddy); ib = g_hash_table_lookup(irc->buddies, bname); if (ib != NULL) { ib->ref++; purple_protocol_got_user_status(irc->account, bname, ib->online ? "available" : "offline", NULL); } else { ib = g_new0(struct irc_buddy, 1); ib->name = g_strdup(bname); ib->ref = 1; g_hash_table_replace(irc->buddies, ib->name, ib); } /* if the timer isn't set, this is during signon, so we don't want to flood * ourself off with ISON's, so we don't, but after that we want to know when * someone's online asap */ if (irc->timer) irc_ison_one(irc, ib); } static void irc_remove_buddy(PurpleConnection *gc, PurpleBuddy *buddy, PurpleGroup *group) { struct irc_conn *irc = purple_connection_get_protocol_data(gc); struct irc_buddy *ib; ib = g_hash_table_lookup(irc->buddies, purple_buddy_get_name(buddy)); if (ib && --ib->ref == 0) { g_hash_table_remove(irc->buddies, purple_buddy_get_name(buddy)); } } static void read_input(struct irc_conn *irc, int len) { PurpleConnection *connection = purple_account_get_connection(irc->account); char *cur, *end; purple_connection_update_last_received(connection); irc->inbufused += len; irc->inbuf[irc->inbufused] = '\0'; cur = irc->inbuf; /* This is a hack to work around the fact that marv gets messages * with null bytes in them while using some weird irc server at work */ while ((cur < (irc->inbuf + irc->inbufused)) && !*cur) cur++; while (cur < irc->inbuf + irc->inbufused && ((end = strstr(cur, "\r\n")) || (end = strstr(cur, "\n")))) { int step = (*end == '\r' ? 2 : 1); *end = '\0'; irc_parse_msg(irc, cur); cur = end + step; } if (cur != irc->inbuf + irc->inbufused) { /* leftover */ irc->inbufused -= (cur - irc->inbuf); memmove(irc->inbuf, cur, irc->inbufused); } else { irc->inbufused = 0; } } static void irc_input_cb_ssl(gpointer data, PurpleSslConnection *gsc, PurpleInputCondition cond) { PurpleConnection *gc = data; struct irc_conn *irc = purple_connection_get_protocol_data(gc); int len; if(!g_list_find(purple_connections_get_all(), gc)) { purple_ssl_close(gsc); return; } if (irc->inbuflen < irc->inbufused + IRC_INITIAL_BUFSIZE) { irc->inbuflen += IRC_INITIAL_BUFSIZE; irc->inbuf = g_realloc(irc->inbuf, irc->inbuflen); } len = purple_ssl_read(gsc, irc->inbuf + irc->inbufused, IRC_INITIAL_BUFSIZE - 1); if (len < 0 && errno == EAGAIN) { /* Try again later */ return; } else if (len < 0) { gchar *tmp = g_strdup_printf(_("Lost connection with server: %s"), g_strerror(errno)); purple_connection_error (gc, PURPLE_CONNECTION_ERROR_NETWORK_ERROR, tmp); g_free(tmp); return; } else if (len == 0) { purple_connection_error (gc, PURPLE_CONNECTION_ERROR_NETWORK_ERROR, _("Server closed the connection")); return; } read_input(irc, len); } static void irc_input_cb(gpointer data, gint source, PurpleInputCondition cond) { PurpleConnection *gc = data; struct irc_conn *irc = purple_connection_get_protocol_data(gc); int len; if (irc->inbuflen < irc->inbufused + IRC_INITIAL_BUFSIZE) { irc->inbuflen += IRC_INITIAL_BUFSIZE; irc->inbuf = g_realloc(irc->inbuf, irc->inbuflen); } len = read(irc->fd, irc->inbuf + irc->inbufused, IRC_INITIAL_BUFSIZE - 1); if (len < 0 && errno == EAGAIN) { return; } else if (len < 0) { gchar *tmp = g_strdup_printf(_("Lost connection with server: %s"), g_strerror(errno)); purple_connection_error (gc, PURPLE_CONNECTION_ERROR_NETWORK_ERROR, tmp); g_free(tmp); return; } else if (len == 0) { purple_connection_error (gc, PURPLE_CONNECTION_ERROR_NETWORK_ERROR, _("Server closed the connection")); return; } read_input(irc, len); } static void irc_chat_join (PurpleConnection *gc, GHashTable *data) { struct irc_conn *irc = purple_connection_get_protocol_data(gc); const char *args[2]; args[0] = g_hash_table_lookup(data, "channel"); args[1] = g_hash_table_lookup(data, "password"); irc_cmd_join(irc, "join", NULL, args); } static char *irc_get_chat_name(GHashTable *data) { return g_strdup(g_hash_table_lookup(data, "channel")); } static void irc_chat_invite(PurpleConnection *gc, int id, const char *message, const char *name) { struct irc_conn *irc = purple_connection_get_protocol_data(gc); PurpleConversation *convo = PURPLE_CONVERSATION(purple_conversations_find_chat(gc, id)); const char *args[2]; if (!convo) { purple_debug(PURPLE_DEBUG_ERROR, "irc", "Got chat invite request for bogus chat\n"); return; } args[0] = name; args[1] = purple_conversation_get_name(convo); irc_cmd_invite(irc, "invite", purple_conversation_get_name(convo), args); } static void irc_chat_leave (PurpleConnection *gc, int id) { struct irc_conn *irc = purple_connection_get_protocol_data(gc); PurpleConversation *convo = PURPLE_CONVERSATION(purple_conversations_find_chat(gc, id)); const char *args[2]; if (!convo) return; args[0] = purple_conversation_get_name(convo); args[1] = NULL; irc_cmd_part(irc, "part", purple_conversation_get_name(convo), args); purple_serv_got_chat_left(gc, id); } static int irc_chat_send(PurpleConnection *gc, int id, PurpleMessage *msg) { struct irc_conn *irc = purple_connection_get_protocol_data(gc); PurpleConversation *convo = PURPLE_CONVERSATION(purple_conversations_find_chat(gc, id)); const char *args[2]; char *tmp; if (!convo) { purple_debug(PURPLE_DEBUG_ERROR, "irc", "chat send on nonexistent chat\n"); return -EINVAL; } #if 0 if (*what == '/') { return irc_parse_cmd(irc, convo->name, what + 1); } #endif purple_markup_html_to_xhtml(purple_message_get_contents(msg), NULL, &tmp); args[0] = purple_conversation_get_name(convo); args[1] = tmp; irc_cmd_privmsg(irc, "msg", NULL, args); /* TODO: use msg */ purple_serv_got_chat_in(gc, id, purple_connection_get_display_name(gc), purple_message_get_flags(msg), purple_message_get_contents(msg), time(NULL)); g_free(tmp); return 0; } static guint irc_nick_hash(const char *nick) { char *lc; guint bucket; lc = g_utf8_strdown(nick, -1); bucket = g_str_hash(lc); g_free(lc); return bucket; } static gboolean irc_nick_equal(const char *nick1, const char *nick2) { return (purple_utf8_strcasecmp(nick1, nick2) == 0); } static void irc_buddy_free(struct irc_buddy *ib) { g_free(ib->name); g_free(ib); } static void irc_chat_set_topic(PurpleConnection *gc, int id, const char *topic) { char *buf; const char *name = NULL; struct irc_conn *irc; irc = purple_connection_get_protocol_data(gc); name = purple_conversation_get_name(PURPLE_CONVERSATION( purple_conversations_find_chat(gc, id))); if (name == NULL) return; buf = irc_format(irc, "vt:", "TOPIC", name, topic); irc_send(irc, buf); g_free(buf); } static PurpleRoomlist *irc_roomlist_get_list(PurpleConnection *gc) { struct irc_conn *irc; GList *fields = NULL; PurpleRoomlistField *f; char *buf; irc = purple_connection_get_protocol_data(gc); if (irc->roomlist) g_object_unref(irc->roomlist); irc->roomlist = purple_roomlist_new(purple_connection_get_account(gc)); f = purple_roomlist_field_new(PURPLE_ROOMLIST_FIELD_STRING, "", "channel", TRUE); fields = g_list_append(fields, f); f = purple_roomlist_field_new(PURPLE_ROOMLIST_FIELD_INT, _("Users"), "users", FALSE); fields = g_list_append(fields, f); f = purple_roomlist_field_new(PURPLE_ROOMLIST_FIELD_STRING, _("Topic"), "topic", FALSE); fields = g_list_append(fields, f); purple_roomlist_set_fields(irc->roomlist, fields); buf = irc_format(irc, "v", "LIST"); irc_send(irc, buf); g_free(buf); return irc->roomlist; } static void irc_roomlist_cancel(PurpleRoomlist *list) { PurpleAccount *account = purple_roomlist_get_account(list); PurpleConnection *gc = purple_account_get_connection(account); struct irc_conn *irc; if (gc == NULL) return; irc = purple_connection_get_protocol_data(gc); purple_roomlist_set_in_progress(list, FALSE); if (irc->roomlist == list) { irc->roomlist = NULL; g_object_unref(list); } } static void irc_keepalive(PurpleConnection *gc) { struct irc_conn *irc = purple_connection_get_protocol_data(gc); if ((time(NULL) - irc->recv_time) > PING_TIMEOUT) irc_cmd_ping(irc, NULL, NULL, NULL); } static gssize irc_get_max_message_size(PurpleConversation *conv) { /* TODO: this static value is got from pidgin-otr, but it depends on * some factors, for example IRC channel name. */ return 417; } static void irc_protocol_init(PurpleProtocol *protocol) { PurpleAccountUserSplit *split; PurpleAccountOption *option; protocol->id = "prpl-irc"; protocol->name = "IRC"; protocol->options = OPT_PROTO_CHAT_TOPIC | OPT_PROTO_PASSWORD_OPTIONAL | OPT_PROTO_SLASH_COMMANDS_NATIVE; split = purple_account_user_split_new(_("Server"), IRC_DEFAULT_SERVER, '@'); protocol->user_splits = g_list_append(protocol->user_splits, split); option = purple_account_option_int_new(_("Port"), "port", IRC_DEFAULT_PORT); protocol->account_options = g_list_append(protocol->account_options, option); option = purple_account_option_string_new(_("Encodings"), "encoding", IRC_DEFAULT_CHARSET); protocol->account_options = g_list_append(protocol->account_options, option); option = purple_account_option_bool_new(_("Auto-detect incoming UTF-8"), "autodetect_utf8", IRC_DEFAULT_AUTODETECT); protocol->account_options = g_list_append(protocol->account_options, option); option = purple_account_option_string_new(_("Ident name"), "username", ""); protocol->account_options = g_list_append(protocol->account_options, option); option = purple_account_option_string_new(_("Real name"), "realname", ""); protocol->account_options = g_list_append(protocol->account_options, option); /* option = purple_account_option_string_new(_("Quit message"), "quitmsg", IRC_DEFAULT_QUIT); protocol->account_options = g_list_append(protocol->account_options, option); */ option = purple_account_option_bool_new(_("Use SSL"), "ssl", FALSE); protocol->account_options = g_list_append(protocol->account_options, option); #ifdef HAVE_CYRUS_SASL option = purple_account_option_bool_new(_("Authenticate with SASL"), "sasl", FALSE); protocol->account_options = g_list_append(protocol->account_options, option); option = purple_account_option_bool_new( _("Allow plaintext SASL auth over unencrypted connection"), "auth_plain_in_clear", FALSE); protocol->account_options = g_list_append(protocol->account_options, option); #endif } static void irc_protocol_class_init(PurpleProtocolClass *klass) { klass->login = irc_login; klass->close = irc_close; klass->status_types = irc_status_types; klass->list_icon = irc_blist_icon; } static void irc_protocol_client_iface_init(PurpleProtocolClientIface *client_iface) { client_iface->get_actions = irc_get_actions; client_iface->normalize = purple_normalize_nocase; client_iface->get_max_message_size = irc_get_max_message_size; } static void irc_protocol_server_iface_init(PurpleProtocolServerIface *server_iface) { server_iface->set_status = irc_set_status; server_iface->get_info = irc_get_info; server_iface->add_buddy = irc_add_buddy; server_iface->remove_buddy = irc_remove_buddy; server_iface->keepalive = irc_keepalive; server_iface->send_raw = irc_send_raw; } static void irc_protocol_im_iface_init(PurpleProtocolIMIface *im_iface) { im_iface->send = irc_im_send; } static void irc_protocol_chat_iface_init(PurpleProtocolChatIface *chat_iface) { chat_iface->info = irc_chat_join_info; chat_iface->info_defaults = irc_chat_info_defaults; chat_iface->join = irc_chat_join; chat_iface->get_name = irc_get_chat_name; chat_iface->invite = irc_chat_invite; chat_iface->leave = irc_chat_leave; chat_iface->send = irc_chat_send; chat_iface->set_topic = irc_chat_set_topic; } static void irc_protocol_roomlist_iface_init(PurpleProtocolRoomlistIface *roomlist_iface) { roomlist_iface->get_list = irc_roomlist_get_list; roomlist_iface->cancel = irc_roomlist_cancel; } static void irc_protocol_xfer_iface_init(PurpleProtocolXferIface *xfer_iface) { xfer_iface->send = irc_dccsend_send_file; xfer_iface->new_xfer = irc_dccsend_new_xfer; } PURPLE_DEFINE_TYPE_EXTENDED( IRCProtocol, irc_protocol, PURPLE_TYPE_PROTOCOL, 0, PURPLE_IMPLEMENT_INTERFACE_STATIC(PURPLE_TYPE_PROTOCOL_CLIENT_IFACE, irc_protocol_client_iface_init) PURPLE_IMPLEMENT_INTERFACE_STATIC(PURPLE_TYPE_PROTOCOL_SERVER_IFACE, irc_protocol_server_iface_init) PURPLE_IMPLEMENT_INTERFACE_STATIC(PURPLE_TYPE_PROTOCOL_IM_IFACE, irc_protocol_im_iface_init) PURPLE_IMPLEMENT_INTERFACE_STATIC(PURPLE_TYPE_PROTOCOL_CHAT_IFACE, irc_protocol_chat_iface_init) PURPLE_IMPLEMENT_INTERFACE_STATIC(PURPLE_TYPE_PROTOCOL_ROOMLIST_IFACE, irc_protocol_roomlist_iface_init) PURPLE_IMPLEMENT_INTERFACE_STATIC(PURPLE_TYPE_PROTOCOL_XFER_IFACE, irc_protocol_xfer_iface_init) ); static PurplePluginInfo * plugin_query(GError **error) { return purple_plugin_info_new( "id", "prpl-irc", "name", "IRC Protocol", "version", DISPLAY_VERSION, "category", N_("Protocol"), "summary", N_("IRC Protocol Plugin"), "description", N_("The IRC Protocol Plugin that Sucks Less"), "website", PURPLE_WEBSITE, "abi-version", PURPLE_ABI_VERSION, "flags", PURPLE_PLUGIN_INFO_FLAGS_INTERNAL | PURPLE_PLUGIN_INFO_FLAGS_AUTO_LOAD, NULL ); } static gboolean plugin_load(PurplePlugin *plugin, GError **error) { irc_protocol_register_type(plugin); _irc_protocol = purple_protocols_add(IRC_TYPE_PROTOCOL, error); if (!_irc_protocol) return FALSE; purple_prefs_remove("/plugins/prpl/irc/quitmsg"); purple_prefs_remove("/plugins/prpl/irc"); irc_register_commands(); purple_signal_register(_irc_protocol, "irc-sending-text", purple_marshal_VOID__POINTER_POINTER, G_TYPE_NONE, 2, PURPLE_TYPE_CONNECTION, G_TYPE_POINTER); /* pointer to a string */ purple_signal_register(_irc_protocol, "irc-receiving-text", purple_marshal_VOID__POINTER_POINTER, G_TYPE_NONE, 2, PURPLE_TYPE_CONNECTION, G_TYPE_POINTER); /* pointer to a string */ return TRUE; } static gboolean plugin_unload(PurplePlugin *plugin, GError **error) { irc_unregister_commands(); if (!purple_protocols_remove(_irc_protocol, error)) return FALSE; return TRUE; } PURPLE_PLUGIN_INIT(irc, plugin_query, plugin_load, plugin_unload);
N8Fear/purple-facebook
.pidgin/libpurple/protocols/irc/irc.c
C
gpl-2.0
30,790
/* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. */ /** * @file tcp_http.cpp Basic functions to receive and send HTTP TCP packets. */ #include "../../stdafx.h" #include "../../debug.h" #include "../../rev.h" #include "../network_func.h" #include "tcp_http.h" #include "../../safeguards.h" /** List of open HTTP connections. */ static std::vector<NetworkHTTPSocketHandler *> _http_connections; /** * Start the querying * @param s the socket of this connection * @param callback the callback for HTTP retrieval * @param host the hostname of the server to connect to * @param url the url at the server * @param data the data to send * @param depth the depth (redirect recursion) of the queries */ NetworkHTTPSocketHandler::NetworkHTTPSocketHandler(SOCKET s, HTTPCallback *callback, const char *host, const char *url, const char *data, int depth) : NetworkSocketHandler(), recv_pos(0), recv_length(0), callback(callback), data(data), redirect_depth(depth), sock(s) { size_t bufferSize = strlen(url) + strlen(host) + strlen(GetNetworkRevisionString()) + (data == nullptr ? 0 : strlen(data)) + 128; char *buffer = AllocaM(char, bufferSize); DEBUG(net, 7, "[tcp/http] requesting %s%s", host, url); if (data != nullptr) { seprintf(buffer, buffer + bufferSize - 1, "POST %s HTTP/1.0\r\nHost: %s\r\nUser-Agent: OpenTTD/%s\r\nContent-Type: text/plain\r\nContent-Length: %d\r\n\r\n%s\r\n", url, host, GetNetworkRevisionString(), (int)strlen(data), data); } else { seprintf(buffer, buffer + bufferSize - 1, "GET %s HTTP/1.0\r\nHost: %s\r\nUser-Agent: OpenTTD/%s\r\n\r\n", url, host, GetNetworkRevisionString()); } ssize_t size = strlen(buffer); ssize_t res = send(this->sock, (const char*)buffer, size, 0); if (res != size) { /* Sending all data failed. Socket can't handle this little bit * of information? Just fall back to the old system! */ this->callback->OnFailure(); delete this; return; } _http_connections.push_back(this); } /** Free whatever needs to be freed. */ NetworkHTTPSocketHandler::~NetworkHTTPSocketHandler() { this->CloseConnection(); if (this->sock != INVALID_SOCKET) closesocket(this->sock); this->sock = INVALID_SOCKET; free(this->data); } NetworkRecvStatus NetworkHTTPSocketHandler::CloseConnection(bool error) { NetworkSocketHandler::CloseConnection(error); return NETWORK_RECV_STATUS_OKAY; } /** * Helper to simplify the error handling. * @param msg the error message to show. */ #define return_error(msg) { DEBUG(net, 0, msg); return -1; } static const char * const NEWLINE = "\r\n"; ///< End of line marker static const char * const END_OF_HEADER = "\r\n\r\n"; ///< End of header marker static const char * const HTTP_1_0 = "HTTP/1.0 "; ///< Preamble for HTTP 1.0 servers static const char * const HTTP_1_1 = "HTTP/1.1 "; ///< Preamble for HTTP 1.1 servers static const char * const CONTENT_LENGTH = "Content-Length: "; ///< Header for the length of the content static const char * const LOCATION = "Location: "; ///< Header for location /** * Handle the header of a HTTP reply. * @return amount of data to continue downloading. * > 0: we need to download N bytes. * = 0: we're being redirected. * < 0: an error occurred. Downloading failed. * @note if an error occurred the header might not be in its * original state. No effort is undertaken to bring * the header in its original state. */ int NetworkHTTPSocketHandler::HandleHeader() { assert(strlen(HTTP_1_0) == strlen(HTTP_1_1)); assert(strstr(this->recv_buffer, END_OF_HEADER) != nullptr); /* We expect a HTTP/1.[01] reply */ if (strncmp(this->recv_buffer, HTTP_1_0, strlen(HTTP_1_0)) != 0 && strncmp(this->recv_buffer, HTTP_1_1, strlen(HTTP_1_1)) != 0) { return_error("[tcp/http] received invalid HTTP reply"); } char *status = this->recv_buffer + strlen(HTTP_1_0); if (strncmp(status, "200", 3) == 0) { /* We are going to receive a document. */ /* Get the length of the document to receive */ char *length = strcasestr(this->recv_buffer, CONTENT_LENGTH); if (length == nullptr) return_error("[tcp/http] missing 'content-length' header"); /* Skip the header */ length += strlen(CONTENT_LENGTH); /* Search the end of the line. This is safe because the header will * always end with two newlines. */ char *end_of_line = strstr(length, NEWLINE); /* Read the length */ *end_of_line = '\0'; int len = atoi(length); /* Restore the header. */ *end_of_line = '\r'; /* Make sure we're going to download at least something; * zero sized files are, for OpenTTD's purposes, always * wrong. You can't have gzips of 0 bytes! */ if (len == 0) return_error("[tcp/http] refusing to download 0 bytes"); DEBUG(net, 7, "[tcp/http] downloading %i bytes", len); return len; } if (strncmp(status, "301", 3) != 0 && strncmp(status, "302", 3) != 0 && strncmp(status, "303", 3) != 0 && strncmp(status, "307", 3) != 0) { /* We are not going to be redirected :(. */ /* Search the end of the line. This is safe because the header will * always end with two newlines. */ *strstr(status, NEWLINE) = '\0'; DEBUG(net, 0, "[tcp/http] unhandled status reply %s", status); return -1; } if (this->redirect_depth == 5) return_error("[tcp/http] too many redirects, looping redirects?"); /* Redirect to other URL */ char *uri = strcasestr(this->recv_buffer, LOCATION); if (uri == nullptr) return_error("[tcp/http] missing 'location' header for redirect"); uri += strlen(LOCATION); /* Search the end of the line. This is safe because the header will * always end with two newlines. */ char *end_of_line = strstr(uri, NEWLINE); *end_of_line = '\0'; DEBUG(net, 6, "[tcp/http] redirecting to %s", uri); int ret = NetworkHTTPSocketHandler::Connect(uri, this->callback, this->data, this->redirect_depth + 1); if (ret != 0) return ret; /* We've relinquished control of data now. */ this->data = nullptr; /* Restore the header. */ *end_of_line = '\r'; return 0; } /** * Connect to the given URI. * @param uri the URI to connect to. * @param callback the callback to send data back on. * @param data the data we want to send (as POST). * @param depth the recursion/redirect depth. */ /* static */ int NetworkHTTPSocketHandler::Connect(char *uri, HTTPCallback *callback, const char *data, int depth) { char *hname = strstr(uri, "://"); if (hname == nullptr) return_error("[tcp/http] invalid location"); hname += 3; char *url = strchr(hname, '/'); if (url == nullptr) return_error("[tcp/http] invalid location"); *url = '\0'; /* Fetch the hostname, and possible port number. */ const char *company = nullptr; const char *port = nullptr; ParseConnectionString(&company, &port, hname); if (company != nullptr) return_error("[tcp/http] invalid hostname"); NetworkAddress address(hname, port == nullptr ? 80 : atoi(port)); /* Restore the URL. */ *url = '/'; new NetworkHTTPContentConnecter(address, callback, url, data, depth); return 0; } #undef return_error /** * Handle receiving of HTTP data. * @return state of the receival of HTTP data. * > 0: we need more cycles for downloading * = 0: we are done downloading * < 0: we have hit an error */ int NetworkHTTPSocketHandler::Receive() { for (;;) { ssize_t res = recv(this->sock, (char *)this->recv_buffer + this->recv_pos, lengthof(this->recv_buffer) - this->recv_pos, 0); if (res == -1) { int err = GET_LAST_ERROR(); if (err != EWOULDBLOCK) { /* Something went wrong... (104 is connection reset by peer) */ if (err != 104) DEBUG(net, 0, "recv failed with error %d", err); return -1; } /* Connection would block, so stop for now */ return 1; } /* No more data... did we get everything we wanted? */ if (res == 0) { if (this->recv_length != 0) return -1; this->callback->OnReceiveData(nullptr, 0); return 0; } /* Wait till we read the end-of-header identifier */ if (this->recv_length == 0) { int read = this->recv_pos + res; int end = min(read, lengthof(this->recv_buffer) - 1); /* Do a 'safe' search for the end of the header. */ char prev = this->recv_buffer[end]; this->recv_buffer[end] = '\0'; char *end_of_header = strstr(this->recv_buffer, END_OF_HEADER); this->recv_buffer[end] = prev; if (end_of_header == nullptr) { if (read == lengthof(this->recv_buffer)) { DEBUG(net, 0, "[tcp/http] header too big"); return -1; } this->recv_pos = read; } else { int ret = this->HandleHeader(); if (ret <= 0) return ret; this->recv_length = ret; end_of_header += strlen(END_OF_HEADER); int len = min(read - (end_of_header - this->recv_buffer), res); if (len != 0) { this->callback->OnReceiveData(end_of_header, len); this->recv_length -= len; } this->recv_pos = 0; } } else { res = min(this->recv_length, res); /* Receive whatever we're expecting. */ this->callback->OnReceiveData(this->recv_buffer, res); this->recv_length -= res; } } } /** * Do the receiving for all HTTP connections. */ /* static */ void NetworkHTTPSocketHandler::HTTPReceive() { /* No connections, just bail out. */ if (_http_connections.size() == 0) return; fd_set read_fd; struct timeval tv; FD_ZERO(&read_fd); for (NetworkHTTPSocketHandler *handler : _http_connections) { FD_SET(handler->sock, &read_fd); } tv.tv_sec = tv.tv_usec = 0; // don't block at all. int n = select(FD_SETSIZE, &read_fd, nullptr, nullptr, &tv); if (n == -1) return; for (auto iter = _http_connections.begin(); iter < _http_connections.end(); /* nothing */) { NetworkHTTPSocketHandler *cur = *iter; if (FD_ISSET(cur->sock, &read_fd)) { int ret = cur->Receive(); /* First send the failure. */ if (ret < 0) cur->callback->OnFailure(); if (ret <= 0) { /* Then... the connection can be closed */ cur->CloseConnection(); iter = _http_connections.erase(iter); delete cur; continue; } } iter++; } }
janisozaur/openttd
src/network/core/tcp_http.cpp
C++
gpl-2.0
10,663
<?php /** * Community Builder (TM) * @version $Id: $ * @package CommunityBuilder * @copyright (C) 2004-2014 www.joomlapolis.com / Lightning MultiCom SA - and its licensors, all rights reserved * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU/GPL version 2 */ use CBLib\Application\Application; use CBLib\Language\CBTxt; use CB\Database\Table\UserTable; use CB\Database\Table\TabTable; use CBLib\Registry\Registry; if ( ! ( defined( '_VALID_CB' ) || defined( '_JEXEC' ) || defined( '_VALID_MOS' ) ) ) { die( 'Direct Access to this location is not allowed.' ); } class HTML_cbgalleryPhotos { /** * @param cbgalleryItemTable[] $rows * @param cbPageNav $pageNav * @param cbgalleryFolderTable|null $folder * @param bool $searching * @param UserTable $viewer * @param UserTable $user * @param TabTable $tab * @param cbTabHandler $plugin * @return string */ static public function showPhotos( $rows, $pageNav, $folder, $searching, $viewer, $user, $tab, $plugin ) { global $_CB_framework, $_PLUGINS; $_PLUGINS->trigger( 'gallery_onBeforeDisplayPhotos', array( &$rows, $pageNav, $folder, $searching, $viewer, $user, $tab, $plugin ) ); /** @var Registry $params */ $params = $tab->params; $allowDownload = $params->get( 'tab_photos_download', 0 ); $profileOwner = ( $viewer->get( 'id' ) == $user->get( 'id' ) ); $cbModerator = Application::User( (int) $viewer->get( 'id' ) )->isGlobalModerator(); if ( $rows ) { static $JS_LOADED = 0; if ( ! $JS_LOADED++ ) { $js = "$( document ).on( 'click', '.galleryImageScrollLeftIcon', function() {" . "var previous = $( this ).data( 'previous-photo' );" . "if ( previous ) {" . "$( previous ).find( '.galleryImageItem' ).click();" . "}" . "});" . "$( document ).on( 'click', '.galleryImageScrollRightIcon', function() {" . "var next = $( this ).data( 'next-photo' );" . "if ( next ) {" . "$( next ).find( '.galleryImageItem' ).click();" . "}" . "});"; $_CB_framework->outputCbJQuery( $js ); } } $return = '<div class="photosItemsContainer">'; $i = 0; if ( $rows ) foreach ( $rows as $row ) { $return .= '<div class="galleryContainer galleryContainer' . (int) $tab->get( 'tabid' ) . '_' . $i . ' img-thumbnail">'; if ( $cbModerator || $profileOwner ) { $menuItems = '<ul class="galleryItemsMenuItems dropdown-menu" style="display: block; position: relative; margin: 0;">' . '<li class="galleryItemsMenuItem"><a href="' . $_CB_framework->pluginClassUrl( $plugin->element, true, array( 'action' => 'items', 'func' => 'edit', 'type' => 'photos', 'id' => (int) $row->get( 'id' ), 'user' => (int) $user->get( 'id' ), 'tab' => (int) $tab->get( 'tabid' ) ) ) . '"><span class="fa fa-edit"></span> ' . CBTxt::T( 'Edit' ) . '</a></li>'; if ( ( $row->get( 'published' ) == -1 ) && $plugin->params->get( 'photos_item_approval', 0 ) ) { if ( $cbModerator ) { $menuItems .= '<li class="galleryItemsMenuItem"><a href="' . $_CB_framework->pluginClassUrl( $plugin->element, true, array( 'action' => 'items', 'func' => 'publish', 'type' => 'photos', 'id' => (int) $row->get( 'id' ), 'user' => (int) $user->get( 'id' ), 'tab' => (int) $tab->get( 'tabid' ) ) ) . '"><span class="fa fa-check"></span> ' . CBTxt::T( 'Approve' ) . '</a></li>'; } } elseif ( $row->get( 'published' ) > 0 ) { $menuItems .= '<li class="galleryItemsMenuItem"><a href="javascript: void(0);" onclick="if ( confirm( \'' . addslashes( CBTxt::T( 'Are you sure you want to unpublish this Photo?' ) ) . '\' ) ) { location.href = \'' . $_CB_framework->pluginClassUrl( $plugin->element, false, array( 'action' => 'items', 'func' => 'unpublish', 'type' => 'photos', 'id' => (int) $row->get( 'id' ), 'user' => (int) $user->get( 'id' ), 'tab' => (int) $tab->get( 'tabid' ) ) ) . '\'; }"><span class="fa fa-times-circle"></span> ' . CBTxt::T( 'Unpublish' ) . '</a></li>'; } else { $menuItems .= '<li class="galleryItemsMenuItem"><a href="' . $_CB_framework->pluginClassUrl( $plugin->element, true, array( 'action' => 'items', 'func' => 'publish', 'type' => 'photos', 'id' => (int) $row->get( 'id' ), 'user' => (int) $user->get( 'id' ), 'tab' => (int) $tab->get( 'tabid' ) ) ) . '"><span class="fa fa-check"></span> ' . CBTxt::T( 'Publish' ) . '</a></li>'; } $menuItems .= '<li class="galleryItemsMenuItem"><a href="javascript: void(0);" onclick="if ( confirm( \'' . addslashes( CBTxt::T( 'Are you sure you want to delete this Photo?' ) ) . '\' ) ) { location.href = \'' . $_CB_framework->pluginClassUrl( $plugin->element, false, array( 'action' => 'items', 'func' => 'delete', 'type' => 'photos', 'id' => (int) $row->get( 'id' ), 'user' => (int) $user->get( 'id' ), 'tab' => (int) $tab->get( 'tabid' ) ) ) . '\'; }"><span class="fa fa-trash-o"></span> ' . CBTxt::T( 'Delete' ) . '</a></li>' . '</ul>'; $menuAttr = cbTooltip( 1, $menuItems, null, 'auto', null, null, null, 'class="btn btn-default btn-xs" data-cbtooltip-menu="true" data-cbtooltip-classes="qtip-nostyle"' ); $return .= '<div class="galleryContainerMenu">' . '<div class="galleryItemsMenu btn-group">' . '<button type="button" ' . trim( $menuAttr ) . '><span class="fa fa-cog"></span> <span class="fa fa-caret-down"></span></button>' . '</div>' . '</div>'; } $title = ( $row->get( 'title' ) ? htmlspecialchars( $row->get( 'title' ) ) : $row->getFileName() ); $item = $title; $logo = null; if ( $row->checkExists() ) { if ( $row->getLinkDomain() ) { $showPath = htmlspecialchars( $row->getFilePath() ); $previewPath = $showPath; $downloadPath = $showPath; } else { $showPath = $_CB_framework->pluginClassUrl( $plugin->element, true, array( 'action' => 'items', 'func' => 'show', 'type' => 'photos', 'id' => (int) $row->get( 'id' ), 'user' => (int) $user->get( 'id' ), 'tab' => (int) $tab->get( 'tabid' ), 'v' => uniqid() ), 'raw', 0, true ); $previewPath = $_CB_framework->pluginClassUrl( $plugin->element, true, array( 'action' => 'items', 'func' => 'preview', 'type' => 'photos', 'id' => (int) $row->get( 'id' ), 'user' => (int) $user->get( 'id' ), 'tab' => (int) $tab->get( 'tabid' ), 'v' => uniqid() ), 'raw', 0, true ); $downloadPath = $_CB_framework->pluginClassUrl( $plugin->element, true, array( 'action' => 'items', 'func' => 'download', 'type' => 'photos', 'id' => (int) $row->get( 'id' ), 'user' => (int) $user->get( 'id' ), 'tab' => (int) $tab->get( 'tabid' ), 'v' => uniqid() ), 'raw', 0, true ); } $image = '<div class="galleryImageContainer">'; if ( $pageNav->total > 1 ) { $image .= '<div class="galleryImageScrollLeft">' . '<table>' . '<tr>' . '<td>' . '<span class="galleryImageScrollLeftIcon fa fa-chevron-left" data-previous-photo=".galleryContainer' . (int) $tab->get( 'tabid' ) . '_' . ( $i == 0 ? ( count( $rows ) - 1 ) : ( $i - 1 ) ) . '"></span>' . '</td>' . '</tr>' . '</table>' . '</div>'; } $image .= '<div style="background-image: url(' . $showPath . ')" class="galleryImage"></div>' . '<div class="galleryImageInfo">' . '<div class="galleryImageInfoRow">' . '<div class="galleryImageInfoTitle col-sm-8 text-left"><strong>' . $title . '</strong></div>' . '<div class="galleryImageInfoOriginal col-sm-4 text-right">' . '<a href="' . $showPath . '" target="_blank">' . CBTxt::T( 'Original' ) . '</a>' . '</div>' . '</div>'; if ( $row->get( 'description' ) || $allowDownload ) { $image .= '<div class="galleryImageInfoRow">' . '<div class="galleryImageInfoDescription col-sm-8 text-left">' . htmlspecialchars( $row->get( 'description' ) ) . '</div>' . '<div class="galleryImageInfoDownload col-sm-4 text-right">'; if ( $allowDownload ) { $image .= '<a href="' . $downloadPath . '" target="_blank">' . CBTxt::T( 'Download' ) . '</a>'; } $image .= '</div>' . '</div>'; } $image .= '</div>'; if ( $pageNav->total > 1 ) { $image .= '<div class="galleryImageScrollRight">' . '<table>' . '<tr>' . '<td>' . '<span class="galleryImageScrollRightIcon fa fa-chevron-right" data-next-photo=".galleryContainer' . (int) $tab->get( 'tabid' ) . '_' . ( isset( $rows[$i+1] ) ? ( $i + 1 ) : 0 ) . '"></span>' . '</td>' . '</tr>' . '</table>' . '</div>'; } $image .= '</div>'; $item = cbTooltip( 1, $image, null, array( '80%', '80%' ), null, $item, 'javascript: void(0);', 'class="galleryImageItem" data-cbtooltip-modal="true" data-cbtooltip-open-solo="document" data-cbtooltip-classes="galleryImageModal"' ); $logo = cbTooltip( 1, $image, null, array( '80%', '80%' ), null, '<div style="background-image: url(' . $previewPath . ')" class="galleryContainerLogo"></div>', 'javascript: void(0);', 'class="galleryImageLogo" data-cbtooltip-modal="true" data-cbtooltip-open-solo="document" data-cbtooltip-classes="galleryImageModal"' ); } $width = (int) $params->get( 'tab_photos_width', 200 ); if ( ! $width ) { $width = 200; } elseif ( $width < 100 ) { $width = 100; } $return .= '<div class="galleryContainerInner" style="height: ' . $width . 'px; width: ' . $width . 'px;">' . '<div class="galleryContainerTop" style="height: ' . ( $width - 40 ) . 'px;">' . $logo . '</div>' . '<div class="galleryContainerBottom" style="height: 40px;">' . '<div class="galleryContainerContent">' . '<div class="galleryContainerContentRow text-nowrap text-overflow small">' . '<strong>' . $item . '</strong>' . '</div>' . '<div class="galleryContainerContentRow text-nowrap text-overflow small">' . '<span title="' . htmlspecialchars( $row->get( 'date' ) ) . '">' . cbFormatDate( $row->get( 'date' ), true, (int) $params->get( 'tab_photos_items_time_display', 0 ), $params->get( 'tab_photos_items_date_format', 'M j, Y' ), $params->get( 'tab_photos_items_time_format', ' g:h A' ) ) . '</span>' . ( $row->get( 'description' ) ? '<div class="galleryContainerDescription">' . cbTooltip( 1, $row->get( 'description' ), $title, 400, null, '<span class="fa fa-info-circle text-muted"></span>' ) . '</div>' : null ) . '</div>' . '</div>' . '</div>' . '</div>' . '</div>'; $i++; } else { $return .= '<div>'; if ( $searching ) { $return .= CBTxt::T( 'No photos search results found.' ); } else { if ( $folder ) { $return .= CBTxt::T( 'This album has no photos.' ); } else { if ( $viewer->get( 'id' ) == $user->get( 'id' ) ) { $return .= CBTxt::T( 'You have no photos.' ); } else { $return .= CBTxt::T( 'This user has no photos.' ); } } } $return .= '</div>'; } if ( $params->get( ( $folder ? 'tab_photos_folder_items_paging' : 'tab_photos_items_paging' ), 1 ) && ( $pageNav->total > $pageNav->limit ) ) { $return .= '<div class="galleryItemsPaging text-center">' . $pageNav->getListLinks() . '</div>'; } $return .= '</div>' . $pageNav->getLimitBox( false ); return $return; } }
kosmosby/medicine-prof
components/com_comprofiler/plugin/user/plug_cbgallery/templates/default/photos.php
PHP
gpl-2.0
12,046
/* * Copyright (C) 2008-2018 TrinityCore <https://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 2 of the License, or (at your * option) any later version. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see <http://www.gnu.org/licenses/>. */ #include "FormationMovementGenerator.h" #include "Creature.h" #include "CreatureAI.h" #include "MovementDefines.h" #include "MoveSplineInit.h" #include "MoveSpline.h" MovementGeneratorType FormationMovementGenerator::GetMovementGeneratorType() const { return FORMATION_MOTION_TYPE; } void FormationMovementGenerator::DoInitialize(Creature* owner) { owner->AddUnitState(UNIT_STATE_ROAMING); if (owner->HasUnitState(UNIT_STATE_NOT_MOVE) || owner->IsMovementPreventedByCasting()) { _interrupt = true; owner->StopMoving(); return; } owner->AddUnitState(UNIT_STATE_ROAMING_MOVE); Movement::MoveSplineInit init(owner); init.MoveTo(_destination.GetPositionX(), _destination.GetPositionY(), _destination.GetPositionZ()); if (_orientation) init.SetFacing(_destination.GetOrientation()); switch (_moveType) { case 2: // WAYPOINT_MOVE_TYPE_LAND init.SetAnimation(Movement::ToGround); break; case 3: // WAYPOINT_MOVE_TYPE_TAKEOFF init.SetAnimation(Movement::ToFly); break; case 1: // WAYPOINT_MOVE_TYPE_RUN init.SetWalk(false); break; case 0: // WAYPOINT_MOVE_TYPE_WALK init.SetWalk(true); break; } if (_run) init.SetWalk(false); init.Launch(); } bool FormationMovementGenerator::DoUpdate(Creature* owner, uint32 /*diff*/) { if (!owner) return false; if (owner->HasUnitState(UNIT_STATE_NOT_MOVE) || owner->IsMovementPreventedByCasting()) { _interrupt = true; owner->StopMoving(); return true; } if ((_interrupt && owner->movespline->Finalized()) || (_recalculateSpeed && !owner->movespline->Finalized())) { _recalculateSpeed = false; _interrupt = false; owner->AddUnitState(UNIT_STATE_ROAMING_MOVE); Movement::MoveSplineInit init(owner); init.MoveTo(_destination.GetPositionX(), _destination.GetPositionY(), _destination.GetPositionZ()); if (_orientation) init.SetFacing(_destination.GetOrientation()); switch (_moveType) { case 2: // WAYPOINT_MOVE_TYPE_LAND init.SetAnimation(Movement::ToGround); break; case 3: // WAYPOINT_MOVE_TYPE_TAKEOFF init.SetAnimation(Movement::ToFly); break; case 1: // WAYPOINT_MOVE_TYPE_RUN init.SetWalk(false); break; case 0: // WAYPOINT_MOVE_TYPE_WALK init.SetWalk(true); break; } if (_run) init.SetWalk(false); init.Launch(); } return !owner->movespline->Finalized(); } void FormationMovementGenerator::DoFinalize(Creature* owner) { owner->ClearUnitState(UNIT_STATE_ROAMING | UNIT_STATE_ROAMING_MOVE); if (owner->movespline->Finalized()) MovementInform(owner); } void FormationMovementGenerator::DoReset(Creature* owner) { owner->StopMoving(); DoInitialize(owner); } void FormationMovementGenerator::MovementInform(Creature* owner) { if (owner->AI()) owner->AI()->MovementInform(FORMATION_MOTION_TYPE, _movementId); }
Pursche/ElunaTrinityWotlk
src/server/game/Movement/MovementGenerators/FormationMovementGenerator.cpp
C++
gpl-2.0
3,995
<?php /** * @copyright http://www.amazing-templates.com * @author Tran Nam Chung * @link http://www.amazing-templates.com * @license License GNU General Public License version 2 or later * @package Amazing-Templates Framework Template */ defined( '_JEXEC' ) or die( 'Restricted access' ); // Include the syndicate functions only once $language = JFactory::getLanguage(); require_once( dirname(__FILE__).DIRECTORY_SEPARATOR.'helper.php' ); require_once( dirname(__FILE__).DIRECTORY_SEPARATOR.'classes'.DIRECTORY_SEPARATOR.'at.helper.php' ); require_once( dirname(__FILE__).DIRECTORY_SEPARATOR.'classes'.DIRECTORY_SEPARATOR.'at.showcase.php' ); require_once( dirname(__FILE__).DIRECTORY_SEPARATOR.'classes'.DIRECTORY_SEPARATOR.'at.articles.php' ); require_once( dirname(__FILE__).DIRECTORY_SEPARATOR.'defined.php' ); $contenSource = mod_at_arrowzex_showcaseHelper::getcontentSource($params); if( $contenSource == 'default'){ $list = at_articles::getList($params); $catid = at_articles::getcati($params); } else if( $contenSource == 'k2' ){ require_once( dirname(__FILE__).DIRECTORY_SEPARATOR.'classes'.DIRECTORY_SEPARATOR.'at.k2content.php' ); $list = at_k2content::getItems($params); $catid = at_k2content::getcati($params); } if (count($list)<1)return; $linkTo = at_articles::getarticleLink($params); $newTab = at_articles::getnewTab($params); $articleTitle = at_articles::getarticleTitle($params); $articleIntro = at_articles::getarticleIntro($params); $showcaseWidth = AMSize::getWidth($params); $showcaseheight = AMSize::getheight($params); $cr = AMSize::getCopyRight($params); $jquery = AMJquery::getJqueryVer($params); $showcase= ASLayout::getshowcase($params); $primaryCount = ASLayout::getprimaryCount($params); $primaryColumns = ASLayout::getprimaryColumns($params); $secondaryColumns = ASLayout::getsecondaryColumns($params); $readmoreIcon = ASLayout::getreadmoreIcon($params); $readmoreBtn = ASLayout::getreadmoreBtn($params); $imgLightboxIcon = ASLayout::getimgLightboxIcon($params); $item_heading = ASLayout::getitem_heading($params); $readmoreText = ASLayout::getreadmoreText($params); $introlength = at_articles::getintroLength($params); $newTabText = ''; if($newTab == 'true'){ $newTabText = "target='_blank'"; } $id=uniqid(); $document = JFactory::getDocument(); $document->addStyleSheet("modules/".AT_NAME."/tmpl/".$showcase."/css/".$showcase.".css"); ?> <div class="at-arrowzex-showcase" style="width:<?php echo $showcaseWidth?>;display:inline-block;"> <?php require( JModuleHelper::getLayoutPath( AT_NAME , $showcase) ); ?> </div>
phamvis/alohabeach-phanthiet
modules/mod_at_arrowzex_showcase/mod_at_arrowzex_showcase.php
PHP
gpl-2.0
2,568
// Useful C# // Copyright (C) 2014-2016 Nicholas Randal // // Useful C# is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. using Microsoft.VisualStudio.TestTools.UnitTesting; using FluentAssertions; using GwtUnit.UnitTest; using Randal.Core.Xml; namespace Randal.Tests.Core.Xml { [TestClass] public sealed class XmlCollectionTests : UnitTestBase<XmlCollectionThens> { [TestMethod, PositiveTest] public void ShouldHaveCollection_WhenCreatingInstance_GivenNoItems() { When(Creating); Then.Collection.Should().NotBeNull(); Then.Collection.Items.Should().HaveCount(0); } [TestMethod, PositiveTest] public void ShouldHaveCollection_WhenCreatingInstance_GivenItems() { Given.Items = new[] { 1, 3, 5, 7 }; When(Creating); Then.Collection.Should().NotBeNull(); Then.Collection.Items .Should().HaveCount(4) .And.Equal(new [] { 1, 3, 5, 7 }); } [TestMethod, PositiveTest] public void ShouldHaveOneItem_WhenAddingItem_GivenValue() { Given.ItemToAdd = 47; When(AddingItem); Then.Collection.Items.Should().HaveCount(1).And.Contain(47); } protected override void Creating() { Then.Collection = GivensDefined("Items") ? new XmlCollection<int>(Given.Items) : new XmlCollection<int>(); } private void AddingItem() { Then.Collection.Add(Given.ItemToAdd); } } public sealed class XmlCollectionThens { public XmlCollection<int> Collection; } }
nick-randal/UsefulCSharp
Randal/Randal.Core.Tests/Xml/XmlCollectionTests.cs
C#
gpl-2.0
1,863
:: 3dworld with textures and moving "enemy" : Mikael Sollenborn 2016 @echo off cd .. setlocal ENABLEDELAYEDEXPANSION cls & cmdwiz setfont 0 set /a W=180,H=110 mode %W%,%H% mode con rate=0 delay=10000 for /F "Tokens=1 delims==" %%v in ('set') do if not %%v==H if not %%v==W if /I not %%v==PATH set "%%v=" cmdgfx.exe "text 8 0 0 Generating_world...\n\n\n___(H_for_help) 82,50" set /a XMID=%W%/2, YMID=%H%/2-4 set /a DIST=0, DRAWMODE=5, GROUNDCOL=2, MULVAL=250, YMULVAL=125" set ASPECT=0.69259 set /a RX=0, RY=720, RZ=0 ::set CUBECOLS=0 4 b1 0 4 b1 0 4 b1 0 4 b1 0 4 b0 0 4 b0 0 1 b1 0 1 b1 0 1 b1 0 1 b1 0 1 b0 0 1 b0 set CUBECOLS=0 0 b2 0 0 b2 0 0 b1 0 0 b1 0 0 b0 0 0 b0 set GROUNDCOLS=0 0 b2 0 0 b0 set /A CNT=0, SLOTS=0 set FWORLD=data\3dworld2.dat if not "%~1" == "" if exist %1 set FWORLD=%1 for /F "tokens=*" %%i in (%FWORLD%) do (if !SLOTS!==0 cmdwiz stringlen "%%i"&set SLOTS=!ERRORLEVEL!)& set WRLD!CNT!=%%i&set /A CNT+=1 set YSLOTS=%CNT% set FN=objects\3dworld.obj set FN2=objects\3dworld-ground.obj set /A PLX=%SLOTS%/2,PLZ=%YSLOTS%/2 set /A XC=-%SLOTS% set /A SLOTM=%SLOTS%-1 set /A YC=-%YSLOTS% set /A YSLOTM=%YSLOTS%-1 set /A CNT=0 & for /L %%i in (0,1,%YSLOTM%) do set SS=!WRLD%%i!& for /L %%j in (0,1,%SLOTM%) do set S=!SS:~%%j,1!&if not "!S!"=="-" for %%a in (!CNT!) do set t%%a=!S!&set sx%%a=1&set sz%%a=1&set sy%%a=!S!&set /A dx%%a = %XC%+%%j*2 & set /A dy%%a=3 & set /A dz%%a = %YC%+%%i*2 & set /A CNT+=1&(if "!S!"=="o" set /A CNT-=1&set /A PLX=%%j*2&set /A PLZ=%%i*2)&(if "!S!"=="M" set /A sy%%a=9)&(if "!S!"=="N" set /A sy%%a=6) set /A TX=(%XC%+%PLX%)*%MULVAL%&set TY=0&set /A TZ=(%YC%+%PLZ%)*%MULVAL%*-1 set NOF_OBJECTS=%CNT% set /A NOF_V=%NOF_OBJECTS%*8 set /A NOF_F=%NOF_OBJECTS%*6 if exist %FN% if exist %FN2% set /A TX=(%XC%+%PLX%)*%MULVAL%&set TY=0&set /A TZ=(%YC%+%PLZ%)*%MULVAL%*-1 & goto SKIPGEN echo usemtl img\tile_door.pcx >%FN% echo vt 0 0 >>%FN% echo vt 0 1 >>%FN% echo vt 1 1 >>%FN% echo vt 1 0 >>%FN% set Vx0=-1&set Vy0=-1&set Vz0=-1 set Vx1=1& set Vy1=-1&set Vz1=-1 set Vx2=1& set Vy2=1& set Vz2=-1 set Vx3=-1&set Vy3=1& set Vz3=-1 set Vx4=-1&set Vy4=-1&set Vz4=1 set Vx5=1& set Vy5=-1&set Vz5=1 set Vx6=1& set Vy6=1& set Vz6=1 set Vx7=-1&set Vy7=1& set Vz7=1 set F0_0=0&set F0_1=3&set F0_2=2&set F0_3=1 set F1_0=5&set F1_1=6&set F1_2=7&set F1_3=4 set F2_0=6&set F2_1=5&set F2_2=1&set F2_3=2 set F3_0=3&set F3_1=0&set F3_2=4&set F3_3=7 set F4_0=7&set F4_1=6&set F4_2=2&set F4_3=3 set F5_0=5&set F5_1=4&set F5_2=0&set F5_3=1 set /A NOF_O=%NOF_OBJECTS%-1 set CNT=1&for /L %%a in (0,1,%NOF_O%) do for /L %%b in (0,1,7) do set /a vx=!Vx%%b!&(if not "!sx%%a!"=="" set /a vx*=!sx%%a!)&set /a vx-=!dx%%a!&set /a vx*=%MULVAL% & set /a vy=!Vy%%b!&(if not "!sy%%a!"=="" if !vy! lss 0 set /a vy*=!sy%%a!)&set /a vy+=!dy%%a!&set /a vy*=%YMULVAL% & set /a vz=!Vz%%b!&(if not "!sz%%a!"=="" set /a vz*=!sz%%a!)&set /a vz+=!dz%%a!&set /a vz*=%MULVAL%&echo v !vx! !vy! !vz!>>%FN%&set /A CNT+=1 for /L %%a in (0,1,%NOF_O%) do for /L %%b in (0,1,5) do if not !t%%a!==M if not !t%%a!==N set /a f0=!F%%b_0!+%%a*8+1&set /a f1=!F%%b_1!+%%a*8+1&set /a f2=!F%%b_2!+%%a*8+1&set /a f3=!F%%b_3!+%%a*8+1&echo f !f0!/1/ !f1!/2/ !f2!/3/ !f3!/4/ >>%FN% echo usemtl img\dos_shade4.pcx >>%FN% for /L %%a in (0,1,%NOF_O%) do for /L %%b in (0,1,5) do if !t%%a!==M set /a f0=!F%%b_0!+%%a*8+1&set /a f1=!F%%b_1!+%%a*8+1&set /a f2=!F%%b_2!+%%a*8+1&set /a f3=!F%%b_3!+%%a*8+1&echo f !f0!/1/ !f1!/2/ !f2!/3/ !f3!/4/ >>%FN% echo usemtl img\dos_shade2.pcx >>%FN% for /L %%a in (0,1,%NOF_O%) do for /L %%b in (0,1,5) do if !t%%a!==N set /a f0=!F%%b_0!+%%a*8+1&set /a f1=!F%%b_1!+%%a*8+1&set /a f2=!F%%b_2!+%%a*8+1&set /a f3=!F%%b_3!+%%a*8+1&echo f !f0!/1/ !f1!/2/ !f2!/3/ !f3!/4/ >>%FN% for /L %%a in (0,1,7) do set Vx%%a=&set Vy%%a=&set Vz%%a=&set F%%a_0=&set F%%a_1=&set F%%a_2=&set F%%a_3= for /L %%a in (0,1,%CNT%) do set sx%%a=&set sy%%a=&set sz%%a=&set dx%%a=&set dy%%a=&set dz%%a=&set t%%a= echo usemtl img\tile_ground.pcx >%FN2% echo vt 0 0 >>%FN2% echo vt 0 1 >>%FN2% echo vt 1 1 >>%FN2% echo vt 1 0 >>%FN2% set TILESIZE=1000 set /A CNT=1, CNT2=0 for /L %%a in (-20000,%TILESIZE%,20000) do for /L %%b in (-20000,%TILESIZE%,20000) do set /A V1=%%a,V2=%%a+%TILESIZE%,V3=%%b,V4=%%b+%TILESIZE% & echo v !V1! 500 !V3! >>%FN2% & echo v !V2! 500 !V3! >>%FN2% & echo v !V2! 500 !V4! >>%FN2% & echo v !V1! 500 !V4! >>%FN2%&set /A CNT2+=1 for /L %%a in (1,1,%CNT2%) do set /a f0=!CNT!&set /a f1=!CNT!+1&set /a f2=!CNT!+2&set /a f3=!CNT!+3 & echo f !f0!/1/ !f1!/2/ !f2!/3/ !f3!/4/ >>%FN2% & set /A CNT+=4 set TILESIZE=&set vx=&set vy=&set vz=&set PLX=&set PLZ=&set CNT2=&for /L %%a in (0,1,4) do set f%%a=&set V%%a= :SKIPGEN set BKSTR="fbox 0 1 b1 0,0,%W%,30 & fbox 0 1 20 0,30,%W%,10 & fbox 9 1 b1 0,40,%W%,6 & fbox 9 1 db 0,46,%W%,4 & fbox 0 0 20 0,51,%W%,5 & fbox 0 %GROUNDCOL% b2 0,53,%W%,5 & fbox 0 %GROUNDCOL% b1 0,57,%W%,10 & fbox 0 %GROUNDCOL% b0 0,64,%W%,22 & fbox 8 %GROUNDCOL% 20 0,80,%W%,100 " set /A MAP=0,ZMOD=0,XMOD=0 set MAPTXT=image data/3dworld2.dat e 0 0 - 146,2 set HELPT=box c 0 fe 3,106,173,2^& text 7 0 0 \e0_LEFT/RIGHT/J/K/MOUSE-X\r_ROTATE___\e0UP/DOWN/W/S\r_MOVE___\e0A/D\r_STRAFE___\e0PGUP/PGDWN\r_RISE/SINK___\e0HOME/END/MOUSE-Y\r_LOOK_UP/DOWN___\e0SPACE_\rRESET_Y___\e0M\r_MAP___\e0E\r_ENEMY___\e0H\r_HELP___\e0ESC\r_QUIT_ 4,107 set HELP=&set /a HLP=0 set RENDERER=_gdi&set REND=0 set STOP= cmdwiz gettime&set ORGT=!errorlevel! set FN3=wrld-temp.obj set ENEMY=1 set /A "f0=%NOF_V%+1,f1=%NOF_V%+1+1,f2=%NOF_V%+1+2,f3=%NOF_V%+1+3" set /A XP1=0,XP2=500,DELT=300, CNT=0, BOUNDSCHECK=1 copy /Y %FN% %FN3%>nul :LOOP for /L %%1 in (1,1,30) do if not defined STOP for /L %%2 in (1,1,10) do if not defined STOP ( if !MAP!==1 set /A "XP=(!TX!+!XMOD!)/(%MULVAL%*2)+%SLOTS%/2+146, ZP=(%YSLOTS%)/2-(!TZ!+!ZMOD!)/(%MULVAL%*2)+2" & set MAPP=pixel c 0 db !XP!,!ZP! if !ENEMY! == 1 ( copy /Y %FN% %FN3%>nul set /A "XP1+=!DELT!, XP2+=!DELT!" if !XP1! gtr 3500 set DELT=-300 if !XP1! lss -5000 set DELT=300 echo v 250 -100 !XP1! >>%FN3% echo v 750 -100 !XP1! >>%FN3% echo v 750 500 !XP1! >>%FN3% echo v 250 500 !XP1! >>%FN3% set /A "CNT+=1,FRM=(!CNT!/8) %% 2" echo usemtl img\ugly!FRM!.pcx e>>%FN3% echo f !f0!/1/ !f1!/4/ !f2!/3/ !f3!/2/>>%FN3% echo f !f0!/1/ !f3!/2/ !f2!/3/ !f1!/4/>>%FN3% ) cmdgfx!RENDERER! "%BKSTR:~1,-1% & 3d %FN2% !DRAWMODE!,-1 !RX!,!RY!,!RZ! 0,0,0 1,1,1,!TX!,!TY!,!TZ! 1,300,0,300 %XMID%,!YMID!,%DIST%,%ASPECT% %GROUNDCOLS% & 3d %FN3% !DRAWMODE!,-1 !RX!,!RY!,!RZ! 0,0,0 1,1,1,!TX!,!TY!,!TZ! 1,1,0,300 %XMID%,!YMID!,%DIST%,%ASPECT% !CUBECOLS! & !MAPT! & !MAPP! & !HELP!" M0uf0Z300 set RET=!errorlevel! if not !RET! == -1 ( set /a "ME=!RET! & 1,ML=(!RET!&2)>>1, MR=(!RET!&4)>>2, MWD=MT=(!RET!&8)>>3, MWU=(!RET!&16)>>4, MX=(!RET!>>5)&511, MY=(!RET!>>14)&127" if not "!OLDMX!"=="" if !ME!==1 if !ML!==0 if !MWD!==0 if !MWU!==0 set /a "RY+=(!OLDMX!-!MX!),TY-=(!OLDMY!-!MY!),YMID+=(!OLDMY!-!MY!)"&(if !RY! gtr 1440 set /A RY=!RY!-1440)&(if !RY! lss 0 set /A RY=1440+!RY!) if !MWD!==1 set /A RY+=720&(if !RY! gtr 1440 set /A RY=!RY!-1440)&(if !RY! lss 0 set /A RY=1440+!RY!) if !MWU!==1 set /A RY+=720&(if !RY! gtr 1440 set /A RY=!RY!-1440)&(if !RY! lss 0 set /A RY=1440+!RY!) if !ME!==1 if !MWD!==0 if !MWU!==0 set /a OLDMX=!MX!,OLDMY=!MY! set /a "NKEY=!RET!>>22, NKD=(!RET!>>21) & 1" if not !NKEY!==0 ( if !NKD!==0 ( set KEY=!NKEY! if !KEY! == 109 set MAPP=&set /A MAP=1-!MAP!&(if !MAP!==0 set MAPT=)&(if !MAP!==1 set MAPT=%MAPTXT%) if !KEY! == 104 set /A HLP=1-!HLP! & (if !HLP!==1 set HELP=!HELPT!)&(if !HLP!==0 set HELP=) if !KEY! == 114 set /A REND=1-!REND! & (if !REND!==0 set RENDERER=_gdi)&(if !REND!==1 set RENDERER=) if !KEY! == 112 cmdwiz getch if !KEY! == 101 set /A ENEMY=1-!ENEMY! & copy /Y %FN% %FN3%>nul if !KEY! == 32 set /a YMID=%H%/2-4 & set TY=0&set BOUNDSCHECK=1 rem if !KEY! == 13 set /a DRAWTMP=!DRAWMODE! & (if !DRAWTMP! == 0 set DRAWMODE=5) & (if !DRAWTMP! == 5 set DRAWMODE=0) if !KEY! == 27 set STOP=1 set KEY=0 ) if !NKD!==1 set KEY=!NKEY! ) ) if not !KEY! == 0 ( if !KEY! == 331 set /A RY+=8&(if !RY! gtr 1440 set /A RY=!RY!-1440)&(if !RY! lss 0 set /A RY=1440+!RY!) if !KEY! == 333 set /A RY-=8&(if !RY! gtr 1440 set /A RY=!RY!-1440)&(if !RY! lss 0 set /A RY=1440+!RY!) if !KEY! == 106 set /A RY+=8&(if !RY! gtr 1440 set /A RY=!RY!-1440)&(if !RY! lss 0 set /A RY=1440+!RY!) if !KEY! == 107 set /A RY-=8&(if !RY! gtr 1440 set /A RY=!RY!-1440)&(if !RY! lss 0 set /A RY=1440+!RY!) if !KEY! == 97 set ORY=!RY!&set /A RY+=360&(if !RY! gtr 1440 set /A RY=!RY!-1440)&(if !RY! lss 0 set /A RY=1440+!RY!)&call :MOVE 1 2&set RY=!ORY! if !KEY! == 100 set ORY=!RY!&set /A RY+=360&(if !RY! gtr 1440 set /A RY=!RY!-1440)&(if !RY! lss 0 set /A RY=1440+!RY!)&call :MOVE -1 2&set RY=!ORY! if !KEY! == 328 call :MOVE 1 1 if !KEY! == 336 call :MOVE -1 1 if !KEY! == 119 call :MOVE 1 1 if !KEY! == 115 call :MOVE -1 1 if !KEY! == 337 set /A TY-=30&set BOUNDSCHECK=0 if !KEY! == 329 set /A TY+=30&set BOUNDSCHECK=0 if !KEY! == 335 set /A TY+=30&set /A YMID-=12 if !KEY! == 327 set /A TY-=30&set /A YMID+=12 ) ) if not defined STOP goto LOOP ::cmdwiz gettime&set /A TLAPSE=(!errorlevel!-%ORGT%)/100&echo !TLAPSE! cs&pause&pause del /Q %FN3% endlocal mode 80,50 mode con rate=31 delay=0 cls cmdwiz setfont 6 goto :eof :MOVE <direction> <div> if !RY! lss 360 set /A AZ=-(360-!RY!)&set /A AX=360-(-!AZ!) if !RY! geq 360 if !RY! lss 720 set /A AZ=360-(720-!RY!)&set /A AX=360-!AZ! if !RY! geq 720 if !RY! lss 1080 set /A AZ=360-(!RY!-720)&set /A AX=-(360-!AZ!) if !RY! geq 1080 set /A AZ=360-(!RY!-720)&set /A AX=-(360-(-!AZ!)) set /a TTZ=%TZ%, TTX=%TX% set /A ZMOD=%MULVAL% & if !TTZ! lss 0 set /A ZMOD=-%MULVAL% set /A XMOD=%MULVAL% & if !TTX! lss 0 set /A XMOD=-%MULVAL% if %BOUNDSCHECK% == 1 for /L %%a in (1,1,4) do set /A TTZ+=%AZ%*%1/%2,TTX+=%AX%*%1/%2 & set /A XP=(!TTX!+%XMOD%)/(%MULVAL%*2)+%SLOTS%/2, ZP=(%YSLOTS%)/2-(!TTZ!+%ZMOD%)/(%MULVAL%*2) & if !ZP! geq 0 if !XP! geq 0 if !ZP! lss %YSLOTS% if !XP! lss %SLOTS% for %%x in (!XP!) do for %%z in (!ZP!) do set SS=!WRLD%%z! & set S=!SS:~%%x,1!& if not "!S!"=="-" if not "!S!"=="0" if not "!S!"=="o" goto :eof set /a TZ+=%AZ%*%1/%2,TX+=%AX%*%1/%2
misol1/cmdgfx
legacy/3dworld3.bat
Batchfile
gpl-2.0
10,219
prog='dbmapreduce' args='-k experiment -f TEST/dbmapreduce_external_file.pl -C make_reducer' cmp='diff -cb ' in=TEST/dbmapreduce_ex.in altcmp='dbfilediff --quiet -E --exit ' altcmp_needs_input_flags=true
gitpan/Fsdb
TEST/dbmapreduce_external_file.cmd
Batchfile
gpl-2.0
204
/*************************************************************************** qgscomposermultiframe.cpp ------------------------------------------------------------ begin : July 2012 copyright : (C) 2012 by Marco Hugentobler email : marco dot hugentobler at sourcepole dot ch *************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #include "qgscomposermultiframe.h" #include "qgscomposerframe.h" #include "qgscomposition.h" #include <QtCore> QgsComposerMultiFrame::QgsComposerMultiFrame( QgsComposition *c, bool createUndoCommands ) : QgsComposerObject( c ) , mResizeMode( UseExistingFrames ) , mCreateUndoCommands( createUndoCommands ) , mIsRecalculatingSize( false ) { mComposition->addMultiFrame( this ); connect( mComposition, SIGNAL( nPagesChanged() ), this, SLOT( handlePageChange() ) ); } QgsComposerMultiFrame::QgsComposerMultiFrame() : QgsComposerObject( nullptr ) , mResizeMode( UseExistingFrames ) , mCreateUndoCommands( false ) , mIsRecalculatingSize( false ) { } QgsComposerMultiFrame::~QgsComposerMultiFrame() { deleteFrames(); } void QgsComposerMultiFrame::setResizeMode( ResizeMode mode ) { if ( mode != mResizeMode ) { mResizeMode = mode; recalculateFrameSizes(); emit changed(); } } void QgsComposerMultiFrame::recalculateFrameSizes() { if ( mFrameItems.size() < 1 ) { return; } QSizeF size = totalSize(); double totalHeight = size.height(); if ( totalHeight < 1 ) { return; } double currentY = 0; double currentHeight = 0; QgsComposerFrame *currentItem = nullptr; for ( int i = 0; i < mFrameItems.size(); ++i ) { if ( mResizeMode != RepeatOnEveryPage && currentY >= totalHeight ) { if ( mResizeMode == RepeatUntilFinished || mResizeMode == ExtendToNextPage ) //remove unneeded frames in extent mode { bool removingPages = true; for ( int j = mFrameItems.size(); j > i; --j ) { int numPagesBefore = mComposition->numPages(); removeFrame( j - 1, removingPages ); //if removing the frame didn't also remove the page, then stop removing pages removingPages = removingPages && ( mComposition->numPages() < numPagesBefore ); } return; } } currentItem = mFrameItems.value( i ); currentHeight = currentItem->rect().height(); if ( mResizeMode == RepeatOnEveryPage ) { currentItem->setContentSection( QRectF( 0, 0, currentItem->rect().width(), currentHeight ) ); } else { currentHeight = findNearbyPageBreak( currentY + currentHeight ) - currentY; currentItem->setContentSection( QRectF( 0, currentY, currentItem->rect().width(), currentHeight ) ); } currentItem->update(); currentY += currentHeight; } //at end of frames but there is still content left. Add other pages if ResizeMode == if ( mResizeMode != UseExistingFrames ) { while ( ( mResizeMode == RepeatOnEveryPage ) || currentY < totalHeight ) { //find out on which page the lower left point of the last frame is int page = qFloor( ( currentItem->pos().y() + currentItem->rect().height() ) / ( mComposition->paperHeight() + mComposition->spaceBetweenPages() ) ) + 1; if ( mResizeMode == RepeatOnEveryPage ) { if ( page >= mComposition->numPages() ) { break; } } else { //add an extra page if required if ( mComposition->numPages() < ( page + 1 ) ) { mComposition->setNumPages( page + 1 ); } } double frameHeight = 0; if ( mResizeMode == RepeatUntilFinished || mResizeMode == RepeatOnEveryPage ) { frameHeight = currentItem->rect().height(); } else //mResizeMode == ExtendToNextPage { frameHeight = ( currentY + mComposition->paperHeight() ) > totalHeight ? totalHeight - currentY : mComposition->paperHeight(); } double newFrameY = page * ( mComposition->paperHeight() + mComposition->spaceBetweenPages() ); if ( mResizeMode == RepeatUntilFinished || mResizeMode == RepeatOnEveryPage ) { newFrameY += currentItem->pos().y() - ( page - 1 ) * ( mComposition->paperHeight() + mComposition->spaceBetweenPages() ); } //create new frame QgsComposerFrame *newFrame = createNewFrame( currentItem, QPointF( currentItem->pos().x(), newFrameY ), QSizeF( currentItem->rect().width(), frameHeight ) ); if ( mResizeMode == RepeatOnEveryPage ) { newFrame->setContentSection( QRectF( 0, 0, newFrame->rect().width(), newFrame->rect().height() ) ); currentY += frameHeight; } else { double contentHeight = findNearbyPageBreak( currentY + newFrame->rect().height() ) - currentY; newFrame->setContentSection( QRectF( 0, currentY, newFrame->rect().width(), contentHeight ) ); currentY += contentHeight; } currentItem = newFrame; } } } void QgsComposerMultiFrame::recalculateFrameRects() { if ( mFrameItems.size() < 1 ) { //no frames, nothing to do return; } Q_FOREACH ( QgsComposerFrame *frame, mFrameItems ) { frame->setSceneRect( QRectF( frame->scenePos().x(), frame->scenePos().y(), frame->rect().width(), frame->rect().height() ) ); } } QgsComposerFrame *QgsComposerMultiFrame::createNewFrame( QgsComposerFrame *currentFrame, QPointF pos, QSizeF size ) { if ( !currentFrame ) { return nullptr; } QgsComposerFrame *newFrame = new QgsComposerFrame( mComposition, this, pos.x(), pos.y(), size.width(), size.height() ); //copy some settings from the parent frame newFrame->setBackgroundColor( currentFrame->backgroundColor() ); newFrame->setBackgroundEnabled( currentFrame->hasBackground() ); newFrame->setBlendMode( currentFrame->blendMode() ); newFrame->setFrameEnabled( currentFrame->hasFrame() ); newFrame->setFrameStrokeColor( currentFrame->frameStrokeColor() ); newFrame->setFrameJoinStyle( currentFrame->frameJoinStyle() ); newFrame->setFrameStrokeWidth( currentFrame->frameStrokeWidth() ); newFrame->setTransparency( currentFrame->transparency() ); newFrame->setHideBackgroundIfEmpty( currentFrame->hideBackgroundIfEmpty() ); addFrame( newFrame, false ); return newFrame; } QString QgsComposerMultiFrame::displayName() const { return tr( "<frame>" ); } void QgsComposerMultiFrame::handleFrameRemoval( QgsComposerItem *item ) { QgsComposerFrame *frame = dynamic_cast<QgsComposerFrame *>( item ); if ( !frame ) { return; } int index = mFrameItems.indexOf( frame ); if ( index == -1 ) { return; } mFrameItems.removeAt( index ); if ( !mFrameItems.isEmpty() ) { if ( resizeMode() != QgsComposerMultiFrame::RepeatOnEveryPage && !mIsRecalculatingSize ) { //removing a frame forces the multi frame to UseExistingFrames resize mode //otherwise the frame may not actually be removed, leading to confusing ui behavior mResizeMode = QgsComposerMultiFrame::UseExistingFrames; emit changed(); recalculateFrameSizes(); } } } void QgsComposerMultiFrame::handlePageChange() { if ( mComposition->numPages() < 1 ) { return; } if ( mResizeMode != RepeatOnEveryPage ) { return; } //remove items beginning on non-existing pages for ( int i = mFrameItems.size() - 1; i >= 0; --i ) { QgsComposerFrame *frame = mFrameItems.at( i ); int page = frame->pos().y() / ( mComposition->paperHeight() + mComposition->spaceBetweenPages() ); if ( page > ( mComposition->numPages() - 1 ) ) { removeFrame( i ); } } //page number of the last item QgsComposerFrame *lastFrame = mFrameItems.last(); int lastItemPage = lastFrame->pos().y() / ( mComposition->paperHeight() + mComposition->spaceBetweenPages() ); for ( int i = lastItemPage + 1; i < mComposition->numPages(); ++i ) { //copy last frame to current page QgsComposerFrame *newFrame = new QgsComposerFrame( mComposition, this, lastFrame->pos().x(), lastFrame->pos().y() + mComposition->paperHeight() + mComposition->spaceBetweenPages(), lastFrame->rect().width(), lastFrame->rect().height() ); addFrame( newFrame, false ); lastFrame = newFrame; } recalculateFrameSizes(); update(); } void QgsComposerMultiFrame::removeFrame( int i, const bool removeEmptyPages ) { if ( i >= mFrameItems.count() ) { return; } QgsComposerFrame *frameItem = mFrameItems.at( i ); if ( mComposition ) { mIsRecalculatingSize = true; int pageNumber = frameItem->page(); //remove item, but don't create undo command mComposition->removeComposerItem( frameItem, false ); //if frame was the only item on the page, remove the page if ( removeEmptyPages && mComposition->pageIsEmpty( pageNumber ) ) { mComposition->setNumPages( mComposition->numPages() - 1 ); } mIsRecalculatingSize = false; } mFrameItems.removeAt( i ); } void QgsComposerMultiFrame::update() { Q_FOREACH ( QgsComposerFrame *frame, mFrameItems ) { frame->update(); } } void QgsComposerMultiFrame::deleteFrames() { ResizeMode bkResizeMode = mResizeMode; mResizeMode = UseExistingFrames; QObject::disconnect( mComposition, SIGNAL( itemRemoved( QgsComposerItem * ) ), this, SLOT( handleFrameRemoval( QgsComposerItem * ) ) ); Q_FOREACH ( QgsComposerFrame *frame, mFrameItems ) { mComposition->removeComposerItem( frame, false ); delete frame; } QObject::connect( mComposition, SIGNAL( itemRemoved( QgsComposerItem * ) ), this, SLOT( handleFrameRemoval( QgsComposerItem * ) ) ); mFrameItems.clear(); mResizeMode = bkResizeMode; } QgsComposerFrame *QgsComposerMultiFrame::frame( int i ) const { if ( i >= mFrameItems.size() ) { return nullptr; } return mFrameItems.at( i ); } int QgsComposerMultiFrame::frameIndex( QgsComposerFrame *frame ) const { return mFrameItems.indexOf( frame ); } bool QgsComposerMultiFrame::_writeXml( QDomElement &elem, QDomDocument &doc, bool ignoreFrames ) const { elem.setAttribute( QStringLiteral( "resizeMode" ), mResizeMode ); if ( !ignoreFrames ) { QList<QgsComposerFrame *>::const_iterator frameIt = mFrameItems.constBegin(); for ( ; frameIt != mFrameItems.constEnd(); ++frameIt ) { ( *frameIt )->writeXml( elem, doc ); } } QgsComposerObject::writeXml( elem, doc ); return true; } bool QgsComposerMultiFrame::_readXml( const QDomElement &itemElem, const QDomDocument &doc, bool ignoreFrames ) { QgsComposerObject::readXml( itemElem, doc ); mResizeMode = static_cast< ResizeMode >( itemElem.attribute( QStringLiteral( "resizeMode" ), QStringLiteral( "0" ) ).toInt() ); if ( !ignoreFrames ) { QDomNodeList frameList = itemElem.elementsByTagName( QStringLiteral( "ComposerFrame" ) ); for ( int i = 0; i < frameList.size(); ++i ) { QDomElement frameElem = frameList.at( i ).toElement(); QgsComposerFrame *newFrame = new QgsComposerFrame( mComposition, this, 0, 0, 0, 0 ); newFrame->readXml( frameElem, doc ); addFrame( newFrame, false ); } //TODO - think there should be a recalculateFrameSizes() call here } return true; }
myarjunar/QGIS
src/core/composer/qgscomposermultiframe.cpp
C++
gpl-2.0
11,973
/* * LIRC SIR driver, (C) 2000 Milan Pikula <www@fornax.sk> * * lirc_sir - Device driver for use with SIR (serial infra red) * mode of IrDA on many notebooks. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * * 2000/09/16 Frank Przybylski <mail@frankprzybylski.de> : * added timeout and relaxed pulse detection, removed gap bug * * 2000/12/15 Christoph Bartelmus <lirc@bartelmus.de> : * added support for Tekram Irmate 210 (sending does not work yet, * kind of disappointing that nobody was able to implement that * before), * major clean-up * * 2001/02/27 Christoph Bartelmus <lirc@bartelmus.de> : * added support for StrongARM SA1100 embedded microprocessor * parts cut'n'pasted from sa1100_ir.c (C) 2000 Russell King */ #include <linux/module.h> #include <linux/sched.h> #include <linux/errno.h> #include <linux/signal.h> #include <linux/fs.h> #include <linux/interrupt.h> #include <linux/ioport.h> #include <linux/kernel.h> #include <linux/serial_reg.h> #include <linux/time.h> #include <linux/string.h> #include <linux/types.h> #include <linux/wait.h> #include <linux/mm.h> #include <linux/delay.h> #include <linux/poll.h> #include <asm/system.h> #include <linux/io.h> #include <asm/irq.h> #include <linux/fcntl.h> #include <linux/platform_device.h> #ifdef LIRC_ON_SA1100 #include <asm/hardware.h> #ifdef CONFIG_SA1100_COLLIE #include <asm/arch/tc35143.h> #include <asm/ucb1200.h> #endif #endif #include <linux/timer.h> #include <media/lirc.h> #include <media/lirc_dev.h> /* SECTION: Definitions */ /*** Tekram dongle ***/ #ifdef LIRC_SIR_TEKRAM /* stolen from kernel source */ /* definitions for Tekram dongle */ #define TEKRAM_115200 0x00 #define TEKRAM_57600 0x01 #define TEKRAM_38400 0x02 #define TEKRAM_19200 0x03 #define TEKRAM_9600 0x04 #define TEKRAM_2400 0x08 #define TEKRAM_PW 0x10 /* Pulse select bit */ /* 10bit * 1s/115200bit in milliseconds = 87ms*/ #define TIME_CONST (10000000ul/115200ul) #endif #ifdef LIRC_SIR_ACTISYS_ACT200L static void init_act200(void); #elif defined(LIRC_SIR_ACTISYS_ACT220L) static void init_act220(void); #endif /*** SA1100 ***/ #ifdef LIRC_ON_SA1100 struct sa1100_ser2_registers { /* HSSP control register */ unsigned char hscr0; /* UART registers */ unsigned char utcr0; unsigned char utcr1; unsigned char utcr2; unsigned char utcr3; unsigned char utcr4; unsigned char utdr; unsigned char utsr0; unsigned char utsr1; } sr; static int irq = IRQ_Ser2ICP; #define LIRC_ON_SA1100_TRANSMITTER_LATENCY 0 /* pulse/space ratio of 50/50 */ static unsigned long pulse_width = (13-LIRC_ON_SA1100_TRANSMITTER_LATENCY); /* 1000000/freq-pulse_width */ static unsigned long space_width = (13-LIRC_ON_SA1100_TRANSMITTER_LATENCY); static unsigned int freq = 38000; /* modulation frequency */ static unsigned int duty_cycle = 50; /* duty cycle of 50% */ #endif #define RBUF_LEN 1024 #define WBUF_LEN 1024 #define LIRC_DRIVER_NAME "lirc_sir" #define PULSE '[' #ifndef LIRC_SIR_TEKRAM /* 9bit * 1s/115200bit in milli seconds = 78.125ms*/ #define TIME_CONST (9000000ul/115200ul) #endif /* timeout for sequences in jiffies (=5/100s), must be longer than TIME_CONST */ #define SIR_TIMEOUT (HZ*5/100) #ifndef LIRC_ON_SA1100 #ifndef LIRC_IRQ #define LIRC_IRQ 4 #endif #ifndef LIRC_PORT /* for external dongles, default to com1 */ #if defined(LIRC_SIR_ACTISYS_ACT200L) || \ defined(LIRC_SIR_ACTISYS_ACT220L) || \ defined(LIRC_SIR_TEKRAM) #define LIRC_PORT 0x3f8 #else /* onboard sir ports are typically com3 */ #define LIRC_PORT 0x3e8 #endif #endif static int io = LIRC_PORT; static int irq = LIRC_IRQ; static int threshold = 3; #endif static DEFINE_SPINLOCK(timer_lock); static struct timer_list timerlist; /* time of last signal change detected */ static struct timeval last_tv = {0, 0}; /* time of last UART data ready interrupt */ static struct timeval last_intr_tv = {0, 0}; static int last_value; static DECLARE_WAIT_QUEUE_HEAD(lirc_read_queue); static DEFINE_SPINLOCK(hardware_lock); static int rx_buf[RBUF_LEN]; static unsigned int rx_tail, rx_head; static int debug; #define dprintk(fmt, args...) \ do { \ if (debug) \ printk(KERN_DEBUG LIRC_DRIVER_NAME ": " \ fmt, ## args); \ } while (0) /* SECTION: Prototypes */ /* Communication with user-space */ static unsigned int lirc_poll(struct file *file, poll_table *wait); static ssize_t lirc_read(struct file *file, char *buf, size_t count, loff_t *ppos); static ssize_t lirc_write(struct file *file, const char *buf, size_t n, loff_t *pos); static long lirc_ioctl(struct file *filep, unsigned int cmd, unsigned long arg); static void add_read_queue(int flag, unsigned long val); static int init_chrdev(void); static void drop_chrdev(void); /* Hardware */ static irqreturn_t sir_interrupt(int irq, void *dev_id); static void send_space(unsigned long len); static void send_pulse(unsigned long len); static int init_hardware(void); static void drop_hardware(void); /* Initialisation */ static int init_port(void); static void drop_port(void); #ifdef LIRC_ON_SA1100 static void on(void) { PPSR |= PPC_TXD2; } static void off(void) { PPSR &= ~PPC_TXD2; } #else static inline unsigned int sinp(int offset) { return inb(io + offset); } static inline void soutp(int offset, int value) { outb(value, io + offset); } #endif #ifndef MAX_UDELAY_MS #define MAX_UDELAY_US 5000 #else #define MAX_UDELAY_US (MAX_UDELAY_MS*1000) #endif static void safe_udelay(unsigned long usecs) { while (usecs > MAX_UDELAY_US) { udelay(MAX_UDELAY_US); usecs -= MAX_UDELAY_US; } udelay(usecs); } /* SECTION: Communication with user-space */ static unsigned int lirc_poll(struct file *file, poll_table *wait) { poll_wait(file, &lirc_read_queue, wait); if (rx_head != rx_tail) return POLLIN | POLLRDNORM; return 0; } static ssize_t lirc_read(struct file *file, char *buf, size_t count, loff_t *ppos) { int n = 0; int retval = 0; DECLARE_WAITQUEUE(wait, current); if (count % sizeof(int)) return -EINVAL; add_wait_queue(&lirc_read_queue, &wait); set_current_state(TASK_INTERRUPTIBLE); while (n < count) { if (rx_head != rx_tail) { if (copy_to_user((void *) buf + n, (void *) (rx_buf + rx_head), sizeof(int))) { retval = -EFAULT; break; } rx_head = (rx_head + 1) & (RBUF_LEN - 1); n += sizeof(int); } else { if (file->f_flags & O_NONBLOCK) { retval = -EAGAIN; break; } if (signal_pending(current)) { retval = -ERESTARTSYS; break; } schedule(); set_current_state(TASK_INTERRUPTIBLE); } } remove_wait_queue(&lirc_read_queue, &wait); set_current_state(TASK_RUNNING); return n ? n : retval; } static ssize_t lirc_write(struct file *file, const char *buf, size_t n, loff_t *pos) { unsigned long flags; int i, count; int *tx_buf; count = n / sizeof(int); if (n % sizeof(int) || count % 2 == 0) return -EINVAL; tx_buf = memdup_user(buf, n); if (IS_ERR(tx_buf)) return PTR_ERR(tx_buf); i = 0; #ifdef LIRC_ON_SA1100 /* disable receiver */ Ser2UTCR3 = 0; #endif local_irq_save(flags); while (1) { if (i >= count) break; if (tx_buf[i]) send_pulse(tx_buf[i]); i++; if (i >= count) break; if (tx_buf[i]) send_space(tx_buf[i]); i++; } local_irq_restore(flags); #ifdef LIRC_ON_SA1100 off(); udelay(1000); /* wait 1ms for IR diode to recover */ Ser2UTCR3 = 0; /* clear status register to prevent unwanted interrupts */ Ser2UTSR0 &= (UTSR0_RID | UTSR0_RBB | UTSR0_REB); /* enable receiver */ Ser2UTCR3 = UTCR3_RXE|UTCR3_RIE; #endif kfree(tx_buf); return count; } static long lirc_ioctl(struct file *filep, unsigned int cmd, unsigned long arg) { int retval = 0; __u32 value = 0; #ifdef LIRC_ON_SA1100 if (cmd == LIRC_GET_FEATURES) value = LIRC_CAN_SEND_PULSE | LIRC_CAN_SET_SEND_DUTY_CYCLE | LIRC_CAN_SET_SEND_CARRIER | LIRC_CAN_REC_MODE2; else if (cmd == LIRC_GET_SEND_MODE) value = LIRC_MODE_PULSE; else if (cmd == LIRC_GET_REC_MODE) value = LIRC_MODE_MODE2; #else if (cmd == LIRC_GET_FEATURES) value = LIRC_CAN_SEND_PULSE | LIRC_CAN_REC_MODE2; else if (cmd == LIRC_GET_SEND_MODE) value = LIRC_MODE_PULSE; else if (cmd == LIRC_GET_REC_MODE) value = LIRC_MODE_MODE2; #endif switch (cmd) { case LIRC_GET_FEATURES: case LIRC_GET_SEND_MODE: case LIRC_GET_REC_MODE: retval = put_user(value, (__u32 *) arg); break; case LIRC_SET_SEND_MODE: case LIRC_SET_REC_MODE: retval = get_user(value, (__u32 *) arg); break; #ifdef LIRC_ON_SA1100 case LIRC_SET_SEND_DUTY_CYCLE: retval = get_user(value, (__u32 *) arg); if (retval) return retval; if (value <= 0 || value > 100) return -EINVAL; /* (value/100)*(1000000/freq) */ duty_cycle = value; pulse_width = (unsigned long) duty_cycle*10000/freq; space_width = (unsigned long) 1000000L/freq-pulse_width; if (pulse_width >= LIRC_ON_SA1100_TRANSMITTER_LATENCY) pulse_width -= LIRC_ON_SA1100_TRANSMITTER_LATENCY; if (space_width >= LIRC_ON_SA1100_TRANSMITTER_LATENCY) space_width -= LIRC_ON_SA1100_TRANSMITTER_LATENCY; break; case LIRC_SET_SEND_CARRIER: retval = get_user(value, (__u32 *) arg); if (retval) return retval; if (value > 500000 || value < 20000) return -EINVAL; freq = value; pulse_width = (unsigned long) duty_cycle*10000/freq; space_width = (unsigned long) 1000000L/freq-pulse_width; if (pulse_width >= LIRC_ON_SA1100_TRANSMITTER_LATENCY) pulse_width -= LIRC_ON_SA1100_TRANSMITTER_LATENCY; if (space_width >= LIRC_ON_SA1100_TRANSMITTER_LATENCY) space_width -= LIRC_ON_SA1100_TRANSMITTER_LATENCY; break; #endif default: retval = -ENOIOCTLCMD; } if (retval) return retval; if (cmd == LIRC_SET_REC_MODE) { if (value != LIRC_MODE_MODE2) retval = -ENOSYS; } else if (cmd == LIRC_SET_SEND_MODE) { if (value != LIRC_MODE_PULSE) retval = -ENOSYS; } return retval; } static void add_read_queue(int flag, unsigned long val) { unsigned int new_rx_tail; int newval; dprintk("add flag %d with val %lu\n", flag, val); newval = val & PULSE_MASK; /* * statistically, pulses are ~TIME_CONST/2 too long. we could * maybe make this more exact, but this is good enough */ if (flag) { /* pulse */ if (newval > TIME_CONST/2) newval -= TIME_CONST/2; else /* should not ever happen */ newval = 1; newval |= PULSE_BIT; } else { newval += TIME_CONST/2; } new_rx_tail = (rx_tail + 1) & (RBUF_LEN - 1); if (new_rx_tail == rx_head) { dprintk("Buffer overrun.\n"); return; } rx_buf[rx_tail] = newval; rx_tail = new_rx_tail; wake_up_interruptible(&lirc_read_queue); } static const struct file_operations lirc_fops = { .owner = THIS_MODULE, .read = lirc_read, .write = lirc_write, .poll = lirc_poll, .unlocked_ioctl = lirc_ioctl, #ifdef CONFIG_COMPAT .compat_ioctl = lirc_ioctl, #endif .open = lirc_dev_fop_open, .release = lirc_dev_fop_close, .llseek = no_llseek, }; static int set_use_inc(void *data) { return 0; } static void set_use_dec(void *data) { } static struct lirc_driver driver = { .name = LIRC_DRIVER_NAME, .minor = -1, .code_length = 1, .sample_rate = 0, .data = NULL, .add_to_buf = NULL, .set_use_inc = set_use_inc, .set_use_dec = set_use_dec, .fops = &lirc_fops, .dev = NULL, .owner = THIS_MODULE, }; static struct platform_device *lirc_sir_dev; static int init_chrdev(void) { driver.dev = &lirc_sir_dev->dev; driver.minor = lirc_register_driver(&driver); if (driver.minor < 0) { printk(KERN_ERR LIRC_DRIVER_NAME ": init_chrdev() failed.\n"); return -EIO; } return 0; } static void drop_chrdev(void) { lirc_unregister_driver(driver.minor); } /* SECTION: Hardware */ static long delta(struct timeval *tv1, struct timeval *tv2) { unsigned long deltv; deltv = tv2->tv_sec - tv1->tv_sec; if (deltv > 15) deltv = 0xFFFFFF; else deltv = deltv*1000000 + tv2->tv_usec - tv1->tv_usec; return deltv; } static void sir_timeout(unsigned long data) { /* * if last received signal was a pulse, but receiving stopped * within the 9 bit frame, we need to finish this pulse and * simulate a signal change to from pulse to space. Otherwise * upper layers will receive two sequences next time. */ unsigned long flags; unsigned long pulse_end; /* avoid interference with interrupt */ spin_lock_irqsave(&timer_lock, flags); if (last_value) { #ifndef LIRC_ON_SA1100 /* clear unread bits in UART and restart */ outb(UART_FCR_CLEAR_RCVR, io + UART_FCR); #endif /* determine 'virtual' pulse end: */ pulse_end = delta(&last_tv, &last_intr_tv); dprintk("timeout add %d for %lu usec\n", last_value, pulse_end); add_read_queue(last_value, pulse_end); last_value = 0; last_tv = last_intr_tv; } spin_unlock_irqrestore(&timer_lock, flags); } static irqreturn_t sir_interrupt(int irq, void *dev_id) { unsigned char data; struct timeval curr_tv; static unsigned long deltv; #ifdef LIRC_ON_SA1100 int status; static int n; status = Ser2UTSR0; /* * Deal with any receive errors first. The bytes in error may be * the only bytes in the receive FIFO, so we do this first. */ while (status & UTSR0_EIF) { int bstat; if (debug) { dprintk("EIF\n"); bstat = Ser2UTSR1; if (bstat & UTSR1_FRE) dprintk("frame error\n"); if (bstat & UTSR1_ROR) dprintk("receive fifo overrun\n"); if (bstat & UTSR1_PRE) dprintk("parity error\n"); } bstat = Ser2UTDR; n++; status = Ser2UTSR0; } if (status & (UTSR0_RFS | UTSR0_RID)) { do_gettimeofday(&curr_tv); deltv = delta(&last_tv, &curr_tv); do { data = Ser2UTDR; dprintk("%d data: %u\n", n, (unsigned int) data); n++; } while (status & UTSR0_RID && /* do not empty fifo in order to * get UTSR0_RID in any case */ Ser2UTSR1 & UTSR1_RNE); /* data ready */ if (status&UTSR0_RID) { add_read_queue(0 , deltv - n * TIME_CONST); /*space*/ add_read_queue(1, n * TIME_CONST); /*pulse*/ n = 0; last_tv = curr_tv; } } if (status & UTSR0_TFS) printk(KERN_ERR "transmit fifo not full, shouldn't happen\n"); /* We must clear certain bits. */ status &= (UTSR0_RID | UTSR0_RBB | UTSR0_REB); if (status) Ser2UTSR0 = status; #else unsigned long deltintrtv; unsigned long flags; int iir, lsr; while ((iir = inb(io + UART_IIR) & UART_IIR_ID)) { switch (iir&UART_IIR_ID) { /* FIXME toto treba preriedit */ case UART_IIR_MSI: (void) inb(io + UART_MSR); break; case UART_IIR_RLSI: (void) inb(io + UART_LSR); break; case UART_IIR_THRI: #if 0 if (lsr & UART_LSR_THRE) /* FIFO is empty */ outb(data, io + UART_TX) #endif break; case UART_IIR_RDI: /* avoid interference with timer */ spin_lock_irqsave(&timer_lock, flags); do { del_timer(&timerlist); data = inb(io + UART_RX); do_gettimeofday(&curr_tv); deltv = delta(&last_tv, &curr_tv); deltintrtv = delta(&last_intr_tv, &curr_tv); dprintk("t %lu, d %d\n", deltintrtv, (int)data); /* * if nothing came in last X cycles, * it was gap */ if (deltintrtv > TIME_CONST * threshold) { if (last_value) { dprintk("GAP\n"); /* simulate signal change */ add_read_queue(last_value, deltv - deltintrtv); last_value = 0; last_tv.tv_sec = last_intr_tv.tv_sec; last_tv.tv_usec = last_intr_tv.tv_usec; deltv = deltintrtv; } } data = 1; if (data ^ last_value) { /* * deltintrtv > 2*TIME_CONST, remember? * the other case is timeout */ add_read_queue(last_value, deltv-TIME_CONST); last_value = data; last_tv = curr_tv; if (last_tv.tv_usec >= TIME_CONST) { last_tv.tv_usec -= TIME_CONST; } else { last_tv.tv_sec--; last_tv.tv_usec += 1000000 - TIME_CONST; } } last_intr_tv = curr_tv; if (data) { /* * start timer for end of * sequence detection */ timerlist.expires = jiffies + SIR_TIMEOUT; add_timer(&timerlist); } lsr = inb(io + UART_LSR); } while (lsr & UART_LSR_DR); /* data ready */ spin_unlock_irqrestore(&timer_lock, flags); break; default: break; } } #endif return IRQ_RETVAL(IRQ_HANDLED); } #ifdef LIRC_ON_SA1100 static void send_pulse(unsigned long length) { unsigned long k, delay; int flag; if (length == 0) return; /* * this won't give us the carrier frequency we really want * due to integer arithmetic, but we can accept this inaccuracy */ for (k = flag = 0; k < length; k += delay, flag = !flag) { if (flag) { off(); delay = space_width; } else { on(); delay = pulse_width; } safe_udelay(delay); } off(); } static void send_space(unsigned long length) { if (length == 0) return; off(); safe_udelay(length); } #else static void send_space(unsigned long len) { safe_udelay(len); } static void send_pulse(unsigned long len) { long bytes_out = len / TIME_CONST; if (bytes_out == 0) bytes_out++; while (bytes_out--) { outb(PULSE, io + UART_TX); /* FIXME treba seriozne cakanie z char/serial.c */ while (!(inb(io + UART_LSR) & UART_LSR_THRE)) ; } } #endif #ifdef CONFIG_SA1100_COLLIE static int sa1100_irda_set_power_collie(int state) { if (state) { /* * 0 - off * 1 - short range, lowest power * 2 - medium range, medium power * 3 - maximum range, high power */ ucb1200_set_io_direction(TC35143_GPIO_IR_ON, TC35143_IODIR_OUTPUT); ucb1200_set_io(TC35143_GPIO_IR_ON, TC35143_IODAT_LOW); udelay(100); } else { /* OFF */ ucb1200_set_io_direction(TC35143_GPIO_IR_ON, TC35143_IODIR_OUTPUT); ucb1200_set_io(TC35143_GPIO_IR_ON, TC35143_IODAT_HIGH); } return 0; } #endif static int init_hardware(void) { unsigned long flags; spin_lock_irqsave(&hardware_lock, flags); /* reset UART */ #ifdef LIRC_ON_SA1100 #ifdef CONFIG_SA1100_BITSY if (machine_is_bitsy()) { printk(KERN_INFO "Power on IR module\n"); set_bitsy_egpio(EGPIO_BITSY_IR_ON); } #endif #ifdef CONFIG_SA1100_COLLIE sa1100_irda_set_power_collie(3); /* power on */ #endif sr.hscr0 = Ser2HSCR0; sr.utcr0 = Ser2UTCR0; sr.utcr1 = Ser2UTCR1; sr.utcr2 = Ser2UTCR2; sr.utcr3 = Ser2UTCR3; sr.utcr4 = Ser2UTCR4; sr.utdr = Ser2UTDR; sr.utsr0 = Ser2UTSR0; sr.utsr1 = Ser2UTSR1; /* configure GPIO */ /* output */ PPDR |= PPC_TXD2; PSDR |= PPC_TXD2; /* set output to 0 */ off(); /* Enable HP-SIR modulation, and ensure that the port is disabled. */ Ser2UTCR3 = 0; Ser2HSCR0 = sr.hscr0 & (~HSCR0_HSSP); /* clear status register to prevent unwanted interrupts */ Ser2UTSR0 &= (UTSR0_RID | UTSR0_RBB | UTSR0_REB); /* 7N1 */ Ser2UTCR0 = UTCR0_1StpBit|UTCR0_7BitData; /* 115200 */ Ser2UTCR1 = 0; Ser2UTCR2 = 1; /* use HPSIR, 1.6 usec pulses */ Ser2UTCR4 = UTCR4_HPSIR|UTCR4_Z1_6us; /* enable receiver, receive fifo interrupt */ Ser2UTCR3 = UTCR3_RXE|UTCR3_RIE; /* clear status register to prevent unwanted interrupts */ Ser2UTSR0 &= (UTSR0_RID | UTSR0_RBB | UTSR0_REB); #elif defined(LIRC_SIR_TEKRAM) /* disable FIFO */ soutp(UART_FCR, UART_FCR_CLEAR_RCVR| UART_FCR_CLEAR_XMIT| UART_FCR_TRIGGER_1); /* Set DLAB 0. */ soutp(UART_LCR, sinp(UART_LCR) & (~UART_LCR_DLAB)); /* First of all, disable all interrupts */ soutp(UART_IER, sinp(UART_IER) & (~(UART_IER_MSI|UART_IER_RLSI|UART_IER_THRI|UART_IER_RDI))); /* Set DLAB 1. */ soutp(UART_LCR, sinp(UART_LCR) | UART_LCR_DLAB); /* Set divisor to 12 => 9600 Baud */ soutp(UART_DLM, 0); soutp(UART_DLL, 12); /* Set DLAB 0. */ soutp(UART_LCR, sinp(UART_LCR) & (~UART_LCR_DLAB)); /* power supply */ soutp(UART_MCR, UART_MCR_RTS|UART_MCR_DTR|UART_MCR_OUT2); safe_udelay(50*1000); /* -DTR low -> reset PIC */ soutp(UART_MCR, UART_MCR_RTS|UART_MCR_OUT2); udelay(1*1000); soutp(UART_MCR, UART_MCR_RTS|UART_MCR_DTR|UART_MCR_OUT2); udelay(100); /* -RTS low -> send control byte */ soutp(UART_MCR, UART_MCR_DTR|UART_MCR_OUT2); udelay(7); soutp(UART_TX, TEKRAM_115200|TEKRAM_PW); /* one byte takes ~1042 usec to transmit at 9600,8N1 */ udelay(1500); /* back to normal operation */ soutp(UART_MCR, UART_MCR_RTS|UART_MCR_DTR|UART_MCR_OUT2); udelay(50); udelay(1500); /* read previous control byte */ printk(KERN_INFO LIRC_DRIVER_NAME ": 0x%02x\n", sinp(UART_RX)); /* Set DLAB 1. */ soutp(UART_LCR, sinp(UART_LCR) | UART_LCR_DLAB); /* Set divisor to 1 => 115200 Baud */ soutp(UART_DLM, 0); soutp(UART_DLL, 1); /* Set DLAB 0, 8 Bit */ soutp(UART_LCR, UART_LCR_WLEN8); /* enable interrupts */ soutp(UART_IER, sinp(UART_IER)|UART_IER_RDI); #else outb(0, io + UART_MCR); outb(0, io + UART_IER); /* init UART */ /* set DLAB, speed = 115200 */ outb(UART_LCR_DLAB | UART_LCR_WLEN7, io + UART_LCR); outb(1, io + UART_DLL); outb(0, io + UART_DLM); /* 7N1+start = 9 bits at 115200 ~ 3 bits at 44000 */ outb(UART_LCR_WLEN7, io + UART_LCR); /* FIFO operation */ outb(UART_FCR_ENABLE_FIFO, io + UART_FCR); /* interrupts */ /* outb(UART_IER_RLSI|UART_IER_RDI|UART_IER_THRI, io + UART_IER); */ outb(UART_IER_RDI, io + UART_IER); /* turn on UART */ outb(UART_MCR_DTR|UART_MCR_RTS|UART_MCR_OUT2, io + UART_MCR); #ifdef LIRC_SIR_ACTISYS_ACT200L init_act200(); #elif defined(LIRC_SIR_ACTISYS_ACT220L) init_act220(); #endif #endif spin_unlock_irqrestore(&hardware_lock, flags); return 0; } static void drop_hardware(void) { unsigned long flags; spin_lock_irqsave(&hardware_lock, flags); #ifdef LIRC_ON_SA1100 Ser2UTCR3 = 0; Ser2UTCR0 = sr.utcr0; Ser2UTCR1 = sr.utcr1; Ser2UTCR2 = sr.utcr2; Ser2UTCR4 = sr.utcr4; Ser2UTCR3 = sr.utcr3; Ser2HSCR0 = sr.hscr0; #ifdef CONFIG_SA1100_BITSY if (machine_is_bitsy()) clr_bitsy_egpio(EGPIO_BITSY_IR_ON); #endif #ifdef CONFIG_SA1100_COLLIE sa1100_irda_set_power_collie(0); /* power off */ #endif #else /* turn off interrupts */ outb(0, io + UART_IER); #endif spin_unlock_irqrestore(&hardware_lock, flags); } /* SECTION: Initialisation */ static int init_port(void) { int retval; /* get I/O port access and IRQ line */ #ifndef LIRC_ON_SA1100 if (request_region(io, 8, LIRC_DRIVER_NAME) == NULL) { printk(KERN_ERR LIRC_DRIVER_NAME ": i/o port 0x%.4x already in use.\n", io); return -EBUSY; } #endif retval = request_irq(irq, sir_interrupt, IRQF_DISABLED, LIRC_DRIVER_NAME, NULL); if (retval < 0) { # ifndef LIRC_ON_SA1100 release_region(io, 8); # endif printk(KERN_ERR LIRC_DRIVER_NAME ": IRQ %d already in use.\n", irq); return retval; } #ifndef LIRC_ON_SA1100 printk(KERN_INFO LIRC_DRIVER_NAME ": I/O port 0x%.4x, IRQ %d.\n", io, irq); #endif init_timer(&timerlist); timerlist.function = sir_timeout; timerlist.data = 0xabadcafe; return 0; } static void drop_port(void) { free_irq(irq, NULL); del_timer_sync(&timerlist); #ifndef LIRC_ON_SA1100 release_region(io, 8); #endif } #ifdef LIRC_SIR_ACTISYS_ACT200L /* Crystal/Cirrus CS8130 IR transceiver, used in Actisys Act200L dongle */ /* some code borrowed from Linux IRDA driver */ /* Register 0: Control register #1 */ #define ACT200L_REG0 0x00 #define ACT200L_TXEN 0x01 /* Enable transmitter */ #define ACT200L_RXEN 0x02 /* Enable receiver */ #define ACT200L_ECHO 0x08 /* Echo control chars */ /* Register 1: Control register #2 */ #define ACT200L_REG1 0x10 #define ACT200L_LODB 0x01 /* Load new baud rate count value */ #define ACT200L_WIDE 0x04 /* Expand the maximum allowable pulse */ /* Register 3: Transmit mode register #2 */ #define ACT200L_REG3 0x30 #define ACT200L_B0 0x01 /* DataBits, 0=6, 1=7, 2=8, 3=9(8P) */ #define ACT200L_B1 0x02 /* DataBits, 0=6, 1=7, 2=8, 3=9(8P) */ #define ACT200L_CHSY 0x04 /* StartBit Synced 0=bittime, 1=startbit */ /* Register 4: Output Power register */ #define ACT200L_REG4 0x40 #define ACT200L_OP0 0x01 /* Enable LED1C output */ #define ACT200L_OP1 0x02 /* Enable LED2C output */ #define ACT200L_BLKR 0x04 /* Register 5: Receive Mode register */ #define ACT200L_REG5 0x50 #define ACT200L_RWIDL 0x01 /* fixed 1.6us pulse mode */ /*.. other various IRDA bit modes, and TV remote modes..*/ /* Register 6: Receive Sensitivity register #1 */ #define ACT200L_REG6 0x60 #define ACT200L_RS0 0x01 /* receive threshold bit 0 */ #define ACT200L_RS1 0x02 /* receive threshold bit 1 */ /* Register 7: Receive Sensitivity register #2 */ #define ACT200L_REG7 0x70 #define ACT200L_ENPOS 0x04 /* Ignore the falling edge */ /* Register 8,9: Baud Rate Divider register #1,#2 */ #define ACT200L_REG8 0x80 #define ACT200L_REG9 0x90 #define ACT200L_2400 0x5f #define ACT200L_9600 0x17 #define ACT200L_19200 0x0b #define ACT200L_38400 0x05 #define ACT200L_57600 0x03 #define ACT200L_115200 0x01 /* Register 13: Control register #3 */ #define ACT200L_REG13 0xd0 #define ACT200L_SHDW 0x01 /* Enable access to shadow registers */ /* Register 15: Status register */ #define ACT200L_REG15 0xf0 /* Register 21: Control register #4 */ #define ACT200L_REG21 0x50 #define ACT200L_EXCK 0x02 /* Disable clock output driver */ #define ACT200L_OSCL 0x04 /* oscillator in low power, medium accuracy mode */ static void init_act200(void) { int i; __u8 control[] = { ACT200L_REG15, ACT200L_REG13 | ACT200L_SHDW, ACT200L_REG21 | ACT200L_EXCK | ACT200L_OSCL, ACT200L_REG13, ACT200L_REG7 | ACT200L_ENPOS, ACT200L_REG6 | ACT200L_RS0 | ACT200L_RS1, ACT200L_REG5 | ACT200L_RWIDL, ACT200L_REG4 | ACT200L_OP0 | ACT200L_OP1 | ACT200L_BLKR, ACT200L_REG3 | ACT200L_B0, ACT200L_REG0 | ACT200L_TXEN | ACT200L_RXEN, ACT200L_REG8 | (ACT200L_115200 & 0x0f), ACT200L_REG9 | ((ACT200L_115200 >> 4) & 0x0f), ACT200L_REG1 | ACT200L_LODB | ACT200L_WIDE }; /* Set DLAB 1. */ soutp(UART_LCR, UART_LCR_DLAB | UART_LCR_WLEN8); /* Set divisor to 12 => 9600 Baud */ soutp(UART_DLM, 0); soutp(UART_DLL, 12); /* Set DLAB 0. */ soutp(UART_LCR, UART_LCR_WLEN8); /* Set divisor to 12 => 9600 Baud */ /* power supply */ soutp(UART_MCR, UART_MCR_RTS|UART_MCR_DTR|UART_MCR_OUT2); for (i = 0; i < 50; i++) safe_udelay(1000); /* Reset the dongle : set RTS low for 25 ms */ soutp(UART_MCR, UART_MCR_DTR|UART_MCR_OUT2); for (i = 0; i < 25; i++) udelay(1000); soutp(UART_MCR, UART_MCR_RTS|UART_MCR_DTR|UART_MCR_OUT2); udelay(100); /* Clear DTR and set RTS to enter command mode */ soutp(UART_MCR, UART_MCR_RTS|UART_MCR_OUT2); udelay(7); /* send out the control register settings for 115K 7N1 SIR operation */ for (i = 0; i < sizeof(control); i++) { soutp(UART_TX, control[i]); /* one byte takes ~1042 usec to transmit at 9600,8N1 */ udelay(1500); } /* back to normal operation */ soutp(UART_MCR, UART_MCR_RTS|UART_MCR_DTR|UART_MCR_OUT2); udelay(50); udelay(1500); soutp(UART_LCR, sinp(UART_LCR) | UART_LCR_DLAB); /* Set DLAB 1. */ soutp(UART_LCR, UART_LCR_DLAB | UART_LCR_WLEN7); /* Set divisor to 1 => 115200 Baud */ soutp(UART_DLM, 0); soutp(UART_DLL, 1); /* Set DLAB 0. */ soutp(UART_LCR, sinp(UART_LCR) & (~UART_LCR_DLAB)); /* Set DLAB 0, 7 Bit */ soutp(UART_LCR, UART_LCR_WLEN7); /* enable interrupts */ soutp(UART_IER, sinp(UART_IER)|UART_IER_RDI); } #endif #ifdef LIRC_SIR_ACTISYS_ACT220L /* * Derived from linux IrDA driver (net/irda/actisys.c) * Drop me a mail for any kind of comment: maxx@spaceboyz.net */ void init_act220(void) { int i; /* DLAB 1 */ soutp(UART_LCR, UART_LCR_DLAB|UART_LCR_WLEN7); /* 9600 baud */ soutp(UART_DLM, 0); soutp(UART_DLL, 12); /* DLAB 0 */ soutp(UART_LCR, UART_LCR_WLEN7); /* reset the dongle, set DTR low for 10us */ soutp(UART_MCR, UART_MCR_RTS|UART_MCR_OUT2); udelay(10); /* back to normal (still 9600) */ soutp(UART_MCR, UART_MCR_DTR|UART_MCR_RTS|UART_MCR_OUT2); /* * send RTS pulses until we reach 115200 * i hope this is really the same for act220l/act220l+ */ for (i = 0; i < 3; i++) { udelay(10); /* set RTS low for 10 us */ soutp(UART_MCR, UART_MCR_DTR|UART_MCR_OUT2); udelay(10); /* set RTS high for 10 us */ soutp(UART_MCR, UART_MCR_RTS|UART_MCR_DTR|UART_MCR_OUT2); } /* back to normal operation */ udelay(1500); /* better safe than sorry ;) */ /* Set DLAB 1. */ soutp(UART_LCR, UART_LCR_DLAB | UART_LCR_WLEN7); /* Set divisor to 1 => 115200 Baud */ soutp(UART_DLM, 0); soutp(UART_DLL, 1); /* Set DLAB 0, 7 Bit */ /* The dongle doesn't seem to have any problems with operation at 7N1 */ soutp(UART_LCR, UART_LCR_WLEN7); /* enable interrupts */ soutp(UART_IER, UART_IER_RDI); } #endif static int init_lirc_sir(void) { int retval; init_waitqueue_head(&lirc_read_queue); retval = init_port(); if (retval < 0) return retval; init_hardware(); printk(KERN_INFO LIRC_DRIVER_NAME ": Installed.\n"); return 0; } static int __devinit lirc_sir_probe(struct platform_device *dev) { return 0; } static int __devexit lirc_sir_remove(struct platform_device *dev) { return 0; } static struct platform_driver lirc_sir_driver = { .probe = lirc_sir_probe, .remove = __devexit_p(lirc_sir_remove), .driver = { .name = "lirc_sir", .owner = THIS_MODULE, }, }; static int __init lirc_sir_init(void) { int retval; retval = platform_driver_register(&lirc_sir_driver); if (retval) { printk(KERN_ERR LIRC_DRIVER_NAME ": Platform driver register " "failed!\n"); return -ENODEV; } lirc_sir_dev = platform_device_alloc("lirc_dev", 0); if (!lirc_sir_dev) { printk(KERN_ERR LIRC_DRIVER_NAME ": Platform device alloc " "failed!\n"); retval = -ENOMEM; goto pdev_alloc_fail; } retval = platform_device_add(lirc_sir_dev); if (retval) { printk(KERN_ERR LIRC_DRIVER_NAME ": Platform device add " "failed!\n"); retval = -ENODEV; goto pdev_add_fail; } retval = init_chrdev(); if (retval < 0) goto fail; retval = init_lirc_sir(); if (retval) { drop_chrdev(); goto fail; } return 0; fail: platform_device_del(lirc_sir_dev); pdev_add_fail: platform_device_put(lirc_sir_dev); pdev_alloc_fail: platform_driver_unregister(&lirc_sir_driver); return retval; } static void __exit lirc_sir_exit(void) { drop_hardware(); drop_chrdev(); drop_port(); platform_device_unregister(lirc_sir_dev); platform_driver_unregister(&lirc_sir_driver); printk(KERN_INFO LIRC_DRIVER_NAME ": Uninstalled.\n"); } module_init(lirc_sir_init); module_exit(lirc_sir_exit); #ifdef LIRC_SIR_TEKRAM MODULE_DESCRIPTION("Infrared receiver driver for Tekram Irmate 210"); MODULE_AUTHOR("Christoph Bartelmus"); #elif defined(LIRC_ON_SA1100) MODULE_DESCRIPTION("LIRC driver for StrongARM SA1100 embedded microprocessor"); MODULE_AUTHOR("Christoph Bartelmus"); #elif defined(LIRC_SIR_ACTISYS_ACT200L) MODULE_DESCRIPTION("LIRC driver for Actisys Act200L"); MODULE_AUTHOR("Karl Bongers"); #elif defined(LIRC_SIR_ACTISYS_ACT220L) MODULE_DESCRIPTION("LIRC driver for Actisys Act220L(+)"); MODULE_AUTHOR("Jan Roemisch"); #else MODULE_DESCRIPTION("Infrared receiver driver for SIR type serial ports"); MODULE_AUTHOR("Milan Pikula"); #endif MODULE_LICENSE("GPL"); #ifdef LIRC_ON_SA1100 module_param(irq, int, S_IRUGO); MODULE_PARM_DESC(irq, "Interrupt (16)"); #else module_param(io, int, S_IRUGO); MODULE_PARM_DESC(io, "I/O address base (0x3f8 or 0x2f8)"); module_param(irq, int, S_IRUGO); MODULE_PARM_DESC(irq, "Interrupt (4 or 3)"); module_param(threshold, int, S_IRUGO); MODULE_PARM_DESC(threshold, "space detection threshold (3)"); #endif module_param(debug, bool, S_IRUGO | S_IWUSR); MODULE_PARM_DESC(debug, "Enable debugging messages");
andi34/kernel_samsung_espresso-cm
drivers/staging/lirc/lirc_sir.c
C
gpl-2.0
32,224
<?php /*------------------------------------------------------------------------ # races.php - TrackClub Component # ------------------------------------------------------------------------ # author Michael # copyright Copyright (C) 2014. All Rights Reserved # license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html # website tuscaloosatrackclub.com -------------------------------------------------------------------------*/ // No direct access to this file defined('_JEXEC') or die('Restricted access'); // import Joomla controlleradmin library jimport('joomla.application.component.controlleradmin'); /** * Races Controller */ class TrackclubsControllerchooserace extends JControllerAdmin { /** * Proxy for getModel. * @since 2.5 */ public function getModel($name = 'race', $prefix = 'TrackclubsModel') { $model = parent::getModel($name, $prefix, array('ignore_request' => true)); return $model; } } ?>
mstewartua/newprod
administrator/components/com_trackclubs/controllers/chooserace.php
PHP
gpl-2.0
957
/** eMail is a command line SMTP client. Copyright (C) 2001 - 2008 email by Dean Jones Software supplied and written by http://deanproxy.com/ This file is part of eMail. eMail is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. eMail is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with eMail; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA **/ #ifndef PROGRESS_H #define PROGRESS_H 1 struct prbar { short error; short bar_size; short percent; int progress; int truncated_file_size; int actual_file_size; int curr_size; char *subject; char *size_type; char *buf; }; struct prbar *prbarInit(size_t bytes); void prbarPrint(size_t bytes, struct prbar *bar); void prbarDestroy(struct prbar *bar); #endif /* PROGRESS_H */
deanproxy/eMail
include/progress_bar.h
C
gpl-2.0
1,279
#!/bin/bash # Function tries to mount the local cache function mount_network_cache { local mountpoint=$1 local smb_server=$2 if [[ "$mountpoint" == "" ]]; then mountpoint=/media/adam-minipc/other fi if [[ "$smb_server" == "" ]]; then smb_server=adam-minipc fi mount_smb_share $mountpoint $smb_server } function smb_share_client { local server=$1 local remote_name=$2 local local_path=$3 local credentials_file=$4 local extra_opt=$5 if [ "${credentials_file}" == "auto" ]; then credentials_file="/etc/samba/user" fi if [ -n "${extra_opt}" ]; then extra_opt=",${extra_opt}" fi fstab_entry "//${server}/${remote_name}" ${local_path} cifs users,credentials=${credentials_file},noexec,noauto${extra_opt} 0 0 } function mount_smb_share { local mountpoint=$1 local smbserver=$2 if is_host_up $2; then mount_dir $1 return $? fi return 1 } function mount_dir { local mountpoint=$1 if [ ! -d "$mountpoint" ]; then if is_mounted "" $mountpoint; then return 0 fi while [ ! -d "$mountpoint" ]; do mountpoint=$(dirname "$mountpoint") done logexec mount "$mountpoint" return $? fi return 1 } function fstab_entry { local spec=$1 local file=$2 local vfstype=$3 local opt=$4 local dump=$5 local passno=$6 install_apt_package augeas-tools augtool logheredoc EOT cat >/tmp/fstab.augeas<<EOT #!/usr/bin/augtool -Asf # The -A combined with this makes things much faster # by loading only the required lens/file transform Fstab.lns incl /etc/fstab load # $noentry will match /files/etc/fstab only if the entry isn't there yet defvar noentry /files/etc/fstab[count(*[file="${file}"])=0] # Create the entry if it's missing set \$noentry/01/spec "${spec}" set \$noentry/01/file "${file}" # Now amend existing entry or finish creating the missing one defvar entry /files/etc/fstab/*[file="${file}"] set \$entry/spec "${spec}" set \$entry/vfstype "${vfstype}" rm \$entry/opt EOT OLDIFS="$IFS" export IFS="," local i=1 pattern='^([^=]+)=(.*)$' for entry in $opt; do if [ "$i" == "1" ]; then echo "ins opt after \$entry/vfstype">>/tmp/fstab.augeas else echo "ins opt after \$entry/opt[last()]">>/tmp/fstab.augeas fi if [[ "${entry}" =~ $pattern ]]; then lhs=${BASH_REMATCH[1]} rhs=${BASH_REMATCH[2]} echo "set \$entry/opt[last()] \"$lhs\"">>/tmp/fstab.augeas echo "set \$entry/opt[last()]/value \"${rhs}\"">>/tmp/fstab.augeas else echo "set \$entry/opt[last()] \"$entry\"">>/tmp/fstab.augeas fi let "i=i+1" done export IFS="$OLDIFS" echo "set \$entry/dump \"${dump}\"">>/tmp/fstab.augeas echo "set \$entry/passno \"${passno}\"">>/tmp/fstab.augeas logexec sudo /usr/bin/augtool -Asf /tmp/fstab.augeas } #Iterates over all devices managed by dmsetup and returns true, if found the device with the given path function find_device_in_dmapper { local target="$1" local pattern1='^([^ ]+ +)' local pattern2='device: *()[^ ]+)$' local line local device local backend sudo dmsetup ls | while read line; do if [[ "$line" =~ $pattern1 ]]; then device=${BASH_REMATCH[1]} backend=$(sudo cryptsetup status $device | grep -F "device:") if [[ "${backend}" =~ $pattern2 ]]; then device=${BASH_REMATCH[1]} if [ "$device" == "$target" ]; then echo "$device" return 0 fi fi else errcho "Syntax error of the output of dmsetup." fi done return -1 #not found } function is_mounted { local device=$1 local mountpoint=$2 if [ -n "$device" ] && [ -n "$mountpoint" ]; then ans=$(mount | grep -F "${device} on ${mountpoint}") elif [ -n "$device" ]; then ans=$(mount | grep -F "${device} on ") elif [ -n "$mountpoint" ]; then ans=$(mount | grep -F " on ${mountpoint}") else errcho "is_mounted called with no arguments" return -1 fi if [ "$ans" != "" ]; then return 0 else return -1 fi } function find_device_from_mountpoint { local mountpoint="$1" local pattern="^(.*) on (${mountpoint}) type " local ans ans=$(mount | grep -E " on ${mountpoint} ") if [[ "$ans" =~ $pattern ]]; then echo "${BASH_REMATCH[1]}" return 0 fi return -1 } #Gets the backing device from the dm device if it uses cryptsetup function device_from_crypt_dmapper { local dmdevice=$1 local pattern='device: *([^ ]+)$' local backend_line=$(sudo cryptsetup status "/dev/mapper/${dmdevice}" | grep -F "device:") if [[ "$backend_line" =~ $pattern ]]; then echo "${BASH_REMATCH[1]}" return 0 else echo "" return -1 fi } function backing_luks_device_from_mount_point { local mountpoint="$1" local pattern='^/dev/mapper/(.*)$' local actual_dmdevice=$(find_device_from_mountpoint "${mount_point}") if [ -n "${actual_dmdevice}" ]; then if [[ "$actual_dmdevice" =~ $pattern ]]; then local actual_dmdevice="${BASH_REMATCH[1]}" local actual_device=device_from_crypt_dmapper ${actual_dmdevice} if [ -n "${actual_device}" ]; then echo "$actual_device" return 0 else errcho "The device mounted under ${mount_point} is not Luks. Exiting." return 3 fi else errcho "Something else is mounted under ${mount_point}. Exiting." return 2 fi else errcho "Mount point not found. Exiting." return 1 fi }
adamryczkowski/puppet-bootstrap
libmount.sh
Shell
gpl-2.0
5,207
#include <stdio.h> #include <stdlib.h> #include <stdint.h> #include <string.h> #include <assert.h> #include <ctype.h> #include <sys/time.h> #include <sys/types.h> #include <regex.h> //#define PRINT_LEDGER #if defined(__GNUC__) #define likely(x) __builtin_expect((x),1) #define unlikely(x) __builtin_expect((x),0) #else #define likely(x) (x) #define unlikely(x) (x) #endif #define MAX_PATH 8 #define MAX_MOVES 32 #define COLUMNS 8 #define ROWS 8 #define SQUARES 32 #define TRUE 1 #define FALSE 0 /* 0 indexed */ #define MASK(square) ((square_t)1 << (square)) /* 1 indexed */ #define SQR(n) ((n) - 1) #define SQUARE(square) MASK(SQR(square)) #define PLACE(pieces, square) do { ((pieces) |= MASK(square)); } while(0) #define CLEAR(pieces, square) do { ((pieces) &= ~MASK(square)); } while(0) #define OCCUPIED(pieces, square) ((pieces) & MASK(square)) #define MOVE(pieces, from, to) do { PLACE(pieces, to); CLEAR(pieces, from); } while(0) #define ROW(square) (((square) / 4) - 1) #define WHITE(state) ((state).white | (state).white_kings) #define BLACK(state) ((state).black | (state).black_kings) #define KINGS(state) ((state).black_kings | (state).white_kings) #define BLACK_KING(state, square) ((OCCUPIED((state).black_kings, square)) != 0) #define WHITE_KING(state, square) ((OCCUPIED((state).white_kings, square)) != 0) #define PAWNS(state) ((state).white | (state).black) #define FULLBOARD(state) (WHITE(state) | BLACK(state)) #define ODDROW(square) ((square / 4) & 1) #define UP_LEFT(square) (ODDROW(square) ? (square) + 4 : (square) + 3) #define UP_RIGHT(square) (ODDROW(square) ? (square) + 5 : (square) + 4) #define DOWN_LEFT(square) (ODDROW(square) ? (square) - 4 : (square) - 5) #define DOWN_RIGHT(square) (ODDROW(square) ? (square) - 3 : (square) - 4) #define JUMP_UP_LEFT(square) ((square) + 7) #define JUMP_UP_RIGHT(square) ((square) + 9) #define JUMP_DOWN_LEFT(square) ((square) - 9) #define JUMP_DOWN_RIGHT(square) ((square) - 7) #define TOP(square) ((MASK(square) & (MASK(28) | MASK(29) | MASK(30) | MASK(31))) != 0) #define LEFT(square) ((MASK(square) & (MASK(0) | MASK(8) | MASK(16) | MASK(24))) != 0) #define RIGHT(square) ((MASK(square) & (MASK(7) | MASK(15) | MASK(23) | MASK(31))) != 0) #define BOTTOM(square) ((MASK(square) & (MASK(0) | MASK(1) | MASK(2) | MASK(3))) != 0) #define TOP2(square) ((MASK(square) & (MASK(24) | MASK(25) | MASK(26) | MASK(27))) != 0) #define TOP2ROWS(square) ((MASK(square) & (MASK(24) | MASK(25) | MASK(26) | MASK(27) | MASK(28) | MASK(29) | MASK(30) | MASK(31))) != 0) #define LEFT2(square) ((MASK(square) & (MASK(4) | MASK(12) | MASK(20) | MASK(28))) != 0) #define LEFT2COLS(square) ((MASK(square) & (MASK(4) | MASK(12) | MASK(20) | MASK(28) | MASK(0) | MASK(8) | MASK(16) | MASK(24))) != 0) #define RIGHT2(square) ((MASK(square) & (MASK(3) | MASK(11) | MASK(19) | MASK(27))) != 0) #define RIGHT2COLS(square) ((MASK(square) & (MASK(3) | MASK(11) | MASK(19) | MASK(27) | MASK(7) | MASK(15) | MASK(23) | MASK(31))) != 0) #define BOTTOM2(square) ((MASK(square) & (MASK(4) | MASK(5) | MASK(6) | MASK(7))) != 0) #define BOTTOM2ROWS(square) ((MASK(square) & (MASK(4) | MASK(5) | MASK(6) | MASK(7) | MASK(0) | MASK(1) | MASK(2) | MASK(3))) != 0) static const char * __unittest = 0; /* static int __unittest_number = 0; */ #define ENTER_UNITTEST() do { __unittest = __func__; } while(0) #define EXIT_UNITTEST() do { printf("Passed %s.\n", __unittest); } while(0) #define __UNITTEST_FAIL(line) do { \ fprintf(stderr, "Unit Test [%s] failed on line: %d\n", __unittest, line); \ exit(1); \ } while(0) #define UNITTEST_ASSERT(actual, expected) do { \ if ((actual) != (expected)) { \ __UNITTEST_FAIL(__LINE__); \ } \ } while(0) #define UNITTEST_ASSERT_MSG(actual, expected, format) do { \ if ((actual) != (expected)) { \ fprintf(stderr, "Expected: " format ", Actual: " format "\n", (expected), (actual)); \ __UNITTEST_FAIL(__LINE__); \ } \ } while(0) #define UNITTEST_ASSERT_NEQU(actual, expected) do { \ if ((actual) == (expected)) { \ __UNITTEST_FAIL(__LINE__); \ } \ } while(0) #define UNITTEST_ASSERT_MOVELIST(actual, expected) do { \ move_list_sort(&actual); \ move_list_sort(&expected); \ if (move_list_compare(&actual, &expected) != 0) { \ printf("Expected: "); \ print_move_list(expected); \ printf("\nActual: "); \ print_move_list(actual); \ printf("\n"); \ __UNITTEST_FAIL(__LINE__); \ } \ } while(0) /* --- types --- */ typedef uint8_t boolean; typedef uint32_t pieces_t; typedef pieces_t square_t; struct state_t { pieces_t black; pieces_t black_kings; pieces_t white; pieces_t white_kings; uint8_t moves; }; struct move_t { uint8_t src; /* square started on */ uint8_t dst; /* square ended on */ uint8_t path[MAX_PATH]; /* path traveled if this was a multi-jump */ uint8_t pathlen; }; struct move_list_t { struct move_t moves[MAX_MOVES]; int njumps; /* number of jumps */ int nmoves; /* number of regular moves */ }; /* -- end types -- */ boolean is_noncapture(const struct move_t* move) { /* TODO: switch to bitmaps */ return (move->pathlen == 0) && (move->dst == UP_LEFT(move->src) || move->dst == UP_RIGHT(move->src) || move->dst == DOWN_LEFT(move->src) || move->dst == DOWN_RIGHT(move->src)); } boolean is_capture(const struct move_t* move) { return !is_noncapture(move); } #define move_init(move) memset(move, 0, sizeof(*move)) /* move_compare: compare 2 moves for equality * 0 => equal * 1 => lhs > rhs * -1 => lhs < rhs */ int move_compare(struct move_t* lhs, struct move_t* rhs) { int ret; if (lhs->src != rhs->src) { ret = lhs->src - rhs->src; } else if (lhs->dst != rhs->dst) { ret = lhs->dst - rhs->dst; } else if (lhs->pathlen != rhs->pathlen) { ret = lhs->pathlen - rhs->pathlen; } else { ret = memcmp(&(lhs->path[0]), &(rhs->path[0]), sizeof(lhs->path[0]) * lhs->pathlen); } return ret; } #define move_list_num_moves(list) ((list).njumps + (list).nmoves) /* TODO: print captures with 'x' between intead of '-' */ void __print_move(FILE* file, struct move_t* move /*, boolean is_capture */) { int i; fprintf(file, "%d-", move->src + 1); for (i = 0; i < move->pathlen; ++i) { fprintf(file, "%d-", move->path[i] + 1); } fprintf(file, "%d", move->dst + 1); } #define print_move(move) __print_move(stdout, &(move)) /* move_list_compare: compare 2 move_lists for strict equality * 0 => equal * 1 => lhs > rhs * -1 => lhs < rhs */ int move_list_compare(struct move_list_t* lhs, struct move_list_t* rhs) { int ret = 0; int i; const int lhs_moves = move_list_num_moves(*lhs); const int rhs_moves = move_list_num_moves(*rhs); if (lhs_moves != rhs_moves) { ret = lhs_moves - rhs_moves; } else { for (i = 0; i < lhs_moves; ++i) { ret = move_compare(&(lhs->moves[i]), &(rhs->moves[i])); if (ret != 0) { break; } } } return ret; } int __move_compare_generic(const void* lhs, const void* rhs) { return move_compare((struct move_t*)lhs, (struct move_t*)rhs); } void move_list_sort(struct move_list_t* list) { int nmoves = move_list_num_moves(*list); if (nmoves != 0) { qsort(&(list->moves[0]), nmoves, sizeof(list->moves[0]), &__move_compare_generic); } } int move_list_init(struct move_list_t* list) { list->njumps = 0; list->nmoves = 0; memset(&(list->moves[0]), 0, sizeof(list->moves[0]) * MAX_MOVES); return 0; } void __print_move_list(FILE* file, struct move_list_t* list) { int i; const int moves = move_list_num_moves(*list); if (moves > 0) { __print_move(file, &(list->moves[0])); for (i = 1; i < moves; ++i) { fprintf(file, ", "); __print_move(file, &(list->moves[i])); } fprintf(file, ", moves: %d, jumps: %d", list->nmoves, list->njumps); } } #define print_move_list(list) __print_move_list(stdout, &(list)); void __move_list_append_move(struct move_list_t* list, int src, int dst) { struct move_t* const move = &(list->moves[move_list_num_moves(*list)]); move->src = src; move->dst = dst; ++list->nmoves; } #define move_list_append_move(list, src, dst) __move_list_append_move(&list, src, dst) void __move_list_append_capture(struct move_list_t* list, struct move_t* move) { struct move_t* const movep = &(list->moves[move_list_num_moves(*list)]); ++list->njumps; movep->src = move->src; movep->dst = move->dst; memcpy(&(movep->path[0]), &(move->path[0]), sizeof(move->path[0]) * sizeof(move->path)); movep->pathlen = move->pathlen; } #define move_list_append_capture(list, move) __move_list_append_capture(&(list), &(move)) /* helper for unittests, don't use in real code */ void APPEND_CAPTURE(struct move_list_t* list, int src, int dst) { struct move_t move; move_init(&move); move.src = SQR(src); move.dst = SQR(dst); move_list_append_capture(*list, move); } void __state_init(struct state_t* state) { memset(state, 0, sizeof(*state)); } #define state_init(state) do { memset(state, 0, sizeof(*state)); } while(0) int __black_move(struct state_t* state) { return (state->moves & 1) == 0; } #define black_move(state) (((state).moves & 1) == 0) int __white_move(struct state_t* state) { return state->moves & 1; } #define white_move(state) (!black_move(state)) void __print_board(FILE* file, const struct state_t* state) { /* 0-indexed square numbers --------------------------------- | |28 | |29 | |30 | |31 | --------------------------------- |24 | |25 | |26 | |27 | | --------------------------------- | |20 | |21 | |22 | |23 | --------------------------------- |16 | |17 | |18 | |19 | | --------------------------------- | |12 | |13 | |14 | |15 | --------------------------------- | 8 | | 9 | |10 | |11 | | --------------------------------- | | 4 | | 5 | | 6 | | 7 | --------------------------------- | 0 | | 1 | | 2 | | 3 | | --------------------------------- */ int8_t r; int8_t c; boolean skip = TRUE; int square = 28; /* upper left square, 0-indexed */ for (r = ROWS - 1; r >= 0; --r) { fprintf(file, "\n ---------------------------------\n |"); for (c = 0; c < COLUMNS; ++c) { if (skip) { fprintf(file, " |"); } else { if (OCCUPIED(state->black, square)) { fprintf(file, " b |"); } else if (OCCUPIED(state->black_kings, square)) { fprintf(file, " B |"); } else if (OCCUPIED(state->white, square)) { fprintf(file, " w |"); } else if (OCCUPIED(state->white_kings, square)) { fprintf(file, " W |"); } else { if (square > 8) { // will use 2 characters fprintf(file, "%d |", square + 1); } else { fprintf(file, " %d |", square + 1); } } ++square; } skip ^= TRUE; } skip ^= TRUE; square -= 8; } fprintf(file, "\n ---------------------------------\n"); } #define print_board(state) __print_board(stdout, &state); void __setup_start_position(struct state_t* state) { state->white = 4293918720; state->black = 4095; state->white_kings = 0; state->black_kings = 0; state->moves = 0; } #define setup_start_position(state) \ (state).white = 4293918720; \ (state).black = 4095; \ (state).white_kings = 0; \ (state).black_kings = 0; \ (state).moves = 0; void add_to_move_list(struct move_list_t* moves, const uint8_t* path, int len) { /* precondition: len > 2 */ assert(len > 2); const int nmoves = move_list_num_moves(*moves); struct move_t* const movep = &(moves->moves[nmoves]); ++moves->njumps; movep->src = path[0]; movep->dst = path[len-1]; memcpy(&movep->path[0], &path[1], sizeof(path[1]) * len); movep->pathlen = len - 2; } void print_binary(const uint32_t mask) { int i; for (i = 31; i >= 0; --i) { /* printf("%d", mask & (1 << i) ? 1 : 0); */ if (mask & (1 << i)) { printf("%d ", i + 1); } } } void print_path(const uint8_t* path, int len) { int i; printf("Path: "); for (i = 0; i < len; ++i) { printf("%d ", path[i] + 1); } printf("\n"); } int multicapture_black(const int32_t white, const int32_t black, struct move_list_t* moves, uint8_t* path, int len, boolean is_king) { int32_t nwhite; int32_t nblack; int ret = 0; uint8_t square = path[len - 1]; if (!TOP2ROWS(square)) { if (!LEFT2COLS(square) && OCCUPIED(white, UP_LEFT(square)) && !OCCUPIED(white | black, JUMP_UP_LEFT(square))) { nwhite = white & ~MASK(UP_LEFT(square)); nblack = (black | MASK(JUMP_UP_LEFT(square))) & ~MASK(square); ret = 1; path[len] = JUMP_UP_LEFT(square); if (!multicapture_black(nwhite, nblack, moves, path, len + 1, is_king)) { add_to_move_list(moves, path, len + 1); } } if (!RIGHT2COLS(square) && OCCUPIED(white, UP_RIGHT(square)) && !OCCUPIED(white | black, JUMP_UP_RIGHT(square))) { nwhite = white & ~MASK(UP_RIGHT(square)); nblack = (black | MASK(JUMP_UP_RIGHT(square))) & ~MASK(square); ret = 1; path[len] = JUMP_UP_RIGHT(square); if (!multicapture_black(nwhite, nblack, moves, path, len + 1, is_king)) { add_to_move_list(moves, path, len + 1); } } } if (is_king && !BOTTOM2ROWS(square)) { if (!LEFT2COLS(square) && OCCUPIED(white, DOWN_LEFT(square)) && !OCCUPIED(white | black, JUMP_DOWN_LEFT(square))) { nwhite = white & ~MASK(DOWN_LEFT(square)); nblack = (black | MASK(JUMP_DOWN_LEFT(square))) & ~MASK(square); ret = 1; path[len] = JUMP_DOWN_LEFT(square); if (!multicapture_black(nwhite, nblack, moves, path, len + 1, is_king)) { add_to_move_list(moves, path, len + 1); } } if (!RIGHT2COLS(square) && OCCUPIED(white, DOWN_RIGHT(square)) && !OCCUPIED(white | black, JUMP_DOWN_RIGHT(square))) { nwhite = white & ~MASK(DOWN_RIGHT(square)); nblack = (black | MASK(JUMP_DOWN_RIGHT(square))) & ~MASK(square); ret = 1; path[len] = JUMP_DOWN_RIGHT(square); if (!multicapture_black(nwhite, nblack, moves, path, len + 1, is_king)) { add_to_move_list(moves, path, len + 1); } } } return ret; } int multicapture_white(int32_t white, int32_t black, struct move_list_t* moves, uint8_t* path, int len, boolean is_king) { int32_t nwhite; int32_t nblack; int ret = 0; uint8_t square = path[len - 1]; if (!BOTTOM2ROWS(square)) { if (!LEFT2COLS(square) && OCCUPIED(black, DOWN_LEFT(square)) && !OCCUPIED(white | black, JUMP_DOWN_LEFT(square))) { nblack = black & ~MASK(DOWN_LEFT(square)); nwhite = (white | MASK(JUMP_DOWN_LEFT(square))) & ~MASK(square); ret = 1; path[len] = JUMP_DOWN_LEFT(square); if (!multicapture_white(nwhite, nblack, moves, path, len + 1, is_king)) { add_to_move_list(moves, path, len + 1); } } if (!RIGHT2COLS(square) && OCCUPIED(black, DOWN_RIGHT(square)) && !OCCUPIED(white | black, JUMP_DOWN_RIGHT(square))) { nblack = black & ~MASK(DOWN_RIGHT(square)); nwhite = (white | MASK(JUMP_DOWN_RIGHT(square))) & ~MASK(square); ret = 1; path[len] = JUMP_DOWN_RIGHT(square); if (!multicapture_white(nwhite, nblack, moves, path, len + 1, is_king)) { add_to_move_list(moves, path, len + 1); } } } if (is_king && !TOP2ROWS(square)) { if (!LEFT2COLS(square) && OCCUPIED(black, UP_LEFT(square)) && !OCCUPIED(white | black, JUMP_UP_LEFT(square))) { nblack = black & ~MASK(UP_LEFT(square)); nwhite = (white | MASK(JUMP_UP_LEFT(square))) & ~MASK(square); ret = 1; path[len] = JUMP_UP_LEFT(square); if (!multicapture_white(nwhite, nblack, moves, path, len + 1, is_king)) { add_to_move_list(moves, path, len + 1); } } if (!RIGHT2COLS(square) && OCCUPIED(black, UP_RIGHT(square)) && !OCCUPIED(white | black, JUMP_UP_RIGHT(square))) { nblack = black & ~MASK(UP_RIGHT(square)); nwhite = (white | MASK(JUMP_UP_RIGHT(square))) & ~MASK(square); ret = 1; path[len] = JUMP_UP_RIGHT(square); if (!multicapture_white(nwhite, nblack, moves, path, len + 1, is_king)) { add_to_move_list(moves, path, len + 1); } } } return ret; } int generate_captures_black(const struct state_t* state, struct move_list_t* moves) { square_t square; struct move_t move; uint8_t path[10]; int32_t white; int32_t black; for (square = 0; square < SQUARES; ++square) { if (OCCUPIED(BLACK(*state), square)) { if (!TOP2ROWS(square)) { if (!LEFT2COLS(square) && OCCUPIED(WHITE(*state), UP_LEFT(square)) && !OCCUPIED(FULLBOARD(*state), JUMP_UP_LEFT(square))) { path[0] = square; path[1] = JUMP_UP_LEFT(square); white = WHITE(*state) & ~MASK(UP_LEFT(square)); black = (BLACK(*state) | MASK(JUMP_UP_LEFT(square))) & ~MASK(square); if (!multicapture_black(white, black, moves, &path[0], 2, BLACK_KING(*state, square))) { move_init(&move); move.src = square; move.dst = JUMP_UP_LEFT(square); move_list_append_capture(*moves, move); } } if (!RIGHT2COLS(square) && OCCUPIED(WHITE(*state), UP_RIGHT(square)) && !OCCUPIED(FULLBOARD(*state), JUMP_UP_RIGHT(square))) { path[0] = square; path[1] = JUMP_UP_RIGHT(square); white = WHITE(*state) & ~MASK(UP_RIGHT(square)); black = (BLACK(*state) | MASK(JUMP_UP_RIGHT(square))) & ~MASK(square); if (!multicapture_black(white, black, moves, &path[0], 2, BLACK_KING(*state, square))) { move_init(&move); move.src = square; move.dst = JUMP_UP_RIGHT(square); move_list_append_capture(*moves, move); } } } if (BLACK_KING(*state, square)) { if (!BOTTOM2ROWS(square)) { if (!LEFT2COLS(square) && OCCUPIED(WHITE(*state), DOWN_LEFT(square)) && !OCCUPIED(FULLBOARD(*state), JUMP_DOWN_LEFT(square))) { path[0] = square; path[1] = JUMP_DOWN_LEFT(square); white = WHITE(*state) & ~MASK(DOWN_LEFT(square)); black = (BLACK(*state) | MASK(JUMP_DOWN_LEFT(square))) & ~MASK(square); if (!multicapture_black(white, black, moves, &path[0], 2, TRUE)) { move_init(&move); move.src = square; move.dst = JUMP_DOWN_LEFT(square); move_list_append_capture(*moves, move); } } if (!RIGHT2COLS(square) && OCCUPIED(WHITE(*state), DOWN_RIGHT(square)) && !OCCUPIED(FULLBOARD(*state), JUMP_DOWN_RIGHT(square))) { path[0] = square; path[1] = JUMP_DOWN_RIGHT(square); white = WHITE(*state) & ~MASK(DOWN_RIGHT(square)); black = (BLACK(*state) | MASK(JUMP_DOWN_RIGHT(square))) & ~MASK(square); if (!multicapture_black(white, black, moves, &path[0], 2, TRUE)) { move_init(&move); move.src = square; move.dst = JUMP_DOWN_RIGHT(square); move_list_append_capture(*moves, move); } } } } } } return 0; } int generate_captures_white(const struct state_t* state, struct move_list_t* moves) { square_t square; struct move_t move; uint8_t path[10]; int32_t white; int32_t black; for (square = 0; square < SQUARES; ++square) { if (OCCUPIED(WHITE(*state), square)) { if (likely(!BOTTOM2ROWS(square))) { if (!LEFT2COLS(square) && OCCUPIED(BLACK(*state), DOWN_LEFT(square)) && !OCCUPIED(FULLBOARD(*state), JUMP_DOWN_LEFT(square))) { path[0] = square; path[1] = JUMP_DOWN_LEFT(square); white = (WHITE(*state) | MASK(JUMP_DOWN_LEFT(square))) & ~MASK(square); black = BLACK(*state) & ~MASK(DOWN_LEFT(square)); if (!multicapture_white(white, black, moves, &path[0], 2, WHITE_KING(*state, square))) { move_init(&move); move.src = square; move.dst = JUMP_DOWN_LEFT(square); move_list_append_capture(*moves, move); } } if (!RIGHT2COLS(square) && OCCUPIED(BLACK(*state), DOWN_RIGHT(square)) && !OCCUPIED(FULLBOARD(*state), JUMP_DOWN_RIGHT(square))) { path[0] = square; path[1] = JUMP_DOWN_RIGHT(square); white = (WHITE(*state) | MASK(JUMP_DOWN_RIGHT(square))) & ~MASK(square); black = BLACK(*state) & ~MASK(DOWN_RIGHT(square)); if (!multicapture_white(white, black, moves, &path[0], 2, WHITE_KING(*state, square))) { move_init(&move); move.src = square; move.dst = JUMP_DOWN_RIGHT(square); move_list_append_capture(*moves, move); } } } if (WHITE_KING(*state, square)) { if (likely(!TOP2ROWS(square))) { if (!LEFT2COLS(square) && OCCUPIED(BLACK(*state), UP_LEFT(square)) && !OCCUPIED(FULLBOARD(*state), JUMP_UP_LEFT(square))) { path[0] = square; path[1] = JUMP_UP_LEFT(square); white = (WHITE(*state) | MASK(JUMP_UP_LEFT(square))) & ~MASK(square); black = BLACK(*state) & ~MASK(UP_LEFT(square)); if (!multicapture_white(white, black, moves, &path[0], 2, TRUE)) { move_init(&move); move.src = square; move.dst = JUMP_UP_LEFT(square); move_list_append_capture(*moves, move); } } if (!RIGHT2COLS(square) && OCCUPIED(BLACK(*state), UP_RIGHT(square)) && !OCCUPIED(FULLBOARD(*state), JUMP_UP_RIGHT(square))) { path[0] = square; path[1] = JUMP_UP_RIGHT(square); white = (WHITE(*state) | MASK(JUMP_UP_RIGHT(square))) & ~MASK(square); black = BLACK(*state) & ~MASK(UP_RIGHT(square)); if (!multicapture_white(white, black, moves, &path[0], 2, TRUE)) { move_init(&move); move.src = square; move.dst = JUMP_UP_RIGHT(square); move_list_append_capture(*moves, move); } } } } } } return 0; } int generate_captures(const struct state_t* state, struct move_list_t* moves) { if (black_move(*state)) { return generate_captures_black(state, moves); } else { return generate_captures_white(state, moves); } } int generate_moves(const struct state_t* state, struct move_list_t* moves) { square_t square; if (black_move(*state)) { for (square = 0; square < 32; ++square) { if (OCCUPIED(BLACK(*state), square)) { if (!TOP(square)) { if (!LEFT(square) && !OCCUPIED(FULLBOARD(*state), UP_LEFT(square))) { move_list_append_move(*moves, square, UP_LEFT(square)); } if (!RIGHT(square) && !OCCUPIED(FULLBOARD(*state), UP_RIGHT(square))) { move_list_append_move(*moves, square, UP_RIGHT(square)); } } if (OCCUPIED(state->black_kings, square) && !BOTTOM(square)) { /* check king moves */ if (!LEFT(square) && !OCCUPIED(FULLBOARD(*state), DOWN_LEFT(square))) { move_list_append_move(*moves, square, DOWN_LEFT(square)); } if (!RIGHT(square) && !OCCUPIED(FULLBOARD(*state), DOWN_RIGHT(square))) { move_list_append_move(*moves, square, DOWN_RIGHT(square)); } } } } } else { for (square = 0; square < 32; ++square) { if (OCCUPIED(WHITE(*state), square)) { if (!BOTTOM(square)) { if (!LEFT(square) && !OCCUPIED(FULLBOARD(*state), DOWN_LEFT(square))) { move_list_append_move(*moves, square, DOWN_LEFT(square)); } if (!RIGHT(square) && !OCCUPIED(FULLBOARD(*state), DOWN_RIGHT(square))) { move_list_append_move(*moves, square, DOWN_RIGHT(square)); } } if (OCCUPIED(state->white_kings, square) && !TOP(square)) { /* check king moves */ if (!LEFT(square) && !OCCUPIED(FULLBOARD(*state), UP_LEFT(square))) { move_list_append_move(*moves, square, UP_LEFT(square)); } if (!RIGHT(square) && !OCCUPIED(FULLBOARD(*state), UP_RIGHT(square))) { move_list_append_move(*moves, square, UP_RIGHT(square)); } } } } } return 0; } int get_moves(const struct state_t* state, struct move_list_t* moves) { generate_captures(state, moves); if (moves->njumps == 0) { generate_moves(state, moves); } return 0; } /* returns -1 on error */ int jumped_square(int src, int dst) { if (dst == JUMP_UP_LEFT(src)) { return UP_LEFT(src); } else if (dst == JUMP_UP_RIGHT(src)) { return UP_RIGHT(src); } else if (dst == JUMP_DOWN_LEFT(src)) { return DOWN_LEFT(src); } else if (dst == JUMP_DOWN_RIGHT(src)) { return DOWN_RIGHT(src); } else { return -1; } } void make_move(struct state_t* state, const struct move_t* move) { int jumped; int i; uint8_t prev; if (black_move(*state)) { if (BLACK_KING(*state, move->src)) { CLEAR(state->black_kings, move->src); PLACE(state->black_kings, move->dst); if (is_capture(move)) { if (move->pathlen == 0) { jumped = jumped_square(move->src, move->dst); CLEAR(state->white_kings, jumped); CLEAR(state->white, jumped); } else { prev = move->src; for (i = 0; i < move->pathlen; ++i) { jumped = jumped_square(prev, move->path[i]); CLEAR(state->white, jumped); CLEAR(state->white_kings, jumped); prev = move->path[i]; } jumped = jumped_square(move->path[move->pathlen - 1], move->dst); CLEAR(state->white, jumped); CLEAR(state->white_kings, jumped); } } } else { CLEAR(state->black, move->src); if (unlikely(TOP(move->dst))) { PLACE(state->black_kings, move->dst); } else { PLACE(state->black, move->dst); } if (is_capture(move)) { if (move->pathlen == 0) { jumped = jumped_square(move->src, move->dst); CLEAR(state->white_kings, jumped); CLEAR(state->white, jumped); } else { prev = move->src; for (i = 0; i < move->pathlen; ++i) { jumped = jumped_square(prev, move->path[i]); CLEAR(state->white, jumped); CLEAR(state->white_kings, jumped); prev = move->path[i]; jumped = jumped_square(move->path[move->pathlen - 1], move->dst); CLEAR(state->white, jumped); CLEAR(state->white_kings, jumped); } } } } } else { /* white_move(*state) */ if (WHITE_KING(*state, move->src)) { CLEAR(state->white_kings, move->src); PLACE(state->white_kings, move->dst); if (is_capture(move)) { if (move->pathlen == 0) { jumped = jumped_square(move->src, move->dst); CLEAR(state->black_kings, jumped); CLEAR(state->black, jumped); } else { prev = move->src; for (i = 0; i < move->pathlen; ++i) { jumped = jumped_square(prev, move->path[i]); CLEAR(state->black, jumped); CLEAR(state->black_kings, jumped); prev = move->path[i]; } jumped = jumped_square(move->path[move->pathlen - 1], move->dst); CLEAR(state->black, jumped); CLEAR(state->black_kings, jumped); } } } else { CLEAR(state->white, move->src); if (unlikely(BOTTOM(move->dst))) { PLACE(state->white_kings, move->dst); } else { PLACE(state->white, move->dst); } if (is_capture(move)) { if (move->pathlen == 0) { jumped = jumped_square(move->src, move->dst); CLEAR(state->black_kings, jumped); CLEAR(state->black, jumped); } else { prev = move->src; for (i = 0; i < move->pathlen; ++i) { jumped = jumped_square(prev, move->path[i]); CLEAR(state->black, jumped); CLEAR(state->black_kings, jumped); prev = move->path[i]; jumped = jumped_square(move->path[move->pathlen - 1], move->dst); CLEAR(state->black, jumped); CLEAR(state->black_kings, jumped); } } } } } } #ifdef PRINT_LEDGER int _CC[] = { 4, 3, 2, 1, 8, 7, 6, 5, 12, 11, 10, 9, 16, 15, 14, 13, 20, 19, 18, 17, 24, 23, 22, 21, 28, 27, 26, 25, 32, 31, 30, 29 }; #define CONV(sqr) _CC[(sqr)] #define NMOVES 15 void ledger_print_move(struct move_t* move) { int i = 0; printf("%d", CONV(move->src)); for (i = 0; i < move->pathlen; ++i) { printf(" -> %d", CONV(move->path[i])); } printf(" -> %d", CONV(move->dst)); } void print_game_ledger(struct move_t* game, int nmoves) { int i; printf("["); ledger_print_move(game); ++game; for (i = 1; i < nmoves; ++i) { printf(", "); ledger_print_move(game++); } printf("]\n"); } #endif #ifdef PRINT_LEDGER uint64_t __perft_helper(int depth, const struct state_t* in_state, struct move_t* game) { #else uint64_t __perft_helper(int depth, const struct state_t* in_state) { #endif struct state_t state; struct move_list_t movelist; int i; int nmoves; int64_t nodes = 0; #ifdef PRINT_LEDGER struct move_t cgame[NMOVES]; #endif if (depth == 0) return 1; #ifdef PRINT_LEDGER memcpy(&cgame[0], game, sizeof(cgame[0]) * NMOVES); #endif move_list_init(&movelist); get_moves(in_state, &movelist); nmoves = move_list_num_moves(movelist); if (depth == 1) { #ifdef PRINT_LEDGER for (i = 0; i < nmoves; ++i) { memcpy(&cgame[in_state->moves], &movelist.moves[i], sizeof(movelist.moves[i])); print_game_ledger(&cgame[0], in_state->moves + 1); } #endif return nmoves; } for (i = 0; i < nmoves; ++i) { memcpy(&state, in_state, sizeof(state)); make_move(&state, &(movelist.moves[i])); #ifdef PRINT_LEDGER memcpy(&cgame[in_state->moves], &movelist.moves[i], sizeof(movelist.moves[i])); #endif ++state.moves; #ifdef PRINT_LEDGER nodes += __perft_helper(depth - 1, &state, &cgame[0]); #else nodes += __perft_helper(depth - 1, &state); #endif } return nodes; } uint64_t perft(int depth) { struct state_t state; state_init(&state); setup_start_position(state); #ifdef PRINT_LEDGER struct move_t game[NMOVES]; return __perft_helper(depth, &state, &game[0]); #else return __perft_helper(depth, &state); #endif } /* --- Begin Unit Tests --- */ void unittest_move_list_compare() { struct move_list_t movelist; struct move_list_t rhs; struct move_t move; ENTER_UNITTEST(); move_list_init(&movelist); move_list_init(&rhs); move_init(&move); UNITTEST_ASSERT_MOVELIST(movelist, rhs); move_list_append_move(movelist, 1, 5); move_list_append_move(rhs, 1, 5); UNITTEST_ASSERT_MOVELIST(movelist, rhs); move_list_append_move(movelist, 14, 19); move_list_append_move(rhs, 14, 19); UNITTEST_ASSERT_MOVELIST(movelist, rhs); move.src = 18; move.dst = JUMP_UP_RIGHT(move.src); move_list_append_capture(movelist, move); UNITTEST_ASSERT_NEQU(move_list_compare(&movelist, &rhs), 0); move_list_append_capture(rhs, move); UNITTEST_ASSERT_MOVELIST(movelist, rhs); move.src = 9; move.dst = JUMP_UP_RIGHT(move.src); EXIT_UNITTEST(); } void unittest_move_list_sort() { struct move_list_t lhs; struct move_list_t rhs; struct move_t movea; struct move_t moveb; ENTER_UNITTEST(); move_list_init(&lhs); move_list_init(&rhs); move_init(&movea); move_init(&moveb); movea.src = 14; movea.dst = JUMP_UP_LEFT(movea.src); moveb.src = 15; moveb.dst = JUMP_DOWN_LEFT(moveb.src); /* lhs has movea then moveb */ move_list_append_capture(lhs, movea); move_list_append_capture(lhs, moveb); move_list_append_move(lhs, 21, UP_LEFT(21)); move_list_append_move(lhs, 3, UP_RIGHT(3)); /* rhs has moveb then movea */ move_list_append_capture(rhs, moveb); move_list_append_move(rhs, 21, UP_LEFT(21)); move_list_append_capture(rhs, movea); move_list_append_move(rhs, 3, UP_RIGHT(3)); UNITTEST_ASSERT_NEQU(move_list_compare(&lhs, &rhs), 0); move_list_sort(&lhs); move_list_sort(&rhs); UNITTEST_ASSERT_MOVELIST(lhs, rhs); move_list_append_move(lhs, 2, UP_LEFT(2)); move_list_append_move(lhs, 18, UP_LEFT(18)); move_list_append_move(lhs, 2, UP_RIGHT(2)); move_list_append_move(rhs, 18, UP_LEFT(18)); move_list_append_move(rhs, 2, UP_LEFT(2)); move_list_append_move(rhs, 2, UP_RIGHT(2)); EXIT_UNITTEST(); } void unittest_generate_moves() { struct state_t state; struct move_list_t movelist; struct move_list_t expected; ENTER_UNITTEST(); /* black on 14 */ state_init(&state); move_list_init(&movelist); move_list_init(&expected); state.black = SQUARE(14); generate_moves(&state, &movelist); move_list_append_move(expected, SQR(14), SQR(18)); move_list_append_move(expected, SQR(14), SQR(19)); UNITTEST_ASSERT_MOVELIST(movelist, expected); /* white on 14 */ state_init(&state); move_list_init(&movelist); move_list_init(&expected); state.white = SQUARE(14); state.moves = 1; /* make it white to move */ generate_moves(&state, &movelist); move_list_append_move(expected, SQR(14), SQR(10)); move_list_append_move(expected, SQR(14), SQR(11)); UNITTEST_ASSERT_MOVELIST(movelist, expected); /* black king on 14 */ state_init(&state); move_list_init(&movelist); move_list_init(&expected); state.black_kings = SQUARE(14); generate_moves(&state, &movelist); move_list_append_move(expected, SQR(14), SQR(18)); move_list_append_move(expected, SQR(14), SQR(19)); move_list_append_move(expected, SQR(14), SQR(10)); move_list_append_move(expected, SQR(14), SQR(11)); UNITTEST_ASSERT_MOVELIST(movelist, expected); /* white king on 14 */ state_init(&state); move_list_init(&movelist); move_list_init(&expected); state.white_kings = SQUARE(14); state.moves = 1; /* make it white to move */ generate_moves(&state, &movelist); move_list_append_move(expected, SQR(14), SQR(18)); move_list_append_move(expected, SQR(14), SQR(19)); move_list_append_move(expected, SQR(14), SQR(10)); move_list_append_move(expected, SQR(14), SQR(11)); UNITTEST_ASSERT_MOVELIST(movelist, expected); /* black on 14, white on 18 */ state_init(&state); move_list_init(&movelist); move_list_init(&expected); state.black = SQUARE(14); state.white = SQUARE(18); generate_moves(&state, &movelist); move_list_append_move(expected, SQR(14), SQR(19)); UNITTEST_ASSERT_MOVELIST(movelist, expected); /* white on 14, black on 10 */ state_init(&state); move_list_init(&movelist); move_list_init(&expected); state.white = SQUARE(14); state.black = SQUARE(10); state.moves = 1; /* make it white to move */ generate_moves(&state, &movelist); move_list_append_move(expected, SQR(14), SQR(11)); UNITTEST_ASSERT_MOVELIST(movelist, expected); /* white on 32 */ state_init(&state); move_list_init(&movelist); move_list_init(&expected); state.white = SQUARE(32); state.black = 0; state.moves = 1; /* make it white to move */ generate_moves(&state, &movelist); move_list_append_move(expected, SQR(32), SQR(28)); UNITTEST_ASSERT_MOVELIST(movelist, expected); /* white on 29 */ state_init(&state); move_list_init(&movelist); move_list_init(&expected); state.white = SQUARE(29); state.moves = 1; /* make it white to move */ generate_moves(&state, &movelist); move_list_append_move(expected, SQR(29), SQR(25)); move_list_append_move(expected, SQR(29), SQR(26)); UNITTEST_ASSERT_MOVELIST(movelist, expected); /* black on 1 */ state_init(&state); move_list_init(&movelist); move_list_init(&expected); state.black = SQUARE(1); generate_moves(&state, &movelist); move_list_append_move(expected, SQR(1), SQR(5)); UNITTEST_ASSERT_MOVELIST(movelist, expected); /* black on 4 */ state_init(&state); move_list_init(&movelist); move_list_init(&expected); state.black = SQUARE(4); generate_moves(&state, &movelist); move_list_append_move(expected, SQR(4), SQR(7)); move_list_append_move(expected, SQR(4), SQR(8)); UNITTEST_ASSERT_MOVELIST(movelist, expected); EXIT_UNITTEST(); } void unittest_generate_captures() { struct state_t state; struct move_list_t movelist; struct move_list_t expected; ENTER_UNITTEST(); /* black on 14 */ state_init(&state); move_list_init(&movelist); move_list_init(&expected); state.black = SQUARE(14); generate_captures(&state, &movelist); UNITTEST_ASSERT_MOVELIST(movelist, expected); /* black on 14, white on 19 */ state_init(&state); move_list_init(&movelist); move_list_init(&expected); state.black = SQUARE(14); state.white = SQUARE(19); generate_captures(&state, &movelist); APPEND_CAPTURE(&expected, 14, 23); UNITTEST_ASSERT_MOVELIST(movelist, expected); /* white on 14, black on 10 */ state_init(&state); move_list_init(&movelist); move_list_init(&expected); state.black = SQUARE(10); state.white = SQUARE(14); state.moves = 1; /* make it white to move */ generate_captures(&state, &movelist); APPEND_CAPTURE(&expected, 14, 5); UNITTEST_ASSERT_MOVELIST(movelist, expected); /* black on 14, white on 19 and 18*/ state_init(&state); move_list_init(&movelist); move_list_init(&expected); state.black = SQUARE(14); state.white = SQUARE(19) | SQUARE(18); generate_captures(&state, &movelist); APPEND_CAPTURE(&expected, 14, 23); APPEND_CAPTURE(&expected, 14, 21); UNITTEST_ASSERT_MOVELIST(movelist, expected); /* black on 14, white on 18, 19, 10, 11 */ state_init(&state); move_list_init(&movelist); move_list_init(&expected); state.black = SQUARE(14); state.white = SQUARE(19) | SQUARE(18) | SQUARE(10) | SQUARE(11); generate_captures(&state, &movelist); APPEND_CAPTURE(&expected, 14, 23); APPEND_CAPTURE(&expected, 14, 21); UNITTEST_ASSERT_MOVELIST(movelist, expected); /* black king on 14, white on 18, 19, 10, 11 */ state_init(&state); move_list_init(&movelist); move_list_init(&expected); state.black_kings = SQUARE(14); state.white = SQUARE(19) | SQUARE(18) | SQUARE(10) | SQUARE(11); generate_captures(&state, &movelist); APPEND_CAPTURE(&expected, 14, 5); APPEND_CAPTURE(&expected, 14, 7); APPEND_CAPTURE(&expected, 14, 21); APPEND_CAPTURE(&expected, 14, 23); UNITTEST_ASSERT_MOVELIST(movelist, expected); /* black on 9, white on 13 */ state_init(&state); move_list_init(&movelist); move_list_init(&expected); state.black = SQUARE(9); state.white = SQUARE(13); generate_captures(&state, &movelist); APPEND_CAPTURE(&expected, 9, 18); UNITTEST_ASSERT_MOVELIST(movelist, expected); /* black on 17, white on 21, 13 */ state_init(&state); move_list_init(&movelist); move_list_init(&expected); state.black = SQUARE(17); state.white = SQUARE(21) | SQUARE(13); generate_captures(&state, &movelist); APPEND_CAPTURE(&expected, 17, 26); UNITTEST_ASSERT_MOVELIST(movelist, expected); /* black on 24, white on 28, 20 */ state_init(&state); move_list_init(&movelist); move_list_init(&expected); state.black = SQUARE(24); state.white = SQUARE(28) | SQUARE(20); generate_captures(&state, &movelist); APPEND_CAPTURE(&expected, 24, 31); UNITTEST_ASSERT_MOVELIST(movelist, expected); /* white on 32, black on 28 */ state_init(&state); move_list_init(&movelist); move_list_init(&expected); state.black = SQUARE(28); state.white = SQUARE(32); state.moves = 1; generate_captures(&state, &movelist); APPEND_CAPTURE(&expected, 32, 23); UNITTEST_ASSERT_MOVELIST(movelist, expected); /* black on 1, white on 5 */ state_init(&state); move_list_init(&movelist); move_list_init(&expected); state.black = SQUARE(1); state.white = SQUARE(5); generate_captures(&state, &movelist); APPEND_CAPTURE(&expected, 1, 10); UNITTEST_ASSERT_MOVELIST(movelist, expected); /* black on 4, white on 7, 8 */ state_init(&state); move_list_init(&movelist); move_list_init(&expected); state.black = SQUARE(4); state.white = SQUARE(7) | SQUARE(8); generate_captures(&state, &movelist); APPEND_CAPTURE(&expected, 4, 11); UNITTEST_ASSERT_MOVELIST(movelist, expected); /* white on 29, black on 25, 26 */ state_init(&state); move_list_init(&movelist); move_list_init(&expected); state.white = SQUARE(29); state.black = SQUARE(25) | SQUARE(26); state.moves = 1; generate_captures(&state, &movelist); APPEND_CAPTURE(&expected, 29, 22); UNITTEST_ASSERT_MOVELIST(movelist, expected); /* white on 32, black on 28 */ state_init(&state); move_list_init(&movelist); move_list_init(&expected); state.white = SQUARE(32); state.black = SQUARE(28); state.moves = 1; generate_captures(&state, &movelist); APPEND_CAPTURE(&expected, 32, 23); UNITTEST_ASSERT_MOVELIST(movelist, expected); /* white on 13, black on 10 */ state_init(&state); state.moves = 1; move_list_init(&movelist); move_list_init(&expected); state.black = SQUARE(10); state.white = SQUARE(13); state.black_kings = 0; state.white_kings = 0; generate_captures(&state, &movelist); APPEND_CAPTURE(&expected, 13, 6); UNITTEST_ASSERT_MOVELIST(movelist, expected); /* white on 16, black on 12, jump to 7 */ state_init(&state); state.moves = 1; move_list_init(&movelist); move_list_init(&expected); state.white = SQUARE(16); state.black = SQUARE(12); state.black_kings = 0; state.white_kings = 0; generate_captures(&state, &movelist); APPEND_CAPTURE(&expected, 16, 7); UNITTEST_ASSERT_MOVELIST(movelist, expected); /* white on 24, black on 20, jump to 15 */ state_init(&state); state.moves = 1; move_list_init(&movelist); move_list_init(&expected); state.white = SQUARE(24); state.black = SQUARE(20); state.black_kings = 0; state.white_kings = 0; generate_captures(&state, &movelist); APPEND_CAPTURE(&expected, 24, 15); UNITTEST_ASSERT_MOVELIST(movelist, expected); /* white on 23, black on 20, jump to 16 */ state_init(&state); state.moves = 1; move_list_init(&movelist); move_list_init(&expected); state.white = SQUARE(23); state.black = SQUARE(20); state.black_kings = 0; state.white_kings = 0; generate_captures(&state, &movelist); APPEND_CAPTURE(&expected, 23, 16); UNITTEST_ASSERT_MOVELIST(movelist, expected); /* white on 16, jump to 7 */ state_init(&state); move_list_init(&movelist); move_list_init(&expected); setup_start_position(state); state.moves = 1; CLEAR(state.white, SQR(24)); CLEAR(state.black, SQR(16)); CLEAR(state.black, SQR(7)); PLACE(state.white, SQR(16)); generate_captures(&state, &movelist); APPEND_CAPTURE(&expected, 16, 7); UNITTEST_ASSERT_MOVELIST(movelist, expected); /* white on 16, jump to 7 */ state_init(&state); move_list_init(&movelist); move_list_init(&expected); setup_start_position(state); state.moves = 1; CLEAR(state.white, SQR(24)); CLEAR(state.black, SQR(16)); CLEAR(state.black, SQR(7)); PLACE(state.white, SQR(16)); PLACE(state.black, SQR(13)); PLACE(state.black, SQR(14)); PLACE(state.black, SQR(15)); PLACE(state.black, SQR(17)); PLACE(state.black, SQR(18)); PLACE(state.black, SQR(19)); PLACE(state.black, SQR(20)); PLACE(state.black, SQR(24)); generate_captures(&state, &movelist); APPEND_CAPTURE(&expected, 16, 7); UNITTEST_ASSERT_MOVELIST(movelist, expected); /* white on 16, jump to 7 */ state_init(&state); move_list_init(&movelist); move_list_init(&expected); setup_start_position(state); state.moves = 1; CLEAR(state.white, SQR(24)); CLEAR(state.black, SQR(16)); CLEAR(state.black, SQR(7)); PLACE(state.white, SQR(16)); PLACE(state.white, SQR(13)); PLACE(state.white, SQR(14)); PLACE(state.white, SQR(15)); PLACE(state.white, SQR(17)); PLACE(state.white, SQR(18)); PLACE(state.white, SQR(19)); PLACE(state.white, SQR(20)); PLACE(state.white, SQR(24)); generate_captures(&state, &movelist); APPEND_CAPTURE(&expected, 16, 7); APPEND_CAPTURE(&expected, 14, 7); UNITTEST_ASSERT_MOVELIST(movelist, expected); EXIT_UNITTEST(); } /* --------------------------------- | |29 | |30 | |31 | |32 | --------------------------------- |25 | |26 | |27 | |28 | | --------------------------------- | |21 | |22 | |23 | |24 | --------------------------------- |17 | |18 | |19 | |20 | | --------------------------------- | |13 | |14 | |15 | |16 | --------------------------------- | 9 | |10 | |11 | |12 | | --------------------------------- | | 5 | | 6 | | 7 | | 8 | --------------------------------- | 1 | | 2 | | 3 | | 4 | | --------------------------------- */ void unittest_generate_multicaptures() { struct state_t state; struct move_list_t movelist; struct move_list_t expected; struct move_t move; ENTER_UNITTEST(); /* --------------------------------- | |29 | |30 | |31 | |32 | --------------------------------- |25 | |26 | |27 | |28 | | --------------------------------- | | w | | w | | w | |24 | --------------------------------- |17 | |18 | |19 | |20 | | --------------------------------- | | w | | w | |15 | |16 | --------------------------------- | 9 | |10 | |11 | |12 | | --------------------------------- | | w | | 6 | | 7 | | 8 | --------------------------------- | b | | 2 | | 3 | | 4 | | --------------------------------- */ state_init(&state); move_list_init(&movelist); move_list_init(&expected); state.black = SQUARE(1); state.black_kings = 0; state.white = SQUARE(5) | SQUARE(14) | SQUARE(22) | SQUARE(23) | SQUARE(13) | SQUARE(21); state.white_kings = 0; move_init(&move); move.src = SQR(1); move.path[0] = SQR(10); move.path[1] = SQR(17); move.dst = SQR(26); move.pathlen = 2; move_list_append_capture(expected, move); move.path[0] = SQR(10); move.path[1] = SQR(19); move.pathlen = 2; move_list_append_capture(expected, move); move.dst = SQR(28); move_list_append_capture(expected, move); generate_captures(&state, &movelist); UNITTEST_ASSERT_MOVELIST(movelist, expected); /* Move list: 1-10-17-26, 1-10-19-26, 1-10-19-28 */ /* --------------------------------- | |29 | |30 | |31 | | w | --------------------------------- |25 | |26 | |27 | | b | | --------------------------------- | |21 | |22 | |23 | |24 | --------------------------------- |17 | |18 | | b | | b | | --------------------------------- | |13 | |14 | |15 | |16 | --------------------------------- | 9 | | b | | b | | b | | --------------------------------- | | 5 | | 6 | | 7 | | 8 | --------------------------------- | 1 | | 2 | | 3 | | 4 | | --------------------------------- */ state_init(&state); move_list_init(&movelist); move_list_init(&expected); state.moves = 1; state.black = SQUARE(28) | SQUARE(19) | SQUARE(10) | SQUARE(11) | SQUARE(20) | SQUARE(12); state.black_kings = 0; state.white = SQUARE(32); state.white_kings = 0; move_init(&move); move.src = SQR(32); move.path[0] = SQR(23); move.path[1] = SQR(14); move.pathlen = 2; move.dst = SQR(5); move_list_append_capture(expected, move); move.path[1] = SQR(14); move.dst = SQR(7); move_list_append_capture(expected, move); move.path[1] = SQR(16); move_list_append_capture(expected, move); generate_captures(&state, &movelist); UNITTEST_ASSERT_MOVELIST(movelist, expected); /* Move list: 32-23-14-5, 32-23-14-7, 32-23-16-7 */ /* --------------------------------- | |29 | |30 | |31 | |32 | --------------------------------- |25 | |26 | |27 | |28 | | --------------------------------- | |21 | |22 | |23 | |24 | --------------------------------- |17 | | W | | W | |20 | | --------------------------------- | |13 | | B | |15 | |16 | --------------------------------- | 9 | | w | | w | |12 | | --------------------------------- | | 5 | | 6 | | 7 | | 8 | --------------------------------- | 1 | | 2 | | 3 | | 4 | | --------------------------------- */ state_init(&state); move_list_init(&movelist); move_list_init(&expected); state.black = 0; state.black_kings = SQUARE(14); state.white = SQUARE(10) | SQUARE(11); state.white_kings = SQUARE(18) | SQUARE(19); move_init(&move); move.pathlen = 0; move.src = SQR(14); move.dst = SQR(5); move_list_append_capture(expected, move); move.dst = SQR(7); move_list_append_capture(expected, move); move.dst = SQR(21); move_list_append_capture(expected, move); move.dst = SQR(23); move_list_append_capture(expected, move); generate_captures(&state, &movelist); UNITTEST_ASSERT_MOVELIST(movelist, expected); /* Move list: 14-5, 14-7, 14-21, 14-23 */ /* --------------------------------- | |29 | |30 | |31 | |32 | --------------------------------- |25 | |26 | |27 | |28 | | --------------------------------- | |21 | |22 | |23 | |24 | --------------------------------- |17 | | B | | B | |20 | | --------------------------------- | |13 | | W | |15 | |16 | --------------------------------- | 9 | | b | | b | |12 | | --------------------------------- | | 5 | | 6 | | 7 | | 8 | --------------------------------- | 1 | | 2 | | 3 | | 4 | | --------------------------------- */ state_init(&state); move_list_init(&movelist); move_list_init(&expected); state.moves = 1; state.white = 0; state.white_kings = SQUARE(14); state.black = SQUARE(10) | SQUARE(11); state.black_kings = SQUARE(18) | SQUARE(19); move_init(&move); move.pathlen = 0; move.src = SQR(14); move.dst = SQR(5); move_list_append_capture(expected, move); move.dst = SQR(7); move_list_append_capture(expected, move); move.dst = SQR(21); move_list_append_capture(expected, move); move.dst = SQR(23); move_list_append_capture(expected, move); generate_captures(&state, &movelist); UNITTEST_ASSERT_MOVELIST(movelist, expected); /* Move list: 14-5, 14-7, 14-21, 14-23 */ /* --------------------------------- | |29 | |30 | |31 | |32 | --------------------------------- |25 | |26 | |27 | |28 | | --------------------------------- | |21 | |22 | | W | |24 | --------------------------------- |17 | |18 | |19 | |20 | | --------------------------------- | |13 | | w | |15 | |16 | --------------------------------- | 9 | | B | |11 | |12 | | --------------------------------- | | 5 | | 6 | | 7 | | 8 | --------------------------------- | 1 | | 2 | | 3 | | 4 | | --------------------------------- */ state_init(&state); move_list_init(&movelist); move_list_init(&expected); state.black = 0; state.black_kings = SQUARE(10); state.white = SQUARE(14); state.white_kings = SQUARE(23); move_init(&move); move.src = SQR(10); move.path[0] = SQR(19); move.dst = SQR(28); move.pathlen = 1; move_list_append_capture(expected, move); generate_captures(&state, &movelist); UNITTEST_ASSERT_MOVELIST(movelist, expected); /* Move list: 10-19-28 */ /* --------------------------------- | |29 | |30 | |31 | |32 | --------------------------------- |25 | |26 | |27 | | B | | --------------------------------- | |21 | |22 | | W | |24 | --------------------------------- |17 | |18 | |19 | |20 | | --------------------------------- | |13 | | w | |15 | |16 | --------------------------------- | 9 | |10 | |11 | |12 | | --------------------------------- | | 5 | | 6 | | 7 | | 8 | --------------------------------- | 1 | | 2 | | 3 | | 4 | | --------------------------------- */ state_init(&state); move_list_init(&movelist); move_list_init(&expected); state.black = 0; state.black_kings = SQUARE(28); state.white = SQUARE(14); state.white_kings = SQUARE(23); move_init(&move); move.src = SQR(28); move.path[0] = SQR(19); move.dst = SQR(10); move.pathlen = 1; move_list_append_capture(expected, move); generate_captures(&state, &movelist); UNITTEST_ASSERT_MOVELIST(movelist, expected); /* Move list: 28-19-10 */ /* --------------------------------- | |29 | |30 | |31 | |32 | --------------------------------- |25 | |26 | |27 | |28 | | --------------------------------- | |21 | |22 | | B | |24 | --------------------------------- |17 | |18 | |19 | |20 | | --------------------------------- | |13 | | b | |15 | |16 | --------------------------------- | 9 | | W | |11 | |12 | | --------------------------------- | | 5 | | 6 | | 7 | | 8 | --------------------------------- | 1 | | 2 | | 3 | | 4 | | --------------------------------- */ state_init(&state); move_list_init(&movelist); move_list_init(&expected); state.moves = 1; state.black = SQUARE(14); state.black_kings = SQUARE(23); state.white = 0; state.white_kings = SQUARE(10); move_init(&move); move.src = SQR(10); move.path[0] = SQR(19); move.dst = SQR(28); move.pathlen = 1; move_list_append_capture(expected, move); generate_captures(&state, &movelist); UNITTEST_ASSERT_MOVELIST(movelist, expected); /* Move list: 10-19-28 */ /* --------------------------------- | |29 | |30 | |31 | |32 | --------------------------------- | B | |26 | |27 | |28 | | --------------------------------- | | W | |22 | |23 | |24 | --------------------------------- |17 | |18 | |19 | |20 | | --------------------------------- | |13 | | w | |15 | |16 | --------------------------------- | 9 | |10 | |11 | |12 | | --------------------------------- | | 5 | | 6 | | 7 | | 8 | --------------------------------- | 1 | | 2 | | 3 | | 4 | | --------------------------------- */ state_init(&state); move_list_init(&movelist); move_list_init(&expected); state.black = 0; state.black_kings = SQUARE(25); state.white = SQUARE(14); state.white_kings = SQUARE(21); move_init(&move); move.src = SQR(25); move.path[0] = SQR(18); move.dst = SQR(11); move.pathlen = 1; move_list_append_capture(expected, move); generate_captures(&state, &movelist); UNITTEST_ASSERT_MOVELIST(movelist, expected); /* Move list: 25-18-11 */ /* --------------------------------- | |29 | |30 | |31 | |32 | --------------------------------- | B | |26 | |27 | |28 | | --------------------------------- | | W | |22 | |23 | |24 | --------------------------------- |17 | |18 | |19 | |20 | | --------------------------------- | |13 | | w | | W | |16 | --------------------------------- | 9 | |10 | |11 | |12 | | --------------------------------- | | 5 | | 6 | | 7 | | 8 | --------------------------------- | 1 | | 2 | | 3 | | 4 | | --------------------------------- */ state_init(&state); move_list_init(&movelist); move_list_init(&expected); state.black = 0; state.black_kings = SQUARE(25); state.white = SQUARE(14); state.white_kings = SQUARE(21) | SQUARE(15); move_init(&move); move.src = SQR(25); move.path[0] = SQR(18); move.path[1] = SQR(11); move.dst = SQR(20); move.pathlen = 2; move_list_append_capture(expected, move); generate_captures(&state, &movelist); UNITTEST_ASSERT_MOVELIST(movelist, expected); /* Move list: 25-18-11-20 */ /* --------------------------------- | |29 | |30 | |31 | |32 | --------------------------------- | B | |26 | |27 | |28 | | --------------------------------- | | W | |22 | |23 | |24 | --------------------------------- |17 | |18 | |19 | |20 | | --------------------------------- | |13 | | w | | W | |16 | --------------------------------- | 9 | |10 | |11 | |12 | | --------------------------------- | | 5 | | W | | 7 | | 8 | --------------------------------- | 1 | | w | | 3 | | 4 | | --------------------------------- */ state_init(&state); move_list_init(&movelist); move_list_init(&expected); state.black = 0; state.black_kings = SQUARE(25); state.white = SQUARE(14) | SQUARE(2); state.white_kings = SQUARE(21) | SQUARE(15) | SQUARE(6); move_init(&move); move.src = SQR(25); move.path[0] = SQR(18); move.path[1] = SQR(11); move.dst = SQR(20); move.pathlen = 2; move_list_append_capture(expected, move); generate_captures(&state, &movelist); UNITTEST_ASSERT_MOVELIST(movelist, expected); /* Move list: 25-18-11-20 */ /* --------------------------------- | |29 | |30 | |31 | |32 | --------------------------------- |25 | |26 | |27 | |28 | | --------------------------------- | |21 | |22 | |23 | |24 | --------------------------------- |17 | | w | | w | |20 | | --------------------------------- | |13 | |14 | |15 | |16 | --------------------------------- | 9 | | w | | w | |12 | | --------------------------------- | | 5 | | b | | 7 | | 8 | --------------------------------- | 1 | | 2 | | 3 | | 4 | | --------------------------------- */ state_init(&state); move_list_init(&movelist); move_list_init(&expected); state.black = SQUARE(6); state.white = SQUARE(10) | SQUARE(11) | SQUARE(18) | SQUARE(19); state.black_kings = 0; state.white_kings = 0; move_init(&move); move.src = SQR(6); move.dst = SQR(22); move.path[0] = SQR(13); move.pathlen = 1; move_list_append_capture(expected, move); move.path[0] = SQR(15); move_list_append_capture(expected, move); generate_captures(&state, &movelist); UNITTEST_ASSERT_MOVELIST(movelist, expected); /* --------------------------------- | |29 | |30 | |31 | |32 | --------------------------------- |25 | |26 | |27 | |28 | | --------------------------------- | |21 | |22 | |23 | |24 | --------------------------------- |17 | | w | | w | |20 | | --------------------------------- | |13 | |14 | |15 | |16 | --------------------------------- | 9 | | w | | w | |12 | | --------------------------------- | | 5 | | B | | 7 | | 8 | --------------------------------- | 1 | | 2 | | 3 | | 4 | | --------------------------------- */ state_init(&state); move_list_init(&movelist); move_list_init(&expected); state.black_kings = SQUARE(6); state.white = SQUARE(10) | SQUARE(11) | SQUARE(18) | SQUARE(19); state.black = 0; state.white_kings = 0; move_init(&move); move.src = SQR(6); move.dst = SQR(6); move.path[0] = SQR(13); move.path[1] = SQR(22); move.path[2] = SQR(15); move.pathlen = 3; move_list_append_capture(expected, move); move.path[0] = SQR(15); move.path[1] = SQR(22); move.path[2] = SQR(13); move.pathlen = 3; move_list_append_capture(expected, move); generate_captures(&state, &movelist); /* TODO: fix this test */ UNITTEST_ASSERT_MOVELIST(movelist, expected); /* --------------------------------- | |29 | |30 | |31 | | B | --------------------------------- |25 | | w | | W | | w | | --------------------------------- | |21 | |22 | |23 | |24 | --------------------------------- |17 | | W | | W | | W | | --------------------------------- | |13 | |14 | |15 | |16 | --------------------------------- | 9 | | w | | w | | W | | --------------------------------- | | 5 | | 6 | | 7 | | 8 | --------------------------------- | 1 | | 2 | | 3 | | 4 | | --------------------------------- */ state_init(&state); move_list_init(&movelist); move_list_init(&expected); state.black = 0; state.black_kings = SQUARE(32); state.white = SQUARE(10) | SQUARE(11) | SQUARE(26) | SQUARE(28); state.white_kings = SQUARE(12) | SQUARE(18) | SQUARE(19) | SQUARE(20) | SQUARE(27); /* move_init(&move); */ /* move.src = SQR(25); */ /* move.path[0] = SQR(18); */ /* move.path[1] = SQR(11); */ /* move.dst = SQR(20); */ /* move.pathlen = 2; */ /* move_list_append_capture(expected, move); */ generate_captures(&state, &movelist); /* UNITTEST_ASSERT_MOVELIST(movelist, expected); */ /* print_move_list(movelist); */ /* Move list: 32-23-30-21-14-23-16-7-14-5, 32-23-30-21-14-7-16-23-14-5, 32-23-14-21-30-23-16-7-14-5, 32-23-14-7-16-23-30-21-14-5, 32-23-16-7-14-21-30-23-14-5, 32-23-16-7-14-23-30-21-14-5 */ /* --------------------------------- | |29 | |30 | |31 | | W | --------------------------------- |25 | | b | | b | | b | | --------------------------------- | |21 | |22 | |23 | |24 | --------------------------------- |17 | | b | | b | | b | | --------------------------------- | |13 | |14 | |15 | |16 | --------------------------------- | 9 | | b | | b | | b | | --------------------------------- | | 5 | | 6 | | 7 | | 8 | --------------------------------- | 1 | | 2 | | 3 | | 4 | | --------------------------------- */ state_init(&state); state.moves = 1; move_init(&move); move_list_init(&movelist); move_list_init(&expected); state.black = SQUARE(10) | SQUARE(11) | SQUARE(26) | SQUARE(28) | SQUARE(12) | SQUARE(18) | SQUARE(19) | SQUARE(20) | SQUARE(27); state.black_kings = 0; state.white = 0; state.white_kings = SQUARE(32); generate_captures(&state, &movelist); /* print_move_list(movelist); printf("\n"); */ /* Move list: 32-23-14-7-16-23-30-21-14-5, 32-23-14-21-30-23-16-7-14-5, 32-23-16-7-14-21-30-23-14-5, 32-23-16-7-14-23-30-21-14-5, 32-23-30-21-14-7-16-23-14-5, 32-23-30-21-14-23-16-7-14-5 */ EXIT_UNITTEST(); } void unittest_make_move() { struct state_t state; struct move_t move; struct move_list_t movelist; ENTER_UNITTEST(); /* -- black pawn -- */ /* black move */ state_init(&state); state.black = SQUARE(11); move_init(&move); move.src = SQR(11); move.dst = SQR(15); UNITTEST_ASSERT(!!is_noncapture(&move), TRUE); UNITTEST_ASSERT(!!is_capture(&move), FALSE); make_move(&state, &move); UNITTEST_ASSERT(state.white | state.white_kings | state.black_kings, 0); UNITTEST_ASSERT(!!OCCUPIED(state.black, SQR(11)), FALSE); UNITTEST_ASSERT(!!OCCUPIED(state.black, SQR(15)), TRUE); /* white move */ state_init(&state); state.white = SQUARE(11); state.moves = 1; move_init(&move); move.src = SQR(11); move.dst = SQR(15); UNITTEST_ASSERT(!!is_noncapture(&move), TRUE); UNITTEST_ASSERT(!!is_capture(&move), FALSE); make_move(&state, &move); UNITTEST_ASSERT(state.black | state.black_kings | state.white_kings, 0); UNITTEST_ASSERT(!!OCCUPIED(state.white, SQR(11)), FALSE); UNITTEST_ASSERT(!!OCCUPIED(state.white, SQR(15)), TRUE); /* black king move */ state_init(&state); state.black_kings = SQUARE(11); move_init(&move); move.src = SQR(11); move.dst = SQR(15); UNITTEST_ASSERT(!!is_noncapture(&move), TRUE); UNITTEST_ASSERT(!!is_capture(&move), FALSE); make_move(&state, &move); UNITTEST_ASSERT(state.white | state.white_kings | state.black, 0); UNITTEST_ASSERT(!!OCCUPIED(state.black_kings, SQR(11)), FALSE); UNITTEST_ASSERT(!!OCCUPIED(state.black_kings, SQR(15)), TRUE); /* white king move */ state_init(&state); state.white_kings = SQUARE(11); state.moves = 1; move_init(&move); move.src = SQR(11); move.dst = SQR(15); UNITTEST_ASSERT(!!is_noncapture(&move), TRUE); UNITTEST_ASSERT(!!is_capture(&move), FALSE); make_move(&state, &move); UNITTEST_ASSERT(state.white | state.black_kings | state.black, 0); UNITTEST_ASSERT(!!OCCUPIED(state.white_kings, SQR(11)), FALSE); UNITTEST_ASSERT(!!OCCUPIED(state.white_kings, SQR(15)), TRUE); /* black capture white pawn */ state_init(&state); state.black = SQUARE(11); state.white = SQUARE(15); move_init(&move); move.src = SQR(11); move.dst = SQR(20); UNITTEST_ASSERT(!!is_noncapture(&move), FALSE); UNITTEST_ASSERT(!!is_capture(&move), TRUE); make_move(&state, &move); UNITTEST_ASSERT(state.white | state.white_kings | state.black_kings, 0); UNITTEST_ASSERT(!!OCCUPIED(state.black, SQR(11)), FALSE); UNITTEST_ASSERT(!!OCCUPIED(state.black, SQR(20)), TRUE); /* white capture black pawn */ state_init(&state); state.black = SQUARE(15); state.white = SQUARE(20); state.moves = 1; move_init(&move); move.src = SQR(20); move.dst = SQR(11); UNITTEST_ASSERT(!!is_noncapture(&move), FALSE); UNITTEST_ASSERT(!!is_capture(&move), TRUE); make_move(&state, &move); UNITTEST_ASSERT(state.black | state.white_kings | state.black_kings, 0); UNITTEST_ASSERT(!!OCCUPIED(state.white, SQR(20)), FALSE); UNITTEST_ASSERT(!!OCCUPIED(state.white, SQR(11)), TRUE); /* black capture white king */ state_init(&state); state.black = SQUARE(11); state.white_kings = SQUARE(15); move_init(&move); move.src = SQR(11); move.dst = SQR(20); UNITTEST_ASSERT(!!is_noncapture(&move), FALSE); UNITTEST_ASSERT(!!is_capture(&move), TRUE); make_move(&state, &move); UNITTEST_ASSERT(state.white | state.white_kings | state.black_kings, 0); UNITTEST_ASSERT(!!OCCUPIED(state.black, SQR(11)), FALSE); UNITTEST_ASSERT(!!OCCUPIED(state.black, SQR(20)), TRUE); /* white capture black king */ state_init(&state); state.black_kings = SQUARE(15); state.white = SQUARE(20); state.moves = 1; move_init(&move); move.src = SQR(20); move.dst = SQR(11); UNITTEST_ASSERT(!!is_noncapture(&move), FALSE); UNITTEST_ASSERT(!!is_capture(&move), TRUE); make_move(&state, &move); UNITTEST_ASSERT(state.black | state.white_kings | state.black_kings, 0); UNITTEST_ASSERT(!!OCCUPIED(state.white, SQR(20)), FALSE); UNITTEST_ASSERT(!!OCCUPIED(state.white, SQR(11)), TRUE); /* -- black king -- */ state_init(&state); state.black_kings = SQUARE(11); move_init(&move); move.src = SQR(11); move.dst = SQR(15); UNITTEST_ASSERT(is_noncapture(&move), TRUE); make_move(&state, &move); UNITTEST_ASSERT(state.white | state.white_kings | state.black, 0); UNITTEST_ASSERT(!!OCCUPIED(state.black_kings, SQR(11)), FALSE); UNITTEST_ASSERT(!!OCCUPIED(state.black_kings, SQR(15)), TRUE); /* -- white king -- */ state_init(&state); state.white_kings = SQUARE(11); state.moves = 1; move_init(&move); move.src = SQR(11); move.dst = SQR(15); UNITTEST_ASSERT(!!is_noncapture(&move), TRUE); UNITTEST_ASSERT(!!is_capture(&move), FALSE); make_move(&state, &move); UNITTEST_ASSERT(state.white | state.black_kings | state.black, 0); UNITTEST_ASSERT(!!OCCUPIED(state.white_kings, SQR(11)), FALSE); UNITTEST_ASSERT(!!OCCUPIED(state.white_kings, SQR(15)), TRUE); /* black king captures white pawn */ state_init(&state); state.black_kings = SQUARE(11); state.white = SQUARE(15); move_init(&move); move.src = SQR(11); move.dst = SQR(20); UNITTEST_ASSERT(!!is_noncapture(&move), FALSE); UNITTEST_ASSERT(!!is_capture(&move), TRUE); make_move(&state, &move); UNITTEST_ASSERT(state.white | state.white_kings | state.black, 0); UNITTEST_ASSERT(!!OCCUPIED(state.black_kings, SQR(11)), FALSE); UNITTEST_ASSERT(!!OCCUPIED(state.black_kings, SQR(20)), TRUE); /* white king captures black pawn */ state_init(&state); state.white_kings = SQUARE(11); state.black = SQUARE(15); state.moves = 1; move_init(&move); move.src = SQR(11); move.dst = SQR(20); UNITTEST_ASSERT(!!is_noncapture(&move), FALSE); UNITTEST_ASSERT(!!is_capture(&move), TRUE); make_move(&state, &move); UNITTEST_ASSERT(state.white | state.black_kings | state.black, 0); UNITTEST_ASSERT(!!OCCUPIED(state.white_kings, SQR(11)), FALSE); UNITTEST_ASSERT(!!OCCUPIED(state.white_kings, SQR(20)), TRUE); /* black king capture white king */ state_init(&state); state.black_kings = SQUARE(11); state.white_kings = SQUARE(15); move_init(&move); move.src = SQR(11); move.dst = SQR(20); UNITTEST_ASSERT(!!is_noncapture(&move), FALSE); UNITTEST_ASSERT(!!is_capture(&move), TRUE); make_move(&state, &move); UNITTEST_ASSERT(state.white | state.white_kings | state.black, 0); UNITTEST_ASSERT(!!OCCUPIED(state.black_kings, SQR(11)), FALSE); UNITTEST_ASSERT(!!OCCUPIED(state.black_kings, SQR(20)), TRUE); /* white king capture black king */ state_init(&state); state.white_kings = SQUARE(11); state.black_kings = SQUARE(15); state.moves = 1; move_init(&move); move.src = SQR(11); move.dst = SQR(20); UNITTEST_ASSERT(!!is_noncapture(&move), FALSE); UNITTEST_ASSERT(!!is_capture(&move), TRUE); make_move(&state, &move); UNITTEST_ASSERT(state.white | state.black_kings | state.black, 0); UNITTEST_ASSERT(!!OCCUPIED(state.white_kings, SQR(11)), FALSE); UNITTEST_ASSERT(!!OCCUPIED(state.white_kings, SQR(20)), TRUE); /* black multi-jump */ /* 1 - (x5) 10 - (x13) - 17 - (x21) - 26 */ state_init(&state); state.black = SQUARE(1); state.white = SQUARE(5) | SQUARE(13) | SQUARE(21); move_init(&move); move.src = SQR(1); move.dst = SQR(26); move.pathlen = 2; move.path[0] = SQR(10); move.path[1] = SQR(17); UNITTEST_ASSERT(is_noncapture(&move), FALSE); UNITTEST_ASSERT(is_capture(&move), TRUE); move_list_init(&movelist); get_moves(&state, &movelist); UNITTEST_ASSERT(move_list_num_moves(movelist), 1); UNITTEST_ASSERT(move_compare(&move, &(movelist.moves[0])), 0); make_move(&state, &move); UNITTEST_ASSERT(state.white | state.white_kings | state.black_kings, 0); UNITTEST_ASSERT(!!OCCUPIED(state.black, SQR(1)), FALSE); UNITTEST_ASSERT(!!OCCUPIED(state.black, SQR(26)), TRUE); /* white multi-jump */ /* 26 - (x21) - 17 - (x13) - 10 - (x5) - 1 */ state_init(&state); state.white = SQUARE(26); state.black = SQUARE(5) | SQUARE(13) | SQUARE(21); state.moves = 1; move_init(&move); move.src = SQR(26); move.dst = SQR(1); move.pathlen = 2; move.path[0] = SQR(17); move.path[1] = SQR(10); UNITTEST_ASSERT(is_noncapture(&move), FALSE); UNITTEST_ASSERT(is_capture(&move), TRUE); move_list_init(&movelist); get_moves(&state, &movelist); UNITTEST_ASSERT(move_list_num_moves(movelist), 1); UNITTEST_ASSERT(move_compare(&move, &(movelist.moves[0])), 0); make_move(&state, &move); UNITTEST_ASSERT_MSG(state.black, 0, "%d"); UNITTEST_ASSERT_MSG(state.black_kings, 0, "%d"); UNITTEST_ASSERT_MSG(state.white_kings, 1, "%d"); UNITTEST_ASSERT_MSG(state.white, 0, "%d"); UNITTEST_ASSERT(!!OCCUPIED(state.white, SQR(26)), FALSE); UNITTEST_ASSERT(!!OCCUPIED(state.white_kings, SQR(1)), TRUE); /* black king multi-jump */ /* 1 - (x5) 10 - (x13) - 17 - (x21) - 26 */ state_init(&state); state.black_kings = SQUARE(1); state.white = SQUARE(5) | SQUARE(13) | SQUARE(21); move_init(&move); move.src = SQR(1); move.dst = SQR(26); move.pathlen = 2; move.path[0] = SQR(10); move.path[1] = SQR(17); UNITTEST_ASSERT(is_noncapture(&move), FALSE); UNITTEST_ASSERT(is_capture(&move), TRUE); move_list_init(&movelist); get_moves(&state, &movelist); UNITTEST_ASSERT(move_list_num_moves(movelist), 1); UNITTEST_ASSERT(move_compare(&move, &(movelist.moves[0])), 0); make_move(&state, &move); UNITTEST_ASSERT(state.white | state.white_kings | state.black, 0); UNITTEST_ASSERT(!!OCCUPIED(state.black_kings, SQR(1)), FALSE); UNITTEST_ASSERT(!!OCCUPIED(state.black_kings, SQR(26)), TRUE); /* white king multi-jump */ /* 1 - (x5) 10 - (x13) - 17 - (x21) - 26 */ state_init(&state); state.white_kings = SQUARE(1); state.black = SQUARE(5) | SQUARE(13) | SQUARE(21); state.moves = 1; move_init(&move); move.src = SQR(1); move.dst = SQR(26); move.pathlen = 2; move.path[0] = SQR(10); move.path[1] = SQR(17); UNITTEST_ASSERT(is_noncapture(&move), FALSE); UNITTEST_ASSERT(is_capture(&move), TRUE); move_list_init(&movelist); get_moves(&state, &movelist); UNITTEST_ASSERT(move_list_num_moves(movelist), 1); UNITTEST_ASSERT(move_compare(&move, &(movelist.moves[0])), 0); make_move(&state, &move); UNITTEST_ASSERT(state.white | state.black_kings | state.black, 0); UNITTEST_ASSERT(!!OCCUPIED(state.white_kings, SQR(1)), FALSE); UNITTEST_ASSERT(!!OCCUPIED(state.white_kings, SQR(26)), TRUE); EXIT_UNITTEST(); } void unittest_perft() { int depth; // from www.aartbik.com/MISC/checkers.html const uint64_t expected[] = { 1 ,7 ,49 ,302 ,1469 ,7361 ,36768 ,179740 ,845931 ,3963680 ,18391564 ,85242128 ,388623673 ,1766623630 ,7978439499 ,36263167175 /* ,165629569428 */ /* ,758818810990 */ /* ,3493881706141 */ /* ,16114043592799 */ /* ,74545030871553 */ /* ,345100524480819 */ /* ,1602372721738102 */ /* ,7437536860666213 */ /* ,34651381875296000 */ /* ,161067479882075800 */ /* ,752172458688067137 */ /* ,3499844183628002605 */ /* ,16377718018836900735 */ }; uint64_t nodes; struct timeval start; struct timeval end; ENTER_UNITTEST(); for (depth = 0; depth < (sizeof(expected) / sizeof(expected[0])); ++depth) { gettimeofday(&start, 0); nodes = perft(depth); gettimeofday(&end, 0); printf("perft(%d) = %lu in %lu ms.\n", depth, nodes, ((end.tv_sec * 1000000UL + end.tv_usec) - (start.tv_sec * 1000000UL + start.tv_usec)) / 1000UL); UNITTEST_ASSERT_MSG(nodes, expected[depth], "%lu"); } EXIT_UNITTEST(); } /* --- End Unit Tests --- */ /* --- Begin user input functions --- */ int parse_int(const char* line, int sz) { int ret = 0; int multiplier = 1; const char* pos = line + sz - 1; while (pos >= line) { if (!isdigit(*pos)) break; ret += (*pos - '0') * multiplier; multiplier *= 10; --pos; } return ret; } int valid_input(const char* line, struct move_t* move) { regex_t preg; const size_t nmatch = 11; regmatch_t pmatch[11]; int i; /* * NOTE: allows separator to be '-' or 'x' and for them to be mixed. * this is way easier to implement and doesn't really matter. */ if (regcomp(&preg, "([0-9]+)" // match 1 "([ ]*[-x][ ]*[0-9]+)" // match 2 "([ ]*[-x][ ]*[0-9]+)?" // match 3 (optional) "([ ]*[-x][ ]*[0-9]+)?" // match 4 (optional) "([ ]*[-x][ ]*[0-9]+)?" // match 5 (optional) "([ ]*[-x][ ]*[0-9]+)?" // match 6 (optional) "([ ]*[-x][ ]*[0-9]+)?" // match 7 (optional) "([ ]*[-x][ ]*[0-9]+)?" // match 8 (optional) "([ ]*[-x][ ]*[0-9]+)?" // match 9 (optional) "([ ]*[-x][ ]*[0-9]+)?" // match 10 (optional) , REG_EXTENDED) != 0) { return -1; } if (regexec(&preg, line, nmatch, &pmatch[0], 0) != 0) { return -2; } if (pmatch[1].rm_so == -1) { return -3; // no match } move_init(move); move->src = SQR(parse_int(&line[pmatch[1].rm_so], pmatch[1].rm_eo - pmatch[1].rm_so)); for (i = 2; i < nmatch && pmatch[i].rm_so != -1; ++i) { move->path[i - 2] = SQR(parse_int(&line[pmatch[i].rm_so], pmatch[i].rm_eo - pmatch[i].rm_so)); } move->dst = move->path[i - 3]; move->path[i - 3] = 0; move->pathlen = i - 3; return 0; } int read_move(FILE* input, struct move_t* move) { char* line = 0; size_t n = 0; ssize_t ret; ret = getline(&line, &n, input); if (ret >= 1) { if (line[ret - 1] == '\n') { // chomp(line) line[ret - 1] = 0; } ret = valid_input(line, move); free(line); } return ret; } int valid_move(struct state_t* state, struct move_t* move) { struct move_list_t movelist; move_list_init(&movelist); get_moves(state, &movelist); int nmoves = move_list_num_moves(movelist); int i; boolean ok = FALSE; for (i = 0; i < nmoves && ok == FALSE; ++i) { ok = move_compare(move, &movelist.moves[i]) == 0; } return ok ^ 1; /* return 0 if ok */ } int ask_to_quit() { char* line = 0; size_t n = 0; ssize_t ret; printf("Would you like to quit? "); ret = getline(&line, &n, stdin); if (ret > 0) { if (line[0] == 'y' || line[0] == 'Y') { ret = 0; } free(line); } return ret; } /* --- End user input functions --- */ int main(int argc, char **argv) { #define DO_UNITTEST #if defined(PRINT_LEDGER) perft(8); #elif defined(DO_UNITTEST) unittest_move_list_compare(); unittest_move_list_sort(); unittest_generate_moves(); unittest_generate_captures(); unittest_generate_multicaptures(); unittest_make_move(); unittest_perft(); #elif defined(SHOW_STARTING_POSITION) struct state_t state; struct move_list_t moves; state_init(&state); move_list_init(&moves); setup_start_position(state); print_board(state); #else /* play game */ struct state_t state; struct move_t move; int moves; state_init(&state); setup_start_position(state); for (moves = 0; moves < 5; ++moves) { while (1) { print_board(state); printf("Enter move #%d: ", moves + 1); read_move(stdin, &move); if (valid_move(&state, &move) == 0) { break; } else { printf("\n\nInvalid move!!\n"); if (ask_to_quit(stdin) == 0) { goto quit; } } } printf("Move: "); __print_move(stdout, &move); printf("\n"); make_move(&state, &move); ++state.moves; } quit: printf("Bye.\n"); #endif return 0; }
selavy/checkers
main.c
C
gpl-2.0
87,073
<<<<<<< HEAD /* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2010 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * FCKStyleCommand Class: represents the "Style" command. */ var FCKStyleCommand = function() {} FCKStyleCommand.prototype = { Name : 'Style', Execute : function( styleName, styleComboItem ) { FCKUndo.SaveUndoStep() ; if ( styleComboItem.Selected ) FCK.Styles.RemoveStyle( styleComboItem.Style ) ; else FCK.Styles.ApplyStyle( styleComboItem.Style ) ; FCKUndo.SaveUndoStep() ; FCK.Focus() ; FCK.Events.FireEvent( 'OnSelectionChange' ) ; }, GetState : function() { if ( FCK.EditMode != FCK_EDITMODE_WYSIWYG || !FCK.EditorDocument ) return FCK_TRISTATE_DISABLED ; if ( FCKSelection.GetType() == 'Control' ) { var el = FCKSelection.GetSelectedElement() ; if ( !el || !FCKStyles.CheckHasObjectStyle( el.nodeName.toLowerCase() ) ) return FCK_TRISTATE_DISABLED ; } return FCK_TRISTATE_OFF ; } }; ======= /* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2010 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * FCKStyleCommand Class: represents the "Style" command. */ var FCKStyleCommand = function() {} FCKStyleCommand.prototype = { Name : 'Style', Execute : function( styleName, styleComboItem ) { FCKUndo.SaveUndoStep() ; if ( styleComboItem.Selected ) FCK.Styles.RemoveStyle( styleComboItem.Style ) ; else FCK.Styles.ApplyStyle( styleComboItem.Style ) ; FCKUndo.SaveUndoStep() ; FCK.Focus() ; FCK.Events.FireEvent( 'OnSelectionChange' ) ; }, GetState : function() { if ( FCK.EditMode != FCK_EDITMODE_WYSIWYG || !FCK.EditorDocument ) return FCK_TRISTATE_DISABLED ; if ( FCKSelection.GetType() == 'Control' ) { var el = FCKSelection.GetSelectedElement() ; if ( !el || !FCKStyles.CheckHasObjectStyle( el.nodeName.toLowerCase() ) ) return FCK_TRISTATE_DISABLED ; } return FCK_TRISTATE_OFF ; } }; >>>>>>> origin/master
marvoey/live-web
sites/all/libraries/fckeditor/editor/_source/commandclasses/fckstylecommand.js
JavaScript
gpl-2.0
2,955
class City(object): def __init__(self, name): self.name = name def Name(self): return self.name class Home(object): def __init__(self, name, city): self.name = name self.city = city def Name(self): return self.name def City(self): return self.city class Person(object): def __init__(self, name, home): self.name = name self.home = home def Name(self): return self.name def Home(self): return self.home city = City('Karlstad') home = Home('Nilssons hemmet', city) person = Person('Nils', home) print '%s bor i %s som ligger i staden %s.' % (person.Name(), person.Home().Name(), person.Home().City().Name())
Kolguyev/samples
law_of_demeter/law_of_demeter_bad_example.py
Python
gpl-2.0
738
<?php add_action( 'init', 'register_cpt_house_ads' ); function register_cpt_house_ads() { $labels = array( 'name' => _x( 'House Ads', 'craft' ), 'singular_name' => _x( 'House Ad', 'craft' ), 'add_new' => _x( 'Add New', 'craft' ), 'add_new_item' => _x( 'Add New House Ad', 'craft' ), 'edit_item' => _x( 'House Ad', 'craft' ), 'new_item' => _x( 'New House Ad', 'craft' ), 'view_item' => _x( 'View House Ads', 'craft' ), 'search_items' => _x( 'Search House Ads', 'craft' ), 'not_found' => _x( 'No House Ads found', 'craft' ), 'not_found_in_trash' => _x( 'No House Ads found in Trash', 'craft' ), 'parent_item_colon' => _x( 'Parent Craft:', 'craft' ), 'menu_name' => _x( 'House Ads', 'craft' ), ); $args = array( 'labels' => $labels, 'supports' => array( 'title', 'thumbnail' ), 'public' => true, 'show_ui' => false, 'show_in_menu' => true, 'show_in_nav_menus' => false, 'publicly_queryable' => false, 'exclude_from_search' => false, 'has_archive' => true, 'query_var' => true, 'can_export' => true, 'rewrite' => true, 'capability_type' => 'post', 'menu_position' => 100, ); register_post_type( 'house-ads', $args ); } $field_data = array ( 'advanced_testgroup' => array ( 'fields' => array( 'LinkURL' => array(), ), 'title' => 'House Ad Meta', 'context' => 'side', 'pages' => array( 'house-ads' ), ), ); $easy_cf = new Easy_CF($field_data); function make_house_ad() { $ad_query = new WP_Query( array( 'post_type' => 'house-ads', 'posts_per_page' => 20, 'fields' => 'ids', 'no_found_rows' => true, ) ); $ad_ids = $ad_query->get_posts(); if ( ! empty( $ad_ids ) ) : shuffle( $ad_ids ); $ad_id = array_shift( $ad_ids ); $post = get_post( $ad_id ); $output = null; if ( $post ) : setup_postdata( $post ); $output .= '<div class="house-ad"><a href="'. esc_url( get_post_meta( $post->ID, 'LinkURL', true ) ).'">'; $output .= get_the_post_thumbnail( $post->ID, 'house-ad'); $output .= '</a></div>'; endif; return $output; endif; // Reset Post Data wp_reset_postdata(); }
Make-Magazine/makeblog
includes/house-ads-cpt.php
PHP
gpl-2.0
2,087
--TEST-- Trying to exclude trait method multiple times --FILE-- <?php trait foo { public function test() { return 3; } } trait c { public function test() { return 2; } } trait b { public function test() { return 1; } } class bar { use foo, c { c::test insteadof foo, b; } use foo, c { c::test insteadof foo, b; } } $x = new bar; var_dump($x->test()); ?> --EXPECTF-- Fatal error: Failed to evaluate a trait precedence (test). Method of trait foo was defined to be excluded multiple times in %s on line %d
ssanglee/capstone
php-5.4.6/Zend/tests/traits/error_010.phpt
PHP
gpl-2.0
514
<?php // This file is part of Moodle - http://moodle.org/ // // Moodle is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // Moodle is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with Moodle. If not, see <http://www.gnu.org/licenses/>. /** * TinyMCE text editor integration. * * @package editor * @subpackage tinymce * @copyright 2009 Petr Skoda (http://skodak.org) * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ defined('MOODLE_INTERNAL') || die(); class tinymce_texteditor extends texteditor { /** @var string active version - directory name */ public $version = '3.4.2'; //Change the value to the proper TinyMCE version that your Moodle setup is using. You can check this in the original lib.php that you were supposed to backup ; ) public function supported_by_browser() { if (check_browser_version('MSIE', 6)) { return true; } if (check_browser_version('Gecko', 20030516)) { return true; } if (check_browser_version('Safari', 412)) { return true; } if (check_browser_version('Chrome', 6)) { return true; } if (check_browser_version('Opera', 9)) { return true; } return false; } public function get_supported_formats() { return array(FORMAT_HTML => FORMAT_HTML); } public function get_preferred_format() { return FORMAT_HTML; } public function supports_repositories() { return true; } public function head_setup() { } public function use_editor($elementid, array $options=null, $fpoptions=null) { global $PAGE; if (debugging('', DEBUG_DEVELOPER)) { $PAGE->requires->js('/lib/editor/tinymce/tiny_mce/'.$this->version.'/tiny_mce_src.js'); } else { $PAGE->requires->js('/lib/editor/tinymce/tiny_mce/'.$this->version.'/tiny_mce.js'); } $PAGE->requires->js_init_call('M.editor_tinymce.init_editor', array($elementid, $this->get_init_params($elementid, $options)), true); if ($fpoptions) { $PAGE->requires->js_init_call('M.editor_tinymce.init_filepicker', array($elementid, $fpoptions), true); } } protected function get_init_params($elementid, array $options=null) { global $CFG, $PAGE, $OUTPUT; //TODO: we need to implement user preferences that affect the editor setup too $directionality = get_string('thisdirection', 'langconfig'); $strtime = get_string('strftimetime'); $strdate = get_string('strftimedaydate'); $lang = current_language(); $contentcss = $PAGE->theme->editor_css_url()->out(false); $context = empty($options['context']) ? get_context_instance(CONTEXT_SYSTEM) : $options['context']; $xmedia = 'moodlemedia,'; // HQ thinks it should be always on, so it is no matter if it will actually work or not /* if (!empty($options['legacy'])) { $xmedia = 'moodlemedia,'; } else { if (!empty($options['noclean']) or !empty($options['trusted'])) { } }*/ $filters = filter_get_active_in_context($context); if (array_key_exists('filter/tex', $filters)) { $xdragmath = ',dragmath,'; } else { $xdragmath = ''; } if (array_key_exists('filter/emoticon', $filters)) { $xemoticon = ',moodleemoticon'; } else { $xemoticon = ''; } //*************Hack to enable the**************** //**installation of other TinyMCE modules******** //**Author: Patrick Thibaudeau //**Company: oohoo.biz //**copyright: 2011 $defaultplugins = $CFG->mceconf_default_plugins; if (!empty($CFG->mceconf_plugins)){ $mceplugins = ",$CFG->mceconf_plugins"; } else { $mceplugins = ''; } if (!empty($CFG->mceconf_buttons1_add)){ $mcerow1 = ",|,$CFG->mceconf_buttons1_add"; } else { $mcerow1 = ''; } if (!empty($CFG->mceconf_buttons2_add)){ $mcerow2 = ",|,$CFG->mceconf_buttons2_add"; } else { $mcerow2 = ''; } if (!empty($CFG->mceconf_buttons3_add)){ $mcerow3 = ",|,$CFG->mceconf_buttons3_add"; } else { $mcerow3 = ''; } $params = array( 'mode' => "exact", 'elements' => $elementid, 'relative_urls' => false, 'document_base_url' => $CFG->httpswwwroot, 'content_css' => $contentcss, 'language' => $lang, 'directionality' => $directionality, 'plugin_insertdate_dateFormat ' => $strdate, 'plugin_insertdate_timeFormat ' => $strtime, 'theme' => "advanced", 'skin' => "o2k7", 'skin_variant' => "silver", 'apply_source_formatting' => true, 'remove_script_host' => false, 'entity_encoding' => "raw", 'plugins' => "{$xmedia}{$defaultplugins}{$mceplugins}{$xemoticon}{$xdragmath}", 'theme_advanced_font_sizes' => "1,2,3,4,5,6,7", 'theme_advanced_layout_manager' => "SimpleLayout", 'theme_advanced_toolbar_align' => "left", 'theme_advanced_buttons1' => "fontselect,fontsizeselect,formatselect", 'theme_advanced_buttons1_add' => "|,undo,redo,|,search,replace,|,fullscreen{$mcerow1}", 'theme_advanced_buttons2' => "bold,italic,underline,strikethrough,sub,sup,|,justifyleft,justifycenter,justifyright", 'theme_advanced_buttons2_add' => "|,cleanup,removeformat,pastetext,pasteword,|,forecolor,backcolor,|,ltr,rtl{$mcerow2}", 'theme_advanced_buttons3' => "bullist,numlist,outdent,indent,|,link,unlink,moodlenolink,|,image,{$xemoticon}{$xmedia}{$xdragmath}nonbreaking,charmap", 'theme_advanced_buttons3_add' => "table,|,code,spellchecker{$mcerow3}", 'theme_advanced_fonts' => "Trebuchet=Trebuchet MS,Verdana,Arial,Helvetica,sans-serif;Arial=arial,helvetica,sans-serif;Courier New=courier new,courier,monospace;Georgia=georgia,times new roman,times,serif;Tahoma=tahoma,arial,helvetica,sans-serif;Times New Roman=times new roman,times,serif;Verdana=verdana,arial,helvetica,sans-serif;Impact=impact;Wingdings=wingdings", 'theme_advanced_resize_horizontal' => true, 'theme_advanced_resizing' => true, 'theme_advanced_toolbar_location' => "top", 'theme_advanced_statusbar_location' => "bottom", 'spellchecker_rpc_url' => $CFG->wwwroot."/lib/editor/tinymce/tiny_mce/$this->version/plugins/spellchecker/rpc.php" ); if ($xemoticon) { $manager = get_emoticon_manager(); $emoticons = $manager->get_emoticons(); $imgs = array(); // see the TinyMCE plugin moodleemoticon for how the emoticon index is (ab)used :-S $index = 0; foreach ($emoticons as $emoticon) { $imgs[$emoticon->text] = $OUTPUT->render( $manager->prepare_renderable_emoticon($emoticon, array('class' => 'emoticon emoticon-index-'.$index++))); } $params['moodleemoticon_emoticons'] = json_encode($imgs); } if (empty($CFG->xmlstrictheaders) and (!empty($options['legacy']) or !empty($options['noclean']) or !empty($options['trusted']))) { // now deal somehow with non-standard tags, people scream when we do not make moodle code xtml strict, // but they scream even more when we strip all tags that are not strict :-( $params['valid_elements'] = 'script[src|type],*[*]'; // for some reason the *[*] does not inlcude javascript src attribute MDL-25836 $params['invalid_elements'] = ''; } if (empty($options['legacy'])) { if (isset($options['maxfiles']) and $options['maxfiles'] != 0) { $params['file_browser_callback'] = "M.editor_tinymce.filepicker"; } } return $params; } }
MadelynDRC/Moogle
lib/editor/tinymce/libcambiado.php
PHP
gpl-2.0
8,967
/* * Dropbear - a SSH2 server * * Copyright (c) 2002,2003 Matt Johnston * All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ /* Buffer handling routines, designed to avoid overflows/using invalid data */ #include "includes.h" #include "util.h" #include "buffer.h" /* Create (malloc) a new buffer of size */ buffer* buf_new(unsigned int size) { buffer* ret; ret = (buffer*)m_malloc(sizeof(buffer)); buf_init(ret, size); return ret; } /* free the buffer's data and the buffer itself */ void buf_free(buffer* buf) { m_free(buf->data) m_free(buf); } /* overwrite the contents of the buffer to clear it */ void buf_burn(buffer* buf) { m_burn(buf->data, buf->size); } /* initialise an already allocated buffer. The data won't be freed before * malloc */ void buf_init(buffer* buf, unsigned int size) { if (size > 0) { buf->data = (unsigned char*)m_malloc(size); } else { buf->data = NULL; } buf->size = size; buf->pos = 0; buf->len = 0; } /* resize a buffer, pos and len will be repositioned if required */ void buf_resize(buffer *buf, unsigned int newsize) { buf->data = m_realloc(buf->data, newsize); buf->size = newsize; buf->len = MIN(newsize, buf->len); buf->pos = MIN(newsize, buf->pos); } /* create a copy of buf, allocating required memory etc */ /* the new buffer is sized the same as the length of the source buffer */ /* lenonly is a boolean flag specifying whether to set the size of the new * buffer to be just the len of the source buffer (1), or the size of the * source buffer (0) */ buffer* buf_newcopy(buffer* buf) { buffer* ret; ret = buf_new(buf->len); ret->len = buf->len; memcpy(ret->data, buf->data, buf->len); return ret; } /* Set the length of the buffer */ void buf_setlen(buffer* buf, unsigned int len) { if (len > buf->size) { dropbear_exit("bad buf_setlen"); } buf->len = len; } /* Increment the length of the buffer */ void buf_incrlen(buffer* buf, unsigned int incr) { if (buf->len + incr > buf->size) { dropbear_exit("bad buf_incrlen"); } buf->len += incr; } /* Set the position of the buffer */ void buf_setpos(buffer* buf, unsigned int pos) { if (pos > buf->len) { dropbear_exit("bad buf_setpos"); } buf->pos = pos; } /* increment the postion by incr, increasing the buffer length if required */ void buf_incrwritepos(buffer* buf, unsigned int incr) { if (buf->pos + incr > buf->size) { dropbear_exit("bad buf_incrwritepos"); } buf->pos += incr; if (buf->pos > buf->len) { buf->len = buf->pos; } } /* increment the position by incr, negative values are allowed, to * decrement the pos*/ void buf_incrpos(buffer* buf, int incr) { if ((unsigned int)((int)buf->pos + incr) > buf->len || ((int)buf->pos + incr) < 0) { dropbear_exit("bad buf_incrpos"); } buf->pos += incr; } /* Get a byte from the buffer and increment the pos */ unsigned char buf_getbyte(buffer* buf) { if (buf->pos >= buf->len) { dropbear_exit("bad buf_getbyte"); } return buf->data[buf->pos++]; } /* put a byte, incrementing the length if required */ void buf_putbyte(buffer* buf, unsigned char val) { if (buf->pos >= buf->len) { buf_incrlen(buf, 1); } buf->data[buf->pos] = val; buf->pos++; } /* returns an in-place pointer to the buffer, for boundschecking */ unsigned char* buf_getptr(buffer* buf, unsigned int len) { if (buf->pos + len > buf->len) { dropbear_exit("bad buf_getptr"); } return &buf->data[buf->pos]; } /* like buf_getptr, but checks against total size, not used length. * This allows writing past the used length, but not past the size */ unsigned char* buf_getwriteptr(buffer* buf, unsigned int len) { if (buf->pos + len > buf->size) { dropbear_exit("bad buf_getwriteptr"); } return &buf->data[buf->pos]; } /* return a null-terminated string, it is malloced, so must be free()ed * Note that the string isn't checked for null bytes, hence the retlen * may be longer than what is returned by strlen */ unsigned char* buf_getstring(buffer* buf, unsigned int *retlen) { unsigned int len; unsigned char* ret; len = buf_getint(buf); if (len > MAX_STRING_LEN) { dropbear_exit("string too long"); } if (retlen != NULL) { *retlen = len; } ret = m_malloc(len+1); memcpy(ret, buf_getptr(buf, len), len); buf_incrpos(buf, len); ret[len] = '\0'; return ret; } /* Get an uint32 from the buffer and increment the pos */ unsigned int buf_getint(buffer* buf) { unsigned int ret; LOAD32H(ret, buf_getptr(buf, 4)); buf_incrpos(buf, 4); return ret; } /* put a 32bit uint into the buffer, incr bufferlen & pos if required */ void buf_putint(buffer* buf, int unsigned val) { STORE32H(val, buf_getwriteptr(buf, 4)); buf_incrwritepos(buf, 4); } /* put a SSH style string into the buffer, increasing buffer len if required */ void buf_putstring(buffer* buf, const unsigned char* str, unsigned int len) { buf_putint(buf, len); buf_putbytes(buf, str, len); } /* put the set of len bytes into the buffer, incrementing the pos, increasing * len if required */ void buf_putbytes(buffer *buf, const unsigned char *bytes, unsigned int len) { memcpy(buf_getwriteptr(buf, len), bytes, len); buf_incrwritepos(buf, len); } /* for our purposes we only need positive (or 0) numbers, so will * fail if we get negative numbers */ void buf_putmpint(buffer* buf, mp_int * mp) { unsigned int len, pad = 0; TRACE(("enter buf_putmpint")); assert(mp != NULL); if (SIGN(mp) == MP_NEG) { dropbear_exit("negative bignum"); } /* zero check */ if (USED(mp) == 1 && DIGIT(mp, 0) == 0) { len = 0; } else { /* SSH spec requires padding for mpints with the MSB set, this code * implements it */ len = mp_count_bits(mp); /* if the top bit of MSB is set, we need to pad */ pad = (len%8 == 0) ? 1 : 0; len = len / 8 + 1; /* don't worry about rounding, we need it for padding anyway when len%8 == 0 */ } /* store the length */ buf_putint(buf, len); /* store the actual value */ if (len > 0) { if (pad) { buf_putbyte(buf, 0x00); } if (mp_to_unsigned_bin(mp, buf_getwriteptr(buf, len-pad)) != MP_OKAY) { dropbear_exit("mpint error"); } buf_incrwritepos(buf, len-pad); } TRACE(("leave buf_putmpint")); } /* Retrieve an mp_int from the buffer. * Will fail for -ve since they shouldn't be required here. * Returns DROPBEAR_SUCCESS or DROPBEAR_FAILURE */ int buf_getmpint(buffer* buf, mp_int* mp) { unsigned int len; len = buf_getint(buf); if (len == 0) { mp_zero(mp); return DROPBEAR_SUCCESS; } /* check for negative */ if (*buf_getptr(buf, 1) & (1 << (CHAR_BIT-1))) { return DROPBEAR_FAILURE; } if (mp_read_unsigned_bin(mp, buf_getptr(buf, len), len) != MP_OKAY) { return DROPBEAR_FAILURE; } buf_incrpos(buf, len); return DROPBEAR_SUCCESS; }
z3bu/AH4222
userapps/opensource/sshd/buffer.c
C
gpl-2.0
7,810
# snippets This project is generated with [yo angular generator](https://github.com/yeoman/generator-angular) version 0.14.0. ## Build & development Run `grunt` for building and `grunt serve` for preview. ## Testing Running `grunt test` will run the unit tests with karma.
netlabspl/snippets
frontend/README.md
Markdown
gpl-2.0
278
<?php /** * Joom!Fish - Multi Lingual extention and translation manager for Joomla! * Copyright (C) 2003 - 2013, Think Network GmbH, Konstanz * * All rights reserved. The Joom!Fish project is a set of extentions for * the content management system Joomla!. It enables Joomla! * to manage multi lingual sites especially in all dynamic information * which are stored in the database. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. * * The "GNU General Public License" (GPL) is available at * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html * ----------------------------------------------------------------------------- * @package joomfish * @subpackage Views * */ // Check to ensure this file is included in Joomla! defined( '_JEXEC' ) or die( 'Restricted access' ); /** * shows the overview of orphan translations * * @param unknown_type $this->rows * @param unknown_type $this->search * @param unknown_type $this->pageNav * @param unknown_type $this->langlist * @param unknown_type $this->clist * @param unknown_type $this->catid * @param unknown_type $this->language_id * @param unknown_type $this->filterlist */ $filterOptions = '<table><tr><td width="100%"></td>'; if (strlen($this->langlist)>0) $filterOptions .= '<td nowrap align="center">' .JText::_( 'LANGUAGES' ). ':<br/>' .$this->langlist. '</td>'; $filterOptions .= '<td nowrap align="center">' .JText::_( 'CONTENT_ELEMENTS' ). ':<br/>' .$this->clist. '</td>'; $filterOptions .= '</tr></table>'; if (isset($this->filterlist) && count($this->filterlist)>0){ $filterOptions .= '<table><tr><td width="100%"></td>'; foreach ($this->filterlist as $fl){ if (is_array($fl)) $filterOptions .= "<td nowrap align='center'>".$fl["title"].":<br/>".$fl["html"]."</td>"; } $filterOptions .= '</tr></table>'; } //$this->_JoomlaHeader( JText::_( 'CLEANUP_ORPHANS' ), 'orphan', $filterOptions ); ?> <form action="index.php" method="post" name="adminForm"> <?php echo $filterOptions; ?> <table class="adminlist" cellspacing="1"> <thead> <tr> <th width="20"><input type="checkbox" name="toggle" value="" onclick="checkAll(<?php echo count($this->rows); ?>);" /></th> <th class="title" width="20%" align="left" nowrap="nowrap"><?php echo JText::_( 'TITLE' );?></th> <th width="10%" align="left" nowrap="nowrap"><?php echo JText::_( 'LANGUAGE' );?></th> <th width="20%" align="left" nowrap="nowrap"><?php echo JText::_('TITLE_TRANSLATION');?></th> <th width="15%" align="left" nowrap="nowrap"><?php echo JText::_('TITLE_DATECHANGED');?></th> <th width="15%" nowrap="nowrap" align="center"><?php echo JText::_('TITLE_STATE');?></th> <th align="center" nowrap="nowrap"><?php echo JText::_('TITLE_PUBLISHED');?></th> </tr> </thead> <tfoot> <tr> <td align="center" colspan="7"> <?php echo $this->pageNav->getListFooter(); ?> </td> </tr> </tfoot> <?php if( !isset($this->catid) || $this->catid == "" ) { ?> <tbody> <tr><td colspan="8"><p><?php echo JText::_('NOELEMENT_SELECTED');?></p></td></tr> </tbody></table> <?php } else { ?> <tbody> <?php $k=0; $i=0; foreach ($this->rows as $row ) { ?> <tr class="<?php echo "row$k"; ?>"> <td width="20"> <?php if ($row->checked_out && $row->checked_out != $user->id) { ?> &nbsp; <?php } else { ?> <input type="checkbox" id="cb<?php echo $i;?>" name="cid[]" value="<?php echo $row->jfc_id."|".$row->jfc_refid."|".$row->language_id; ?>" onclick="isChecked(this.checked);" /> <?php } ?> </td> <td> <a href="#detail" onclick="return listItemTask('cb<?php echo $i;?>','translate.orphandetail')"><?php echo $row->title; ?></a> </td> <td nowrap><?php echo $row->language ? $row->language : JText::_( 'NOTRANSLATIONYET' ); ?></td> <td><?php echo $row->titleTranslation ? $row->titleTranslation : '&nbsp;'; ?></td> <td><?php echo $row->lastchanged ? JHTML::_('date', $row->lastchanged, JText::_('DATE_FORMAT_LC2')):"" ;?></td> <?php switch( $row->state ) { case 1: $img = 'status_g.png'; break; case 0: $img = 'status_y.png'; break; case -1: default: $img = 'status_r.png'; break; } ?> <td align="center"><img src="components/com_joomfish/images/<?php echo $img;?>" width="12" height="12" border="0" alt="" /></td> <?php if (isset($row->published) && $row->published) { $img = 'publish_g.png'; } else { $img = 'publish_x.png'; } $href=''; if( $row->state>=0 ) { $href = '<a href="javascript: void(0);" '; $href .= 'onclick="return listItemTask(\'cb' .$i. '\',\'' .($row->published ? 'unpublish' : 'publish'). '\')">'; $href .= '<img src="images/' .$img. '" width="12" height="12" border="0" alt="" />'; $href .= '</a>'; } else { $href = '<img src="images/' .$img. '" width="12" height="12" border="0" alt="" />'; } ?> <td align="center"><?php echo $href;?></td> <?php $k = 1 - $k; $i++; ?> </tr> <?php }?> </tbody> </table> <br /> <table cellspacing="0" cellpadding="4" border="0" align="center"> <tr align="center"> <td> <img src="components/com_joomfish/assets/images/status_g.png" width="12" height="12" border=0 alt="<?php echo JText::_('STATE_OK');?>" /> </td> <td> <?php echo JText::_('TRANSLATION_UPTODATE');?> |</td> <td> <img src="components/com_joomfish/assets/images/status_y.png" width="12" height="12" border=0 alt="<?php echo JText::_('STATE_CHANGED');?>" /> </td> <td> <?php echo JText::_('TRANSLATION_INCOMPLETE');?> |</td> <td> <img src="components/com_joomfish/assets/images/status_r.png" width="12" height="12" border=0 alt="<?php echo JText::_('STATE_NOTEXISTING');?>" /> </td> <td> <?php echo JText::_('TRANSLATION_NOT_EXISTING');?></td> </tr> <tr align="center"> <td> <?php echo JHTML::_('image','admin/publish_g.png', JText::_( 'TRANSLATION_PUBLISHED' ), NULL, true);?> </td> <td> <?php echo JText::_('TRANSLATION_PUBLISHED');?> |</td> <td> <?php echo JHTML::_('image','admin/publish_x.png', JText::_( 'TRANSLATION_UNPUBLISHED' ), NULL, true);?> </td> <td> <?php echo JText::_('TRANSLATION_NOT_PUBLISHED');?> </td> <td> &nbsp; </td> <td> <?php echo JText::_('STATE_TOGGLE');?> </td> </tr> </table> <?php } ?> <input type="hidden" name="option" value="com_joomfish" /> <input type="hidden" name="task" value="translate.orphans" /> <input type="hidden" name="boxchecked" value="0" /> <?php echo JHTML::_( 'form.token' ); ?> </form>
DanhThong/svn-matong
administrator/components/com_joomfish/views/translate/tmpl/orphans.php
PHP
gpl-2.0
7,510
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!-- NewPage --> <html lang="en"> <head> <!-- Generated by javadoc (version 1.6.0_30) on Tue Apr 08 09:07:03 MDT 2014 --> <title>N-Index</title> <meta name="date" content="2014-04-08"> <link rel="stylesheet" type="text/css" href="../stylesheet.css" title="Style"> </head> <body> <script type="text/javascript"><!-- if (location.href.indexOf('is-external=true') == -1) { parent.document.title="N-Index"; } //--> </script> <noscript> <div>JavaScript is disabled on your browser.</div> </noscript> <!-- ========= START OF TOP NAVBAR ======= --> <div class="topNav"><a name="navbar_top"> <!-- --> </a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../overview-summary.html">Overview</a></li> <li>Package</li> <li>Class</li> <li>Use</li> <li><a href="../overview-tree.html">Tree</a></li> <li class="navBarCell1Rev">Index</li> <li><a href="../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li><a href="index-11.html">PREV LETTER</a></li> <li><a href="index-13.html">NEXT LETTER</a></li> </ul> <ul class="navList"> <li><a href="../index.html?index-filesindex-12.html" target="_top">FRAMES</a></li> <li><a href="index-12.html" target="_top">NO FRAMES</a></li> </ul> <ul class="navList" id="allclasses_navbar_top"> <li><a href="../allclasses-noframe.html">All Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_top"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <a name="skip-navbar_top"> <!-- --> </a></div> <!-- ========= END OF TOP NAVBAR ========= --> <div class="contentContainer"><a href="index-1.html">A</a>&nbsp;<a href="index-2.html">B</a>&nbsp;<a href="index-3.html">C</a>&nbsp;<a href="index-4.html">D</a>&nbsp;<a href="index-5.html">E</a>&nbsp;<a href="index-6.html">F</a>&nbsp;<a href="index-7.html">G</a>&nbsp;<a href="index-8.html">H</a>&nbsp;<a href="index-9.html">I</a>&nbsp;<a href="index-10.html">L</a>&nbsp;<a href="index-11.html">M</a>&nbsp;<a href="index-12.html">N</a>&nbsp;<a href="index-13.html">O</a>&nbsp;<a href="index-14.html">P</a>&nbsp;<a href="index-15.html">R</a>&nbsp;<a href="index-16.html">S</a>&nbsp;<a href="index-17.html">T</a>&nbsp;<a href="index-18.html">U</a>&nbsp;<a href="index-19.html">V</a>&nbsp;<a name="_N_"> <!-- --> </a> <h2 class="title">N</h2> <dl> <dt><span class="strong"><a href="../cs/ualberta/ca/tunein/R.id.html#name_button">name_button</a></span> - Static variable in class cs.ualberta.ca.tunein.<a href="../cs/ualberta/ca/tunein/R.id.html" title="class in cs.ualberta.ca.tunein">R.id</a></dt> <dd>&nbsp;</dd> <dt><span class="strong"><a href="../cs/ualberta/ca/tunein/UserController.html#NEWPROFILE">NEWPROFILE</a></span> - Static variable in class cs.ualberta.ca.tunein.<a href="../cs/ualberta/ca/tunein/UserController.html" title="class in cs.ualberta.ca.tunein">UserController</a></dt> <dd>&nbsp;</dd> </dl> <a href="index-1.html">A</a>&nbsp;<a href="index-2.html">B</a>&nbsp;<a href="index-3.html">C</a>&nbsp;<a href="index-4.html">D</a>&nbsp;<a href="index-5.html">E</a>&nbsp;<a href="index-6.html">F</a>&nbsp;<a href="index-7.html">G</a>&nbsp;<a href="index-8.html">H</a>&nbsp;<a href="index-9.html">I</a>&nbsp;<a href="index-10.html">L</a>&nbsp;<a href="index-11.html">M</a>&nbsp;<a href="index-12.html">N</a>&nbsp;<a href="index-13.html">O</a>&nbsp;<a href="index-14.html">P</a>&nbsp;<a href="index-15.html">R</a>&nbsp;<a href="index-16.html">S</a>&nbsp;<a href="index-17.html">T</a>&nbsp;<a href="index-18.html">U</a>&nbsp;<a href="index-19.html">V</a>&nbsp;</div> <!-- ======= START OF BOTTOM NAVBAR ====== --> <div class="bottomNav"><a name="navbar_bottom"> <!-- --> </a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../overview-summary.html">Overview</a></li> <li>Package</li> <li>Class</li> <li>Use</li> <li><a href="../overview-tree.html">Tree</a></li> <li class="navBarCell1Rev">Index</li> <li><a href="../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li><a href="index-11.html">PREV LETTER</a></li> <li><a href="index-13.html">NEXT LETTER</a></li> </ul> <ul class="navList"> <li><a href="../index.html?index-filesindex-12.html" target="_top">FRAMES</a></li> <li><a href="index-12.html" target="_top">NO FRAMES</a></li> </ul> <ul class="navList" id="allclasses_navbar_bottom"> <li><a href="../allclasses-noframe.html">All Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_bottom"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <a name="skip-navbar_bottom"> <!-- --> </a></div> <!-- ======== END OF BOTTOM NAVBAR ======= --> </body> </html>
CMPUT301W14T3/Group-Project
doc/index-files/index-12.html
HTML
gpl-2.0
5,209
/*COMMENTS Jonathan Buch Section 3 Lab 14 December 11th, 2014 Made a recurrence relation that counts the number of 1's in binary form */ #include<iostream> #include<cstdlib> using namespace std; int recur(int); int main(int argc, char *argv[]){ cout << " # of Element" << "\t\t" << "# of 1's in the #'s binary form" << endl; if(argc > 1){ for(int i = 1; i < argc; i++){ cout << "\t"; cout << i << "\t\t\t\t"; cout << recur(atoi(argv[i])) << endl; } } else{ cout << "No input detected" << endl; } return 0; } int recur(int x){ if(0 >= x){ return 0; } if(0 < x){ if(x&1){ return (1+recur(x-1)); } else{ return recur(x/2); } } }
ThereIsNoEscape/uidaho
old/CS120/labs/lab14/Lab14Sec3.cpp
C++
gpl-2.0
673
<?php /** * File containing the Content Handler class. * * @copyright Copyright (C) eZ Systems AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ namespace eZ\Publish\Core\Persistence\Legacy\Content; use Exception; use eZ\Publish\Core\Persistence\Legacy\Content\Location\Gateway as LocationGateway; use eZ\Publish\SPI\Persistence\Content\Field; use eZ\Publish\SPI\Persistence\Content\Handler as BaseContentHandler; use eZ\Publish\SPI\Persistence\Content\Type\Handler as ContentTypeHandler; use eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\SlugConverter; use eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway as UrlAliasGateway; use eZ\Publish\SPI\Persistence\Content; use eZ\Publish\SPI\Persistence\Content\CreateStruct; use eZ\Publish\SPI\Persistence\Content\UpdateStruct; use eZ\Publish\SPI\Persistence\Content\MetadataUpdateStruct; use eZ\Publish\SPI\Persistence\Content\VersionInfo; use eZ\Publish\SPI\Persistence\Content\Relation\CreateStruct as RelationCreateStruct; use eZ\Publish\Core\Base\Exceptions\NotFoundException as NotFound; use Psr\Log\LoggerInterface; use Psr\Log\NullLogger; /** * The Content Handler stores Content and ContentType objects. */ class Handler implements BaseContentHandler { /** * Content gateway. * * @var \eZ\Publish\Core\Persistence\Legacy\Content\Gateway */ protected $contentGateway; /** * Location gateway. * * @var \eZ\Publish\Core\Persistence\Legacy\Content\Location\Gateway */ protected $locationGateway; /** * Mapper. * * @var Mapper */ protected $mapper; /** * FieldHandler. * * @var \eZ\Publish\Core\Persistence\Legacy\Content\FieldHandler */ protected $fieldHandler; /** * URL slug converter. * * @var \eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\SlugConverter */ protected $slugConverter; /** * UrlAlias gateway. * * @var \eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway */ protected $urlAliasGateway; /** * ContentType handler. * * @var \eZ\Publish\SPI\Persistence\Content\Type\Handler */ protected $contentTypeHandler; /** * Tree handler. * * @var \eZ\Publish\Core\Persistence\Legacy\Content\TreeHandler */ protected $treeHandler; /** @var \Psr\Log\LoggerInterface */ private $logger; /** * Creates a new content handler. * * @param \eZ\Publish\Core\Persistence\Legacy\Content\Gateway $contentGateway * @param \eZ\Publish\Core\Persistence\Legacy\Content\Location\Gateway $locationGateway * @param \eZ\Publish\Core\Persistence\Legacy\Content\Mapper $mapper * @param \eZ\Publish\Core\Persistence\Legacy\Content\FieldHandler $fieldHandler * @param \eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\SlugConverter $slugConverter * @param \eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway $urlAliasGateway * @param \eZ\Publish\SPI\Persistence\Content\Type\Handler $contentTypeHandler * @param \eZ\Publish\Core\Persistence\Legacy\Content\TreeHandler $treeHandler * @param \Psr\Log\LoggerInterface|null $logger */ public function __construct( Gateway $contentGateway, LocationGateway $locationGateway, Mapper $mapper, FieldHandler $fieldHandler, SlugConverter $slugConverter, UrlAliasGateway $urlAliasGateway, ContentTypeHandler $contentTypeHandler, TreeHandler $treeHandler, LoggerInterface $logger = null ) { $this->contentGateway = $contentGateway; $this->locationGateway = $locationGateway; $this->mapper = $mapper; $this->fieldHandler = $fieldHandler; $this->slugConverter = $slugConverter; $this->urlAliasGateway = $urlAliasGateway; $this->contentTypeHandler = $contentTypeHandler; $this->treeHandler = $treeHandler; $this->logger = null !== $logger ? $logger : new NullLogger(); } /** * Creates a new Content entity in the storage engine. * * The values contained inside the $content will form the basis of stored * entity. * * Will contain always a complete list of fields. * * @param \eZ\Publish\SPI\Persistence\Content\CreateStruct $struct Content creation struct. * * @return \eZ\Publish\SPI\Persistence\Content Content value object */ public function create(CreateStruct $struct) { return $this->internalCreate($struct); } /** * Creates a new Content entity in the storage engine. * * The values contained inside the $content will form the basis of stored * entity. * * Will contain always a complete list of fields. * * @param \eZ\Publish\SPI\Persistence\Content\CreateStruct $struct Content creation struct. * @param mixed $versionNo Used by self::copy() to maintain version numbers * * @return \eZ\Publish\SPI\Persistence\Content Content value object */ protected function internalCreate(CreateStruct $struct, $versionNo = 1) { $content = new Content(); $content->fields = $struct->fields; $content->versionInfo = $this->mapper->createVersionInfoFromCreateStruct($struct, $versionNo); $content->versionInfo->contentInfo->id = $this->contentGateway->insertContentObject($struct, $versionNo); $content->versionInfo->id = $this->contentGateway->insertVersion( $content->versionInfo, $struct->fields ); $contentType = $this->contentTypeHandler->load($struct->typeId); $this->fieldHandler->createNewFields($content, $contentType); // Create node assignments foreach ($struct->locations as $location) { $location->contentId = $content->versionInfo->contentInfo->id; $location->contentVersion = $content->versionInfo->versionNo; $this->locationGateway->createNodeAssignment( $location, $location->parentId, LocationGateway::NODE_ASSIGNMENT_OP_CODE_CREATE ); } // Create names foreach ($content->versionInfo->names as $language => $name) { $this->contentGateway->setName( $content->versionInfo->contentInfo->id, $content->versionInfo->versionNo, $name, $language ); } return $content; } /** * Performs the publishing operations required to set the version identified by $updateStruct->versionNo and * $updateStruct->id as the published one. * * The publish procedure will: * - Create location nodes based on the node assignments * - Update the content object using the provided metadata update struct * - Update the node assignments * - Update location nodes of the content with the new published version * - Set content and version status to published * * @param int $contentId * @param int $versionNo * @param \eZ\Publish\SPI\Persistence\Content\MetadataUpdateStruct $metaDataUpdateStruct * * @return \eZ\Publish\SPI\Persistence\Content The published Content * * @throws \eZ\Publish\API\Repository\Exceptions\BadStateException * @throws \eZ\Publish\API\Repository\Exceptions\NotFoundException */ public function publish($contentId, $versionNo, MetadataUpdateStruct $metaDataUpdateStruct) { // Archive currently published version $versionInfo = $this->loadVersionInfo($contentId, $versionNo); if ($versionInfo->contentInfo->currentVersionNo != $versionNo) { $this->setStatus( $contentId, VersionInfo::STATUS_ARCHIVED, $versionInfo->contentInfo->currentVersionNo ); } // Set always available name for the content $metaDataUpdateStruct->name = $versionInfo->names[$versionInfo->contentInfo->mainLanguageCode]; $this->contentGateway->updateContent($contentId, $metaDataUpdateStruct, $versionInfo); $this->locationGateway->createLocationsFromNodeAssignments( $contentId, $versionNo ); $this->locationGateway->updateLocationsContentVersionNo($contentId, $versionNo); $this->contentGateway->setPublishedStatus($contentId, $versionNo); return $this->load($contentId, $versionNo); } /** * Creates a new draft version from $contentId in $version. * * Copies all fields from $contentId in $srcVersion and creates a new * version of the referred Content from it. * * Note: When creating a new draft in the old admin interface there will * also be an entry in the `eznode_assignment` created for the draft. This * is ignored in this implementation. * * @param mixed $contentId * @param mixed $srcVersion * @param mixed $userId * * @return \eZ\Publish\SPI\Persistence\Content */ public function createDraftFromVersion($contentId, $srcVersion, $userId) { $content = $this->load($contentId, $srcVersion); // Create new version $content->versionInfo = $this->mapper->createVersionInfoForContent( $content, $this->contentGateway->getLastVersionNumber($contentId) + 1, $userId ); $content->versionInfo->id = $this->contentGateway->insertVersion( $content->versionInfo, $content->fields ); // Clone fields from previous version and append them to the new one $this->fieldHandler->createExistingFieldsInNewVersion($content); // Create relations for new version $relations = $this->contentGateway->loadRelations($contentId, $srcVersion); foreach ($relations as $relation) { $this->contentGateway->insertRelation( new RelationCreateStruct( [ 'sourceContentId' => $contentId, 'sourceContentVersionNo' => $content->versionInfo->versionNo, 'sourceFieldDefinitionId' => $relation['ezcontentobject_link_contentclassattribute_id'], 'destinationContentId' => $relation['ezcontentobject_link_to_contentobject_id'], 'type' => (int)$relation['ezcontentobject_link_relation_type'], ] ) ); } // Create content names for new version foreach ($content->versionInfo->names as $language => $name) { $this->contentGateway->setName( $contentId, $content->versionInfo->versionNo, $name, $language ); } return $content; } /** * {@inheritdoc} */ public function load($id, $version = null, array $translations = null) { $rows = $this->contentGateway->load($id, $version, $translations); if (empty($rows)) { throw new NotFound('content', "contentId: $id, versionNo: $version"); } $contentObjects = $this->mapper->extractContentFromRows( $rows, $this->contentGateway->loadVersionedNameData([[ 'id' => $id, 'version' => $rows[0]['ezcontentobject_version_version'], ]]) ); $content = $contentObjects[0]; unset($rows, $contentObjects); $this->fieldHandler->loadExternalFieldData($content); return $content; } /** * {@inheritdoc} */ public function loadContentList(array $contentIds, array $translations = null): array { $rawList = $this->contentGateway->loadContentList($contentIds, $translations); if (empty($rawList)) { return []; } $idVersionPairs = []; foreach ($rawList as $row) { // As there is only one version per id, set id as key to avoid duplicates $idVersionPairs[$row['ezcontentobject_id']] = [ 'id' => $row['ezcontentobject_id'], 'version' => $row['ezcontentobject_version_version'], ]; } // group name data per Content Id $nameData = $this->contentGateway->loadVersionedNameData(array_values($idVersionPairs)); $contentItemNameData = []; foreach ($nameData as $nameDataRow) { $contentId = $nameDataRow['ezcontentobject_name_contentobject_id']; $contentItemNameData[$contentId][] = $nameDataRow; } // group rows per Content Id be able to ignore Content items with erroneous data $contentItemsRows = []; foreach ($rawList as $row) { $contentId = $row['ezcontentobject_id']; $contentItemsRows[$contentId][] = $row; } unset($rawList, $idVersionPairs); // try to extract Content from each Content data $contentItems = []; foreach ($contentItemsRows as $contentId => $contentItemsRow) { try { $contentList = $this->mapper->extractContentFromRows( $contentItemsRow, $contentItemNameData[$contentId] ); $contentItems[$contentId] = $contentList[0]; } catch (Exception $e) { $this->logger->warning( sprintf( '%s: Content %d not loaded: %s', __METHOD__, $contentId, $e->getMessage() ) ); } } // try to load External Storage data for each Content, ignore Content items for which it failed foreach ($contentItems as $contentId => $content) { try { $this->fieldHandler->loadExternalFieldData($content); } catch (Exception $e) { unset($contentItems[$contentId]); $this->logger->warning( sprintf( '%s: Content %d not loaded: %s', __METHOD__, $contentId, $e->getMessage() ) ); } } return $contentItems; } /** * Returns the metadata object for a content identified by $contentId. * * @param int|string $contentId * * @return \eZ\Publish\SPI\Persistence\Content\ContentInfo */ public function loadContentInfo($contentId) { return $this->treeHandler->loadContentInfo($contentId); } public function loadContentInfoList(array $contentIds) { $list = $this->mapper->extractContentInfoFromRows( $this->contentGateway->loadContentInfoList($contentIds) ); $listByContentId = []; foreach ($list as $item) { $listByContentId[$item->id] = $item; } return $listByContentId; } /** * Returns the metadata object for a content identified by $remoteId. * * @param mixed $remoteId * * @return \eZ\Publish\SPI\Persistence\Content\ContentInfo */ public function loadContentInfoByRemoteId($remoteId) { return $this->mapper->extractContentInfoFromRow( $this->contentGateway->loadContentInfoByRemoteId($remoteId) ); } /** * {@inheritdoc} */ public function loadVersionInfo($contentId, $versionNo = null) { $rows = $this->contentGateway->loadVersionInfo($contentId, $versionNo); if (empty($rows)) { throw new NotFound('content', $contentId); } $versionInfo = $this->mapper->extractVersionInfoListFromRows( $rows, $this->contentGateway->loadVersionedNameData([['id' => $contentId, 'version' => $rows[0]['ezcontentobject_version_version']]]) ); return reset($versionInfo); } public function countDraftsForUser(int $userId): int { return $this->contentGateway->countVersionsForUser($userId, VersionInfo::STATUS_DRAFT); } /** * Returns all versions with draft status created by the given $userId. * * @param int $userId * * @return \eZ\Publish\SPI\Persistence\Content\VersionInfo[] */ public function loadDraftsForUser($userId) { $rows = $this->contentGateway->listVersionsForUser($userId, VersionInfo::STATUS_DRAFT); if (empty($rows)) { return []; } $idVersionPairs = array_map( function ($row) { return [ 'id' => $row['ezcontentobject_version_contentobject_id'], 'version' => $row['ezcontentobject_version_version'], ]; }, $rows ); $nameRows = $this->contentGateway->loadVersionedNameData($idVersionPairs); return $this->mapper->extractVersionInfoListFromRows($rows, $nameRows); } public function loadDraftListForUser(int $userId, int $offset = 0, int $limit = -1): array { $rows = $this->contentGateway->loadVersionsForUser($userId, VersionInfo::STATUS_DRAFT, $offset, $limit); if (empty($rows)) { return []; } $idVersionPairs = array_map( static function (array $row): array { return [ 'id' => $row['ezcontentobject_version_contentobject_id'], 'version' => $row['ezcontentobject_version_version'], ]; }, $rows ); $nameRows = $this->contentGateway->loadVersionedNameData($idVersionPairs); return $this->mapper->extractVersionInfoListFromRows($rows, $nameRows); } /** * Sets the status of object identified by $contentId and $version to $status. * * The $status can be one of VersionInfo::STATUS_DRAFT, VersionInfo::STATUS_PUBLISHED, VersionInfo::STATUS_ARCHIVED * When status is set to VersionInfo::STATUS_PUBLISHED content status is updated to ContentInfo::STATUS_PUBLISHED * * @param int $contentId * @param int $status * @param int $version * * @return bool */ public function setStatus($contentId, $status, $version) { return $this->contentGateway->setStatus($contentId, $version, $status); } /** * Updates a content object meta data, identified by $contentId. * * @param int $contentId * @param \eZ\Publish\SPI\Persistence\Content\MetadataUpdateStruct $content * * @return \eZ\Publish\SPI\Persistence\Content\ContentInfo */ public function updateMetadata($contentId, MetadataUpdateStruct $content) { $this->contentGateway->updateContent($contentId, $content); $this->updatePathIdentificationString($contentId, $content); return $this->loadContentInfo($contentId); } /** * Updates path identification string for locations of given $contentId if main language * is set in update struct. * * This is specific to the Legacy storage engine, as path identification string is deprecated. * * @param int $contentId * @param \eZ\Publish\SPI\Persistence\Content\MetadataUpdateStruct $content */ protected function updatePathIdentificationString($contentId, MetadataUpdateStruct $content) { if (isset($content->mainLanguageId)) { $contentLocationsRows = $this->locationGateway->loadLocationDataByContent($contentId); foreach ($contentLocationsRows as $row) { $locationName = ''; $urlAliasRows = $this->urlAliasGateway->loadLocationEntries( $row['node_id'], false, $content->mainLanguageId ); if (!empty($urlAliasRows)) { $locationName = $urlAliasRows[0]['text']; } $this->locationGateway->updatePathIdentificationString( $row['node_id'], $row['parent_node_id'], $this->slugConverter->convert( $locationName, 'node_' . $row['node_id'], 'urlalias_compat' ) ); } } } /** * Updates a content version, identified by $contentId and $versionNo. * * @param int $contentId * @param int $versionNo * @param \eZ\Publish\SPI\Persistence\Content\UpdateStruct $updateStruct * * @return \eZ\Publish\SPI\Persistence\Content */ public function updateContent($contentId, $versionNo, UpdateStruct $updateStruct) { $content = $this->load($contentId, $versionNo); $this->contentGateway->updateVersion($contentId, $versionNo, $updateStruct); $contentType = $this->contentTypeHandler->load($content->versionInfo->contentInfo->contentTypeId); $this->fieldHandler->updateFields($content, $updateStruct, $contentType); foreach ($updateStruct->name as $language => $name) { $this->contentGateway->setName( $contentId, $versionNo, $name, $language ); } return $this->load($contentId, $versionNo); } /** * Deletes all versions and fields, all locations (subtree), and all relations. * * Removes the relations, but not the related objects. All subtrees of the * assigned nodes of this content objects are removed (recursively). * * @param int $contentId * * @return bool */ public function deleteContent($contentId) { $contentLocations = $this->contentGateway->getAllLocationIds($contentId); if (empty($contentLocations)) { $this->removeRawContent($contentId); } else { foreach ($contentLocations as $locationId) { $this->treeHandler->removeSubtree($locationId); } } } /** * Deletes raw content data. * * @param int $contentId */ public function removeRawContent($contentId) { $this->treeHandler->removeRawContent($contentId); } /** * Deletes given version, its fields, node assignment, relations and names. * * Removes the relations, but not the related objects. * * @param int $contentId * @param int $versionNo * * @return bool */ public function deleteVersion($contentId, $versionNo) { $versionInfo = $this->loadVersionInfo($contentId, $versionNo); $this->locationGateway->deleteNodeAssignment($contentId, $versionNo); $this->fieldHandler->deleteFields($contentId, $versionInfo); $this->contentGateway->deleteRelations($contentId, $versionNo); $this->contentGateway->deleteVersions($contentId, $versionNo); $this->contentGateway->deleteNames($contentId, $versionNo); } /** * Returns the versions for $contentId. * * Result is returned with oldest version first (sorted by created, alternatively version id if auto increment). * * @param int $contentId * @param mixed|null $status Optional argument to filter versions by status, like {@see VersionInfo::STATUS_ARCHIVED}. * @param int $limit Limit for items returned, -1 means none. * * @return \eZ\Publish\SPI\Persistence\Content\VersionInfo[] */ public function listVersions($contentId, $status = null, $limit = -1) { return $this->treeHandler->listVersions($contentId, $status, $limit); } /** * Copy Content with Fields, Versions & Relations from $contentId in $version. * * {@inheritdoc} * * @throws \eZ\Publish\API\Repository\Exceptions\NotFoundException If content or version is not found * * @param mixed $contentId * @param mixed|null $versionNo Copy all versions if left null * @param int|null $newOwnerId * * @return \eZ\Publish\SPI\Persistence\Content */ public function copy($contentId, $versionNo = null, $newOwnerId = null) { $currentVersionNo = isset($versionNo) ? $versionNo : $this->loadContentInfo($contentId)->currentVersionNo; // Copy content in given version or current version $createStruct = $this->mapper->createCreateStructFromContent( $this->load($contentId, $currentVersionNo) ); if ($newOwnerId) { $createStruct->ownerId = $newOwnerId; } $content = $this->internalCreate($createStruct, $currentVersionNo); // If version was not passed also copy other versions if (!isset($versionNo)) { $contentType = $this->contentTypeHandler->load($createStruct->typeId); foreach ($this->listVersions($contentId) as $versionInfo) { if ($versionInfo->versionNo === $currentVersionNo) { continue; } $versionContent = $this->load($contentId, $versionInfo->versionNo); $versionContent->versionInfo->contentInfo->id = $content->versionInfo->contentInfo->id; $versionContent->versionInfo->modificationDate = $createStruct->modified; $versionContent->versionInfo->creationDate = $createStruct->modified; $versionContent->versionInfo->id = $this->contentGateway->insertVersion( $versionContent->versionInfo, $versionContent->fields ); $this->fieldHandler->createNewFields($versionContent, $contentType); // Create names foreach ($versionContent->versionInfo->names as $language => $name) { $this->contentGateway->setName( $content->versionInfo->contentInfo->id, $versionInfo->versionNo, $name, $language ); } } // Batch copy relations for all versions $this->contentGateway->copyRelations($contentId, $content->versionInfo->contentInfo->id); } else { // Batch copy relations for published version $this->contentGateway->copyRelations($contentId, $content->versionInfo->contentInfo->id, $versionNo); } return $content; } /** * Creates a relation between $sourceContentId in $sourceContentVersionNo * and $destinationContentId with a specific $type. * * @todo Should the existence verifications happen here or is this supposed to be handled at a higher level? * * @param \eZ\Publish\SPI\Persistence\Content\Relation\CreateStruct $createStruct * * @return \eZ\Publish\SPI\Persistence\Content\Relation */ public function addRelation(RelationCreateStruct $createStruct) { $relation = $this->mapper->createRelationFromCreateStruct($createStruct); $relation->id = $this->contentGateway->insertRelation($createStruct); return $relation; } /** * Removes a relation by relation Id. * * @todo Should the existence verifications happen here or is this supposed to be handled at a higher level? * * @param mixed $relationId * @param int $type {@see \eZ\Publish\API\Repository\Values\Content\Relation::COMMON, * \eZ\Publish\API\Repository\Values\Content\Relation::EMBED, * \eZ\Publish\API\Repository\Values\Content\Relation::LINK, * \eZ\Publish\API\Repository\Values\Content\Relation::FIELD} */ public function removeRelation($relationId, $type) { $this->contentGateway->deleteRelation($relationId, $type); } /** * Loads relations from $sourceContentId. Optionally, loads only those with $type and $sourceContentVersionNo. * * @param mixed $sourceContentId Source Content ID * @param mixed|null $sourceContentVersionNo Source Content Version, null if not specified * @param int|null $type {@see \eZ\Publish\API\Repository\Values\Content\Relation::COMMON, * \eZ\Publish\API\Repository\Values\Content\Relation::EMBED, * \eZ\Publish\API\Repository\Values\Content\Relation::LINK, * \eZ\Publish\API\Repository\Values\Content\Relation::FIELD} * * @return \eZ\Publish\SPI\Persistence\Content\Relation[] */ public function loadRelations($sourceContentId, $sourceContentVersionNo = null, $type = null) { return $this->mapper->extractRelationsFromRows( $this->contentGateway->loadRelations($sourceContentId, $sourceContentVersionNo, $type) ); } /** * {@inheritdoc} */ public function countReverseRelations(int $destinationContentId, ?int $type = null): int { return $this->contentGateway->countReverseRelations($destinationContentId, $type); } /** * Loads relations from $contentId. Optionally, loads only those with $type. * * Only loads relations against published versions. * * @param mixed $destinationContentId Destination Content ID * @param int|null $type {@see \eZ\Publish\API\Repository\Values\Content\Relation::COMMON, * \eZ\Publish\API\Repository\Values\Content\Relation::EMBED, * \eZ\Publish\API\Repository\Values\Content\Relation::LINK, * \eZ\Publish\API\Repository\Values\Content\Relation::FIELD} * * @return \eZ\Publish\SPI\Persistence\Content\Relation[] */ public function loadReverseRelations($destinationContentId, $type = null) { return $this->mapper->extractRelationsFromRows( $this->contentGateway->loadReverseRelations($destinationContentId, $type) ); } /** * {@inheritdoc} */ public function loadReverseRelationList( int $destinationContentId, int $offset = 0, int $limit = -1, ?int $type = null ): array { return $this->mapper->extractRelationsFromRows( $this->contentGateway->listReverseRelations($destinationContentId, $offset, $limit, $type) ); } /** * {@inheritdoc} */ public function removeTranslationFromContent($contentId, $languageCode) { @trigger_error( __METHOD__ . ' is deprecated, use deleteTranslationFromContent instead', E_USER_DEPRECATED ); $this->deleteTranslationFromContent($contentId, $languageCode); } /** * {@inheritdoc} */ public function deleteTranslationFromContent($contentId, $languageCode) { $this->fieldHandler->deleteTranslationFromContentFields( $contentId, $this->listVersions($contentId), $languageCode ); $this->contentGateway->deleteTranslationFromContent($contentId, $languageCode); } /** * {@inheritdoc} */ public function deleteTranslationFromDraft($contentId, $versionNo, $languageCode) { $versionInfo = $this->loadVersionInfo($contentId, $versionNo); $this->fieldHandler->deleteTranslationFromVersionFields( $versionInfo, $languageCode ); $this->contentGateway->deleteTranslationFromVersion( $contentId, $versionNo, $languageCode ); // get all [languageCode => name] entries except the removed Translation $names = array_filter( $versionInfo->names, function ($lang) use ($languageCode) { return $lang !== $languageCode; }, ARRAY_FILTER_USE_KEY ); // set new Content name foreach ($names as $language => $name) { $this->contentGateway->setName( $contentId, $versionNo, $name, $language ); } // reload entire Version w/o removed Translation return $this->load($contentId, $versionNo); } }
alongosz/ezpublish-kernel
eZ/Publish/Core/Persistence/Legacy/Content/Handler.php
PHP
gpl-2.0
32,581
/*above the dashboard*/ .carbonlite-tophtml { margin: 0; padding: 0; } /*above the dashboard*/ .carbonlite-dashboard { height: 127px; width: 250px; margin: 0 auto; padding-top: 10px; padding-left: 10px; background: transparent url('images/bg_countdown.png') 0 0 no-repeat; } .carbonlite-dash { width: 42px; height: 44px; float: left; margin-left: 2px; padding-left: 2px; padding-top: 10px; position: relative; color: #FFF; } .carbonlite-tripdash { width: 62px; height: 44px; float: left; margin-left: 2px; padding-left: 2px; padding-top: 10px; position: relative; color: #FFF; } .carbonlite-hours_dash, .carbonlite-minutes_dash, .carbonlite-seconds_dash { background: transparent url('images/bg_dash.png') 0 0 no-repeat; } .carbonlite-days_dash { margin-left: 2px; background: transparent url('images/bg_dash.png') 0 0 no-repeat; } .carbonlite-days_trip_dash, .carbonlite-hours_trip_dash { background: transparent url('images/bg_trip_dash.png') 0 0 no-repeat; } .carbonlite-weeks_dash { margin-left: 2px; background: transparent url('images/bg_dash.png') 0 0 no-repeat; } .carbonlite-weeks_trip_dash { margin-left: 2px; background: transparent url('images/bg_trip_dash.png') 0 0 no-repeat; } .carbonlite-digit { font: normal normal normal 12pt/normal arial; float: left; width: 17px; text-align: center; position: relative; } .carbonlite-dash .carbonlite-dash_title { display: block; position: absolute; text-transform:uppercase; top: 37px; color: #AAA; text-align: center; font-size: 9px; } .carbonlite-tripdash .carbonlite-dash_title { display: block; position: absolute; text-transform:uppercase; top: 37px; color: #AAA; text-align: center; font-size: 9px; } /*below the dashboard*/ .carbonlite-bothtml { margin: 0; padding: 0; }
baden03/access48
wp-content/plugins/t-countdown-control/style/carbonlite/style.css
CSS
gpl-2.0
1,901
import P1011 import unittest class test_phylab(unittest.TestCase): def testSteelWire_1(self): m = [10.000,12.000,14.000,16.000,18.000,20.000,22.000,24.000,26.00] C_plus = [3.50, 3.81, 4.10, 4.40, 4.69, 4.98, 5.28, 5.59, 5.89] C_sub = [3.52, 3.80, 4.08, 4.38, 4.70, 4.99, 5.30, 5.59, 5.89] D = [0.789, 0.788, 0.788, 0.787, 0.788] L = 38.9 H = 77.0 b = 8.50 res = P1011.SteelWire(m, C_plus, C_sub, D, L, H, b) self.assertEqual(res,'(1.90\\pm0.04){\\times}10^{11}',"test SteelWire fail") def testInertia_1(self): m = [711.77, 711.82, 1242.30, 131.76, 241.56,238.38] d = [99.95, 99.95, 93.85, 114.60, 610.00] T = [[4.06, 4.06, 4.07, 4.06, 4.06], [6.57, 6.57, 6.57, 6.56, 6.57], [8.16, 8.16, 8.17, 8.17, 8.17], [7.35, 7.35, 7.33, 7.35, 7.37], [11.40, 11.40, 11.41, 11.41, 11.41]] l = [34.92, 6.02, 33.05] T2 = [[13.07,13.07,13.07,13.07,13.06],[16.86,16.86,16.88,16.87,16.88], [21.79,21.82,21.83,21.84,21.84],[27.28,27.28,27.29,27.27,27.27], [32.96,32.96,32.96,32.97,32.96]] res = P1011.Inertia(m, d, T, l, T2) x = 1 if(abs(res[0] - 0.9999989) > pow(10,-7)): x = 0 if(abs(res[1] - 610.9)/610.9 > 0.001): x = 0 self.assertEqual(x,1,"test Inertia fail") if __name__ =='__main__': unittest.main()
buaase/Phylab-Web
PythonExperimentDataHandle/test/P1011_test.py
Python
gpl-2.0
1,628
# -*- coding: utf-8 -*- # Copyright(c) 2016-2020 Jonas Sjöberg <autonameow@jonasjberg.com> # Source repository: https://github.com/jonasjberg/autonameow # # This file is part of autonameow. # # autonameow is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation. # # autonameow is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with autonameow. If not, see <http://www.gnu.org/licenses/>. from .extractor_crossplatform import CrossPlatformFileSystemExtractor from .extractor_epub import EpubMetadataExtractor from .extractor_exiftool import ExiftoolMetadataExtractor from .extractor_filetags import FiletagsMetadataExtractor from .extractor_guessit import GuessitMetadataExtractor from .extractor_jpeginfo import JpeginfoMetadataExtractor from .extractor_pandoc import PandocMetadataExtractor
jonasjberg/autonameow
autonameow/extractors/metadata/__init__.py
Python
gpl-2.0
1,177
#ifndef __RS400D_H__ #define __RS400D_H__ #define R_000148_MC_FB_LOCATION 0x000148 #define S_000148_MC_FB_START(x) (((x) & 0xFFFF) << 0) #define G_000148_MC_FB_START(x) (((x) >> 0) & 0xFFFF) #define C_000148_MC_FB_START 0xFFFF0000 #define S_000148_MC_FB_TOP(x) (((x) & 0xFFFF) << 16) #define G_000148_MC_FB_TOP(x) (((x) >> 16) & 0xFFFF) #define C_000148_MC_FB_TOP 0x0000FFFF #define R_00015C_NB_TOM 0x00015C #define S_00015C_MC_FB_START(x) (((x) & 0xFFFF) << 0) #define G_00015C_MC_FB_START(x) (((x) >> 0) & 0xFFFF) #define C_00015C_MC_FB_START 0xFFFF0000 #define S_00015C_MC_FB_TOP(x) (((x) & 0xFFFF) << 16) #define G_00015C_MC_FB_TOP(x) (((x) >> 16) & 0xFFFF) #define C_00015C_MC_FB_TOP 0x0000FFFF #define R_0007C0_CP_STAT 0x0007C0 #define S_0007C0_MRU_BUSY(x) (((x) & 0x1) << 0) #define G_0007C0_MRU_BUSY(x) (((x) >> 0) & 0x1) #define C_0007C0_MRU_BUSY 0xFFFFFFFE #define S_0007C0_MWU_BUSY(x) (((x) & 0x1) << 1) #define G_0007C0_MWU_BUSY(x) (((x) >> 1) & 0x1) #define C_0007C0_MWU_BUSY 0xFFFFFFFD #define S_0007C0_RSIU_BUSY(x) (((x) & 0x1) << 2) #define G_0007C0_RSIU_BUSY(x) (((x) >> 2) & 0x1) #define C_0007C0_RSIU_BUSY 0xFFFFFFFB #define S_0007C0_RCIU_BUSY(x) (((x) & 0x1) << 3) #define G_0007C0_RCIU_BUSY(x) (((x) >> 3) & 0x1) #define C_0007C0_RCIU_BUSY 0xFFFFFFF7 #define S_0007C0_CSF_PRIMARY_BUSY(x) (((x) & 0x1) << 9) #define G_0007C0_CSF_PRIMARY_BUSY(x) (((x) >> 9) & 0x1) #define C_0007C0_CSF_PRIMARY_BUSY 0xFFFFFDFF #define S_0007C0_CSF_INDIRECT_BUSY(x) (((x) & 0x1) << 10) #define G_0007C0_CSF_INDIRECT_BUSY(x) (((x) >> 10) & 0x1) #define C_0007C0_CSF_INDIRECT_BUSY 0xFFFFFBFF #define S_0007C0_CSQ_PRIMARY_BUSY(x) (((x) & 0x1) << 11) #define G_0007C0_CSQ_PRIMARY_BUSY(x) (((x) >> 11) & 0x1) #define C_0007C0_CSQ_PRIMARY_BUSY 0xFFFFF7FF #define S_0007C0_CSQ_INDIRECT_BUSY(x) (((x) & 0x1) << 12) #define G_0007C0_CSQ_INDIRECT_BUSY(x) (((x) >> 12) & 0x1) #define C_0007C0_CSQ_INDIRECT_BUSY 0xFFFFEFFF #define S_0007C0_CSI_BUSY(x) (((x) & 0x1) << 13) #define G_0007C0_CSI_BUSY(x) (((x) >> 13) & 0x1) #define C_0007C0_CSI_BUSY 0xFFFFDFFF #define S_0007C0_CSF_INDIRECT2_BUSY(x) (((x) & 0x1) << 14) #define G_0007C0_CSF_INDIRECT2_BUSY(x) (((x) >> 14) & 0x1) #define C_0007C0_CSF_INDIRECT2_BUSY 0xFFFFBFFF #define S_0007C0_CSQ_INDIRECT2_BUSY(x) (((x) & 0x1) << 15) #define G_0007C0_CSQ_INDIRECT2_BUSY(x) (((x) >> 15) & 0x1) #define C_0007C0_CSQ_INDIRECT2_BUSY 0xFFFF7FFF #define S_0007C0_GUIDMA_BUSY(x) (((x) & 0x1) << 28) #define G_0007C0_GUIDMA_BUSY(x) (((x) >> 28) & 0x1) #define C_0007C0_GUIDMA_BUSY 0xEFFFFFFF #define S_0007C0_VIDDMA_BUSY(x) (((x) & 0x1) << 29) #define G_0007C0_VIDDMA_BUSY(x) (((x) >> 29) & 0x1) #define C_0007C0_VIDDMA_BUSY 0xDFFFFFFF #define S_0007C0_CMDSTRM_BUSY(x) (((x) & 0x1) << 30) #define G_0007C0_CMDSTRM_BUSY(x) (((x) >> 30) & 0x1) #define C_0007C0_CMDSTRM_BUSY 0xBFFFFFFF #define S_0007C0_CP_BUSY(x) (((x) & 0x1) << 31) #define G_0007C0_CP_BUSY(x) (((x) >> 31) & 0x1) #define C_0007C0_CP_BUSY 0x7FFFFFFF #define R_000E40_RBBM_STATUS 0x000E40 #define S_000E40_CMDFIFO_AVAIL(x) (((x) & 0x7F) << 0) #define G_000E40_CMDFIFO_AVAIL(x) (((x) >> 0) & 0x7F) #define C_000E40_CMDFIFO_AVAIL 0xFFFFFF80 #define S_000E40_HIRQ_ON_RBB(x) (((x) & 0x1) << 8) #define G_000E40_HIRQ_ON_RBB(x) (((x) >> 8) & 0x1) #define C_000E40_HIRQ_ON_RBB 0xFFFFFEFF #define S_000E40_CPRQ_ON_RBB(x) (((x) & 0x1) << 9) #define G_000E40_CPRQ_ON_RBB(x) (((x) >> 9) & 0x1) #define C_000E40_CPRQ_ON_RBB 0xFFFFFDFF #define S_000E40_CFRQ_ON_RBB(x) (((x) & 0x1) << 10) #define G_000E40_CFRQ_ON_RBB(x) (((x) >> 10) & 0x1) #define C_000E40_CFRQ_ON_RBB 0xFFFFFBFF #define S_000E40_HIRQ_IN_RTBUF(x) (((x) & 0x1) << 11) #define G_000E40_HIRQ_IN_RTBUF(x) (((x) >> 11) & 0x1) #define C_000E40_HIRQ_IN_RTBUF 0xFFFFF7FF #define S_000E40_CPRQ_IN_RTBUF(x) (((x) & 0x1) << 12) #define G_000E40_CPRQ_IN_RTBUF(x) (((x) >> 12) & 0x1) #define C_000E40_CPRQ_IN_RTBUF 0xFFFFEFFF #define S_000E40_CFRQ_IN_RTBUF(x) (((x) & 0x1) << 13) #define G_000E40_CFRQ_IN_RTBUF(x) (((x) >> 13) & 0x1) #define C_000E40_CFRQ_IN_RTBUF 0xFFFFDFFF #define S_000E40_CF_PIPE_BUSY(x) (((x) & 0x1) << 14) #define G_000E40_CF_PIPE_BUSY(x) (((x) >> 14) & 0x1) #define C_000E40_CF_PIPE_BUSY 0xFFFFBFFF #define S_000E40_ENG_EV_BUSY(x) (((x) & 0x1) << 15) #define G_000E40_ENG_EV_BUSY(x) (((x) >> 15) & 0x1) #define C_000E40_ENG_EV_BUSY 0xFFFF7FFF #define S_000E40_CP_CMDSTRM_BUSY(x) (((x) & 0x1) << 16) #define G_000E40_CP_CMDSTRM_BUSY(x) (((x) >> 16) & 0x1) #define C_000E40_CP_CMDSTRM_BUSY 0xFFFEFFFF #define S_000E40_E2_BUSY(x) (((x) & 0x1) << 17) #define G_000E40_E2_BUSY(x) (((x) >> 17) & 0x1) #define C_000E40_E2_BUSY 0xFFFDFFFF #define S_000E40_RB2D_BUSY(x) (((x) & 0x1) << 18) #define G_000E40_RB2D_BUSY(x) (((x) >> 18) & 0x1) #define C_000E40_RB2D_BUSY 0xFFFBFFFF #define S_000E40_RB3D_BUSY(x) (((x) & 0x1) << 19) #define G_000E40_RB3D_BUSY(x) (((x) >> 19) & 0x1) #define C_000E40_RB3D_BUSY 0xFFF7FFFF #define S_000E40_VAP_BUSY(x) (((x) & 0x1) << 20) #define G_000E40_VAP_BUSY(x) (((x) >> 20) & 0x1) #define C_000E40_VAP_BUSY 0xFFEFFFFF #define S_000E40_RE_BUSY(x) (((x) & 0x1) << 21) #define G_000E40_RE_BUSY(x) (((x) >> 21) & 0x1) #define C_000E40_RE_BUSY 0xFFDFFFFF #define S_000E40_TAM_BUSY(x) (((x) & 0x1) << 22) #define G_000E40_TAM_BUSY(x) (((x) >> 22) & 0x1) #define C_000E40_TAM_BUSY 0xFFBFFFFF #define S_000E40_TDM_BUSY(x) (((x) & 0x1) << 23) #define G_000E40_TDM_BUSY(x) (((x) >> 23) & 0x1) #define C_000E40_TDM_BUSY 0xFF7FFFFF #define S_000E40_PB_BUSY(x) (((x) & 0x1) << 24) #define G_000E40_PB_BUSY(x) (((x) >> 24) & 0x1) #define C_000E40_PB_BUSY 0xFEFFFFFF #define S_000E40_TIM_BUSY(x) (((x) & 0x1) << 25) #define G_000E40_TIM_BUSY(x) (((x) >> 25) & 0x1) #define C_000E40_TIM_BUSY 0xFDFFFFFF #define S_000E40_GA_BUSY(x) (((x) & 0x1) << 26) #define G_000E40_GA_BUSY(x) (((x) >> 26) & 0x1) #define C_000E40_GA_BUSY 0xFBFFFFFF #define S_000E40_CBA2D_BUSY(x) (((x) & 0x1) << 27) #define G_000E40_CBA2D_BUSY(x) (((x) >> 27) & 0x1) #define C_000E40_CBA2D_BUSY 0xF7FFFFFF #define S_000E40_GUI_ACTIVE(x) (((x) & 0x1) << 31) #define G_000E40_GUI_ACTIVE(x) (((x) >> 31) & 0x1) #define C_000E40_GUI_ACTIVE 0x7FFFFFFF #endif
leemgs/OptimusOneKernel-KandroidCommunity
drivers/gpu/drm/radeon/rs400d.h
C
gpl-2.0
9,163
wtw === `wtw` tells you what to wear on your run based on the current weather and the type of run. It uses data collected from Runner's World's [What to Wear](http://www.runnersworld.com/what-to-wear) page. Weather data is [Powered by Yahoo!](https://www.yahoo.com/?ilc=401). ## Try it out online Try out the Javascript version of wtw in your browser [here](https://nwidger.github.io/wtw). ## Build ### Mac OS X/Linux/Windows ``` $ go get -u github.com/nwidger/wtw/cmd/wtw ``` ### Javascript 1. Install [GopherJS](https://github.com/gopherjs/gopherjs) ``` go get -u github.com/gopherjs/gopherjs ``` 2. Download wtw ``` go get -d -u github.com/nwidger/wtw ``` 3. Build `docs/main_js.js` ``` cd $GOPATH/src/github.com/nwidger/wtw GOARCH=js gopherjs build github.com/nwidger/wtw/docs -m -o docs/main_js.js ``` 4. Open `docs/index.html` in your browser. ## Usage ``` Usage of wtw: -browser open answer in the browser -conditions string c (clear), pc (partly cloudy), o (overcast), r (heavy rain), lr (light rain) or s (snowing) (default "c") -feel string c (cool), ib (in between) or w (warm) (default "ib") -gender string m (male) or f (female) (default "m") -intensity string n (easy run), lr (long run), h (hard workout) or r (race) (default "n") -location string get current conditions for location, overrides -temp, -conditions and -wind -temp int temp (°F) (default 60) -time string dawn, day, dusk, night or current (default "current") -v print conditions before answer -wind string nw (no wind), lw (light wind), hw (heavy wind) (default "nw") ``` ## Example With `-location`, `wtw` will retrieve the current weather from your current location. You only need to specify `-gender`, `-intensity`, and `-feel`: ``` $ wtw -location 03801 -gender m -intensity n -feel ib Sunglasses Singlet Shorts Running Shoes Sunblock ``` Without `-location`, you will need to specify `-temp`, `-conditions` and `-wind` as well: ``` $ wtw -temp 60 -conditions c -wind nw -gender m -intensity n -feel ib Sunglasses Singlet Shorts Running Shoes Sunblock ``` Most users will not need to specify `-time` as its value is automatically selected based on the current time. Specifying `-v` will cause `wtw` to print the conditions before the answer: ``` $ wtw -location 03820 -v wtw -gender m -temp 20 -conditions c -wind hw -time day -intensity lr -feel ib -v Winter Cap Sunglasses Heavy Jacket Long-Sleeve Shirt Gloves Tights Running Shoes Sunblock ``` This can be useful if for some reason the conditions determined by `-location` or `-time current` don't quite match up with what you were expecting.
nwidger/wtw
README.md
Markdown
gpl-2.0
2,703
using code_in.Presenters.Nodal.Nodes; using code_in.Views.MainView; using code_in.Views.NodalView.NodesElems; using code_in.Views.NodalView.NodesElems.Nodes.Assets; using Microsoft.VisualStudio.TestTools.UnitTesting; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; namespace VSCode_in_UnitTests.Core.UI { /// <summary> /// TODO @Steph, check if the functions /// </summary> [TestClass()] public class INodeElemImplem { [TestMethod()] public void classDeclNode() { //new MainView() try { var classDeclNode = new code_in.Views.NodalView.NodesElems.Nodes.ClassDeclNode(code_in.Code_inApplication.MainResourceDictionary, null, null); classDeclNode.SetName("test"); classDeclNode.GetName(); classDeclNode.AddGeneric("test", EGenericVariance.IN); classDeclNode.UpdateDisplayedInfosFromPresenter(); SearchBar sb = new SearchBar(new System.Windows.ResourceDictionary()); classDeclNode.SetParentView(null); classDeclNode.GetParentView(); classDeclNode.SetNodePresenter(null); classDeclNode.ShowEditMenu(); classDeclNode.SetPosition(42, 42); classDeclNode.GetPosition(); int x; int y; classDeclNode.GetSize(out x, out y); classDeclNode.Remove(); } catch (NotImplementedException e) { throw new Exception(); } catch (Exception e) { } } [TestMethod()] public void FuncDeclNode() { try { var funcDeclNode = new code_in.Views.NodalView.NodesElems.Items.FuncDeclItem(code_in.Code_inApplication.MainResourceDictionary, null, null); funcDeclNode.InstantiateASTNode(); funcDeclNode.SetName("test"); funcDeclNode.GetName(); funcDeclNode.AddGeneric("test", EGenericVariance.IN); funcDeclNode.UpdateDisplayedInfosFromPresenter(); SearchBar sb = new SearchBar(new ResourceDictionary()); funcDeclNode.SetParentView(null); funcDeclNode.GetParentView(); funcDeclNode.SetNodePresenter(null); funcDeclNode.ShowEditMenu(); funcDeclNode.SetPosition(42, 42); funcDeclNode.GetPosition(); int x; int y; funcDeclNode.GetSize(out x, out y); funcDeclNode.Remove(); } catch (NotImplementedException e) { throw new Exception(); } catch (Exception e) { } } [TestMethod()] public void NameSpaceNode() { try { var nameSpaceNode = new code_in.Views.NodalView.NodesElems.Nodes.NamespaceNode(code_in.Code_inApplication.MainResourceDictionary, null, null); nameSpaceNode.SetName("test"); nameSpaceNode.GetName(); nameSpaceNode.AddGeneric("test", EGenericVariance.IN); SearchBar sb = new SearchBar(new ResourceDictionary()); nameSpaceNode.SetParentView(null); nameSpaceNode.GetParentView(); nameSpaceNode.SetNodePresenter(null); nameSpaceNode.SetPosition(42, 42); nameSpaceNode.GetPosition(); int x; int y; nameSpaceNode.GetSize(out x, out y); nameSpaceNode.Remove(); } catch (NotImplementedException e) { throw new Exception(); } } [TestMethod()] public void UsingDeclNode() { try { var usingDeclNode = new code_in.Views.NodalView.NodesElems.Nodes.UsingDeclNode(code_in.Code_inApplication.MainResourceDictionary, null, null); usingDeclNode.SetName("test"); usingDeclNode.GetName(); usingDeclNode.AddGeneric("test", EGenericVariance.IN); usingDeclNode.UpdateDisplayedInfosFromPresenter(); SearchBar sb = new SearchBar(new ResourceDictionary()); usingDeclNode.SetParentView(null); usingDeclNode.GetParentView(); usingDeclNode.SetNodePresenter(null); usingDeclNode.ShowEditMenu(); usingDeclNode.SetPosition(42, 42); usingDeclNode.GetPosition(); int x; int y; usingDeclNode.GetSize(out x, out y); usingDeclNode.Remove(); } catch (NotImplementedException e) { throw new Exception(); } catch (Exception e) { } } [TestMethod()] public void ArrayCreateExprNode() { try { var arrayCreateExprNode = new code_in.Views.NodalView.NodesElems.Nodes.Expressions.ArrayCreateExprNode(code_in.Code_inApplication.MainResourceDictionary, null, null); arrayCreateExprNode.SetName("test"); arrayCreateExprNode.GetName(); arrayCreateExprNode.AddGeneric("test", EGenericVariance.IN); arrayCreateExprNode.UpdateDisplayedInfosFromPresenter(); SearchBar sb = new SearchBar(new ResourceDictionary()); arrayCreateExprNode.SetParentView(null); arrayCreateExprNode.GetParentView(); arrayCreateExprNode.SetNodePresenter(null); arrayCreateExprNode.ShowEditMenu(); arrayCreateExprNode.SetPosition(42, 42); arrayCreateExprNode.GetPosition(); int x; int y; arrayCreateExprNode.GetSize(out x, out y); arrayCreateExprNode.Remove(); } catch (NotImplementedException e) { throw new Exception(); } catch (Exception e) { } } [TestMethod()] public void ArrayInitExprNode() { try { var arrayInitExprNode = new code_in.Views.NodalView.NodesElems.Nodes.Expressions.ArrayInitExprNode(code_in.Code_inApplication.MainResourceDictionary, null, null); arrayInitExprNode.SetName("test"); arrayInitExprNode.GetName(); arrayInitExprNode.AddGeneric("test", EGenericVariance.IN); arrayInitExprNode.UpdateDisplayedInfosFromPresenter(); SearchBar sb = new SearchBar(new ResourceDictionary()); arrayInitExprNode.SetParentView(null); arrayInitExprNode.GetParentView(); arrayInitExprNode.SetNodePresenter(null); arrayInitExprNode.ShowEditMenu(); arrayInitExprNode.SetPosition(42, 42); arrayInitExprNode.GetPosition(); int x; int y; arrayInitExprNode.GetSize(out x, out y); arrayInitExprNode.Remove(); } catch (NotImplementedException e) { throw new Exception(); } catch (Exception e) { } } [TestMethod()] public void BinaryExprNode() { try { var node = new code_in.Views.NodalView.NodesElems.Nodes.Expressions.BinaryExprNode(code_in.Code_inApplication.MainResourceDictionary, null, null); node.SetName("test"); node.GetName(); node.AddGeneric("test", EGenericVariance.IN); node.UpdateDisplayedInfosFromPresenter(); SearchBar sb = new SearchBar(new ResourceDictionary()); node.SetParentView(null); node.GetParentView(); node.SetNodePresenter(null); node.ShowEditMenu(); node.SetPosition(42, 42); node.GetPosition(); int x; int y; node.GetSize(out x, out y); node.Remove(); } catch (NotImplementedException e) { throw new Exception(); } catch (Exception e) { } } [TestMethod()] public void FuncCallExprNode() { try { var node = new code_in.Views.NodalView.NodesElems.Nodes.Expressions.FuncCallExprNode(code_in.Code_inApplication.MainResourceDictionary, null, null); node.SetName("test"); node.GetName(); node.AddGeneric("test", EGenericVariance.IN); node.UpdateDisplayedInfosFromPresenter(); SearchBar sb = new SearchBar(new ResourceDictionary()); node.SetParentView(null); node.GetParentView(); node.SetNodePresenter(null); node.ShowEditMenu(); node.SetPosition(42, 42); node.GetPosition(); int x; int y; node.GetSize(out x, out y); node.Remove(); } catch (NotImplementedException e) { throw new Exception(); } catch (Exception e) { } } [TestMethod()] public void IdentifierExprNode() { try { var node = new code_in.Views.NodalView.NodesElems.Nodes.Expressions.IdentifierExprNode(code_in.Code_inApplication.MainResourceDictionary, null, null); node.SetName("test"); node.GetName(); node.AddGeneric("test", EGenericVariance.IN); node.UpdateDisplayedInfosFromPresenter(); SearchBar sb = new SearchBar(new ResourceDictionary()); node.SetParentView(null); node.GetParentView(); node.SetNodePresenter(null); node.ShowEditMenu(); node.SetPosition(42, 42); node.GetPosition(); int x; int y; node.GetSize(out x, out y); node.Remove(); } catch (NotImplementedException e) { throw new Exception(); } catch (Exception e) { } } [TestMethod()] public void ParenthesizedExprNode() { try { var node = new code_in.Views.NodalView.NodesElems.Nodes.Expressions.ParenthesizedExprNode(code_in.Code_inApplication.MainResourceDictionary, null, null); node.SetName("test"); node.GetName(); node.AddGeneric("test", EGenericVariance.IN); node.UpdateDisplayedInfosFromPresenter(); SearchBar sb = new SearchBar(new ResourceDictionary()); node.SetParentView(null); node.GetParentView(); node.SetNodePresenter(null); node.ShowEditMenu(); node.SetPosition(42, 42); node.GetPosition(); int x; int y; node.GetSize(out x, out y); node.Remove(); } catch (NotImplementedException e) { throw new Exception(); } catch (Exception e) { } } [TestMethod()] public void PrimaryExprNode() { try { var node = new code_in.Views.NodalView.NodesElems.Nodes.Expressions.PrimaryExprNode(code_in.Code_inApplication.MainResourceDictionary, null, null); node.SetName("test"); node.GetName(); node.AddGeneric("test", EGenericVariance.IN); node.UpdateDisplayedInfosFromPresenter(); SearchBar sb = new SearchBar(new ResourceDictionary()); node.SetParentView(null); node.GetParentView(); node.SetNodePresenter(null); node.ShowEditMenu(); node.SetPosition(42, 42); node.GetPosition(); int x; int y; node.GetSize(out x, out y); node.Remove(); } catch (NotImplementedException e) { throw new Exception(); } catch (Exception e) { } } [TestMethod()] public void TernaryExprNode() { try { var node = new code_in.Views.NodalView.NodesElems.Nodes.Expressions.TernaryExprNode(code_in.Code_inApplication.MainResourceDictionary, null, null); node.SetName("test"); node.GetName(); node.AddGeneric("test", EGenericVariance.IN); node.UpdateDisplayedInfosFromPresenter(); SearchBar sb = new SearchBar(new ResourceDictionary()); node.SetParentView(null); node.GetParentView(); node.SetNodePresenter(null); node.ShowEditMenu(); node.SetPosition(42, 42); node.GetPosition(); int x; int y; node.GetSize(out x, out y); node.Remove(); } catch (NotImplementedException e) { throw new Exception(); } catch (Exception e) { } } [TestMethod()] public void UnaryExprNode() { try { var node = new code_in.Views.NodalView.NodesElems.Nodes.Expressions.UnaryExprNode(code_in.Code_inApplication.MainResourceDictionary, null, null); node.SetName("test"); node.GetName(); node.AddGeneric("test", EGenericVariance.IN); node.UpdateDisplayedInfosFromPresenter(); SearchBar sb = new SearchBar(new ResourceDictionary()); node.SetParentView(null); node.GetParentView(); node.SetNodePresenter(null); node.ShowEditMenu(); node.SetPosition(42, 42); node.GetPosition(); int x; int y; node.GetSize(out x, out y); node.Remove(); } catch (NotImplementedException e) { throw new Exception(); } catch (Exception e) { } } [TestMethod()] public void UnSupExprNode() { try { var node = new code_in.Views.NodalView.NodesElems.Nodes.Expressions.UnSupExpNode(code_in.Code_inApplication.MainResourceDictionary, null, null); node.SetName("test"); node.GetName(); node.AddGeneric("test", EGenericVariance.IN); //node.UpdateDisplayedInfosFromPresenter(); SearchBar sb = new SearchBar(new ResourceDictionary()); node.SetParentView(null); node.GetParentView(); node.SetNodePresenter(null); //node.ShowEditMenu(); //node.SetPosition(42, 42); node.GetPosition(); int x; int y; node.GetSize(out x, out y); //node.Remove(); } catch (NotImplementedException e) { throw new Exception(); } } [TestMethod()] public void IfStmtNode() { try { var node = new code_in.Views.NodalView.NodesElems.Nodes.Statements.Block.IfStmtTile(code_in.Code_inApplication.MainResourceDictionary, null); node.SetName("test"); node.GetName(); node.AddGeneric("test", EGenericVariance.IN); node.UpdateDisplayedInfosFromPresenter(); SearchBar sb = new SearchBar(new ResourceDictionary()); node.SetParentView(null); node.GetParentView(); node.SetNodePresenter(null); node.ShowEditMenu(); node.SetPosition(42, 42); node.GetPosition(); int x; int y; node.GetSize(out x, out y); node.Remove(); } catch (NotImplementedException e) { throw new Exception(); } catch (Exception e) { } } [TestMethod()] public void SwitchStmtNode() { try { var node = new code_in.Views.NodalView.NodesElems.Tiles.Statements.SwitchStmtTile(code_in.Code_inApplication.MainResourceDictionary, null); node.SetName("test"); node.GetName(); node.AddGeneric("test", EGenericVariance.IN); //node.UpdateDisplayedInfosFromPresenter(); SearchBar sb = new SearchBar(new ResourceDictionary()); node.SetParentView(null); node.GetParentView(); node.SetNodePresenter(null); //node.ShowEditMenu(); node.SetPosition(42, 42); node.GetPosition(); int x; int y; node.GetSize(out x, out y); //node.Remove(); } catch (NotImplementedException e) { throw new Exception(); } } [TestMethod()] public void WhileStmtNode() { try { var node = new code_in.Views.NodalView.NodesElems.Tiles.Statements.WhileStmtTile(code_in.Code_inApplication.MainResourceDictionary, null); node.SetName("test"); node.GetName(); node.AddGeneric("test", EGenericVariance.IN); node.UpdateDisplayedInfosFromPresenter(); SearchBar sb = new SearchBar(new ResourceDictionary()); node.SetParentView(null); node.GetParentView(); node.SetNodePresenter(null); node.ShowEditMenu(); node.SetPosition(42, 42); node.GetPosition(); int x; int y; node.GetSize(out x, out y); node.Remove(); } catch (NotImplementedException e) { throw new Exception(); } catch (Exception e) { } } [TestMethod()] public void BreakStmtNode() { try { var node = new code_in.Views.NodalView.NodesElems.Tiles.Statements.BreakStmtTile(code_in.Code_inApplication.MainResourceDictionary, null); node.SetName("test"); node.GetName(); node.AddGeneric("test", EGenericVariance.IN); node.UpdateDisplayedInfosFromPresenter(); SearchBar sb = new SearchBar(new ResourceDictionary()); node.SetParentView(null); node.GetParentView(); node.SetNodePresenter(null); node.ShowEditMenu(); node.SetPosition(42, 42); node.GetPosition(); int x; int y; node.GetSize(out x, out y); node.Remove(); } catch (NotImplementedException e) { throw new Exception(); } catch (Exception e) { } } [TestMethod()] public void ReturnStmtNode() { try { var node = new code_in.Views.NodalView.NodesElems.Tiles.Statements.ReturnStmtTile(code_in.Code_inApplication.MainResourceDictionary, null); node.SetName("test"); node.GetName(); node.AddGeneric("test", EGenericVariance.IN); //node.UpdateDisplayedInfosFromPresenter(); SearchBar sb = new SearchBar(new ResourceDictionary()); node.SetParentView(null); node.GetParentView(); node.SetNodePresenter(null); //node.ShowEditMenu(); node.SetPosition(42, 42); node.GetPosition(); int x; int y; node.GetSize(out x, out y); node.Remove(); } catch (NotImplementedException e) { throw new Exception(); } } } }
seb776/code_in
VSCode_in/VSCode_in_UnitTests/Core/UI/INodeElem.cs
C#
gpl-2.0
21,482
/*********************************************************************** IMUTest - Simple visualization utility for 6-DOF IMU tracking. Copyright (c) 2013 Oliver Kreylos This file is part of the optical/inertial sensor fusion tracking package. The optical/inertial sensor fusion tracking package is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. The optical/inertial sensor fusion tracking package is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with the optical/inertial sensor fusion tracking package; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ***********************************************************************/ #include <iostream> #include <iomanip> #include <Misc/FunctionCalls.h> #include <Threads/TripleBuffer.h> #include <GL/gl.h> #include <GL/GLMaterialTemplates.h> #include <GL/GLModels.h> #include <GL/GLGeometryWrappers.h> #include <Vrui/Application.h> #include "IMU.h" #include "PSMove.h" #include "OculusRift.h" #include "IMUTracker.h" /********************** Main application class: **********************/ class IMUTest:public Vrui::Application { /* Elements: */ private: IMU* imu; // Pointer to the connected inertial measurement unit IMUTracker* tracker; // 6-DOF tracker attached to the connected IMU Threads::TripleBuffer<IMU::CalibratedSample> samples; // Triple buffer of incoming calibrated samples /* Private methods: */ void sampleCallback(const IMU::CalibratedSample& sample); // Callback called when a new calibrated sample from the IMU arrives /* Constructors and destructors: */ public: IMUTest(int& argc,char**& argv); virtual ~IMUTest(void); /* Methods from Vrui::Application: */ virtual void frame(void); virtual void display(GLContextData& contextData) const; virtual void eventCallback(EventID eventId,Vrui::InputDevice::ButtonCallbackData* cbData); }; /************************ Methods of class IMUTest: ************************/ void IMUTest::sampleCallback(const IMU::CalibratedSample& sample) { /* Store the calibrated sample: */ samples.postNewValue(sample); /* Forward the calibrated sample to the 6-DOF tracker: */ tracker->integrateSample(sample); #if 0 static IMU::Vector accel(0.0,0.0,0.0); static IMU::Vector mag(0.0,0.0,0.0); const double w=1.0/1024.0; accel=accel*(1.0-w)+sample.accelerometer*w; mag=mag*(1.0-w)+sample.magnetometer*w; std::cout<<std::fixed; std::cout.precision(4); std::cout<<'\r'; std::cout<<std::setw(10)<<accel.mag()<<", "; std::cout<<std::setw(10)<<mag.mag(); std::cout<<std::flush; #endif #if 0 std::cout<<std::fixed; std::cout.precision(4); std::cout<<'\r'; for(int i=0;i<3;++i) std::cout<<std::setw(10)<<sample.magnetometer[i]; std::cout<<std::flush; #endif Vrui::requestUpdate(); } IMUTest::IMUTest(int& argc,char**& argv) :Vrui::Application(argc,argv), imu(0),tracker(0) { /* Parse the command line: */ IMUTracker::Scalar gravity(9.81); IMUTracker::Scalar driftCorrectionWeight(0.001); bool useMagnetometer=true; for(int i=1;i<argc;++i) { if(argv[i][0]=='-') { if(strcasecmp(argv[i]+1,"psmove")==0) { ++i; if(i<argc) { if(imu==0) { /* Connect to the PS Move device of the given index: */ PSMove* move=new PSMove(atoi(argv[i])); imu=move; } else std::cerr<<"Ignoring additional -psmove "<<argv[i]<<" argument"<<std::endl; } else std::cerr<<"Ignoring dangling -psmove argument"<<std::endl; } else if(strcasecmp(argv[i]+1,"rift")==0) { ++i; if(i<argc) { if(imu==0) { /* Connect to the Oculus Rift device of the given index: */ OculusRift* rift=new OculusRift(atoi(argv[i])); imu=rift; } else std::cerr<<"Ignoring additional -rift "<<argv[i]<<" argument"<<std::endl; } else std::cerr<<"Ignoring dangling -rift argument"<<std::endl; } else if(strcasecmp(argv[i]+1,"gravity")==0) { ++i; if(i<argc) { /* Update local gravity: */ gravity=IMUTracker::Scalar(atof(argv[i])); } else std::cerr<<"Ignoring dangling -gravity argument"<<std::endl; } else if(strcasecmp(argv[i]+1,"nomag")==0) { /* Disable magnetometer-based drift correction: */ useMagnetometer=false; } else if(strcasecmp(argv[i]+1,"drift")==0) { ++i; if(i<argc) { /* Update the drift correction weight: */ driftCorrectionWeight=IMUTracker::Scalar(atof(argv[i])); } else std::cerr<<"Ignoring dangling -drift argument"<<std::endl; } } } std::cout<<"Connected to IMU device "<<imu->getSerialNumber()<<std::endl; /* Set up the 6-DOF tracker: */ tracker=new IMUTracker(*imu); tracker->setGravity(gravity); tracker->setDriftCorrectionWeight(driftCorrectionWeight); tracker->setUseMagnetometer(useMagnetometer); /* Start streaming IMU measurements: */ imu->startStreamingCalibrated(Misc::createFunctionCall(this,&IMUTest::sampleCallback)); /* Add event tool classes to control the application: */ addEventTool("Reset Tracker",0,0); Vrui::setNavigationTransformation(Vrui::Point(0,0,0),Vrui::Scalar(15),Vrui::Vector(0,1,0)); } IMUTest::~IMUTest(void) { /* Stop sampling and disconnect from the IMU: */ imu->stopStreaming(); delete tracker; delete imu; } void IMUTest::frame(void) { /* Lock the most recent sample and tracker state: */ tracker->lockNewState(); samples.lockNewValue(); } void IMUTest::display(GLContextData& contextData) const { glPushAttrib(GL_ENABLE_BIT); glEnable(GL_COLOR_MATERIAL); glColorMaterial(GL_FRONT,GL_AMBIENT_AND_DIFFUSE); glMaterialSpecular(GLMaterialEnums::FRONT,GLColor<GLfloat,4>(1.0f,1.0f,1.0f)); glMaterialShininess(GLMaterialEnums::FRONT,25.0f); /* Draw a global coordinate frame: */ glPushMatrix(); glColor3f(1.0f,0.5f,0.5f); glRotated(90.0,0.0,1.0,0.0); glTranslated(0.0,0.0,5.0); glDrawArrow(0.5f,1.0f,1.5f,10.0f,16); glPopMatrix(); glPushMatrix(); glColor3f(0.5f,1.0f,0.5f); glRotated(-90.0,1.0,0.0,0.0); glTranslated(0.0,0.0,5.0); glDrawArrow(0.5f,1.0f,1.5f,10.0f,16); glPopMatrix(); glPushMatrix(); glColor3f(0.5f,0.5f,1.0f); glTranslated(0.0,0.0,5.0); glDrawArrow(0.5f,1.0f,1.5f,10.0f,16); glPopMatrix(); /* Draw a local coordinate frame: */ glPushMatrix(); const IMUTracker::State& state=tracker->getLockedState(); // if(lockPosition) // glTranslated(5.0,5.0,5.0); // else // glTranslate(state.translation*IMUTracker::Scalar(10)); glRotate(state.rotation); glPushMatrix(); glColor3f(1.0f,0.5f,0.5f); glRotated(90.0,0.0,1.0,0.0); glTranslated(0.0,0.0,2.5); glDrawArrow(0.5f,1.0f,1.5f,5.0f,16); glPopMatrix(); glPushMatrix(); glColor3f(0.5f,1.0f,0.5f); glRotated(-90.0,1.0,0.0,0.0); glTranslated(0.0,0.0,2.5); glDrawArrow(0.5f,1.0f,1.5f,5.0f,16); glPopMatrix(); glPushMatrix(); glColor3f(0.5f,0.5f,1.0f); glTranslated(0.0,0.0,2.5); glDrawArrow(0.5f,1.0f,1.5f,5.0f,16); glPopMatrix(); const IMU::CalibratedSample& sample=samples.getLockedValue(); /* Draw the current linear acceleration vector: */ glPushMatrix(); glColor3f(1.0f,1.0f,0.0f); GLfloat len=GLfloat(Geometry::mag(sample.accelerometer)); glRotate(IMUTracker::Rotation::rotateFromTo(IMUTracker::Vector(0,0,1),sample.accelerometer)); glTranslatef(0.0f,0.0f,len*0.5f); glDrawArrow(0.5f,1.0f,1.5f,len,16); glPopMatrix(); /* Draw the current magnetic flux density vector: */ glPushMatrix(); glColor3f(1.0f,0.0f,1.0f); len=GLfloat(Geometry::mag(sample.magnetometer))*0.2f; glRotate(IMUTracker::Rotation::rotateFromTo(IMUTracker::Vector(0,0,1),sample.magnetometer)); // glTranslatef(0.0f,0.0f,len*0.5f); glDrawArrow(0.5f,1.0f,1.5f,len*2.0f,16); glPopMatrix(); glPopMatrix(); glPopAttrib(); } void IMUTest::eventCallback(EventID eventId,Vrui::InputDevice::ButtonCallbackData* cbData) { if(cbData->newButtonState) { switch(eventId) { case 0: break; } } else { switch(eventId) { } } } VRUI_APPLICATION_RUN(IMUTest)
Doc-Ok/OpticalTracking
OpticalTracking/IMUTest.cpp
C++
gpl-2.0
8,469
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Data; public partial class Add_Order : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { Binddate(); Label4.Visible = false; } } protected void Binddate() { users us = new users(); GVinformation.DataSource = us.GetAllgoods_order(us); GVinformation.DataBind(); } protected void GVinformation_Sorting(object sender, GridViewSortEventArgs e) { users us = new users(); string sortExpression = e.SortExpression; if (GVinformation.SortDirection == SortDirection.Ascending) { DataView dv = us.GetAllGoods_Order(us).Tables[0].DefaultView; dv.Sort = sortExpression + "DESC"; GVinformation.DataSource = dv; GVinformation.DataBind(); } else { DataView dv = us.GetAllGoods_Order(us).Tables[0].DefaultView; dv.Sort = sortExpression + "ASC"; GVinformation.DataSource = dv; GVinformation.DataBind(); } } protected void GVinformation_RowEditing(object sender, GridViewEditEventArgs e) { GVinformation.EditIndex = e.NewEditIndex; Binddate(); } protected void GVinformation_RowCancelingEdit(object sender, GridViewCancelEditEventArgs e) { GVinformation.EditIndex = -1; Binddate(); } protected void GVinformation_PageIndexChanging(object sender, GridViewPageEventArgs e) { GVinformation.PageIndex = e.NewPageIndex; Binddate(); } protected void btnAdd_Click(object sender, EventArgs e) { string id = txtOrderID.Text.Trim(); string name = (drpName.SelectedIndex == 7) ? (txtName.Text.Trim()) : (drpName.SelectedValue.Trim()); string ordercompany = txtCompany.Text.Trim(); string date = txtTime.Text.Trim(); string count = txtGoodCount.Text.Trim(); string price = txtGoodPrice.Text.Trim(); string employees = txtemplyees.Text.Trim(); users us = new users(); us.id = id; us.name = name; us.ordercompany = ordercompany; us.date = date; us.count = count; us.price = price; us.employees = employees; int result = us.Addgoods_order(us); if (result > 0) { Response.Write("<script>alert(\"添加信息成功!\")</script>"); Binddate(); } } protected void drpName_SelectedIndexChanged(object sender, EventArgs e) { if (drpName.SelectedIndex == 7) { txtName.Visible = true; } } protected void txtOrderID_TextChanged(object sender, EventArgs e) { string id = txtOrderID.Text.Trim(); users us = new users(); us.id = id; int result = us.selectDD(us); if(result > 0) { Label4.Visible = true; } } }
sky-zhengxin/manager
Add_Order.aspx.cs
C#
gpl-2.0
3,279
/* * GPL HEADER START * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 only, * as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License version 2 for more details (a copy is included * in the LICENSE file that accompanied this code). * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, * CA 95054 USA or visit www.sun.com if you need additional information or * have any questions. * * GPL HEADER END */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * * Copyright (c) 2011, 2012, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/ * Lustre is a trademark of Sun Microsystems, Inc. */ #define DEBUG_SUBSYSTEM S_LOV #ifdef __KERNEL__ #include <libcfs/libcfs.h> #else #include <liblustre.h> #endif #include <obd_class.h> #include <obd_lov.h> #include <lustre/lustre_idl.h> #include "lov_internal.h" static void lov_init_set(struct lov_request_set *set) { set->set_count = 0; cfs_atomic_set(&set->set_completes, 0); cfs_atomic_set(&set->set_success, 0); cfs_atomic_set(&set->set_finish_checked, 0); set->set_cookies = 0; CFS_INIT_LIST_HEAD(&set->set_list); cfs_atomic_set(&set->set_refcount, 1); cfs_waitq_init(&set->set_waitq); spin_lock_init(&set->set_lock); } void lov_finish_set(struct lov_request_set *set) { cfs_list_t *pos, *n; ENTRY; LASSERT(set); cfs_list_for_each_safe(pos, n, &set->set_list) { struct lov_request *req = cfs_list_entry(pos, struct lov_request, rq_link); cfs_list_del_init(&req->rq_link); if (req->rq_oi.oi_oa) OBDO_FREE(req->rq_oi.oi_oa); if (req->rq_oi.oi_md) OBD_FREE_LARGE(req->rq_oi.oi_md, req->rq_buflen); if (req->rq_oi.oi_osfs) OBD_FREE(req->rq_oi.oi_osfs, sizeof(*req->rq_oi.oi_osfs)); OBD_FREE(req, sizeof(*req)); } if (set->set_pga) { int len = set->set_oabufs * sizeof(*set->set_pga); OBD_FREE_LARGE(set->set_pga, len); } if (set->set_lockh) lov_llh_put(set->set_lockh); OBD_FREE(set, sizeof(*set)); EXIT; } int lov_set_finished(struct lov_request_set *set, int idempotent) { int completes = cfs_atomic_read(&set->set_completes); CDEBUG(D_INFO, "check set %d/%d\n", completes, set->set_count); if (completes == set->set_count) { if (idempotent) return 1; if (cfs_atomic_inc_return(&set->set_finish_checked) == 1) return 1; } return 0; } void lov_update_set(struct lov_request_set *set, struct lov_request *req, int rc) { req->rq_complete = 1; req->rq_rc = rc; cfs_atomic_inc(&set->set_completes); if (rc == 0) cfs_atomic_inc(&set->set_success); cfs_waitq_signal(&set->set_waitq); } int lov_update_common_set(struct lov_request_set *set, struct lov_request *req, int rc) { struct lov_obd *lov = &set->set_exp->exp_obd->u.lov; ENTRY; lov_update_set(set, req, rc); /* grace error on inactive ost */ if (rc && !(lov->lov_tgts[req->rq_idx] && lov->lov_tgts[req->rq_idx]->ltd_active)) rc = 0; /* FIXME in raid1 regime, should return 0 */ RETURN(rc); } void lov_set_add_req(struct lov_request *req, struct lov_request_set *set) { cfs_list_add_tail(&req->rq_link, &set->set_list); set->set_count++; req->rq_rqset = set; } extern void osc_update_enqueue(struct lustre_handle *lov_lockhp, struct lov_oinfo *loi, int flags, struct ost_lvb *lvb, __u32 mode, int rc); static int lov_update_enqueue_lov(struct obd_export *exp, struct lustre_handle *lov_lockhp, struct lov_oinfo *loi, int flags, int idx, __u64 oid, int rc) { struct lov_obd *lov = &exp->exp_obd->u.lov; if (rc != ELDLM_OK && !(rc == ELDLM_LOCK_ABORTED && (flags & LDLM_FL_HAS_INTENT))) { memset(lov_lockhp, 0, sizeof(*lov_lockhp)); if (lov->lov_tgts[idx] && lov->lov_tgts[idx]->ltd_active) { /* -EUSERS used by OST to report file contention */ if (rc != -EINTR && rc != -EUSERS) CERROR("enqueue objid "LPX64" subobj " LPX64" on OST idx %d: rc %d\n", oid, loi->loi_id, loi->loi_ost_idx, rc); } else rc = ELDLM_OK; } return rc; } int lov_update_enqueue_set(struct lov_request *req, __u32 mode, int rc) { struct lov_request_set *set = req->rq_rqset; struct lustre_handle *lov_lockhp; struct obd_info *oi = set->set_oi; struct lov_oinfo *loi; ENTRY; LASSERT(oi != NULL); lov_lockhp = set->set_lockh->llh_handles + req->rq_stripe; loi = oi->oi_md->lsm_oinfo[req->rq_stripe]; /* XXX LOV STACKING: OSC gets a copy, created in lov_prep_enqueue_set * and that copy can be arbitrarily out of date. * * The LOV API is due for a serious rewriting anyways, and this * can be addressed then. */ lov_stripe_lock(oi->oi_md); osc_update_enqueue(lov_lockhp, loi, oi->oi_flags, &req->rq_oi.oi_md->lsm_oinfo[0]->loi_lvb, mode, rc); if (rc == ELDLM_LOCK_ABORTED && (oi->oi_flags & LDLM_FL_HAS_INTENT)) memset(lov_lockhp, 0, sizeof *lov_lockhp); rc = lov_update_enqueue_lov(set->set_exp, lov_lockhp, loi, oi->oi_flags, req->rq_idx, oi->oi_md->lsm_object_id, rc); lov_stripe_unlock(oi->oi_md); lov_update_set(set, req, rc); RETURN(rc); } /* The callback for osc_enqueue that updates lov info for every OSC request. */ static int cb_update_enqueue(void *cookie, int rc) { struct obd_info *oinfo = cookie; struct ldlm_enqueue_info *einfo; struct lov_request *lovreq; lovreq = container_of(oinfo, struct lov_request, rq_oi); einfo = lovreq->rq_rqset->set_ei; return lov_update_enqueue_set(lovreq, einfo->ei_mode, rc); } static int enqueue_done(struct lov_request_set *set, __u32 mode) { struct lov_request *req; struct lov_obd *lov = &set->set_exp->exp_obd->u.lov; int completes = cfs_atomic_read(&set->set_completes); int rc = 0; ENTRY; /* enqueue/match success, just return */ if (completes && completes == cfs_atomic_read(&set->set_success)) RETURN(0); /* cancel enqueued/matched locks */ cfs_list_for_each_entry(req, &set->set_list, rq_link) { struct lustre_handle *lov_lockhp; if (!req->rq_complete || req->rq_rc) continue; lov_lockhp = set->set_lockh->llh_handles + req->rq_stripe; LASSERT(lov_lockhp); if (!lustre_handle_is_used(lov_lockhp)) continue; rc = obd_cancel(lov->lov_tgts[req->rq_idx]->ltd_exp, req->rq_oi.oi_md, mode, lov_lockhp); if (rc && lov->lov_tgts[req->rq_idx] && lov->lov_tgts[req->rq_idx]->ltd_active) CERROR("cancelling obdjid "LPX64" on OST " "idx %d error: rc = %d\n", req->rq_oi.oi_md->lsm_object_id, req->rq_idx, rc); } if (set->set_lockh) lov_llh_put(set->set_lockh); RETURN(rc); } int lov_fini_enqueue_set(struct lov_request_set *set, __u32 mode, int rc, struct ptlrpc_request_set *rqset) { int ret = 0; ENTRY; if (set == NULL) RETURN(0); LASSERT(set->set_exp); /* Do enqueue_done only for sync requests and if any request * succeeded. */ if (!rqset) { if (rc) cfs_atomic_set(&set->set_completes, 0); ret = enqueue_done(set, mode); } else if (set->set_lockh) lov_llh_put(set->set_lockh); lov_put_reqset(set); RETURN(rc ? rc : ret); } static void lov_llh_addref(void *llhp) { struct lov_lock_handles *llh = llhp; cfs_atomic_inc(&llh->llh_refcount); CDEBUG(D_INFO, "GETting llh %p : new refcount %d\n", llh, cfs_atomic_read(&llh->llh_refcount)); } static struct portals_handle_ops lov_handle_ops = { .hop_addref = lov_llh_addref, .hop_free = NULL, }; static struct lov_lock_handles *lov_llh_new(struct lov_stripe_md *lsm) { struct lov_lock_handles *llh; OBD_ALLOC(llh, sizeof *llh + sizeof(*llh->llh_handles) * lsm->lsm_stripe_count); if (llh == NULL) return NULL; cfs_atomic_set(&llh->llh_refcount, 2); llh->llh_stripe_count = lsm->lsm_stripe_count; CFS_INIT_LIST_HEAD(&llh->llh_handle.h_link); class_handle_hash(&llh->llh_handle, &lov_handle_ops); return llh; } int lov_prep_enqueue_set(struct obd_export *exp, struct obd_info *oinfo, struct ldlm_enqueue_info *einfo, struct lov_request_set **reqset) { struct lov_obd *lov = &exp->exp_obd->u.lov; struct lov_request_set *set; int i, rc = 0; ENTRY; OBD_ALLOC(set, sizeof(*set)); if (set == NULL) RETURN(-ENOMEM); lov_init_set(set); set->set_exp = exp; set->set_oi = oinfo; set->set_ei = einfo; set->set_lockh = lov_llh_new(oinfo->oi_md); if (set->set_lockh == NULL) GOTO(out_set, rc = -ENOMEM); oinfo->oi_lockh->cookie = set->set_lockh->llh_handle.h_cookie; for (i = 0; i < oinfo->oi_md->lsm_stripe_count; i++) { struct lov_oinfo *loi; struct lov_request *req; obd_off start, end; loi = oinfo->oi_md->lsm_oinfo[i]; if (!lov_stripe_intersects(oinfo->oi_md, i, oinfo->oi_policy.l_extent.start, oinfo->oi_policy.l_extent.end, &start, &end)) continue; if (!lov->lov_tgts[loi->loi_ost_idx] || !lov->lov_tgts[loi->loi_ost_idx]->ltd_active) { CDEBUG(D_HA, "lov idx %d inactive\n", loi->loi_ost_idx); continue; } OBD_ALLOC(req, sizeof(*req)); if (req == NULL) GOTO(out_set, rc = -ENOMEM); req->rq_buflen = sizeof(*req->rq_oi.oi_md) + sizeof(struct lov_oinfo *) + sizeof(struct lov_oinfo); OBD_ALLOC_LARGE(req->rq_oi.oi_md, req->rq_buflen); if (req->rq_oi.oi_md == NULL) { OBD_FREE(req, sizeof(*req)); GOTO(out_set, rc = -ENOMEM); } req->rq_oi.oi_md->lsm_oinfo[0] = ((void *)req->rq_oi.oi_md) + sizeof(*req->rq_oi.oi_md) + sizeof(struct lov_oinfo *); /* Set lov request specific parameters. */ req->rq_oi.oi_lockh = set->set_lockh->llh_handles + i; req->rq_oi.oi_cb_up = cb_update_enqueue; req->rq_oi.oi_flags = oinfo->oi_flags; LASSERT(req->rq_oi.oi_lockh); req->rq_oi.oi_policy.l_extent.gid = oinfo->oi_policy.l_extent.gid; req->rq_oi.oi_policy.l_extent.start = start; req->rq_oi.oi_policy.l_extent.end = end; req->rq_idx = loi->loi_ost_idx; req->rq_stripe = i; /* XXX LOV STACKING: submd should be from the subobj */ req->rq_oi.oi_md->lsm_object_id = loi->loi_id; req->rq_oi.oi_md->lsm_object_seq = loi->loi_seq; req->rq_oi.oi_md->lsm_stripe_count = 0; req->rq_oi.oi_md->lsm_oinfo[0]->loi_kms_valid = loi->loi_kms_valid; req->rq_oi.oi_md->lsm_oinfo[0]->loi_kms = loi->loi_kms; req->rq_oi.oi_md->lsm_oinfo[0]->loi_lvb = loi->loi_lvb; lov_set_add_req(req, set); } if (!set->set_count) GOTO(out_set, rc = -EIO); *reqset = set; RETURN(0); out_set: lov_fini_enqueue_set(set, einfo->ei_mode, rc, NULL); RETURN(rc); } int lov_fini_match_set(struct lov_request_set *set, __u32 mode, int flags) { int rc = 0; ENTRY; if (set == NULL) RETURN(0); LASSERT(set->set_exp); rc = enqueue_done(set, mode); if ((set->set_count == cfs_atomic_read(&set->set_success)) && (flags & LDLM_FL_TEST_LOCK)) lov_llh_put(set->set_lockh); lov_put_reqset(set); RETURN(rc); } int lov_prep_match_set(struct obd_export *exp, struct obd_info *oinfo, struct lov_stripe_md *lsm, ldlm_policy_data_t *policy, __u32 mode, struct lustre_handle *lockh, struct lov_request_set **reqset) { struct lov_obd *lov = &exp->exp_obd->u.lov; struct lov_request_set *set; int i, rc = 0; ENTRY; OBD_ALLOC(set, sizeof(*set)); if (set == NULL) RETURN(-ENOMEM); lov_init_set(set); set->set_exp = exp; set->set_oi = oinfo; set->set_oi->oi_md = lsm; set->set_lockh = lov_llh_new(lsm); if (set->set_lockh == NULL) GOTO(out_set, rc = -ENOMEM); lockh->cookie = set->set_lockh->llh_handle.h_cookie; for (i = 0; i < lsm->lsm_stripe_count; i++){ struct lov_oinfo *loi; struct lov_request *req; obd_off start, end; loi = lsm->lsm_oinfo[i]; if (!lov_stripe_intersects(lsm, i, policy->l_extent.start, policy->l_extent.end, &start, &end)) continue; /* FIXME raid1 should grace this error */ if (!lov->lov_tgts[loi->loi_ost_idx] || !lov->lov_tgts[loi->loi_ost_idx]->ltd_active) { CDEBUG(D_HA, "lov idx %d inactive\n", loi->loi_ost_idx); GOTO(out_set, rc = -EIO); } OBD_ALLOC(req, sizeof(*req)); if (req == NULL) GOTO(out_set, rc = -ENOMEM); req->rq_buflen = sizeof(*req->rq_oi.oi_md); OBD_ALLOC_LARGE(req->rq_oi.oi_md, req->rq_buflen); if (req->rq_oi.oi_md == NULL) { OBD_FREE(req, sizeof(*req)); GOTO(out_set, rc = -ENOMEM); } req->rq_oi.oi_policy.l_extent.start = start; req->rq_oi.oi_policy.l_extent.end = end; req->rq_oi.oi_policy.l_extent.gid = policy->l_extent.gid; req->rq_idx = loi->loi_ost_idx; req->rq_stripe = i; /* XXX LOV STACKING: submd should be from the subobj */ req->rq_oi.oi_md->lsm_object_id = loi->loi_id; req->rq_oi.oi_md->lsm_object_seq = loi->loi_seq; req->rq_oi.oi_md->lsm_stripe_count = 0; lov_set_add_req(req, set); } if (!set->set_count) GOTO(out_set, rc = -EIO); *reqset = set; RETURN(rc); out_set: lov_fini_match_set(set, mode, 0); RETURN(rc); } int lov_fini_cancel_set(struct lov_request_set *set) { int rc = 0; ENTRY; if (set == NULL) RETURN(0); LASSERT(set->set_exp); if (set->set_lockh) lov_llh_put(set->set_lockh); lov_put_reqset(set); RETURN(rc); } int lov_prep_cancel_set(struct obd_export *exp, struct obd_info *oinfo, struct lov_stripe_md *lsm, __u32 mode, struct lustre_handle *lockh, struct lov_request_set **reqset) { struct lov_request_set *set; int i, rc = 0; ENTRY; OBD_ALLOC(set, sizeof(*set)); if (set == NULL) RETURN(-ENOMEM); lov_init_set(set); set->set_exp = exp; set->set_oi = oinfo; set->set_oi->oi_md = lsm; set->set_lockh = lov_handle2llh(lockh); if (set->set_lockh == NULL) { CERROR("LOV: invalid lov lock handle %p\n", lockh); GOTO(out_set, rc = -EINVAL); } lockh->cookie = set->set_lockh->llh_handle.h_cookie; for (i = 0; i < lsm->lsm_stripe_count; i++){ struct lov_request *req; struct lustre_handle *lov_lockhp; struct lov_oinfo *loi = lsm->lsm_oinfo[i]; lov_lockhp = set->set_lockh->llh_handles + i; if (!lustre_handle_is_used(lov_lockhp)) { CDEBUG(D_INFO, "lov idx %d subobj "LPX64" no lock\n", loi->loi_ost_idx, loi->loi_id); continue; } OBD_ALLOC(req, sizeof(*req)); if (req == NULL) GOTO(out_set, rc = -ENOMEM); req->rq_buflen = sizeof(*req->rq_oi.oi_md); OBD_ALLOC_LARGE(req->rq_oi.oi_md, req->rq_buflen); if (req->rq_oi.oi_md == NULL) { OBD_FREE(req, sizeof(*req)); GOTO(out_set, rc = -ENOMEM); } req->rq_idx = loi->loi_ost_idx; req->rq_stripe = i; /* XXX LOV STACKING: submd should be from the subobj */ req->rq_oi.oi_md->lsm_object_id = loi->loi_id; req->rq_oi.oi_md->lsm_object_seq = loi->loi_seq; req->rq_oi.oi_md->lsm_stripe_count = 0; lov_set_add_req(req, set); } if (!set->set_count) GOTO(out_set, rc = -EIO); *reqset = set; RETURN(rc); out_set: lov_fini_cancel_set(set); RETURN(rc); } static int common_attr_done(struct lov_request_set *set) { cfs_list_t *pos; struct lov_request *req; struct obdo *tmp_oa; int rc = 0, attrset = 0; ENTRY; LASSERT(set->set_oi != NULL); if (set->set_oi->oi_oa == NULL) RETURN(0); if (!cfs_atomic_read(&set->set_success)) RETURN(-EIO); OBDO_ALLOC(tmp_oa); if (tmp_oa == NULL) GOTO(out, rc = -ENOMEM); cfs_list_for_each (pos, &set->set_list) { req = cfs_list_entry(pos, struct lov_request, rq_link); if (!req->rq_complete || req->rq_rc) continue; if (req->rq_oi.oi_oa->o_valid == 0) /* inactive stripe */ continue; lov_merge_attrs(tmp_oa, req->rq_oi.oi_oa, req->rq_oi.oi_oa->o_valid, set->set_oi->oi_md, req->rq_stripe, &attrset); } if (!attrset) { CERROR("No stripes had valid attrs\n"); rc = -EIO; } if ((set->set_oi->oi_oa->o_valid & OBD_MD_FLEPOCH) && (set->set_oi->oi_md->lsm_stripe_count != attrset)) { /* When we take attributes of some epoch, we require all the * ost to be active. */ CERROR("Not all the stripes had valid attrs\n"); GOTO(out, rc = -EIO); } tmp_oa->o_id = set->set_oi->oi_oa->o_id; memcpy(set->set_oi->oi_oa, tmp_oa, sizeof(*set->set_oi->oi_oa)); out: if (tmp_oa) OBDO_FREE(tmp_oa); RETURN(rc); } static int brw_done(struct lov_request_set *set) { struct lov_stripe_md *lsm = set->set_oi->oi_md; struct lov_oinfo *loi = NULL; cfs_list_t *pos; struct lov_request *req; ENTRY; cfs_list_for_each (pos, &set->set_list) { req = cfs_list_entry(pos, struct lov_request, rq_link); if (!req->rq_complete || req->rq_rc) continue; loi = lsm->lsm_oinfo[req->rq_stripe]; if (req->rq_oi.oi_oa->o_valid & OBD_MD_FLBLOCKS) loi->loi_lvb.lvb_blocks = req->rq_oi.oi_oa->o_blocks; } RETURN(0); } int lov_fini_brw_set(struct lov_request_set *set) { int rc = 0; ENTRY; if (set == NULL) RETURN(0); LASSERT(set->set_exp); if (cfs_atomic_read(&set->set_completes)) { rc = brw_done(set); /* FIXME update qos data here */ } lov_put_reqset(set); RETURN(rc); } int lov_prep_brw_set(struct obd_export *exp, struct obd_info *oinfo, obd_count oa_bufs, struct brw_page *pga, struct obd_trans_info *oti, struct lov_request_set **reqset) { struct { obd_count index; obd_count count; obd_count off; } *info = NULL; struct lov_request_set *set; struct lov_obd *lov = &exp->exp_obd->u.lov; int rc = 0, i, shift; ENTRY; OBD_ALLOC(set, sizeof(*set)); if (set == NULL) RETURN(-ENOMEM); lov_init_set(set); set->set_exp = exp; set->set_oti = oti; set->set_oi = oinfo; set->set_oabufs = oa_bufs; OBD_ALLOC_LARGE(set->set_pga, oa_bufs * sizeof(*set->set_pga)); if (!set->set_pga) GOTO(out, rc = -ENOMEM); OBD_ALLOC_LARGE(info, sizeof(*info) * oinfo->oi_md->lsm_stripe_count); if (!info) GOTO(out, rc = -ENOMEM); /* calculate the page count for each stripe */ for (i = 0; i < oa_bufs; i++) { int stripe = lov_stripe_number(oinfo->oi_md, pga[i].off); info[stripe].count++; } /* alloc and initialize lov request */ shift = 0; for (i = 0; i < oinfo->oi_md->lsm_stripe_count; i++){ struct lov_oinfo *loi = NULL; struct lov_request *req; if (info[i].count == 0) continue; loi = oinfo->oi_md->lsm_oinfo[i]; if (!lov->lov_tgts[loi->loi_ost_idx] || !lov->lov_tgts[loi->loi_ost_idx]->ltd_active) { CDEBUG(D_HA, "lov idx %d inactive\n", loi->loi_ost_idx); GOTO(out, rc = -EIO); } OBD_ALLOC(req, sizeof(*req)); if (req == NULL) GOTO(out, rc = -ENOMEM); OBDO_ALLOC(req->rq_oi.oi_oa); if (req->rq_oi.oi_oa == NULL) { OBD_FREE(req, sizeof(*req)); GOTO(out, rc = -ENOMEM); } if (oinfo->oi_oa) { memcpy(req->rq_oi.oi_oa, oinfo->oi_oa, sizeof(*req->rq_oi.oi_oa)); } req->rq_oi.oi_oa->o_id = loi->loi_id; req->rq_oi.oi_oa->o_seq = loi->loi_seq; req->rq_oi.oi_oa->o_stripe_idx = i; req->rq_buflen = sizeof(*req->rq_oi.oi_md); OBD_ALLOC_LARGE(req->rq_oi.oi_md, req->rq_buflen); if (req->rq_oi.oi_md == NULL) { OBDO_FREE(req->rq_oi.oi_oa); OBD_FREE(req, sizeof(*req)); GOTO(out, rc = -ENOMEM); } req->rq_idx = loi->loi_ost_idx; req->rq_stripe = i; /* XXX LOV STACKING */ req->rq_oi.oi_md->lsm_object_id = loi->loi_id; req->rq_oi.oi_md->lsm_object_seq = loi->loi_seq; req->rq_oabufs = info[i].count; req->rq_pgaidx = shift; shift += req->rq_oabufs; /* remember the index for sort brw_page array */ info[i].index = req->rq_pgaidx; req->rq_oi.oi_capa = oinfo->oi_capa; lov_set_add_req(req, set); } if (!set->set_count) GOTO(out, rc = -EIO); /* rotate & sort the brw_page array */ for (i = 0; i < oa_bufs; i++) { int stripe = lov_stripe_number(oinfo->oi_md, pga[i].off); shift = info[stripe].index + info[stripe].off; LASSERT(shift < oa_bufs); set->set_pga[shift] = pga[i]; lov_stripe_offset(oinfo->oi_md, pga[i].off, stripe, &set->set_pga[shift].off); info[stripe].off++; } out: if (info) OBD_FREE_LARGE(info, sizeof(*info) * oinfo->oi_md->lsm_stripe_count); if (rc == 0) *reqset = set; else lov_fini_brw_set(set); RETURN(rc); } int lov_fini_getattr_set(struct lov_request_set *set) { int rc = 0; ENTRY; if (set == NULL) RETURN(0); LASSERT(set->set_exp); if (cfs_atomic_read(&set->set_completes)) rc = common_attr_done(set); lov_put_reqset(set); RETURN(rc); } /* The callback for osc_getattr_async that finilizes a request info when a * response is received. */ static int cb_getattr_update(void *cookie, int rc) { struct obd_info *oinfo = cookie; struct lov_request *lovreq; lovreq = container_of(oinfo, struct lov_request, rq_oi); return lov_update_common_set(lovreq->rq_rqset, lovreq, rc); } int lov_prep_getattr_set(struct obd_export *exp, struct obd_info *oinfo, struct lov_request_set **reqset) { struct lov_request_set *set; struct lov_obd *lov = &exp->exp_obd->u.lov; int rc = 0, i; ENTRY; OBD_ALLOC(set, sizeof(*set)); if (set == NULL) RETURN(-ENOMEM); lov_init_set(set); set->set_exp = exp; set->set_oi = oinfo; for (i = 0; i < oinfo->oi_md->lsm_stripe_count; i++) { struct lov_oinfo *loi; struct lov_request *req; loi = oinfo->oi_md->lsm_oinfo[i]; if (!lov->lov_tgts[loi->loi_ost_idx] || !lov->lov_tgts[loi->loi_ost_idx]->ltd_active) { CDEBUG(D_HA, "lov idx %d inactive\n", loi->loi_ost_idx); if (oinfo->oi_oa->o_valid & OBD_MD_FLEPOCH) /* SOM requires all the OSTs to be active. */ GOTO(out_set, rc = -EIO); continue; } OBD_ALLOC(req, sizeof(*req)); if (req == NULL) GOTO(out_set, rc = -ENOMEM); req->rq_stripe = i; req->rq_idx = loi->loi_ost_idx; OBDO_ALLOC(req->rq_oi.oi_oa); if (req->rq_oi.oi_oa == NULL) { OBD_FREE(req, sizeof(*req)); GOTO(out_set, rc = -ENOMEM); } memcpy(req->rq_oi.oi_oa, oinfo->oi_oa, sizeof(*req->rq_oi.oi_oa)); req->rq_oi.oi_oa->o_id = loi->loi_id; req->rq_oi.oi_oa->o_seq = loi->loi_seq; req->rq_oi.oi_cb_up = cb_getattr_update; req->rq_oi.oi_capa = oinfo->oi_capa; lov_set_add_req(req, set); } if (!set->set_count) GOTO(out_set, rc = -EIO); *reqset = set; RETURN(rc); out_set: lov_fini_getattr_set(set); RETURN(rc); } int lov_fini_destroy_set(struct lov_request_set *set) { ENTRY; if (set == NULL) RETURN(0); LASSERT(set->set_exp); if (cfs_atomic_read(&set->set_completes)) { /* FIXME update qos data here */ } lov_put_reqset(set); RETURN(0); } int lov_prep_destroy_set(struct obd_export *exp, struct obd_info *oinfo, struct obdo *src_oa, struct lov_stripe_md *lsm, struct obd_trans_info *oti, struct lov_request_set **reqset) { struct lov_request_set *set; struct lov_obd *lov = &exp->exp_obd->u.lov; int rc = 0, i; ENTRY; OBD_ALLOC(set, sizeof(*set)); if (set == NULL) RETURN(-ENOMEM); lov_init_set(set); set->set_exp = exp; set->set_oi = oinfo; set->set_oi->oi_md = lsm; set->set_oi->oi_oa = src_oa; set->set_oti = oti; if (oti != NULL && src_oa->o_valid & OBD_MD_FLCOOKIE) set->set_cookies = oti->oti_logcookies; for (i = 0; i < lsm->lsm_stripe_count; i++) { struct lov_oinfo *loi; struct lov_request *req; loi = lsm->lsm_oinfo[i]; if (!lov->lov_tgts[loi->loi_ost_idx] || !lov->lov_tgts[loi->loi_ost_idx]->ltd_active) { CDEBUG(D_HA, "lov idx %d inactive\n", loi->loi_ost_idx); continue; } OBD_ALLOC(req, sizeof(*req)); if (req == NULL) GOTO(out_set, rc = -ENOMEM); req->rq_stripe = i; req->rq_idx = loi->loi_ost_idx; OBDO_ALLOC(req->rq_oi.oi_oa); if (req->rq_oi.oi_oa == NULL) { OBD_FREE(req, sizeof(*req)); GOTO(out_set, rc = -ENOMEM); } memcpy(req->rq_oi.oi_oa, src_oa, sizeof(*req->rq_oi.oi_oa)); req->rq_oi.oi_oa->o_id = loi->loi_id; req->rq_oi.oi_oa->o_seq = loi->loi_seq; lov_set_add_req(req, set); } if (!set->set_count) GOTO(out_set, rc = -EIO); *reqset = set; RETURN(rc); out_set: lov_fini_destroy_set(set); RETURN(rc); } int lov_fini_setattr_set(struct lov_request_set *set) { int rc = 0; ENTRY; if (set == NULL) RETURN(0); LASSERT(set->set_exp); if (cfs_atomic_read(&set->set_completes)) { rc = common_attr_done(set); /* FIXME update qos data here */ } lov_put_reqset(set); RETURN(rc); } int lov_update_setattr_set(struct lov_request_set *set, struct lov_request *req, int rc) { struct lov_obd *lov = &req->rq_rqset->set_exp->exp_obd->u.lov; struct lov_stripe_md *lsm = req->rq_rqset->set_oi->oi_md; ENTRY; lov_update_set(set, req, rc); /* grace error on inactive ost */ if (rc && !(lov->lov_tgts[req->rq_idx] && lov->lov_tgts[req->rq_idx]->ltd_active)) rc = 0; if (rc == 0) { if (req->rq_oi.oi_oa->o_valid & OBD_MD_FLCTIME) lsm->lsm_oinfo[req->rq_stripe]->loi_lvb.lvb_ctime = req->rq_oi.oi_oa->o_ctime; if (req->rq_oi.oi_oa->o_valid & OBD_MD_FLMTIME) lsm->lsm_oinfo[req->rq_stripe]->loi_lvb.lvb_mtime = req->rq_oi.oi_oa->o_mtime; if (req->rq_oi.oi_oa->o_valid & OBD_MD_FLATIME) lsm->lsm_oinfo[req->rq_stripe]->loi_lvb.lvb_atime = req->rq_oi.oi_oa->o_atime; } RETURN(rc); } /* The callback for osc_setattr_async that finilizes a request info when a * response is received. */ static int cb_setattr_update(void *cookie, int rc) { struct obd_info *oinfo = cookie; struct lov_request *lovreq; lovreq = container_of(oinfo, struct lov_request, rq_oi); return lov_update_setattr_set(lovreq->rq_rqset, lovreq, rc); } int lov_prep_setattr_set(struct obd_export *exp, struct obd_info *oinfo, struct obd_trans_info *oti, struct lov_request_set **reqset) { struct lov_request_set *set; struct lov_obd *lov = &exp->exp_obd->u.lov; int rc = 0, i; ENTRY; OBD_ALLOC(set, sizeof(*set)); if (set == NULL) RETURN(-ENOMEM); lov_init_set(set); set->set_exp = exp; set->set_oti = oti; set->set_oi = oinfo; if (oti != NULL && oinfo->oi_oa->o_valid & OBD_MD_FLCOOKIE) set->set_cookies = oti->oti_logcookies; for (i = 0; i < oinfo->oi_md->lsm_stripe_count; i++) { struct lov_oinfo *loi = oinfo->oi_md->lsm_oinfo[i]; struct lov_request *req; if (!lov->lov_tgts[loi->loi_ost_idx] || !lov->lov_tgts[loi->loi_ost_idx]->ltd_active) { CDEBUG(D_HA, "lov idx %d inactive\n", loi->loi_ost_idx); continue; } OBD_ALLOC(req, sizeof(*req)); if (req == NULL) GOTO(out_set, rc = -ENOMEM); req->rq_stripe = i; req->rq_idx = loi->loi_ost_idx; OBDO_ALLOC(req->rq_oi.oi_oa); if (req->rq_oi.oi_oa == NULL) { OBD_FREE(req, sizeof(*req)); GOTO(out_set, rc = -ENOMEM); } memcpy(req->rq_oi.oi_oa, oinfo->oi_oa, sizeof(*req->rq_oi.oi_oa)); req->rq_oi.oi_oa->o_id = loi->loi_id; req->rq_oi.oi_oa->o_seq= loi->loi_seq; req->rq_oi.oi_oa->o_stripe_idx = i; req->rq_oi.oi_cb_up = cb_setattr_update; req->rq_oi.oi_capa = oinfo->oi_capa; if (oinfo->oi_oa->o_valid & OBD_MD_FLSIZE) { int off = lov_stripe_offset(oinfo->oi_md, oinfo->oi_oa->o_size, i, &req->rq_oi.oi_oa->o_size); if (off < 0 && req->rq_oi.oi_oa->o_size) req->rq_oi.oi_oa->o_size--; CDEBUG(D_INODE, "stripe %d has size "LPU64"/"LPU64"\n", i, req->rq_oi.oi_oa->o_size, oinfo->oi_oa->o_size); } lov_set_add_req(req, set); } if (!set->set_count) GOTO(out_set, rc = -EIO); *reqset = set; RETURN(rc); out_set: lov_fini_setattr_set(set); RETURN(rc); } int lov_fini_punch_set(struct lov_request_set *set) { int rc = 0; ENTRY; if (set == NULL) RETURN(0); LASSERT(set->set_exp); if (cfs_atomic_read(&set->set_completes)) { rc = -EIO; /* FIXME update qos data here */ if (cfs_atomic_read(&set->set_success)) rc = common_attr_done(set); } lov_put_reqset(set); RETURN(rc); } int lov_update_punch_set(struct lov_request_set *set, struct lov_request *req, int rc) { struct lov_obd *lov = &req->rq_rqset->set_exp->exp_obd->u.lov; struct lov_stripe_md *lsm = req->rq_rqset->set_oi->oi_md; ENTRY; lov_update_set(set, req, rc); /* grace error on inactive ost */ if (rc && !lov->lov_tgts[req->rq_idx]->ltd_active) rc = 0; if (rc == 0) { lov_stripe_lock(lsm); if (req->rq_oi.oi_oa->o_valid & OBD_MD_FLBLOCKS) { lsm->lsm_oinfo[req->rq_stripe]->loi_lvb.lvb_blocks = req->rq_oi.oi_oa->o_blocks; } lov_stripe_unlock(lsm); } RETURN(rc); } /* The callback for osc_punch that finilizes a request info when a response * is received. */ static int cb_update_punch(void *cookie, int rc) { struct obd_info *oinfo = cookie; struct lov_request *lovreq; lovreq = container_of(oinfo, struct lov_request, rq_oi); return lov_update_punch_set(lovreq->rq_rqset, lovreq, rc); } int lov_prep_punch_set(struct obd_export *exp, struct obd_info *oinfo, struct obd_trans_info *oti, struct lov_request_set **reqset) { struct lov_request_set *set; struct lov_obd *lov = &exp->exp_obd->u.lov; int rc = 0, i; ENTRY; OBD_ALLOC(set, sizeof(*set)); if (set == NULL) RETURN(-ENOMEM); lov_init_set(set); set->set_oi = oinfo; set->set_exp = exp; for (i = 0; i < oinfo->oi_md->lsm_stripe_count; i++) { struct lov_oinfo *loi = oinfo->oi_md->lsm_oinfo[i]; struct lov_request *req; obd_off rs, re; if (!lov_stripe_intersects(oinfo->oi_md, i, oinfo->oi_policy.l_extent.start, oinfo->oi_policy.l_extent.end, &rs, &re)) continue; if (!lov->lov_tgts[loi->loi_ost_idx] || !lov->lov_tgts[loi->loi_ost_idx]->ltd_active) { CDEBUG(D_HA, "lov idx %d inactive\n", loi->loi_ost_idx); GOTO(out_set, rc = -EIO); } OBD_ALLOC(req, sizeof(*req)); if (req == NULL) GOTO(out_set, rc = -ENOMEM); req->rq_stripe = i; req->rq_idx = loi->loi_ost_idx; OBDO_ALLOC(req->rq_oi.oi_oa); if (req->rq_oi.oi_oa == NULL) { OBD_FREE(req, sizeof(*req)); GOTO(out_set, rc = -ENOMEM); } memcpy(req->rq_oi.oi_oa, oinfo->oi_oa, sizeof(*req->rq_oi.oi_oa)); req->rq_oi.oi_oa->o_id = loi->loi_id; req->rq_oi.oi_oa->o_seq = loi->loi_seq; req->rq_oi.oi_oa->o_valid |= OBD_MD_FLGROUP; req->rq_oi.oi_oa->o_stripe_idx = i; req->rq_oi.oi_cb_up = cb_update_punch; req->rq_oi.oi_policy.l_extent.start = rs; req->rq_oi.oi_policy.l_extent.end = re; req->rq_oi.oi_policy.l_extent.gid = -1; req->rq_oi.oi_capa = oinfo->oi_capa; lov_set_add_req(req, set); } if (!set->set_count) GOTO(out_set, rc = -EIO); *reqset = set; RETURN(rc); out_set: lov_fini_punch_set(set); RETURN(rc); } int lov_fini_sync_set(struct lov_request_set *set) { int rc = 0; ENTRY; if (set == NULL) RETURN(0); LASSERT(set->set_exp); if (cfs_atomic_read(&set->set_completes)) { if (!cfs_atomic_read(&set->set_success)) rc = -EIO; /* FIXME update qos data here */ } lov_put_reqset(set); RETURN(rc); } /* The callback for osc_sync that finilizes a request info when a * response is recieved. */ static int cb_sync_update(void *cookie, int rc) { struct obd_info *oinfo = cookie; struct lov_request *lovreq; lovreq = container_of(oinfo, struct lov_request, rq_oi); return lov_update_common_set(lovreq->rq_rqset, lovreq, rc); } int lov_prep_sync_set(struct obd_export *exp, struct obd_info *oinfo, obd_off start, obd_off end, struct lov_request_set **reqset) { struct lov_request_set *set; struct lov_obd *lov = &exp->exp_obd->u.lov; int rc = 0, i; ENTRY; OBD_ALLOC_PTR(set); if (set == NULL) RETURN(-ENOMEM); lov_init_set(set); set->set_exp = exp; set->set_oi = oinfo; for (i = 0; i < oinfo->oi_md->lsm_stripe_count; i++) { struct lov_oinfo *loi = oinfo->oi_md->lsm_oinfo[i]; struct lov_request *req; obd_off rs, re; if (!lov->lov_tgts[loi->loi_ost_idx] || !lov->lov_tgts[loi->loi_ost_idx]->ltd_active) { CDEBUG(D_HA, "lov idx %d inactive\n", loi->loi_ost_idx); continue; } if (!lov_stripe_intersects(oinfo->oi_md, i, start, end, &rs, &re)) continue; OBD_ALLOC_PTR(req); if (req == NULL) GOTO(out_set, rc = -ENOMEM); req->rq_stripe = i; req->rq_idx = loi->loi_ost_idx; OBDO_ALLOC(req->rq_oi.oi_oa); if (req->rq_oi.oi_oa == NULL) { OBD_FREE(req, sizeof(*req)); GOTO(out_set, rc = -ENOMEM); } *req->rq_oi.oi_oa = *oinfo->oi_oa; req->rq_oi.oi_oa->o_id = loi->loi_id; req->rq_oi.oi_oa->o_seq = loi->loi_seq; req->rq_oi.oi_oa->o_stripe_idx = i; req->rq_oi.oi_policy.l_extent.start = rs; req->rq_oi.oi_policy.l_extent.end = re; req->rq_oi.oi_policy.l_extent.gid = -1; req->rq_oi.oi_cb_up = cb_sync_update; lov_set_add_req(req, set); } if (!set->set_count) GOTO(out_set, rc = -EIO); *reqset = set; RETURN(rc); out_set: lov_fini_sync_set(set); RETURN(rc); } #define LOV_U64_MAX ((__u64)~0ULL) #define LOV_SUM_MAX(tot, add) \ do { \ if ((tot) + (add) < (tot)) \ (tot) = LOV_U64_MAX; \ else \ (tot) += (add); \ } while(0) int lov_fini_statfs(struct obd_device *obd, struct obd_statfs *osfs,int success) { ENTRY; if (success) { __u32 expected_stripes = lov_get_stripecnt(&obd->u.lov, LOV_MAGIC, 0); if (osfs->os_files != LOV_U64_MAX) lov_do_div64(osfs->os_files, expected_stripes); if (osfs->os_ffree != LOV_U64_MAX) lov_do_div64(osfs->os_ffree, expected_stripes); spin_lock(&obd->obd_osfs_lock); memcpy(&obd->obd_osfs, osfs, sizeof(*osfs)); obd->obd_osfs_age = cfs_time_current_64(); spin_unlock(&obd->obd_osfs_lock); RETURN(0); } RETURN(-EIO); } int lov_fini_statfs_set(struct lov_request_set *set) { int rc = 0; ENTRY; if (set == NULL) RETURN(0); if (cfs_atomic_read(&set->set_completes)) { rc = lov_fini_statfs(set->set_obd, set->set_oi->oi_osfs, cfs_atomic_read(&set->set_success)); } lov_put_reqset(set); RETURN(rc); } void lov_update_statfs(struct obd_statfs *osfs, struct obd_statfs *lov_sfs, int success) { int shift = 0, quit = 0; __u64 tmp; if (success == 0) { memcpy(osfs, lov_sfs, sizeof(*lov_sfs)); } else { if (osfs->os_bsize != lov_sfs->os_bsize) { /* assume all block sizes are always powers of 2 */ /* get the bits difference */ tmp = osfs->os_bsize | lov_sfs->os_bsize; for (shift = 0; shift <= 64; ++shift) { if (tmp & 1) { if (quit) break; else quit = 1; shift = 0; } tmp >>= 1; } } if (osfs->os_bsize < lov_sfs->os_bsize) { osfs->os_bsize = lov_sfs->os_bsize; osfs->os_bfree >>= shift; osfs->os_bavail >>= shift; osfs->os_blocks >>= shift; } else if (shift != 0) { lov_sfs->os_bfree >>= shift; lov_sfs->os_bavail >>= shift; lov_sfs->os_blocks >>= shift; } #ifdef MIN_DF /* Sandia requested that df (and so, statfs) only returned minimal available space on a single OST, so people would be able to write this much data guaranteed. */ if (osfs->os_bavail > lov_sfs->os_bavail) { /* Presumably if new bavail is smaller, new bfree is bigger as well */ osfs->os_bfree = lov_sfs->os_bfree; osfs->os_bavail = lov_sfs->os_bavail; } #else osfs->os_bfree += lov_sfs->os_bfree; osfs->os_bavail += lov_sfs->os_bavail; #endif osfs->os_blocks += lov_sfs->os_blocks; /* XXX not sure about this one - depends on policy. * - could be minimum if we always stripe on all OBDs * (but that would be wrong for any other policy, * if one of the OBDs has no more objects left) * - could be sum if we stripe whole objects * - could be average, just to give a nice number * * To give a "reasonable" (if not wholly accurate) * number, we divide the total number of free objects * by expected stripe count (watch out for overflow). */ LOV_SUM_MAX(osfs->os_files, lov_sfs->os_files); LOV_SUM_MAX(osfs->os_ffree, lov_sfs->os_ffree); } } /* The callback for osc_statfs_async that finilizes a request info when a * response is received. */ static int cb_statfs_update(void *cookie, int rc) { struct obd_info *oinfo = cookie; struct lov_request *lovreq; struct lov_request_set *set; struct obd_statfs *osfs, *lov_sfs; struct lov_obd *lov; struct lov_tgt_desc *tgt; struct obd_device *lovobd, *tgtobd; int success; ENTRY; lovreq = container_of(oinfo, struct lov_request, rq_oi); set = lovreq->rq_rqset; lovobd = set->set_obd; lov = &lovobd->u.lov; osfs = set->set_oi->oi_osfs; lov_sfs = oinfo->oi_osfs; success = cfs_atomic_read(&set->set_success); /* XXX: the same is done in lov_update_common_set, however lovset->set_exp is not initialized. */ lov_update_set(set, lovreq, rc); if (rc) GOTO(out, rc); obd_getref(lovobd); tgt = lov->lov_tgts[lovreq->rq_idx]; if (!tgt || !tgt->ltd_active) GOTO(out_update, rc); tgtobd = class_exp2obd(tgt->ltd_exp); spin_lock(&tgtobd->obd_osfs_lock); memcpy(&tgtobd->obd_osfs, lov_sfs, sizeof(*lov_sfs)); if ((oinfo->oi_flags & OBD_STATFS_FROM_CACHE) == 0) tgtobd->obd_osfs_age = cfs_time_current_64(); spin_unlock(&tgtobd->obd_osfs_lock); out_update: lov_update_statfs(osfs, lov_sfs, success); obd_putref(lovobd); out: if (set->set_oi->oi_flags & OBD_STATFS_PTLRPCD && lov_set_finished(set, 0)) { lov_statfs_interpret(NULL, set, set->set_count != cfs_atomic_read(&set->set_success)); } RETURN(0); } int lov_prep_statfs_set(struct obd_device *obd, struct obd_info *oinfo, struct lov_request_set **reqset) { struct lov_request_set *set; struct lov_obd *lov = &obd->u.lov; int rc = 0, i; ENTRY; OBD_ALLOC(set, sizeof(*set)); if (set == NULL) RETURN(-ENOMEM); lov_init_set(set); set->set_obd = obd; set->set_oi = oinfo; /* We only get block data from the OBD */ for (i = 0; i < lov->desc.ld_tgt_count; i++) { struct lov_request *req; if (!lov->lov_tgts[i] || (!lov->lov_tgts[i]->ltd_active && (oinfo->oi_flags & OBD_STATFS_NODELAY))) { CDEBUG(D_HA, "lov idx %d inactive\n", i); continue; } /* skip targets that have been explicitely disabled by the * administrator */ if (!lov->lov_tgts[i]->ltd_exp) { CDEBUG(D_HA, "lov idx %d administratively disabled\n", i); continue; } OBD_ALLOC(req, sizeof(*req)); if (req == NULL) GOTO(out_set, rc = -ENOMEM); OBD_ALLOC(req->rq_oi.oi_osfs, sizeof(*req->rq_oi.oi_osfs)); if (req->rq_oi.oi_osfs == NULL) { OBD_FREE(req, sizeof(*req)); GOTO(out_set, rc = -ENOMEM); } req->rq_idx = i; req->rq_oi.oi_cb_up = cb_statfs_update; req->rq_oi.oi_flags = oinfo->oi_flags; lov_set_add_req(req, set); } if (!set->set_count) GOTO(out_set, rc = -EIO); *reqset = set; RETURN(rc); out_set: lov_fini_statfs_set(set); RETURN(rc); }
dmlb2000/lustre-release
lustre/lov/lov_request.c
C
gpl-2.0
51,766
<?php /** * Fabrik List Template: Advanced Search * * @package Joomla * @subpackage Fabrik * @copyright Copyright (C) 2005-2015 fabrikar.com - All rights reserved. * @license GNU/GPL http://www.gnu.org/copyleft/gpl.html */ // No direct access defined('_JEXEC') or die('Restricted access'); // Check to ensure this file is included in Joomla! defined('_JEXEC') or die(); $app = JFactory::getApplication(); $input = $app->input; ?> <form method="post" action="<?php echo $this->action?>" class="advancedSeach_<?php echo $this->listref?>"> <a class="addbutton advanced-search-add btn-success btn" href="#"> <?php echo FabrikHelperHTML::image('plus.png', 'list', $this->tmpl);?> <?php echo FText::_('COM_FABRIK_ADD')?> </a> <div id="advancedSearchContainer"> <table class="advanced-search-list table table-striped table-condensed"> <tbody> <?php foreach ($this->rows as $row) :?> <tr> <td><span><?php echo $row['join'];?></span></td> <td><?php echo $row['element'] . $row['type'] . $row['grouped'];?> </td> <td><?php echo $row['condition'];?></td> <td class='filtervalue'><?php echo $row['filter'];?></td> <td> <?php if (FabrikWorker::j3()) : ?> <div class="button-group"> <a class="advanced-search-remove-row btn btn-danger" href="#"> <?php echo FabrikHelperHTML::image('minus.png', 'list', $this->tmpl);?> </a> </div> <?php else: ?> <ul class="fabrik_action"> <li> <a class="advanced-search-remove-row" href="#"> <?php echo FabrikHelperHTML::image('minus-sign.png', 'list', $this->tmpl);?> </a> </li> </ul> <?php endif;?> </td> </tr> <?php endforeach;?> </tbody> <thead> <tr class="fabrik___heading title"> <th></th> <th><?php echo FText::_('COM_FABRIK_ELEMENT')?></th> <th><?php echo FText::_('COM_FABRIK_CONDITION')?></th> <th><?php echo FText::_('COM_FABRIK_VALUE')?></th> <th><?php echo FText::_('COM_FABRIK_DELETE')?></th> </tr> </thead> </table> </div> <input type="submit" value="<?php echo FText::_('COM_FABRIK_APPLY')?>" class="button btn btn-primary fabrikFilter advanced-search-apply" name="applyAdvFabrikFilter" type="button"> <input value="<?php echo FText::_('COM_FABRIK_CLEAR')?>" class="button btn advanced-search-clearall" type="button"> <input type="hidden" name="advanced-search" value="1" /> <input type="hidden" name="<?php echo $input->get('tkn', 'request')?>" value="1" /> <?php $scope = $input->get('scope', 'com_fabrik'); if ($scope == 'com_fabrik') :?> <input type="hidden" name="option" value="<?php echo $input->get('option')?>" /> <input type="hidden" name="view" value="<?php echo $input->get('nextview', 'list'); ?>" /> <input type="hidden" name="listid" value="<?php echo $this->listid?>" /> <input type="hidden" name="task" value="<?php echo $input->get('nextview', 'list'); ?>.filter" /> <?php endif; ?> </form>
LGBGit/tierno
components/com_fabrik/views/list/tmpl/_advancedsearch.php
PHP
gpl-2.0
2,960
// -*- C++ -*- //============================================================================================== // // This file is part of LiDIA --- a library for computational number theory // // Copyright (c) 1994--2001 the LiDIA Group. All rights reserved. // // See http://www.informatik.tu-darmstadt.de/TI/LiDIA/ // //---------------------------------------------------------------------------------------------- // // $Id$ // // Author : Thomas Papanikolaou (TP) // Changes : See CVS log // //============================================================================================== #ifndef LIDIA_BIGCOMPLEX_H_GUARD_ #define LIDIA_BIGCOMPLEX_H_GUARD_ #ifndef LIDIA_BIGFLOAT_H_GUARD_ # include "LiDIA/bigfloat.h" #endif #ifdef LIDIA_NAMESPACE namespace LiDIA { # define IN_NAMESPACE_LIDIA #endif class bigcomplex { // // the C++ type we use to represent a bigcomplex // bigfloat re; bigfloat im; public: // // c'tors and d'tor // bigcomplex(); bigcomplex(const bigfloat &); bigcomplex(const bigfloat &, const bigfloat &); bigcomplex(const bigcomplex &); ~bigcomplex(); #ifndef HEADBANGER // // accessors // const bigfloat & real() const; const bigfloat & imag() const; // // assigners // void assign_zero(); void assign_one(); void assign(const bigfloat & x); void assign(const bigfloat & x, const bigfloat & y); void assign(const bigcomplex & x); void assign_real(const bigfloat & x); void assign_imag(const bigfloat & y); bigcomplex & operator = (const bigfloat & y); bigcomplex & operator = (const bigcomplex & y); // // comparators // bool is_equal(const bigcomplex & a) const; bool is_equal(const bigfloat & a) const; //bool is_approx_equal (const bigcomplex & a) const; //bool is_approx_equal (const bigfloat & a) const; bool is_zero() const; bool is_approx_zero() const; bool is_one() const; //bool is_approx_one() const; bool is_real() const; bool is_approx_real() const; bool is_imaginary() const; bool is_approx_imaginary() const; void negate(); void invert(); // // modifiers // void swap(bigcomplex & x); static bigint characteristic(); // // Precision and rounding mode setting // static void set_precision(long l); static void set_mode(int l); // // Procedural versions // friend void negate(bigcomplex & x, const bigcomplex & y); friend void add(bigcomplex & x, const bigcomplex & y, const bigcomplex & z); friend void add(bigcomplex & x, const bigcomplex & y, const bigfloat & z); friend void add(bigcomplex & x, const bigfloat & y, const bigcomplex & z); friend void subtract(bigcomplex & x, const bigcomplex & y, const bigcomplex & z); friend void subtract(bigcomplex & x, const bigcomplex & y, const bigfloat & z); friend void subtract(bigcomplex & x, const bigfloat & y, const bigcomplex & z); friend void multiply(bigcomplex & x, const bigcomplex & y, const bigcomplex & z); friend void multiply(bigcomplex & x, const bigcomplex & y, const bigfloat & z); friend void multiply(bigcomplex & x, const bigfloat & y, const bigcomplex & z); friend void square(bigcomplex & x, const bigcomplex & z); friend void divide(bigcomplex & x, const bigcomplex & y, const bigcomplex & z); friend void divide(bigcomplex & x, const bigcomplex & y, const bigfloat & z); friend void divide(bigcomplex & x, const bigfloat & y, const bigcomplex & z); // // Functions // friend void conj(bigcomplex & y, const bigcomplex & x); friend void polar(bigcomplex & y, const bigfloat & r, const bigfloat & t); friend void sin(bigcomplex & y, const bigcomplex & x); friend void cos(bigcomplex & y, const bigcomplex & x); friend void sinh(bigcomplex & y, const bigcomplex & x); friend void cosh(bigcomplex & y, const bigcomplex & x); friend void sqrt(bigcomplex & y, const bigcomplex & x); friend void exp(bigcomplex & y, const bigcomplex & x); friend void log(bigcomplex & y, const bigcomplex & x); friend void power(bigcomplex & y, const bigcomplex & x, const bigcomplex & p); friend void power(bigcomplex & y, const bigcomplex & x, const bigfloat & p); friend void invert(bigcomplex & x, const bigcomplex & z); #endif // HEADBANGER // // Input/Output // friend std::istream & operator >> (std::istream & s, bigcomplex & x); friend std::ostream & operator << (std::ostream & s, const bigcomplex & x); }; // // Constructors and destructor // inline bigcomplex::bigcomplex () { // nothing to do } inline bigcomplex::bigcomplex (const bigcomplex & y) : re(y.re), im(y.im) { // nothing to do } inline bigcomplex::bigcomplex (const bigfloat & y) : re(y) { im.assign_exact_zero(); } inline bigcomplex::bigcomplex (const bigfloat & r, const bigfloat & i) : re(r), im(i) { // nothing to do } inline bigcomplex::~bigcomplex () { // nothing to do } // // accessors // inline const bigfloat & bigcomplex::real () const { return re; } inline const bigfloat & bigcomplex::imag () const { return im; } inline const bigfloat & real (const bigcomplex & x) { return x.real(); } inline const bigfloat & imag (const bigcomplex & x) { return x.imag(); } // // assigners // inline void bigcomplex::assign_zero () { re.assign_zero(); im.assign_zero(); } inline void bigcomplex::assign_one () { re.assign_one(); im.assign_zero(); } inline void bigcomplex::assign (const bigfloat & x) { re.assign(x); im.assign_zero(); } inline void bigcomplex::assign (const bigfloat & x, const bigfloat & y) { re.assign(x); im.assign(y); } inline void bigcomplex::assign (const bigcomplex & x) { if (&x != this) { re.assign(x.re); im.assign(x.im); } } inline void bigcomplex::assign_real (const bigfloat & x) { re.assign(x); } inline void bigcomplex::assign_imag (const bigfloat & y) { im.assign(y); } inline bigcomplex & bigcomplex::operator = (const bigfloat & y) { assign(y); return *this; } inline bigcomplex & bigcomplex::operator = (const bigcomplex & y) { assign(y); return *this; } // // comparators // inline bool bigcomplex::is_equal (const bigcomplex & a) const { return (&a == this || (re.compare(a.re) == 0 && im.compare(a.im) == 0)); } inline bool bigcomplex::is_equal (const bigfloat & a) const { return (re.compare(a) == 0 && im.is_zero()); } inline bool is_equal (const bigcomplex & a, const bigcomplex & b) { return a.is_equal(b); } inline bool is_equal (const bigcomplex & a, const bigfloat & b) { return a.is_equal(b); } inline bool is_equal (const bigfloat & a, const bigcomplex & b) { return b.is_equal(a); } inline bool bigcomplex::is_zero () const { return (re.is_zero() && im.is_zero()); } inline bool bigcomplex::is_approx_zero () const { return (re.is_approx_zero() && im.is_approx_zero()); } inline bool bigcomplex::is_one () const { return (re.is_one() && im.is_zero()); } inline bool operator == (const bigcomplex & x, const bigcomplex & y) { return x.is_equal(y); } inline bool operator == (const bigcomplex & x, const bigfloat & y) { return x.is_equal(y); } inline bool operator == (const bigfloat & x, const bigcomplex & y) { return y.is_equal(x); } inline bool operator != (const bigcomplex & x, const bigcomplex & y) { return !x.is_equal(y); } inline bool operator != (const bigcomplex & x, const bigfloat & y) { return !x.is_equal(y); } inline bool operator != (const bigfloat & x, const bigcomplex & y) { return !y.is_equal(x); } // // predicates // inline bool bigcomplex::is_real () const { return (im.is_zero()); } inline bool bigcomplex::is_approx_real () const { return (im.is_approx_zero()); } inline bool bigcomplex::is_imaginary () const { return (re.is_zero()); } inline bool bigcomplex::is_approx_imaginary () const { return (re.is_approx_zero()); } inline bool is_bigfloat (const bigcomplex & a) { return (a.imag().is_zero()); } // // modifiers // inline void bigcomplex::negate () { re.negate(); im.negate(); } inline void bigcomplex::swap (bigcomplex & x) { re.swap(x.re); im.swap(x.im); } inline void swap (bigcomplex & x, bigcomplex & y) { x.swap(y); } // // class modifiers // inline void bigcomplex::set_precision (long l) { bigfloat::set_precision(l); } inline void bigcomplex::set_mode (int l) { bigfloat::set_mode(l); } // // procedural arithmetic // // (cr, ci) = (xr, xi) + (yr, yi) = (xr+yr, xi+yi) inline void add (bigcomplex & c, const bigcomplex & x, const bigcomplex & y) { add(c.re, x.re, y.re); add(c.im, x.im, y.im); } inline void add (bigcomplex & c, const bigfloat & x, const bigcomplex & y) { add(c.re, x, y.re); c.im.assign(y.im); } // (cr, ci) = (xr, xi) + y = (xr+y, xi) inline void add (bigcomplex & c, const bigcomplex & x, const bigfloat & y) { add(c.re, x.re, y); c.im.assign(x.im); } // (cr, ci) = (xr, xi) - (yr, yi) = (xr-yr, xi-yi) inline void subtract (bigcomplex & c, const bigcomplex & x, const bigcomplex & y) { subtract(c.re, x.re, y.re); subtract(c.im, x.im, y.im); } // (cr, ci) = (xr, xi) - y = (xr-y, xi) inline void subtract (bigcomplex & c, const bigcomplex & x, const bigfloat & y) { subtract(c.re, x.re, y); c.im.assign(x.im); } inline void subtract (bigcomplex & c, const bigfloat & x, const bigcomplex & y) { subtract(c.re, y.re, x); c.re.negate(); c.im.assign(y.im); c.im.negate(); } void multiply(bigcomplex & x, const bigcomplex & y, const bigcomplex & z); // (cr, ci) = (xr, xi) * y = (xr*y, xi*y) inline void multiply (bigcomplex & c, const bigcomplex & x, const bigfloat & y) { multiply(c.re, x.re, y); multiply(c.im, x.im, y); } inline void multiply (bigcomplex & c, const bigfloat & x, const bigcomplex & y) { multiply(c.re, y.re, x); multiply(c.im, y.im, x); } void square(bigcomplex & x, const bigcomplex & z); void divide(bigcomplex & x, const bigcomplex & y, const bigcomplex & z); // (cr, ci) = (xr, xi) / y = (xr/y, xi/y) inline void divide (bigcomplex & c, const bigcomplex & x, const bigfloat & y) { if (y.is_zero()) { lidia_error_handler("bigcomplex", "operator/3::division by zero."); return; } divide(c.re, x.re, y); divide(c.im, x.im, y); } // // arithmetic operators // inline bigcomplex operator - (const bigcomplex & x) { bigcomplex c(x); c.negate(); return c; } inline bigcomplex operator + (const bigcomplex & x, const bigcomplex & y) { bigcomplex c; add(c, x, y); return c; } inline bigcomplex operator + (const bigcomplex & x, const bigfloat & y) { bigcomplex c; add(c, x, y); return c; } inline bigcomplex operator + (const bigfloat & x, const bigcomplex & y) { bigcomplex c; add(c, x, y); return c; } inline bigcomplex operator - (const bigcomplex & x, const bigcomplex & y) { bigcomplex c; subtract(c, x, y); return c; } inline bigcomplex operator - (const bigcomplex & x, const bigfloat & y) { bigcomplex c; subtract(c, x, y); return c; } inline bigcomplex operator - (const bigfloat & x, const bigcomplex & y) { bigcomplex c; subtract(c, x, y); return c; } inline bigcomplex operator * (const bigcomplex & x, const bigcomplex & y) { bigcomplex c; multiply(c, x, y); return c; } inline bigcomplex operator * (const bigcomplex & x, const bigfloat & y) { bigcomplex c; multiply(c, x, y); return c; } inline bigcomplex operator * (const bigfloat & x, const bigcomplex & y) { bigcomplex c; multiply(c, x, y); return c; } inline bigcomplex operator / (const bigcomplex & x, const bigcomplex & y) { bigcomplex c; divide(c, x, y); return c; } inline bigcomplex operator / (const bigcomplex & x, const bigfloat & y) { bigcomplex c; divide(c, x, y); return c; } inline bigcomplex operator / (const bigfloat & x, const bigcomplex & y) { bigcomplex c; divide(c, x, y); return c; } inline bigcomplex & operator += (bigcomplex & x, const bigcomplex & y) { add(x, x, y); return x; } inline bigcomplex & operator += (bigcomplex & x, const bigfloat & y) { add(x, x, y); return x; } inline bigcomplex & operator -= (bigcomplex & x, const bigcomplex & y) { subtract(x, x, y); return x; } inline bigcomplex & operator -= (bigcomplex & x, const bigfloat & y) { subtract(x, x, y); return x; } inline bigcomplex & operator *= (bigcomplex & x, const bigcomplex & y) { multiply(x, x, y); return x; } inline bigcomplex & operator *= (bigcomplex & x, const bigfloat & y) { multiply(x, x, y); return x; } inline bigcomplex & operator /= (bigcomplex & x, const bigcomplex & y) { divide(x, x, y); return x; } inline bigcomplex & operator /= (bigcomplex & x, const bigfloat & y) { divide(x, x, y); return x; } // // misc. functions and procedures // // (cr, ci) = (-xr, -xi) inline void negate (bigcomplex & c, const bigcomplex & x) { LiDIA::negate(c.re, x.re); LiDIA::negate(c.im, x.im); } inline void invert (bigcomplex & c, const bigcomplex & y) { c.assign(y); c.invert(); } inline bigfloat arg (const bigcomplex & x) { bigfloat c; atan2(c, x.imag(), x.real()); return c; } // (cr, ci) = ~(xr, xi) = (xr, -xi) inline void conj (bigcomplex & c, const bigcomplex & x) { c.assign(x); c.im.negate(); } inline bigcomplex conj (const bigcomplex & x) { bigcomplex c; conj(c, x); return c; } // (cr, ci) = (r * cos(t), r * sin(t)) inline void polar (bigcomplex & c, const bigfloat & r, const bigfloat & t) { bigfloat tmp; cos(tmp, t); multiply(c.re, r, tmp); sin(tmp, t); multiply(c.im, r, tmp); } inline bigcomplex polar (const bigfloat & r, const bigfloat & t) { bigcomplex c; polar(c, r, t); return c; } void sqrt(bigcomplex & y, const bigcomplex & x); inline bigcomplex sqrt (const bigcomplex & x) { bigcomplex c; sqrt(c, x); return c; } void exp(bigcomplex & y, const bigcomplex & x); void log(bigcomplex & y, const bigcomplex & x); inline bigcomplex exp (const bigcomplex & x) { bigcomplex c; exp(c, x); return c; } inline bigcomplex log (const bigcomplex & x) { bigcomplex c; log(c, x); return c; } void power(bigcomplex & y, const bigcomplex & x, const bigcomplex & p); void power(bigcomplex & y, const bigcomplex & x, const bigfloat & p); inline bigcomplex power (const bigcomplex & x, const bigcomplex & p) { bigcomplex c; power(c, x, p); return c; } inline bigcomplex power (const bigcomplex & x, const bigfloat & p) { bigcomplex c; power(c, x, p); return c; } inline bigcomplex inverse (const bigcomplex & x) { bigcomplex c; invert(c, x); return c; } inline bigcomplex square (const bigcomplex & x) { bigcomplex c; square(c, x); return c; } inline bigfloat abs (const bigcomplex & x) { bigfloat c, tmp; square(c, x.real()); square(tmp, x.imag()); add(c, c, tmp); sqrt(c, c); return c; } inline bigfloat norm (const bigcomplex & x) { bigfloat c, tmp; square(c, x.real()); square(tmp, x.imag()); add(c, c, tmp); return c; } inline bigfloat hypot (const bigcomplex & x) { bigfloat c, tmp; square(c, x.real()); square(tmp, x.imag()); add(c, c, tmp); sqrt(c, c); return c; } // // trigonometric functions // void sin(bigcomplex & y, const bigcomplex & x); void cos(bigcomplex & y, const bigcomplex & x); inline bigcomplex sin (const bigcomplex& x) { bigcomplex c; sin(c, x); return c; } inline bigcomplex cos (const bigcomplex& x) { bigcomplex c; cos(c, x); return c; } // // hyperbolic functions // void sinh(bigcomplex & y, const bigcomplex & x); void cosh(bigcomplex & y, const bigcomplex & x); inline bigcomplex sinh (const bigcomplex& x) { bigcomplex c; sinh(c, x); return c; } inline bigcomplex cosh (const bigcomplex& x) { bigcomplex c; cosh(c, x); return c; } // // Input/Output // std::istream & operator >> (std::istream & s, bigcomplex & x); std::ostream & operator << (std::ostream & s, const bigcomplex & x); // // some properties of C // inline bigint bigcomplex::characteristic () { return 0UL; } #ifdef LIDIA_NAMESPACE } // end of namespace LiDIA # undef IN_NAMESPACE_LIDIA #endif #define LIDIA_CLASS_BIGCOMPLEX #include "LiDIA/specialization/bigcomplex.special" #endif // LIDIA_BIGCOMPLEX_H_GUARD_
smanikar/primality-testing
src/aks-lidia/lidia-2.3.0/src/base/include/LiDIA/bigcomplex.h
C
gpl-2.0
16,109
// Copyright 2014 Rafael Dantas Justo. All rights reserved. // Use of this source code is governed by a GPL // license that can be found in the LICENSE file. // Package handler store the REST handlers of specific URI package handler import ( "github.com/rafaeljusto/shelter/Godeps/_workspace/src/github.com/rafaeljusto/handy" "github.com/rafaeljusto/shelter/Godeps/_workspace/src/gopkg.in/mgo.v2" "github.com/rafaeljusto/shelter/dao" "github.com/rafaeljusto/shelter/log" "github.com/rafaeljusto/shelter/model" "github.com/rafaeljusto/shelter/net/http/rest/interceptor" "github.com/rafaeljusto/shelter/net/http/rest/messages" "github.com/rafaeljusto/shelter/net/http/rest/protocol" "net/http" "strconv" "strings" "time" ) func init() { HandleFunc("/domain/{fqdn}", func() handy.Handler { return new(DomainHandler) }) } // DomainHandler is responsable for keeping the state of a /domain/{fqdn} resource type DomainHandler struct { handy.DefaultHandler // Inject the HTTP methods that this resource does not implement database *mgo.Database // Database connection of the MongoDB session databaseSession *mgo.Session // MongoDB session domain model.Domain // Domain object related to the resource language *messages.LanguagePack // User preferred language based on HTTP header FQDN string `param:"fqdn"` // FQDN defined in the URI Request protocol.DomainRequest `request:"put"` // Domain request sent by the user Response *protocol.DomainResponse `response:"get"` // Domain response sent back to the user Message *protocol.MessageResponse `error` // Message on error sent to the user } func (h *DomainHandler) SetDatabaseSession(session *mgo.Session) { h.databaseSession = session } func (h *DomainHandler) GetDatabaseSession() *mgo.Session { return h.databaseSession } func (h *DomainHandler) SetDatabase(database *mgo.Database) { h.database = database } func (h *DomainHandler) GetDatabase() *mgo.Database { return h.database } func (h *DomainHandler) SetFQDN(fqdn string) { h.FQDN = fqdn } func (h *DomainHandler) GetFQDN() string { return h.FQDN } func (h *DomainHandler) SetDomain(domain model.Domain) { h.domain = domain } func (h *DomainHandler) GetLastModifiedAt() time.Time { return h.domain.LastModifiedAt } func (h *DomainHandler) GetETag() string { return strconv.Itoa(h.domain.Revision) } func (h *DomainHandler) SetLanguage(language *messages.LanguagePack) { h.language = language } func (h *DomainHandler) GetLanguage() *messages.LanguagePack { return h.language } func (h *DomainHandler) MessageResponse(messageId string, roid string) error { var err error h.Message, err = protocol.NewMessageResponse(messageId, roid, h.language) return err } func (h *DomainHandler) ClearResponse() { h.Response = nil } func (h *DomainHandler) Get(w http.ResponseWriter, r *http.Request) { h.retrieveDomain(w, r) } func (h *DomainHandler) Head(w http.ResponseWriter, r *http.Request) { h.retrieveDomain(w, r) } // The HEAD method is identical to GET except that the server MUST NOT return a message- // body in the response. But now the responsability for don't adding the body is from the // mux while writing the response func (h *DomainHandler) retrieveDomain(w http.ResponseWriter, r *http.Request) { w.Header().Add("ETag", h.GetETag()) w.Header().Add("Last-Modified", h.GetLastModifiedAt().Format(time.RFC1123)) w.WriteHeader(http.StatusOK) domainResponse := protocol.ToDomainResponse(h.domain, true) h.Response = &domainResponse } func (h *DomainHandler) Put(w http.ResponseWriter, r *http.Request) { // We need to set the FQDN in the domain request object because it is sent only in the // URI and not in the domain request body to avoid information redudancy h.Request.FQDN = h.GetFQDN() var err error if h.domain, err = protocol.Merge(h.domain, h.Request); err != nil { messageId := "" switch err { case model.ErrInvalidFQDN: messageId = "invalid-fqdn" case protocol.ErrInvalidDNSKEY: messageId = "invalid-dnskey" case protocol.ErrInvalidDSAlgorithm: messageId = "invalid-ds-algorithm" case protocol.ErrInvalidDSDigestType: messageId = "invalid-ds-digest-type" case protocol.ErrInvalidIP: messageId = "invalid-ip" case protocol.ErrInvalidLanguage: messageId = "invalid-language" } if len(messageId) == 0 { log.Println("Error while merging domain objects for create or "+ "update operation. Details:", err) w.WriteHeader(http.StatusInternalServerError) } else { if err := h.MessageResponse(messageId, r.URL.RequestURI()); err == nil { w.WriteHeader(http.StatusBadRequest) } else { log.Println("Error while writing response. Details:", err) w.WriteHeader(http.StatusInternalServerError) } } return } domainDAO := dao.DomainDAO{ Database: h.GetDatabase(), } if err := domainDAO.Save(&h.domain); err != nil { if strings.Index(err.Error(), "duplicate key error index") != -1 { if err := h.MessageResponse("conflict", r.URL.RequestURI()); err == nil { w.WriteHeader(http.StatusConflict) } else { log.Println("Error while writing response. Details:", err) w.WriteHeader(http.StatusInternalServerError) } } else { log.Println("Error while saving domain object for create or "+ "update operation. Details:", err) w.WriteHeader(http.StatusInternalServerError) } return } w.Header().Add("ETag", h.GetETag()) w.Header().Add("Last-Modified", h.GetLastModifiedAt().Format(time.RFC1123)) if h.domain.Revision == 1 { w.Header().Add("Location", "/domain/"+h.domain.FQDN) w.WriteHeader(http.StatusCreated) } else { w.WriteHeader(http.StatusNoContent) } } func (h *DomainHandler) Delete(w http.ResponseWriter, r *http.Request) { domainDAO := dao.DomainDAO{ Database: h.GetDatabase(), } if err := domainDAO.Remove(&h.domain); err != nil { log.Println("Error while removing domain object. Details:", err) w.WriteHeader(http.StatusInternalServerError) return } w.WriteHeader(http.StatusNoContent) } func (h *DomainHandler) Interceptors() handy.InterceptorChain { return handy.NewInterceptorChain(). Chain(new(interceptor.Permission)). Chain(interceptor.NewFQDN(h)). Chain(interceptor.NewValidator(h)). Chain(interceptor.NewDatabase(h)). Chain(interceptor.NewDomain(h)). Chain(interceptor.NewHTTPCacheBefore(h)). Chain(interceptor.NewJSONCodec(h)) }
rafaeljusto/shelter
net/http/rest/handler/domain.go
GO
gpl-2.0
6,583
<?php /** * @package EasyDiscuss * @copyright Copyright (C) 2010 - 2015 Stack Ideas Sdn Bhd. All rights reserved. * @license GNU/GPL, see LICENSE.php * EasyDiscuss is free software. This version may have been modified pursuant * to the GNU General Public License, and as distributed it includes or * is derivative of works licensed under the GNU General Public License or * other free or open source software licenses. * See COPYRIGHT.php for copyright notices and details. */ defined('_JEXEC') or die('Unauthorized Access'); ?> <div class="o-col o-col--8"> <div class="ed-post-reply-bar__sort-action pull-right"> <ul class="o-tabs o-tabs--ed"> <?php if ($this->config->get('main_likes_replies')) { ?> <li class="<?php echo ($sort == 'likes') ? 'active' : '';?> sortItem o-tabs__item "> <a class="o-tabs__link" href="<?php echo EDR::_('view=post&id=' . $post->id . '&sort=likes'); ?>#filter-sort"> <?php echo JText::_('COM_EASYDISCUSS_SORT_LIKED_MOST'); ?> </a> </li> <?php } ?> <?php if ($this->config->get('main_allowvote')) { ?> <li class="<?php echo ($sort == 'voted') ? 'active' : '';?> sortItem o-tabs__item "> <a class="o-tabs__link" href="<?php echo EDR::_('view=post&id=' . $post->id . '&sort=voted'); ?>#filter-sort"> <?php echo JText::_('COM_EASYDISCUSS_SORT_HIGHEST_VOTE'); ?> </a> </li> <?php } ?> <li class="<?php echo ($sort == 'latest') ? 'active' : '';?> sortItem o-tabs__item "> <a class="o-tabs__link" href="<?php echo EDR::_('view=post&id=' . $post->id . '&sort=latest'); ?>#filter-sort"> <?php echo JText::_('COM_EASYDISCUSS_SORT_LATEST'); ?> </a> </li> <li class="<?php echo (!$sort || $sort == 'oldest' || $sort == 'replylatest') ? 'active' : '';?> sortItem o-tabs__item "> <a class="o-tabs__link" href="<?php echo EDR::_('view=post&id=' . $post->id . '&sort=oldest'); ?>#filter-sort"> <?php echo JText::_('COM_EASYDISCUSS_SORT_OLDEST'); ?> </a> </li> </ul> </div> </div>
quanghung0404/it2tech
components/com_easydiscuss/themes/wireframe/post/default.replies.filters.php
PHP
gpl-2.0
2,328
package ntut.csie.ezScrum.web.control; import java.io.IOException; import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Date; import junit.framework.TestCase; import ntut.csie.ezScrum.iteration.core.ISprintPlanDesc; import ntut.csie.ezScrum.test.CreateData.CopyProject; import ntut.csie.ezScrum.test.CreateData.CreateProject; import ntut.csie.ezScrum.test.CreateData.CreateSprint; import ntut.csie.ezScrum.test.CreateData.InitialSQL; import ntut.csie.ezScrum.test.CreateData.ezScrumInfoConfig; import ntut.csie.ezScrum.web.form.IterationPlanForm; import ntut.csie.ezScrum.web.helper.SprintPlanHelper; public class SprintPlanHelperTest extends TestCase { private SprintPlanHelper helper; private CreateProject CP; private CreateSprint CS; private int ProjectCount = 1; private int SprintCount = 3; private ezScrumInfoConfig config = new ezScrumInfoConfig(); public SprintPlanHelperTest(String testMethod) { super(testMethod); } protected void setUp() throws Exception { InitialSQL ini = new InitialSQL(config); ini.exe(); // 初始化 SQL this.CP = new CreateProject(this.ProjectCount); this.CP.exeCreate(); this.CS = new CreateSprint(this.SprintCount, this.CP); this.CS.exe(); } protected void tearDown() throws IOException, Exception { InitialSQL ini = new InitialSQL(config); ini.exe(); // 初始化 SQL CopyProject copyProject = new CopyProject(this.CP); copyProject.exeDelete_Project(); // 刪除測試檔案 } // public void testcurrentSprintID() { // this.helper = new SprintPlanHelper(this.CP.getIProjectList().get(0)); // // int cur = this.SprintCount/2 + 1; // 當下的 sprint 為所有新建 sprints 的中間值 // // assertEquals(cur, this.helper.currentSprintID()); // } // // public void testloadPlans() { // this.helper = new SprintPlanHelper(this.CP.getIProjectList().get(0)); // ISprintPlanDesc[] SprintPlans = this.helper.loadPlans(); // assertEquals(this.CS.getSprintCount(), SprintPlans.length); // // for (int i=0 ; i<SprintPlans.length ; i++) { // assertEquals(this.CS.getDefault_SPRINT_GOAL(i+1), SprintPlans[i].getGoal()); // assertEquals("2", SprintPlans[i].getInterval()); // assertEquals("2", SprintPlans[i].getMemberNumber()); // assertEquals("10", SprintPlans[i].getAvailableDays()); // assertEquals("100", SprintPlans[i].getFocusFactor()); // assertEquals("LAB 1321", SprintPlans[i].getDemoPlace()); // } // } // // public void testloadListPlans() { // this.helper = new SprintPlanHelper(this.CP.getIProjectList().get(0)); // List<ISprintPlanDesc> SprintPlans = this.helper.loadListPlans(); // assertEquals(this.CS.getSprintCount(), SprintPlans.size()); // // for (int i=0 ; i<SprintPlans.size() ; i++) { // assertEquals(this.CS.getDefault_SPRINT_GOAL(i+1), SprintPlans.get(i).getGoal()); // assertEquals("2", SprintPlans.get(i).getInterval()); // assertEquals("2", SprintPlans.get(i).getMemberNumber()); // assertEquals("10", SprintPlans.get(i).getAvailableDays()); // assertEquals("100", SprintPlans.get(i).getFocusFactor()); // assertEquals("LAB 1321", SprintPlans.get(i).getDemoPlace()); // } // } // // public void testloadPlan() { // this.helper = new SprintPlanHelper(this.CP.getIProjectList().get(0)); // ISprintPlanDesc SprintPlan = this.helper.loadPlan("1"); // // assertEquals(this.CS.getDefault_SPRINT_GOAL(1), SprintPlan.getGoal()); // assertEquals("2", SprintPlan.getInterval()); // assertEquals("2", SprintPlan.getMemberNumber()); // assertEquals("10", SprintPlan.getAvailableDays()); // assertEquals("100", SprintPlan.getFocusFactor()); // assertEquals("LAB 1321", SprintPlan.getDemoPlace()); // // // 除錯,測試輸入不存在的 sprintID,會回傳 new SprintPlanDesc // ISprintPlanDesc nullSprintPlan = this.helper.loadPlan("1000"); // assertEquals("-1", nullSprintPlan.getID()); // assertEquals(null, nullSprintPlan.getGoal()); // ========== 程式設計此欄為 null ========= // assertEquals("", nullSprintPlan.getInterval()); // assertEquals("0", nullSprintPlan.getMemberNumber()); // assertEquals("0", nullSprintPlan.getAvailableDays()); // assertEquals("", nullSprintPlan.getFocusFactor()); // assertEquals("", nullSprintPlan.getDemoPlace()); // assertEquals("", nullSprintPlan.getDemoDate()); // assertEquals("", nullSprintPlan.getStartDate()); // assertEquals("", nullSprintPlan.getEndDate()); // assertEquals("", nullSprintPlan.getNotes()); // assertEquals("", nullSprintPlan.getNumber()); // // ISprintPlanDesc nullSprintPlan2 = this.helper.loadPlan("XXX"); // assertEquals("-1", nullSprintPlan2.getID()); // assertEquals(null, nullSprintPlan.getGoal()); // ========== 程式設計此欄為 null ========= // assertEquals("", nullSprintPlan2.getInterval()); // assertEquals("0", nullSprintPlan2.getMemberNumber()); // assertEquals("0", nullSprintPlan2.getAvailableDays()); // assertEquals("", nullSprintPlan2.getFocusFactor()); // assertEquals("", nullSprintPlan2.getDemoPlace()); // assertEquals("", nullSprintPlan2.getDemoDate()); // assertEquals("", nullSprintPlan2.getStartDate()); // assertEquals("", nullSprintPlan2.getEndDate()); // assertEquals("", nullSprintPlan2.getNotes()); // assertEquals("", nullSprintPlan2.getNumber()); // } // // public void testloadCurrentPlan() throws Exception { // this.helper = new SprintPlanHelper(this.CP.getIProjectList().get(0)); // int cur = this.SprintCount/2 + 1; // 當下的 sprint 為所有新建 sprints 的中間值 // // ISprintPlanDesc SprintPlan = this.helper.loadCurrentPlan(); // assertEquals(this.CS.getDefault_SPRINT_GOAL(cur), SprintPlan.getGoal()); // assertEquals("2", SprintPlan.getInterval()); // assertEquals("2", SprintPlan.getMemberNumber()); // assertEquals("10", SprintPlan.getAvailableDays()); // assertEquals("100", SprintPlan.getFocusFactor()); // assertEquals("LAB 1321", SprintPlan.getDemoPlace()); // // // // 清空 sprint plan // InitialSQL ini = new InitialSQL(ezScrumInfo); // ini.exe(); // 初始化 SQL // // CopyProject copyProject = new CopyProject(this.CP); // copyProject.exeDelete_Project(); // 刪除測試檔案 // // this.CP = new CreateProject(this.ProjectCount); // this.CP.exe(); // // // 除錯,當沒有產生任何 sprint // this.helper = new SprintPlanHelper(this.CP.getIProjectList().get(0)); // ISprintPlanDesc nullSprintPlan = this.helper.loadCurrentPlan(); // assertEquals(null, nullSprintPlan); // // // 還有輸入一筆 SprintPlans,但是今天日期不為其中一 SprintPlan 的測試未寫 // } // // public void testgetNextDemoDate() { // // !! 超級複雜 !! // // // } // // public void testloadPlan_int() { // this.helper = new SprintPlanHelper(this.CP.getIProjectList().get(0)); // ISprintPlanDesc SprintPlan = this.helper.loadPlan(1); // 參數為數字 // // assertEquals(this.CS.getDefault_SPRINT_GOAL(1), SprintPlan.getGoal()); // assertEquals("2", SprintPlan.getInterval()); // assertEquals("2", SprintPlan.getMemberNumber()); // assertEquals("10", SprintPlan.getAvailableDays()); // assertEquals("100", SprintPlan.getFocusFactor()); // assertEquals("LAB 1321", SprintPlan.getDemoPlace()); // // // 除錯,測試輸入不存在的 sprintID,會回傳 new SprintPlanDesc // ISprintPlanDesc nullSprintPlan = this.helper.loadPlan("1000"); // assertEquals("-1", nullSprintPlan.getID()); // assertEquals(null, nullSprintPlan.getGoal()); // ========== 程式設計此欄為 null ========= // assertEquals("", nullSprintPlan.getInterval()); // assertEquals("0", nullSprintPlan.getMemberNumber()); // assertEquals("0", nullSprintPlan.getAvailableDays()); // assertEquals("", nullSprintPlan.getFocusFactor()); // assertEquals("", nullSprintPlan.getDemoPlace()); // assertEquals("", nullSprintPlan.getDemoDate()); // assertEquals("", nullSprintPlan.getStartDate()); // assertEquals("", nullSprintPlan.getEndDate()); // assertEquals("", nullSprintPlan.getNotes()); // assertEquals("", nullSprintPlan.getNumber()); // // ISprintPlanDesc nullSprintPlan2 = this.helper.loadPlan("XXX"); // assertEquals("-1", nullSprintPlan2.getID()); // assertEquals(null, nullSprintPlan.getGoal()); // ========== 程式設計此欄為 null ========= // assertEquals("", nullSprintPlan2.getInterval()); // assertEquals("0", nullSprintPlan2.getMemberNumber()); // assertEquals("0", nullSprintPlan2.getAvailableDays()); // assertEquals("", nullSprintPlan2.getFocusFactor()); // assertEquals("", nullSprintPlan2.getDemoPlace()); // assertEquals("", nullSprintPlan2.getDemoDate()); // assertEquals("", nullSprintPlan2.getStartDate()); // assertEquals("", nullSprintPlan2.getEndDate()); // assertEquals("", nullSprintPlan2.getNotes()); // assertEquals("", nullSprintPlan2.getNumber()); // } // // public void testgetPlanNumbers() throws Exception { // this.helper = new SprintPlanHelper(this.CP.getIProjectList().get(0)); // assertEquals(this.CS.getSprintCount(), this.helper.getPlanNumbers()); // // // 清空 sprint plan // InitialSQL ini = new InitialSQL(ezScrumInfo); // ini.exe(); // 初始化 SQL // // CopyProject copyProject = new CopyProject(this.CP); // copyProject.exeDelete_Project(); // 刪除測試檔案 // // this.CP = new CreateProject(this.ProjectCount); // this.CP.exe(); // // // 除錯,當沒有產生任何 sprint // this.helper = new SprintPlanHelper(this.CP.getIProjectList().get(0)); // assertEquals(0, this.helper.getPlanNumbers()); // } // // public void testgetSprintPlanForm() { // // 此 method 沒有被呼叫使用 // this.helper = new SprintPlanHelper(this.CP.getIProjectList().get(0)); // // // 設定參數資料 // IterationPlanForm form = new IterationPlanForm(); // form.setID(Integer.toString(this.CS.getSprintCount()+1)); // form.setAvailableDays("10"); // form.setIterStartDate("2010/10/10"); // form.setDemoDate("2010/10/24"); // form.setDemoPlace("Lab 1321"); // form.setFocusFactor("100"); // form.setGoal("Get ONE PIECE !!"); // form.setIterIterval("2"); // form.setIterMemberNumber("2"); // form.setNotes("成為海賊王"); // } // // public void testsaveIterationPlanForm() { // this.helper = new SprintPlanHelper(this.CP.getIProjectList().get(0)); // // // 設定參數資料 // IterationPlanForm form = new IterationPlanForm(); // form.setID(Integer.toString(this.CS.getSprintCount()+1)); // form.setAvailableDays("10"); // form.setIterStartDate("2010/10/10"); // form.setDemoDate("2010/10/24"); // form.setDemoPlace("Lab 1321"); // form.setFocusFactor("100"); // form.setGoal("Get ONE PIECE !!"); // form.setIterIterval("2"); // form.setIterMemberNumber("2"); // form.setNotes("成為海賊王"); // // helper.saveIterationPlanForm(form); // ISprintPlanDesc SprintPlan = this.helper.loadPlan(form.getID()); // assertEquals(form.getID(), SprintPlan.getID()); // assertEquals(form.getGoal(), SprintPlan.getGoal()); // assertEquals(form.getIterIterval(), SprintPlan.getInterval()); // assertEquals(form.getIterMemberNumber(), SprintPlan.getMemberNumber()); // assertEquals(form.getAvailableDays(), SprintPlan.getAvailableDays()); // assertEquals(form.getFocusFactor(), SprintPlan.getFocusFactor()); // assertEquals(form.getDemoPlace(), SprintPlan.getDemoPlace()); // assertEquals(form.getDemoDate(), SprintPlan.getDemoDate()); // assertEquals(form.getNotes(), SprintPlan.getNotes()); // } // /*----------------------------------------------------------- * 測試Focus Factor與AvaliableDays輸入為0的處理方式 -------------------------------------------------------------*/ public void testFocusFactorAndAvailableDays() { System.out.println("testFocusFactorAndAvailableDays: 請找時間把測試失敗原因找出來~"); /* this.helper = new SprintPlanHelper(this.CP.getProjectList().get(0)); //設定一個Focus為零的Sprint IterationPlanForm form = new IterationPlanForm(); form.setID(Integer.toString(this.CS.getSprintCount()+1)); form.setAvailableDays("10"); form.setIterStartDate("2010/10/10"); form.setDemoDate("2010/10/24"); form.setDemoPlace("Lab 1321"); form.setFocusFactor("0"); form.setGoal("Get ONE PIECE !!"); form.setIterIterval("2"); form.setIterMemberNumber("2"); form.setNotes("成為海賊王"); helper.saveIterationPlanForm(form); ISprintPlanDesc SprintPlan = this.helper.loadPlan(form.getID()); assertEquals(form.getID(), SprintPlan.getID()); assertEquals(form.getGoal(), SprintPlan.getGoal()); assertEquals(form.getIterIterval(), SprintPlan.getInterval()); assertEquals(form.getIterMemberNumber(), SprintPlan.getMemberNumber()); assertEquals(form.getAvailableDays(), SprintPlan.getAvailableDays()); assertEquals(form.getFocusFactor(), SprintPlan.getFocusFactor()); assertEquals(form.getDemoPlace(), SprintPlan.getDemoPlace()); assertEquals(form.getDemoDate(), SprintPlan.getDemoDate()); assertEquals(form.getNotes(), SprintPlan.getNotes()); //設定一個AvailableDays為0的Sprint form = new IterationPlanForm(); form.setID(Integer.toString(this.CS.getSprintCount()+1)); form.setAvailableDays("0"); form.setIterStartDate("2010/10/10"); form.setDemoDate("2010/10/24"); form.setDemoPlace("Lab 1321"); form.setFocusFactor("100"); form.setGoal("Get ONE PIECE !!"); form.setIterIterval("2"); form.setIterMemberNumber("2"); form.setNotes("成為海賊王"); helper.saveIterationPlanForm(form); SprintPlan = this.helper.loadPlan(form.getID()); assertEquals(form.getID(), SprintPlan.getID()); assertEquals(form.getGoal(), SprintPlan.getGoal()); assertEquals(form.getIterIterval(), SprintPlan.getInterval()); assertEquals(form.getIterMemberNumber(), SprintPlan.getMemberNumber()); assertEquals(form.getAvailableDays(), SprintPlan.getAvailableDays()); assertEquals(form.getFocusFactor(), SprintPlan.getFocusFactor()); assertEquals(form.getDemoPlace(), SprintPlan.getDemoPlace()); assertEquals(form.getDemoDate(), SprintPlan.getDemoDate()); assertEquals(form.getNotes(), SprintPlan.getNotes()); //設定AvailableDays與FocusFactor為0的Sprint form = new IterationPlanForm(); form.setID(Integer.toString(this.CS.getSprintCount()+1)); form.setAvailableDays("0"); form.setIterStartDate("2010/10/10"); form.setDemoDate("2010/10/24"); form.setDemoPlace("Lab 1321"); form.setFocusFactor("0"); form.setGoal("Get ONE PIECE !!"); form.setIterIterval("2"); form.setIterMemberNumber("2"); form.setNotes("成為海賊王"); helper.saveIterationPlanForm(form); SprintPlan = this.helper.loadPlan(form.getID()); assertEquals(form.getID(), SprintPlan.getID()); assertEquals(form.getGoal(), SprintPlan.getGoal()); assertEquals(form.getIterIterval(), SprintPlan.getInterval()); assertEquals(form.getIterMemberNumber(), SprintPlan.getMemberNumber()); assertEquals(form.getAvailableDays(), SprintPlan.getAvailableDays()); assertEquals(form.getFocusFactor(), SprintPlan.getFocusFactor()); assertEquals(form.getDemoPlace(), SprintPlan.getDemoPlace()); assertEquals(form.getDemoDate(), SprintPlan.getDemoDate()); assertEquals(form.getNotes(), SprintPlan.getNotes()); */ } public void testdeleteIterationPlan() { System.out.println("testdeleteIterationPlan: 請找時間把測試失敗原因找出來~"); /* this.helper = new SprintPlanHelper(this.CP.getProjectList().get(0)); int lastID = this.helper.getLastSprintId(); this.helper.deleteIterationPlan(Integer.toString(lastID)); ISprintPlanDesc nullSprintPlan = this.helper.loadPlan(lastID); assertEquals("-1", nullSprintPlan.getID()); assertEquals(null, nullSprintPlan.getGoal()); // ========== 程式設計此欄為 null ========= assertEquals("", nullSprintPlan.getInterval()); assertEquals("0", nullSprintPlan.getMemberNumber()); assertEquals("0", nullSprintPlan.getAvailableDays()); assertEquals("0", nullSprintPlan.getFocusFactor()); assertEquals("", nullSprintPlan.getDemoPlace()); assertEquals("", nullSprintPlan.getDemoDate()); assertEquals("", nullSprintPlan.getStartDate()); assertEquals("", nullSprintPlan.getEndDate()); assertEquals("", nullSprintPlan.getNotes()); // assertEquals("", nullSprintPlan.getNumber()); */ } public void testgetProjectStartDate() throws Exception { CopyProject copyProject = new CopyProject(this.CP); copyProject.exeDelete_Project(); // 刪除測試檔案 InitialSQL ini = new InitialSQL(config); ini.exe(); // 初始化 SQL this.CP = new CreateProject(this.ProjectCount); this.CP.exeCreate(); this.CS = new CreateSprint(1, this.CP); this.CS.exe(); this.helper = new SprintPlanHelper(this.CP.getProjectList().get(0)); Calendar cal = Calendar.getInstance(); SimpleDateFormat format = new SimpleDateFormat("yyyy/MM/dd"); Date Today = cal.getTime(); assertEquals(format.format(Today), format.format(this.helper.getProjectStartDate())); } public void testgetProjectEndDate() throws Exception { this.helper = new SprintPlanHelper(this.CP.getProjectList().get(0)); int lastID = this.helper.getLastSprintId(); ISprintPlanDesc SprintPlan = this.helper.loadPlan(lastID); Date ProjectEndDate = this.helper.getProjectEndDate(); SimpleDateFormat format = new SimpleDateFormat("yyyy/MM/dd"); assertEquals(SprintPlan.getEndDate(), format.format(ProjectEndDate).toString()); // 清空 sprint CopyProject copyProject = new CopyProject(this.CP); copyProject.exeDelete_Project(); // 刪除測試檔案 InitialSQL ini = new InitialSQL(config); ini.exe(); // 初始化 SQL this.CP = new CreateProject(this.ProjectCount); this.CP.exeCreate(); // 除錯 this.helper = new SprintPlanHelper(this.CP.getProjectList().get(0)); Date nullProjectEndDate = this.helper.getProjectEndDate(); // ========================== assertEquals(null, nullProjectEndDate); // ========================== } public void testgetLastSprintId() throws Exception { this.helper = new SprintPlanHelper(this.CP.getProjectList().get(0)); int lastID = this.helper.getLastSprintId(); assertEquals(this.CS.getSprintCount(), lastID); // 清空 sprint CopyProject copyProject = new CopyProject(this.CP); copyProject.exeDelete_Project(); // 刪除測試檔案 InitialSQL ini = new InitialSQL(config); ini.exe(); // 初始化 SQL this.CP = new CreateProject(this.ProjectCount); this.CP.exeCreate(); lastID = this.helper.getLastSprintId(); assertEquals(-1, lastID); } public void testgetLastSprintPlanNumber() throws Exception { System.out.println("testgetLastSprintPlanNumber: 請找時間把測試失敗原因找出來~"); /* this.helper = new SprintPlanHelper(this.CP.getProjectList().get(0)); int lastID = this.helper.getLastSprintId(); assertEquals(this.CS.getSprintCount(), lastID); // 清空 sprint CopyProject copyProject = new CopyProject(this.CP); copyProject.exeDelete_Project(); // 刪除測試檔案 InitialSQL ini = new InitialSQL(config); ini.exe(); // 初始化 SQL this.CP = new CreateProject(this.ProjectCount); this.CP.exeCreate(); lastID = this.helper.getLastSprintId(); assertEquals(0, lastID); */ } public void testgetSprintIDbyDate() { System.out.println("testgetSprintIDbyDate: 請找時間把測試失敗原因找出來~"); /* this.helper = new SprintPlanHelper(this.CP.getProjectList().get(0)); int cur = this.SprintCount/2 + 1; // 當下的 sprint 為所有新建 sprints 的中間值 ISprintPlanDesc SprintPlan = this.helper.loadPlan(cur); Calendar cal = Calendar.getInstance(); Date Today = cal.getTime(); assertEquals(cur, this.helper.getSprintIDbyDate(Today)); // 將時間加到下一個 sprint cal.add(Calendar.DAY_OF_YEAR, Integer.parseInt(SprintPlan.getInterval()+5)); Date NextSprintDay = cal.getTime(); assertEquals(cur+1, this.helper.getSprintIDbyDate(NextSprintDay)); // 將時間加到超出 sprint 範圍之後 cal.add(Calendar.DAY_OF_YEAR, 1000); Date DefaultDay = cal.getTime(); assertEquals(-1, this.helper.getSprintIDbyDate(DefaultDay)); // 將時間回到早於 sprint 範圍之前 cal.add(Calendar.DAY_OF_YEAR, -5000); Date DefaultDay2 = cal.getTime(); assertEquals(-1, this.helper.getSprintIDbyDate(DefaultDay2)); */ } public void testmoveSprint() { this.helper = new SprintPlanHelper(this.CP.getProjectList().get(0)); // EndSprint 是要被交換的 sprint ISprintPlanDesc OldSprint = this.helper.loadPlan(this.CS.getSprintCount()); // 再新增一筆 sprint 4 用來移動 // 設定參數資料 IterationPlanForm form = new IterationPlanForm(); form.setID(Integer.toString(this.CS.getSprintCount()+1)); form.setAvailableDays("10"); form.setDemoPlace("1321 LUB"); form.setFocusFactor("200"); form.setGoal("Get ONE PIECE !!"); form.setIterIterval("2"); form.setIterMemberNumber("2"); form.setNotes("成為海賊王"); SimpleDateFormat format = new SimpleDateFormat("yyyy/MM/dd"); Date Start = new Date(OldSprint.getEndDate()); Calendar cal = Calendar.getInstance(); cal.setTime(Start); cal.add(Calendar.DAY_OF_YEAR, 1); // 開始日為上一個 sprint 的下一天 form.setIterStartDate(format.format(cal.getTime())); Date Demo = new Date(OldSprint.getEndDate()); cal = Calendar.getInstance(); cal.setTime(Demo); cal.add(Calendar.DAY_OF_YEAR, 14); // 兩個禮拜 form.setDemoDate(format.format(cal.getTime())); this.helper.saveIterationPlanForm(form); // 存入成為一筆新的 sprint ISprintPlanDesc NewSprint = this.helper.loadPlan(this.helper.getLastSprintId()); // 移動 sprint 3 與 sprint 4 int oldID = this.CS.getSprintCount(); int newID = this.helper.getLastSprintId(); this.helper.moveSprint(oldID, newID); // old ID 的資訊應該變成 sprint 4 資訊 ISprintPlanDesc oldID_sprintInfo = this.helper.loadPlan(oldID); assertEquals(Integer.toString(oldID), oldID_sprintInfo.getID()); assertEquals("10", oldID_sprintInfo.getAvailableDays()); assertEquals(OldSprint.getStartDate(), oldID_sprintInfo.getStartDate()); assertEquals("1321 LUB", oldID_sprintInfo.getDemoPlace()); assertEquals("200", oldID_sprintInfo.getFocusFactor()); assertEquals("Get ONE PIECE !!", oldID_sprintInfo.getGoal()); assertEquals("2", oldID_sprintInfo.getInterval()); assertEquals("2", oldID_sprintInfo.getMemberNumber()); assertEquals("成為海賊王", oldID_sprintInfo.getNotes()); // new Id 的資訊應該變成 sprint 3 資訊 ISprintPlanDesc newID_sprintInfo = this.helper.loadPlan(newID); assertEquals(Integer.toString(newID), newID_sprintInfo.getID()); assertEquals(OldSprint.getAvailableDays(), newID_sprintInfo.getAvailableDays()); // 日期是正常的,所以時間不會移動 assertEquals(NewSprint.getStartDate(), newID_sprintInfo.getStartDate()); assertEquals(OldSprint.getDemoPlace(), newID_sprintInfo.getDemoPlace()); assertEquals(OldSprint.getFocusFactor(), newID_sprintInfo.getFocusFactor()); assertEquals(OldSprint.getGoal(), newID_sprintInfo.getGoal()); assertEquals(OldSprint.getInterval(), newID_sprintInfo.getInterval()); assertEquals(OldSprint.getMemberNumber(), newID_sprintInfo.getMemberNumber()); assertEquals(OldSprint.getNotes(), newID_sprintInfo.getNotes()); } }
ezScrum/ezScrum_1.7.2_export
test/ntut/csie/ezScrum/web/control/SprintPlanHelperTest.java
Java
gpl-2.0
24,045
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!-- NewPage --> <html lang="es"> <head> <!-- Generated by javadoc (version 1.7.0_60) on Thu May 18 11:17:06 COT 2017 --> <title>PersistentExecutionManager</title> <meta name="date" content="2017-05-18"> <link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style"> </head> <body> <script type="text/javascript"><!-- if (location.href.indexOf('is-external=true') == -1) { parent.document.title="PersistentExecutionManager"; } //--> </script> <noscript> <div>JavaScript is disabled on your browser.</div> </noscript> <!-- ========= START OF TOP NAVBAR ======= --> <div class="topNav"><a name="navbar_top"> <!-- --> </a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../overview-summary.html">Overview</a></li> <li><a href="package-summary.html">Package</a></li> <li class="navBarCell1Rev">Class</li> <li><a href="class-use/PersistentExecutionManager.html">Use</a></li> <li><a href="package-tree.html">Tree</a></li> <li><a href="../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../index-files/index-1.html">Index</a></li> <li><a href="../../../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li><a href="../../../../uniandes/unacloud/agent/execution/ImageCacheManager.html" title="class in uniandes.unacloud.agent.execution"><span class="strong">Prev Class</span></a></li> <li><a href="../../../../uniandes/unacloud/agent/execution/Scheduler.html" title="class in uniandes.unacloud.agent.execution"><span class="strong">Next Class</span></a></li> </ul> <ul class="navList"> <li><a href="../../../../index.html?uniandes/unacloud/agent/execution/PersistentExecutionManager.html" target="_top">Frames</a></li> <li><a href="PersistentExecutionManager.html" target="_top">No Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_top"> <li><a href="../../../../allclasses-noframe.html">All Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_top"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <div> <ul class="subNavList"> <li>Summary:&nbsp;</li> <li>Nested&nbsp;|&nbsp;</li> <li>Field&nbsp;|&nbsp;</li> <li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li> <li><a href="#method_summary">Method</a></li> </ul> <ul class="subNavList"> <li>Detail:&nbsp;</li> <li>Field&nbsp;|&nbsp;</li> <li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li> <li><a href="#method_detail">Method</a></li> </ul> </div> <a name="skip-navbar_top"> <!-- --> </a></div> <!-- ========= END OF TOP NAVBAR ========= --> <!-- ======== START OF CLASS DATA ======== --> <div class="header"> <div class="subTitle">uniandes.unacloud.agent.execution</div> <h2 title="Class PersistentExecutionManager" class="title">Class PersistentExecutionManager</h2> </div> <div class="contentContainer"> <ul class="inheritance"> <li>java.lang.Object</li> <li> <ul class="inheritance"> <li>uniandes.unacloud.agent.execution.PersistentExecutionManager</li> </ul> </li> </ul> <div class="description"> <ul class="blockList"> <li class="blockList"> <hr> <br> <pre>public class <span class="strong">PersistentExecutionManager</span> extends java.lang.Object</pre> <div class="block">Responsible for managing executions. This class is responsible to schedule execution startups and stops. The process is: given a execution and a time t, this class ensures that this execution is going to be turn on for a time t The execution only is stopped when the time t is burnt-out or when the user sends a request to stop it. If this physical machine is turned off, then the next time the physical machine starts the execution will be powered on.<br/> To schedule the execution turn off we used a Timer that manage a collection of TimerTask objects, each timer task is responsible for stopping one execution</div> <dl><dt><span class="strong">Author:</span></dt> <dd>Clouder</dd></dl> </li> </ul> </div> <div class="summary"> <ul class="blockList"> <li class="blockList"> <!-- ======== CONSTRUCTOR SUMMARY ======== --> <ul class="blockList"> <li class="blockList"><a name="constructor_summary"> <!-- --> </a> <h3>Constructor Summary</h3> <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> <caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colOne" scope="col">Constructor and Description</th> </tr> <tr class="altColor"> <td class="colOne"><code><strong><a href="../../../../uniandes/unacloud/agent/execution/PersistentExecutionManager.html#PersistentExecutionManager()">PersistentExecutionManager</a></strong>()</code>&nbsp;</td> </tr> </table> </li> </ul> <!-- ========== METHOD SUMMARY =========== --> <ul class="blockList"> <li class="blockList"><a name="method_summary"> <!-- --> </a> <h3>Method Summary</h3> <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> <caption><span>Methods</span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colFirst" scope="col">Modifier and Type</th> <th class="colLast" scope="col">Method and Description</th> </tr> <tr class="altColor"> <td class="colFirst"><code>static void</code></td> <td class="colLast"><code><strong><a href="../../../../uniandes/unacloud/agent/execution/PersistentExecutionManager.html#cleanDir(java.io.File)">cleanDir</a></strong>(java.io.File&nbsp;f)</code> <div class="block">Delete directory sent by params</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>static <a href="../../../../uniandes/unacloud/common/com/UnaCloudAbstractResponse.html" title="class in uniandes.unacloud.common.com">UnaCloudAbstractResponse</a></code></td> <td class="colLast"><code><strong><a href="../../../../uniandes/unacloud/agent/execution/PersistentExecutionManager.html#extendsVMTime(uniandes.unacloud.common.com.messages.exeo.ExecutionAddTimeMessage)">extendsVMTime</a></strong>(<a href="../../../../uniandes/unacloud/common/com/messages/exeo/ExecutionAddTimeMessage.html" title="class in uniandes.unacloud.common.com.messages.exeo">ExecutionAddTimeMessage</a>&nbsp;timeMessage)</code> <div class="block">Extends the time that the execution must be up</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>static void</code></td> <td class="colLast"><code><strong><a href="../../../../uniandes/unacloud/agent/execution/PersistentExecutionManager.html#refreshData()">refreshData</a></strong>()</code> <div class="block">Loads and validates status of all executions saved in file</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>static void</code></td> <td class="colLast"><code><strong><a href="../../../../uniandes/unacloud/agent/execution/PersistentExecutionManager.html#removeExecution(long,%20boolean)">removeExecution</a></strong>(long&nbsp;executionId, boolean&nbsp;checkTime)</code> <div class="block">Stops an execution and removes it representing execution object</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>static <a href="../../../../uniandes/unacloud/common/com/UnaCloudAbstractResponse.html" title="class in uniandes.unacloud.common.com">UnaCloudAbstractResponse</a></code></td> <td class="colLast"><code><strong><a href="../../../../uniandes/unacloud/agent/execution/PersistentExecutionManager.html#restartMachine(uniandes.unacloud.common.com.messages.exeo.ExecutionRestartMessage)">restartMachine</a></strong>(<a href="../../../../uniandes/unacloud/common/com/messages/exeo/ExecutionRestartMessage.html" title="class in uniandes.unacloud.common.com.messages.exeo">ExecutionRestartMessage</a>&nbsp;restartMessage)</code> <div class="block">Restarts the given execution</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>static java.util.List&lt;java.lang.Long&gt;</code></td> <td class="colLast"><code><strong><a href="../../../../uniandes/unacloud/agent/execution/PersistentExecutionManager.html#returnIdsExecutions()">returnIdsExecutions</a></strong>()</code> <div class="block">Returns a list of id executions that currently are running, not return images in state STARTING (testing running)</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>static <a href="../../../../uniandes/unacloud/common/com/UnaCloudAbstractResponse.html" title="class in uniandes.unacloud.common.com">UnaCloudAbstractResponse</a></code></td> <td class="colLast"><code><strong><a href="../../../../uniandes/unacloud/agent/execution/PersistentExecutionManager.html#sendImageCopy(uniandes.unacloud.common.com.messages.exeo.ExecutionSaveImageMessage)">sendImageCopy</a></strong>(<a href="../../../../uniandes/unacloud/common/com/messages/exeo/ExecutionSaveImageMessage.html" title="class in uniandes.unacloud.common.com.messages.exeo">ExecutionSaveImageMessage</a>&nbsp;message)</code> <div class="block">Sends an image copied to server</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>static java.lang.String</code></td> <td class="colLast"><code><strong><a href="../../../../uniandes/unacloud/agent/execution/PersistentExecutionManager.html#startUpMachine(uniandes.unacloud.agent.execution.entities.Execution,%20boolean)">startUpMachine</a></strong>(<a href="../../../../uniandes/unacloud/agent/execution/entities/Execution.html" title="class in uniandes.unacloud.agent.execution.entities">Execution</a>&nbsp;execution, boolean&nbsp;started)</code> <div class="block">Starts and configures an execution. this method must be used by other methods to configure, start and schedule an execution</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>static void</code></td> <td class="colLast"><code><strong><a href="../../../../uniandes/unacloud/agent/execution/PersistentExecutionManager.html#stopExecution(long)">stopExecution</a></strong>(long&nbsp;executionId)</code> <div class="block">Stops execution</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>static void</code></td> <td class="colLast"><code><strong><a href="../../../../uniandes/unacloud/agent/execution/PersistentExecutionManager.html#unregisterExecution(long)">unregisterExecution</a></strong>(long&nbsp;executionId)</code> <div class="block">Unregister execution from platforms</div> </td> </tr> </table> <ul class="blockList"> <li class="blockList"><a name="methods_inherited_from_class_java.lang.Object"> <!-- --> </a> <h3>Methods inherited from class&nbsp;java.lang.Object</h3> <code>equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li> </ul> </li> </ul> </li> </ul> </div> <div class="details"> <ul class="blockList"> <li class="blockList"> <!-- ========= CONSTRUCTOR DETAIL ======== --> <ul class="blockList"> <li class="blockList"><a name="constructor_detail"> <!-- --> </a> <h3>Constructor Detail</h3> <a name="PersistentExecutionManager()"> <!-- --> </a> <ul class="blockListLast"> <li class="blockList"> <h4>PersistentExecutionManager</h4> <pre>public&nbsp;PersistentExecutionManager()</pre> </li> </ul> </li> </ul> <!-- ============ METHOD DETAIL ========== --> <ul class="blockList"> <li class="blockList"><a name="method_detail"> <!-- --> </a> <h3>Method Detail</h3> <a name="removeExecution(long, boolean)"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>removeExecution</h4> <pre>public static&nbsp;void&nbsp;removeExecution(long&nbsp;executionId, boolean&nbsp;checkTime)</pre> <div class="block">Stops an execution and removes it representing execution object</div> <dl><dt><span class="strong">Parameters:</span></dt><dd><code>executionId</code> - </dd><dd><code>checkTime</code> - </dd></dl> </li> </ul> <a name="stopExecution(long)"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>stopExecution</h4> <pre>public static&nbsp;void&nbsp;stopExecution(long&nbsp;executionId)</pre> <div class="block">Stops execution</div> <dl><dt><span class="strong">Parameters:</span></dt><dd><code>executionId</code> - </dd></dl> </li> </ul> <a name="unregisterExecution(long)"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>unregisterExecution</h4> <pre>public static&nbsp;void&nbsp;unregisterExecution(long&nbsp;executionId)</pre> <div class="block">Unregister execution from platforms</div> <dl><dt><span class="strong">Parameters:</span></dt><dd><code>executionId</code> - </dd></dl> </li> </ul> <a name="cleanDir(java.io.File)"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>cleanDir</h4> <pre>public static&nbsp;void&nbsp;cleanDir(java.io.File&nbsp;f)</pre> <div class="block">Delete directory sent by params</div> <dl><dt><span class="strong">Parameters:</span></dt><dd><code>f</code> - directory or file</dd></dl> </li> </ul> <a name="restartMachine(uniandes.unacloud.common.com.messages.exeo.ExecutionRestartMessage)"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>restartMachine</h4> <pre>public static&nbsp;<a href="../../../../uniandes/unacloud/common/com/UnaCloudAbstractResponse.html" title="class in uniandes.unacloud.common.com">UnaCloudAbstractResponse</a>&nbsp;restartMachine(<a href="../../../../uniandes/unacloud/common/com/messages/exeo/ExecutionRestartMessage.html" title="class in uniandes.unacloud.common.com.messages.exeo">ExecutionRestartMessage</a>&nbsp;restartMessage)</pre> <div class="block">Restarts the given execution</div> <dl><dt><span class="strong">Returns:</span></dt><dd>response to server</dd></dl> </li> </ul> <a name="startUpMachine(uniandes.unacloud.agent.execution.entities.Execution, boolean)"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>startUpMachine</h4> <pre>public static&nbsp;java.lang.String&nbsp;startUpMachine(<a href="../../../../uniandes/unacloud/agent/execution/entities/Execution.html" title="class in uniandes.unacloud.agent.execution.entities">Execution</a>&nbsp;execution, boolean&nbsp;started)</pre> <div class="block">Starts and configures an execution. this method must be used by other methods to configure, start and schedule an execution</div> <dl><dt><span class="strong">Parameters:</span></dt><dd><code>execution</code> - to be configured</dd><dd><code>started</code> - if execution should be started</dd> <dt><span class="strong">Returns:</span></dt><dd>result message</dd></dl> </li> </ul> <a name="extendsVMTime(uniandes.unacloud.common.com.messages.exeo.ExecutionAddTimeMessage)"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>extendsVMTime</h4> <pre>public static&nbsp;<a href="../../../../uniandes/unacloud/common/com/UnaCloudAbstractResponse.html" title="class in uniandes.unacloud.common.com">UnaCloudAbstractResponse</a>&nbsp;extendsVMTime(<a href="../../../../uniandes/unacloud/common/com/messages/exeo/ExecutionAddTimeMessage.html" title="class in uniandes.unacloud.common.com.messages.exeo">ExecutionAddTimeMessage</a>&nbsp;timeMessage)</pre> <div class="block">Extends the time that the execution must be up</div> <dl><dt><span class="strong">Parameters:</span></dt><dd><code>timeMessage</code> - message with execution id and time to be modified</dd> <dt><span class="strong">Returns:</span></dt><dd>unacloud response</dd></dl> </li> </ul> <a name="refreshData()"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>refreshData</h4> <pre>public static&nbsp;void&nbsp;refreshData()</pre> <div class="block">Loads and validates status of all executions saved in file</div> </li> </ul> <a name="returnIdsExecutions()"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>returnIdsExecutions</h4> <pre>public static&nbsp;java.util.List&lt;java.lang.Long&gt;&nbsp;returnIdsExecutions()</pre> <div class="block">Returns a list of id executions that currently are running, not return images in state STARTING (testing running)</div> <dl><dt><span class="strong">Returns:</span></dt><dd>list of execution ids</dd></dl> </li> </ul> <a name="sendImageCopy(uniandes.unacloud.common.com.messages.exeo.ExecutionSaveImageMessage)"> <!-- --> </a> <ul class="blockListLast"> <li class="blockList"> <h4>sendImageCopy</h4> <pre>public static&nbsp;<a href="../../../../uniandes/unacloud/common/com/UnaCloudAbstractResponse.html" title="class in uniandes.unacloud.common.com">UnaCloudAbstractResponse</a>&nbsp;sendImageCopy(<a href="../../../../uniandes/unacloud/common/com/messages/exeo/ExecutionSaveImageMessage.html" title="class in uniandes.unacloud.common.com.messages.exeo">ExecutionSaveImageMessage</a>&nbsp;message)</pre> <div class="block">Sends an image copied to server</div> <dl><dt><span class="strong">Parameters:</span></dt><dd><code>message</code> - </dd> <dt><span class="strong">Returns:</span></dt><dd>unacloud response</dd></dl> </li> </ul> </li> </ul> </li> </ul> </div> </div> <!-- ========= END OF CLASS DATA ========= --> <!-- ======= START OF BOTTOM NAVBAR ====== --> <div class="bottomNav"><a name="navbar_bottom"> <!-- --> </a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../overview-summary.html">Overview</a></li> <li><a href="package-summary.html">Package</a></li> <li class="navBarCell1Rev">Class</li> <li><a href="class-use/PersistentExecutionManager.html">Use</a></li> <li><a href="package-tree.html">Tree</a></li> <li><a href="../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../index-files/index-1.html">Index</a></li> <li><a href="../../../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li><a href="../../../../uniandes/unacloud/agent/execution/ImageCacheManager.html" title="class in uniandes.unacloud.agent.execution"><span class="strong">Prev Class</span></a></li> <li><a href="../../../../uniandes/unacloud/agent/execution/Scheduler.html" title="class in uniandes.unacloud.agent.execution"><span class="strong">Next Class</span></a></li> </ul> <ul class="navList"> <li><a href="../../../../index.html?uniandes/unacloud/agent/execution/PersistentExecutionManager.html" target="_top">Frames</a></li> <li><a href="PersistentExecutionManager.html" target="_top">No Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_bottom"> <li><a href="../../../../allclasses-noframe.html">All Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_bottom"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <div> <ul class="subNavList"> <li>Summary:&nbsp;</li> <li>Nested&nbsp;|&nbsp;</li> <li>Field&nbsp;|&nbsp;</li> <li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li> <li><a href="#method_summary">Method</a></li> </ul> <ul class="subNavList"> <li>Detail:&nbsp;</li> <li>Field&nbsp;|&nbsp;</li> <li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li> <li><a href="#method_detail">Method</a></li> </ul> </div> <a name="skip-navbar_bottom"> <!-- --> </a></div> <!-- ======== END OF BOTTOM NAVBAR ======= --> </body> </html>
UnaCloud/UnaCloud2
docs/uniandes/unacloud/agent/execution/PersistentExecutionManager.html
HTML
gpl-2.0
19,604
// rddb.h // // Database driver with automatic reconnect // // (C) Copyright 2007 Dan Mills <dmills@exponent.myzen.co.uk> // // $Id: rddb.h,v 1.4 2008/03/28 20:00:05 fredg Exp $ // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License version 2 as // published by the Free Software Foundation. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public // License along with this program; if not, write to the Free Software // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // #ifndef RDDB_INC #define RDDB_INC #include <sys/types.h> #include <qobject.h> #include <qsqldatabase.h> #include <qstring.h> #include <rdconfig.h> class RDSqlDatabaseStatus : public QObject { Q_OBJECT signals: void logText(RDConfig::LogPriority prio,const QString &msg); void reconnected(); void connectionFailed (); private: RDSqlDatabaseStatus (); bool discon; friend RDSqlDatabaseStatus * RDDbStatus(); public: void sendRecon(); void sendDiscon(QString query); }; class RDSqlQuery : public QSqlQuery { public: RDSqlQuery ( const QString & query = QString::null, QSqlDatabase * db = 0 ); }; // Setup the default database, returns true on success. // if error is non NULL, an error string will be appended to it // if there is a problem. QSqlDatabase * RDInitDb (QString *error=NULL); // Return a handle to the database status object. RDSqlDatabaseStatus * RDDbStatus(); #endif
RadioFreeAsia/rivendell-rfa
lib/rddb.h
C
gpl-2.0
1,756
/** * QVGenerateHTMLServlet.java * * Created on 24/05/2007 */ package edu.xtec.qv.servlet; import javax.servlet.http.HttpServletResponse; /** * @author sarjona * @version */ public class QVOpenHTMLServlet extends QVGenerateHTMLServlet { protected void createResponse(HttpServletResponse response, String sURL, String sSkin, String sLang, int iSection, String sParams) throws Exception{ if (exists(sURL)){ if (sURL.indexOf("?")<0) sURL+="?"; sURL+=getProperty("qv.dist.params"); sURL+="&lang="+sLang; sURL+="&skin="+sSkin; sURL+="&"+sParams; response.sendRedirect(sURL); }else{ throw new QVServletException("Can't open url: "+sURL); } } }
projectestac/qv
qv_viewer/src/viewer/edu/xtec/qv/servlet/QVOpenHTMLServlet.java
Java
gpl-2.0
688
<?php /* * * OGP - Open Game Panel * Copyright (C) 2008 - 2018 The OGP Development Team * * http://www.opengamepanel.org/ * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ define('OGP_LANG_add_new_remote_host', "Dodaj Nowego Hosta"); define('OGP_LANG_configured_remote_hosts', "Skonfigurowane Hosty"); define('OGP_LANG_remote_host', "Adres Hosta"); define('OGP_LANG_remote_host_info', "Adres Hosta lub Domena która wskazuje na dany Adres IP"); define('OGP_LANG_remote_host_port', "Port Hosta"); define('OGP_LANG_remote_host_port_info', "The port that is listened by the OGP Agent on remote host. Default: 12679."); define('OGP_LANG_remote_host_name', "Nazwa Hosta"); define('OGP_LANG_ogp_user', "OGP Agent Username"); define('OGP_LANG_remote_host_name_info', "Nazwa zdalnego komputera jest używana, aby pomóc użytkownikom w określeniu ich serwerów."); define('OGP_LANG_add_remote_host', "Dodaj Hosta"); define('OGP_LANG_remote_encryption_key', "Klucz Szyfrowania Hosta"); define('OGP_LANG_remote_encryption_key_info', "Klucza szyfrowania Remote służy do szyfrowania danych między stron internetowych i agencji. Ten klucz musi być jakiś na obu końcach."); define('OGP_LANG_server_name', "Nazwa Serwera"); define('OGP_LANG_agent_ip_port', "IP:PORT Agenta"); define('OGP_LANG_agent_status', "Status Agenta"); define('OGP_LANG_ips', "IP"); define('OGP_LANG_add_more_ips', "Jeśli chcesz, aby wprowadzić więcej prasy IPs Set IP, gdy wszystkie pola są pełne i puste pole pojawi się."); define('OGP_LANG_encryption_key_mismatch', "Klucz szyfrowania nie pasuje do agenta. Sprawdź ponownie konfigurację Agenta."); define('OGP_LANG_no_ip_for_remote_host', "Należy dodać co najmniej jednego (1) adres IP dla każdego zdalnego komputera."); define('OGP_LANG_note_remote_host', "A remote host is a server where the OGP Agent is running on. Each host can have multiple number of IP addresses on which users can bind servers to."); define('OGP_LANG_ip_administration', "Serwer &amp; IP Administracja :: Open Game Panel"); define('OGP_LANG_unknown_error', "Nieznany błąd - status_chk returned"); define('OGP_LANG_remote_host_user_name', "UNIX user"); define('OGP_LANG_remote_host_user_name_info', "Nazwa użytkownika, w którym działa Agent. Przykład: Matthew"); define('OGP_LANG_remote_host_ftp_ip', "FTP IP"); define('OGP_LANG_remote_host_ftp_ip_info', "The FTP server <b>IP</b> for the current Agent."); define('OGP_LANG_remote_host_ftp_port', "FTP Port"); define('OGP_LANG_remote_host_ftp_port_info', "The FTP server <b>port</b> for the current Agent."); define('OGP_LANG_view_log', "View Log"); define('OGP_LANG_status', "Status"); define('OGP_LANG_stop_firewall', "Zatrzymaj zaporę"); define('OGP_LANG_start_firewall', "Uruchom zaporę"); define('OGP_LANG_seconds', "Sekundy"); define('OGP_LANG_reboot', "Restart Serwera Hosta"); define('OGP_LANG_restart', "Zrestartuj Agenta"); define('OGP_LANG_confirm_reboot', "Czy na pewno chcesz wykonać restart serwera Hosta o nazwie '%s'?"); define('OGP_LANG_confirm_restart', "Are you sure you want to restart the Agent named '%s'?"); define('OGP_LANG_restarting', "Restarting Agent... Please wait."); define('OGP_LANG_restarted', "Agent zrestartowany pomyślnie."); define('OGP_LANG_reboot_success', "Serwer o nazwie '%s' został zrestartowany. Nie będzie można uzyskać dostępu do serwera, dopóki nie zostanie pomyślnie uruchomiony."); define('OGP_LANG_invalid_remote_host_id', "Nieprawidłowy id '%s' Hosta"); define('OGP_LANG_remote_host_removed', "Usunięto Hosta o nazwie '%s'."); define('OGP_LANG_editing_remote_server', "Edytuj serwer hosta '%s'"); define('OGP_LANG_remote_server_settings_changed', "Zmiana ustawień dla hosta '%s' wykonana pomyślnie."); define('OGP_LANG_save_settings', "Zapisz Ustawienia"); define('OGP_LANG_set_ips', "Ustaw IP"); define('OGP_LANG_remote_ip', "IP Hosta"); define('OGP_LANG_remote_ips_for', "Adresy IP dla serwera Hosta o nazwie '%s'"); define('OGP_LANG_ips_set_for_server', "IP zostało pomyślnie ustawione dla Hosta '%s'"); define('OGP_LANG_could_not_remove_ip', "Nie można usunąć starych adresów IP z bazy danych."); define('OGP_LANG_could_add_ip', "Możliwość dodania zdalnego serwera IP do bazy danych."); define('OGP_LANG_areyousure_removeagent', "Are you sure you want to remove the Agent called"); define('OGP_LANG_areyousure_removeagent2', "i wszystkich serwerów z nią związanych z bazy danych?"); define('OGP_LANG_error_while_remove', "Podczas usuwania zdalnego serwera wystąpił błąd."); define('OGP_LANG_add_ip', "Dodaj IP"); define('OGP_LANG_remove_ip', "Usuń IP"); define('OGP_LANG_edit_ip', "Edytuj IP"); define('OGP_LANG_wrote_changes', "Zmiany zapisane pomyślnie."); define('OGP_LANG_there_are_servers_running_on_this_ip', "Na Adresie IP są uruchomione serwery."); define('OGP_LANG_enter_ip_host', "Musisz wpisać IP dla serwera Hosta."); define('OGP_LANG_enter_valid_ip', "Musisz wprowadzić prawidłowy port dla Hosta. Wartość portu może wynosić od 0 do 65535, jednak zalecam od 1024 do 65535."); define('OGP_LANG_could_not_add_server', "Nie można dodać serwera"); define('OGP_LANG_to_db', "do bazy danych."); define('OGP_LANG_added_server', "Dodaj serwer"); define('OGP_LANG_with_port', "z portem"); define('OGP_LANG_to_db_succesfully', "pomyślnie do bazy danych."); define('OGP_LANG_unable_discover', "Nie można automatycznie wykryć adresów IP"); define('OGP_LANG_set_ip_manually', "Musisz ustawić ręcznie Adres IP."); define('OGP_LANG_found_ips', "Znaleziono IP"); define('OGP_LANG_for_remote_server', "dla serwera hosta."); define('OGP_LANG_failed_add_ip', "Błąd przy dodawaniu IP"); define('OGP_LANG_timeout', "Time Out"); define('OGP_LANG_timeout_info', "The time limit in seconds to get response from this Agent."); define('OGP_LANG_use_nat', "Użyj NAT"); define('OGP_LANG_use_nat_info', "Włącz, jeśli zdalny serwer używa reguły NAT."); define('OGP_LANG_arrange_ports', "Arrange ports"); define('OGP_LANG_assign_new_ports_range_for_ip', "Assign new ports range for IP %s"); define('OGP_LANG_assigned_port_ranges_for_ip', "Assigned port ranges for IP %s"); define('OGP_LANG_assigned_ports_for_ip', "Assigned ports for IP %s"); define('OGP_LANG_unspecified_game_types', "Nieokreślone typy gier"); define('OGP_LANG_start_port', "Początkowy port:"); define('OGP_LANG_end_port', "Końcowy port:"); define('OGP_LANG_port_increment', "Port increment:"); define('OGP_LANG_total_assignable_ports', "Total assignable ports:"); define('OGP_LANG_available_range_ports', "Dozwolony zakres portów:"); define('OGP_LANG_assign_range', "Assign range"); define('OGP_LANG_edit_range', "Edytuj zakres"); define('OGP_LANG_delete_range', "Usuń zakres"); define('OGP_LANG_home_id', "ID Serwera"); define('OGP_LANG_home_path', "główna ścieżka:"); define('OGP_LANG_game_type', "Typ Gry"); define('OGP_LANG_port', "Port"); define('OGP_LANG_invalid_values', "Nieprawidłowe wartości."); define('OGP_LANG_ports_in_range_already_arranged', "Ports in range already arranged."); define('OGP_LANG_ports_range_already_configured_for', "Ports range already configured for %s."); define('OGP_LANG_ports_range_added_successfull_for', "Ports range added successfully for %s."); define('OGP_LANG_ports_range_deleted_successfull', "Ports range deleted successfully."); define('OGP_LANG_ports_range_edited_successfull_for', "Ports range edited successfully for %s."); define('OGP_LANG_editing_firewall_for_remote_server', "Editing Firewall for remote server named '%s'"); define('OGP_LANG_default_allowed', "Allowed by default"); define('OGP_LANG_allow_port_command', "Allow port command"); define('OGP_LANG_deny_port_command', "Deny port command"); define('OGP_LANG_allow_ip_port_command', "Allow IP:port command"); define('OGP_LANG_deny_ip_port_command', "Deny IP:port command"); define('OGP_LANG_enable_firewall_command', "Włącz komendy zapory"); define('OGP_LANG_disable_firewall_command', "Wyłącz komendy zapory"); define('OGP_LANG_get_firewall_status_command', "Pobierz status komend zapory"); define('OGP_LANG_reset_firewall_command', "Reset firewall command"); define('OGP_LANG_firewall_status', "Status zapory"); define('OGP_LANG_save_firewall_settings', "Zapisz ustawienia zapory"); define('OGP_LANG_reset_firewall', "Restart zapory"); define('OGP_LANG_firewall_settings', "Ustawienia Zapory"); define('OGP_LANG_display_public_ip', "Display Public IP"); ?>
rocco27/OGP-Website
lang/Polish/modules/server.php
PHP
gpl-2.0
9,072
/******************************************************************* // Copyright (c) 2002, 2003, 2004, 2005, // Robert Umbehant // mailto:rumbehant@wheresjames.com // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License as // published by the Free Software Foundation; either version 2 of // the License, or (at your option) any later version. // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // You should have received a copy of the GNU General Public // License along with this program; if not, write to the Free // Software Foundation, Inc., 59 Temple Place, Suite 330, // Boston, MA 02111-1307 USA // *******************************************************************/ // PgDate.cpp : implementation file // #include "stdafx.h" #include "vp.h" #include "PgDate.h" #include "MainFrm.h" #include "VpDoc.h" #include "VpView.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // CPgDate dialog CPgDate::CPgDate(CWnd* pParent /*=NULL*/) : CDialog(CPgDate::IDD, pParent) { //{{AFX_DATA_INIT(CPgDate) m_nGmt = 0; m_sSep = _T(""); m_nStyle = 0; //}}AFX_DATA_INIT } void CPgDate::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); //{{AFX_DATA_MAP(CPgDate) DDX_Control(pDX, IDC_FORMAT, m_comboFormat); DDX_Radio(pDX, IDC_GMT, m_nGmt); DDX_Text(pDX, IDC_SEP, m_sSep); DDX_Radio(pDX, IDC_STYLE2, m_nStyle); //}}AFX_DATA_MAP } BEGIN_MESSAGE_MAP(CPgDate, CDialog) //{{AFX_MSG_MAP(CPgDate) ON_CBN_SELCHANGE(IDC_FORMAT, OnSelchangeFormat) ON_BN_CLICKED(IDC_GMT, OnGmt) ON_BN_CLICKED(IDC_GMT2, OnGmt2) ON_EN_CHANGE(IDC_SEP, OnChangeSep) ON_BN_CLICKED(IDC_STYLE2, OnStyle2) ON_BN_CLICKED(IDC_STYLE3, OnStyle3) //}}AFX_MSG_MAP ON_MESSAGE( WM_PG_REFRESH, OnRefresh ) END_MESSAGE_MAP() // %h = hour 12 hour fixed 2 digits // %H = hour 12 hour // %g = hour 24 hour fixed 2 digits // %G = hour 24 hour // %m = minute fixed 2 digits // %G = minute // %s = second fixed 2 digits // %S = second // %a = am/pm // %A = AM/PM // %c = Month [01-12] fixed 2 digits // %C = Month [1-12] // %d = Day [01-31] fixed 2 digits // %D = Day [1-31] // %i = Day of the week [0-6] // %I = Day of the week [1-7] // %y = 2 digit year // %Y = 4 digit year // %a = am/pm // %A = AM/PM // %w = Abbreviated day of week [Sun,Mon,Tue,Wed,Thu,Fri,Sat] // %W = Day of week [Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday] // %b = Abbreviated Month [Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec] // %B = Month [January,February,March,April,May,June,July,August,September,October,November,December] static char *g_dates[] = { "Sat, Dec 25, 2002", "%w, %b %D, %Y", "Saturday, December 25, 2002", "%W, %B %D, %Y", "American (12-25-2002)", "%c-%d-%Y", "American (12-25-02)", "%c-%d-%y", "European (25-12-2002)", "%d-%c-%Y", "European (25-12-02)", "%d-%c-%y", "Internet (2002.12.25)", "%Y.%c.%d", NULL, NULL }; ///////////////////////////////////////////////////////////////////////////// // CPgDate message handlers BOOL CPgDate::OnInitDialog() { CDialog::OnInitDialog(); // Add date tags int item = m_comboFormat.AddString( "< custom >" ); if ( item != CB_ERR ) m_comboFormat.SetItemData( item, MAXDWORD ); for ( DWORD x = 0; g_dates[ x << 1 ] != NULL; x ++ ) { item = m_comboFormat.AddString( g_dates[ x << 1 ] ); if ( item != CB_ERR ) m_comboFormat.SetItemData( item, x ); } // end for OnRefresh( 0, 0L ); return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE } LRESULT CPgDate::OnRefresh(WPARAM wParam, LPARAM lParam) { LPFX pfx = EDIT().GetEditFx(); if ( pfx == NULL ) { UpdateData( FALSE ); return -1; } if ( ( pfx->f1 & FXF1_GMT ) != 0 ) m_nGmt = 1; else m_nGmt = 0; if ( ( pfx->f1 & FXF1_ANALOGCAL ) != 0 ) m_nStyle = 1; else m_nStyle = 0; m_sSep = pfx->sep; // Set backward compatible date format if ( ( pfx->f1 & FXF1_DATEFORM1 ) != 0 ) CComCtrl::ComboSelectItemByData( m_comboFormat.GetSafeHwnd(), 0 ); else if ( ( pfx->f1 & FXF1_DATEFORM2 ) != 0 ) CComCtrl::ComboSelectItemByData( m_comboFormat.GetSafeHwnd(), 1 ); else if ( ( pfx->f1 & FXF1_DATEFORM3 ) != 0 ) CComCtrl::ComboSelectItemByData( m_comboFormat.GetSafeHwnd(), 2 ); else if ( ( pfx->f1 & FXF1_DATEFORM4 ) != 0 ) CComCtrl::ComboSelectItemByData( m_comboFormat.GetSafeHwnd(), 3 ); else if ( ( pfx->f1 & FXF1_DATEFORM5 ) != 0 ) CComCtrl::ComboSelectItemByData( m_comboFormat.GetSafeHwnd(), 4 ); else if ( ( pfx->f1 & FXF1_DATEFORM6 ) != 0 ) CComCtrl::ComboSelectItemByData( m_comboFormat.GetSafeHwnd(), 5 ); else if ( ( pfx->f1 & FXF1_DATEFORM7 ) != 0 ) CComCtrl::ComboSelectItemByData( m_comboFormat.GetSafeHwnd(), 6 ); // Assume no backward compatible needed else { // See if user has selected a common template BOOL bSel = FALSE; for ( DWORD x = 0; !bSel && g_dates[ ( x << 1 ) + 1 ] != NULL; x ++ ) if ( !strcmp( pfx->sep, g_dates[ ( x << 1 ) + 1 ] ) ) { bSel = TRUE; CComCtrl::ComboSelectItemByData( m_comboFormat.GetSafeHwnd(), x ); } // Select custom tag if ( !bSel ) CComCtrl::ComboSelectItemByData( m_comboFormat.GetSafeHwnd(), MAXDWORD ); } // end else // Clear old date flags pfx->f1 &= ~( FXF1_DATEFORM1 | FXF1_DATEFORM2 | FXF1_DATEFORM3 | FXF1_DATEFORM4 | FXF1_DATEFORM5 | FXF1_DATEFORM6 | FXF1_DATEFORM7 ); UpdateData( FALSE ); return 0; } void CPgDate::OnSelchangeFormat() { int sel = m_comboFormat.GetCurSel(); if ( sel == CB_ERR ) return; LPFX pfx = EDIT().GetEditFx(); if ( pfx == NULL ) return; // For backward compatibility pfx->f1 &= ~( FXF1_DATEFORM1 | FXF1_DATEFORM2 | FXF1_DATEFORM3 | FXF1_DATEFORM4 | FXF1_DATEFORM5 | FXF1_DATEFORM6 | FXF1_DATEFORM7 ); // Get users format DWORD data = m_comboFormat.GetItemData( sel ); if ( data == MAXDWORD ) return; // Find the selection BOOL bSel = FALSE; for ( DWORD x = 0; !bSel && g_dates[ ( x << 1 ) + 1 ] != NULL; x ++ ) if ( x == data ) { bSel = TRUE; strcpy_sz( pfx->sep, g_dates[ ( x << 1 ) + 1 ] ); } if ( !bSel ) return; // Update m_sSep = pfx->sep; UpdateData( FALSE ); APP()->ReGen(); CFx::AdjustRect( pfx ); APP()->ReGen(); } void CPgDate::OnGmt() { UpdateData( TRUE ); LPFX pfx = EDIT().GetEditFx(); if ( pfx == NULL ) { UpdateData( FALSE ); return; } pfx->f1 &= ~FXF1_GMT; APP()->ReGen(); } void CPgDate::OnGmt2() { UpdateData( TRUE ); LPFX pfx = EDIT().GetEditFx(); if ( pfx == NULL ) { UpdateData( FALSE ); return; } pfx->f1 |= FXF1_GMT; APP()->ReGen(); } void CPgDate::OnChangeSep() { UpdateData( TRUE ); LPFX pfx = EDIT().GetEditFx(); if ( pfx == NULL ) return; strcpy_sz( pfx->sep, m_sSep ); APP()->ReGen(); CFx::AdjustRect( pfx ); } void CPgDate::OnOK() { } void CPgDate::OnCancel() { } void CPgDate::OnStyle2() { UpdateData( TRUE ); LPFX pfx = EDIT().GetEditFx(); if ( pfx == NULL ) { UpdateData( FALSE ); return; } pfx->f1 &= ~FXF1_ANALOGCAL; APP()->ReGen(); } void CPgDate::OnStyle3() { UpdateData( TRUE ); LPFX pfx = EDIT().GetEditFx(); if ( pfx == NULL ) { UpdateData( FALSE ); return; } pfx->f1 |= FXF1_ANALOGCAL; APP()->ReGen(); }
wheresjames/wpub
PgDate.cpp
C++
gpl-2.0
7,469
/******************************************************************** Screen Styles for the Wrap Plugin (additional to all.css) ********************************************************************/ /* box ********************************************************************/ .dokuwiki .wrap_box { background: __background_alt__; color: __text__; } .dokuwiki div.wrap_box, .dokuwiki div.wrap_danger, .dokuwiki div.wrap_warning, .dokuwiki div.wrap_caution, .dokuwiki div.wrap_notice, .dokuwiki div.wrap_safety { padding: 1em 1em .5em; margin-bottom: 1.5em; overflow: hidden; } .dokuwiki span.wrap_box, .dokuwiki span.wrap_danger, .dokuwiki span.wrap_warning, .dokuwiki span.wrap_caution, .dokuwiki span.wrap_notice, .dokuwiki span.wrap_safety { padding: 0 .3em; } /*____________ notes with icons ____________*/ /* general styles for all note divs */ .dokuwiki div.wrap_info, .dokuwiki div.wrap_important, .dokuwiki div.wrap_alert, .dokuwiki div.wrap_tip, .dokuwiki div.wrap_help, .dokuwiki div.wrap_todo, .dokuwiki div.wrap_download { padding: 1em 1em .5em 70px; margin-bottom: 1.5em; min-height: 68px; background-position: 10px 50%; background-repeat: no-repeat; color: inherit; overflow: hidden; } /* general styles for all note spans */ .dokuwiki span.wrap_info, .dokuwiki span.wrap_important, .dokuwiki span.wrap_alert, .dokuwiki span.wrap_tip, .dokuwiki span.wrap_help, .dokuwiki span.wrap_todo, .dokuwiki span.wrap_download { padding: 0 2px 0 20px; min-height: 20px; background-position: 2px 50%; background-repeat: no-repeat; color: inherit; } /* sorry for icons glued to the right side, but there is currently no way to make this look good without adjusting the images themselves */ [dir=rtl] .dokuwiki div.wrap_info, [dir=rtl] .dokuwiki div.wrap_important, [dir=rtl] .dokuwiki div.wrap_alert, [dir=rtl] .dokuwiki div.wrap_tip, [dir=rtl] .dokuwiki div.wrap_help, [dir=rtl] .dokuwiki div.wrap_todo, [dir=rtl] .dokuwiki div.wrap_download { padding: 1em 60px .5em 1em; background-position: right 50%; } [dir=rtl] .dokuwiki span.wrap_info, [dir=rtl] .dokuwiki span.wrap_important, [dir=rtl] .dokuwiki span.wrap_alert, [dir=rtl] .dokuwiki span.wrap_tip, [dir=rtl] .dokuwiki span.wrap_help, [dir=rtl] .dokuwiki span.wrap_todo, [dir=rtl] .dokuwiki span.wrap_download { padding: 0 18px 0 2px; background-position: right 50%; } /*____________ info ____________*/ .dokuwiki .wrap_info { background-color: #d1d7df; } .dokuwiki .wrap__dark.wrap_info { background-color: #343e4a; } .dokuwiki div.wrap_info { background-image: url(images/note/48/info.png); } .dokuwiki span.wrap_info { background-image: url(images/note/16/info.png); } /*____________ important ____________*/ .dokuwiki .wrap_important { background-color: #ffd39f; } .dokuwiki .wrap__dark.wrap_important { background-color: #6c3b00; } .dokuwiki div.wrap_important { background-image: url(images/note/48/important.png); } .dokuwiki span.wrap_important { background-image: url(images/note/16/important.png); } /*____________ alert ____________*/ .dokuwiki .wrap_alert { background-color: #ffbcaf; } .dokuwiki .wrap__dark.wrap_alert { background-color: #6b1100; } .dokuwiki div.wrap_alert { background-image: url(images/note/48/alert.png); } .dokuwiki span.wrap_alert { background-image: url(images/note/16/alert.png); } /*____________ tip ____________*/ .dokuwiki .wrap_tip { background-color: #fff79f; } .dokuwiki .wrap__dark.wrap_tip { background-color: #4a4400; } .dokuwiki div.wrap_tip { background-image: url(images/note/48/tip.png); } .dokuwiki span.wrap_tip { background-image: url(images/note/16/tip.png); } /*____________ help ____________*/ .dokuwiki .wrap_help { background-color: #dcc2ef; } .dokuwiki .wrap__dark.wrap_help { background-color: #3c1757; } .dokuwiki div.wrap_help { background-image: url(images/note/48/help.png); } .dokuwiki span.wrap_help { background-image: url(images/note/16/help.png); } /*____________ todo ____________*/ .dokuwiki .wrap_todo { background-color: #c2efdd; } .dokuwiki .wrap__dark.wrap_todo { background-color: #17573e; } .dokuwiki div.wrap_todo { background-image: url(images/note/48/todo.png); } .dokuwiki span.wrap_todo { background-image: url(images/note/16/todo.png); } /*____________ download ____________*/ .dokuwiki .wrap_download { background-color: #d6efc2; } .dokuwiki .wrap__dark.wrap_download { background-color: #345717; } .dokuwiki div.wrap_download { background-image: url(images/note/48/download.png); } .dokuwiki span.wrap_download { background-image: url(images/note/16/download.png); } /*____________ safety notes ____________*/ .dokuwiki .wrap_danger { background-color: #c00; color: #fff; } .dokuwiki .wrap_warning { background-color: #f60; color: #000; } .dokuwiki .wrap_caution { background-color: #ff0; color: #000; } .dokuwiki .wrap_notice { background-color: #06f; color: #fff; } .dokuwiki .wrap_safety { background-color: #090; color: #fff; } /* mark ********************************************************************/ .dokuwiki .wrap_hi { background-color: #ff9; overflow: hidden; } .dokuwiki .wrap__dark.wrap_hi { background-color: #4e4e0d; } /* miscellaneous ********************************************************************/ /*____________ spoiler ____________*/ .dokuwiki .wrap_spoiler { background-color: __background__ !important; color: __background__ !important; border: 1px dotted red; } /*____________ only print ____________*/ .dokuwiki .wrap_onlyprint { display: none; } /*____________ tabs ____________*/ /* in addition to template styles */ .dokuwiki .plugin_wrap.tabs { margin-bottom: 1.4em; }
brontosaurusrex/dokuwiki-preconfigured
lib/plugins/wrap/style.css
CSS
gpl-2.0
5,737
<!-- Author: W3layouts Author URL: http://w3layouts.com License: Creative Commons Attribution 3.0 Unported License URL: http://creativecommons.org/licenses/by/3.0/ --> <!DOCTYPE html> <html> <head> <title>SeaWater Fox - Exquisite IT Services</title> <link rel='shortcut icon' href='swf_icon.ico' type='image/x-icon' /> <link href="../res/css/bootstrap.css" rel='stylesheet' type='text/css' /> <!-- Custom Theme files --> <link href="css/style.css?ver=0.000000000006" rel="stylesheet" type="text/css" media="all" /> <!-- Custom Theme files --> <script src="../res/js/jquery.min.js"></script> <!-- Custom Theme files --> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <script type="application/x-javascript"> addEventListener("load", function() { setTimeout(hideURLbar, 0); }, false); function hideURLbar(){ window.scrollTo(0,1); } </script> <!--webfont--> <link href='//fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800' rel='stylesheet' type='text/css'> <link href='//fonts.googleapis.com/css?family=Lato:100,300,400,700,900,100italic,300italic,400italic,700italic,900italic' rel='stylesheet' type='text/css'> <!-- FontAwesome --> <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css"> <!-- Owl Stylesheets --> <link rel="stylesheet" href="css/flexslider.css?ver=0.1" type="text/css" media="screen" /> <script type="text/javascript" src="js/move-top.js"></script> <script type="text/javascript" src="js/easing.js"></script> <script type="text/javascript"> jQuery(document).ready(function($) { $(".scroll").click(function(event){ event.preventDefault(); $('html,body').animate({scrollTop:$(this.hash).offset().top},1200); }); }); </script> <!--Animation--> <script src="js/wow.min.js"></script> <link href="css/animate.css" rel='stylesheet' type='text/css' /> <script> new WOW().init(); </script> </head> <body> <!-- header-section-starts --> <div class="header" id="home"> <div class="container"> <div class="logo wow fadeInRight" data-wow-delay="0.4s"> <a href="#"><img src="images/logo.png" alt="" /></a> </div> <span class="menu"></span> <div class="top-menu wow fadeInLeft" data-wow-delay="0.4s"> <ul> <li><a class="active scroll hvr-shutter-out-horizontal" href="#home">Home</a></li> <li><a class="scroll hvr-shutter-out-horizontal" href="#service">Service &amp; Attributes</a></li> <li><a class="scroll hvr-shutter-out-horizontal" href="#about">About us</a></li> <li><a class="scroll hvr-shutter-out-horizontal" href="#pricing">Hourly Rates</a></li> <li><a class="scroll hvr-shutter-out-horizontal" href="#work">How it works</a></li> <li><a class="scroll hvr-shutter-out-horizontal" href="#clients">Happy Clients</a></li> <li><a class="scroll hvr-shutter-out-horizontal" href="#contact">Contact Us</a></li> </ul> </div> <!-- script for menu --> <script> $( "span.menu" ).click(function() { $( ".top-menu" ).slideToggle( "slow", function() { // Animation complete. }); }); </script> <!-- script for menu --> <div class="clearfix"></div> </div> </div> <div class="banner wow fadeInUp" data-wow-delay="0.4s"> <div class="container"> <div class="banner-info text-center"> <h2 class="wow bounceInLeft" data-wow-delay="0.4s">Elegant service without the grand price</h2> <p class="wow bounceInLeft" data-wow-delay="0.4s">Computer repair, network troubleshooting, and miscellaneous technological support. iOS, Linux, Windows, Mac OS X, and DD-WRT.</p> <br /> <!--<div class="details wow fadeInLeft" data-wow-delay="0.4s"> <form> <li> <input type="text" class="text" value="Full Name" onfocus="this.value = '';" onblur="if (this.value == '') {this.value = 'Full Name';}"> <a class="name" href="#"></a> </li> <li> <input type="text" class="text" value="Email Address" onfocus="this.value = '';" onblur="if (this.value == '') {this.value = 'Email Address';}"> <a class="mail" href="#"></a> </li> <li> <input type="text" class="text" value="Phone Number" onfocus="this.value = '';" onblur="if (this.value == '') {this.value = 'Phone Number';}"> <a class="num" href="#"></a> </li> <input type="submit" value="Request a quote"> </form> </div>--> </div> <div class="header-bottom"> <div class="right-grid-1"> <section class="slider"> <div class="flexslider"> <ul class="slides"> <!-- Slide ratio is as follows: 1.587301587301587 --> <li> <img src="images/picture1_keyboard.jpg" class="img-responsive" alt="" /> </li> <li> <img src="images/os3.jpg" class="img-responsive" alt="" /> </li> <li> <img src="images/square_ccs.png" class="img-responsive" alt="" /> </li> </ul> </div> </section> <!-- FlexSlider --> <script defer src="js/jquery.flexslider.js"></script> <script type="text/javascript"> $(window).load(function(){ $('.flexslider').flexslider({ animation: "slide", start: function(slider){ $('body').removeClass('loading'); } }); }); </script> </div> </div> </div> </div> <div class="content"> <div class="service-section" id="service"> <div class="container"> <div class="service-section-head text-center wow fadeInRight" data-wow-delay="0.4s"> <h3>Our Services<!-- &amp; Core Attributes--></h3> <!-- No, no... just service.. no, no... --> <p>Making sure that technology is adequately serviced since 2015.</p> </div> <div class="service-section-grids"> <div class="col-md-6 service-grid"> <div class="service-section-grid wow bounceIn" data-wow-delay="0.4s"> <div class="icon"> <i class="fa fa-wrench"></i> </div> <div class="icon-text"> <h4>General Repair</h4> <p>iPhone acting funny? Experiencing the infamous Blue Screen of Death? We can fix it; satisfaction guaranteed or your money back!<br /></p> </div> <div class="clearfix"></div> </div> <div class="service-section-grid wow bounceIn" data-wow-delay="0.4s"> <div class="icon"> <i class="fa fa-wifi"></i> </div> <div class="icon-text"> <h4>Network Troubleshooting</h4> <p>Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their infancy</p> </div> <div class="clearfix"></div> </div> <div class="service-section-grid wow bounceIn" data-wow-delay="0.4s"> <div class="icon"> <i class="fa fa-cloud"></i> </div> <div class="icon-text"> <h4>Free Online Support</h4> <p>We are proud to offer online support for free, across the globe. Find us on <a href="https://www.facebook.com/seawaterfox">Facebook</a>, <a href="https://www.twitter.com/seawaterfox">Twitter</a>, or <a href="mailto://contact@seawaterfox.com">shoot us an email</a> for quick help, no matter your location.</p> </div> <div class="clearfix"></div> </div> </div> <div class="col-md-6 service-grid"> <div class="service-section-grid wow bounceIn" data-wow-delay="0.4s"> <div class="icon"> <i class="fa fa-cog"></i> </div> <div class="icon-text"> <h4>Custom PC Building</h4> <p>Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their infancy</p> </div> <div class="clearfix"></div> </div> <div class="service-section-grid wow bounceIn" data-wow-delay="0.4s"> <div class="icon"> <i class="fa fa-battery-full"></i> </div> <div class="icon-text"> <h4>Optimizations / Tune-Ups</h4> <p>There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humouror randomised words which don't look even slightly believable.</p> </div> <div class="clearfix"></div> </div> <div class="service-section-grid wow bounceIn" data-wow-delay="0.4s"> <div class="icon"> <i class="fa fa-terminal"></i> </div> <div class="icon-text"> <h4>Website Management (LAMP &amp; LEMP)</h4> <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer.</p> </div> <div class="clearfix"></div> </div> </div> <div class="clearfix"></div> </div> </div> </div> <div class="about-section" id="about"> <div class="col-md-6 about_left wow bounceInLeft"> <img src="images/about_pic.jpg" alt="" /> </div> <div class="col-md-6 about_right wow bounceInRight"> <h3>About us</h3> <p>Founded in 2015, SeaWater Fox is an upcoming technology-orientated business that specializes in creating a better tomorrow through intricate software and service. We strive to deliver exemplary electronic support and opportunity to a wide audience, servicing the greater Niles area.<br /> SeaWater Fox focuses on Christian-based philosophies and actions: prompt, kind spirited service. This also means that SeaWater Fox is not open on Sundays to take the time to worship and encourage others to do the same.</p> <a href="#">Read more</a> </div> <div class="clearfix"></div> </div> <div class="price-section" id="pricing"> <div class="container"> <div class="price-section-head text-center wow fadeInLeft" data-wow-delay="0.4s"> <h3>Pricing Structure</h3> <p>One price simply doesn't fit all.</p> </div> <div class="price-section-grids"> <div class="col-md-4 price-value text-center wow fadeInLeft" data-wow-delay="0.4s"> <div class="price-section-grid"> <h5>Express Service</h5> <h3><span>$</span>10</h3> <p>for 30 minutes (or less) of service</p> <ul> <li>Pay only for what you need</li> <li>Small, easy fixes and services</li> <li>Full service, less time</li> </ul> <!-- <a href="#">Learn More</a> --> </div> </div> <div class="col-md-4 price-value text-center wow fadeInUp" data-wow-delay="0.6s"> <div class="price-section-grid"> <h5>Standard Service</h5> <h3><span>$</span>25</h3> <p>per hour</p> <ul> <li>General Troubleshooting</li> <li>General Installation</li> <li>Discountable</li> </ul> <!-- <a href="#">Learn More</a> --> </div> </div> <div class="col-md-4 price-value text-center wow fadeInRight" data-wow-delay="0.4s"> <div class="price-section-grid"> <h5>Advanced Service</h5> <h3><span>$</span>50</h3> <p>per hour</p> <ul> <li>Service / Deployment Consulting</li> <li>Advanced Installation</li> <li>Satisfaction Guaranteed</li> </ul> <!-- <a href="#">Learn More</a> --> </div> </div> <div class="clearfix"></div> </div> </div> </div> <div class="work-section" id="work"> <div class="container"> <div class="work-section-head text-center wow fadeInRight" data-wow-delay="0.4s"> <h3>How it works</h3> <p>A preview into the intricate interworkings of our technicians.</p> </div> <div class="work-section-grids text-center wow fadeInUp" data-wow-delay="0.4s"> <div class="col-md-3 work-section-grid"> <i class="ear-phones"></i> <h4>Step 1</h4> <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been</p> <span class="arrow1"><img src="images/arrow1.png" alt="" /></span> </div> <div class="col-md-3 work-section-grid wow fadeInUp" data-wow-delay="0.6s"> <i class="lock"></i> <h4>Step 2</h4> <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been</p> <span class="arrow2"><img src="images/arrow2.png" alt="" /></span> </div> <div class="col-md-3 work-section-grid wow fadeInUp" data-wow-delay="0.8s"> <i class="cloud"></i> <h4>Step 3</h4> <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been</p> <span class="arrow1"><img src="images/arrow1.png" alt="" /></span> </div> <div class="col-md-3 work-section-grid wow fadeInUp" data-wow-delay="0.10s"> <i class="done"></i> <h4>Step 4</h4> <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been</p> </div> <div class="clearfix"></div> <a class="work scroll" href="#contact">Get in touch</a> </div> </div> </div> <div class="happy-clients" id="clients"> <div class="container"> <div class="happy-clients-head text-center wow fadeInRight" data-wow-delay="0.4s"> <h3>Happy Clients</h3> <p>Be sure that we are a reliable solution. Don't worry, we'll wait.</p> </div> <div class="happy-clients-grids"> <div class="col-md-6 happy-clients-grid wow bounceIn" data-wow-delay="0.4s"> <div class="client"> <img src="images/client_1.jpg" alt="" /> </div> <div class="client-info"> <p><img src="images/open-quatation.jpg" class="open" alt="" />Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make.<img src="images/close-quatation.jpg" class="closeq" alt="" /></p> <h4><a href="#">Darwin Michle, </a>Project manager</h3> </div> <div class="clearfix"></div> </div> <div class="col-md-6 happy-clients-grid span_66 wow bounceIn" data-wow-delay="0.4s"> <div class="client"> <img src="images/client_2.jpg" alt="" /> </div> <div class="client-info"> <p><img src="images/open-quatation.jpg" class="open" alt="" />Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.<img src="images/close-quatation.jpg" class="closeq" alt="" /></p> <h4><a href="#">Madam Elisabath, </a>Creative Director</h3> </div> <div class="clearfix"></div> </div> <div class="col-md-6 happy-clients-grid wow bounceIn" data-wow-delay="0.4s"> <div class="client"> <img src="images/client_3.jpg" alt="" /> </div> <div class="client-info"> <p><img src="images/open-quatation.jpg" class="open" alt="" />Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make.<img src="images/close-quatation.jpg" class="closeq" alt="" /></p> <h4><a href="#">Clips arter, </a>Lipsum directer</h3> </div> <div class="clearfix"></div> </div> <div class="col-md-6 happy-clients-grid span_66 wow bounceIn" data-wow-delay="0.4s"> <div class="client"> <img src="images/client_4.jpg" alt="" /> </div> <div class="client-info"> <p><img src="images/open-quatation.jpg" class="open" alt="" />Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.<img src="images/close-quatation.jpg" class="closeq" alt="" /></p> <h4><a href="#">zam cristafr, </a>manager</h3> </div> <div class="clearfix"></div> </div> <div class="clearfix"></div> </div> </div> </div> <div class="contact-section" id="contact"> <div class="container"> <div class="contact-section-head text-center wow fadeInLeft" data-wow-delay="0.4s"> <h3>newsletter</h3> <p>Stay in the loop.</p> </div> <div class="form wow fadeInLeft" data-wow-delay="0.4s"> <form action="//seawaterfox.us10.list-manage.com/subscribe/post?u=984d3ee8dc5cd7123018f9293&amp;id=7a9fe3fea3" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" novalidate> <li> <input type="text" class="text" value="First Name" name="FNAME" id="mce-FNAME" onfocus="this.value = '';" onblur="if (this.value == '') {this.value = 'First Name';}"> <a class="name"></a> </li> <li> <input type="text" class="text" value="Last Name" name="LNAME" id="mce-LNAME" onfocus="this.value = '';" onblur="if (this.value == '') {this.value = 'Last Name';}"> <a class="name"></a> </li> <li> <input type="email" class="text" value="Email Address" name="EMAIL" id="mce-EMAIL" onfocus="this.value = '';" onblur="if (this.value == '') {this.value = 'Email Address';}"> <a class="mail"></a> </li> <li style="position: absolute; left: -5000px;"><input type="text" name="b_984d3ee8dc5cd7123018f9293_7a9fe3fea3" tabindex="-1" value=""></li> <input type="submit" value="Subscribe" name="subscribe" id="mc-embedded-subscribe"> </form> </div> <div class="map"> <img src="images/map.jpg" alt="" /> <div class="location wow bounceIn" data-wow-delay="0.4s"> <div class="address text-center"> <h4>Location</h4> <p>Niles, MI 49120</p> <p>Phone: (574) 307-5336</p> <a href="mailto://contact@seawaterfox.com">contact@seawaterfox.com</a> <span class="locate"><img src="images/locate.png" alt="" /></span> </div> <div class="bottom-logo text-center"> <img src="images/logo.png" alt="" /> </div> </div> </div> <div class="contact-bottom text-center"> <div class="bottom-menu wow bounceInRight" data-wow-delay="0.4s"> <ul> <li><a class="scroll" href="#home">Home</a></li> <li><a class="scroll" href="#service">Service</a></li> <li><a class="scroll" href="#about">About us</a></li> <li><a class="scroll" href="#pricing">Hourly Rates</a></li> <li><a class="scroll" href="#work">How it works</a></li> <li><a class="scroll" href="#clients">Happy Clients</a></li> <li><a class="scroll" href="#contact">Contact Us</a></li> </ul> </div> <p class="call wow fadeInRight" data-wow-delay="0.4s"><i class="phone wow fadeInLeft" data-wow-delay="0.4s"></i> (574) 307-5336</p> <div class="social-icons"> <a class="wow bounceIn" data-wow-delay="0.4s" href="https://twitter.com/seawaterfox"><i class="twitter"></i></a> <a class="wow bounceIn" data-wow-delay="0.4s" href="https://facebook.com/seawaterfox"><i class="facebook"></i></a> <!-- Maybe later, but not right now. <a class="wow bounceIn" data-wow-delay="0.4s" href="#"><i class="googlepluse"></i></a> <a class="wow bounceIn" data-wow-delay="0.4s" href="#"><i class="linkedin"></i></a>--> </div> </div> </div> </div> </div> <div class="footer"> <div class="container"> <div class="copyright text-center wow bounceInLeft" data-wow-delay="0.4s"> <p>Copyright &copy; 2015 <a href="https://www.seawaterfox.com">SeaWater Fox, LLC</a>. All rights reserved. | Site Design by <a href="http://www.w3layouts.com">w3layouts.com</a></p> </div> </div> </div> <script type="text/javascript"> $(document).ready(function() { /* var defaults = { containerID: 'toTop', // fading element id containerHoverID: 'toTopHover', // fading element hover id scrollSpeed: 1200, easingType: 'linear' }; */ $().UItoTop({ easingType: 'easeOutQuart' }); }); </script> <a class="scroll" href="#home" id="toTop" style="display: block;"> <span id="toTopHover" style="opacity: 1;"> </span></a> </body> </html>
SeaWater-Fox/swf-website
seawaterfox.com/main/index.html
HTML
gpl-2.0
21,370
#ifndef POLARSSL_DH_H #define POLARSSL_DH_H /* for size_t */ #include <stdlib.h> typedef enum { POLARSSL_DH_NONE=0, POLARSSL_DH_DHM, POLARSSL_DH_EC, /* Need to specify which curve to use */ NACL_DH_CV25519, POLARSSL_DH_LWE, } dh_type_t; typedef struct { dh_type_t type; const char *name; void *(*ctx_alloc)( void ); void (*ctx_free)( void *ctx ); int (*gen_public)( void *ctx, int (*f_rng)(void *, unsigned char *, size_t), void *p_rng ); int (*compute_shared)( void *ctx, int (*f_rng)(void *, unsigned char *, size_t), void *p_rng ); int (*set_params)( void *ctx, const void *params ); int (*read_ske_params)( void *ctx, int *rlen, const unsigned char *buf, size_t blen ); int (*read_public)( void *ctx, const unsigned char *buf, size_t blen ); /* A "pk_ctx" represents an interface with a certificate * which is initialized in pk_parse_subpubkey() in library/pkparse.c */ int (*read_from_self_pk_ctx)( void *ctx, const void *pk_ctx ); int (*read_from_peer_pk_ctx)( void *ctx, const void *pk_ctx ); size_t (*getsize_ske_params)( const void *ctx ); int (*write_ske_params)( size_t *olen, unsigned char *buf, size_t blen, const void *ctx ); size_t (*getsize_public)( const void *ctx ); int (*write_public)( size_t *olen, unsigned char *buf, size_t blen, const void *ctx ); size_t (*getsize_premaster)( const void *ctx ); int (*write_premaster)( size_t *olen, unsigned char *buf, size_t blen, const void *ctx ); } dh_info2_t; typedef struct { const dh_info2_t *dh_info; void *dh_ctx; } dh_context2_t; const dh_info2_t * dh_get_info( dh_type_t type ); /* have to move to ssl layer later */ #include "polarssl/ssl_ciphersuites.h" #endif
fast-crypto-lab/PQ-polarssl
include/polarssl/dh.h
C
gpl-2.0
1,753
/* * This file is part of the KDE Libraries * Copyright (C) 1999-2000 Espen Sand (espen@kde.org) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public License * along with this library; see the file COPYING.LIB. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. * */ #ifndef _KHELPMENU_H_ #define _KHELPMENU_H_ #include <tqobject.h> #include <tqstring.h> #include <tdelibs_export.h> class TDEActionCollection; class TDEPopupMenu; class TQWidget; class TDEAboutData; class TDEAboutKDE; class KBugReport; class KDialogBase; class KHelpMenuPrivate; /** * @short Standard %KDE help menu with dialog boxes. * * This class provides the standard %KDE help menu with the default "about" * dialog boxes and help entry. * * This class is used in TDEMainWindow so * normally you don't need to use this class yourself. However, if you * need the help menu or any of its dialog boxes in your code that is * not subclassed from TDEMainWindow you should use this class. * * The usage is simple: * * \code * mHelpMenu = new KHelpMenu( this, <someText> ); * kmenubar->insertItem(i18n("&Help"), mHelpMenu->menu() ); * \endcode * * or if you just want to open a dialog box: * * \code * mHelpMenu = new KHelpMenu( this, <someText> ); * connect( this, TQT_SIGNAL(someSignal()), mHelpMenu,TQT_SLOT(mHelpMenu->aboutKDE())); * \endcode * * IMPORTANT: * The first time you use KHelpMenu::menu(), a TDEPopupMenu object is * allocated. Only one object is created by the class so if you call * KHelpMenu::menu() twice or more, the same pointer is returned. The class * will destroy the popupmenu in the destructor so do not delete this * pointer yourself. * * The KHelpMenu object will be deleted when its parent is destroyed but you * can delete it yourself if you want. The code below will always work. * * \code * MyClass::~MyClass() * { * delete mHelpMenu; * } * \endcode * * * Using your own "about application" dialog box: * * The standard "about application" dialog box is quite simple. If you * need a dialog box with more functionality you must design that one * yourself. When you want to display the dialog you can choose one of * two methods. Common for both is that you must make a help menu object * with no text argument If the text is missing the default dialog box * will not be displayed: * * Example 1 Using showAboutApplication signal (preferred) * \code * * void MyClass::myFunc() * { * .. * KHelpMenu *helpMenu = new KHelpMenu( this ); * connect( helpMenu, TQT_SIGNAL(showAboutApplication()), * this, TQT_SLOT(myDialogSlot())); * .. * } * * void MyClass::myDialogSlot() * { * <activate your custom dialog> * } * \endcode * * * Example 2 Old style - connecting directly to the menu entry. * \code * * void MyClass::myFunc() * { * KHelpMenu *helpMenu = new KHelpMenu( this ); * TDEPopupMenu *help = mHelpMenu->menu(); * help->connectItem( KHelpMenu::menuAboutApp, this, TQT_SLOT(myDialogSlot()) ); * } * * void MyClass::myDialogSlot() * { * <activate your custom dialog> * } * \endcode * * @author Espen Sand (espen@kde.org) */ class TDEUI_EXPORT KHelpMenu : public TQObject { Q_OBJECT public: enum MenuId { menuHelpContents = 0, menuWhatsThis = 1, menuAboutApp = 2, menuAboutKDE = 3, menuReportBug = 4, menuSwitchLanguage = 5 }; /** * Constructor. * * @param parent The parent of the dialog boxes. The boxes are modeless * and will be centered with respect to the parent. * @param aboutAppText User definable string that is used in the * application specific dialog box. Note: The help menu will * not open this dialog box if you don't define a string. See * showAboutApplication() for more information. * @param showWhatsThis Decides whether a "Whats this" entry will be * added to the dialog. * */ KHelpMenu( TQWidget *parent=0, const TQString &aboutAppText=TQString::null, bool showWhatsThis=true ); /** * Constructor. * * This alternative constructor is mainly useful if you want to * overide the standard actions (aboutApplication(), aboutKDE(), * helpContents(), reportBug, and optionally whatsThis). * * @param parent The parent of the dialog boxes. The boxes are modeless * and will be centered with respect to the parent. * @param aboutData User and app data used in the About app dialog * @param showWhatsThis Decides whether a "Whats this" entry will be * added to the dialog. * @param actions TDEActionCollection that is used instead of the * standard actions. * */ KHelpMenu( TQWidget *parent, const TDEAboutData *aboutData, bool showWhatsThis=true, TDEActionCollection *actions = 0 ); /** * Destructor * * Destroys dialogs and the menu pointer retuned by menu */ ~KHelpMenu(); /** * Returns a popup menu you can use in the menu bar or where you * need it. * * Note: This method will only create one instance of the menu. If * you call this method twice or more the same pointer is returned */ TDEPopupMenu *menu(); public slots: /** * Opens the help page for the application. The application name is * used as a key to determine what to display and the system will attempt * to open \<appName\>/index.html. */ void appHelpActivated(); /** * Activates What's This help for the application. */ void contextHelpActivated(); /** * Opens an application specific dialog box. The dialog box will display * the string that was defined in the constructor. If that string was * empty the showAboutApplication() is emitted instead. */ void aboutApplication(); /** * Opens the standard "About KDE" dialog box. */ void aboutKDE(); /** * Opens the standard "Report Bugs" dialog box. */ void reportBug(); /** * Opens changing default application language dialog box. */ void switchApplicationLanguage(); private slots: /** * Connected to the menu pointer (if created) to detect a delete * operation on the pointer. You should not delete the pointer in your * code yourself. Let the KHelpMenu destructor do the job. */ void menuDestroyed(); /** * Connected to the dialogs (about kde and bug report) to detect * when they are finished. */ void dialogFinished(); /** * This slot will delete a dialog (about kde or bug report) if the * dialog pointer is not zero and the the dialog is not visible. This * slot is activated by a one shot timer started in dialogHidden */ void timerExpired(); signals: /** * This signal is emitted from aboutApplication() if no * "about application" string has been defined. The standard * application specific dialog box that is normally activated in * aboutApplication() will not be displayed when this signal * is emitted. */ void showAboutApplication(); private: TDEPopupMenu *mMenu; KDialogBase *mAboutApp; TDEAboutKDE *mAboutKDE; KBugReport *mBugReport; TQString mAboutAppText; TQWidget *mParent; bool mShowWhatsThis; protected: virtual void virtual_hook( int id, void* data ); private: KHelpMenuPrivate *d; }; #endif
Fat-Zer/tdelibs
tdeui/khelpmenu.h
C
gpl-2.0
8,167
/* * ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd). * ircd_signal.h: A header for ircd signals. * * Copyright (C) 2002 by the past and present ircd coders, and others. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA * * $Id: ircd_signal.h,v 1.1.1.1 2002/12/31 04:07:25 demond Exp $ */ #ifndef INCLUDED_ircd_signal_h #define INCLUDED_ircd_signal_h extern void setup_signals(void); #endif /* INCLUDED_ircd_signal_h */
kirilk/ircd
include/ircd_signal.h
C
gpl-2.0
1,125
#pragma once #include "stdafx.h" class CSymbol; typedef enum { SYM_INVALID = -1, SYM_CODE, SYM_DATA, SYM_U8, SYM_U16, SYM_U32, SYM_U64, SYM_S8, SYM_S16, SYM_S32, SYM_S64, SYM_FLOAT, SYM_DOUBLE, SYM_VECTOR2, SYM_VECTOR3, SYM_VECTOR4, NUM_SYM_TYPES } symbol_type_id_t; typedef struct { symbol_type_id_t id; const char* name; int size; } symbol_type_info_t; typedef enum { ERR_SUCCESS, ERR_INVALID_TYPE, ERR_INVALID_ADDR, ERR_INVALID_NAME, ERR_MISSING_FIELDS, } symbol_parse_error_t; class CSymbolTable { public: CSymbolTable(CDebuggerUI* debugger); ~CSymbolTable(); private: CSymbolTable(); CDebuggerUI* m_Debugger; CriticalSection m_CS; std::vector<CSymbol> m_Symbols; int m_NextSymbolId; CFile m_SymFileHandle; char* m_SymFileBuffer; size_t m_SymFileSize; char* m_ParserToken; size_t m_ParserTokenLength; char* m_TokPos; char m_ParserDelimeter; char* m_SymFileParseBuffer; bool m_bHaveFirstToken; void ParserFetchToken(const char* delim); public: static symbol_type_info_t m_SymbolTypes[]; static const char* GetTypeName(int typeId); static int GetTypeSize(int typeId); static symbol_type_id_t GetTypeId(char* typeName); static bool CmpSymbolAddresses(CSymbol& a, CSymbol& b); void GetValueString(char* dst, CSymbol* symbol); CPath GetSymFilePath(); void Load(); void Save(); void ParseErrorAlert(char* message, int lineNumber); void AddSymbol(int type, uint32_t address, const char* name, const char* description = NULL); void Reset(); int GetCount(); bool GetSymbolById(int id, CSymbol* symbol); bool GetSymbolByIndex(size_t index, CSymbol* symbol); bool GetSymbolByAddress(uint32_t address, CSymbol* symbol); bool GetSymbolByOverlappedAddress(uint32_t address, CSymbol* symbol); bool RemoveSymbolById(int id); }; class CSymbol { public: int m_Id; int m_Type; uint32_t m_Address; char* m_Name; char* m_Description; CSymbol() : m_Id(0), m_Type(SYM_INVALID), m_Address(0), m_Name(NULL), m_Description(NULL) { } CSymbol(int id, int type, uint32_t address, const char* name, const char* description) : m_Id(id), m_Type(type), m_Address(address), m_Name(NULL), m_Description(NULL) { if (name != NULL) { m_Name = _strdup(name); } if (description != NULL) { m_Description = _strdup(description); } } CSymbol(const CSymbol& symbol): m_Id(symbol.m_Id), m_Type(symbol.m_Type), m_Address(symbol.m_Address), m_Name(NULL), m_Description(NULL) { m_Name = symbol.m_Name ? _strdup(symbol.m_Name) : NULL; m_Description = symbol.m_Description ? _strdup(symbol.m_Description) : NULL; } CSymbol& operator= (const CSymbol& symbol) { if (m_Name != NULL) { free(m_Name); } if (m_Description != NULL) { free(m_Description); } m_Id = symbol.m_Id; m_Type = symbol.m_Type; m_Address = symbol.m_Address; m_Name = symbol.m_Name ? _strdup(symbol.m_Name) : NULL; m_Description = symbol.m_Description ? _strdup(symbol.m_Description) : NULL; return *this; } ~CSymbol() { if (m_Name != NULL) { free(m_Name); } if (m_Description != NULL) { free(m_Description); } } const char* TypeName() { return CSymbolTable::GetTypeName(m_Type); } int TypeSize() { return CSymbolTable::GetTypeSize(m_Type); } };
JunielKatarn/project64
Source/Project64/UserInterface/Debugger/Symbols.h
C
gpl-2.0
3,905
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Microsoft.Xna.Framework; using Terraria; using Terraria.ModLoader; using LibEventManagerCSharp; namespace ElementalBoots.Items.Accessories.Tornado { class TornadoInABottle : Accessory { private static Color grayMultiplier = new Color(0.53f, 0.54f, 0.675f)*1.3f; private bool jumpAgain = true, dJumpEffect = false, tornado = false; private int dJumpEffectTime = 0; private float lastWingTime = 0; private int lastRocketTime = 0; public override void SetDefaults() { base.SetDefaults(); item.value = 1 * Value.GOLD; item.rare = 1; } public override void OnChestGenerated(ChestInfo chestInfo) { base.OnChestGenerated(chestInfo); if (chestInfo.height == ChestInfo.Height.SKY) chestInfo.AddLoot(item, 0.2f, true); } public override void OnUnEquip(Player player) { base.OnUnEquip(player); lastWingTime = 0; lastRocketTime = 0; } public override void UpdateAccessory(Player player, bool hideVisual) { base.UpdateAccessory(player, hideVisual); if (player.grappling[0] == -1 && !player.tongued && (player.jump == 0 || player.frozen) || player.pulley || (!(player.itemAnimation > 0 && player.inventory[player.selectedItem].useStyle != 10) && !player.mount.Active && !(player.inventory[player.selectedItem].holdStyle == 1 && (!player.wet || !player.inventory[player.selectedItem].noWet)) && !(player.inventory[player.selectedItem].holdStyle == 2 && (!player.wet || !player.inventory[player.selectedItem].noWet)) && !(player.inventory[player.selectedItem].holdStyle == 3) /*&& (player.inventory[player.selectedItem].subClass == null || !player.inventory[player.selectedItem].subClass.SetHoldFrame(player))*/ && player.grappling[0] >= 0)) dJumpEffect = false; if (!player.sandStorm) tornado = false; var onGround = player.velocity.Y == 0f || player.sliding; var onSlime = player.mount.Active && player.mount.Type == 3 && player.wetSlime > 0; if (player.mount.Active && player.mount.BlockExtraJumps) jumpAgain = false; else if (onGround) jumpAgain = true; if (player.controlJump && (player.releaseJump || (player.autoJump && onGround))) { if (player.grappling[0] >= 0) { if (player.releaseJump) jumpAgain = true; } else if (!player.pulley && !player.tongued && player.jump <= 0 && (onGround || onSlime || jumpAgain || player.jumpAgainCloud || player.jumpAgainBlizzard || player.jumpAgainSandstorm || player.jumpAgainFart || player.jumpAgainSail || (player.wet && player.accFlipper && (!player.mount.Active || player.mount.Type != 6)))) { var jump = !onSlime && jumpAgain; if (onGround || (player.autoJump && player.justJumped)) jumpAgain = true; else if (jump) jumpAgain = false; if (onSlime || onGround || (player.wet && player.accFlipper)) { // deactivate wings and rocket boots on first jump if (player.wingTime > 0) { lastWingTime = player.wingTime; player.wingTime = -1; } if (player.rocketTime > 0) { lastRocketTime = player.rocketTime; player.rocketTime = 0; } player.velocity.Y = -Player.jumpSpeed*player.gravDir; player.jump = Player.jumpHeight; if (player.sliding) player.velocity.X = 3f*-(float) player.slideDir; jump = false; } else if (jump) { dJumpEffect = true; Main.PlaySound(16, (int) player.position.X, (int) player.position.Y, 1); player.velocity.Y = -Player.jumpSpeed*player.gravDir; player.jump = Player.jumpHeight*3; } } } // reactivate wings and rocket boots after double jump if (!jumpAgain && !dJumpEffect) { if (lastWingTime > 0) { player.wingTime = lastWingTime; lastWingTime = 0; } if (lastRocketTime > 0) { player.rocketTime = lastRocketTime; lastRocketTime = 0; } } // jump effects if (dJumpEffect) { dJumpEffectTime++; if (!jumpAgain && ((player.gravDir >= 1f && player.velocity.Y < 0f) || (player.gravDir <= -1f && player.velocity.Y > 0f))) { var playerHeight = player.height; if (player.gravDir == -1f) { playerHeight = -6; } var scale = ((float) player.jump/75f + 1f)/2f; player.sandStorm = true; tornado = true; var tornadoWidth = dJumpEffectTime/20f + 1; for (var i = 0; i < tornadoWidth; i++) { var xOff = Main.rand.NextFloat()*player.width*tornadoWidth*2 - player.width*tornadoWidth; var gore = Gore.NewGore( new Vector2(player.Center.X + xOff - 18, player.position.Y + (float) (playerHeight/2)), new Vector2(-player.velocity.X, -player.velocity.Y), Main.rand.Next(61, 64) /*Main.rand.Next(220, 223)*/, scale); //Main.gore[gore].color = grayMultiplier; Main.gore[gore].velocity = player.velocity*0.3f*scale; Main.gore[gore].velocity.X -= xOff/(player.width*tornadoWidth)* (1 + Main.rand.NextFloat()*tornadoWidth); Main.gore[gore].velocity.Y += 3; Main.gore[gore].alpha = 100; } } // player turning effect if (player.sandStorm && tornado) { if (player.miscCounter%4 == 0 && player.itemAnimation == 0 && player.wingTime == 0f) { player.ChangeDir(player.direction*-1); if (player.inventory[player.selectedItem].holdStyle == 2) { if (player.inventory[player.selectedItem].type == 946) { player.itemLocation.X = player.position.X + (float) player.width*0.5f - (float) (16*player.direction); } if (player.inventory[player.selectedItem].type == 186) { player.itemLocation.X = player.position.X + (float) player.width*0.5f + (float) (6*player.direction); player.itemRotation = 0.79f*-(float) player.direction; } } } player.legFrameCounter = 0.0; player.legFrame.Y = 0; } //SpinPlayerEffect(player, true); } else { dJumpEffectTime = 0; } } private void SpinPlayerEffect(Player player, bool enabled) { if (enabled) { player.sandStorm = true; if (player.miscCounter%4 == 0 && player.itemAnimation == 0 && player.wingTime == 0f) { player.ChangeDir(player.direction*-1); if (player.inventory[player.selectedItem].holdStyle == 2) { if (player.inventory[player.selectedItem].type == 946) { player.itemLocation.X = player.position.X + (float) player.width*0.5f - (float) (16*player.direction); } if (player.inventory[player.selectedItem].type == 186) { player.itemLocation.X = player.position.X + (float) player.width*0.5f + (float) (6*player.direction); player.itemRotation = 0.79f*-(float) player.direction; } } } player.legFrameCounter = 0.0; player.legFrame.Y = 0; } } } }
LolHens/ElementalBoots
Items/Accessories/Tornado/TornadoInABottle.cs
C#
gpl-2.0
10,077
#ifndef __AQUA__INT_IDT_H #define __AQUA__INT_IDT_H #include "../types.h" #include "../common/print.h" #include "../common/system.h" #include "../memory/memset.h" struct idt_entry_t { uint16_t offset_low; uint16_t selector; uint8_t zero; uint8_t attrs; uint16_t offset_high; } __attribute__((packed)); struct idt_pointer_t { uint16_t size; uint32_t offset; } __attribute__((packed)); extern void idt_load(void); void set_idt_gate(uint8_t num, uint32_t loc); void register_idt(void); void set_idt_flags(uint8_t _flags); struct idt_entry_t get_entry(int num); #endif
obiwac/AQUA-2.X-x86
src/c/descr_tables/idt.h
C
gpl-2.0
619
package com.springmvc.example.controller; import java.util.ArrayList; import java.util.List; import java.util.Map; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.ModelAttribute; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.servlet.ModelAndView; import com.springmvc.example.formbean.Community; import com.springmvc.example.formbean.User; @Controller @RequestMapping(value = "/register") public class RegistrationController { @RequestMapping(method = RequestMethod.GET) public String viewRegistration(Map<String, Object> model) { System.out.println(">>>>>>>>>>In Registration Controller >>>>>>>>>>>"); User userForm = new User(); model.put("userForm", userForm); List<String> professionList = new ArrayList<String>(); professionList.add("Developer"); professionList.add("Designer"); professionList.add("IT Manager"); model.put("professionList", professionList); List communityList = new ArrayList(); communityList.add(new Community("Spring","Spring")); communityList.add(new Community("Hibernate","Hibernate")); communityList.add(new Community("Struts","Struts")); model.put("communityList", communityList); return "Registration"; } @RequestMapping(method = RequestMethod.POST) public String processRegistration(@ModelAttribute("userForm") User user, Map<String, Object> model) { System.out.println(">>>>>>>>>>>>>>>>> Get Data in Controller >>>>>>>>"); String gender = user.getGender(); String username = user.getUserName(); System.out.println("gender :: " + gender + "username :: " + username); return "RegistrationSucess"; } }
GeekBrains/springmvc-jpa
springmvc/springmvc-web/src/main/java/com/springmvc/example/controller/RegistrationController.java
Java
gpl-2.0
1,880
<?php namespace imbalance\Http\Transformers; class ProjectPackageTransformer extends Transformer { public function transform($projectPackage) { if (!$projectPackage) { return null; } return [ 'id' => (int)$projectPackage['id'], 'name' => $projectPackage['name'], 'repository' => $projectPackage['repository'], 'deploy_branch' => $projectPackage['deploy_branch'], 'deploy_location' => $projectPackage['deploy_location'], 'project_id' => (int)$projectPackage['project_id'], ]; } }
ImbalanceGaming/imbalance-gaming-laravel
app/Http/Transformers/ProjectPackageTransformer.php
PHP
gpl-2.0
610
using System; using MicrosoftResearch.Infer; using MicrosoftResearch.Infer.Distributions; using MicrosoftResearch.Infer.Collections; using MicrosoftResearch.Infer.Factors; namespace MicrosoftResearch.Infer.Models.User { /// <summary> /// Class for performing inference in model 'Model' using algorithm 'ExpectationPropagation'. /// </summary> /// <remarks> /// The easiest way to use this class is to wrap an instance in a CompiledAlgorithm object and use /// the methods on CompiledAlgorithm to set parameters and execute inference. /// /// If you instead wish to use this class directly, you must perform the following steps: /// 1) Create an instance of the class /// 2) Set the value of any externally-set fields e.g. data, priors /// 3) Call the Reset() method /// 4) Call the Initialise() method once /// 5) Call the Update() method multiple times - each call performs one iteration of inference /// 6) Use the XXXMarginal() methods to retrieve posterior marginals for different variables. /// /// Generated by Infer.NET 2.3 beta 4 at 19:26 on 29 May 2010. /// </remarks> public class Model35_EP : IIterativeProcess { #region Fields // Messages from uses of 'vbool90' public Bernoulli[] vbool90_uses_B; // The constant 'vBernoulli98' public Bernoulli vBernoulli98; // Message from definition of 'vbool90' public Bernoulli vbool90_F; // Messages from uses of 'vbool72' public Bernoulli[] vbool72_uses_B; // The constant 'vBernoulli80' public Bernoulli vBernoulli80; // Message from definition of 'vbool72' public Bernoulli vbool72_F; // Messages from uses of 'vbool210' public Bernoulli[] vbool210_uses_B; // Message from definition of 'vbool210' public Bernoulli vbool210_F; // Messages from uses of 'vbool155' public Bernoulli[] vbool155_uses_B; // The constant 'vBernoulli163' public Bernoulli vBernoulli163; // Message from definition of 'vbool155' public Bernoulli vbool155_F; // Messages from uses of 'vbool451' public Bernoulli[] vbool451_uses_B; // Message from definition of 'vbool451' public Bernoulli vbool451_F; // Messages from uses of 'vbool67' public Bernoulli[] vbool67_uses_B; // The constant 'vBernoulli75' public Bernoulli vBernoulli75; // Message from definition of 'vbool67' public Bernoulli vbool67_F; // Messages from uses of 'vbool407' public Bernoulli[] vbool407_uses_B; // Message from definition of 'vbool407' public Bernoulli vbool407_F; // Messages from uses of 'vbool163' public Bernoulli[] vbool163_uses_B; // The constant 'vBernoulli171' public Bernoulli vBernoulli171; // Message from definition of 'vbool163' public Bernoulli vbool163_F; // Messages from uses of 'vbool419' public Bernoulli[] vbool419_uses_B; // Message from definition of 'vbool419' public Bernoulli vbool419_F; // Messages from uses of 'vbool181' public Bernoulli[] vbool181_uses_B; // The constant 'vBernoulli189' public Bernoulli vBernoulli189; // Message from definition of 'vbool181' public Bernoulli vbool181_F; // Messages from uses of 'vbool441' public Bernoulli[] vbool441_uses_B; // Message from definition of 'vbool441' public Bernoulli vbool441_F; // Messages from uses of 'vbool46' public Bernoulli[] vbool46_uses_B; // The constant 'vBernoulli54' public Bernoulli vBernoulli54; // Message from definition of 'vbool46' public Bernoulli vbool46_F; // Messages from uses of 'vbool205' public Bernoulli[] vbool205_uses_B; // Message from definition of 'vbool205' public Bernoulli vbool205_F; // Messages from uses of 'vbool145' public Bernoulli[] vbool145_uses_B; // The constant 'vBernoulli153' public Bernoulli vBernoulli153; // Message from definition of 'vbool145' public Bernoulli vbool145_F; // Messages from uses of 'vbool402' public Bernoulli[] vbool402_uses_B; // Message from definition of 'vbool402' public Bernoulli vbool402_F; // Messages from uses of 'vbool116' public Bernoulli[] vbool116_uses_B; // The constant 'vBernoulli124' public Bernoulli vBernoulli124; // Message from definition of 'vbool116' public Bernoulli vbool116_F; // Messages from uses of 'vbool405' public Bernoulli[] vbool405_uses_B; // Message from definition of 'vbool405' public Bernoulli vbool405_F; // Messages from uses of 'vbool2' public Bernoulli[] vbool2_uses_B; // The constant 'vBernoulli10' public Bernoulli vBernoulli10; // Message from definition of 'vbool2' public Bernoulli vbool2_F; // Messages from uses of 'vbool404' public Bernoulli[] vbool404_uses_B; // Message from definition of 'vbool404' public Bernoulli vbool404_F; // Messages from uses of 'vbool406' public Bernoulli[] vbool406_uses_B; // Message from definition of 'vbool406' public Bernoulli vbool406_F; // Messages from uses of 'vbool408' public Bernoulli[] vbool408_uses_B; // Message from definition of 'vbool408' public Bernoulli vbool408_F; // Messages from uses of 'vbool420' public Bernoulli[] vbool420_uses_B; // Message from definition of 'vbool420' public Bernoulli vbool420_F; // Messages from uses of 'vbool103' public Bernoulli[] vbool103_uses_B; // The constant 'vBernoulli111' public Bernoulli vBernoulli111; // Message from definition of 'vbool103' public Bernoulli vbool103_F; // Messages from uses of 'vbool446' public Bernoulli[] vbool446_uses_B; // Message from definition of 'vbool446' public Bernoulli vbool446_F; // Messages from uses of 'vbool15' public Bernoulli[] vbool15_uses_B; // The constant 'vBernoulli23' public Bernoulli vBernoulli23; // Message from definition of 'vbool15' public Bernoulli vbool15_F; // Messages from uses of 'vbool189' public Bernoulli[] vbool189_uses_B; // Message from definition of 'vbool189' public Bernoulli vbool189_F; // Messages from uses of 'vbool20' public Bernoulli[] vbool20_uses_B; // The constant 'vBernoulli28' public Bernoulli vBernoulli28; // Message from definition of 'vbool20' public Bernoulli vbool20_F; // Messages from uses of 'vbool199' public Bernoulli[] vbool199_uses_B; // Message from definition of 'vbool199' public Bernoulli vbool199_F; // Messages from uses of 'vbool111' public Bernoulli[] vbool111_uses_B; // The constant 'vBernoulli119' public Bernoulli vBernoulli119; // Message from definition of 'vbool111' public Bernoulli vbool111_F; // Messages from uses of 'vbool215' public Bernoulli[] vbool215_uses_B; // Message from definition of 'vbool215' public Bernoulli vbool215_F; // Messages from uses of 'vbool216' public Bernoulli[] vbool216_uses_B; // Message from definition of 'vbool216' public Bernoulli vbool216_F; // Messages from uses of 'vbool107' public Bernoulli[] vbool107_uses_B; // The constant 'vBernoulli115' public Bernoulli vBernoulli115; // Message from definition of 'vbool107' public Bernoulli vbool107_F; // Messages from uses of 'vbool218' public Bernoulli[] vbool218_uses_B; // Message from definition of 'vbool218' public Bernoulli vbool218_F; // Messages from uses of 'vbool110' public Bernoulli[] vbool110_uses_B; // The constant 'vBernoulli118' public Bernoulli vBernoulli118; // Message from definition of 'vbool110' public Bernoulli vbool110_F; // Messages from uses of 'vbool221' public Bernoulli[] vbool221_uses_B; // Message from definition of 'vbool221' public Bernoulli vbool221_F; // Messages from uses of 'vbool108' public Bernoulli[] vbool108_uses_B; // The constant 'vBernoulli116' public Bernoulli vBernoulli116; // Message from definition of 'vbool108' public Bernoulli vbool108_F; // Messages from uses of 'vbool224' public Bernoulli[] vbool224_uses_B; // Message from definition of 'vbool224' public Bernoulli vbool224_F; // Messages from uses of 'vbool227' public Bernoulli[] vbool227_uses_B; // Message from definition of 'vbool227' public Bernoulli vbool227_F; // Messages from uses of 'vbool230' public Bernoulli[] vbool230_uses_B; // Message from definition of 'vbool230' public Bernoulli vbool230_F; // Messages from uses of 'vbool109' public Bernoulli[] vbool109_uses_B; // The constant 'vBernoulli117' public Bernoulli vBernoulli117; // Message from definition of 'vbool109' public Bernoulli vbool109_F; // Messages from uses of 'vbool233' public Bernoulli[] vbool233_uses_B; // Message from definition of 'vbool233' public Bernoulli vbool233_F; // Messages from uses of 'vbool236' public Bernoulli[] vbool236_uses_B; // Message from definition of 'vbool236' public Bernoulli vbool236_F; // Messages from uses of 'vbool239' public Bernoulli[] vbool239_uses_B; // Message from definition of 'vbool239' public Bernoulli vbool239_F; // Messages from uses of 'vbool403' public Bernoulli[] vbool403_uses_B; // Message from definition of 'vbool403' public Bernoulli vbool403_F; // Messages from uses of 'vbool287' public Bernoulli[] vbool287_uses_B; // Message from definition of 'vbool287' public Bernoulli vbool287_F; // Messages from uses of 'vbool368' public Bernoulli[] vbool368_uses_B; // Message from definition of 'vbool368' public Bernoulli vbool368_F; // Messages from uses of 'vbool63' public Bernoulli[] vbool63_uses_B; // The constant 'vBernoulli71' public Bernoulli vBernoulli71; // Message from definition of 'vbool63' public Bernoulli vbool63_F; // Messages from uses of 'vbool141' public Bernoulli[] vbool141_uses_B; // The constant 'vBernoulli149' public Bernoulli vBernoulli149; // Message from definition of 'vbool141' public Bernoulli vbool141_F; // Messages from uses of 'vbool370' public Bernoulli[] vbool370_uses_B; // Message from definition of 'vbool370' public Bernoulli vbool370_F; // Messages from uses of 'vbool371' public Bernoulli[] vbool371_uses_B; // Message from definition of 'vbool371' public Bernoulli vbool371_F; // Messages from uses of 'vbool372' public Bernoulli[] vbool372_uses_B; // Message from definition of 'vbool372' public Bernoulli vbool372_F; // Messages from uses of 'vbool64' public Bernoulli[] vbool64_uses_B; // The constant 'vBernoulli72' public Bernoulli vBernoulli72; // Message from definition of 'vbool64' public Bernoulli vbool64_F; // Messages from uses of 'vbool142' public Bernoulli[] vbool142_uses_B; // The constant 'vBernoulli150' public Bernoulli vBernoulli150; // Message from definition of 'vbool142' public Bernoulli vbool142_F; // Messages from uses of 'vbool378' public Bernoulli[] vbool378_uses_B; // Message from definition of 'vbool378' public Bernoulli vbool378_F; // Messages from uses of 'vbool379' public Bernoulli[] vbool379_uses_B; // Message from definition of 'vbool379' public Bernoulli vbool379_F; // Messages from uses of 'vbool380' public Bernoulli[] vbool380_uses_B; // Message from definition of 'vbool380' public Bernoulli vbool380_F; // Messages from uses of 'vbool65' public Bernoulli[] vbool65_uses_B; // The constant 'vBernoulli73' public Bernoulli vBernoulli73; // Message from definition of 'vbool65' public Bernoulli vbool65_F; // Messages from uses of 'vbool143' public Bernoulli[] vbool143_uses_B; // The constant 'vBernoulli151' public Bernoulli vBernoulli151; // Message from definition of 'vbool143' public Bernoulli vbool143_F; // Messages from uses of 'vbool386' public Bernoulli[] vbool386_uses_B; // Message from definition of 'vbool386' public Bernoulli vbool386_F; // Messages from uses of 'vbool387' public Bernoulli[] vbool387_uses_B; // Message from definition of 'vbool387' public Bernoulli vbool387_F; // Messages from uses of 'vbool388' public Bernoulli[] vbool388_uses_B; // Message from definition of 'vbool388' public Bernoulli vbool388_F; // Messages from uses of 'vbool66' public Bernoulli[] vbool66_uses_B; // The constant 'vBernoulli74' public Bernoulli vBernoulli74; // Message from definition of 'vbool66' public Bernoulli vbool66_F; // Messages from uses of 'vbool144' public Bernoulli[] vbool144_uses_B; // The constant 'vBernoulli152' public Bernoulli vBernoulli152; // Message from definition of 'vbool144' public Bernoulli vbool144_F; // Messages from uses of 'vbool394' public Bernoulli[] vbool394_uses_B; // Message from definition of 'vbool394' public Bernoulli vbool394_F; // Messages from uses of 'vbool395' public Bernoulli[] vbool395_uses_B; // Message from definition of 'vbool395' public Bernoulli vbool395_F; // Messages from uses of 'vbool396' public Bernoulli[] vbool396_uses_B; // Message from definition of 'vbool396' public Bernoulli vbool396_F; // Messages from uses of 'vbool1' public Bernoulli[] vbool1_uses_B; // The constant 'vBernoulli9' public Bernoulli vBernoulli9; // Message from definition of 'vbool1' public Bernoulli vbool1_F; // Messages from uses of 'vbool456' public Bernoulli[] vbool456_uses_B; // Message from definition of 'vbool456' public Bernoulli vbool456_F; // Messages from uses of 'vbool409' public Bernoulli[] vbool409_uses_B; // Message from definition of 'vbool409' public Bernoulli vbool409_F; // Messages from uses of 'vbool194' public Bernoulli[] vbool194_uses_B; // Message from definition of 'vbool194' public Bernoulli vbool194_F; // Messages from uses of 'vbool41' public Bernoulli[] vbool41_uses_B; // The constant 'vBernoulli49' public Bernoulli vBernoulli49; // Message from definition of 'vbool41' public Bernoulli vbool41_F; // Messages from uses of 'vbool410' public Bernoulli[] vbool410_uses_B; // Message from definition of 'vbool410' public Bernoulli vbool410_F; // Messages from uses of 'vbool200' public Bernoulli[] vbool200_uses_B; // Message from definition of 'vbool200' public Bernoulli vbool200_F; // Messages from uses of 'vbool217' public Bernoulli[] vbool217_uses_B; // Message from definition of 'vbool217' public Bernoulli vbool217_F; // Messages from uses of 'vbool102' public Bernoulli[] vbool102_uses_B; // The constant 'vBernoulli110' public Bernoulli vBernoulli110; // Message from definition of 'vbool102' public Bernoulli vbool102_F; // Messages from uses of 'vbool190' public Bernoulli[] vbool190_uses_B; // Message from definition of 'vbool190' public Bernoulli vbool190_F; // Messages from uses of 'vbool242' public Bernoulli[] vbool242_uses_B; // Message from definition of 'vbool242' public Bernoulli vbool242_F; // Messages from uses of 'vbool115' public Bernoulli[] vbool115_uses_B; // The constant 'vBernoulli123' public Bernoulli vBernoulli123; // Message from definition of 'vbool115' public Bernoulli vbool115_F; // Messages from uses of 'vbool219' public Bernoulli[] vbool219_uses_B; // Message from definition of 'vbool219' public Bernoulli vbool219_F; // Messages from uses of 'vbool106' public Bernoulli[] vbool106_uses_B; // The constant 'vBernoulli114' public Bernoulli vBernoulli114; // Message from definition of 'vbool106' public Bernoulli vbool106_F; // Messages from uses of 'vbool193' public Bernoulli[] vbool193_uses_B; // Message from definition of 'vbool193' public Bernoulli vbool193_F; // Messages from uses of 'vbool254' public Bernoulli[] vbool254_uses_B; // Message from definition of 'vbool254' public Bernoulli vbool254_F; // Messages from uses of 'vbool260' public Bernoulli[] vbool260_uses_B; // Message from definition of 'vbool260' public Bernoulli vbool260_F; // Messages from uses of 'vbool269' public Bernoulli[] vbool269_uses_B; // Message from definition of 'vbool269' public Bernoulli vbool269_F; // Messages from uses of 'vbool278' public Bernoulli[] vbool278_uses_B; // Message from definition of 'vbool278' public Bernoulli vbool278_F; // Messages from uses of 'vbool284' public Bernoulli[] vbool284_uses_B; // Message from definition of 'vbool284' public Bernoulli vbool284_F; // Messages from uses of 'vbool112' public Bernoulli[] vbool112_uses_B; // The constant 'vBernoulli120' public Bernoulli vBernoulli120; // Message from definition of 'vbool112' public Bernoulli vbool112_F; // Messages from uses of 'vbool222' public Bernoulli[] vbool222_uses_B; // Message from definition of 'vbool222' public Bernoulli vbool222_F; // Messages from uses of 'vbool104' public Bernoulli[] vbool104_uses_B; // The constant 'vBernoulli112' public Bernoulli vBernoulli112; // Message from definition of 'vbool104' public Bernoulli vbool104_F; // Messages from uses of 'vbool191' public Bernoulli[] vbool191_uses_B; // Message from definition of 'vbool191' public Bernoulli vbool191_F; // Messages from uses of 'vbool248' public Bernoulli[] vbool248_uses_B; // Message from definition of 'vbool248' public Bernoulli vbool248_F; // Messages from uses of 'vbool251' public Bernoulli[] vbool251_uses_B; // Message from definition of 'vbool251' public Bernoulli vbool251_F; // Messages from uses of 'vbool266' public Bernoulli[] vbool266_uses_B; // Message from definition of 'vbool266' public Bernoulli vbool266_F; // Messages from uses of 'vbool272' public Bernoulli[] vbool272_uses_B; // Message from definition of 'vbool272' public Bernoulli vbool272_F; // Messages from uses of 'vbool113' public Bernoulli[] vbool113_uses_B; // The constant 'vBernoulli121' public Bernoulli vBernoulli121; // Message from definition of 'vbool113' public Bernoulli vbool113_F; // Messages from uses of 'vbool225' public Bernoulli[] vbool225_uses_B; // Message from definition of 'vbool225' public Bernoulli vbool225_F; // Messages from uses of 'vbool228' public Bernoulli[] vbool228_uses_B; // Message from definition of 'vbool228' public Bernoulli vbool228_F; // Messages from uses of 'vbool231' public Bernoulli[] vbool231_uses_B; // Message from definition of 'vbool231' public Bernoulli vbool231_F; // Messages from uses of 'vbool105' public Bernoulli[] vbool105_uses_B; // The constant 'vBernoulli113' public Bernoulli vBernoulli113; // Message from definition of 'vbool105' public Bernoulli vbool105_F; // Messages from uses of 'vbool192' public Bernoulli[] vbool192_uses_B; // Message from definition of 'vbool192' public Bernoulli vbool192_F; // Messages from uses of 'vbool257' public Bernoulli[] vbool257_uses_B; // Message from definition of 'vbool257' public Bernoulli vbool257_F; // Messages from uses of 'vbool263' public Bernoulli[] vbool263_uses_B; // Message from definition of 'vbool263' public Bernoulli vbool263_F; // Messages from uses of 'vbool275' public Bernoulli[] vbool275_uses_B; // Message from definition of 'vbool275' public Bernoulli vbool275_F; // Messages from uses of 'vbool281' public Bernoulli[] vbool281_uses_B; // Message from definition of 'vbool281' public Bernoulli vbool281_F; // Messages from uses of 'vbool114' public Bernoulli[] vbool114_uses_B; // The constant 'vBernoulli122' public Bernoulli vBernoulli122; // Message from definition of 'vbool114' public Bernoulli vbool114_F; // Messages from uses of 'vbool234' public Bernoulli[] vbool234_uses_B; // Message from definition of 'vbool234' public Bernoulli vbool234_F; // Messages from uses of 'vbool237' public Bernoulli[] vbool237_uses_B; // Message from definition of 'vbool237' public Bernoulli vbool237_F; // Messages from uses of 'vbool240' public Bernoulli[] vbool240_uses_B; // Message from definition of 'vbool240' public Bernoulli vbool240_F; // Messages from uses of 'vbool0' public Bernoulli[] vbool0_uses_B; // The constant 'vBernoulli8' public Bernoulli vBernoulli8; // Message from definition of 'vbool0' public Bernoulli vbool0_F; // Messages from uses of 'vbool369' public Bernoulli[] vbool369_uses_B; // Message from definition of 'vbool369' public Bernoulli vbool369_F; // Messages from uses of 'vbool42' public Bernoulli[] vbool42_uses_B; // The constant 'vBernoulli50' public Bernoulli vBernoulli50; // Message from definition of 'vbool42' public Bernoulli vbool42_F; // Messages from uses of 'vbool206' public Bernoulli[] vbool206_uses_B; // Message from definition of 'vbool206' public Bernoulli vbool206_F; // Messages from uses of 'vbool373' public Bernoulli[] vbool373_uses_B; // Message from definition of 'vbool373' public Bernoulli vbool373_F; // Messages from uses of 'vbool68' public Bernoulli[] vbool68_uses_B; // The constant 'vBernoulli76' public Bernoulli vBernoulli76; // Message from definition of 'vbool68' public Bernoulli vbool68_F; // Messages from uses of 'vbool375' public Bernoulli[] vbool375_uses_B; // Message from definition of 'vbool375' public Bernoulli vbool375_F; // Messages from uses of 'vbool16' public Bernoulli[] vbool16_uses_B; // The constant 'vBernoulli24' public Bernoulli vBernoulli24; // Message from definition of 'vbool16' public Bernoulli vbool16_F; // Messages from uses of 'vbool195' public Bernoulli[] vbool195_uses_B; // Message from definition of 'vbool195' public Bernoulli vbool195_F; // Messages from uses of 'vbool245' public Bernoulli[] vbool245_uses_B; // Message from definition of 'vbool245' public Bernoulli vbool245_F; // Messages from uses of 'vbool374' public Bernoulli[] vbool374_uses_B; // Message from definition of 'vbool374' public Bernoulli vbool374_F; // Messages from uses of 'vbool376' public Bernoulli[] vbool376_uses_B; // Message from definition of 'vbool376' public Bernoulli vbool376_F; // Messages from uses of 'vbool377' public Bernoulli[] vbool377_uses_B; // Message from definition of 'vbool377' public Bernoulli vbool377_F; // Messages from uses of 'vbool43' public Bernoulli[] vbool43_uses_B; // The constant 'vBernoulli51' public Bernoulli vBernoulli51; // Message from definition of 'vbool43' public Bernoulli vbool43_F; // Messages from uses of 'vbool207' public Bernoulli[] vbool207_uses_B; // Message from definition of 'vbool207' public Bernoulli vbool207_F; // Messages from uses of 'vbool381' public Bernoulli[] vbool381_uses_B; // Message from definition of 'vbool381' public Bernoulli vbool381_F; // Messages from uses of 'vbool69' public Bernoulli[] vbool69_uses_B; // The constant 'vBernoulli77' public Bernoulli vBernoulli77; // Message from definition of 'vbool69' public Bernoulli vbool69_F; // Messages from uses of 'vbool383' public Bernoulli[] vbool383_uses_B; // Message from definition of 'vbool383' public Bernoulli vbool383_F; // Messages from uses of 'vbool17' public Bernoulli[] vbool17_uses_B; // The constant 'vBernoulli25' public Bernoulli vBernoulli25; // Message from definition of 'vbool17' public Bernoulli vbool17_F; // Messages from uses of 'vbool196' public Bernoulli[] vbool196_uses_B; // Message from definition of 'vbool196' public Bernoulli vbool196_F; // Messages from uses of 'vbool382' public Bernoulli[] vbool382_uses_B; // Message from definition of 'vbool382' public Bernoulli vbool382_F; // Messages from uses of 'vbool384' public Bernoulli[] vbool384_uses_B; // Message from definition of 'vbool384' public Bernoulli vbool384_F; // Messages from uses of 'vbool385' public Bernoulli[] vbool385_uses_B; // Message from definition of 'vbool385' public Bernoulli vbool385_F; // Messages from uses of 'vbool44' public Bernoulli[] vbool44_uses_B; // The constant 'vBernoulli52' public Bernoulli vBernoulli52; // Message from definition of 'vbool44' public Bernoulli vbool44_F; // Messages from uses of 'vbool208' public Bernoulli[] vbool208_uses_B; // Message from definition of 'vbool208' public Bernoulli vbool208_F; // Messages from uses of 'vbool389' public Bernoulli[] vbool389_uses_B; // Message from definition of 'vbool389' public Bernoulli vbool389_F; // Messages from uses of 'vbool70' public Bernoulli[] vbool70_uses_B; // The constant 'vBernoulli78' public Bernoulli vBernoulli78; // Message from definition of 'vbool70' public Bernoulli vbool70_F; // Messages from uses of 'vbool391' public Bernoulli[] vbool391_uses_B; // Message from definition of 'vbool391' public Bernoulli vbool391_F; // Messages from uses of 'vbool18' public Bernoulli[] vbool18_uses_B; // The constant 'vBernoulli26' public Bernoulli vBernoulli26; // Message from definition of 'vbool18' public Bernoulli vbool18_F; // Messages from uses of 'vbool197' public Bernoulli[] vbool197_uses_B; // Message from definition of 'vbool197' public Bernoulli vbool197_F; // Messages from uses of 'vbool390' public Bernoulli[] vbool390_uses_B; // Message from definition of 'vbool390' public Bernoulli vbool390_F; // Messages from uses of 'vbool392' public Bernoulli[] vbool392_uses_B; // Message from definition of 'vbool392' public Bernoulli vbool392_F; // Messages from uses of 'vbool393' public Bernoulli[] vbool393_uses_B; // Message from definition of 'vbool393' public Bernoulli vbool393_F; // Messages from uses of 'vbool45' public Bernoulli[] vbool45_uses_B; // The constant 'vBernoulli53' public Bernoulli vBernoulli53; // Message from definition of 'vbool45' public Bernoulli vbool45_F; // Messages from uses of 'vbool209' public Bernoulli[] vbool209_uses_B; // Message from definition of 'vbool209' public Bernoulli vbool209_F; // Messages from uses of 'vbool397' public Bernoulli[] vbool397_uses_B; // Message from definition of 'vbool397' public Bernoulli vbool397_F; // Messages from uses of 'vbool71' public Bernoulli[] vbool71_uses_B; // The constant 'vBernoulli79' public Bernoulli vBernoulli79; // Message from definition of 'vbool71' public Bernoulli vbool71_F; // Messages from uses of 'vbool399' public Bernoulli[] vbool399_uses_B; // Message from definition of 'vbool399' public Bernoulli vbool399_F; // Messages from uses of 'vbool19' public Bernoulli[] vbool19_uses_B; // The constant 'vBernoulli27' public Bernoulli vBernoulli27; // Message from definition of 'vbool19' public Bernoulli vbool19_F; // Messages from uses of 'vbool198' public Bernoulli[] vbool198_uses_B; // Message from definition of 'vbool198' public Bernoulli vbool198_F; // Messages from uses of 'vbool398' public Bernoulli[] vbool398_uses_B; // Message from definition of 'vbool398' public Bernoulli vbool398_F; // Messages from uses of 'vbool400' public Bernoulli[] vbool400_uses_B; // Message from definition of 'vbool400' public Bernoulli vbool400_F; // Messages from uses of 'vbool401' public Bernoulli[] vbool401_uses_B; // Message from definition of 'vbool401' public Bernoulli vbool401_F; // Messages from uses of 'vbool220' public Bernoulli[] vbool220_uses_B; // Message from definition of 'vbool220' public Bernoulli vbool220_F; // Messages from uses of 'vbool180' public Bernoulli[] vbool180_uses_B; // The constant 'vBernoulli188' public Bernoulli vBernoulli188; // Message from definition of 'vbool180' public Bernoulli vbool180_F; // Messages from uses of 'vbool447' public Bernoulli[] vbool447_uses_B; // Message from definition of 'vbool447' public Bernoulli vbool447_F; // Messages from uses of 'vbool243' public Bernoulli[] vbool243_uses_B; // Message from definition of 'vbool243' public Bernoulli vbool243_F; // Messages from uses of 'vbool252' public Bernoulli[] vbool252_uses_B; // Message from definition of 'vbool252' public Bernoulli vbool252_F; // Messages from uses of 'vbool264' public Bernoulli[] vbool264_uses_B; // Message from definition of 'vbool264' public Bernoulli vbool264_F; // Messages from uses of 'vbool273' public Bernoulli[] vbool273_uses_B; // Message from definition of 'vbool273' public Bernoulli vbool273_F; // Messages from uses of 'vbool282' public Bernoulli[] vbool282_uses_B; // Message from definition of 'vbool282' public Bernoulli vbool282_F; // Messages from uses of 'vbool285' public Bernoulli[] vbool285_uses_B; // Message from definition of 'vbool285' public Bernoulli vbool285_F; // Messages from uses of 'vbool184' public Bernoulli[] vbool184_uses_B; // The constant 'vBernoulli192' public Bernoulli vBernoulli192; // Message from definition of 'vbool184' public Bernoulli vbool184_F; // Messages from uses of 'vbool450' public Bernoulli[] vbool450_uses_B; // Message from definition of 'vbool450' public Bernoulli vbool450_F; // Messages from uses of 'vbool255' public Bernoulli[] vbool255_uses_B; // Message from definition of 'vbool255' public Bernoulli vbool255_F; // Messages from uses of 'vbool261' public Bernoulli[] vbool261_uses_B; // Message from definition of 'vbool261' public Bernoulli vbool261_F; // Messages from uses of 'vbool270' public Bernoulli[] vbool270_uses_B; // Message from definition of 'vbool270' public Bernoulli vbool270_F; // Messages from uses of 'vbool279' public Bernoulli[] vbool279_uses_B; // Message from definition of 'vbool279' public Bernoulli vbool279_F; // Messages from uses of 'vbool246' public Bernoulli[] vbool246_uses_B; // Message from definition of 'vbool246' public Bernoulli vbool246_F; // Messages from uses of 'vbool223' public Bernoulli[] vbool223_uses_B; // Message from definition of 'vbool223' public Bernoulli vbool223_F; // Messages from uses of 'vbool182' public Bernoulli[] vbool182_uses_B; // The constant 'vBernoulli190' public Bernoulli vBernoulli190; // Message from definition of 'vbool182' public Bernoulli vbool182_F; // Messages from uses of 'vbool448' public Bernoulli[] vbool448_uses_B; // Message from definition of 'vbool448' public Bernoulli vbool448_F; // Messages from uses of 'vbool249' public Bernoulli[] vbool249_uses_B; // Message from definition of 'vbool249' public Bernoulli vbool249_F; // Messages from uses of 'vbool267' public Bernoulli[] vbool267_uses_B; // Message from definition of 'vbool267' public Bernoulli vbool267_F; // Messages from uses of 'vbool226' public Bernoulli[] vbool226_uses_B; // Message from definition of 'vbool226' public Bernoulli vbool226_F; // Messages from uses of 'vbool229' public Bernoulli[] vbool229_uses_B; // Message from definition of 'vbool229' public Bernoulli vbool229_F; // Messages from uses of 'vbool232' public Bernoulli[] vbool232_uses_B; // Message from definition of 'vbool232' public Bernoulli vbool232_F; // Messages from uses of 'vbool183' public Bernoulli[] vbool183_uses_B; // The constant 'vBernoulli191' public Bernoulli vBernoulli191; // Message from definition of 'vbool183' public Bernoulli vbool183_F; // Messages from uses of 'vbool449' public Bernoulli[] vbool449_uses_B; // Message from definition of 'vbool449' public Bernoulli vbool449_F; // Messages from uses of 'vbool258' public Bernoulli[] vbool258_uses_B; // Message from definition of 'vbool258' public Bernoulli vbool258_F; // Messages from uses of 'vbool276' public Bernoulli[] vbool276_uses_B; // Message from definition of 'vbool276' public Bernoulli vbool276_F; // Messages from uses of 'vbool235' public Bernoulli[] vbool235_uses_B; // Message from definition of 'vbool235' public Bernoulli vbool235_F; // Messages from uses of 'vbool238' public Bernoulli[] vbool238_uses_B; // Message from definition of 'vbool238' public Bernoulli vbool238_F; // Messages from uses of 'vbool241' public Bernoulli[] vbool241_uses_B; // Message from definition of 'vbool241' public Bernoulli vbool241_F; // Messages from uses of 'vbool11' public Bernoulli[] vbool11_uses_B; // The constant 'vBernoulli19' public Bernoulli vBernoulli19; // Message from definition of 'vbool11' public Bernoulli vbool11_F; // Messages from uses of 'vbool185' public Bernoulli[] vbool185_uses_B; // Message from definition of 'vbool185' public Bernoulli vbool185_F; // Messages from uses of 'vbool89' public Bernoulli[] vbool89_uses_B; // The constant 'vBernoulli97' public Bernoulli vBernoulli97; // Message from definition of 'vbool89' public Bernoulli vbool89_F; // Messages from uses of 'vbool211' public Bernoulli[] vbool211_uses_B; // Message from definition of 'vbool211' public Bernoulli vbool211_F; // Messages from uses of 'vbool37' public Bernoulli[] vbool37_uses_B; // The constant 'vBernoulli45' public Bernoulli vBernoulli45; // Message from definition of 'vbool37' public Bernoulli vbool37_F; // Messages from uses of 'vbool201' public Bernoulli[] vbool201_uses_B; // Message from definition of 'vbool201' public Bernoulli vbool201_F; // Messages from uses of 'vbool12' public Bernoulli[] vbool12_uses_B; // The constant 'vBernoulli20' public Bernoulli vBernoulli20; // Message from definition of 'vbool12' public Bernoulli vbool12_F; // Messages from uses of 'vbool186' public Bernoulli[] vbool186_uses_B; // Message from definition of 'vbool186' public Bernoulli vbool186_F; // Messages from uses of 'vbool91' public Bernoulli[] vbool91_uses_B; // The constant 'vBernoulli99' public Bernoulli vBernoulli99; // Message from definition of 'vbool91' public Bernoulli vbool91_F; // Messages from uses of 'vbool212' public Bernoulli[] vbool212_uses_B; // Message from definition of 'vbool212' public Bernoulli vbool212_F; // Messages from uses of 'vbool38' public Bernoulli[] vbool38_uses_B; // The constant 'vBernoulli46' public Bernoulli vBernoulli46; // Message from definition of 'vbool38' public Bernoulli vbool38_F; // Messages from uses of 'vbool202' public Bernoulli[] vbool202_uses_B; // Message from definition of 'vbool202' public Bernoulli vbool202_F; // Messages from uses of 'vbool13' public Bernoulli[] vbool13_uses_B; // The constant 'vBernoulli21' public Bernoulli vBernoulli21; // Message from definition of 'vbool13' public Bernoulli vbool13_F; // Messages from uses of 'vbool187' public Bernoulli[] vbool187_uses_B; // Message from definition of 'vbool187' public Bernoulli vbool187_F; // Messages from uses of 'vbool92' public Bernoulli[] vbool92_uses_B; // The constant 'vBernoulli100' public Bernoulli vBernoulli100; // Message from definition of 'vbool92' public Bernoulli vbool92_F; // Messages from uses of 'vbool213' public Bernoulli[] vbool213_uses_B; // Message from definition of 'vbool213' public Bernoulli vbool213_F; // Messages from uses of 'vbool39' public Bernoulli[] vbool39_uses_B; // The constant 'vBernoulli47' public Bernoulli vBernoulli47; // Message from definition of 'vbool39' public Bernoulli vbool39_F; // Messages from uses of 'vbool203' public Bernoulli[] vbool203_uses_B; // Message from definition of 'vbool203' public Bernoulli vbool203_F; // Messages from uses of 'vbool14' public Bernoulli[] vbool14_uses_B; // The constant 'vBernoulli22' public Bernoulli vBernoulli22; // Message from definition of 'vbool14' public Bernoulli vbool14_F; // Messages from uses of 'vbool188' public Bernoulli[] vbool188_uses_B; // Message from definition of 'vbool188' public Bernoulli vbool188_F; // Messages from uses of 'vbool93' public Bernoulli[] vbool93_uses_B; // The constant 'vBernoulli101' public Bernoulli vBernoulli101; // Message from definition of 'vbool93' public Bernoulli vbool93_F; // Messages from uses of 'vbool214' public Bernoulli[] vbool214_uses_B; // Message from definition of 'vbool214' public Bernoulli vbool214_F; // Messages from uses of 'vbool40' public Bernoulli[] vbool40_uses_B; // The constant 'vBernoulli48' public Bernoulli vBernoulli48; // Message from definition of 'vbool40' public Bernoulli vbool40_F; // Messages from uses of 'vbool204' public Bernoulli[] vbool204_uses_B; // Message from definition of 'vbool204' public Bernoulli vbool204_F; // Messages from uses of 'vbool159' public Bernoulli[] vbool159_uses_B; // The constant 'vBernoulli167' public Bernoulli vBernoulli167; // Message from definition of 'vbool159' public Bernoulli vbool159_F; // Messages from uses of 'vbool421' public Bernoulli[] vbool421_uses_B; // Message from definition of 'vbool421' public Bernoulli vbool421_F; // Messages from uses of 'vbool154' public Bernoulli[] vbool154_uses_B; // The constant 'vBernoulli162' public Bernoulli vBernoulli162; // Message from definition of 'vbool154' public Bernoulli vbool154_F; // Messages from uses of 'vbool442' public Bernoulli[] vbool442_uses_B; // Message from definition of 'vbool442' public Bernoulli vbool442_F; // Messages from uses of 'vbool244' public Bernoulli[] vbool244_uses_B; // Message from definition of 'vbool244' public Bernoulli vbool244_F; // Messages from uses of 'vbool247' public Bernoulli[] vbool247_uses_B; // Message from definition of 'vbool247' public Bernoulli vbool247_F; // Messages from uses of 'vbool250' public Bernoulli[] vbool250_uses_B; // Message from definition of 'vbool250' public Bernoulli vbool250_F; // Messages from uses of 'vbool253' public Bernoulli[] vbool253_uses_B; // Message from definition of 'vbool253' public Bernoulli vbool253_F; // Messages from uses of 'vbool256' public Bernoulli[] vbool256_uses_B; // Message from definition of 'vbool256' public Bernoulli vbool256_F; // Messages from uses of 'vbool259' public Bernoulli[] vbool259_uses_B; // Message from definition of 'vbool259' public Bernoulli vbool259_F; // Messages from uses of 'vbool262' public Bernoulli[] vbool262_uses_B; // Message from definition of 'vbool262' public Bernoulli vbool262_F; // Messages from uses of 'vbool265' public Bernoulli[] vbool265_uses_B; // Message from definition of 'vbool265' public Bernoulli vbool265_F; // Messages from uses of 'vbool268' public Bernoulli[] vbool268_uses_B; // Message from definition of 'vbool268' public Bernoulli vbool268_F; // Messages from uses of 'vbool271' public Bernoulli[] vbool271_uses_B; // Message from definition of 'vbool271' public Bernoulli vbool271_F; // Messages from uses of 'vbool274' public Bernoulli[] vbool274_uses_B; // Message from definition of 'vbool274' public Bernoulli vbool274_F; // Messages from uses of 'vbool277' public Bernoulli[] vbool277_uses_B; // Message from definition of 'vbool277' public Bernoulli vbool277_F; // Messages from uses of 'vbool280' public Bernoulli[] vbool280_uses_B; // Message from definition of 'vbool280' public Bernoulli vbool280_F; // Messages from uses of 'vbool283' public Bernoulli[] vbool283_uses_B; // Message from definition of 'vbool283' public Bernoulli vbool283_F; // Messages from uses of 'vbool286' public Bernoulli[] vbool286_uses_B; // Message from definition of 'vbool286' public Bernoulli vbool286_F; // Messages from uses of 'vbool162' public Bernoulli[] vbool162_uses_B; // The constant 'vBernoulli170' public Bernoulli vBernoulli170; // Message from definition of 'vbool162' public Bernoulli vbool162_F; // Messages from uses of 'vbool424' public Bernoulli[] vbool424_uses_B; // Message from definition of 'vbool424' public Bernoulli vbool424_F; // Messages from uses of 'vbool158' public Bernoulli[] vbool158_uses_B; // The constant 'vBernoulli166' public Bernoulli vBernoulli166; // Message from definition of 'vbool158' public Bernoulli vbool158_F; // Messages from uses of 'vbool445' public Bernoulli[] vbool445_uses_B; // Message from definition of 'vbool445' public Bernoulli vbool445_F; // Messages from uses of 'vbool160' public Bernoulli[] vbool160_uses_B; // The constant 'vBernoulli168' public Bernoulli vBernoulli168; // Message from definition of 'vbool160' public Bernoulli vbool160_F; // Messages from uses of 'vbool422' public Bernoulli[] vbool422_uses_B; // Message from definition of 'vbool422' public Bernoulli vbool422_F; // Messages from uses of 'vbool156' public Bernoulli[] vbool156_uses_B; // The constant 'vBernoulli164' public Bernoulli vBernoulli164; // Message from definition of 'vbool156' public Bernoulli vbool156_F; // Messages from uses of 'vbool443' public Bernoulli[] vbool443_uses_B; // Message from definition of 'vbool443' public Bernoulli vbool443_F; // Messages from uses of 'vbool161' public Bernoulli[] vbool161_uses_B; // The constant 'vBernoulli169' public Bernoulli vBernoulli169; // Message from definition of 'vbool161' public Bernoulli vbool161_F; // Messages from uses of 'vbool423' public Bernoulli[] vbool423_uses_B; // Message from definition of 'vbool423' public Bernoulli vbool423_F; // Messages from uses of 'vbool157' public Bernoulli[] vbool157_uses_B; // The constant 'vBernoulli165' public Bernoulli vBernoulli165; // Message from definition of 'vbool157' public Bernoulli vbool157_F; // Messages from uses of 'vbool444' public Bernoulli[] vbool444_uses_B; // Message from definition of 'vbool444' public Bernoulli vbool444_F; // Messages from uses of 'vbool411' public Bernoulli[] vbool411_uses_B; // Message from definition of 'vbool411' public Bernoulli vbool411_F; // Messages from uses of 'vbool452' public Bernoulli[] vbool452_uses_B; // Message from definition of 'vbool452' public Bernoulli vbool452_F; // Messages from uses of 'vbool412' public Bernoulli[] vbool412_uses_B; // Message from definition of 'vbool412' public Bernoulli vbool412_F; // Messages from uses of 'vbool453' public Bernoulli[] vbool453_uses_B; // Message from definition of 'vbool453' public Bernoulli vbool453_F; // Messages from uses of 'vbool413' public Bernoulli[] vbool413_uses_B; // Message from definition of 'vbool413' public Bernoulli vbool413_F; // Messages from uses of 'vbool454' public Bernoulli[] vbool454_uses_B; // Message from definition of 'vbool454' public Bernoulli vbool454_F; // Messages from uses of 'vbool414' public Bernoulli[] vbool414_uses_B; // Message from definition of 'vbool414' public Bernoulli vbool414_F; // Messages from uses of 'vbool455' public Bernoulli[] vbool455_uses_B; // Message from definition of 'vbool455' public Bernoulli vbool455_F; // Messages from uses of 'vbool415' public Bernoulli[] vbool415_uses_B; // Message from definition of 'vbool415' public Bernoulli vbool415_F; // Messages from uses of 'vbool418' public Bernoulli[] vbool418_uses_B; // Message from definition of 'vbool418' public Bernoulli vbool418_F; // Messages from uses of 'vbool416' public Bernoulli[] vbool416_uses_B; // Message from definition of 'vbool416' public Bernoulli vbool416_F; // Messages from uses of 'vbool417' public Bernoulli[] vbool417_uses_B; // Message from definition of 'vbool417' public Bernoulli vbool417_F; // Message to definition of 'vbool210' public Bernoulli vbool210_B; // Messages to uses of 'vbool72' public Bernoulli[] vbool72_uses_F; // Message to definition of 'vbool451' public Bernoulli vbool451_B; // Messages to uses of 'vbool155' public Bernoulli[] vbool155_uses_F; // Messages to uses of 'vbool90' public Bernoulli[] vbool90_uses_F; // Message to definition of 'vbool407' public Bernoulli vbool407_B; // Messages to uses of 'vbool67' public Bernoulli[] vbool67_uses_F; // The constant 'vBernoulli5' public Bernoulli vBernoulli5; // Message to definition of 'vbool419' public Bernoulli vbool419_B; // Messages to uses of 'vbool163' public Bernoulli[] vbool163_uses_F; // Message to definition of 'vbool441' public Bernoulli vbool441_B; // Messages to uses of 'vbool181' public Bernoulli[] vbool181_uses_F; // The constant 'vBernoulli6' public Bernoulli vBernoulli6; // Message to definition of 'vbool205' public Bernoulli vbool205_B; // Messages to uses of 'vbool46' public Bernoulli[] vbool46_uses_F; // Message to definition of 'vbool402' public Bernoulli vbool402_B; // Messages to uses of 'vbool145' public Bernoulli[] vbool145_uses_F; // Message to definition of 'vbool405' public Bernoulli vbool405_B; // Messages to uses of 'vbool116' public Bernoulli[] vbool116_uses_F; // Message to definition of 'vbool408' public Bernoulli vbool408_B; // Messages to uses of 'vbool406' public Bernoulli[] vbool406_uses_F; // Message to definition of 'vbool420' public Bernoulli vbool420_B; // Message to definition of 'vbool446' public Bernoulli vbool446_B; // Messages to uses of 'vbool103' public Bernoulli[] vbool103_uses_F; // The constant 'vBernoulli7' public Bernoulli vBernoulli7; // Message to definition of 'vbool189' public Bernoulli vbool189_B; // Messages to uses of 'vbool15' public Bernoulli[] vbool15_uses_F; // Message to definition of 'vbool199' public Bernoulli vbool199_B; // Messages to uses of 'vbool20' public Bernoulli[] vbool20_uses_F; // Message to definition of 'vbool215' public Bernoulli vbool215_B; // Messages to uses of 'vbool111' public Bernoulli[] vbool111_uses_F; // Message to definition of 'vbool216' public Bernoulli vbool216_B; // Message to definition of 'vbool218' public Bernoulli vbool218_B; // Messages to uses of 'vbool107' public Bernoulli[] vbool107_uses_F; // Message to definition of 'vbool221' public Bernoulli vbool221_B; // Messages to uses of 'vbool110' public Bernoulli[] vbool110_uses_F; // Message to definition of 'vbool224' public Bernoulli vbool224_B; // Messages to uses of 'vbool108' public Bernoulli[] vbool108_uses_F; // Message to definition of 'vbool227' public Bernoulli vbool227_B; // Message to definition of 'vbool230' public Bernoulli vbool230_B; // Message to definition of 'vbool233' public Bernoulli vbool233_B; // Messages to uses of 'vbool109' public Bernoulli[] vbool109_uses_F; // Message to definition of 'vbool236' public Bernoulli vbool236_B; // Message to definition of 'vbool239' public Bernoulli vbool239_B; // Message to definition of 'vbool403' public Bernoulli vbool403_B; // Messages to uses of 'vbool2' public Bernoulli[] vbool2_uses_F; // Message to definition of 'vbool287' public Bernoulli vbool287_B; // Message to definition of 'vbool406' public Bernoulli vbool406_B; // Messages to uses of 'vbool404' public Bernoulli[] vbool404_uses_F; // Message to definition of 'vbool404' public Bernoulli vbool404_B; // Messages to uses of 'vbool402' public Bernoulli[] vbool402_uses_F; // Message to definition of 'vbool368' public Bernoulli vbool368_B; // Message to definition of 'vbool371' public Bernoulli vbool371_B; // Messages to uses of 'vbool370' public Bernoulli[] vbool370_uses_F; // Message to definition of 'vbool372' public Bernoulli vbool372_B; // Message to definition of 'vbool379' public Bernoulli vbool379_B; // Messages to uses of 'vbool378' public Bernoulli[] vbool378_uses_F; // Message to definition of 'vbool380' public Bernoulli vbool380_B; // Message to definition of 'vbool387' public Bernoulli vbool387_B; // Messages to uses of 'vbool386' public Bernoulli[] vbool386_uses_F; // Message to definition of 'vbool388' public Bernoulli vbool388_B; // Message to definition of 'vbool395' public Bernoulli vbool395_B; // Messages to uses of 'vbool394' public Bernoulli[] vbool394_uses_F; // Message to definition of 'vbool396' public Bernoulli vbool396_B; // Message to definition of 'vbool456' public Bernoulli vbool456_B; // Messages to uses of 'vbool1' public Bernoulli[] vbool1_uses_F; // Messages to uses of 'vbool405' public Bernoulli[] vbool405_uses_F; // Messages to uses of 'vbool407' public Bernoulli[] vbool407_uses_F; // Message to definition of 'vbool409' public Bernoulli vbool409_B; // Messages to uses of 'vbool403' public Bernoulli[] vbool403_uses_F; // Message to definition of 'vbool194' public Bernoulli vbool194_B; // Message to definition of 'vbool410' public Bernoulli vbool410_B; // Messages to uses of 'vbool41' public Bernoulli[] vbool41_uses_F; // Message to definition of 'vbool200' public Bernoulli vbool200_B; // Message to definition of 'vbool217' public Bernoulli vbool217_B; // Messages to uses of 'vbool216' public Bernoulli[] vbool216_uses_F; // Messages to uses of 'vbool215' public Bernoulli[] vbool215_uses_F; // Message to definition of 'vbool190' public Bernoulli vbool190_B; // Messages to uses of 'vbool102' public Bernoulli[] vbool102_uses_F; // Message to definition of 'vbool242' public Bernoulli vbool242_B; // Messages to uses of 'vbool141' public Bernoulli[] vbool141_uses_F; // Message to definition of 'vbool219' public Bernoulli vbool219_B; // Messages to uses of 'vbool115' public Bernoulli[] vbool115_uses_F; // Message to definition of 'vbool193' public Bernoulli vbool193_B; // Messages to uses of 'vbool106' public Bernoulli[] vbool106_uses_F; // Message to definition of 'vbool254' public Bernoulli vbool254_B; // Message to definition of 'vbool260' public Bernoulli vbool260_B; // Message to definition of 'vbool269' public Bernoulli vbool269_B; // Messages to uses of 'vbool142' public Bernoulli[] vbool142_uses_F; // Message to definition of 'vbool278' public Bernoulli vbool278_B; // Messages to uses of 'vbool143' public Bernoulli[] vbool143_uses_F; // Message to definition of 'vbool284' public Bernoulli vbool284_B; // Messages to uses of 'vbool144' public Bernoulli[] vbool144_uses_F; // Message to definition of 'vbool222' public Bernoulli vbool222_B; // Messages to uses of 'vbool112' public Bernoulli[] vbool112_uses_F; // Message to definition of 'vbool191' public Bernoulli vbool191_B; // Messages to uses of 'vbool104' public Bernoulli[] vbool104_uses_F; // Message to definition of 'vbool248' public Bernoulli vbool248_B; // Message to definition of 'vbool251' public Bernoulli vbool251_B; // Message to definition of 'vbool266' public Bernoulli vbool266_B; // Message to definition of 'vbool272' public Bernoulli vbool272_B; // Message to definition of 'vbool225' public Bernoulli vbool225_B; // Messages to uses of 'vbool113' public Bernoulli[] vbool113_uses_F; // Message to definition of 'vbool228' public Bernoulli vbool228_B; // Message to definition of 'vbool231' public Bernoulli vbool231_B; // Message to definition of 'vbool192' public Bernoulli vbool192_B; // Messages to uses of 'vbool105' public Bernoulli[] vbool105_uses_F; // Message to definition of 'vbool257' public Bernoulli vbool257_B; // Message to definition of 'vbool263' public Bernoulli vbool263_B; // Message to definition of 'vbool275' public Bernoulli vbool275_B; // Message to definition of 'vbool281' public Bernoulli vbool281_B; // Message to definition of 'vbool234' public Bernoulli vbool234_B; // Messages to uses of 'vbool114' public Bernoulli[] vbool114_uses_F; // Message to definition of 'vbool237' public Bernoulli vbool237_B; // Message to definition of 'vbool240' public Bernoulli vbool240_B; // Messages to uses of 'vbool408' public Bernoulli[] vbool408_uses_F; // The constant 'vBernoulli193' public Bernoulli vBernoulli193; // Message to definition of 'vbool369' public Bernoulli vbool369_B; // Messages to uses of 'vbool0' public Bernoulli[] vbool0_uses_F; // Message to definition of 'vbool370' public Bernoulli vbool370_B; // Message to definition of 'vbool206' public Bernoulli vbool206_B; // Messages to uses of 'vbool42' public Bernoulli[] vbool42_uses_F; // Message to definition of 'vbool373' public Bernoulli vbool373_B; // Message to definition of 'vbool375' public Bernoulli vbool375_B; // Messages to uses of 'vbool68' public Bernoulli[] vbool68_uses_F; // Messages to uses of 'vbool63' public Bernoulli[] vbool63_uses_F; // Message to definition of 'vbool195' public Bernoulli vbool195_B; // Messages to uses of 'vbool16' public Bernoulli[] vbool16_uses_F; // Message to definition of 'vbool245' public Bernoulli vbool245_B; // Message to definition of 'vbool377' public Bernoulli vbool377_B; // Messages to uses of 'vbool376' public Bernoulli[] vbool376_uses_F; // Message to definition of 'vbool374' public Bernoulli vbool374_B; // Messages to uses of 'vbool373' public Bernoulli[] vbool373_uses_F; // Message to definition of 'vbool378' public Bernoulli vbool378_B; // Message to definition of 'vbool207' public Bernoulli vbool207_B; // Messages to uses of 'vbool43' public Bernoulli[] vbool43_uses_F; // Message to definition of 'vbool381' public Bernoulli vbool381_B; // Message to definition of 'vbool383' public Bernoulli vbool383_B; // Messages to uses of 'vbool69' public Bernoulli[] vbool69_uses_F; // Messages to uses of 'vbool64' public Bernoulli[] vbool64_uses_F; // Message to definition of 'vbool196' public Bernoulli vbool196_B; // Messages to uses of 'vbool17' public Bernoulli[] vbool17_uses_F; // Message to definition of 'vbool385' public Bernoulli vbool385_B; // Messages to uses of 'vbool384' public Bernoulli[] vbool384_uses_F; // Message to definition of 'vbool382' public Bernoulli vbool382_B; // Messages to uses of 'vbool381' public Bernoulli[] vbool381_uses_F; // Message to definition of 'vbool386' public Bernoulli vbool386_B; // Message to definition of 'vbool208' public Bernoulli vbool208_B; // Messages to uses of 'vbool44' public Bernoulli[] vbool44_uses_F; // Message to definition of 'vbool389' public Bernoulli vbool389_B; // Message to definition of 'vbool391' public Bernoulli vbool391_B; // Messages to uses of 'vbool70' public Bernoulli[] vbool70_uses_F; // Messages to uses of 'vbool65' public Bernoulli[] vbool65_uses_F; // Message to definition of 'vbool197' public Bernoulli vbool197_B; // Messages to uses of 'vbool18' public Bernoulli[] vbool18_uses_F; // Message to definition of 'vbool393' public Bernoulli vbool393_B; // Messages to uses of 'vbool392' public Bernoulli[] vbool392_uses_F; // Message to definition of 'vbool390' public Bernoulli vbool390_B; // Messages to uses of 'vbool389' public Bernoulli[] vbool389_uses_F; // Message to definition of 'vbool394' public Bernoulli vbool394_B; // Message to definition of 'vbool209' public Bernoulli vbool209_B; // Messages to uses of 'vbool45' public Bernoulli[] vbool45_uses_F; // Message to definition of 'vbool397' public Bernoulli vbool397_B; // Message to definition of 'vbool399' public Bernoulli vbool399_B; // Messages to uses of 'vbool71' public Bernoulli[] vbool71_uses_F; // Messages to uses of 'vbool66' public Bernoulli[] vbool66_uses_F; // Message to definition of 'vbool198' public Bernoulli vbool198_B; // Messages to uses of 'vbool19' public Bernoulli[] vbool19_uses_F; // Message to definition of 'vbool401' public Bernoulli vbool401_B; // Messages to uses of 'vbool400' public Bernoulli[] vbool400_uses_F; // Message to definition of 'vbool398' public Bernoulli vbool398_B; // Messages to uses of 'vbool397' public Bernoulli[] vbool397_uses_F; // The constant 'vBernoulli4' public Bernoulli vBernoulli4; // Message to definition of 'vbool220' public Bernoulli vbool220_B; // Messages to uses of 'vbool219' public Bernoulli[] vbool219_uses_F; // Message to definition of 'vbool447' public Bernoulli vbool447_B; // Messages to uses of 'vbool180' public Bernoulli[] vbool180_uses_F; // Message to definition of 'vbool243' public Bernoulli vbool243_B; // Messages to uses of 'vbool218' public Bernoulli[] vbool218_uses_F; // Messages to uses of 'vbool227' public Bernoulli[] vbool227_uses_F; // Messages to uses of 'vbool239' public Bernoulli[] vbool239_uses_F; // Messages to uses of 'vbool242' public Bernoulli[] vbool242_uses_F; // Message to definition of 'vbool252' public Bernoulli vbool252_B; // Messages to uses of 'vbool251' public Bernoulli[] vbool251_uses_F; // Message to definition of 'vbool264' public Bernoulli vbool264_B; // Messages to uses of 'vbool263' public Bernoulli[] vbool263_uses_F; // Message to definition of 'vbool273' public Bernoulli vbool273_B; // Messages to uses of 'vbool272' public Bernoulli[] vbool272_uses_F; // Message to definition of 'vbool282' public Bernoulli vbool282_B; // Messages to uses of 'vbool281' public Bernoulli[] vbool281_uses_F; // Message to definition of 'vbool285' public Bernoulli vbool285_B; // Messages to uses of 'vbool284' public Bernoulli[] vbool284_uses_F; // Messages to uses of 'vbool217' public Bernoulli[] vbool217_uses_F; // Message to definition of 'vbool450' public Bernoulli vbool450_B; // Messages to uses of 'vbool184' public Bernoulli[] vbool184_uses_F; // Message to definition of 'vbool255' public Bernoulli vbool255_B; // Message to definition of 'vbool261' public Bernoulli vbool261_B; // Message to definition of 'vbool270' public Bernoulli vbool270_B; // Message to definition of 'vbool279' public Bernoulli vbool279_B; // Messages to uses of 'vbool221' public Bernoulli[] vbool221_uses_F; // Message to definition of 'vbool246' public Bernoulli vbool246_B; // Messages to uses of 'vbool245' public Bernoulli[] vbool245_uses_F; // Message to definition of 'vbool223' public Bernoulli vbool223_B; // Messages to uses of 'vbool220' public Bernoulli[] vbool220_uses_F; // Message to definition of 'vbool448' public Bernoulli vbool448_B; // Messages to uses of 'vbool182' public Bernoulli[] vbool182_uses_F; // Message to definition of 'vbool249' public Bernoulli vbool249_B; // Message to definition of 'vbool267' public Bernoulli vbool267_B; // Messages to uses of 'vbool224' public Bernoulli[] vbool224_uses_F; // Messages to uses of 'vbool230' public Bernoulli[] vbool230_uses_F; // Messages to uses of 'vbool254' public Bernoulli[] vbool254_uses_F; // Messages to uses of 'vbool269' public Bernoulli[] vbool269_uses_F; // Messages to uses of 'vbool248' public Bernoulli[] vbool248_uses_F; // Messages to uses of 'vbool266' public Bernoulli[] vbool266_uses_F; // Message to definition of 'vbool226' public Bernoulli vbool226_B; // Messages to uses of 'vbool223' public Bernoulli[] vbool223_uses_F; // Message to definition of 'vbool229' public Bernoulli vbool229_B; // Messages to uses of 'vbool226' public Bernoulli[] vbool226_uses_F; // Message to definition of 'vbool232' public Bernoulli vbool232_B; // Messages to uses of 'vbool229' public Bernoulli[] vbool229_uses_F; // Message to definition of 'vbool449' public Bernoulli vbool449_B; // Messages to uses of 'vbool183' public Bernoulli[] vbool183_uses_F; // Message to definition of 'vbool258' public Bernoulli vbool258_B; // Message to definition of 'vbool276' public Bernoulli vbool276_B; // Messages to uses of 'vbool233' public Bernoulli[] vbool233_uses_F; // Messages to uses of 'vbool236' public Bernoulli[] vbool236_uses_F; // Messages to uses of 'vbool260' public Bernoulli[] vbool260_uses_F; // Messages to uses of 'vbool278' public Bernoulli[] vbool278_uses_F; // Messages to uses of 'vbool257' public Bernoulli[] vbool257_uses_F; // Messages to uses of 'vbool275' public Bernoulli[] vbool275_uses_F; // Message to definition of 'vbool235' public Bernoulli vbool235_B; // Messages to uses of 'vbool232' public Bernoulli[] vbool232_uses_F; // Message to definition of 'vbool238' public Bernoulli vbool238_B; // Messages to uses of 'vbool235' public Bernoulli[] vbool235_uses_F; // Message to definition of 'vbool241' public Bernoulli vbool241_B; // Messages to uses of 'vbool238' public Bernoulli[] vbool238_uses_F; // Messages to uses of 'vbool368' public Bernoulli[] vbool368_uses_F; // The constant 'vBernoulli3' public Bernoulli vBernoulli3; // Message to definition of 'vbool185' public Bernoulli vbool185_B; // Messages to uses of 'vbool11' public Bernoulli[] vbool11_uses_F; // Messages to uses of 'vbool372' public Bernoulli[] vbool372_uses_F; // Message to definition of 'vbool211' public Bernoulli vbool211_B; // Messages to uses of 'vbool89' public Bernoulli[] vbool89_uses_F; // Message to definition of 'vbool376' public Bernoulli vbool376_B; // Messages to uses of 'vbool374' public Bernoulli[] vbool374_uses_F; // Message to definition of 'vbool201' public Bernoulli vbool201_B; // Messages to uses of 'vbool37' public Bernoulli[] vbool37_uses_F; // Messages to uses of 'vbool375' public Bernoulli[] vbool375_uses_F; // Messages to uses of 'vbool371' public Bernoulli[] vbool371_uses_F; // Message to definition of 'vbool186' public Bernoulli vbool186_B; // Messages to uses of 'vbool12' public Bernoulli[] vbool12_uses_F; // Messages to uses of 'vbool380' public Bernoulli[] vbool380_uses_F; // Message to definition of 'vbool212' public Bernoulli vbool212_B; // Messages to uses of 'vbool91' public Bernoulli[] vbool91_uses_F; // Message to definition of 'vbool384' public Bernoulli vbool384_B; // Messages to uses of 'vbool382' public Bernoulli[] vbool382_uses_F; // Message to definition of 'vbool202' public Bernoulli vbool202_B; // Messages to uses of 'vbool38' public Bernoulli[] vbool38_uses_F; // Messages to uses of 'vbool383' public Bernoulli[] vbool383_uses_F; // Messages to uses of 'vbool379' public Bernoulli[] vbool379_uses_F; // Message to definition of 'vbool187' public Bernoulli vbool187_B; // Messages to uses of 'vbool13' public Bernoulli[] vbool13_uses_F; // Messages to uses of 'vbool388' public Bernoulli[] vbool388_uses_F; // Message to definition of 'vbool213' public Bernoulli vbool213_B; // Messages to uses of 'vbool92' public Bernoulli[] vbool92_uses_F; // Message to definition of 'vbool392' public Bernoulli vbool392_B; // Messages to uses of 'vbool390' public Bernoulli[] vbool390_uses_F; // Message to definition of 'vbool203' public Bernoulli vbool203_B; // Messages to uses of 'vbool39' public Bernoulli[] vbool39_uses_F; // Messages to uses of 'vbool391' public Bernoulli[] vbool391_uses_F; // Messages to uses of 'vbool387' public Bernoulli[] vbool387_uses_F; // Message to definition of 'vbool188' public Bernoulli vbool188_B; // Messages to uses of 'vbool14' public Bernoulli[] vbool14_uses_F; // Messages to uses of 'vbool396' public Bernoulli[] vbool396_uses_F; // Message to definition of 'vbool214' public Bernoulli vbool214_B; // Messages to uses of 'vbool93' public Bernoulli[] vbool93_uses_F; // Message to definition of 'vbool400' public Bernoulli vbool400_B; // Messages to uses of 'vbool398' public Bernoulli[] vbool398_uses_F; // Message to definition of 'vbool204' public Bernoulli vbool204_B; // Messages to uses of 'vbool40' public Bernoulli[] vbool40_uses_F; // Messages to uses of 'vbool399' public Bernoulli[] vbool399_uses_F; // Messages to uses of 'vbool395' public Bernoulli[] vbool395_uses_F; // Messages to uses of 'vbool222' public Bernoulli[] vbool222_uses_F; // Message to definition of 'vbool421' public Bernoulli vbool421_B; // Messages to uses of 'vbool159' public Bernoulli[] vbool159_uses_F; // Message to definition of 'vbool442' public Bernoulli vbool442_B; // Messages to uses of 'vbool154' public Bernoulli[] vbool154_uses_F; // Message to definition of 'vbool244' public Bernoulli vbool244_B; // Messages to uses of 'vbool241' public Bernoulli[] vbool241_uses_F; // Message to definition of 'vbool253' public Bernoulli vbool253_B; // Messages to uses of 'vbool250' public Bernoulli[] vbool250_uses_F; // Message to definition of 'vbool265' public Bernoulli vbool265_B; // Messages to uses of 'vbool262' public Bernoulli[] vbool262_uses_F; // Message to definition of 'vbool274' public Bernoulli vbool274_B; // Messages to uses of 'vbool271' public Bernoulli[] vbool271_uses_F; // Message to definition of 'vbool283' public Bernoulli vbool283_B; // Messages to uses of 'vbool280' public Bernoulli[] vbool280_uses_F; // Message to definition of 'vbool286' public Bernoulli vbool286_B; // Messages to uses of 'vbool283' public Bernoulli[] vbool283_uses_F; // Message to definition of 'vbool424' public Bernoulli vbool424_B; // Messages to uses of 'vbool162' public Bernoulli[] vbool162_uses_F; // Message to definition of 'vbool445' public Bernoulli vbool445_B; // Messages to uses of 'vbool158' public Bernoulli[] vbool158_uses_F; // Message to definition of 'vbool256' public Bernoulli vbool256_B; // Messages to uses of 'vbool253' public Bernoulli[] vbool253_uses_F; // Message to definition of 'vbool262' public Bernoulli vbool262_B; // Messages to uses of 'vbool259' public Bernoulli[] vbool259_uses_F; // Message to definition of 'vbool271' public Bernoulli vbool271_B; // Messages to uses of 'vbool268' public Bernoulli[] vbool268_uses_F; // Message to definition of 'vbool280' public Bernoulli vbool280_B; // Messages to uses of 'vbool277' public Bernoulli[] vbool277_uses_F; // Message to definition of 'vbool247' public Bernoulli vbool247_B; // Messages to uses of 'vbool244' public Bernoulli[] vbool244_uses_F; // Messages to uses of 'vbool225' public Bernoulli[] vbool225_uses_F; // Message to definition of 'vbool422' public Bernoulli vbool422_B; // Messages to uses of 'vbool160' public Bernoulli[] vbool160_uses_F; // Message to definition of 'vbool443' public Bernoulli vbool443_B; // Messages to uses of 'vbool156' public Bernoulli[] vbool156_uses_F; // Message to definition of 'vbool250' public Bernoulli vbool250_B; // Messages to uses of 'vbool247' public Bernoulli[] vbool247_uses_F; // Message to definition of 'vbool268' public Bernoulli vbool268_B; // Messages to uses of 'vbool265' public Bernoulli[] vbool265_uses_F; // Messages to uses of 'vbool228' public Bernoulli[] vbool228_uses_F; // Messages to uses of 'vbool231' public Bernoulli[] vbool231_uses_F; // Messages to uses of 'vbool234' public Bernoulli[] vbool234_uses_F; // Message to definition of 'vbool423' public Bernoulli vbool423_B; // Messages to uses of 'vbool161' public Bernoulli[] vbool161_uses_F; // Message to definition of 'vbool444' public Bernoulli vbool444_B; // Messages to uses of 'vbool157' public Bernoulli[] vbool157_uses_F; // Message to definition of 'vbool259' public Bernoulli vbool259_B; // Messages to uses of 'vbool256' public Bernoulli[] vbool256_uses_F; // Message to definition of 'vbool277' public Bernoulli vbool277_B; // Messages to uses of 'vbool274' public Bernoulli[] vbool274_uses_F; // Messages to uses of 'vbool237' public Bernoulli[] vbool237_uses_F; // Messages to uses of 'vbool240' public Bernoulli[] vbool240_uses_F; // Messages to uses of 'vbool243' public Bernoulli[] vbool243_uses_F; // Message to definition of 'vbool411' public Bernoulli vbool411_B; // Message to definition of 'vbool452' public Bernoulli vbool452_B; // Message to definition of 'vbool412' public Bernoulli vbool412_B; // Message to definition of 'vbool453' public Bernoulli vbool453_B; // Message to definition of 'vbool413' public Bernoulli vbool413_B; // Message to definition of 'vbool454' public Bernoulli vbool454_B; // Message to definition of 'vbool414' public Bernoulli vbool414_B; // Message to definition of 'vbool455' public Bernoulli vbool455_B; // Message to definition of 'vbool415' public Bernoulli vbool415_B; // Messages to uses of 'vbool246' public Bernoulli[] vbool246_uses_F; // Messages to uses of 'vbool249' public Bernoulli[] vbool249_uses_F; // Messages to uses of 'vbool252' public Bernoulli[] vbool252_uses_F; // Messages to uses of 'vbool255' public Bernoulli[] vbool255_uses_F; // Messages to uses of 'vbool258' public Bernoulli[] vbool258_uses_F; // Messages to uses of 'vbool261' public Bernoulli[] vbool261_uses_F; // Messages to uses of 'vbool264' public Bernoulli[] vbool264_uses_F; // Messages to uses of 'vbool267' public Bernoulli[] vbool267_uses_F; // Messages to uses of 'vbool270' public Bernoulli[] vbool270_uses_F; // Messages to uses of 'vbool273' public Bernoulli[] vbool273_uses_F; // Messages to uses of 'vbool276' public Bernoulli[] vbool276_uses_F; // Messages to uses of 'vbool279' public Bernoulli[] vbool279_uses_F; // Messages to uses of 'vbool282' public Bernoulli[] vbool282_uses_F; // Messages to uses of 'vbool285' public Bernoulli[] vbool285_uses_F; // Message to definition of 'vbool418' public Bernoulli vbool418_B; // Message to definition of 'vbool416' public Bernoulli vbool416_B; // Message to definition of 'vbool417' public Bernoulli vbool417_B; // Message to marginal of 'vbool210' public Bernoulli vbool210_marginal_B; // Message to marginal of 'vbool451' public Bernoulli vbool451_marginal_B; // Message to marginal of 'vbool407' public Bernoulli vbool407_marginal_B; // Message to marginal of 'vbool419' public Bernoulli vbool419_marginal_B; // Message to marginal of 'vbool441' public Bernoulli vbool441_marginal_B; // Message to marginal of 'vbool205' public Bernoulli vbool205_marginal_B; // Message to marginal of 'vbool402' public Bernoulli vbool402_marginal_B; // Message to marginal of 'vbool405' public Bernoulli vbool405_marginal_B; // Message to marginal of 'vbool404' public Bernoulli vbool404_marginal_B; // Message to marginal of 'vbool406' public Bernoulli vbool406_marginal_B; // Message to marginal of 'vbool408' public Bernoulli vbool408_marginal_B; // Message to marginal of 'vbool420' public Bernoulli vbool420_marginal_B; // Message to marginal of 'vbool446' public Bernoulli vbool446_marginal_B; // Message to marginal of 'vbool189' public Bernoulli vbool189_marginal_B; // Message to marginal of 'vbool199' public Bernoulli vbool199_marginal_B; // Message to marginal of 'vbool215' public Bernoulli vbool215_marginal_B; // Message to marginal of 'vbool216' public Bernoulli vbool216_marginal_B; // Message to marginal of 'vbool218' public Bernoulli vbool218_marginal_B; // Message to marginal of 'vbool221' public Bernoulli vbool221_marginal_B; // Message to marginal of 'vbool224' public Bernoulli vbool224_marginal_B; // Message to marginal of 'vbool227' public Bernoulli vbool227_marginal_B; // Message to marginal of 'vbool230' public Bernoulli vbool230_marginal_B; // Message to marginal of 'vbool233' public Bernoulli vbool233_marginal_B; // Message to marginal of 'vbool236' public Bernoulli vbool236_marginal_B; // Message to marginal of 'vbool239' public Bernoulli vbool239_marginal_B; // Message to marginal of 'vbool403' public Bernoulli vbool403_marginal_B; // Message to marginal of 'vbool287' public Bernoulli vbool287_marginal_B; // Message to marginal of 'vbool368' public Bernoulli vbool368_marginal_B; // Message to marginal of 'vbool370' public Bernoulli vbool370_marginal_B; // Message to marginal of 'vbool371' public Bernoulli vbool371_marginal_B; // Message to marginal of 'vbool372' public Bernoulli vbool372_marginal_B; // Message to marginal of 'vbool378' public Bernoulli vbool378_marginal_B; // Message to marginal of 'vbool379' public Bernoulli vbool379_marginal_B; // Message to marginal of 'vbool380' public Bernoulli vbool380_marginal_B; // Message to marginal of 'vbool386' public Bernoulli vbool386_marginal_B; // Message to marginal of 'vbool387' public Bernoulli vbool387_marginal_B; // Message to marginal of 'vbool388' public Bernoulli vbool388_marginal_B; // Message to marginal of 'vbool394' public Bernoulli vbool394_marginal_B; // Message to marginal of 'vbool395' public Bernoulli vbool395_marginal_B; // Message to marginal of 'vbool396' public Bernoulli vbool396_marginal_B; // Message to marginal of 'vbool456' public Bernoulli vbool456_marginal_B; // Message to marginal of 'vbool409' public Bernoulli vbool409_marginal_B; // Message to marginal of 'vbool194' public Bernoulli vbool194_marginal_B; // Message to marginal of 'vbool410' public Bernoulli vbool410_marginal_B; // Message to marginal of 'vbool200' public Bernoulli vbool200_marginal_B; // Message to marginal of 'vbool217' public Bernoulli vbool217_marginal_B; // Message to marginal of 'vbool190' public Bernoulli vbool190_marginal_B; // Message to marginal of 'vbool242' public Bernoulli vbool242_marginal_B; // Message to marginal of 'vbool219' public Bernoulli vbool219_marginal_B; // Message to marginal of 'vbool193' public Bernoulli vbool193_marginal_B; // Message to marginal of 'vbool254' public Bernoulli vbool254_marginal_B; // Message to marginal of 'vbool260' public Bernoulli vbool260_marginal_B; // Message to marginal of 'vbool269' public Bernoulli vbool269_marginal_B; // Message to marginal of 'vbool278' public Bernoulli vbool278_marginal_B; // Message to marginal of 'vbool284' public Bernoulli vbool284_marginal_B; // Message to marginal of 'vbool222' public Bernoulli vbool222_marginal_B; // Message to marginal of 'vbool191' public Bernoulli vbool191_marginal_B; // Message to marginal of 'vbool248' public Bernoulli vbool248_marginal_B; // Message to marginal of 'vbool251' public Bernoulli vbool251_marginal_B; // Message to marginal of 'vbool266' public Bernoulli vbool266_marginal_B; // Message to marginal of 'vbool272' public Bernoulli vbool272_marginal_B; // Message to marginal of 'vbool225' public Bernoulli vbool225_marginal_B; // Message to marginal of 'vbool228' public Bernoulli vbool228_marginal_B; // Message to marginal of 'vbool231' public Bernoulli vbool231_marginal_B; // Message to marginal of 'vbool192' public Bernoulli vbool192_marginal_B; // Message to marginal of 'vbool257' public Bernoulli vbool257_marginal_B; // Message to marginal of 'vbool263' public Bernoulli vbool263_marginal_B; // Message to marginal of 'vbool275' public Bernoulli vbool275_marginal_B; // Message to marginal of 'vbool281' public Bernoulli vbool281_marginal_B; // Message to marginal of 'vbool234' public Bernoulli vbool234_marginal_B; // Message to marginal of 'vbool237' public Bernoulli vbool237_marginal_B; // Message to marginal of 'vbool240' public Bernoulli vbool240_marginal_B; // Message to marginal of 'vbool369' public Bernoulli vbool369_marginal_B; // Message to marginal of 'vbool206' public Bernoulli vbool206_marginal_B; // Message to marginal of 'vbool373' public Bernoulli vbool373_marginal_B; // Message to marginal of 'vbool375' public Bernoulli vbool375_marginal_B; // Message to marginal of 'vbool195' public Bernoulli vbool195_marginal_B; // Message to marginal of 'vbool245' public Bernoulli vbool245_marginal_B; // Message to marginal of 'vbool374' public Bernoulli vbool374_marginal_B; // Message to marginal of 'vbool376' public Bernoulli vbool376_marginal_B; // Message to marginal of 'vbool377' public Bernoulli vbool377_marginal_B; // Message to marginal of 'vbool207' public Bernoulli vbool207_marginal_B; // Message to marginal of 'vbool381' public Bernoulli vbool381_marginal_B; // Message to marginal of 'vbool383' public Bernoulli vbool383_marginal_B; // Message to marginal of 'vbool196' public Bernoulli vbool196_marginal_B; // Message to marginal of 'vbool382' public Bernoulli vbool382_marginal_B; // Message to marginal of 'vbool384' public Bernoulli vbool384_marginal_B; // Message to marginal of 'vbool385' public Bernoulli vbool385_marginal_B; // Message to marginal of 'vbool208' public Bernoulli vbool208_marginal_B; // Message to marginal of 'vbool389' public Bernoulli vbool389_marginal_B; // Message to marginal of 'vbool391' public Bernoulli vbool391_marginal_B; // Message to marginal of 'vbool197' public Bernoulli vbool197_marginal_B; // Message to marginal of 'vbool390' public Bernoulli vbool390_marginal_B; // Message to marginal of 'vbool392' public Bernoulli vbool392_marginal_B; // Message to marginal of 'vbool393' public Bernoulli vbool393_marginal_B; // Message to marginal of 'vbool209' public Bernoulli vbool209_marginal_B; // Message to marginal of 'vbool397' public Bernoulli vbool397_marginal_B; // Message to marginal of 'vbool399' public Bernoulli vbool399_marginal_B; // Message to marginal of 'vbool198' public Bernoulli vbool198_marginal_B; // Message to marginal of 'vbool398' public Bernoulli vbool398_marginal_B; // Message to marginal of 'vbool400' public Bernoulli vbool400_marginal_B; // Message to marginal of 'vbool401' public Bernoulli vbool401_marginal_B; // Message to marginal of 'vbool220' public Bernoulli vbool220_marginal_B; // Message to marginal of 'vbool447' public Bernoulli vbool447_marginal_B; // Message to marginal of 'vbool243' public Bernoulli vbool243_marginal_B; // Message to marginal of 'vbool252' public Bernoulli vbool252_marginal_B; // Message to marginal of 'vbool264' public Bernoulli vbool264_marginal_B; // Message to marginal of 'vbool273' public Bernoulli vbool273_marginal_B; // Message to marginal of 'vbool282' public Bernoulli vbool282_marginal_B; // Message to marginal of 'vbool285' public Bernoulli vbool285_marginal_B; // Message to marginal of 'vbool450' public Bernoulli vbool450_marginal_B; // Message to marginal of 'vbool255' public Bernoulli vbool255_marginal_B; // Message to marginal of 'vbool261' public Bernoulli vbool261_marginal_B; // Message to marginal of 'vbool270' public Bernoulli vbool270_marginal_B; // Message to marginal of 'vbool279' public Bernoulli vbool279_marginal_B; // Message to marginal of 'vbool246' public Bernoulli vbool246_marginal_B; // Message to marginal of 'vbool223' public Bernoulli vbool223_marginal_B; // Message to marginal of 'vbool448' public Bernoulli vbool448_marginal_B; // Message to marginal of 'vbool249' public Bernoulli vbool249_marginal_B; // Message to marginal of 'vbool267' public Bernoulli vbool267_marginal_B; // Message to marginal of 'vbool226' public Bernoulli vbool226_marginal_B; // Message to marginal of 'vbool229' public Bernoulli vbool229_marginal_B; // Message to marginal of 'vbool232' public Bernoulli vbool232_marginal_B; // Message to marginal of 'vbool449' public Bernoulli vbool449_marginal_B; // Message to marginal of 'vbool258' public Bernoulli vbool258_marginal_B; // Message to marginal of 'vbool276' public Bernoulli vbool276_marginal_B; // Message to marginal of 'vbool235' public Bernoulli vbool235_marginal_B; // Message to marginal of 'vbool238' public Bernoulli vbool238_marginal_B; // Message to marginal of 'vbool241' public Bernoulli vbool241_marginal_B; // Message to marginal of 'vbool185' public Bernoulli vbool185_marginal_B; // Message to marginal of 'vbool211' public Bernoulli vbool211_marginal_B; // Message to marginal of 'vbool201' public Bernoulli vbool201_marginal_B; // Message to marginal of 'vbool186' public Bernoulli vbool186_marginal_B; // Message to marginal of 'vbool212' public Bernoulli vbool212_marginal_B; // Message to marginal of 'vbool202' public Bernoulli vbool202_marginal_B; // Message to marginal of 'vbool187' public Bernoulli vbool187_marginal_B; // Message to marginal of 'vbool213' public Bernoulli vbool213_marginal_B; // Message to marginal of 'vbool203' public Bernoulli vbool203_marginal_B; // Message to marginal of 'vbool188' public Bernoulli vbool188_marginal_B; // Message to marginal of 'vbool214' public Bernoulli vbool214_marginal_B; // Message to marginal of 'vbool204' public Bernoulli vbool204_marginal_B; // Message to marginal of 'vbool421' public Bernoulli vbool421_marginal_B; // Message to marginal of 'vbool442' public Bernoulli vbool442_marginal_B; // Message to marginal of 'vbool244' public Bernoulli vbool244_marginal_B; // Message to marginal of 'vbool247' public Bernoulli vbool247_marginal_B; // Message to marginal of 'vbool250' public Bernoulli vbool250_marginal_B; // Message to marginal of 'vbool253' public Bernoulli vbool253_marginal_B; // Message to marginal of 'vbool256' public Bernoulli vbool256_marginal_B; // Message to marginal of 'vbool259' public Bernoulli vbool259_marginal_B; // Message to marginal of 'vbool262' public Bernoulli vbool262_marginal_B; // Message to marginal of 'vbool265' public Bernoulli vbool265_marginal_B; // Message to marginal of 'vbool268' public Bernoulli vbool268_marginal_B; // Message to marginal of 'vbool271' public Bernoulli vbool271_marginal_B; // Message to marginal of 'vbool274' public Bernoulli vbool274_marginal_B; // Message to marginal of 'vbool277' public Bernoulli vbool277_marginal_B; // Message to marginal of 'vbool280' public Bernoulli vbool280_marginal_B; // Message to marginal of 'vbool283' public Bernoulli vbool283_marginal_B; // Message to marginal of 'vbool286' public Bernoulli vbool286_marginal_B; // Message to marginal of 'vbool424' public Bernoulli vbool424_marginal_B; // Message to marginal of 'vbool445' public Bernoulli vbool445_marginal_B; // Message to marginal of 'vbool422' public Bernoulli vbool422_marginal_B; // Message to marginal of 'vbool443' public Bernoulli vbool443_marginal_B; // Message to marginal of 'vbool423' public Bernoulli vbool423_marginal_B; // Message to marginal of 'vbool444' public Bernoulli vbool444_marginal_B; // Message to marginal of 'vbool411' public Bernoulli vbool411_marginal_B; // Message to marginal of 'vbool452' public Bernoulli vbool452_marginal_B; // Message to marginal of 'vbool412' public Bernoulli vbool412_marginal_B; // Message to marginal of 'vbool453' public Bernoulli vbool453_marginal_B; // Message to marginal of 'vbool413' public Bernoulli vbool413_marginal_B; // Message to marginal of 'vbool454' public Bernoulli vbool454_marginal_B; // Message to marginal of 'vbool414' public Bernoulli vbool414_marginal_B; // Message to marginal of 'vbool455' public Bernoulli vbool455_marginal_B; // Message to marginal of 'vbool415' public Bernoulli vbool415_marginal_B; // Message to marginal of 'vbool418' public Bernoulli vbool418_marginal_B; // Message to marginal of 'vbool416' public Bernoulli vbool416_marginal_B; // Message to marginal of 'vbool417' public Bernoulli vbool417_marginal_B; // Message to marginal of 'vbool90' public Bernoulli vbool90_marginal_B; // Message to marginal of 'vbool72' public Bernoulli vbool72_marginal_B; // Message to marginal of 'vbool155' public Bernoulli vbool155_marginal_B; // Message to marginal of 'vbool67' public Bernoulli vbool67_marginal_B; // Message to marginal of 'vbool163' public Bernoulli vbool163_marginal_B; // Message to marginal of 'vbool181' public Bernoulli vbool181_marginal_B; // Message to marginal of 'vbool46' public Bernoulli vbool46_marginal_B; // Message to marginal of 'vbool145' public Bernoulli vbool145_marginal_B; // Message to marginal of 'vbool116' public Bernoulli vbool116_marginal_B; // Message to marginal of 'vbool2' public Bernoulli vbool2_marginal_B; // Message to marginal of 'vbool103' public Bernoulli vbool103_marginal_B; // Message to marginal of 'vbool15' public Bernoulli vbool15_marginal_B; // Message to marginal of 'vbool20' public Bernoulli vbool20_marginal_B; // Message to marginal of 'vbool111' public Bernoulli vbool111_marginal_B; // Message to marginal of 'vbool107' public Bernoulli vbool107_marginal_B; // Message to marginal of 'vbool110' public Bernoulli vbool110_marginal_B; // Message to marginal of 'vbool108' public Bernoulli vbool108_marginal_B; // Message to marginal of 'vbool109' public Bernoulli vbool109_marginal_B; // Message to marginal of 'vbool63' public Bernoulli vbool63_marginal_B; // Message to marginal of 'vbool141' public Bernoulli vbool141_marginal_B; // Message to marginal of 'vbool64' public Bernoulli vbool64_marginal_B; // Message to marginal of 'vbool142' public Bernoulli vbool142_marginal_B; // Message to marginal of 'vbool65' public Bernoulli vbool65_marginal_B; // Message to marginal of 'vbool143' public Bernoulli vbool143_marginal_B; // Message to marginal of 'vbool66' public Bernoulli vbool66_marginal_B; // Message to marginal of 'vbool144' public Bernoulli vbool144_marginal_B; // Message to marginal of 'vbool1' public Bernoulli vbool1_marginal_B; // Message to marginal of 'vbool41' public Bernoulli vbool41_marginal_B; // Message to marginal of 'vbool102' public Bernoulli vbool102_marginal_B; // Message to marginal of 'vbool115' public Bernoulli vbool115_marginal_B; // Message to marginal of 'vbool106' public Bernoulli vbool106_marginal_B; // Message to marginal of 'vbool112' public Bernoulli vbool112_marginal_B; // Message to marginal of 'vbool104' public Bernoulli vbool104_marginal_B; // Message to marginal of 'vbool113' public Bernoulli vbool113_marginal_B; // Message to marginal of 'vbool105' public Bernoulli vbool105_marginal_B; // Message to marginal of 'vbool114' public Bernoulli vbool114_marginal_B; // Message to marginal of 'vbool0' public Bernoulli vbool0_marginal_B; // Message to marginal of 'vbool42' public Bernoulli vbool42_marginal_B; // Message to marginal of 'vbool68' public Bernoulli vbool68_marginal_B; // Message to marginal of 'vbool16' public Bernoulli vbool16_marginal_B; // Message to marginal of 'vbool43' public Bernoulli vbool43_marginal_B; // Message to marginal of 'vbool69' public Bernoulli vbool69_marginal_B; // Message to marginal of 'vbool17' public Bernoulli vbool17_marginal_B; // Message to marginal of 'vbool44' public Bernoulli vbool44_marginal_B; // Message to marginal of 'vbool70' public Bernoulli vbool70_marginal_B; // Message to marginal of 'vbool18' public Bernoulli vbool18_marginal_B; // Message to marginal of 'vbool45' public Bernoulli vbool45_marginal_B; // Message to marginal of 'vbool71' public Bernoulli vbool71_marginal_B; // Message to marginal of 'vbool19' public Bernoulli vbool19_marginal_B; // Message to marginal of 'vbool180' public Bernoulli vbool180_marginal_B; // Message to marginal of 'vbool184' public Bernoulli vbool184_marginal_B; // Message to marginal of 'vbool182' public Bernoulli vbool182_marginal_B; // Message to marginal of 'vbool183' public Bernoulli vbool183_marginal_B; // Message to marginal of 'vbool11' public Bernoulli vbool11_marginal_B; // Message to marginal of 'vbool89' public Bernoulli vbool89_marginal_B; // Message to marginal of 'vbool37' public Bernoulli vbool37_marginal_B; // Message to marginal of 'vbool12' public Bernoulli vbool12_marginal_B; // Message to marginal of 'vbool91' public Bernoulli vbool91_marginal_B; // Message to marginal of 'vbool38' public Bernoulli vbool38_marginal_B; // Message to marginal of 'vbool13' public Bernoulli vbool13_marginal_B; // Message to marginal of 'vbool92' public Bernoulli vbool92_marginal_B; // Message to marginal of 'vbool39' public Bernoulli vbool39_marginal_B; // Message to marginal of 'vbool14' public Bernoulli vbool14_marginal_B; // Message to marginal of 'vbool93' public Bernoulli vbool93_marginal_B; // Message to marginal of 'vbool40' public Bernoulli vbool40_marginal_B; // Message to marginal of 'vbool159' public Bernoulli vbool159_marginal_B; // Message to marginal of 'vbool154' public Bernoulli vbool154_marginal_B; // Message to marginal of 'vbool162' public Bernoulli vbool162_marginal_B; // Message to marginal of 'vbool158' public Bernoulli vbool158_marginal_B; // Message to marginal of 'vbool160' public Bernoulli vbool160_marginal_B; // Message to marginal of 'vbool156' public Bernoulli vbool156_marginal_B; // Message to marginal of 'vbool161' public Bernoulli vbool161_marginal_B; // Message to marginal of 'vbool157' public Bernoulli vbool157_marginal_B; #endregion #region Methods /// <summary> /// Configures constant values that will not change during the lifetime of the class. /// </summary> /// <remarks> /// This method should be called once only after the class is instantiated. In future, it will likely become /// the class constructor. /// </remarks> public void Reset() { // Create array for 'vbool90_uses' backwards messages. this.vbool90_uses_B = new Bernoulli[2]; this.vBernoulli98 = new Bernoulli(0.01); for(int _ind0 = 0; _ind0<2; _ind0++) { this.vbool90_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli98); } this.vbool90_F = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli98); // Message to 'vbool90' from Random factor this.vbool90_F = UnaryOp<bool>.RandomAverageConditional<Bernoulli>(this.vBernoulli98); // Create array for 'vbool72_uses' backwards messages. this.vbool72_uses_B = new Bernoulli[2]; this.vBernoulli80 = new Bernoulli(0.5); for(int _ind0 = 0; _ind0<2; _ind0++) { this.vbool72_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli80); } this.vbool72_F = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli80); // Message to 'vbool72' from Random factor this.vbool72_F = UnaryOp<bool>.RandomAverageConditional<Bernoulli>(this.vBernoulli80); // Create array for 'vbool210_uses' backwards messages. this.vbool210_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool210_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool210_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool155_uses' backwards messages. this.vbool155_uses_B = new Bernoulli[3]; this.vBernoulli163 = new Bernoulli(0.01); for(int _ind0 = 0; _ind0<3; _ind0++) { this.vbool155_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli163); } this.vbool155_F = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli163); // Message to 'vbool155' from Random factor this.vbool155_F = UnaryOp<bool>.RandomAverageConditional<Bernoulli>(this.vBernoulli163); // Create array for 'vbool451_uses' backwards messages. this.vbool451_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool451_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool451_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool67_uses' backwards messages. this.vbool67_uses_B = new Bernoulli[4]; this.vBernoulli75 = new Bernoulli(0.5); for(int _ind0 = 0; _ind0<4; _ind0++) { this.vbool67_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli75); } this.vbool67_F = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli75); // Message to 'vbool67' from Random factor this.vbool67_F = UnaryOp<bool>.RandomAverageConditional<Bernoulli>(this.vBernoulli75); // Create array for 'vbool407_uses' backwards messages. this.vbool407_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool407_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool407_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool163_uses' backwards messages. this.vbool163_uses_B = new Bernoulli[2]; this.vBernoulli171 = new Bernoulli(0.5); for(int _ind0 = 0; _ind0<2; _ind0++) { this.vbool163_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli171); } this.vbool163_F = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli171); // Message to 'vbool163' from Random factor this.vbool163_F = UnaryOp<bool>.RandomAverageConditional<Bernoulli>(this.vBernoulli171); // Create array for 'vbool419_uses' backwards messages. this.vbool419_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool419_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool419_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool181_uses' backwards messages. this.vbool181_uses_B = new Bernoulli[3]; this.vBernoulli189 = new Bernoulli(0.01); for(int _ind0 = 0; _ind0<3; _ind0++) { this.vbool181_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli189); } this.vbool181_F = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli189); // Message to 'vbool181' from Random factor this.vbool181_F = UnaryOp<bool>.RandomAverageConditional<Bernoulli>(this.vBernoulli189); // Create array for 'vbool441_uses' backwards messages. this.vbool441_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool441_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool441_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool46_uses' backwards messages. this.vbool46_uses_B = new Bernoulli[2]; this.vBernoulli54 = new Bernoulli(0.5); for(int _ind0 = 0; _ind0<2; _ind0++) { this.vbool46_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli54); } this.vbool46_F = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli54); // Message to 'vbool46' from Random factor this.vbool46_F = UnaryOp<bool>.RandomAverageConditional<Bernoulli>(this.vBernoulli54); // Create array for 'vbool205_uses' backwards messages. this.vbool205_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool205_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool205_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool145_uses' backwards messages. this.vbool145_uses_B = new Bernoulli[12]; this.vBernoulli153 = new Bernoulli(0.7); for(int _ind0 = 0; _ind0<12; _ind0++) { this.vbool145_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli153); } this.vbool145_F = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli153); // Message to 'vbool145' from Random factor this.vbool145_F = UnaryOp<bool>.RandomAverageConditional<Bernoulli>(this.vBernoulli153); // Create array for 'vbool402_uses' backwards messages. this.vbool402_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool402_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool402_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool116_uses' backwards messages. this.vbool116_uses_B = new Bernoulli[3]; this.vBernoulli124 = new Bernoulli(0.5); for(int _ind0 = 0; _ind0<3; _ind0++) { this.vbool116_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli124); } this.vbool116_F = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli124); // Message to 'vbool116' from Random factor this.vbool116_F = UnaryOp<bool>.RandomAverageConditional<Bernoulli>(this.vBernoulli124); // Create array for 'vbool405_uses' backwards messages. this.vbool405_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool405_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool405_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool2_uses' backwards messages. this.vbool2_uses_B = new Bernoulli[12]; this.vBernoulli10 = new Bernoulli(0.99); for(int _ind0 = 0; _ind0<12; _ind0++) { this.vbool2_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli10); } this.vbool2_F = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli10); // Message to 'vbool2' from Random factor this.vbool2_F = UnaryOp<bool>.RandomAverageConditional<Bernoulli>(this.vBernoulli10); // Create array for 'vbool404_uses' backwards messages. this.vbool404_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool404_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool404_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool406_uses' backwards messages. this.vbool406_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool406_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool406_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool408_uses' backwards messages. this.vbool408_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool408_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool408_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool420_uses' backwards messages. this.vbool420_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool420_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool420_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool103_uses' backwards messages. this.vbool103_uses_B = new Bernoulli[2]; this.vBernoulli111 = new Bernoulli(0.01); for(int _ind0 = 0; _ind0<2; _ind0++) { this.vbool103_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli111); } this.vbool103_F = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli111); // Message to 'vbool103' from Random factor this.vbool103_F = UnaryOp<bool>.RandomAverageConditional<Bernoulli>(this.vBernoulli111); // Create array for 'vbool446_uses' backwards messages. this.vbool446_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool446_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool446_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool15_uses' backwards messages. this.vbool15_uses_B = new Bernoulli[2]; this.vBernoulli23 = new Bernoulli(0.5); for(int _ind0 = 0; _ind0<2; _ind0++) { this.vbool15_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli23); } this.vbool15_F = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli23); // Message to 'vbool15' from Random factor this.vbool15_F = UnaryOp<bool>.RandomAverageConditional<Bernoulli>(this.vBernoulli23); // Create array for 'vbool189_uses' backwards messages. this.vbool189_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool189_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool189_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool20_uses' backwards messages. this.vbool20_uses_B = new Bernoulli[2]; this.vBernoulli28 = new Bernoulli(0.5); for(int _ind0 = 0; _ind0<2; _ind0++) { this.vbool20_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli28); } this.vbool20_F = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli28); // Message to 'vbool20' from Random factor this.vbool20_F = UnaryOp<bool>.RandomAverageConditional<Bernoulli>(this.vBernoulli28); // Create array for 'vbool199_uses' backwards messages. this.vbool199_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool199_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool199_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool111_uses' backwards messages. this.vbool111_uses_B = new Bernoulli[3]; this.vBernoulli119 = new Bernoulli(0.5); for(int _ind0 = 0; _ind0<3; _ind0++) { this.vbool111_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli119); } this.vbool111_F = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli119); // Message to 'vbool111' from Random factor this.vbool111_F = UnaryOp<bool>.RandomAverageConditional<Bernoulli>(this.vBernoulli119); // Create array for 'vbool215_uses' backwards messages. this.vbool215_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool215_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool215_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool216_uses' backwards messages. this.vbool216_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool216_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool216_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool107_uses' backwards messages. this.vbool107_uses_B = new Bernoulli[3]; this.vBernoulli115 = new Bernoulli(0.5); for(int _ind0 = 0; _ind0<3; _ind0++) { this.vbool107_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli115); } this.vbool107_F = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli115); // Message to 'vbool107' from Random factor this.vbool107_F = UnaryOp<bool>.RandomAverageConditional<Bernoulli>(this.vBernoulli115); // Create array for 'vbool218_uses' backwards messages. this.vbool218_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool218_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool218_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool110_uses' backwards messages. this.vbool110_uses_B = new Bernoulli[9]; this.vBernoulli118 = new Bernoulli(0.5); for(int _ind0 = 0; _ind0<9; _ind0++) { this.vbool110_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli118); } this.vbool110_F = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli118); // Message to 'vbool110' from Random factor this.vbool110_F = UnaryOp<bool>.RandomAverageConditional<Bernoulli>(this.vBernoulli118); // Create array for 'vbool221_uses' backwards messages. this.vbool221_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool221_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool221_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool108_uses' backwards messages. this.vbool108_uses_B = new Bernoulli[7]; this.vBernoulli116 = new Bernoulli(0.5); for(int _ind0 = 0; _ind0<7; _ind0++) { this.vbool108_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli116); } this.vbool108_F = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli116); // Message to 'vbool108' from Random factor this.vbool108_F = UnaryOp<bool>.RandomAverageConditional<Bernoulli>(this.vBernoulli116); // Create array for 'vbool224_uses' backwards messages. this.vbool224_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool224_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool224_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool227_uses' backwards messages. this.vbool227_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool227_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool227_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool230_uses' backwards messages. this.vbool230_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool230_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool230_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool109_uses' backwards messages. this.vbool109_uses_B = new Bernoulli[7]; this.vBernoulli117 = new Bernoulli(0.5); for(int _ind0 = 0; _ind0<7; _ind0++) { this.vbool109_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli117); } this.vbool109_F = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli117); // Message to 'vbool109' from Random factor this.vbool109_F = UnaryOp<bool>.RandomAverageConditional<Bernoulli>(this.vBernoulli117); // Create array for 'vbool233_uses' backwards messages. this.vbool233_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool233_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool233_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool236_uses' backwards messages. this.vbool236_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool236_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool236_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool239_uses' backwards messages. this.vbool239_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool239_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool239_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool403_uses' backwards messages. this.vbool403_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool403_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool403_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool287_uses' backwards messages. this.vbool287_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool287_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool287_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool368_uses' backwards messages. this.vbool368_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool368_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool368_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool63_uses' backwards messages. this.vbool63_uses_B = new Bernoulli[4]; this.vBernoulli71 = new Bernoulli(0.5); for(int _ind0 = 0; _ind0<4; _ind0++) { this.vbool63_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli71); } this.vbool63_F = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli71); // Message to 'vbool63' from Random factor this.vbool63_F = UnaryOp<bool>.RandomAverageConditional<Bernoulli>(this.vBernoulli71); // Create array for 'vbool141_uses' backwards messages. this.vbool141_uses_B = new Bernoulli[10]; this.vBernoulli149 = new Bernoulli(0.7); for(int _ind0 = 0; _ind0<10; _ind0++) { this.vbool141_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli149); } this.vbool141_F = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli149); // Message to 'vbool141' from Random factor this.vbool141_F = UnaryOp<bool>.RandomAverageConditional<Bernoulli>(this.vBernoulli149); // Create array for 'vbool370_uses' backwards messages. this.vbool370_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool370_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool370_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool371_uses' backwards messages. this.vbool371_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool371_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool371_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool372_uses' backwards messages. this.vbool372_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool372_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool372_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool64_uses' backwards messages. this.vbool64_uses_B = new Bernoulli[4]; this.vBernoulli72 = new Bernoulli(0.5); for(int _ind0 = 0; _ind0<4; _ind0++) { this.vbool64_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli72); } this.vbool64_F = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli72); // Message to 'vbool64' from Random factor this.vbool64_F = UnaryOp<bool>.RandomAverageConditional<Bernoulli>(this.vBernoulli72); // Create array for 'vbool142_uses' backwards messages. this.vbool142_uses_B = new Bernoulli[5]; this.vBernoulli150 = new Bernoulli(0.7); for(int _ind0 = 0; _ind0<5; _ind0++) { this.vbool142_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli150); } this.vbool142_F = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli150); // Message to 'vbool142' from Random factor this.vbool142_F = UnaryOp<bool>.RandomAverageConditional<Bernoulli>(this.vBernoulli150); // Create array for 'vbool378_uses' backwards messages. this.vbool378_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool378_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool378_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool379_uses' backwards messages. this.vbool379_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool379_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool379_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool380_uses' backwards messages. this.vbool380_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool380_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool380_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool65_uses' backwards messages. this.vbool65_uses_B = new Bernoulli[4]; this.vBernoulli73 = new Bernoulli(0.5); for(int _ind0 = 0; _ind0<4; _ind0++) { this.vbool65_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli73); } this.vbool65_F = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli73); // Message to 'vbool65' from Random factor this.vbool65_F = UnaryOp<bool>.RandomAverageConditional<Bernoulli>(this.vBernoulli73); // Create array for 'vbool143_uses' backwards messages. this.vbool143_uses_B = new Bernoulli[5]; this.vBernoulli151 = new Bernoulli(0.7); for(int _ind0 = 0; _ind0<5; _ind0++) { this.vbool143_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli151); } this.vbool143_F = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli151); // Message to 'vbool143' from Random factor this.vbool143_F = UnaryOp<bool>.RandomAverageConditional<Bernoulli>(this.vBernoulli151); // Create array for 'vbool386_uses' backwards messages. this.vbool386_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool386_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool386_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool387_uses' backwards messages. this.vbool387_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool387_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool387_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool388_uses' backwards messages. this.vbool388_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool388_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool388_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool66_uses' backwards messages. this.vbool66_uses_B = new Bernoulli[4]; this.vBernoulli74 = new Bernoulli(0.5); for(int _ind0 = 0; _ind0<4; _ind0++) { this.vbool66_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli74); } this.vbool66_F = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli74); // Message to 'vbool66' from Random factor this.vbool66_F = UnaryOp<bool>.RandomAverageConditional<Bernoulli>(this.vBernoulli74); // Create array for 'vbool144_uses' backwards messages. this.vbool144_uses_B = new Bernoulli[3]; this.vBernoulli152 = new Bernoulli(0.7); for(int _ind0 = 0; _ind0<3; _ind0++) { this.vbool144_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli152); } this.vbool144_F = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli152); // Message to 'vbool144' from Random factor this.vbool144_F = UnaryOp<bool>.RandomAverageConditional<Bernoulli>(this.vBernoulli152); // Create array for 'vbool394_uses' backwards messages. this.vbool394_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool394_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool394_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool395_uses' backwards messages. this.vbool395_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool395_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool395_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool396_uses' backwards messages. this.vbool396_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool396_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool396_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool1_uses' backwards messages. this.vbool1_uses_B = new Bernoulli[1]; this.vBernoulli9 = new Bernoulli(0.99); for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool1_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli9); } this.vbool1_F = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli9); // Message to 'vbool1' from Random factor this.vbool1_F = UnaryOp<bool>.RandomAverageConditional<Bernoulli>(this.vBernoulli9); // Create array for 'vbool456_uses' backwards messages. this.vbool456_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool456_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool456_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool409_uses' backwards messages. this.vbool409_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool409_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool409_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool194_uses' backwards messages. this.vbool194_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool194_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool194_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool41_uses' backwards messages. this.vbool41_uses_B = new Bernoulli[2]; this.vBernoulli49 = new Bernoulli(0.7); for(int _ind0 = 0; _ind0<2; _ind0++) { this.vbool41_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli49); } this.vbool41_F = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli49); // Message to 'vbool41' from Random factor this.vbool41_F = UnaryOp<bool>.RandomAverageConditional<Bernoulli>(this.vBernoulli49); // Create array for 'vbool410_uses' backwards messages. this.vbool410_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool410_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool410_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool200_uses' backwards messages. this.vbool200_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool200_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool200_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool217_uses' backwards messages. this.vbool217_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool217_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool217_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool102_uses' backwards messages. this.vbool102_uses_B = new Bernoulli[2]; this.vBernoulli110 = new Bernoulli(0.99); for(int _ind0 = 0; _ind0<2; _ind0++) { this.vbool102_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli110); } this.vbool102_F = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli110); // Message to 'vbool102' from Random factor this.vbool102_F = UnaryOp<bool>.RandomAverageConditional<Bernoulli>(this.vBernoulli110); // Create array for 'vbool190_uses' backwards messages. this.vbool190_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool190_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool190_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool242_uses' backwards messages. this.vbool242_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool242_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool242_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool115_uses' backwards messages. this.vbool115_uses_B = new Bernoulli[11]; this.vBernoulli123 = new Bernoulli(0.5); for(int _ind0 = 0; _ind0<11; _ind0++) { this.vbool115_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli123); } this.vbool115_F = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli123); // Message to 'vbool115' from Random factor this.vbool115_F = UnaryOp<bool>.RandomAverageConditional<Bernoulli>(this.vBernoulli123); // Create array for 'vbool219_uses' backwards messages. this.vbool219_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool219_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool219_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool106_uses' backwards messages. this.vbool106_uses_B = new Bernoulli[2]; this.vBernoulli114 = new Bernoulli(0.01); for(int _ind0 = 0; _ind0<2; _ind0++) { this.vbool106_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli114); } this.vbool106_F = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli114); // Message to 'vbool106' from Random factor this.vbool106_F = UnaryOp<bool>.RandomAverageConditional<Bernoulli>(this.vBernoulli114); // Create array for 'vbool193_uses' backwards messages. this.vbool193_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool193_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool193_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool254_uses' backwards messages. this.vbool254_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool254_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool254_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool260_uses' backwards messages. this.vbool260_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool260_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool260_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool269_uses' backwards messages. this.vbool269_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool269_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool269_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool278_uses' backwards messages. this.vbool278_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool278_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool278_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool284_uses' backwards messages. this.vbool284_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool284_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool284_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool112_uses' backwards messages. this.vbool112_uses_B = new Bernoulli[3]; this.vBernoulli120 = new Bernoulli(0.5); for(int _ind0 = 0; _ind0<3; _ind0++) { this.vbool112_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli120); } this.vbool112_F = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli120); // Message to 'vbool112' from Random factor this.vbool112_F = UnaryOp<bool>.RandomAverageConditional<Bernoulli>(this.vBernoulli120); // Create array for 'vbool222_uses' backwards messages. this.vbool222_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool222_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool222_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool104_uses' backwards messages. this.vbool104_uses_B = new Bernoulli[2]; this.vBernoulli112 = new Bernoulli(0.01); for(int _ind0 = 0; _ind0<2; _ind0++) { this.vbool104_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli112); } this.vbool104_F = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli112); // Message to 'vbool104' from Random factor this.vbool104_F = UnaryOp<bool>.RandomAverageConditional<Bernoulli>(this.vBernoulli112); // Create array for 'vbool191_uses' backwards messages. this.vbool191_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool191_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool191_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool248_uses' backwards messages. this.vbool248_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool248_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool248_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool251_uses' backwards messages. this.vbool251_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool251_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool251_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool266_uses' backwards messages. this.vbool266_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool266_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool266_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool272_uses' backwards messages. this.vbool272_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool272_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool272_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool113_uses' backwards messages. this.vbool113_uses_B = new Bernoulli[7]; this.vBernoulli121 = new Bernoulli(0.5); for(int _ind0 = 0; _ind0<7; _ind0++) { this.vbool113_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli121); } this.vbool113_F = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli121); // Message to 'vbool113' from Random factor this.vbool113_F = UnaryOp<bool>.RandomAverageConditional<Bernoulli>(this.vBernoulli121); // Create array for 'vbool225_uses' backwards messages. this.vbool225_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool225_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool225_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool228_uses' backwards messages. this.vbool228_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool228_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool228_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool231_uses' backwards messages. this.vbool231_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool231_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool231_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool105_uses' backwards messages. this.vbool105_uses_B = new Bernoulli[2]; this.vBernoulli113 = new Bernoulli(0.01); for(int _ind0 = 0; _ind0<2; _ind0++) { this.vbool105_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli113); } this.vbool105_F = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli113); // Message to 'vbool105' from Random factor this.vbool105_F = UnaryOp<bool>.RandomAverageConditional<Bernoulli>(this.vBernoulli113); // Create array for 'vbool192_uses' backwards messages. this.vbool192_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool192_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool192_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool257_uses' backwards messages. this.vbool257_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool257_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool257_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool263_uses' backwards messages. this.vbool263_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool263_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool263_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool275_uses' backwards messages. this.vbool275_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool275_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool275_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool281_uses' backwards messages. this.vbool281_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool281_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool281_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool114_uses' backwards messages. this.vbool114_uses_B = new Bernoulli[7]; this.vBernoulli122 = new Bernoulli(0.5); for(int _ind0 = 0; _ind0<7; _ind0++) { this.vbool114_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli122); } this.vbool114_F = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli122); // Message to 'vbool114' from Random factor this.vbool114_F = UnaryOp<bool>.RandomAverageConditional<Bernoulli>(this.vBernoulli122); // Create array for 'vbool234_uses' backwards messages. this.vbool234_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool234_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool234_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool237_uses' backwards messages. this.vbool237_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool237_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool237_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool240_uses' backwards messages. this.vbool240_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool240_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool240_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool0_uses' backwards messages. this.vbool0_uses_B = new Bernoulli[1]; this.vBernoulli8 = new Bernoulli(0.7); for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool0_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli8); } this.vbool0_F = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli8); // Message to 'vbool0' from Random factor this.vbool0_F = UnaryOp<bool>.RandomAverageConditional<Bernoulli>(this.vBernoulli8); // Create array for 'vbool369_uses' backwards messages. this.vbool369_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool369_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool369_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool42_uses' backwards messages. this.vbool42_uses_B = new Bernoulli[2]; this.vBernoulli50 = new Bernoulli(0.5); for(int _ind0 = 0; _ind0<2; _ind0++) { this.vbool42_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli50); } this.vbool42_F = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli50); // Message to 'vbool42' from Random factor this.vbool42_F = UnaryOp<bool>.RandomAverageConditional<Bernoulli>(this.vBernoulli50); // Create array for 'vbool206_uses' backwards messages. this.vbool206_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool206_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool206_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool373_uses' backwards messages. this.vbool373_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool373_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool373_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool68_uses' backwards messages. this.vbool68_uses_B = new Bernoulli[2]; this.vBernoulli76 = new Bernoulli(0.5); for(int _ind0 = 0; _ind0<2; _ind0++) { this.vbool68_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli76); } this.vbool68_F = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli76); // Message to 'vbool68' from Random factor this.vbool68_F = UnaryOp<bool>.RandomAverageConditional<Bernoulli>(this.vBernoulli76); // Create array for 'vbool375_uses' backwards messages. this.vbool375_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool375_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool375_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool16_uses' backwards messages. this.vbool16_uses_B = new Bernoulli[2]; this.vBernoulli24 = new Bernoulli(0.5); for(int _ind0 = 0; _ind0<2; _ind0++) { this.vbool16_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli24); } this.vbool16_F = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli24); // Message to 'vbool16' from Random factor this.vbool16_F = UnaryOp<bool>.RandomAverageConditional<Bernoulli>(this.vBernoulli24); // Create array for 'vbool195_uses' backwards messages. this.vbool195_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool195_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool195_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool245_uses' backwards messages. this.vbool245_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool245_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool245_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool374_uses' backwards messages. this.vbool374_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool374_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool374_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool376_uses' backwards messages. this.vbool376_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool376_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool376_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool377_uses' backwards messages. this.vbool377_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool377_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool377_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool43_uses' backwards messages. this.vbool43_uses_B = new Bernoulli[2]; this.vBernoulli51 = new Bernoulli(0.5); for(int _ind0 = 0; _ind0<2; _ind0++) { this.vbool43_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli51); } this.vbool43_F = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli51); // Message to 'vbool43' from Random factor this.vbool43_F = UnaryOp<bool>.RandomAverageConditional<Bernoulli>(this.vBernoulli51); // Create array for 'vbool207_uses' backwards messages. this.vbool207_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool207_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool207_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool381_uses' backwards messages. this.vbool381_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool381_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool381_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool69_uses' backwards messages. this.vbool69_uses_B = new Bernoulli[2]; this.vBernoulli77 = new Bernoulli(0.5); for(int _ind0 = 0; _ind0<2; _ind0++) { this.vbool69_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli77); } this.vbool69_F = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli77); // Message to 'vbool69' from Random factor this.vbool69_F = UnaryOp<bool>.RandomAverageConditional<Bernoulli>(this.vBernoulli77); // Create array for 'vbool383_uses' backwards messages. this.vbool383_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool383_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool383_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool17_uses' backwards messages. this.vbool17_uses_B = new Bernoulli[2]; this.vBernoulli25 = new Bernoulli(0.5); for(int _ind0 = 0; _ind0<2; _ind0++) { this.vbool17_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli25); } this.vbool17_F = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli25); // Message to 'vbool17' from Random factor this.vbool17_F = UnaryOp<bool>.RandomAverageConditional<Bernoulli>(this.vBernoulli25); // Create array for 'vbool196_uses' backwards messages. this.vbool196_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool196_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool196_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool382_uses' backwards messages. this.vbool382_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool382_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool382_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool384_uses' backwards messages. this.vbool384_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool384_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool384_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool385_uses' backwards messages. this.vbool385_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool385_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool385_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool44_uses' backwards messages. this.vbool44_uses_B = new Bernoulli[2]; this.vBernoulli52 = new Bernoulli(0.5); for(int _ind0 = 0; _ind0<2; _ind0++) { this.vbool44_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli52); } this.vbool44_F = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli52); // Message to 'vbool44' from Random factor this.vbool44_F = UnaryOp<bool>.RandomAverageConditional<Bernoulli>(this.vBernoulli52); // Create array for 'vbool208_uses' backwards messages. this.vbool208_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool208_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool208_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool389_uses' backwards messages. this.vbool389_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool389_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool389_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool70_uses' backwards messages. this.vbool70_uses_B = new Bernoulli[2]; this.vBernoulli78 = new Bernoulli(0.5); for(int _ind0 = 0; _ind0<2; _ind0++) { this.vbool70_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli78); } this.vbool70_F = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli78); // Message to 'vbool70' from Random factor this.vbool70_F = UnaryOp<bool>.RandomAverageConditional<Bernoulli>(this.vBernoulli78); // Create array for 'vbool391_uses' backwards messages. this.vbool391_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool391_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool391_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool18_uses' backwards messages. this.vbool18_uses_B = new Bernoulli[2]; this.vBernoulli26 = new Bernoulli(0.5); for(int _ind0 = 0; _ind0<2; _ind0++) { this.vbool18_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli26); } this.vbool18_F = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli26); // Message to 'vbool18' from Random factor this.vbool18_F = UnaryOp<bool>.RandomAverageConditional<Bernoulli>(this.vBernoulli26); // Create array for 'vbool197_uses' backwards messages. this.vbool197_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool197_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool197_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool390_uses' backwards messages. this.vbool390_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool390_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool390_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool392_uses' backwards messages. this.vbool392_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool392_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool392_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool393_uses' backwards messages. this.vbool393_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool393_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool393_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool45_uses' backwards messages. this.vbool45_uses_B = new Bernoulli[2]; this.vBernoulli53 = new Bernoulli(0.5); for(int _ind0 = 0; _ind0<2; _ind0++) { this.vbool45_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli53); } this.vbool45_F = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli53); // Message to 'vbool45' from Random factor this.vbool45_F = UnaryOp<bool>.RandomAverageConditional<Bernoulli>(this.vBernoulli53); // Create array for 'vbool209_uses' backwards messages. this.vbool209_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool209_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool209_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool397_uses' backwards messages. this.vbool397_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool397_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool397_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool71_uses' backwards messages. this.vbool71_uses_B = new Bernoulli[2]; this.vBernoulli79 = new Bernoulli(0.5); for(int _ind0 = 0; _ind0<2; _ind0++) { this.vbool71_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli79); } this.vbool71_F = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli79); // Message to 'vbool71' from Random factor this.vbool71_F = UnaryOp<bool>.RandomAverageConditional<Bernoulli>(this.vBernoulli79); // Create array for 'vbool399_uses' backwards messages. this.vbool399_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool399_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool399_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool19_uses' backwards messages. this.vbool19_uses_B = new Bernoulli[2]; this.vBernoulli27 = new Bernoulli(0.5); for(int _ind0 = 0; _ind0<2; _ind0++) { this.vbool19_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli27); } this.vbool19_F = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli27); // Message to 'vbool19' from Random factor this.vbool19_F = UnaryOp<bool>.RandomAverageConditional<Bernoulli>(this.vBernoulli27); // Create array for 'vbool198_uses' backwards messages. this.vbool198_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool198_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool198_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool398_uses' backwards messages. this.vbool398_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool398_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool398_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool400_uses' backwards messages. this.vbool400_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool400_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool400_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool401_uses' backwards messages. this.vbool401_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool401_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool401_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool220_uses' backwards messages. this.vbool220_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool220_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool220_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool180_uses' backwards messages. this.vbool180_uses_B = new Bernoulli[3]; this.vBernoulli188 = new Bernoulli(0.99); for(int _ind0 = 0; _ind0<3; _ind0++) { this.vbool180_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli188); } this.vbool180_F = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli188); // Message to 'vbool180' from Random factor this.vbool180_F = UnaryOp<bool>.RandomAverageConditional<Bernoulli>(this.vBernoulli188); // Create array for 'vbool447_uses' backwards messages. this.vbool447_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool447_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool447_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool243_uses' backwards messages. this.vbool243_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool243_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool243_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool252_uses' backwards messages. this.vbool252_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool252_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool252_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool264_uses' backwards messages. this.vbool264_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool264_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool264_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool273_uses' backwards messages. this.vbool273_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool273_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool273_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool282_uses' backwards messages. this.vbool282_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool282_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool282_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool285_uses' backwards messages. this.vbool285_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool285_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool285_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool184_uses' backwards messages. this.vbool184_uses_B = new Bernoulli[3]; this.vBernoulli192 = new Bernoulli(0.01); for(int _ind0 = 0; _ind0<3; _ind0++) { this.vbool184_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli192); } this.vbool184_F = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli192); // Message to 'vbool184' from Random factor this.vbool184_F = UnaryOp<bool>.RandomAverageConditional<Bernoulli>(this.vBernoulli192); // Create array for 'vbool450_uses' backwards messages. this.vbool450_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool450_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool450_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool255_uses' backwards messages. this.vbool255_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool255_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool255_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool261_uses' backwards messages. this.vbool261_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool261_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool261_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool270_uses' backwards messages. this.vbool270_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool270_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool270_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool279_uses' backwards messages. this.vbool279_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool279_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool279_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool246_uses' backwards messages. this.vbool246_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool246_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool246_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool223_uses' backwards messages. this.vbool223_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool223_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool223_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool182_uses' backwards messages. this.vbool182_uses_B = new Bernoulli[3]; this.vBernoulli190 = new Bernoulli(0.01); for(int _ind0 = 0; _ind0<3; _ind0++) { this.vbool182_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli190); } this.vbool182_F = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli190); // Message to 'vbool182' from Random factor this.vbool182_F = UnaryOp<bool>.RandomAverageConditional<Bernoulli>(this.vBernoulli190); // Create array for 'vbool448_uses' backwards messages. this.vbool448_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool448_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool448_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool249_uses' backwards messages. this.vbool249_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool249_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool249_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool267_uses' backwards messages. this.vbool267_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool267_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool267_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool226_uses' backwards messages. this.vbool226_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool226_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool226_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool229_uses' backwards messages. this.vbool229_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool229_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool229_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool232_uses' backwards messages. this.vbool232_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool232_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool232_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool183_uses' backwards messages. this.vbool183_uses_B = new Bernoulli[3]; this.vBernoulli191 = new Bernoulli(0.01); for(int _ind0 = 0; _ind0<3; _ind0++) { this.vbool183_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli191); } this.vbool183_F = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli191); // Message to 'vbool183' from Random factor this.vbool183_F = UnaryOp<bool>.RandomAverageConditional<Bernoulli>(this.vBernoulli191); // Create array for 'vbool449_uses' backwards messages. this.vbool449_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool449_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool449_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool258_uses' backwards messages. this.vbool258_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool258_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool258_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool276_uses' backwards messages. this.vbool276_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool276_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool276_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool235_uses' backwards messages. this.vbool235_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool235_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool235_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool238_uses' backwards messages. this.vbool238_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool238_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool238_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool241_uses' backwards messages. this.vbool241_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool241_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool241_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool11_uses' backwards messages. this.vbool11_uses_B = new Bernoulli[2]; this.vBernoulli19 = new Bernoulli(0.5); for(int _ind0 = 0; _ind0<2; _ind0++) { this.vbool11_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli19); } this.vbool11_F = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli19); // Message to 'vbool11' from Random factor this.vbool11_F = UnaryOp<bool>.RandomAverageConditional<Bernoulli>(this.vBernoulli19); // Create array for 'vbool185_uses' backwards messages. this.vbool185_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool185_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool185_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool89_uses' backwards messages. this.vbool89_uses_B = new Bernoulli[2]; this.vBernoulli97 = new Bernoulli(0.99); for(int _ind0 = 0; _ind0<2; _ind0++) { this.vbool89_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli97); } this.vbool89_F = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli97); // Message to 'vbool89' from Random factor this.vbool89_F = UnaryOp<bool>.RandomAverageConditional<Bernoulli>(this.vBernoulli97); // Create array for 'vbool211_uses' backwards messages. this.vbool211_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool211_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool211_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool37_uses' backwards messages. this.vbool37_uses_B = new Bernoulli[2]; this.vBernoulli45 = new Bernoulli(0.7); for(int _ind0 = 0; _ind0<2; _ind0++) { this.vbool37_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli45); } this.vbool37_F = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli45); // Message to 'vbool37' from Random factor this.vbool37_F = UnaryOp<bool>.RandomAverageConditional<Bernoulli>(this.vBernoulli45); // Create array for 'vbool201_uses' backwards messages. this.vbool201_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool201_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool201_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool12_uses' backwards messages. this.vbool12_uses_B = new Bernoulli[2]; this.vBernoulli20 = new Bernoulli(0.5); for(int _ind0 = 0; _ind0<2; _ind0++) { this.vbool12_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli20); } this.vbool12_F = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli20); // Message to 'vbool12' from Random factor this.vbool12_F = UnaryOp<bool>.RandomAverageConditional<Bernoulli>(this.vBernoulli20); // Create array for 'vbool186_uses' backwards messages. this.vbool186_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool186_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool186_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool91_uses' backwards messages. this.vbool91_uses_B = new Bernoulli[2]; this.vBernoulli99 = new Bernoulli(0.01); for(int _ind0 = 0; _ind0<2; _ind0++) { this.vbool91_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli99); } this.vbool91_F = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli99); // Message to 'vbool91' from Random factor this.vbool91_F = UnaryOp<bool>.RandomAverageConditional<Bernoulli>(this.vBernoulli99); // Create array for 'vbool212_uses' backwards messages. this.vbool212_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool212_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool212_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool38_uses' backwards messages. this.vbool38_uses_B = new Bernoulli[2]; this.vBernoulli46 = new Bernoulli(0.7); for(int _ind0 = 0; _ind0<2; _ind0++) { this.vbool38_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli46); } this.vbool38_F = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli46); // Message to 'vbool38' from Random factor this.vbool38_F = UnaryOp<bool>.RandomAverageConditional<Bernoulli>(this.vBernoulli46); // Create array for 'vbool202_uses' backwards messages. this.vbool202_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool202_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool202_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool13_uses' backwards messages. this.vbool13_uses_B = new Bernoulli[2]; this.vBernoulli21 = new Bernoulli(0.5); for(int _ind0 = 0; _ind0<2; _ind0++) { this.vbool13_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli21); } this.vbool13_F = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli21); // Message to 'vbool13' from Random factor this.vbool13_F = UnaryOp<bool>.RandomAverageConditional<Bernoulli>(this.vBernoulli21); // Create array for 'vbool187_uses' backwards messages. this.vbool187_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool187_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool187_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool92_uses' backwards messages. this.vbool92_uses_B = new Bernoulli[2]; this.vBernoulli100 = new Bernoulli(0.01); for(int _ind0 = 0; _ind0<2; _ind0++) { this.vbool92_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli100); } this.vbool92_F = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli100); // Message to 'vbool92' from Random factor this.vbool92_F = UnaryOp<bool>.RandomAverageConditional<Bernoulli>(this.vBernoulli100); // Create array for 'vbool213_uses' backwards messages. this.vbool213_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool213_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool213_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool39_uses' backwards messages. this.vbool39_uses_B = new Bernoulli[2]; this.vBernoulli47 = new Bernoulli(0.7); for(int _ind0 = 0; _ind0<2; _ind0++) { this.vbool39_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli47); } this.vbool39_F = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli47); // Message to 'vbool39' from Random factor this.vbool39_F = UnaryOp<bool>.RandomAverageConditional<Bernoulli>(this.vBernoulli47); // Create array for 'vbool203_uses' backwards messages. this.vbool203_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool203_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool203_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool14_uses' backwards messages. this.vbool14_uses_B = new Bernoulli[2]; this.vBernoulli22 = new Bernoulli(0.5); for(int _ind0 = 0; _ind0<2; _ind0++) { this.vbool14_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli22); } this.vbool14_F = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli22); // Message to 'vbool14' from Random factor this.vbool14_F = UnaryOp<bool>.RandomAverageConditional<Bernoulli>(this.vBernoulli22); // Create array for 'vbool188_uses' backwards messages. this.vbool188_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool188_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool188_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool93_uses' backwards messages. this.vbool93_uses_B = new Bernoulli[2]; this.vBernoulli101 = new Bernoulli(0.01); for(int _ind0 = 0; _ind0<2; _ind0++) { this.vbool93_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli101); } this.vbool93_F = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli101); // Message to 'vbool93' from Random factor this.vbool93_F = UnaryOp<bool>.RandomAverageConditional<Bernoulli>(this.vBernoulli101); // Create array for 'vbool214_uses' backwards messages. this.vbool214_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool214_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool214_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool40_uses' backwards messages. this.vbool40_uses_B = new Bernoulli[2]; this.vBernoulli48 = new Bernoulli(0.7); for(int _ind0 = 0; _ind0<2; _ind0++) { this.vbool40_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli48); } this.vbool40_F = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli48); // Message to 'vbool40' from Random factor this.vbool40_F = UnaryOp<bool>.RandomAverageConditional<Bernoulli>(this.vBernoulli48); // Create array for 'vbool204_uses' backwards messages. this.vbool204_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool204_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool204_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool159_uses' backwards messages. this.vbool159_uses_B = new Bernoulli[2]; this.vBernoulli167 = new Bernoulli(0.5); for(int _ind0 = 0; _ind0<2; _ind0++) { this.vbool159_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli167); } this.vbool159_F = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli167); // Message to 'vbool159' from Random factor this.vbool159_F = UnaryOp<bool>.RandomAverageConditional<Bernoulli>(this.vBernoulli167); // Create array for 'vbool421_uses' backwards messages. this.vbool421_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool421_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool421_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool154_uses' backwards messages. this.vbool154_uses_B = new Bernoulli[3]; this.vBernoulli162 = new Bernoulli(0.99); for(int _ind0 = 0; _ind0<3; _ind0++) { this.vbool154_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli162); } this.vbool154_F = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli162); // Message to 'vbool154' from Random factor this.vbool154_F = UnaryOp<bool>.RandomAverageConditional<Bernoulli>(this.vBernoulli162); // Create array for 'vbool442_uses' backwards messages. this.vbool442_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool442_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool442_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool244_uses' backwards messages. this.vbool244_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool244_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool244_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool247_uses' backwards messages. this.vbool247_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool247_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool247_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool250_uses' backwards messages. this.vbool250_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool250_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool250_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool253_uses' backwards messages. this.vbool253_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool253_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool253_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool256_uses' backwards messages. this.vbool256_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool256_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool256_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool259_uses' backwards messages. this.vbool259_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool259_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool259_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool262_uses' backwards messages. this.vbool262_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool262_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool262_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool265_uses' backwards messages. this.vbool265_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool265_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool265_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool268_uses' backwards messages. this.vbool268_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool268_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool268_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool271_uses' backwards messages. this.vbool271_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool271_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool271_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool274_uses' backwards messages. this.vbool274_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool274_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool274_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool277_uses' backwards messages. this.vbool277_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool277_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool277_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool280_uses' backwards messages. this.vbool280_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool280_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool280_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool283_uses' backwards messages. this.vbool283_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool283_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool283_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool286_uses' backwards messages. this.vbool286_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool286_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool286_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool162_uses' backwards messages. this.vbool162_uses_B = new Bernoulli[2]; this.vBernoulli170 = new Bernoulli(0.5); for(int _ind0 = 0; _ind0<2; _ind0++) { this.vbool162_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli170); } this.vbool162_F = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli170); // Message to 'vbool162' from Random factor this.vbool162_F = UnaryOp<bool>.RandomAverageConditional<Bernoulli>(this.vBernoulli170); // Create array for 'vbool424_uses' backwards messages. this.vbool424_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool424_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool424_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool158_uses' backwards messages. this.vbool158_uses_B = new Bernoulli[3]; this.vBernoulli166 = new Bernoulli(0.01); for(int _ind0 = 0; _ind0<3; _ind0++) { this.vbool158_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli166); } this.vbool158_F = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli166); // Message to 'vbool158' from Random factor this.vbool158_F = UnaryOp<bool>.RandomAverageConditional<Bernoulli>(this.vBernoulli166); // Create array for 'vbool445_uses' backwards messages. this.vbool445_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool445_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool445_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool160_uses' backwards messages. this.vbool160_uses_B = new Bernoulli[2]; this.vBernoulli168 = new Bernoulli(0.5); for(int _ind0 = 0; _ind0<2; _ind0++) { this.vbool160_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli168); } this.vbool160_F = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli168); // Message to 'vbool160' from Random factor this.vbool160_F = UnaryOp<bool>.RandomAverageConditional<Bernoulli>(this.vBernoulli168); // Create array for 'vbool422_uses' backwards messages. this.vbool422_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool422_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool422_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool156_uses' backwards messages. this.vbool156_uses_B = new Bernoulli[3]; this.vBernoulli164 = new Bernoulli(0.01); for(int _ind0 = 0; _ind0<3; _ind0++) { this.vbool156_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli164); } this.vbool156_F = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli164); // Message to 'vbool156' from Random factor this.vbool156_F = UnaryOp<bool>.RandomAverageConditional<Bernoulli>(this.vBernoulli164); // Create array for 'vbool443_uses' backwards messages. this.vbool443_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool443_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool443_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool161_uses' backwards messages. this.vbool161_uses_B = new Bernoulli[2]; this.vBernoulli169 = new Bernoulli(0.5); for(int _ind0 = 0; _ind0<2; _ind0++) { this.vbool161_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli169); } this.vbool161_F = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli169); // Message to 'vbool161' from Random factor this.vbool161_F = UnaryOp<bool>.RandomAverageConditional<Bernoulli>(this.vBernoulli169); // Create array for 'vbool423_uses' backwards messages. this.vbool423_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool423_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool423_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool157_uses' backwards messages. this.vbool157_uses_B = new Bernoulli[3]; this.vBernoulli165 = new Bernoulli(0.01); for(int _ind0 = 0; _ind0<3; _ind0++) { this.vbool157_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli165); } this.vbool157_F = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli165); // Message to 'vbool157' from Random factor this.vbool157_F = UnaryOp<bool>.RandomAverageConditional<Bernoulli>(this.vBernoulli165); // Create array for 'vbool444_uses' backwards messages. this.vbool444_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool444_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool444_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool411_uses' backwards messages. this.vbool411_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool411_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool411_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool452_uses' backwards messages. this.vbool452_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool452_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool452_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool412_uses' backwards messages. this.vbool412_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool412_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool412_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool453_uses' backwards messages. this.vbool453_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool453_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool453_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool413_uses' backwards messages. this.vbool413_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool413_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool413_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool454_uses' backwards messages. this.vbool454_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool454_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool454_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool414_uses' backwards messages. this.vbool414_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool414_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool414_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool455_uses' backwards messages. this.vbool455_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool455_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool455_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool415_uses' backwards messages. this.vbool415_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool415_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool415_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool418_uses' backwards messages. this.vbool418_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool418_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool418_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool416_uses' backwards messages. this.vbool416_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool416_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool416_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool417_uses' backwards messages. this.vbool417_uses_B = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool417_uses_B[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool417_F = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool210_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool72_uses' forwards messages. this.vbool72_uses_F = new Bernoulli[2]; for(int _ind0 = 0; _ind0<2; _ind0++) { this.vbool72_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli80); } this.vbool451_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool155_uses' forwards messages. this.vbool155_uses_F = new Bernoulli[3]; for(int _ind0 = 0; _ind0<3; _ind0++) { this.vbool155_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli163); } // Create array for 'vbool90_uses' forwards messages. this.vbool90_uses_F = new Bernoulli[2]; for(int _ind0 = 0; _ind0<2; _ind0++) { this.vbool90_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli98); } this.vbool407_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool67_uses' forwards messages. this.vbool67_uses_F = new Bernoulli[4]; for(int _ind0 = 0; _ind0<4; _ind0++) { this.vbool67_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli75); } this.vBernoulli5 = new Bernoulli(0.9); // Message to 'vbool210_uses' from EqualRandom factor this.vbool210_uses_B[0] = ConstrainEqualRandomOp<bool>.ValueAverageConditional<Bernoulli>(this.vBernoulli5); // Message to 'vbool419_uses' from EqualRandom factor this.vbool419_uses_B[0] = ConstrainEqualRandomOp<bool>.ValueAverageConditional<Bernoulli>(this.vBernoulli5); // Message to 'vbool205_uses' from EqualRandom factor this.vbool205_uses_B[0] = ConstrainEqualRandomOp<bool>.ValueAverageConditional<Bernoulli>(this.vBernoulli5); // Message to 'vbool420_uses' from EqualRandom factor this.vbool420_uses_B[0] = ConstrainEqualRandomOp<bool>.ValueAverageConditional<Bernoulli>(this.vBernoulli5); // Message to 'vbool189_uses' from EqualRandom factor this.vbool189_uses_B[0] = ConstrainEqualRandomOp<bool>.ValueAverageConditional<Bernoulli>(this.vBernoulli5); // Message to 'vbool199_uses' from EqualRandom factor this.vbool199_uses_B[0] = ConstrainEqualRandomOp<bool>.ValueAverageConditional<Bernoulli>(this.vBernoulli5); // Message to 'vbool194_uses' from EqualRandom factor this.vbool194_uses_B[0] = ConstrainEqualRandomOp<bool>.ValueAverageConditional<Bernoulli>(this.vBernoulli5); // Message to 'vbool200_uses' from EqualRandom factor this.vbool200_uses_B[0] = ConstrainEqualRandomOp<bool>.ValueAverageConditional<Bernoulli>(this.vBernoulli5); // Message to 'vbool190_uses' from EqualRandom factor this.vbool190_uses_B[0] = ConstrainEqualRandomOp<bool>.ValueAverageConditional<Bernoulli>(this.vBernoulli5); // Message to 'vbool193_uses' from EqualRandom factor this.vbool193_uses_B[0] = ConstrainEqualRandomOp<bool>.ValueAverageConditional<Bernoulli>(this.vBernoulli5); // Message to 'vbool191_uses' from EqualRandom factor this.vbool191_uses_B[0] = ConstrainEqualRandomOp<bool>.ValueAverageConditional<Bernoulli>(this.vBernoulli5); // Message to 'vbool192_uses' from EqualRandom factor this.vbool192_uses_B[0] = ConstrainEqualRandomOp<bool>.ValueAverageConditional<Bernoulli>(this.vBernoulli5); // Message to 'vbool206_uses' from EqualRandom factor this.vbool206_uses_B[0] = ConstrainEqualRandomOp<bool>.ValueAverageConditional<Bernoulli>(this.vBernoulli5); // Message to 'vbool195_uses' from EqualRandom factor this.vbool195_uses_B[0] = ConstrainEqualRandomOp<bool>.ValueAverageConditional<Bernoulli>(this.vBernoulli5); // Message to 'vbool207_uses' from EqualRandom factor this.vbool207_uses_B[0] = ConstrainEqualRandomOp<bool>.ValueAverageConditional<Bernoulli>(this.vBernoulli5); // Message to 'vbool196_uses' from EqualRandom factor this.vbool196_uses_B[0] = ConstrainEqualRandomOp<bool>.ValueAverageConditional<Bernoulli>(this.vBernoulli5); // Message to 'vbool208_uses' from EqualRandom factor this.vbool208_uses_B[0] = ConstrainEqualRandomOp<bool>.ValueAverageConditional<Bernoulli>(this.vBernoulli5); // Message to 'vbool197_uses' from EqualRandom factor this.vbool197_uses_B[0] = ConstrainEqualRandomOp<bool>.ValueAverageConditional<Bernoulli>(this.vBernoulli5); // Message to 'vbool209_uses' from EqualRandom factor this.vbool209_uses_B[0] = ConstrainEqualRandomOp<bool>.ValueAverageConditional<Bernoulli>(this.vBernoulli5); // Message to 'vbool198_uses' from EqualRandom factor this.vbool198_uses_B[0] = ConstrainEqualRandomOp<bool>.ValueAverageConditional<Bernoulli>(this.vBernoulli5); // Message to 'vbool185_uses' from EqualRandom factor this.vbool185_uses_B[0] = ConstrainEqualRandomOp<bool>.ValueAverageConditional<Bernoulli>(this.vBernoulli5); // Message to 'vbool211_uses' from EqualRandom factor this.vbool211_uses_B[0] = ConstrainEqualRandomOp<bool>.ValueAverageConditional<Bernoulli>(this.vBernoulli5); // Message to 'vbool201_uses' from EqualRandom factor this.vbool201_uses_B[0] = ConstrainEqualRandomOp<bool>.ValueAverageConditional<Bernoulli>(this.vBernoulli5); // Message to 'vbool186_uses' from EqualRandom factor this.vbool186_uses_B[0] = ConstrainEqualRandomOp<bool>.ValueAverageConditional<Bernoulli>(this.vBernoulli5); // Message to 'vbool212_uses' from EqualRandom factor this.vbool212_uses_B[0] = ConstrainEqualRandomOp<bool>.ValueAverageConditional<Bernoulli>(this.vBernoulli5); // Message to 'vbool202_uses' from EqualRandom factor this.vbool202_uses_B[0] = ConstrainEqualRandomOp<bool>.ValueAverageConditional<Bernoulli>(this.vBernoulli5); // Message to 'vbool187_uses' from EqualRandom factor this.vbool187_uses_B[0] = ConstrainEqualRandomOp<bool>.ValueAverageConditional<Bernoulli>(this.vBernoulli5); // Message to 'vbool213_uses' from EqualRandom factor this.vbool213_uses_B[0] = ConstrainEqualRandomOp<bool>.ValueAverageConditional<Bernoulli>(this.vBernoulli5); // Message to 'vbool203_uses' from EqualRandom factor this.vbool203_uses_B[0] = ConstrainEqualRandomOp<bool>.ValueAverageConditional<Bernoulli>(this.vBernoulli5); // Message to 'vbool188_uses' from EqualRandom factor this.vbool188_uses_B[0] = ConstrainEqualRandomOp<bool>.ValueAverageConditional<Bernoulli>(this.vBernoulli5); // Message to 'vbool214_uses' from EqualRandom factor this.vbool214_uses_B[0] = ConstrainEqualRandomOp<bool>.ValueAverageConditional<Bernoulli>(this.vBernoulli5); // Message to 'vbool204_uses' from EqualRandom factor this.vbool204_uses_B[0] = ConstrainEqualRandomOp<bool>.ValueAverageConditional<Bernoulli>(this.vBernoulli5); // Message to 'vbool421_uses' from EqualRandom factor this.vbool421_uses_B[0] = ConstrainEqualRandomOp<bool>.ValueAverageConditional<Bernoulli>(this.vBernoulli5); // Message to 'vbool286_uses' from EqualRandom factor this.vbool286_uses_B[0] = ConstrainEqualRandomOp<bool>.ValueAverageConditional<Bernoulli>(this.vBernoulli5); // Message to 'vbool424_uses' from EqualRandom factor this.vbool424_uses_B[0] = ConstrainEqualRandomOp<bool>.ValueAverageConditional<Bernoulli>(this.vBernoulli5); // Message to 'vbool422_uses' from EqualRandom factor this.vbool422_uses_B[0] = ConstrainEqualRandomOp<bool>.ValueAverageConditional<Bernoulli>(this.vBernoulli5); // Message to 'vbool423_uses' from EqualRandom factor this.vbool423_uses_B[0] = ConstrainEqualRandomOp<bool>.ValueAverageConditional<Bernoulli>(this.vBernoulli5); // Message to 'vbool415_uses' from EqualRandom factor this.vbool415_uses_B[0] = ConstrainEqualRandomOp<bool>.ValueAverageConditional<Bernoulli>(this.vBernoulli5); // Message to 'vbool418_uses' from EqualRandom factor this.vbool418_uses_B[0] = ConstrainEqualRandomOp<bool>.ValueAverageConditional<Bernoulli>(this.vBernoulli5); // Message to 'vbool416_uses' from EqualRandom factor this.vbool416_uses_B[0] = ConstrainEqualRandomOp<bool>.ValueAverageConditional<Bernoulli>(this.vBernoulli5); // Message to 'vbool417_uses' from EqualRandom factor this.vbool417_uses_B[0] = ConstrainEqualRandomOp<bool>.ValueAverageConditional<Bernoulli>(this.vBernoulli5); // Message to 'vbool210' from ReplicateWithMarginal factor this.vbool210_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool210_uses_B, this.vbool210_B); this.vbool419_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Message to 'vbool419' from ReplicateWithMarginal factor this.vbool419_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool419_uses_B, this.vbool419_B); // Create array for 'vbool163_uses' forwards messages. this.vbool163_uses_F = new Bernoulli[2]; for(int _ind0 = 0; _ind0<2; _ind0++) { this.vbool163_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli171); } this.vbool441_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool181_uses' forwards messages. this.vbool181_uses_F = new Bernoulli[3]; for(int _ind0 = 0; _ind0<3; _ind0++) { this.vbool181_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli189); } this.vBernoulli6 = new Bernoulli(0.9); // Message to 'vbool451_uses' from EqualRandom factor this.vbool451_uses_B[0] = ConstrainEqualRandomOp<bool>.ValueAverageConditional<Bernoulli>(this.vBernoulli6); // Message to 'vbool446_uses' from EqualRandom factor this.vbool446_uses_B[0] = ConstrainEqualRandomOp<bool>.ValueAverageConditional<Bernoulli>(this.vBernoulli6); // Message to 'vbool456_uses' from EqualRandom factor this.vbool456_uses_B[0] = ConstrainEqualRandomOp<bool>.ValueAverageConditional<Bernoulli>(this.vBernoulli6); // Message to 'vbool447_uses' from EqualRandom factor this.vbool447_uses_B[0] = ConstrainEqualRandomOp<bool>.ValueAverageConditional<Bernoulli>(this.vBernoulli6); // Message to 'vbool450_uses' from EqualRandom factor this.vbool450_uses_B[0] = ConstrainEqualRandomOp<bool>.ValueAverageConditional<Bernoulli>(this.vBernoulli6); // Message to 'vbool448_uses' from EqualRandom factor this.vbool448_uses_B[0] = ConstrainEqualRandomOp<bool>.ValueAverageConditional<Bernoulli>(this.vBernoulli6); // Message to 'vbool449_uses' from EqualRandom factor this.vbool449_uses_B[0] = ConstrainEqualRandomOp<bool>.ValueAverageConditional<Bernoulli>(this.vBernoulli6); // Message to 'vbool452_uses' from EqualRandom factor this.vbool452_uses_B[0] = ConstrainEqualRandomOp<bool>.ValueAverageConditional<Bernoulli>(this.vBernoulli6); // Message to 'vbool453_uses' from EqualRandom factor this.vbool453_uses_B[0] = ConstrainEqualRandomOp<bool>.ValueAverageConditional<Bernoulli>(this.vBernoulli6); // Message to 'vbool454_uses' from EqualRandom factor this.vbool454_uses_B[0] = ConstrainEqualRandomOp<bool>.ValueAverageConditional<Bernoulli>(this.vBernoulli6); // Message to 'vbool455_uses' from EqualRandom factor this.vbool455_uses_B[0] = ConstrainEqualRandomOp<bool>.ValueAverageConditional<Bernoulli>(this.vBernoulli6); // Message to 'vbool451' from ReplicateWithMarginal factor this.vbool451_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool451_uses_B, this.vbool451_B); this.vbool205_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Message to 'vbool205' from ReplicateWithMarginal factor this.vbool205_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool205_uses_B, this.vbool205_B); // Create array for 'vbool46_uses' forwards messages. this.vbool46_uses_F = new Bernoulli[2]; for(int _ind0 = 0; _ind0<2; _ind0++) { this.vbool46_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli54); } this.vbool402_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool145_uses' forwards messages. this.vbool145_uses_F = new Bernoulli[12]; for(int _ind0 = 0; _ind0<12; _ind0++) { this.vbool145_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli153); } this.vbool405_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool116_uses' forwards messages. this.vbool116_uses_F = new Bernoulli[3]; for(int _ind0 = 0; _ind0<3; _ind0++) { this.vbool116_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli124); } this.vbool408_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool406_uses' forwards messages. this.vbool406_uses_F = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool406_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool420_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Message to 'vbool420' from ReplicateWithMarginal factor this.vbool420_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool420_uses_B, this.vbool420_B); this.vbool446_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Message to 'vbool446' from ReplicateWithMarginal factor this.vbool446_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool446_uses_B, this.vbool446_B); // Create array for 'vbool103_uses' forwards messages. this.vbool103_uses_F = new Bernoulli[2]; for(int _ind0 = 0; _ind0<2; _ind0++) { this.vbool103_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli111); } this.vBernoulli7 = new Bernoulli(0.9); // Message to 'vbool441_uses' from EqualRandom factor this.vbool441_uses_B[0] = ConstrainEqualRandomOp<bool>.ValueAverageConditional<Bernoulli>(this.vBernoulli7); // Message to 'vbool410_uses' from EqualRandom factor this.vbool410_uses_B[0] = ConstrainEqualRandomOp<bool>.ValueAverageConditional<Bernoulli>(this.vBernoulli7); // Message to 'vbool442_uses' from EqualRandom factor this.vbool442_uses_B[0] = ConstrainEqualRandomOp<bool>.ValueAverageConditional<Bernoulli>(this.vBernoulli7); // Message to 'vbool445_uses' from EqualRandom factor this.vbool445_uses_B[0] = ConstrainEqualRandomOp<bool>.ValueAverageConditional<Bernoulli>(this.vBernoulli7); // Message to 'vbool443_uses' from EqualRandom factor this.vbool443_uses_B[0] = ConstrainEqualRandomOp<bool>.ValueAverageConditional<Bernoulli>(this.vBernoulli7); // Message to 'vbool444_uses' from EqualRandom factor this.vbool444_uses_B[0] = ConstrainEqualRandomOp<bool>.ValueAverageConditional<Bernoulli>(this.vBernoulli7); // Message to 'vbool411_uses' from EqualRandom factor this.vbool411_uses_B[0] = ConstrainEqualRandomOp<bool>.ValueAverageConditional<Bernoulli>(this.vBernoulli7); // Message to 'vbool412_uses' from EqualRandom factor this.vbool412_uses_B[0] = ConstrainEqualRandomOp<bool>.ValueAverageConditional<Bernoulli>(this.vBernoulli7); // Message to 'vbool413_uses' from EqualRandom factor this.vbool413_uses_B[0] = ConstrainEqualRandomOp<bool>.ValueAverageConditional<Bernoulli>(this.vBernoulli7); // Message to 'vbool414_uses' from EqualRandom factor this.vbool414_uses_B[0] = ConstrainEqualRandomOp<bool>.ValueAverageConditional<Bernoulli>(this.vBernoulli7); // Message to 'vbool441' from ReplicateWithMarginal factor this.vbool441_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool441_uses_B, this.vbool441_B); this.vbool189_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Message to 'vbool189' from ReplicateWithMarginal factor this.vbool189_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool189_uses_B, this.vbool189_B); // Create array for 'vbool15_uses' forwards messages. this.vbool15_uses_F = new Bernoulli[2]; for(int _ind0 = 0; _ind0<2; _ind0++) { this.vbool15_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli23); } this.vbool199_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Message to 'vbool199' from ReplicateWithMarginal factor this.vbool199_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool199_uses_B, this.vbool199_B); // Create array for 'vbool20_uses' forwards messages. this.vbool20_uses_F = new Bernoulli[2]; for(int _ind0 = 0; _ind0<2; _ind0++) { this.vbool20_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli28); } this.vbool215_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool111_uses' forwards messages. this.vbool111_uses_F = new Bernoulli[3]; for(int _ind0 = 0; _ind0<3; _ind0++) { this.vbool111_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli119); } this.vbool216_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool218_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool107_uses' forwards messages. this.vbool107_uses_F = new Bernoulli[3]; for(int _ind0 = 0; _ind0<3; _ind0++) { this.vbool107_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli115); } this.vbool221_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool110_uses' forwards messages. this.vbool110_uses_F = new Bernoulli[9]; for(int _ind0 = 0; _ind0<9; _ind0++) { this.vbool110_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli118); } this.vbool224_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool108_uses' forwards messages. this.vbool108_uses_F = new Bernoulli[7]; for(int _ind0 = 0; _ind0<7; _ind0++) { this.vbool108_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli116); } this.vbool227_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool230_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool233_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool109_uses' forwards messages. this.vbool109_uses_F = new Bernoulli[7]; for(int _ind0 = 0; _ind0<7; _ind0++) { this.vbool109_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli117); } this.vbool236_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool239_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool403_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool2_uses' forwards messages. this.vbool2_uses_F = new Bernoulli[12]; for(int _ind0 = 0; _ind0<12; _ind0++) { this.vbool2_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli10); } this.vbool287_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool406_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool404_uses' forwards messages. this.vbool404_uses_F = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool404_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool404_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool402_uses' forwards messages. this.vbool402_uses_F = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool402_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool368_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool371_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool370_uses' forwards messages. this.vbool370_uses_F = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool370_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool372_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool379_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool378_uses' forwards messages. this.vbool378_uses_F = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool378_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool380_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool387_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool386_uses' forwards messages. this.vbool386_uses_F = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool386_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool388_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool395_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool394_uses' forwards messages. this.vbool394_uses_F = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool394_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool396_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool456_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Message to 'vbool456' from ReplicateWithMarginal factor this.vbool456_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool456_uses_B, this.vbool456_B); // Create array for 'vbool1_uses' forwards messages. this.vbool1_uses_F = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool1_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli9); } // Message to 'vbool1_uses' from UsesEqualDef factor this.vbool1_uses_F[0] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool1_uses_B, this.vbool1_F, 0, this.vbool1_uses_F[0]); // Message to 'vbool2_uses' from AreEqual factor this.vbool2_uses_B[11] = BooleanAreEqualOp.AAverageConditional(this.vbool456_B, this.vbool1_uses_F[0]); // Create array for 'vbool405_uses' forwards messages. this.vbool405_uses_F = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool405_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } // Create array for 'vbool407_uses' forwards messages. this.vbool407_uses_F = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool407_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool409_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool403_uses' forwards messages. this.vbool403_uses_F = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool403_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool194_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Message to 'vbool194' from ReplicateWithMarginal factor this.vbool194_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool194_uses_B, this.vbool194_B); this.vbool410_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Message to 'vbool410' from ReplicateWithMarginal factor this.vbool410_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool410_uses_B, this.vbool410_B); // Create array for 'vbool41_uses' forwards messages. this.vbool41_uses_F = new Bernoulli[2]; for(int _ind0 = 0; _ind0<2; _ind0++) { this.vbool41_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli49); } this.vbool200_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Message to 'vbool200' from ReplicateWithMarginal factor this.vbool200_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool200_uses_B, this.vbool200_B); this.vbool217_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool216_uses' forwards messages. this.vbool216_uses_F = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool216_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } // Create array for 'vbool215_uses' forwards messages. this.vbool215_uses_F = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool215_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool190_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Message to 'vbool190' from ReplicateWithMarginal factor this.vbool190_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool190_uses_B, this.vbool190_B); // Create array for 'vbool102_uses' forwards messages. this.vbool102_uses_F = new Bernoulli[2]; for(int _ind0 = 0; _ind0<2; _ind0++) { this.vbool102_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli110); } this.vbool242_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool141_uses' forwards messages. this.vbool141_uses_F = new Bernoulli[10]; for(int _ind0 = 0; _ind0<10; _ind0++) { this.vbool141_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli149); } this.vbool219_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool115_uses' forwards messages. this.vbool115_uses_F = new Bernoulli[11]; for(int _ind0 = 0; _ind0<11; _ind0++) { this.vbool115_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli123); } this.vbool193_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Message to 'vbool193' from ReplicateWithMarginal factor this.vbool193_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool193_uses_B, this.vbool193_B); // Create array for 'vbool106_uses' forwards messages. this.vbool106_uses_F = new Bernoulli[2]; for(int _ind0 = 0; _ind0<2; _ind0++) { this.vbool106_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli114); } this.vbool254_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool260_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool269_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool142_uses' forwards messages. this.vbool142_uses_F = new Bernoulli[5]; for(int _ind0 = 0; _ind0<5; _ind0++) { this.vbool142_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli150); } this.vbool278_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool143_uses' forwards messages. this.vbool143_uses_F = new Bernoulli[5]; for(int _ind0 = 0; _ind0<5; _ind0++) { this.vbool143_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli151); } this.vbool284_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool144_uses' forwards messages. this.vbool144_uses_F = new Bernoulli[3]; for(int _ind0 = 0; _ind0<3; _ind0++) { this.vbool144_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli152); } this.vbool222_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool112_uses' forwards messages. this.vbool112_uses_F = new Bernoulli[3]; for(int _ind0 = 0; _ind0<3; _ind0++) { this.vbool112_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli120); } this.vbool191_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Message to 'vbool191' from ReplicateWithMarginal factor this.vbool191_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool191_uses_B, this.vbool191_B); // Create array for 'vbool104_uses' forwards messages. this.vbool104_uses_F = new Bernoulli[2]; for(int _ind0 = 0; _ind0<2; _ind0++) { this.vbool104_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli112); } this.vbool248_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool251_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool266_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool272_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool225_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool113_uses' forwards messages. this.vbool113_uses_F = new Bernoulli[7]; for(int _ind0 = 0; _ind0<7; _ind0++) { this.vbool113_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli121); } this.vbool228_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool231_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool192_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Message to 'vbool192' from ReplicateWithMarginal factor this.vbool192_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool192_uses_B, this.vbool192_B); // Create array for 'vbool105_uses' forwards messages. this.vbool105_uses_F = new Bernoulli[2]; for(int _ind0 = 0; _ind0<2; _ind0++) { this.vbool105_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli113); } this.vbool257_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool263_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool275_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool281_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool234_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool114_uses' forwards messages. this.vbool114_uses_F = new Bernoulli[7]; for(int _ind0 = 0; _ind0<7; _ind0++) { this.vbool114_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli122); } this.vbool237_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool240_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool408_uses' forwards messages. this.vbool408_uses_F = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool408_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vBernoulli193 = new Bernoulli(0.1); // Message to 'vbool287_uses' from EqualRandom factor this.vbool287_uses_B[0] = ConstrainEqualRandomOp<bool>.ValueAverageConditional<Bernoulli>(this.vBernoulli193); // Message to 'vbool287' from ReplicateWithMarginal factor this.vbool287_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool287_uses_B, this.vbool287_B); this.vbool369_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool0_uses' forwards messages. this.vbool0_uses_F = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool0_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli8); } // Message to 'vbool0_uses' from UsesEqualDef factor this.vbool0_uses_F[0] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool0_uses_B, this.vbool0_F, 0, this.vbool0_uses_F[0]); this.vbool370_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool206_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Message to 'vbool206' from ReplicateWithMarginal factor this.vbool206_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool206_uses_B, this.vbool206_B); // Create array for 'vbool42_uses' forwards messages. this.vbool42_uses_F = new Bernoulli[2]; for(int _ind0 = 0; _ind0<2; _ind0++) { this.vbool42_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli50); } this.vbool373_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool375_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool68_uses' forwards messages. this.vbool68_uses_F = new Bernoulli[2]; for(int _ind0 = 0; _ind0<2; _ind0++) { this.vbool68_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli76); } // Create array for 'vbool63_uses' forwards messages. this.vbool63_uses_F = new Bernoulli[4]; for(int _ind0 = 0; _ind0<4; _ind0++) { this.vbool63_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli71); } this.vbool195_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Message to 'vbool195' from ReplicateWithMarginal factor this.vbool195_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool195_uses_B, this.vbool195_B); // Create array for 'vbool16_uses' forwards messages. this.vbool16_uses_F = new Bernoulli[2]; for(int _ind0 = 0; _ind0<2; _ind0++) { this.vbool16_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli24); } this.vbool245_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool377_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool376_uses' forwards messages. this.vbool376_uses_F = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool376_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool374_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool373_uses' forwards messages. this.vbool373_uses_F = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool373_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool378_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool207_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Message to 'vbool207' from ReplicateWithMarginal factor this.vbool207_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool207_uses_B, this.vbool207_B); // Create array for 'vbool43_uses' forwards messages. this.vbool43_uses_F = new Bernoulli[2]; for(int _ind0 = 0; _ind0<2; _ind0++) { this.vbool43_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli51); } this.vbool381_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool383_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool69_uses' forwards messages. this.vbool69_uses_F = new Bernoulli[2]; for(int _ind0 = 0; _ind0<2; _ind0++) { this.vbool69_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli77); } // Create array for 'vbool64_uses' forwards messages. this.vbool64_uses_F = new Bernoulli[4]; for(int _ind0 = 0; _ind0<4; _ind0++) { this.vbool64_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli72); } this.vbool196_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Message to 'vbool196' from ReplicateWithMarginal factor this.vbool196_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool196_uses_B, this.vbool196_B); // Create array for 'vbool17_uses' forwards messages. this.vbool17_uses_F = new Bernoulli[2]; for(int _ind0 = 0; _ind0<2; _ind0++) { this.vbool17_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli25); } this.vbool385_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool384_uses' forwards messages. this.vbool384_uses_F = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool384_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool382_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool381_uses' forwards messages. this.vbool381_uses_F = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool381_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool386_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool208_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Message to 'vbool208' from ReplicateWithMarginal factor this.vbool208_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool208_uses_B, this.vbool208_B); // Create array for 'vbool44_uses' forwards messages. this.vbool44_uses_F = new Bernoulli[2]; for(int _ind0 = 0; _ind0<2; _ind0++) { this.vbool44_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli52); } this.vbool389_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool391_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool70_uses' forwards messages. this.vbool70_uses_F = new Bernoulli[2]; for(int _ind0 = 0; _ind0<2; _ind0++) { this.vbool70_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli78); } // Create array for 'vbool65_uses' forwards messages. this.vbool65_uses_F = new Bernoulli[4]; for(int _ind0 = 0; _ind0<4; _ind0++) { this.vbool65_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli73); } this.vbool197_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Message to 'vbool197' from ReplicateWithMarginal factor this.vbool197_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool197_uses_B, this.vbool197_B); // Create array for 'vbool18_uses' forwards messages. this.vbool18_uses_F = new Bernoulli[2]; for(int _ind0 = 0; _ind0<2; _ind0++) { this.vbool18_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli26); } this.vbool393_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool392_uses' forwards messages. this.vbool392_uses_F = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool392_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool390_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool389_uses' forwards messages. this.vbool389_uses_F = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool389_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool394_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool209_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Message to 'vbool209' from ReplicateWithMarginal factor this.vbool209_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool209_uses_B, this.vbool209_B); // Create array for 'vbool45_uses' forwards messages. this.vbool45_uses_F = new Bernoulli[2]; for(int _ind0 = 0; _ind0<2; _ind0++) { this.vbool45_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli53); } this.vbool397_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool399_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool71_uses' forwards messages. this.vbool71_uses_F = new Bernoulli[2]; for(int _ind0 = 0; _ind0<2; _ind0++) { this.vbool71_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli79); } // Create array for 'vbool66_uses' forwards messages. this.vbool66_uses_F = new Bernoulli[4]; for(int _ind0 = 0; _ind0<4; _ind0++) { this.vbool66_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli74); } this.vbool198_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Message to 'vbool198' from ReplicateWithMarginal factor this.vbool198_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool198_uses_B, this.vbool198_B); // Create array for 'vbool19_uses' forwards messages. this.vbool19_uses_F = new Bernoulli[2]; for(int _ind0 = 0; _ind0<2; _ind0++) { this.vbool19_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli27); } this.vbool401_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool400_uses' forwards messages. this.vbool400_uses_F = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool400_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool398_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool397_uses' forwards messages. this.vbool397_uses_F = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool397_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vBernoulli4 = new Bernoulli(0.9); // Message to 'vbool409_uses' from EqualRandom factor this.vbool409_uses_B[0] = ConstrainEqualRandomOp<bool>.ValueAverageConditional<Bernoulli>(this.vBernoulli4); // Message to 'vbool377_uses' from EqualRandom factor this.vbool377_uses_B[0] = ConstrainEqualRandomOp<bool>.ValueAverageConditional<Bernoulli>(this.vBernoulli4); // Message to 'vbool385_uses' from EqualRandom factor this.vbool385_uses_B[0] = ConstrainEqualRandomOp<bool>.ValueAverageConditional<Bernoulli>(this.vBernoulli4); // Message to 'vbool393_uses' from EqualRandom factor this.vbool393_uses_B[0] = ConstrainEqualRandomOp<bool>.ValueAverageConditional<Bernoulli>(this.vBernoulli4); // Message to 'vbool401_uses' from EqualRandom factor this.vbool401_uses_B[0] = ConstrainEqualRandomOp<bool>.ValueAverageConditional<Bernoulli>(this.vBernoulli4); // Message to 'vbool409' from ReplicateWithMarginal factor this.vbool409_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool409_uses_B, this.vbool409_B); // Message to 'vbool377' from ReplicateWithMarginal factor this.vbool377_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool377_uses_B, this.vbool377_B); // Message to 'vbool385' from ReplicateWithMarginal factor this.vbool385_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool385_uses_B, this.vbool385_B); // Message to 'vbool393' from ReplicateWithMarginal factor this.vbool393_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool393_uses_B, this.vbool393_B); // Message to 'vbool401' from ReplicateWithMarginal factor this.vbool401_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool401_uses_B, this.vbool401_B); this.vbool220_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool219_uses' forwards messages. this.vbool219_uses_F = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool219_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool447_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Message to 'vbool447' from ReplicateWithMarginal factor this.vbool447_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool447_uses_B, this.vbool447_B); // Create array for 'vbool180_uses' forwards messages. this.vbool180_uses_F = new Bernoulli[3]; for(int _ind0 = 0; _ind0<3; _ind0++) { this.vbool180_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli188); } this.vbool243_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool218_uses' forwards messages. this.vbool218_uses_F = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool218_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } // Create array for 'vbool227_uses' forwards messages. this.vbool227_uses_F = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool227_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } // Create array for 'vbool239_uses' forwards messages. this.vbool239_uses_F = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool239_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } // Create array for 'vbool242_uses' forwards messages. this.vbool242_uses_F = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool242_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool252_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool251_uses' forwards messages. this.vbool251_uses_F = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool251_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool264_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool263_uses' forwards messages. this.vbool263_uses_F = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool263_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool273_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool272_uses' forwards messages. this.vbool272_uses_F = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool272_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool282_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool281_uses' forwards messages. this.vbool281_uses_F = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool281_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool285_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool284_uses' forwards messages. this.vbool284_uses_F = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool284_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } // Create array for 'vbool217_uses' forwards messages. this.vbool217_uses_F = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool217_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool450_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Message to 'vbool450' from ReplicateWithMarginal factor this.vbool450_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool450_uses_B, this.vbool450_B); // Create array for 'vbool184_uses' forwards messages. this.vbool184_uses_F = new Bernoulli[3]; for(int _ind0 = 0; _ind0<3; _ind0++) { this.vbool184_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli192); } this.vbool255_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool261_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool270_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool279_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool221_uses' forwards messages. this.vbool221_uses_F = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool221_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool246_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool245_uses' forwards messages. this.vbool245_uses_F = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool245_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool223_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool220_uses' forwards messages. this.vbool220_uses_F = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool220_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool448_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Message to 'vbool448' from ReplicateWithMarginal factor this.vbool448_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool448_uses_B, this.vbool448_B); // Create array for 'vbool182_uses' forwards messages. this.vbool182_uses_F = new Bernoulli[3]; for(int _ind0 = 0; _ind0<3; _ind0++) { this.vbool182_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli190); } this.vbool249_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool267_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool224_uses' forwards messages. this.vbool224_uses_F = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool224_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } // Create array for 'vbool230_uses' forwards messages. this.vbool230_uses_F = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool230_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } // Create array for 'vbool254_uses' forwards messages. this.vbool254_uses_F = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool254_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } // Create array for 'vbool269_uses' forwards messages. this.vbool269_uses_F = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool269_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } // Create array for 'vbool248_uses' forwards messages. this.vbool248_uses_F = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool248_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } // Create array for 'vbool266_uses' forwards messages. this.vbool266_uses_F = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool266_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool226_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool223_uses' forwards messages. this.vbool223_uses_F = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool223_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool229_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool226_uses' forwards messages. this.vbool226_uses_F = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool226_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool232_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool229_uses' forwards messages. this.vbool229_uses_F = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool229_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool449_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Message to 'vbool449' from ReplicateWithMarginal factor this.vbool449_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool449_uses_B, this.vbool449_B); // Create array for 'vbool183_uses' forwards messages. this.vbool183_uses_F = new Bernoulli[3]; for(int _ind0 = 0; _ind0<3; _ind0++) { this.vbool183_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli191); } this.vbool258_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool276_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool233_uses' forwards messages. this.vbool233_uses_F = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool233_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } // Create array for 'vbool236_uses' forwards messages. this.vbool236_uses_F = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool236_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } // Create array for 'vbool260_uses' forwards messages. this.vbool260_uses_F = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool260_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } // Create array for 'vbool278_uses' forwards messages. this.vbool278_uses_F = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool278_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } // Create array for 'vbool257_uses' forwards messages. this.vbool257_uses_F = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool257_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } // Create array for 'vbool275_uses' forwards messages. this.vbool275_uses_F = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool275_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool235_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool232_uses' forwards messages. this.vbool232_uses_F = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool232_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool238_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool235_uses' forwards messages. this.vbool235_uses_F = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool235_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool241_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool238_uses' forwards messages. this.vbool238_uses_F = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool238_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } // Create array for 'vbool368_uses' forwards messages. this.vbool368_uses_F = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool368_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vBernoulli3 = new Bernoulli(0.9); // Message to 'vbool369_uses' from EqualRandom factor this.vbool369_uses_B[0] = ConstrainEqualRandomOp<bool>.ValueAverageConditional<Bernoulli>(this.vBernoulli3); // Message to 'vbool369' from ReplicateWithMarginal factor this.vbool369_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool369_uses_B, this.vbool369_B); // Message to 'vbool368_uses' from Or factor this.vbool368_uses_B[0] = BooleanOrOp.AAverageConditional(this.vbool369_B, this.vbool0_uses_F[0]); // Message to 'vbool368' from ReplicateWithMarginal factor this.vbool368_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool368_uses_B, this.vbool368_B); // Message to 'vbool2_uses' from Not factor this.vbool2_uses_B[2] = BooleanNotOp.BAverageConditional(this.vbool368_B); this.vbool185_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Message to 'vbool185' from ReplicateWithMarginal factor this.vbool185_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool185_uses_B, this.vbool185_B); // Create array for 'vbool11_uses' forwards messages. this.vbool11_uses_F = new Bernoulli[2]; for(int _ind0 = 0; _ind0<2; _ind0++) { this.vbool11_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli19); } // Create array for 'vbool372_uses' forwards messages. this.vbool372_uses_F = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool372_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool211_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Message to 'vbool211' from ReplicateWithMarginal factor this.vbool211_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool211_uses_B, this.vbool211_B); // Create array for 'vbool89_uses' forwards messages. this.vbool89_uses_F = new Bernoulli[2]; for(int _ind0 = 0; _ind0<2; _ind0++) { this.vbool89_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli97); } this.vbool376_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool374_uses' forwards messages. this.vbool374_uses_F = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool374_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool201_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Message to 'vbool201' from ReplicateWithMarginal factor this.vbool201_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool201_uses_B, this.vbool201_B); // Create array for 'vbool37_uses' forwards messages. this.vbool37_uses_F = new Bernoulli[2]; for(int _ind0 = 0; _ind0<2; _ind0++) { this.vbool37_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli45); } // Create array for 'vbool375_uses' forwards messages. this.vbool375_uses_F = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool375_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } // Create array for 'vbool371_uses' forwards messages. this.vbool371_uses_F = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool371_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool186_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Message to 'vbool186' from ReplicateWithMarginal factor this.vbool186_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool186_uses_B, this.vbool186_B); // Create array for 'vbool12_uses' forwards messages. this.vbool12_uses_F = new Bernoulli[2]; for(int _ind0 = 0; _ind0<2; _ind0++) { this.vbool12_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli20); } // Create array for 'vbool380_uses' forwards messages. this.vbool380_uses_F = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool380_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool212_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Message to 'vbool212' from ReplicateWithMarginal factor this.vbool212_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool212_uses_B, this.vbool212_B); // Create array for 'vbool91_uses' forwards messages. this.vbool91_uses_F = new Bernoulli[2]; for(int _ind0 = 0; _ind0<2; _ind0++) { this.vbool91_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli99); } this.vbool384_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool382_uses' forwards messages. this.vbool382_uses_F = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool382_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool202_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Message to 'vbool202' from ReplicateWithMarginal factor this.vbool202_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool202_uses_B, this.vbool202_B); // Create array for 'vbool38_uses' forwards messages. this.vbool38_uses_F = new Bernoulli[2]; for(int _ind0 = 0; _ind0<2; _ind0++) { this.vbool38_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli46); } // Create array for 'vbool383_uses' forwards messages. this.vbool383_uses_F = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool383_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } // Create array for 'vbool379_uses' forwards messages. this.vbool379_uses_F = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool379_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool187_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Message to 'vbool187' from ReplicateWithMarginal factor this.vbool187_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool187_uses_B, this.vbool187_B); // Create array for 'vbool13_uses' forwards messages. this.vbool13_uses_F = new Bernoulli[2]; for(int _ind0 = 0; _ind0<2; _ind0++) { this.vbool13_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli21); } // Create array for 'vbool388_uses' forwards messages. this.vbool388_uses_F = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool388_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool213_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Message to 'vbool213' from ReplicateWithMarginal factor this.vbool213_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool213_uses_B, this.vbool213_B); // Create array for 'vbool92_uses' forwards messages. this.vbool92_uses_F = new Bernoulli[2]; for(int _ind0 = 0; _ind0<2; _ind0++) { this.vbool92_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli100); } this.vbool392_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool390_uses' forwards messages. this.vbool390_uses_F = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool390_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool203_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Message to 'vbool203' from ReplicateWithMarginal factor this.vbool203_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool203_uses_B, this.vbool203_B); // Create array for 'vbool39_uses' forwards messages. this.vbool39_uses_F = new Bernoulli[2]; for(int _ind0 = 0; _ind0<2; _ind0++) { this.vbool39_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli47); } // Create array for 'vbool391_uses' forwards messages. this.vbool391_uses_F = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool391_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } // Create array for 'vbool387_uses' forwards messages. this.vbool387_uses_F = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool387_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool188_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Message to 'vbool188' from ReplicateWithMarginal factor this.vbool188_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool188_uses_B, this.vbool188_B); // Create array for 'vbool14_uses' forwards messages. this.vbool14_uses_F = new Bernoulli[2]; for(int _ind0 = 0; _ind0<2; _ind0++) { this.vbool14_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli22); } // Create array for 'vbool396_uses' forwards messages. this.vbool396_uses_F = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool396_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool214_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Message to 'vbool214' from ReplicateWithMarginal factor this.vbool214_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool214_uses_B, this.vbool214_B); // Create array for 'vbool93_uses' forwards messages. this.vbool93_uses_F = new Bernoulli[2]; for(int _ind0 = 0; _ind0<2; _ind0++) { this.vbool93_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli101); } this.vbool400_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool398_uses' forwards messages. this.vbool398_uses_F = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool398_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool204_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Message to 'vbool204' from ReplicateWithMarginal factor this.vbool204_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool204_uses_B, this.vbool204_B); // Create array for 'vbool40_uses' forwards messages. this.vbool40_uses_F = new Bernoulli[2]; for(int _ind0 = 0; _ind0<2; _ind0++) { this.vbool40_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli48); } // Create array for 'vbool399_uses' forwards messages. this.vbool399_uses_F = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool399_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } // Create array for 'vbool395_uses' forwards messages. this.vbool395_uses_F = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool395_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } // Create array for 'vbool222_uses' forwards messages. this.vbool222_uses_F = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool222_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool421_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Message to 'vbool421' from ReplicateWithMarginal factor this.vbool421_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool421_uses_B, this.vbool421_B); // Create array for 'vbool159_uses' forwards messages. this.vbool159_uses_F = new Bernoulli[2]; for(int _ind0 = 0; _ind0<2; _ind0++) { this.vbool159_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli167); } this.vbool442_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Message to 'vbool442' from ReplicateWithMarginal factor this.vbool442_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool442_uses_B, this.vbool442_B); // Create array for 'vbool154_uses' forwards messages. this.vbool154_uses_F = new Bernoulli[3]; for(int _ind0 = 0; _ind0<3; _ind0++) { this.vbool154_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli162); } this.vbool244_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool241_uses' forwards messages. this.vbool241_uses_F = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool241_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool253_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool250_uses' forwards messages. this.vbool250_uses_F = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool250_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool265_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool262_uses' forwards messages. this.vbool262_uses_F = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool262_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool274_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool271_uses' forwards messages. this.vbool271_uses_F = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool271_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool283_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool280_uses' forwards messages. this.vbool280_uses_F = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool280_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool286_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Message to 'vbool286' from ReplicateWithMarginal factor this.vbool286_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool286_uses_B, this.vbool286_B); // Create array for 'vbool283_uses' forwards messages. this.vbool283_uses_F = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool283_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool424_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Message to 'vbool424' from ReplicateWithMarginal factor this.vbool424_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool424_uses_B, this.vbool424_B); // Create array for 'vbool162_uses' forwards messages. this.vbool162_uses_F = new Bernoulli[2]; for(int _ind0 = 0; _ind0<2; _ind0++) { this.vbool162_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli170); } this.vbool445_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Message to 'vbool445' from ReplicateWithMarginal factor this.vbool445_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool445_uses_B, this.vbool445_B); // Create array for 'vbool158_uses' forwards messages. this.vbool158_uses_F = new Bernoulli[3]; for(int _ind0 = 0; _ind0<3; _ind0++) { this.vbool158_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli166); } this.vbool256_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool253_uses' forwards messages. this.vbool253_uses_F = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool253_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool262_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool259_uses' forwards messages. this.vbool259_uses_F = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool259_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool271_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool268_uses' forwards messages. this.vbool268_uses_F = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool268_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool280_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool277_uses' forwards messages. this.vbool277_uses_F = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool277_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool247_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool244_uses' forwards messages. this.vbool244_uses_F = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool244_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } // Create array for 'vbool225_uses' forwards messages. this.vbool225_uses_F = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool225_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool422_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Message to 'vbool422' from ReplicateWithMarginal factor this.vbool422_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool422_uses_B, this.vbool422_B); // Create array for 'vbool160_uses' forwards messages. this.vbool160_uses_F = new Bernoulli[2]; for(int _ind0 = 0; _ind0<2; _ind0++) { this.vbool160_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli168); } this.vbool443_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Message to 'vbool443' from ReplicateWithMarginal factor this.vbool443_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool443_uses_B, this.vbool443_B); // Create array for 'vbool156_uses' forwards messages. this.vbool156_uses_F = new Bernoulli[3]; for(int _ind0 = 0; _ind0<3; _ind0++) { this.vbool156_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli164); } this.vbool250_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool247_uses' forwards messages. this.vbool247_uses_F = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool247_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool268_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool265_uses' forwards messages. this.vbool265_uses_F = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool265_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } // Create array for 'vbool228_uses' forwards messages. this.vbool228_uses_F = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool228_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } // Create array for 'vbool231_uses' forwards messages. this.vbool231_uses_F = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool231_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } // Create array for 'vbool234_uses' forwards messages. this.vbool234_uses_F = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool234_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool423_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Message to 'vbool423' from ReplicateWithMarginal factor this.vbool423_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool423_uses_B, this.vbool423_B); // Create array for 'vbool161_uses' forwards messages. this.vbool161_uses_F = new Bernoulli[2]; for(int _ind0 = 0; _ind0<2; _ind0++) { this.vbool161_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli169); } this.vbool444_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Message to 'vbool444' from ReplicateWithMarginal factor this.vbool444_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool444_uses_B, this.vbool444_B); // Create array for 'vbool157_uses' forwards messages. this.vbool157_uses_F = new Bernoulli[3]; for(int _ind0 = 0; _ind0<3; _ind0++) { this.vbool157_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(this.vBernoulli165); } this.vbool259_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool256_uses' forwards messages. this.vbool256_uses_F = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool256_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool277_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Create array for 'vbool274_uses' forwards messages. this.vbool274_uses_F = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool274_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } // Create array for 'vbool237_uses' forwards messages. this.vbool237_uses_F = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool237_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } // Create array for 'vbool240_uses' forwards messages. this.vbool240_uses_F = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool240_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } // Create array for 'vbool243_uses' forwards messages. this.vbool243_uses_F = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool243_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool411_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Message to 'vbool411' from ReplicateWithMarginal factor this.vbool411_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool411_uses_B, this.vbool411_B); this.vbool452_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Message to 'vbool452' from ReplicateWithMarginal factor this.vbool452_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool452_uses_B, this.vbool452_B); this.vbool412_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Message to 'vbool412' from ReplicateWithMarginal factor this.vbool412_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool412_uses_B, this.vbool412_B); this.vbool453_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Message to 'vbool453' from ReplicateWithMarginal factor this.vbool453_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool453_uses_B, this.vbool453_B); this.vbool413_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Message to 'vbool413' from ReplicateWithMarginal factor this.vbool413_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool413_uses_B, this.vbool413_B); this.vbool454_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Message to 'vbool454' from ReplicateWithMarginal factor this.vbool454_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool454_uses_B, this.vbool454_B); this.vbool414_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Message to 'vbool414' from ReplicateWithMarginal factor this.vbool414_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool414_uses_B, this.vbool414_B); this.vbool455_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Message to 'vbool455' from ReplicateWithMarginal factor this.vbool455_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool455_uses_B, this.vbool455_B); this.vbool415_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Message to 'vbool415' from ReplicateWithMarginal factor this.vbool415_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool415_uses_B, this.vbool415_B); // Create array for 'vbool246_uses' forwards messages. this.vbool246_uses_F = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool246_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } // Create array for 'vbool249_uses' forwards messages. this.vbool249_uses_F = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool249_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } // Create array for 'vbool252_uses' forwards messages. this.vbool252_uses_F = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool252_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } // Create array for 'vbool255_uses' forwards messages. this.vbool255_uses_F = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool255_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } // Create array for 'vbool258_uses' forwards messages. this.vbool258_uses_F = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool258_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } // Create array for 'vbool261_uses' forwards messages. this.vbool261_uses_F = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool261_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } // Create array for 'vbool264_uses' forwards messages. this.vbool264_uses_F = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool264_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } // Create array for 'vbool267_uses' forwards messages. this.vbool267_uses_F = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool267_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } // Create array for 'vbool270_uses' forwards messages. this.vbool270_uses_F = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool270_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } // Create array for 'vbool273_uses' forwards messages. this.vbool273_uses_F = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool273_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } // Create array for 'vbool276_uses' forwards messages. this.vbool276_uses_F = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool276_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } // Create array for 'vbool279_uses' forwards messages. this.vbool279_uses_F = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool279_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } // Create array for 'vbool282_uses' forwards messages. this.vbool282_uses_F = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool282_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } // Create array for 'vbool285_uses' forwards messages. this.vbool285_uses_F = new Bernoulli[1]; for(int _ind0 = 0; _ind0<1; _ind0++) { this.vbool285_uses_F[_ind0] = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); } this.vbool418_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Message to 'vbool418' from ReplicateWithMarginal factor this.vbool418_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool418_uses_B, this.vbool418_B); this.vbool416_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Message to 'vbool416' from ReplicateWithMarginal factor this.vbool416_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool416_uses_B, this.vbool416_B); this.vbool417_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); // Message to 'vbool417' from ReplicateWithMarginal factor this.vbool417_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool417_uses_B, this.vbool417_B); } /// <summary> /// Creates message arrays and initialises their values ready for inference to be performed. /// </summary> /// <remarks> /// This method should be called once each time inference is performed. Since the initialisation /// procedure normally dependson external values such as priors and array sizes, all external /// values must be set before calling this method. /// /// As well as initialising message arrays, this method also performs any message passing that /// the scheduler determines need only be carried out once. /// </remarks> public void Initialise() { this.vbool210_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool451_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool407_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool419_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool441_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool205_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool402_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool405_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool404_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool406_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool408_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool420_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool446_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool189_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool199_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool215_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool216_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool218_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool221_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool224_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool227_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool230_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool233_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool236_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool239_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool403_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool287_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool368_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool370_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool371_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool372_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool378_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool379_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool380_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool386_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool387_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool388_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool394_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool395_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool396_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool456_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool409_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool194_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool410_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool200_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool217_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool190_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool242_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool219_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool193_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool254_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool260_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool269_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool278_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool284_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool222_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool191_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool248_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool251_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool266_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool272_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool225_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool228_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool231_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool192_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool257_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool263_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool275_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool281_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool234_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool237_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool240_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool369_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool206_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool373_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool375_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool195_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool245_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool374_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool376_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool377_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool207_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool381_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool383_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool196_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool382_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool384_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool385_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool208_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool389_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool391_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool197_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool390_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool392_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool393_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool209_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool397_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool399_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool198_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool398_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool400_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool401_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool220_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool447_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool243_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool252_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool264_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool273_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool282_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool285_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool450_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool255_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool261_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool270_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool279_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool246_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool223_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool448_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool249_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool267_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool226_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool229_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool232_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool449_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool258_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool276_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool235_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool238_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool241_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool185_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool211_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool201_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool186_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool212_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool202_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool187_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool213_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool203_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool188_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool214_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool204_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool421_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool442_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool244_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool247_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool250_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool253_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool256_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool259_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool262_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool265_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool268_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool271_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool274_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool277_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool280_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool283_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool286_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool424_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool445_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool422_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool443_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool423_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool444_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool411_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool452_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool412_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool453_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool413_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool454_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool414_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool455_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool415_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool418_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool416_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool417_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(new Bernoulli()); this.vbool90_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli98); this.vbool72_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli80); this.vbool155_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli163); this.vbool67_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli75); this.vbool163_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli171); this.vbool181_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli189); this.vbool46_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli54); this.vbool145_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli153); this.vbool116_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli124); this.vbool2_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli10); this.vbool103_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli111); this.vbool15_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli23); this.vbool20_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli28); this.vbool111_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli119); this.vbool107_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli115); this.vbool110_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli118); this.vbool108_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli116); this.vbool109_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli117); this.vbool63_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli71); this.vbool141_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli149); this.vbool64_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli72); this.vbool142_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli150); this.vbool65_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli73); this.vbool143_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli151); this.vbool66_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli74); this.vbool144_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli152); this.vbool1_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli9); this.vbool41_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli49); this.vbool102_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli110); this.vbool115_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli123); this.vbool106_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli114); this.vbool112_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli120); this.vbool104_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli112); this.vbool113_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli121); this.vbool105_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli113); this.vbool114_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli122); this.vbool0_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli8); this.vbool42_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli50); this.vbool68_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli76); this.vbool16_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli24); this.vbool43_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli51); this.vbool69_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli77); this.vbool17_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli25); this.vbool44_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli52); this.vbool70_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli78); this.vbool18_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli26); this.vbool45_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli53); this.vbool71_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli79); this.vbool19_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli27); this.vbool180_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli188); this.vbool184_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli192); this.vbool182_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli190); this.vbool183_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli191); this.vbool11_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli19); this.vbool89_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli97); this.vbool37_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli45); this.vbool12_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli20); this.vbool91_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli99); this.vbool38_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli46); this.vbool13_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli21); this.vbool92_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli100); this.vbool39_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli47); this.vbool14_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli22); this.vbool93_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli101); this.vbool40_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli48); this.vbool159_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli167); this.vbool154_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli162); this.vbool162_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli170); this.vbool158_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli166); this.vbool160_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli168); this.vbool156_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli164); this.vbool161_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli169); this.vbool157_marginal_B = ArrayHelper.MakeUniform<Bernoulli>(vBernoulli165); } /// <summary> /// Performs one iteration of inference. /// </summary> /// <remarks> /// This method should be called multiple times, after calling Initialise(), in order to perform /// multiple iterations of message passing. You can call methods to retrieve posterior marginals /// at any time - the returned marginal will be the estimated marginal given the current state of /// the message passing algorithm. This can be useful for monitoring convergence of the algorithm. /// /// Where the scheduler has determined inference can be performed without iteration, this method /// does nothing. /// </remarks> public void Update() { // Message to 'vbool116_uses' from And factor this.vbool116_uses_B[2] = BooleanAndOp.BAverageConditional(this.vbool287_B, this.vbool111_uses_F[1]); // Message to 'vbool116_uses' from UsesEqualDef factor this.vbool116_uses_F[0] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool116_uses_B, this.vbool116_F, 0, this.vbool116_uses_F[0]); // Message to 'vbool116_uses' from UsesEqualDef factor this.vbool116_uses_F[1] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool116_uses_B, this.vbool116_F, 1, this.vbool116_uses_F[1]); // Message to 'vbool408_uses' from Or factor this.vbool408_uses_B[0] = BooleanOrOp.BAverageConditional(this.vbool409_B, this.vbool403_uses_F[0]); // Message to 'vbool408' from ReplicateWithMarginal factor this.vbool408_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool408_uses_B, this.vbool408_B); // Message to 'vbool407_uses' from Or factor this.vbool407_uses_B[0] = BooleanOrOp.BAverageConditional(this.vbool408_B, this.vbool406_uses_F[0]); // Message to 'vbool407' from ReplicateWithMarginal factor this.vbool407_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool407_uses_B, this.vbool407_B); // Message to 'vbool406_uses' from Or factor this.vbool406_uses_B[0] = BooleanOrOp.AAverageConditional(this.vbool408_B, this.vbool407_uses_F[0]); // Message to 'vbool406' from ReplicateWithMarginal factor this.vbool406_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool406_uses_B, this.vbool406_B); // Message to 'vbool405_uses' from And factor this.vbool405_uses_B[0] = BooleanAndOp.BAverageConditional(this.vbool406_B, this.vbool404_uses_F[0]); // Message to 'vbool405' from ReplicateWithMarginal factor this.vbool405_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool405_uses_B, this.vbool405_B); // Message to 'vbool67_uses' from AreEqual factor this.vbool67_uses_B[3] = BooleanAreEqualOp.AAverageConditional(this.vbool405_B, this.vbool116_uses_F[0]); // Message to 'vbool404_uses' from And factor this.vbool404_uses_B[0] = BooleanAndOp.AAverageConditional(this.vbool406_B, this.vbool405_uses_F[0]); // Message to 'vbool404' from ReplicateWithMarginal factor this.vbool404_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool404_uses_B, this.vbool404_B); // Message to 'vbool2_uses' from Not factor this.vbool2_uses_B[0] = BooleanNotOp.BAverageConditional(this.vbool404_B); // Message to 'vbool111_uses' from And factor this.vbool111_uses_B[1] = BooleanAndOp.AAverageConditional(this.vbool287_B, this.vbool116_uses_F[2]); // Message to 'vbool111_uses' from UsesEqualDef factor this.vbool111_uses_F[0] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool111_uses_B, this.vbool111_F, 0, this.vbool111_uses_F[0]); // Message to 'vbool111_uses' from UsesEqualDef factor this.vbool111_uses_F[2] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool111_uses_B, this.vbool111_F, 2, this.vbool111_uses_F[2]); // Message to 'vbool103_uses' from AreEqual factor this.vbool103_uses_B[1] = BooleanAreEqualOp.BAverageConditional(this.vbool194_B, this.vbool111_uses_F[2]); // Message to 'vbool103_uses' from UsesEqualDef factor this.vbool103_uses_F[0] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool103_uses_B, this.vbool103_F, 0, this.vbool103_uses_F[0]); // Message to 'vbool181_uses' from AreEqual factor this.vbool181_uses_B[2] = BooleanAreEqualOp.BAverageConditional(this.vbool446_B, this.vbool103_uses_F[0]); // Message to 'vbool181_uses' from UsesEqualDef factor this.vbool181_uses_F[0] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool181_uses_B, this.vbool181_F, 0, this.vbool181_uses_F[0]); // Message to 'vbool155_uses' from AreEqual factor this.vbool155_uses_B[2] = BooleanAreEqualOp.BAverageConditional(this.vbool441_B, this.vbool181_uses_F[0]); // Message to 'vbool155_uses' from UsesEqualDef factor this.vbool155_uses_F[0] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool155_uses_B, this.vbool155_F, 0, this.vbool155_uses_F[0]); // Message to 'vbool90_uses' from AreEqual factor this.vbool90_uses_B[1] = BooleanAreEqualOp.AAverageConditional(this.vbool451_B, this.vbool155_uses_F[0]); // Message to 'vbool90_uses' from UsesEqualDef factor this.vbool90_uses_F[0] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool90_uses_B, this.vbool90_F, 0, this.vbool90_uses_F[0]); // Message to 'vbool72_uses' from AreEqual factor this.vbool72_uses_B[0] = BooleanAreEqualOp.BAverageConditional(this.vbool210_B, this.vbool90_uses_F[0]); // Message to 'vbool72_uses' from UsesEqualDef factor this.vbool72_uses_F[1] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool72_uses_B, this.vbool72_F, 1, this.vbool72_uses_F[1]); // Message to 'vbool67_uses' from AreEqual factor this.vbool67_uses_B[0] = BooleanAreEqualOp.AAverageConditional(this.vbool407_B, this.vbool72_uses_F[1]); // Message to 'vbool67_uses' from UsesEqualDef factor this.vbool67_uses_F[1] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool67_uses_B, this.vbool67_F, 1, this.vbool67_uses_F[1]); // Message to 'vbool46_uses' from AreEqual factor this.vbool46_uses_B[0] = BooleanAreEqualOp.BAverageConditional(this.vbool205_B, this.vbool67_uses_F[1]); // Message to 'vbool46_uses' from UsesEqualDef factor this.vbool46_uses_F[1] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool46_uses_B, this.vbool46_F, 1, this.vbool46_uses_F[1]); // Message to 'vbool15_uses' from AreEqual factor this.vbool15_uses_B[0] = BooleanAreEqualOp.BAverageConditional(this.vbool189_B, this.vbool46_uses_F[1]); // Message to 'vbool15_uses' from UsesEqualDef factor this.vbool15_uses_F[1] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool15_uses_B, this.vbool15_F, 1, this.vbool15_uses_F[1]); // Message to 'vbool41_uses' from AreEqual factor this.vbool41_uses_B[0] = BooleanAreEqualOp.AAverageConditional(this.vbool410_B, this.vbool15_uses_F[1]); // Message to 'vbool41_uses' from UsesEqualDef factor this.vbool41_uses_F[1] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool41_uses_B, this.vbool41_F, 1, this.vbool41_uses_F[1]); // Message to 'vbool20_uses' from AreEqual factor this.vbool20_uses_B[1] = BooleanAreEqualOp.BAverageConditional(this.vbool200_B, this.vbool41_uses_F[1]); // Message to 'vbool20_uses' from UsesEqualDef factor this.vbool20_uses_F[0] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool20_uses_B, this.vbool20_F, 0, this.vbool20_uses_F[0]); // Message to 'vbool145_uses' from AreEqual factor this.vbool145_uses_B[1] = BooleanAreEqualOp.BAverageConditional(this.vbool199_B, this.vbool20_uses_F[0]); // Message to 'vbool67_uses' from UsesEqualDef factor this.vbool67_uses_F[2] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool67_uses_B, this.vbool67_F, 2, this.vbool67_uses_F[2]); // Message to 'vbool155_uses' from UsesEqualDef factor this.vbool155_uses_F[1] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool155_uses_B, this.vbool155_F, 1, this.vbool155_uses_F[1]); // Message to 'vbool163_uses' from AreEqual factor this.vbool163_uses_B[0] = BooleanAreEqualOp.AAverageConditional(this.vbool419_B, this.vbool155_uses_F[1]); // Message to 'vbool163_uses' from UsesEqualDef factor this.vbool163_uses_F[1] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool163_uses_B, this.vbool163_F, 1, this.vbool163_uses_F[1]); // Message to 'vbool181_uses' from AreEqual factor this.vbool181_uses_B[1] = BooleanAreEqualOp.AAverageConditional(this.vbool420_B, this.vbool163_uses_F[1]); // Message to 'vbool181_uses' from UsesEqualDef factor this.vbool181_uses_F[1] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool181_uses_B, this.vbool181_F, 1, this.vbool181_uses_F[1]); // Message to 'vbool163_uses' from AreEqual factor this.vbool163_uses_B[1] = BooleanAreEqualOp.BAverageConditional(this.vbool420_B, this.vbool181_uses_F[1]); // Message to 'vbool163_marginal' from UsesEqualDef factor this.vbool163_marginal_B = UsesEqualDefOp.MarginalAverageConditional<Bernoulli>(this.vbool163_uses_B, this.vbool163_F, this.vbool163_marginal_B); // Message to 'vbool420' from AreEqual factor this.vbool420_F = BooleanAreEqualOp.AreEqualAverageConditional(this.vbool181_uses_F[1], this.vbool163_uses_F[1]); // Message to 'vbool420_marginal' from ReplicateWithMarginal factor this.vbool420_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool420_uses_B, this.vbool420_F, this.vbool420_marginal_B); // Message to 'vbool163_uses' from UsesEqualDef factor this.vbool163_uses_F[0] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool163_uses_B, this.vbool163_F, 0, this.vbool163_uses_F[0]); // Message to 'vbool155_uses' from AreEqual factor this.vbool155_uses_B[1] = BooleanAreEqualOp.BAverageConditional(this.vbool419_B, this.vbool163_uses_F[0]); // Message to 'vbool419' from AreEqual factor this.vbool419_F = BooleanAreEqualOp.AreEqualAverageConditional(this.vbool163_uses_F[0], this.vbool155_uses_F[1]); // Message to 'vbool419_marginal' from ReplicateWithMarginal factor this.vbool419_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool419_uses_B, this.vbool419_F, this.vbool419_marginal_B); // Message to 'vbool155_uses' from UsesEqualDef factor this.vbool155_uses_F[2] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool155_uses_B, this.vbool155_F, 2, this.vbool155_uses_F[2]); // Message to 'vbool181_uses' from AreEqual factor this.vbool181_uses_B[0] = BooleanAreEqualOp.AAverageConditional(this.vbool441_B, this.vbool155_uses_F[2]); // Message to 'vbool181_marginal' from UsesEqualDef factor this.vbool181_marginal_B = UsesEqualDefOp.MarginalAverageConditional<Bernoulli>(this.vbool181_uses_B, this.vbool181_F, this.vbool181_marginal_B); // Message to 'vbool441' from AreEqual factor this.vbool441_F = BooleanAreEqualOp.AreEqualAverageConditional(this.vbool181_uses_F[0], this.vbool155_uses_F[2]); // Message to 'vbool441_marginal' from ReplicateWithMarginal factor this.vbool441_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool441_uses_B, this.vbool441_F, this.vbool441_marginal_B); // Message to 'vbool181_uses' from UsesEqualDef factor this.vbool181_uses_F[2] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool181_uses_B, this.vbool181_F, 2, this.vbool181_uses_F[2]); // Message to 'vbool103_uses' from AreEqual factor this.vbool103_uses_B[0] = BooleanAreEqualOp.AAverageConditional(this.vbool446_B, this.vbool181_uses_F[2]); // Message to 'vbool103_marginal' from UsesEqualDef factor this.vbool103_marginal_B = UsesEqualDefOp.MarginalAverageConditional<Bernoulli>(this.vbool103_uses_B, this.vbool103_F, this.vbool103_marginal_B); // Message to 'vbool446' from AreEqual factor this.vbool446_F = BooleanAreEqualOp.AreEqualAverageConditional(this.vbool103_uses_F[0], this.vbool181_uses_F[2]); // Message to 'vbool446_marginal' from ReplicateWithMarginal factor this.vbool446_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool446_uses_B, this.vbool446_F, this.vbool446_marginal_B); // Message to 'vbool103_uses' from UsesEqualDef factor this.vbool103_uses_F[1] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool103_uses_B, this.vbool103_F, 1, this.vbool103_uses_F[1]); // Message to 'vbool111_uses' from AreEqual factor this.vbool111_uses_B[2] = BooleanAreEqualOp.AAverageConditional(this.vbool194_B, this.vbool103_uses_F[1]); // Message to 'vbool194' from AreEqual factor this.vbool194_F = BooleanAreEqualOp.AreEqualAverageConditional(this.vbool111_uses_F[2], this.vbool103_uses_F[1]); // Message to 'vbool194_marginal' from ReplicateWithMarginal factor this.vbool194_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool194_uses_B, this.vbool194_F, this.vbool194_marginal_B); // Message to 'vbool111_uses' from UsesEqualDef factor this.vbool111_uses_F[1] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool111_uses_B, this.vbool111_F, 1, this.vbool111_uses_F[1]); // Message to 'vbool155_marginal' from UsesEqualDef factor this.vbool155_marginal_B = UsesEqualDefOp.MarginalAverageConditional<Bernoulli>(this.vbool155_uses_B, this.vbool155_F, this.vbool155_marginal_B); // Message to 'vbool111_marginal' from UsesEqualDef factor this.vbool111_marginal_B = UsesEqualDefOp.MarginalAverageConditional<Bernoulli>(this.vbool111_uses_B, this.vbool111_F, this.vbool111_marginal_B); // Message to 'vbool215' from And factor this.vbool215_F = BooleanAndOp.AndAverageConditional(this.vbool145_uses_F[2], this.vbool111_uses_F[0]); // Message to 'vbool215_uses' from ReplicateWithMarginal factor this.vbool215_uses_F[0] = ReplicateOp.UsesAverageConditional<Bernoulli>(this.vbool215_uses_B, this.vbool215_F, 0, this.vbool215_uses_F[0]); // Message to 'vbool216' from And factor this.vbool216_F = BooleanAndOp.AndAverageConditional(this.vbool145_uses_F[3], this.vbool116_uses_F[1]); // Message to 'vbool216_uses' from ReplicateWithMarginal factor this.vbool216_uses_F[0] = ReplicateOp.UsesAverageConditional<Bernoulli>(this.vbool216_uses_B, this.vbool216_F, 0, this.vbool216_uses_F[0]); // Message to 'vbool217' from Or factor this.vbool217_F = BooleanOrOp.OrAverageConditional(this.vbool216_uses_F[0], this.vbool215_uses_F[0]); // Message to 'vbool217_uses' from ReplicateWithMarginal factor this.vbool217_uses_F[0] = ReplicateOp.UsesAverageConditional<Bernoulli>(this.vbool217_uses_B, this.vbool217_F, 0, this.vbool217_uses_F[0]); // Message to 'vbool403_uses' from Or factor this.vbool403_uses_B[0] = BooleanOrOp.AAverageConditional(this.vbool409_B, this.vbool408_uses_F[0]); // Message to 'vbool403' from ReplicateWithMarginal factor this.vbool403_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool403_uses_B, this.vbool403_B); // Message to 'vbool402_uses' from And factor this.vbool402_uses_B[0] = BooleanAndOp.BAverageConditional(this.vbool403_B, this.vbool2_uses_F[1]); // Message to 'vbool402' from ReplicateWithMarginal factor this.vbool402_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool402_uses_B, this.vbool402_B); // Message to 'vbool145_uses' from AreEqual factor this.vbool145_uses_B[0] = BooleanAreEqualOp.BAverageConditional(this.vbool402_B, this.vbool67_uses_F[2]); // Message to 'vbool2_uses' from And factor this.vbool2_uses_B[1] = BooleanAndOp.AAverageConditional(this.vbool403_B, this.vbool402_uses_F[0]); // Message to 'vbool287' from And factor this.vbool287_F = BooleanAndOp.AndAverageConditional(this.vbool111_uses_F[1], this.vbool116_uses_F[2]); // Message to 'vbool287_marginal' from ReplicateWithMarginal factor this.vbool287_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool287_uses_B, this.vbool287_F, this.vbool287_marginal_B); // Message to 'vbool371_uses' from Or factor this.vbool371_uses_B[0] = BooleanOrOp.AAverageConditional(this.vbool377_B, this.vbool376_uses_F[0]); // Message to 'vbool371' from ReplicateWithMarginal factor this.vbool371_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool371_uses_B, this.vbool371_B); // Message to 'vbool2_uses' from And factor this.vbool2_uses_B[3] = BooleanAndOp.AAverageConditional(this.vbool371_B, this.vbool370_uses_F[0]); // Message to 'vbool370_uses' from And factor this.vbool370_uses_B[0] = BooleanAndOp.BAverageConditional(this.vbool371_B, this.vbool2_uses_F[3]); // Message to 'vbool370' from ReplicateWithMarginal factor this.vbool370_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool370_uses_B, this.vbool370_B); // Message to 'vbool379_uses' from Or factor this.vbool379_uses_B[0] = BooleanOrOp.AAverageConditional(this.vbool385_B, this.vbool384_uses_F[0]); // Message to 'vbool379' from ReplicateWithMarginal factor this.vbool379_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool379_uses_B, this.vbool379_B); // Message to 'vbool2_uses' from And factor this.vbool2_uses_B[5] = BooleanAndOp.AAverageConditional(this.vbool379_B, this.vbool378_uses_F[0]); // Message to 'vbool378_uses' from And factor this.vbool378_uses_B[0] = BooleanAndOp.BAverageConditional(this.vbool379_B, this.vbool2_uses_F[5]); // Message to 'vbool378' from ReplicateWithMarginal factor this.vbool378_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool378_uses_B, this.vbool378_B); // Message to 'vbool387_uses' from Or factor this.vbool387_uses_B[0] = BooleanOrOp.AAverageConditional(this.vbool393_B, this.vbool392_uses_F[0]); // Message to 'vbool387' from ReplicateWithMarginal factor this.vbool387_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool387_uses_B, this.vbool387_B); // Message to 'vbool2_uses' from And factor this.vbool2_uses_B[7] = BooleanAndOp.AAverageConditional(this.vbool387_B, this.vbool386_uses_F[0]); // Message to 'vbool386_uses' from And factor this.vbool386_uses_B[0] = BooleanAndOp.BAverageConditional(this.vbool387_B, this.vbool2_uses_F[7]); // Message to 'vbool386' from ReplicateWithMarginal factor this.vbool386_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool386_uses_B, this.vbool386_B); // Message to 'vbool395_uses' from Or factor this.vbool395_uses_B[0] = BooleanOrOp.AAverageConditional(this.vbool401_B, this.vbool400_uses_F[0]); // Message to 'vbool395' from ReplicateWithMarginal factor this.vbool395_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool395_uses_B, this.vbool395_B); // Message to 'vbool2_uses' from And factor this.vbool2_uses_B[9] = BooleanAndOp.AAverageConditional(this.vbool395_B, this.vbool394_uses_F[0]); // Message to 'vbool394_uses' from And factor this.vbool394_uses_B[0] = BooleanAndOp.BAverageConditional(this.vbool395_B, this.vbool2_uses_F[9]); // Message to 'vbool394' from ReplicateWithMarginal factor this.vbool394_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool394_uses_B, this.vbool394_B); // Message to 'vbool0_uses' from Or factor this.vbool0_uses_B[0] = BooleanOrOp.BAverageConditional(this.vbool369_B, this.vbool368_uses_F[0]); // Message to 'vbool0_marginal' from UsesEqualDef factor this.vbool0_marginal_B = UsesEqualDefOp.MarginalAverageConditional<Bernoulli>(this.vbool0_uses_B, this.vbool0_F, this.vbool0_marginal_B); // Message to 'vbool369' from Or factor this.vbool369_F = BooleanOrOp.OrAverageConditional(this.vbool368_uses_F[0], this.vbool0_uses_F[0]); // Message to 'vbool369_marginal' from ReplicateWithMarginal factor this.vbool369_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool369_uses_B, this.vbool369_F, this.vbool369_marginal_B); // Message to 'vbool376_uses' from Or factor this.vbool376_uses_B[0] = BooleanOrOp.BAverageConditional(this.vbool377_B, this.vbool371_uses_F[0]); // Message to 'vbool376' from ReplicateWithMarginal factor this.vbool376_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool376_uses_B, this.vbool376_B); // Message to 'vbool375_uses' from Or factor this.vbool375_uses_B[0] = BooleanOrOp.BAverageConditional(this.vbool376_B, this.vbool374_uses_F[0]); // Message to 'vbool375' from ReplicateWithMarginal factor this.vbool375_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool375_uses_B, this.vbool375_B); // Message to 'vbool374_uses' from Or factor this.vbool374_uses_B[0] = BooleanOrOp.AAverageConditional(this.vbool376_B, this.vbool375_uses_F[0]); // Message to 'vbool374' from ReplicateWithMarginal factor this.vbool374_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool374_uses_B, this.vbool374_B); // Message to 'vbool372_uses' from And factor this.vbool372_uses_B[0] = BooleanAndOp.AAverageConditional(this.vbool374_B, this.vbool373_uses_F[0]); // Message to 'vbool372' from ReplicateWithMarginal factor this.vbool372_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool372_uses_B, this.vbool372_B); // Message to 'vbool2_uses' from Not factor this.vbool2_uses_B[4] = BooleanNotOp.BAverageConditional(this.vbool372_B); // Message to 'vbool2_uses' from UsesEqualDef factor this.vbool2_uses_F[6] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool2_uses_B, this.vbool2_F, 6, this.vbool2_uses_F[6]); // Message to 'vbool380' from Not factor this.vbool380_F = BooleanNotOp.NotAverageConditional(this.vbool2_uses_F[6]); // Message to 'vbool380_uses' from ReplicateWithMarginal factor this.vbool380_uses_F[0] = ReplicateOp.UsesAverageConditional<Bernoulli>(this.vbool380_uses_B, this.vbool380_F, 0, this.vbool380_uses_F[0]); // Message to 'vbool2_uses' from UsesEqualDef factor this.vbool2_uses_F[8] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool2_uses_B, this.vbool2_F, 8, this.vbool2_uses_F[8]); // Message to 'vbool388' from Not factor this.vbool388_F = BooleanNotOp.NotAverageConditional(this.vbool2_uses_F[8]); // Message to 'vbool388_uses' from ReplicateWithMarginal factor this.vbool388_uses_F[0] = ReplicateOp.UsesAverageConditional<Bernoulli>(this.vbool388_uses_B, this.vbool388_F, 0, this.vbool388_uses_F[0]); // Message to 'vbool2_uses' from UsesEqualDef factor this.vbool2_uses_F[10] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool2_uses_B, this.vbool2_F, 10, this.vbool2_uses_F[10]); // Message to 'vbool396' from Not factor this.vbool396_F = BooleanNotOp.NotAverageConditional(this.vbool2_uses_F[10]); // Message to 'vbool396_uses' from ReplicateWithMarginal factor this.vbool396_uses_F[0] = ReplicateOp.UsesAverageConditional<Bernoulli>(this.vbool396_uses_B, this.vbool396_F, 0, this.vbool396_uses_F[0]); // Message to 'vbool373_uses' from And factor this.vbool373_uses_B[0] = BooleanAndOp.BAverageConditional(this.vbool374_B, this.vbool372_uses_F[0]); // Message to 'vbool373' from ReplicateWithMarginal factor this.vbool373_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool373_uses_B, this.vbool373_B); // Message to 'vbool382' from And factor this.vbool382_F = BooleanAndOp.AndAverageConditional(this.vbool380_uses_F[0], this.vbool381_uses_F[0]); // Message to 'vbool382_uses' from ReplicateWithMarginal factor this.vbool382_uses_F[0] = ReplicateOp.UsesAverageConditional<Bernoulli>(this.vbool382_uses_B, this.vbool382_F, 0, this.vbool382_uses_F[0]); // Message to 'vbool384_uses' from Or factor this.vbool384_uses_B[0] = BooleanOrOp.BAverageConditional(this.vbool385_B, this.vbool379_uses_F[0]); // Message to 'vbool384' from ReplicateWithMarginal factor this.vbool384_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool384_uses_B, this.vbool384_B); // Message to 'vbool383_uses' from Or factor this.vbool383_uses_B[0] = BooleanOrOp.BAverageConditional(this.vbool384_B, this.vbool382_uses_F[0]); // Message to 'vbool383' from ReplicateWithMarginal factor this.vbool383_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool383_uses_B, this.vbool383_B); // Message to 'vbool382_uses' from Or factor this.vbool382_uses_B[0] = BooleanOrOp.AAverageConditional(this.vbool384_B, this.vbool383_uses_F[0]); // Message to 'vbool382_marginal' from ReplicateWithMarginal factor this.vbool382_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool382_uses_B, this.vbool382_F, this.vbool382_marginal_B); // Message to 'vbool382' from ReplicateWithMarginal factor this.vbool382_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool382_uses_B, this.vbool382_B); // Message to 'vbool381_uses' from And factor this.vbool381_uses_B[0] = BooleanAndOp.BAverageConditional(this.vbool382_B, this.vbool380_uses_F[0]); // Message to 'vbool381' from ReplicateWithMarginal factor this.vbool381_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool381_uses_B, this.vbool381_B); // Message to 'vbool380_uses' from And factor this.vbool380_uses_B[0] = BooleanAndOp.AAverageConditional(this.vbool382_B, this.vbool381_uses_F[0]); // Message to 'vbool380_marginal' from ReplicateWithMarginal factor this.vbool380_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool380_uses_B, this.vbool380_F, this.vbool380_marginal_B); // Message to 'vbool380' from ReplicateWithMarginal factor this.vbool380_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool380_uses_B, this.vbool380_B); // Message to 'vbool2_uses' from Not factor this.vbool2_uses_B[6] = BooleanNotOp.BAverageConditional(this.vbool380_B); // Message to 'vbool2_uses' from UsesEqualDef factor this.vbool2_uses_F[1] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool2_uses_B, this.vbool2_F, 1, this.vbool2_uses_F[1]); // Message to 'vbool2_uses' from UsesEqualDef factor this.vbool2_uses_F[0] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool2_uses_B, this.vbool2_F, 0, this.vbool2_uses_F[0]); // Message to 'vbool404' from Not factor this.vbool404_F = BooleanNotOp.NotAverageConditional(this.vbool2_uses_F[0]); // Message to 'vbool404_marginal' from ReplicateWithMarginal factor this.vbool404_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool404_uses_B, this.vbool404_F, this.vbool404_marginal_B); // Message to 'vbool404_uses' from ReplicateWithMarginal factor this.vbool404_uses_F[0] = ReplicateOp.UsesAverageConditional<Bernoulli>(this.vbool404_uses_B, this.vbool404_F, 0, this.vbool404_uses_F[0]); // Message to 'vbool2_uses' from UsesEqualDef factor this.vbool2_uses_F[2] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool2_uses_B, this.vbool2_F, 2, this.vbool2_uses_F[2]); // Message to 'vbool368' from Not factor this.vbool368_F = BooleanNotOp.NotAverageConditional(this.vbool2_uses_F[2]); // Message to 'vbool368_marginal' from ReplicateWithMarginal factor this.vbool368_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool368_uses_B, this.vbool368_F, this.vbool368_marginal_B); // Message to 'vbool368_uses' from ReplicateWithMarginal factor this.vbool368_uses_F[0] = ReplicateOp.UsesAverageConditional<Bernoulli>(this.vbool368_uses_B, this.vbool368_F, 0, this.vbool368_uses_F[0]); // Message to 'vbool2_uses' from UsesEqualDef factor this.vbool2_uses_F[3] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool2_uses_B, this.vbool2_F, 3, this.vbool2_uses_F[3]); // Message to 'vbool2_uses' from UsesEqualDef factor this.vbool2_uses_F[4] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool2_uses_B, this.vbool2_F, 4, this.vbool2_uses_F[4]); // Message to 'vbool372' from Not factor this.vbool372_F = BooleanNotOp.NotAverageConditional(this.vbool2_uses_F[4]); // Message to 'vbool372_marginal' from ReplicateWithMarginal factor this.vbool372_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool372_uses_B, this.vbool372_F, this.vbool372_marginal_B); // Message to 'vbool372_uses' from ReplicateWithMarginal factor this.vbool372_uses_F[0] = ReplicateOp.UsesAverageConditional<Bernoulli>(this.vbool372_uses_B, this.vbool372_F, 0, this.vbool372_uses_F[0]); // Message to 'vbool2_uses' from UsesEqualDef factor this.vbool2_uses_F[5] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool2_uses_B, this.vbool2_F, 5, this.vbool2_uses_F[5]); // Message to 'vbool2_uses' from UsesEqualDef factor this.vbool2_uses_F[7] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool2_uses_B, this.vbool2_F, 7, this.vbool2_uses_F[7]); // Message to 'vbool2_uses' from UsesEqualDef factor this.vbool2_uses_F[9] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool2_uses_B, this.vbool2_F, 9, this.vbool2_uses_F[9]); // Message to 'vbool2_uses' from UsesEqualDef factor this.vbool2_uses_F[11] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool2_uses_B, this.vbool2_F, 11, this.vbool2_uses_F[11]); // Message to 'vbool1_uses' from AreEqual factor this.vbool1_uses_B[0] = BooleanAreEqualOp.BAverageConditional(this.vbool456_B, this.vbool2_uses_F[11]); // Message to 'vbool1_marginal' from UsesEqualDef factor this.vbool1_marginal_B = UsesEqualDefOp.MarginalAverageConditional<Bernoulli>(this.vbool1_uses_B, this.vbool1_F, this.vbool1_marginal_B); // Message to 'vbool456' from AreEqual factor this.vbool456_F = BooleanAreEqualOp.AreEqualAverageConditional(this.vbool2_uses_F[11], this.vbool1_uses_F[0]); // Message to 'vbool456_marginal' from ReplicateWithMarginal factor this.vbool456_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool456_uses_B, this.vbool456_F, this.vbool456_marginal_B); // Message to 'vbool2_marginal' from UsesEqualDef factor this.vbool2_marginal_B = UsesEqualDefOp.MarginalAverageConditional<Bernoulli>(this.vbool2_uses_B, this.vbool2_F, this.vbool2_marginal_B); // Message to 'vbool406' from And factor this.vbool406_F = BooleanAndOp.AndAverageConditional(this.vbool404_uses_F[0], this.vbool405_uses_F[0]); // Message to 'vbool406_marginal' from ReplicateWithMarginal factor this.vbool406_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool406_uses_B, this.vbool406_F, this.vbool406_marginal_B); // Message to 'vbool406_uses' from ReplicateWithMarginal factor this.vbool406_uses_F[0] = ReplicateOp.UsesAverageConditional<Bernoulli>(this.vbool406_uses_B, this.vbool406_F, 0, this.vbool406_uses_F[0]); // Message to 'vbool408' from Or factor this.vbool408_F = BooleanOrOp.OrAverageConditional(this.vbool406_uses_F[0], this.vbool407_uses_F[0]); // Message to 'vbool408_marginal' from ReplicateWithMarginal factor this.vbool408_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool408_uses_B, this.vbool408_F, this.vbool408_marginal_B); // Message to 'vbool408_uses' from ReplicateWithMarginal factor this.vbool408_uses_F[0] = ReplicateOp.UsesAverageConditional<Bernoulli>(this.vbool408_uses_B, this.vbool408_F, 0, this.vbool408_uses_F[0]); // Message to 'vbool403' from And factor this.vbool403_F = BooleanAndOp.AndAverageConditional(this.vbool2_uses_F[1], this.vbool402_uses_F[0]); // Message to 'vbool403_marginal' from ReplicateWithMarginal factor this.vbool403_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool403_uses_B, this.vbool403_F, this.vbool403_marginal_B); // Message to 'vbool403_uses' from ReplicateWithMarginal factor this.vbool403_uses_F[0] = ReplicateOp.UsesAverageConditional<Bernoulli>(this.vbool403_uses_B, this.vbool403_F, 0, this.vbool403_uses_F[0]); // Message to 'vbool409' from Or factor this.vbool409_F = BooleanOrOp.OrAverageConditional(this.vbool403_uses_F[0], this.vbool408_uses_F[0]); // Message to 'vbool409_marginal' from ReplicateWithMarginal factor this.vbool409_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool409_uses_B, this.vbool409_F, this.vbool409_marginal_B); // Message to 'vbool371' from And factor this.vbool371_F = BooleanAndOp.AndAverageConditional(this.vbool2_uses_F[3], this.vbool370_uses_F[0]); // Message to 'vbool371_marginal' from ReplicateWithMarginal factor this.vbool371_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool371_uses_B, this.vbool371_F, this.vbool371_marginal_B); // Message to 'vbool371_uses' from ReplicateWithMarginal factor this.vbool371_uses_F[0] = ReplicateOp.UsesAverageConditional<Bernoulli>(this.vbool371_uses_B, this.vbool371_F, 0, this.vbool371_uses_F[0]); // Message to 'vbool379' from And factor this.vbool379_F = BooleanAndOp.AndAverageConditional(this.vbool2_uses_F[5], this.vbool378_uses_F[0]); // Message to 'vbool379_marginal' from ReplicateWithMarginal factor this.vbool379_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool379_uses_B, this.vbool379_F, this.vbool379_marginal_B); // Message to 'vbool379_uses' from ReplicateWithMarginal factor this.vbool379_uses_F[0] = ReplicateOp.UsesAverageConditional<Bernoulli>(this.vbool379_uses_B, this.vbool379_F, 0, this.vbool379_uses_F[0]); // Message to 'vbool387' from And factor this.vbool387_F = BooleanAndOp.AndAverageConditional(this.vbool2_uses_F[7], this.vbool386_uses_F[0]); // Message to 'vbool387_marginal' from ReplicateWithMarginal factor this.vbool387_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool387_uses_B, this.vbool387_F, this.vbool387_marginal_B); // Message to 'vbool387_uses' from ReplicateWithMarginal factor this.vbool387_uses_F[0] = ReplicateOp.UsesAverageConditional<Bernoulli>(this.vbool387_uses_B, this.vbool387_F, 0, this.vbool387_uses_F[0]); // Message to 'vbool392_uses' from Or factor this.vbool392_uses_B[0] = BooleanOrOp.BAverageConditional(this.vbool393_B, this.vbool387_uses_F[0]); // Message to 'vbool392' from ReplicateWithMarginal factor this.vbool392_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool392_uses_B, this.vbool392_B); // Message to 'vbool395' from And factor this.vbool395_F = BooleanAndOp.AndAverageConditional(this.vbool2_uses_F[9], this.vbool394_uses_F[0]); // Message to 'vbool395_marginal' from ReplicateWithMarginal factor this.vbool395_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool395_uses_B, this.vbool395_F, this.vbool395_marginal_B); // Message to 'vbool395_uses' from ReplicateWithMarginal factor this.vbool395_uses_F[0] = ReplicateOp.UsesAverageConditional<Bernoulli>(this.vbool395_uses_B, this.vbool395_F, 0, this.vbool395_uses_F[0]); // Message to 'vbool400_uses' from Or factor this.vbool400_uses_B[0] = BooleanOrOp.BAverageConditional(this.vbool401_B, this.vbool395_uses_F[0]); // Message to 'vbool400' from ReplicateWithMarginal factor this.vbool400_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool400_uses_B, this.vbool400_B); // Message to 'vbool374' from And factor this.vbool374_F = BooleanAndOp.AndAverageConditional(this.vbool372_uses_F[0], this.vbool373_uses_F[0]); // Message to 'vbool374_marginal' from ReplicateWithMarginal factor this.vbool374_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool374_uses_B, this.vbool374_F, this.vbool374_marginal_B); // Message to 'vbool374_uses' from ReplicateWithMarginal factor this.vbool374_uses_F[0] = ReplicateOp.UsesAverageConditional<Bernoulli>(this.vbool374_uses_B, this.vbool374_F, 0, this.vbool374_uses_F[0]); // Message to 'vbool376' from Or factor this.vbool376_F = BooleanOrOp.OrAverageConditional(this.vbool374_uses_F[0], this.vbool375_uses_F[0]); // Message to 'vbool376_marginal' from ReplicateWithMarginal factor this.vbool376_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool376_uses_B, this.vbool376_F, this.vbool376_marginal_B); // Message to 'vbool376_uses' from ReplicateWithMarginal factor this.vbool376_uses_F[0] = ReplicateOp.UsesAverageConditional<Bernoulli>(this.vbool376_uses_B, this.vbool376_F, 0, this.vbool376_uses_F[0]); // Message to 'vbool377' from Or factor this.vbool377_F = BooleanOrOp.OrAverageConditional(this.vbool371_uses_F[0], this.vbool376_uses_F[0]); // Message to 'vbool377_marginal' from ReplicateWithMarginal factor this.vbool377_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool377_uses_B, this.vbool377_F, this.vbool377_marginal_B); // Message to 'vbool384' from Or factor this.vbool384_F = BooleanOrOp.OrAverageConditional(this.vbool382_uses_F[0], this.vbool383_uses_F[0]); // Message to 'vbool384_marginal' from ReplicateWithMarginal factor this.vbool384_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool384_uses_B, this.vbool384_F, this.vbool384_marginal_B); // Message to 'vbool384_uses' from ReplicateWithMarginal factor this.vbool384_uses_F[0] = ReplicateOp.UsesAverageConditional<Bernoulli>(this.vbool384_uses_B, this.vbool384_F, 0, this.vbool384_uses_F[0]); // Message to 'vbool385' from Or factor this.vbool385_F = BooleanOrOp.OrAverageConditional(this.vbool379_uses_F[0], this.vbool384_uses_F[0]); // Message to 'vbool385_marginal' from ReplicateWithMarginal factor this.vbool385_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool385_uses_B, this.vbool385_F, this.vbool385_marginal_B); // Message to 'vbool391_uses' from Or factor this.vbool391_uses_B[0] = BooleanOrOp.BAverageConditional(this.vbool392_B, this.vbool390_uses_F[0]); // Message to 'vbool391' from ReplicateWithMarginal factor this.vbool391_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool391_uses_B, this.vbool391_B); // Message to 'vbool390_uses' from Or factor this.vbool390_uses_B[0] = BooleanOrOp.AAverageConditional(this.vbool392_B, this.vbool391_uses_F[0]); // Message to 'vbool390' from ReplicateWithMarginal factor this.vbool390_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool390_uses_B, this.vbool390_B); // Message to 'vbool389_uses' from And factor this.vbool389_uses_B[0] = BooleanAndOp.BAverageConditional(this.vbool390_B, this.vbool388_uses_F[0]); // Message to 'vbool389' from ReplicateWithMarginal factor this.vbool389_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool389_uses_B, this.vbool389_B); // Message to 'vbool388_uses' from And factor this.vbool388_uses_B[0] = BooleanAndOp.AAverageConditional(this.vbool390_B, this.vbool389_uses_F[0]); // Message to 'vbool388_marginal' from ReplicateWithMarginal factor this.vbool388_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool388_uses_B, this.vbool388_F, this.vbool388_marginal_B); // Message to 'vbool388' from ReplicateWithMarginal factor this.vbool388_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool388_uses_B, this.vbool388_B); // Message to 'vbool2_uses' from Not factor this.vbool2_uses_B[8] = BooleanNotOp.BAverageConditional(this.vbool388_B); // Message to 'vbool390' from And factor this.vbool390_F = BooleanAndOp.AndAverageConditional(this.vbool388_uses_F[0], this.vbool389_uses_F[0]); // Message to 'vbool390_marginal' from ReplicateWithMarginal factor this.vbool390_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool390_uses_B, this.vbool390_F, this.vbool390_marginal_B); // Message to 'vbool390_uses' from ReplicateWithMarginal factor this.vbool390_uses_F[0] = ReplicateOp.UsesAverageConditional<Bernoulli>(this.vbool390_uses_B, this.vbool390_F, 0, this.vbool390_uses_F[0]); // Message to 'vbool392' from Or factor this.vbool392_F = BooleanOrOp.OrAverageConditional(this.vbool390_uses_F[0], this.vbool391_uses_F[0]); // Message to 'vbool392_marginal' from ReplicateWithMarginal factor this.vbool392_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool392_uses_B, this.vbool392_F, this.vbool392_marginal_B); // Message to 'vbool392_uses' from ReplicateWithMarginal factor this.vbool392_uses_F[0] = ReplicateOp.UsesAverageConditional<Bernoulli>(this.vbool392_uses_B, this.vbool392_F, 0, this.vbool392_uses_F[0]); // Message to 'vbool393' from Or factor this.vbool393_F = BooleanOrOp.OrAverageConditional(this.vbool387_uses_F[0], this.vbool392_uses_F[0]); // Message to 'vbool393_marginal' from ReplicateWithMarginal factor this.vbool393_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool393_uses_B, this.vbool393_F, this.vbool393_marginal_B); // Message to 'vbool399_uses' from Or factor this.vbool399_uses_B[0] = BooleanOrOp.BAverageConditional(this.vbool400_B, this.vbool398_uses_F[0]); // Message to 'vbool399' from ReplicateWithMarginal factor this.vbool399_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool399_uses_B, this.vbool399_B); // Message to 'vbool398_uses' from Or factor this.vbool398_uses_B[0] = BooleanOrOp.AAverageConditional(this.vbool400_B, this.vbool399_uses_F[0]); // Message to 'vbool398' from ReplicateWithMarginal factor this.vbool398_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool398_uses_B, this.vbool398_B); // Message to 'vbool397_uses' from And factor this.vbool397_uses_B[0] = BooleanAndOp.BAverageConditional(this.vbool398_B, this.vbool396_uses_F[0]); // Message to 'vbool397' from ReplicateWithMarginal factor this.vbool397_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool397_uses_B, this.vbool397_B); // Message to 'vbool396_uses' from And factor this.vbool396_uses_B[0] = BooleanAndOp.AAverageConditional(this.vbool398_B, this.vbool397_uses_F[0]); // Message to 'vbool396_marginal' from ReplicateWithMarginal factor this.vbool396_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool396_uses_B, this.vbool396_F, this.vbool396_marginal_B); // Message to 'vbool396' from ReplicateWithMarginal factor this.vbool396_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool396_uses_B, this.vbool396_B); // Message to 'vbool2_uses' from Not factor this.vbool2_uses_B[10] = BooleanNotOp.BAverageConditional(this.vbool396_B); // Message to 'vbool398' from And factor this.vbool398_F = BooleanAndOp.AndAverageConditional(this.vbool396_uses_F[0], this.vbool397_uses_F[0]); // Message to 'vbool398_marginal' from ReplicateWithMarginal factor this.vbool398_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool398_uses_B, this.vbool398_F, this.vbool398_marginal_B); // Message to 'vbool398_uses' from ReplicateWithMarginal factor this.vbool398_uses_F[0] = ReplicateOp.UsesAverageConditional<Bernoulli>(this.vbool398_uses_B, this.vbool398_F, 0, this.vbool398_uses_F[0]); // Message to 'vbool400' from Or factor this.vbool400_F = BooleanOrOp.OrAverageConditional(this.vbool398_uses_F[0], this.vbool399_uses_F[0]); // Message to 'vbool400_marginal' from ReplicateWithMarginal factor this.vbool400_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool400_uses_B, this.vbool400_F, this.vbool400_marginal_B); // Message to 'vbool400_uses' from ReplicateWithMarginal factor this.vbool400_uses_F[0] = ReplicateOp.UsesAverageConditional<Bernoulli>(this.vbool400_uses_B, this.vbool400_F, 0, this.vbool400_uses_F[0]); // Message to 'vbool401' from Or factor this.vbool401_F = BooleanOrOp.OrAverageConditional(this.vbool395_uses_F[0], this.vbool400_uses_F[0]); // Message to 'vbool401_marginal' from ReplicateWithMarginal factor this.vbool401_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool401_uses_B, this.vbool401_F, this.vbool401_marginal_B); // Message to 'vbool220' from Or factor this.vbool220_F = BooleanOrOp.OrAverageConditional(this.vbool219_uses_F[0], this.vbool217_uses_F[0]); // Message to 'vbool220_uses' from ReplicateWithMarginal factor this.vbool220_uses_F[0] = ReplicateOp.UsesAverageConditional<Bernoulli>(this.vbool220_uses_B, this.vbool220_F, 0, this.vbool220_uses_F[0]); // Message to 'vbool285_uses' from Or factor this.vbool285_uses_B[0] = BooleanOrOp.AAverageConditional(this.vbool286_B, this.vbool283_uses_F[0]); // Message to 'vbool285' from ReplicateWithMarginal factor this.vbool285_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool285_uses_B, this.vbool285_B); // Message to 'vbool115_uses' from And factor this.vbool115_uses_B[10] = BooleanAndOp.BAverageConditional(this.vbool285_B, this.vbool284_uses_F[0]); // Message to 'vbool284_uses' from And factor this.vbool284_uses_B[0] = BooleanAndOp.AAverageConditional(this.vbool285_B, this.vbool115_uses_F[10]); // Message to 'vbool284' from ReplicateWithMarginal factor this.vbool284_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool284_uses_B, this.vbool284_B); // Message to 'vbool110_uses' from And factor this.vbool110_uses_B[8] = BooleanAndOp.BAverageConditional(this.vbool284_B, this.vbool144_uses_F[1]); // Message to 'vbool144_uses' from And factor this.vbool144_uses_B[1] = BooleanAndOp.AAverageConditional(this.vbool284_B, this.vbool110_uses_F[8]); // Message to 'vbool144_uses' from UsesEqualDef factor this.vbool144_uses_F[0] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool144_uses_B, this.vbool144_F, 0, this.vbool144_uses_F[0]); // Message to 'vbool66_uses' from AreEqual factor this.vbool66_uses_B[0] = BooleanAreEqualOp.AAverageConditional(this.vbool394_B, this.vbool144_uses_F[0]); // Message to 'vbool144_uses' from UsesEqualDef factor this.vbool144_uses_F[2] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool144_uses_B, this.vbool144_F, 2, this.vbool144_uses_F[2]); // Message to 'vbool19_uses' from AreEqual factor this.vbool19_uses_B[0] = BooleanAreEqualOp.AAverageConditional(this.vbool198_B, this.vbool144_uses_F[2]); // Message to 'vbool19_uses' from UsesEqualDef factor this.vbool19_uses_F[1] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool19_uses_B, this.vbool19_F, 1, this.vbool19_uses_F[1]); // Message to 'vbool40_uses' from AreEqual factor this.vbool40_uses_B[0] = BooleanAreEqualOp.AAverageConditional(this.vbool204_B, this.vbool19_uses_F[1]); // Message to 'vbool40_uses' from UsesEqualDef factor this.vbool40_uses_F[1] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool40_uses_B, this.vbool40_F, 1, this.vbool40_uses_F[1]); // Message to 'vbool14_uses' from AreEqual factor this.vbool14_uses_B[1] = BooleanAreEqualOp.BAverageConditional(this.vbool414_B, this.vbool40_uses_F[1]); // Message to 'vbool14_uses' from UsesEqualDef factor this.vbool14_uses_F[0] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool14_uses_B, this.vbool14_F, 0, this.vbool14_uses_F[0]); // Message to 'vbool45_uses' from AreEqual factor this.vbool45_uses_B[1] = BooleanAreEqualOp.AAverageConditional(this.vbool188_B, this.vbool14_uses_F[0]); // Message to 'vbool45_uses' from UsesEqualDef factor this.vbool45_uses_F[0] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool45_uses_B, this.vbool45_F, 0, this.vbool45_uses_F[0]); // Message to 'vbool66_uses' from AreEqual factor this.vbool66_uses_B[1] = BooleanAreEqualOp.AAverageConditional(this.vbool209_B, this.vbool45_uses_F[0]); // Message to 'vbool66_uses' from UsesEqualDef factor this.vbool66_uses_F[2] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool66_uses_B, this.vbool66_F, 2, this.vbool66_uses_F[2]); // Message to 'vbool115_uses' from AreEqual factor this.vbool115_uses_B[4] = BooleanAreEqualOp.BAverageConditional(this.vbool397_B, this.vbool66_uses_F[2]); // Message to 'vbool66_uses' from UsesEqualDef factor this.vbool66_uses_F[3] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool66_uses_B, this.vbool66_F, 3, this.vbool66_uses_F[3]); // Message to 'vbool71_uses' from AreEqual factor this.vbool71_uses_B[0] = BooleanAreEqualOp.BAverageConditional(this.vbool399_B, this.vbool66_uses_F[3]); // Message to 'vbool71_uses' from UsesEqualDef factor this.vbool71_uses_F[1] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool71_uses_B, this.vbool71_F, 1, this.vbool71_uses_F[1]); // Message to 'vbool93_uses' from AreEqual factor this.vbool93_uses_B[0] = BooleanAreEqualOp.AAverageConditional(this.vbool214_B, this.vbool71_uses_F[1]); // Message to 'vbool93_uses' from UsesEqualDef factor this.vbool93_uses_F[1] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool93_uses_B, this.vbool93_F, 1, this.vbool93_uses_F[1]); // Message to 'vbool158_uses' from AreEqual factor this.vbool158_uses_B[1] = BooleanAreEqualOp.BAverageConditional(this.vbool455_B, this.vbool93_uses_F[1]); // Message to 'vbool158_uses' from UsesEqualDef factor this.vbool158_uses_F[0] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool158_uses_B, this.vbool158_F, 0, this.vbool158_uses_F[0]); // Message to 'vbool184_uses' from AreEqual factor this.vbool184_uses_B[2] = BooleanAreEqualOp.AAverageConditional(this.vbool445_B, this.vbool158_uses_F[0]); // Message to 'vbool184_uses' from UsesEqualDef factor this.vbool184_uses_F[0] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool184_uses_B, this.vbool184_F, 0, this.vbool184_uses_F[0]); // Message to 'vbool106_uses' from AreEqual factor this.vbool106_uses_B[1] = BooleanAreEqualOp.AAverageConditional(this.vbool450_B, this.vbool184_uses_F[0]); // Message to 'vbool106_uses' from UsesEqualDef factor this.vbool106_uses_F[0] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool106_uses_B, this.vbool106_F, 0, this.vbool106_uses_F[0]); // Message to 'vbool110_uses' from AreEqual factor this.vbool110_uses_B[3] = BooleanAreEqualOp.AAverageConditional(this.vbool193_B, this.vbool106_uses_F[0]); // Message to 'vbool184_uses' from UsesEqualDef factor this.vbool184_uses_F[1] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool184_uses_B, this.vbool184_F, 1, this.vbool184_uses_F[1]); // Message to 'vbool162_uses' from AreEqual factor this.vbool162_uses_B[0] = BooleanAreEqualOp.BAverageConditional(this.vbool424_B, this.vbool184_uses_F[1]); // Message to 'vbool162_uses' from UsesEqualDef factor this.vbool162_uses_F[1] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool162_uses_B, this.vbool162_F, 1, this.vbool162_uses_F[1]); // Message to 'vbool158_uses' from AreEqual factor this.vbool158_uses_B[2] = BooleanAreEqualOp.BAverageConditional(this.vbool418_B, this.vbool162_uses_F[1]); // Message to 'vbool158_uses' from UsesEqualDef factor this.vbool158_uses_F[1] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool158_uses_B, this.vbool158_F, 1, this.vbool158_uses_F[1]); // Message to 'vbool93_uses' from AreEqual factor this.vbool93_uses_B[1] = BooleanAreEqualOp.AAverageConditional(this.vbool455_B, this.vbool158_uses_F[1]); // Message to 'vbool93_marginal' from UsesEqualDef factor this.vbool93_marginal_B = UsesEqualDefOp.MarginalAverageConditional<Bernoulli>(this.vbool93_uses_B, this.vbool93_F, this.vbool93_marginal_B); // Message to 'vbool455' from AreEqual factor this.vbool455_F = BooleanAreEqualOp.AreEqualAverageConditional(this.vbool93_uses_F[1], this.vbool158_uses_F[1]); // Message to 'vbool455_marginal' from ReplicateWithMarginal factor this.vbool455_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool455_uses_B, this.vbool455_F, this.vbool455_marginal_B); // Message to 'vbool93_uses' from UsesEqualDef factor this.vbool93_uses_F[0] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool93_uses_B, this.vbool93_F, 0, this.vbool93_uses_F[0]); // Message to 'vbool71_uses' from AreEqual factor this.vbool71_uses_B[1] = BooleanAreEqualOp.BAverageConditional(this.vbool214_B, this.vbool93_uses_F[0]); // Message to 'vbool71_marginal' from UsesEqualDef factor this.vbool71_marginal_B = UsesEqualDefOp.MarginalAverageConditional<Bernoulli>(this.vbool71_uses_B, this.vbool71_F, this.vbool71_marginal_B); // Message to 'vbool214' from AreEqual factor this.vbool214_F = BooleanAreEqualOp.AreEqualAverageConditional(this.vbool93_uses_F[0], this.vbool71_uses_F[1]); // Message to 'vbool214_marginal' from ReplicateWithMarginal factor this.vbool214_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool214_uses_B, this.vbool214_F, this.vbool214_marginal_B); // Message to 'vbool71_uses' from UsesEqualDef factor this.vbool71_uses_F[0] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool71_uses_B, this.vbool71_F, 0, this.vbool71_uses_F[0]); // Message to 'vbool66_uses' from AreEqual factor this.vbool66_uses_B[3] = BooleanAreEqualOp.AAverageConditional(this.vbool399_B, this.vbool71_uses_F[0]); // Message to 'vbool399' from AreEqual factor this.vbool399_F = BooleanAreEqualOp.AreEqualAverageConditional(this.vbool66_uses_F[3], this.vbool71_uses_F[0]); // Message to 'vbool399_marginal' from ReplicateWithMarginal factor this.vbool399_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool399_uses_B, this.vbool399_F, this.vbool399_marginal_B); // Message to 'vbool399_uses' from ReplicateWithMarginal factor this.vbool399_uses_F[0] = ReplicateOp.UsesAverageConditional<Bernoulli>(this.vbool399_uses_B, this.vbool399_F, 0, this.vbool399_uses_F[0]); // Message to 'vbool66_uses' from UsesEqualDef factor this.vbool66_uses_F[0] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool66_uses_B, this.vbool66_F, 0, this.vbool66_uses_F[0]); // Message to 'vbool144_uses' from AreEqual factor this.vbool144_uses_B[0] = BooleanAreEqualOp.BAverageConditional(this.vbool394_B, this.vbool66_uses_F[0]); // Message to 'vbool394' from AreEqual factor this.vbool394_F = BooleanAreEqualOp.AreEqualAverageConditional(this.vbool66_uses_F[0], this.vbool144_uses_F[0]); // Message to 'vbool394_marginal' from ReplicateWithMarginal factor this.vbool394_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool394_uses_B, this.vbool394_F, this.vbool394_marginal_B); // Message to 'vbool394_uses' from ReplicateWithMarginal factor this.vbool394_uses_F[0] = ReplicateOp.UsesAverageConditional<Bernoulli>(this.vbool394_uses_B, this.vbool394_F, 0, this.vbool394_uses_F[0]); // Message to 'vbool66_uses' from UsesEqualDef factor this.vbool66_uses_F[1] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool66_uses_B, this.vbool66_F, 1, this.vbool66_uses_F[1]); // Message to 'vbool45_uses' from AreEqual factor this.vbool45_uses_B[0] = BooleanAreEqualOp.BAverageConditional(this.vbool209_B, this.vbool66_uses_F[1]); // Message to 'vbool45_marginal' from UsesEqualDef factor this.vbool45_marginal_B = UsesEqualDefOp.MarginalAverageConditional<Bernoulli>(this.vbool45_uses_B, this.vbool45_F, this.vbool45_marginal_B); // Message to 'vbool209' from AreEqual factor this.vbool209_F = BooleanAreEqualOp.AreEqualAverageConditional(this.vbool66_uses_F[1], this.vbool45_uses_F[0]); // Message to 'vbool209_marginal' from ReplicateWithMarginal factor this.vbool209_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool209_uses_B, this.vbool209_F, this.vbool209_marginal_B); // Message to 'vbool45_uses' from UsesEqualDef factor this.vbool45_uses_F[1] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool45_uses_B, this.vbool45_F, 1, this.vbool45_uses_F[1]); // Message to 'vbool14_uses' from AreEqual factor this.vbool14_uses_B[0] = BooleanAreEqualOp.BAverageConditional(this.vbool188_B, this.vbool45_uses_F[1]); // Message to 'vbool14_marginal' from UsesEqualDef factor this.vbool14_marginal_B = UsesEqualDefOp.MarginalAverageConditional<Bernoulli>(this.vbool14_uses_B, this.vbool14_F, this.vbool14_marginal_B); // Message to 'vbool188' from AreEqual factor this.vbool188_F = BooleanAreEqualOp.AreEqualAverageConditional(this.vbool45_uses_F[1], this.vbool14_uses_F[0]); // Message to 'vbool188_marginal' from ReplicateWithMarginal factor this.vbool188_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool188_uses_B, this.vbool188_F, this.vbool188_marginal_B); // Message to 'vbool14_uses' from UsesEqualDef factor this.vbool14_uses_F[1] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool14_uses_B, this.vbool14_F, 1, this.vbool14_uses_F[1]); // Message to 'vbool40_uses' from AreEqual factor this.vbool40_uses_B[1] = BooleanAreEqualOp.AAverageConditional(this.vbool414_B, this.vbool14_uses_F[1]); // Message to 'vbool40_marginal' from UsesEqualDef factor this.vbool40_marginal_B = UsesEqualDefOp.MarginalAverageConditional<Bernoulli>(this.vbool40_uses_B, this.vbool40_F, this.vbool40_marginal_B); // Message to 'vbool414' from AreEqual factor this.vbool414_F = BooleanAreEqualOp.AreEqualAverageConditional(this.vbool40_uses_F[1], this.vbool14_uses_F[1]); // Message to 'vbool414_marginal' from ReplicateWithMarginal factor this.vbool414_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool414_uses_B, this.vbool414_F, this.vbool414_marginal_B); // Message to 'vbool40_uses' from UsesEqualDef factor this.vbool40_uses_F[0] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool40_uses_B, this.vbool40_F, 0, this.vbool40_uses_F[0]); // Message to 'vbool19_uses' from AreEqual factor this.vbool19_uses_B[1] = BooleanAreEqualOp.BAverageConditional(this.vbool204_B, this.vbool40_uses_F[0]); // Message to 'vbool19_marginal' from UsesEqualDef factor this.vbool19_marginal_B = UsesEqualDefOp.MarginalAverageConditional<Bernoulli>(this.vbool19_uses_B, this.vbool19_F, this.vbool19_marginal_B); // Message to 'vbool204' from AreEqual factor this.vbool204_F = BooleanAreEqualOp.AreEqualAverageConditional(this.vbool40_uses_F[0], this.vbool19_uses_F[1]); // Message to 'vbool204_marginal' from ReplicateWithMarginal factor this.vbool204_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool204_uses_B, this.vbool204_F, this.vbool204_marginal_B); // Message to 'vbool19_uses' from UsesEqualDef factor this.vbool19_uses_F[0] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool19_uses_B, this.vbool19_F, 0, this.vbool19_uses_F[0]); // Message to 'vbool144_uses' from AreEqual factor this.vbool144_uses_B[2] = BooleanAreEqualOp.BAverageConditional(this.vbool198_B, this.vbool19_uses_F[0]); // Message to 'vbool144_marginal' from UsesEqualDef factor this.vbool144_marginal_B = UsesEqualDefOp.MarginalAverageConditional<Bernoulli>(this.vbool144_uses_B, this.vbool144_F, this.vbool144_marginal_B); // Message to 'vbool198' from AreEqual factor this.vbool198_F = BooleanAreEqualOp.AreEqualAverageConditional(this.vbool19_uses_F[0], this.vbool144_uses_F[2]); // Message to 'vbool198_marginal' from ReplicateWithMarginal factor this.vbool198_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool198_uses_B, this.vbool198_F, this.vbool198_marginal_B); // Message to 'vbool144_uses' from UsesEqualDef factor this.vbool144_uses_F[1] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool144_uses_B, this.vbool144_F, 1, this.vbool144_uses_F[1]); // Message to 'vbool66_marginal' from UsesEqualDef factor this.vbool66_marginal_B = UsesEqualDefOp.MarginalAverageConditional<Bernoulli>(this.vbool66_uses_B, this.vbool66_F, this.vbool66_marginal_B); // Message to 'vbool158_uses' from UsesEqualDef factor this.vbool158_uses_F[2] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool158_uses_B, this.vbool158_F, 2, this.vbool158_uses_F[2]); // Message to 'vbool162_uses' from AreEqual factor this.vbool162_uses_B[1] = BooleanAreEqualOp.AAverageConditional(this.vbool418_B, this.vbool158_uses_F[2]); // Message to 'vbool162_marginal' from UsesEqualDef factor this.vbool162_marginal_B = UsesEqualDefOp.MarginalAverageConditional<Bernoulli>(this.vbool162_uses_B, this.vbool162_F, this.vbool162_marginal_B); // Message to 'vbool418' from AreEqual factor this.vbool418_F = BooleanAreEqualOp.AreEqualAverageConditional(this.vbool162_uses_F[1], this.vbool158_uses_F[2]); // Message to 'vbool418_marginal' from ReplicateWithMarginal factor this.vbool418_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool418_uses_B, this.vbool418_F, this.vbool418_marginal_B); // Message to 'vbool162_uses' from UsesEqualDef factor this.vbool162_uses_F[0] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool162_uses_B, this.vbool162_F, 0, this.vbool162_uses_F[0]); // Message to 'vbool184_uses' from AreEqual factor this.vbool184_uses_B[1] = BooleanAreEqualOp.AAverageConditional(this.vbool424_B, this.vbool162_uses_F[0]); // Message to 'vbool424' from AreEqual factor this.vbool424_F = BooleanAreEqualOp.AreEqualAverageConditional(this.vbool184_uses_F[1], this.vbool162_uses_F[0]); // Message to 'vbool424_marginal' from ReplicateWithMarginal factor this.vbool424_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool424_uses_B, this.vbool424_F, this.vbool424_marginal_B); // Message to 'vbool184_uses' from UsesEqualDef factor this.vbool184_uses_F[2] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool184_uses_B, this.vbool184_F, 2, this.vbool184_uses_F[2]); // Message to 'vbool158_uses' from AreEqual factor this.vbool158_uses_B[0] = BooleanAreEqualOp.BAverageConditional(this.vbool445_B, this.vbool184_uses_F[2]); // Message to 'vbool158_marginal' from UsesEqualDef factor this.vbool158_marginal_B = UsesEqualDefOp.MarginalAverageConditional<Bernoulli>(this.vbool158_uses_B, this.vbool158_F, this.vbool158_marginal_B); // Message to 'vbool445' from AreEqual factor this.vbool445_F = BooleanAreEqualOp.AreEqualAverageConditional(this.vbool184_uses_F[2], this.vbool158_uses_F[0]); // Message to 'vbool445_marginal' from ReplicateWithMarginal factor this.vbool445_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool445_uses_B, this.vbool445_F, this.vbool445_marginal_B); // Message to 'vbool184_marginal' from UsesEqualDef factor this.vbool184_marginal_B = UsesEqualDefOp.MarginalAverageConditional<Bernoulli>(this.vbool184_uses_B, this.vbool184_F, this.vbool184_marginal_B); // Message to 'vbool284' from And factor this.vbool284_F = BooleanAndOp.AndAverageConditional(this.vbool144_uses_F[1], this.vbool110_uses_F[8]); // Message to 'vbool284_marginal' from ReplicateWithMarginal factor this.vbool284_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool284_uses_B, this.vbool284_F, this.vbool284_marginal_B); // Message to 'vbool284_uses' from ReplicateWithMarginal factor this.vbool284_uses_F[0] = ReplicateOp.UsesAverageConditional<Bernoulli>(this.vbool284_uses_B, this.vbool284_F, 0, this.vbool284_uses_F[0]); // Message to 'vbool285' from And factor this.vbool285_F = BooleanAndOp.AndAverageConditional(this.vbool284_uses_F[0], this.vbool115_uses_F[10]); // Message to 'vbool285_marginal' from ReplicateWithMarginal factor this.vbool285_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool285_uses_B, this.vbool285_F, this.vbool285_marginal_B); // Message to 'vbool285_uses' from ReplicateWithMarginal factor this.vbool285_uses_F[0] = ReplicateOp.UsesAverageConditional<Bernoulli>(this.vbool285_uses_B, this.vbool285_F, 0, this.vbool285_uses_F[0]); // Message to 'vbool283_uses' from Or factor this.vbool283_uses_B[0] = BooleanOrOp.BAverageConditional(this.vbool286_B, this.vbool285_uses_F[0]); // Message to 'vbool283' from ReplicateWithMarginal factor this.vbool283_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool283_uses_B, this.vbool283_B); // Message to 'vbool282_uses' from Or factor this.vbool282_uses_B[0] = BooleanOrOp.AAverageConditional(this.vbool283_B, this.vbool280_uses_F[0]); // Message to 'vbool282' from ReplicateWithMarginal factor this.vbool282_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool282_uses_B, this.vbool282_B); // Message to 'vbool115_uses' from And factor this.vbool115_uses_B[9] = BooleanAndOp.BAverageConditional(this.vbool282_B, this.vbool281_uses_F[0]); // Message to 'vbool281_uses' from And factor this.vbool281_uses_B[0] = BooleanAndOp.AAverageConditional(this.vbool282_B, this.vbool115_uses_F[9]); // Message to 'vbool281' from ReplicateWithMarginal factor this.vbool281_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool281_uses_B, this.vbool281_B); // Message to 'vbool109_uses' from And factor this.vbool109_uses_B[6] = BooleanAndOp.BAverageConditional(this.vbool281_B, this.vbool143_uses_F[3]); // Message to 'vbool143_uses' from And factor this.vbool143_uses_B[3] = BooleanAndOp.AAverageConditional(this.vbool281_B, this.vbool109_uses_F[6]); // Message to 'vbool223' from Or factor this.vbool223_F = BooleanOrOp.OrAverageConditional(this.vbool222_uses_F[0], this.vbool220_uses_F[0]); // Message to 'vbool223_uses' from ReplicateWithMarginal factor this.vbool223_uses_F[0] = ReplicateOp.UsesAverageConditional<Bernoulli>(this.vbool223_uses_B, this.vbool223_F, 0, this.vbool223_uses_F[0]); // Message to 'vbool226' from Or factor this.vbool226_F = BooleanOrOp.OrAverageConditional(this.vbool225_uses_F[0], this.vbool223_uses_F[0]); // Message to 'vbool226_uses' from ReplicateWithMarginal factor this.vbool226_uses_F[0] = ReplicateOp.UsesAverageConditional<Bernoulli>(this.vbool226_uses_B, this.vbool226_F, 0, this.vbool226_uses_F[0]); // Message to 'vbool229' from Or factor this.vbool229_F = BooleanOrOp.OrAverageConditional(this.vbool228_uses_F[0], this.vbool226_uses_F[0]); // Message to 'vbool229_uses' from ReplicateWithMarginal factor this.vbool229_uses_F[0] = ReplicateOp.UsesAverageConditional<Bernoulli>(this.vbool229_uses_B, this.vbool229_F, 0, this.vbool229_uses_F[0]); // Message to 'vbool232' from Or factor this.vbool232_F = BooleanOrOp.OrAverageConditional(this.vbool231_uses_F[0], this.vbool229_uses_F[0]); // Message to 'vbool232_uses' from ReplicateWithMarginal factor this.vbool232_uses_F[0] = ReplicateOp.UsesAverageConditional<Bernoulli>(this.vbool232_uses_B, this.vbool232_F, 0, this.vbool232_uses_F[0]); // Message to 'vbool235' from Or factor this.vbool235_F = BooleanOrOp.OrAverageConditional(this.vbool234_uses_F[0], this.vbool232_uses_F[0]); // Message to 'vbool235_uses' from ReplicateWithMarginal factor this.vbool235_uses_F[0] = ReplicateOp.UsesAverageConditional<Bernoulli>(this.vbool235_uses_B, this.vbool235_F, 0, this.vbool235_uses_F[0]); // Message to 'vbool238' from Or factor this.vbool238_F = BooleanOrOp.OrAverageConditional(this.vbool237_uses_F[0], this.vbool235_uses_F[0]); // Message to 'vbool238_uses' from ReplicateWithMarginal factor this.vbool238_uses_F[0] = ReplicateOp.UsesAverageConditional<Bernoulli>(this.vbool238_uses_B, this.vbool238_F, 0, this.vbool238_uses_F[0]); // Message to 'vbool241' from Or factor this.vbool241_F = BooleanOrOp.OrAverageConditional(this.vbool240_uses_F[0], this.vbool238_uses_F[0]); // Message to 'vbool241_uses' from ReplicateWithMarginal factor this.vbool241_uses_F[0] = ReplicateOp.UsesAverageConditional<Bernoulli>(this.vbool241_uses_B, this.vbool241_F, 0, this.vbool241_uses_F[0]); // Message to 'vbool244' from Or factor this.vbool244_F = BooleanOrOp.OrAverageConditional(this.vbool243_uses_F[0], this.vbool241_uses_F[0]); // Message to 'vbool244_uses' from ReplicateWithMarginal factor this.vbool244_uses_F[0] = ReplicateOp.UsesAverageConditional<Bernoulli>(this.vbool244_uses_B, this.vbool244_F, 0, this.vbool244_uses_F[0]); // Message to 'vbool247' from Or factor this.vbool247_F = BooleanOrOp.OrAverageConditional(this.vbool246_uses_F[0], this.vbool244_uses_F[0]); // Message to 'vbool247_uses' from ReplicateWithMarginal factor this.vbool247_uses_F[0] = ReplicateOp.UsesAverageConditional<Bernoulli>(this.vbool247_uses_B, this.vbool247_F, 0, this.vbool247_uses_F[0]); // Message to 'vbool250' from Or factor this.vbool250_F = BooleanOrOp.OrAverageConditional(this.vbool249_uses_F[0], this.vbool247_uses_F[0]); // Message to 'vbool250_uses' from ReplicateWithMarginal factor this.vbool250_uses_F[0] = ReplicateOp.UsesAverageConditional<Bernoulli>(this.vbool250_uses_B, this.vbool250_F, 0, this.vbool250_uses_F[0]); // Message to 'vbool253' from Or factor this.vbool253_F = BooleanOrOp.OrAverageConditional(this.vbool252_uses_F[0], this.vbool250_uses_F[0]); // Message to 'vbool253_uses' from ReplicateWithMarginal factor this.vbool253_uses_F[0] = ReplicateOp.UsesAverageConditional<Bernoulli>(this.vbool253_uses_B, this.vbool253_F, 0, this.vbool253_uses_F[0]); // Message to 'vbool256' from Or factor this.vbool256_F = BooleanOrOp.OrAverageConditional(this.vbool255_uses_F[0], this.vbool253_uses_F[0]); // Message to 'vbool256_uses' from ReplicateWithMarginal factor this.vbool256_uses_F[0] = ReplicateOp.UsesAverageConditional<Bernoulli>(this.vbool256_uses_B, this.vbool256_F, 0, this.vbool256_uses_F[0]); // Message to 'vbool259' from Or factor this.vbool259_F = BooleanOrOp.OrAverageConditional(this.vbool258_uses_F[0], this.vbool256_uses_F[0]); // Message to 'vbool259_uses' from ReplicateWithMarginal factor this.vbool259_uses_F[0] = ReplicateOp.UsesAverageConditional<Bernoulli>(this.vbool259_uses_B, this.vbool259_F, 0, this.vbool259_uses_F[0]); // Message to 'vbool262' from Or factor this.vbool262_F = BooleanOrOp.OrAverageConditional(this.vbool261_uses_F[0], this.vbool259_uses_F[0]); // Message to 'vbool262_uses' from ReplicateWithMarginal factor this.vbool262_uses_F[0] = ReplicateOp.UsesAverageConditional<Bernoulli>(this.vbool262_uses_B, this.vbool262_F, 0, this.vbool262_uses_F[0]); // Message to 'vbool265' from Or factor this.vbool265_F = BooleanOrOp.OrAverageConditional(this.vbool264_uses_F[0], this.vbool262_uses_F[0]); // Message to 'vbool265_uses' from ReplicateWithMarginal factor this.vbool265_uses_F[0] = ReplicateOp.UsesAverageConditional<Bernoulli>(this.vbool265_uses_B, this.vbool265_F, 0, this.vbool265_uses_F[0]); // Message to 'vbool268' from Or factor this.vbool268_F = BooleanOrOp.OrAverageConditional(this.vbool267_uses_F[0], this.vbool265_uses_F[0]); // Message to 'vbool268_uses' from ReplicateWithMarginal factor this.vbool268_uses_F[0] = ReplicateOp.UsesAverageConditional<Bernoulli>(this.vbool268_uses_B, this.vbool268_F, 0, this.vbool268_uses_F[0]); // Message to 'vbool271' from Or factor this.vbool271_F = BooleanOrOp.OrAverageConditional(this.vbool270_uses_F[0], this.vbool268_uses_F[0]); // Message to 'vbool271_uses' from ReplicateWithMarginal factor this.vbool271_uses_F[0] = ReplicateOp.UsesAverageConditional<Bernoulli>(this.vbool271_uses_B, this.vbool271_F, 0, this.vbool271_uses_F[0]); // Message to 'vbool274' from Or factor this.vbool274_F = BooleanOrOp.OrAverageConditional(this.vbool273_uses_F[0], this.vbool271_uses_F[0]); // Message to 'vbool274_uses' from ReplicateWithMarginal factor this.vbool274_uses_F[0] = ReplicateOp.UsesAverageConditional<Bernoulli>(this.vbool274_uses_B, this.vbool274_F, 0, this.vbool274_uses_F[0]); // Message to 'vbool277' from Or factor this.vbool277_F = BooleanOrOp.OrAverageConditional(this.vbool276_uses_F[0], this.vbool274_uses_F[0]); // Message to 'vbool277_uses' from ReplicateWithMarginal factor this.vbool277_uses_F[0] = ReplicateOp.UsesAverageConditional<Bernoulli>(this.vbool277_uses_B, this.vbool277_F, 0, this.vbool277_uses_F[0]); // Message to 'vbool280_uses' from Or factor this.vbool280_uses_B[0] = BooleanOrOp.BAverageConditional(this.vbool283_B, this.vbool282_uses_F[0]); // Message to 'vbool280' from ReplicateWithMarginal factor this.vbool280_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool280_uses_B, this.vbool280_B); // Message to 'vbool279_uses' from Or factor this.vbool279_uses_B[0] = BooleanOrOp.AAverageConditional(this.vbool280_B, this.vbool277_uses_F[0]); // Message to 'vbool279' from ReplicateWithMarginal factor this.vbool279_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool279_uses_B, this.vbool279_B); // Message to 'vbool278_uses' from And factor this.vbool278_uses_B[0] = BooleanAndOp.AAverageConditional(this.vbool279_B, this.vbool114_uses_F[4]); // Message to 'vbool278' from ReplicateWithMarginal factor this.vbool278_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool278_uses_B, this.vbool278_B); // Message to 'vbool110_uses' from And factor this.vbool110_uses_B[7] = BooleanAndOp.BAverageConditional(this.vbool278_B, this.vbool143_uses_F[1]); // Message to 'vbool143_uses' from And factor this.vbool143_uses_B[1] = BooleanAndOp.AAverageConditional(this.vbool278_B, this.vbool110_uses_F[7]); // Message to 'vbool114_uses' from And factor this.vbool114_uses_B[4] = BooleanAndOp.BAverageConditional(this.vbool279_B, this.vbool278_uses_F[0]); // Message to 'vbool277_uses' from Or factor this.vbool277_uses_B[0] = BooleanOrOp.BAverageConditional(this.vbool280_B, this.vbool279_uses_F[0]); // Message to 'vbool277_marginal' from ReplicateWithMarginal factor this.vbool277_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool277_uses_B, this.vbool277_F, this.vbool277_marginal_B); // Message to 'vbool277' from ReplicateWithMarginal factor this.vbool277_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool277_uses_B, this.vbool277_B); // Message to 'vbool276_uses' from Or factor this.vbool276_uses_B[0] = BooleanOrOp.AAverageConditional(this.vbool277_B, this.vbool274_uses_F[0]); // Message to 'vbool276' from ReplicateWithMarginal factor this.vbool276_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool276_uses_B, this.vbool276_B); // Message to 'vbool275_uses' from And factor this.vbool275_uses_B[0] = BooleanAndOp.AAverageConditional(this.vbool276_B, this.vbool114_uses_F[6]); // Message to 'vbool275' from ReplicateWithMarginal factor this.vbool275_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool275_uses_B, this.vbool275_B); // Message to 'vbool109_uses' from And factor this.vbool109_uses_B[5] = BooleanAndOp.BAverageConditional(this.vbool275_B, this.vbool143_uses_F[2]); // Message to 'vbool143_uses' from And factor this.vbool143_uses_B[2] = BooleanAndOp.AAverageConditional(this.vbool275_B, this.vbool109_uses_F[5]); // Message to 'vbool143_uses' from UsesEqualDef factor this.vbool143_uses_F[0] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool143_uses_B, this.vbool143_F, 0, this.vbool143_uses_F[0]); // Message to 'vbool65_uses' from AreEqual factor this.vbool65_uses_B[0] = BooleanAreEqualOp.AAverageConditional(this.vbool386_B, this.vbool143_uses_F[0]); // Message to 'vbool143_uses' from UsesEqualDef factor this.vbool143_uses_F[4] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool143_uses_B, this.vbool143_F, 4, this.vbool143_uses_F[4]); // Message to 'vbool18_uses' from AreEqual factor this.vbool18_uses_B[0] = BooleanAreEqualOp.AAverageConditional(this.vbool197_B, this.vbool143_uses_F[4]); // Message to 'vbool18_uses' from UsesEqualDef factor this.vbool18_uses_F[1] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool18_uses_B, this.vbool18_F, 1, this.vbool18_uses_F[1]); // Message to 'vbool39_uses' from AreEqual factor this.vbool39_uses_B[0] = BooleanAreEqualOp.AAverageConditional(this.vbool203_B, this.vbool18_uses_F[1]); // Message to 'vbool39_uses' from UsesEqualDef factor this.vbool39_uses_F[1] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool39_uses_B, this.vbool39_F, 1, this.vbool39_uses_F[1]); // Message to 'vbool13_uses' from AreEqual factor this.vbool13_uses_B[1] = BooleanAreEqualOp.BAverageConditional(this.vbool413_B, this.vbool39_uses_F[1]); // Message to 'vbool13_uses' from UsesEqualDef factor this.vbool13_uses_F[0] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool13_uses_B, this.vbool13_F, 0, this.vbool13_uses_F[0]); // Message to 'vbool44_uses' from AreEqual factor this.vbool44_uses_B[1] = BooleanAreEqualOp.AAverageConditional(this.vbool187_B, this.vbool13_uses_F[0]); // Message to 'vbool44_uses' from UsesEqualDef factor this.vbool44_uses_F[0] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool44_uses_B, this.vbool44_F, 0, this.vbool44_uses_F[0]); // Message to 'vbool65_uses' from AreEqual factor this.vbool65_uses_B[1] = BooleanAreEqualOp.AAverageConditional(this.vbool208_B, this.vbool44_uses_F[0]); // Message to 'vbool65_uses' from UsesEqualDef factor this.vbool65_uses_F[2] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool65_uses_B, this.vbool65_F, 2, this.vbool65_uses_F[2]); // Message to 'vbool114_uses' from AreEqual factor this.vbool114_uses_B[2] = BooleanAreEqualOp.BAverageConditional(this.vbool389_B, this.vbool65_uses_F[2]); // Message to 'vbool65_uses' from UsesEqualDef factor this.vbool65_uses_F[3] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool65_uses_B, this.vbool65_F, 3, this.vbool65_uses_F[3]); // Message to 'vbool70_uses' from AreEqual factor this.vbool70_uses_B[0] = BooleanAreEqualOp.BAverageConditional(this.vbool391_B, this.vbool65_uses_F[3]); // Message to 'vbool70_uses' from UsesEqualDef factor this.vbool70_uses_F[1] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool70_uses_B, this.vbool70_F, 1, this.vbool70_uses_F[1]); // Message to 'vbool92_uses' from AreEqual factor this.vbool92_uses_B[0] = BooleanAreEqualOp.AAverageConditional(this.vbool213_B, this.vbool70_uses_F[1]); // Message to 'vbool92_uses' from UsesEqualDef factor this.vbool92_uses_F[1] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool92_uses_B, this.vbool92_F, 1, this.vbool92_uses_F[1]); // Message to 'vbool157_uses' from AreEqual factor this.vbool157_uses_B[1] = BooleanAreEqualOp.BAverageConditional(this.vbool454_B, this.vbool92_uses_F[1]); // Message to 'vbool157_uses' from UsesEqualDef factor this.vbool157_uses_F[0] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool157_uses_B, this.vbool157_F, 0, this.vbool157_uses_F[0]); // Message to 'vbool183_uses' from AreEqual factor this.vbool183_uses_B[2] = BooleanAreEqualOp.AAverageConditional(this.vbool444_B, this.vbool157_uses_F[0]); // Message to 'vbool183_uses' from UsesEqualDef factor this.vbool183_uses_F[0] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool183_uses_B, this.vbool183_F, 0, this.vbool183_uses_F[0]); // Message to 'vbool105_uses' from AreEqual factor this.vbool105_uses_B[1] = BooleanAreEqualOp.AAverageConditional(this.vbool449_B, this.vbool183_uses_F[0]); // Message to 'vbool105_uses' from UsesEqualDef factor this.vbool105_uses_F[0] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool105_uses_B, this.vbool105_F, 0, this.vbool105_uses_F[0]); // Message to 'vbool109_uses' from AreEqual factor this.vbool109_uses_B[2] = BooleanAreEqualOp.AAverageConditional(this.vbool192_B, this.vbool105_uses_F[0]); // Message to 'vbool183_uses' from UsesEqualDef factor this.vbool183_uses_F[1] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool183_uses_B, this.vbool183_F, 1, this.vbool183_uses_F[1]); // Message to 'vbool161_uses' from AreEqual factor this.vbool161_uses_B[0] = BooleanAreEqualOp.BAverageConditional(this.vbool423_B, this.vbool183_uses_F[1]); // Message to 'vbool161_uses' from UsesEqualDef factor this.vbool161_uses_F[1] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool161_uses_B, this.vbool161_F, 1, this.vbool161_uses_F[1]); // Message to 'vbool157_uses' from AreEqual factor this.vbool157_uses_B[2] = BooleanAreEqualOp.BAverageConditional(this.vbool417_B, this.vbool161_uses_F[1]); // Message to 'vbool157_uses' from UsesEqualDef factor this.vbool157_uses_F[1] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool157_uses_B, this.vbool157_F, 1, this.vbool157_uses_F[1]); // Message to 'vbool92_uses' from AreEqual factor this.vbool92_uses_B[1] = BooleanAreEqualOp.AAverageConditional(this.vbool454_B, this.vbool157_uses_F[1]); // Message to 'vbool92_marginal' from UsesEqualDef factor this.vbool92_marginal_B = UsesEqualDefOp.MarginalAverageConditional<Bernoulli>(this.vbool92_uses_B, this.vbool92_F, this.vbool92_marginal_B); // Message to 'vbool454' from AreEqual factor this.vbool454_F = BooleanAreEqualOp.AreEqualAverageConditional(this.vbool92_uses_F[1], this.vbool157_uses_F[1]); // Message to 'vbool454_marginal' from ReplicateWithMarginal factor this.vbool454_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool454_uses_B, this.vbool454_F, this.vbool454_marginal_B); // Message to 'vbool92_uses' from UsesEqualDef factor this.vbool92_uses_F[0] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool92_uses_B, this.vbool92_F, 0, this.vbool92_uses_F[0]); // Message to 'vbool70_uses' from AreEqual factor this.vbool70_uses_B[1] = BooleanAreEqualOp.BAverageConditional(this.vbool213_B, this.vbool92_uses_F[0]); // Message to 'vbool70_marginal' from UsesEqualDef factor this.vbool70_marginal_B = UsesEqualDefOp.MarginalAverageConditional<Bernoulli>(this.vbool70_uses_B, this.vbool70_F, this.vbool70_marginal_B); // Message to 'vbool213' from AreEqual factor this.vbool213_F = BooleanAreEqualOp.AreEqualAverageConditional(this.vbool92_uses_F[0], this.vbool70_uses_F[1]); // Message to 'vbool213_marginal' from ReplicateWithMarginal factor this.vbool213_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool213_uses_B, this.vbool213_F, this.vbool213_marginal_B); // Message to 'vbool70_uses' from UsesEqualDef factor this.vbool70_uses_F[0] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool70_uses_B, this.vbool70_F, 0, this.vbool70_uses_F[0]); // Message to 'vbool65_uses' from AreEqual factor this.vbool65_uses_B[3] = BooleanAreEqualOp.AAverageConditional(this.vbool391_B, this.vbool70_uses_F[0]); // Message to 'vbool391' from AreEqual factor this.vbool391_F = BooleanAreEqualOp.AreEqualAverageConditional(this.vbool65_uses_F[3], this.vbool70_uses_F[0]); // Message to 'vbool391_marginal' from ReplicateWithMarginal factor this.vbool391_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool391_uses_B, this.vbool391_F, this.vbool391_marginal_B); // Message to 'vbool391_uses' from ReplicateWithMarginal factor this.vbool391_uses_F[0] = ReplicateOp.UsesAverageConditional<Bernoulli>(this.vbool391_uses_B, this.vbool391_F, 0, this.vbool391_uses_F[0]); // Message to 'vbool65_uses' from UsesEqualDef factor this.vbool65_uses_F[0] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool65_uses_B, this.vbool65_F, 0, this.vbool65_uses_F[0]); // Message to 'vbool143_uses' from AreEqual factor this.vbool143_uses_B[0] = BooleanAreEqualOp.BAverageConditional(this.vbool386_B, this.vbool65_uses_F[0]); // Message to 'vbool386' from AreEqual factor this.vbool386_F = BooleanAreEqualOp.AreEqualAverageConditional(this.vbool65_uses_F[0], this.vbool143_uses_F[0]); // Message to 'vbool386_marginal' from ReplicateWithMarginal factor this.vbool386_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool386_uses_B, this.vbool386_F, this.vbool386_marginal_B); // Message to 'vbool386_uses' from ReplicateWithMarginal factor this.vbool386_uses_F[0] = ReplicateOp.UsesAverageConditional<Bernoulli>(this.vbool386_uses_B, this.vbool386_F, 0, this.vbool386_uses_F[0]); // Message to 'vbool143_uses' from UsesEqualDef factor this.vbool143_uses_F[1] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool143_uses_B, this.vbool143_F, 1, this.vbool143_uses_F[1]); // Message to 'vbool143_uses' from UsesEqualDef factor this.vbool143_uses_F[2] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool143_uses_B, this.vbool143_F, 2, this.vbool143_uses_F[2]); // Message to 'vbool143_uses' from UsesEqualDef factor this.vbool143_uses_F[3] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool143_uses_B, this.vbool143_F, 3, this.vbool143_uses_F[3]); // Message to 'vbool143_marginal' from UsesEqualDef factor this.vbool143_marginal_B = UsesEqualDefOp.MarginalAverageConditional<Bernoulli>(this.vbool143_uses_B, this.vbool143_F, this.vbool143_marginal_B); // Message to 'vbool65_uses' from UsesEqualDef factor this.vbool65_uses_F[1] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool65_uses_B, this.vbool65_F, 1, this.vbool65_uses_F[1]); // Message to 'vbool44_uses' from AreEqual factor this.vbool44_uses_B[0] = BooleanAreEqualOp.BAverageConditional(this.vbool208_B, this.vbool65_uses_F[1]); // Message to 'vbool44_marginal' from UsesEqualDef factor this.vbool44_marginal_B = UsesEqualDefOp.MarginalAverageConditional<Bernoulli>(this.vbool44_uses_B, this.vbool44_F, this.vbool44_marginal_B); // Message to 'vbool208' from AreEqual factor this.vbool208_F = BooleanAreEqualOp.AreEqualAverageConditional(this.vbool65_uses_F[1], this.vbool44_uses_F[0]); // Message to 'vbool208_marginal' from ReplicateWithMarginal factor this.vbool208_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool208_uses_B, this.vbool208_F, this.vbool208_marginal_B); // Message to 'vbool44_uses' from UsesEqualDef factor this.vbool44_uses_F[1] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool44_uses_B, this.vbool44_F, 1, this.vbool44_uses_F[1]); // Message to 'vbool13_uses' from AreEqual factor this.vbool13_uses_B[0] = BooleanAreEqualOp.BAverageConditional(this.vbool187_B, this.vbool44_uses_F[1]); // Message to 'vbool13_marginal' from UsesEqualDef factor this.vbool13_marginal_B = UsesEqualDefOp.MarginalAverageConditional<Bernoulli>(this.vbool13_uses_B, this.vbool13_F, this.vbool13_marginal_B); // Message to 'vbool187' from AreEqual factor this.vbool187_F = BooleanAreEqualOp.AreEqualAverageConditional(this.vbool44_uses_F[1], this.vbool13_uses_F[0]); // Message to 'vbool187_marginal' from ReplicateWithMarginal factor this.vbool187_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool187_uses_B, this.vbool187_F, this.vbool187_marginal_B); // Message to 'vbool13_uses' from UsesEqualDef factor this.vbool13_uses_F[1] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool13_uses_B, this.vbool13_F, 1, this.vbool13_uses_F[1]); // Message to 'vbool39_uses' from AreEqual factor this.vbool39_uses_B[1] = BooleanAreEqualOp.AAverageConditional(this.vbool413_B, this.vbool13_uses_F[1]); // Message to 'vbool39_marginal' from UsesEqualDef factor this.vbool39_marginal_B = UsesEqualDefOp.MarginalAverageConditional<Bernoulli>(this.vbool39_uses_B, this.vbool39_F, this.vbool39_marginal_B); // Message to 'vbool413' from AreEqual factor this.vbool413_F = BooleanAreEqualOp.AreEqualAverageConditional(this.vbool39_uses_F[1], this.vbool13_uses_F[1]); // Message to 'vbool413_marginal' from ReplicateWithMarginal factor this.vbool413_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool413_uses_B, this.vbool413_F, this.vbool413_marginal_B); // Message to 'vbool39_uses' from UsesEqualDef factor this.vbool39_uses_F[0] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool39_uses_B, this.vbool39_F, 0, this.vbool39_uses_F[0]); // Message to 'vbool18_uses' from AreEqual factor this.vbool18_uses_B[1] = BooleanAreEqualOp.BAverageConditional(this.vbool203_B, this.vbool39_uses_F[0]); // Message to 'vbool18_marginal' from UsesEqualDef factor this.vbool18_marginal_B = UsesEqualDefOp.MarginalAverageConditional<Bernoulli>(this.vbool18_uses_B, this.vbool18_F, this.vbool18_marginal_B); // Message to 'vbool203' from AreEqual factor this.vbool203_F = BooleanAreEqualOp.AreEqualAverageConditional(this.vbool39_uses_F[0], this.vbool18_uses_F[1]); // Message to 'vbool203_marginal' from ReplicateWithMarginal factor this.vbool203_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool203_uses_B, this.vbool203_F, this.vbool203_marginal_B); // Message to 'vbool18_uses' from UsesEqualDef factor this.vbool18_uses_F[0] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool18_uses_B, this.vbool18_F, 0, this.vbool18_uses_F[0]); // Message to 'vbool143_uses' from AreEqual factor this.vbool143_uses_B[4] = BooleanAreEqualOp.BAverageConditional(this.vbool197_B, this.vbool18_uses_F[0]); // Message to 'vbool197' from AreEqual factor this.vbool197_F = BooleanAreEqualOp.AreEqualAverageConditional(this.vbool18_uses_F[0], this.vbool143_uses_F[4]); // Message to 'vbool197_marginal' from ReplicateWithMarginal factor this.vbool197_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool197_uses_B, this.vbool197_F, this.vbool197_marginal_B); // Message to 'vbool65_marginal' from UsesEqualDef factor this.vbool65_marginal_B = UsesEqualDefOp.MarginalAverageConditional<Bernoulli>(this.vbool65_uses_B, this.vbool65_F, this.vbool65_marginal_B); // Message to 'vbool157_uses' from UsesEqualDef factor this.vbool157_uses_F[2] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool157_uses_B, this.vbool157_F, 2, this.vbool157_uses_F[2]); // Message to 'vbool161_uses' from AreEqual factor this.vbool161_uses_B[1] = BooleanAreEqualOp.AAverageConditional(this.vbool417_B, this.vbool157_uses_F[2]); // Message to 'vbool161_marginal' from UsesEqualDef factor this.vbool161_marginal_B = UsesEqualDefOp.MarginalAverageConditional<Bernoulli>(this.vbool161_uses_B, this.vbool161_F, this.vbool161_marginal_B); // Message to 'vbool417' from AreEqual factor this.vbool417_F = BooleanAreEqualOp.AreEqualAverageConditional(this.vbool161_uses_F[1], this.vbool157_uses_F[2]); // Message to 'vbool417_marginal' from ReplicateWithMarginal factor this.vbool417_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool417_uses_B, this.vbool417_F, this.vbool417_marginal_B); // Message to 'vbool161_uses' from UsesEqualDef factor this.vbool161_uses_F[0] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool161_uses_B, this.vbool161_F, 0, this.vbool161_uses_F[0]); // Message to 'vbool183_uses' from AreEqual factor this.vbool183_uses_B[1] = BooleanAreEqualOp.AAverageConditional(this.vbool423_B, this.vbool161_uses_F[0]); // Message to 'vbool423' from AreEqual factor this.vbool423_F = BooleanAreEqualOp.AreEqualAverageConditional(this.vbool183_uses_F[1], this.vbool161_uses_F[0]); // Message to 'vbool423_marginal' from ReplicateWithMarginal factor this.vbool423_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool423_uses_B, this.vbool423_F, this.vbool423_marginal_B); // Message to 'vbool183_uses' from UsesEqualDef factor this.vbool183_uses_F[2] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool183_uses_B, this.vbool183_F, 2, this.vbool183_uses_F[2]); // Message to 'vbool157_uses' from AreEqual factor this.vbool157_uses_B[0] = BooleanAreEqualOp.BAverageConditional(this.vbool444_B, this.vbool183_uses_F[2]); // Message to 'vbool157_marginal' from UsesEqualDef factor this.vbool157_marginal_B = UsesEqualDefOp.MarginalAverageConditional<Bernoulli>(this.vbool157_uses_B, this.vbool157_F, this.vbool157_marginal_B); // Message to 'vbool444' from AreEqual factor this.vbool444_F = BooleanAreEqualOp.AreEqualAverageConditional(this.vbool183_uses_F[2], this.vbool157_uses_F[0]); // Message to 'vbool444_marginal' from ReplicateWithMarginal factor this.vbool444_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool444_uses_B, this.vbool444_F, this.vbool444_marginal_B); // Message to 'vbool183_marginal' from UsesEqualDef factor this.vbool183_marginal_B = UsesEqualDefOp.MarginalAverageConditional<Bernoulli>(this.vbool183_uses_B, this.vbool183_F, this.vbool183_marginal_B); // Message to 'vbool278' from And factor this.vbool278_F = BooleanAndOp.AndAverageConditional(this.vbool143_uses_F[1], this.vbool110_uses_F[7]); // Message to 'vbool278_marginal' from ReplicateWithMarginal factor this.vbool278_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool278_uses_B, this.vbool278_F, this.vbool278_marginal_B); // Message to 'vbool278_uses' from ReplicateWithMarginal factor this.vbool278_uses_F[0] = ReplicateOp.UsesAverageConditional<Bernoulli>(this.vbool278_uses_B, this.vbool278_F, 0, this.vbool278_uses_F[0]); // Message to 'vbool275' from And factor this.vbool275_F = BooleanAndOp.AndAverageConditional(this.vbool143_uses_F[2], this.vbool109_uses_F[5]); // Message to 'vbool275_marginal' from ReplicateWithMarginal factor this.vbool275_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool275_uses_B, this.vbool275_F, this.vbool275_marginal_B); // Message to 'vbool275_uses' from ReplicateWithMarginal factor this.vbool275_uses_F[0] = ReplicateOp.UsesAverageConditional<Bernoulli>(this.vbool275_uses_B, this.vbool275_F, 0, this.vbool275_uses_F[0]); // Message to 'vbool114_uses' from And factor this.vbool114_uses_B[6] = BooleanAndOp.BAverageConditional(this.vbool276_B, this.vbool275_uses_F[0]); // Message to 'vbool281' from And factor this.vbool281_F = BooleanAndOp.AndAverageConditional(this.vbool143_uses_F[3], this.vbool109_uses_F[6]); // Message to 'vbool281_marginal' from ReplicateWithMarginal factor this.vbool281_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool281_uses_B, this.vbool281_F, this.vbool281_marginal_B); // Message to 'vbool281_uses' from ReplicateWithMarginal factor this.vbool281_uses_F[0] = ReplicateOp.UsesAverageConditional<Bernoulli>(this.vbool281_uses_B, this.vbool281_F, 0, this.vbool281_uses_F[0]); // Message to 'vbool282' from And factor this.vbool282_F = BooleanAndOp.AndAverageConditional(this.vbool281_uses_F[0], this.vbool115_uses_F[9]); // Message to 'vbool282_marginal' from ReplicateWithMarginal factor this.vbool282_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool282_uses_B, this.vbool282_F, this.vbool282_marginal_B); // Message to 'vbool282_uses' from ReplicateWithMarginal factor this.vbool282_uses_F[0] = ReplicateOp.UsesAverageConditional<Bernoulli>(this.vbool282_uses_B, this.vbool282_F, 0, this.vbool282_uses_F[0]); // Message to 'vbool279' from And factor this.vbool279_F = BooleanAndOp.AndAverageConditional(this.vbool278_uses_F[0], this.vbool114_uses_F[4]); // Message to 'vbool279_marginal' from ReplicateWithMarginal factor this.vbool279_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool279_uses_B, this.vbool279_F, this.vbool279_marginal_B); // Message to 'vbool279_uses' from ReplicateWithMarginal factor this.vbool279_uses_F[0] = ReplicateOp.UsesAverageConditional<Bernoulli>(this.vbool279_uses_B, this.vbool279_F, 0, this.vbool279_uses_F[0]); // Message to 'vbool280' from Or factor this.vbool280_F = BooleanOrOp.OrAverageConditional(this.vbool279_uses_F[0], this.vbool277_uses_F[0]); // Message to 'vbool280_marginal' from ReplicateWithMarginal factor this.vbool280_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool280_uses_B, this.vbool280_F, this.vbool280_marginal_B); // Message to 'vbool280_uses' from ReplicateWithMarginal factor this.vbool280_uses_F[0] = ReplicateOp.UsesAverageConditional<Bernoulli>(this.vbool280_uses_B, this.vbool280_F, 0, this.vbool280_uses_F[0]); // Message to 'vbool283' from Or factor this.vbool283_F = BooleanOrOp.OrAverageConditional(this.vbool282_uses_F[0], this.vbool280_uses_F[0]); // Message to 'vbool283_marginal' from ReplicateWithMarginal factor this.vbool283_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool283_uses_B, this.vbool283_F, this.vbool283_marginal_B); // Message to 'vbool283_uses' from ReplicateWithMarginal factor this.vbool283_uses_F[0] = ReplicateOp.UsesAverageConditional<Bernoulli>(this.vbool283_uses_B, this.vbool283_F, 0, this.vbool283_uses_F[0]); // Message to 'vbool286' from Or factor this.vbool286_F = BooleanOrOp.OrAverageConditional(this.vbool285_uses_F[0], this.vbool283_uses_F[0]); // Message to 'vbool286_marginal' from ReplicateWithMarginal factor this.vbool286_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool286_uses_B, this.vbool286_F, this.vbool286_marginal_B); // Message to 'vbool276' from And factor this.vbool276_F = BooleanAndOp.AndAverageConditional(this.vbool275_uses_F[0], this.vbool114_uses_F[6]); // Message to 'vbool276_marginal' from ReplicateWithMarginal factor this.vbool276_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool276_uses_B, this.vbool276_F, this.vbool276_marginal_B); // Message to 'vbool276_uses' from ReplicateWithMarginal factor this.vbool276_uses_F[0] = ReplicateOp.UsesAverageConditional<Bernoulli>(this.vbool276_uses_B, this.vbool276_F, 0, this.vbool276_uses_F[0]); // Message to 'vbool274_uses' from Or factor this.vbool274_uses_B[0] = BooleanOrOp.BAverageConditional(this.vbool277_B, this.vbool276_uses_F[0]); // Message to 'vbool274_marginal' from ReplicateWithMarginal factor this.vbool274_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool274_uses_B, this.vbool274_F, this.vbool274_marginal_B); // Message to 'vbool274' from ReplicateWithMarginal factor this.vbool274_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool274_uses_B, this.vbool274_B); // Message to 'vbool273_uses' from Or factor this.vbool273_uses_B[0] = BooleanOrOp.AAverageConditional(this.vbool274_B, this.vbool271_uses_F[0]); // Message to 'vbool273' from ReplicateWithMarginal factor this.vbool273_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool273_uses_B, this.vbool273_B); // Message to 'vbool115_uses' from And factor this.vbool115_uses_B[8] = BooleanAndOp.BAverageConditional(this.vbool273_B, this.vbool272_uses_F[0]); // Message to 'vbool272_uses' from And factor this.vbool272_uses_B[0] = BooleanAndOp.AAverageConditional(this.vbool273_B, this.vbool115_uses_F[8]); // Message to 'vbool272' from ReplicateWithMarginal factor this.vbool272_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool272_uses_B, this.vbool272_B); // Message to 'vbool108_uses' from And factor this.vbool108_uses_B[6] = BooleanAndOp.BAverageConditional(this.vbool272_B, this.vbool142_uses_F[3]); // Message to 'vbool142_uses' from And factor this.vbool142_uses_B[3] = BooleanAndOp.AAverageConditional(this.vbool272_B, this.vbool108_uses_F[6]); // Message to 'vbool271_uses' from Or factor this.vbool271_uses_B[0] = BooleanOrOp.BAverageConditional(this.vbool274_B, this.vbool273_uses_F[0]); // Message to 'vbool271_marginal' from ReplicateWithMarginal factor this.vbool271_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool271_uses_B, this.vbool271_F, this.vbool271_marginal_B); // Message to 'vbool271' from ReplicateWithMarginal factor this.vbool271_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool271_uses_B, this.vbool271_B); // Message to 'vbool270_uses' from Or factor this.vbool270_uses_B[0] = BooleanOrOp.AAverageConditional(this.vbool271_B, this.vbool268_uses_F[0]); // Message to 'vbool270' from ReplicateWithMarginal factor this.vbool270_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool270_uses_B, this.vbool270_B); // Message to 'vbool269_uses' from And factor this.vbool269_uses_B[0] = BooleanAndOp.AAverageConditional(this.vbool270_B, this.vbool113_uses_F[4]); // Message to 'vbool269' from ReplicateWithMarginal factor this.vbool269_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool269_uses_B, this.vbool269_B); // Message to 'vbool110_uses' from And factor this.vbool110_uses_B[6] = BooleanAndOp.BAverageConditional(this.vbool269_B, this.vbool142_uses_F[1]); // Message to 'vbool142_uses' from And factor this.vbool142_uses_B[1] = BooleanAndOp.AAverageConditional(this.vbool269_B, this.vbool110_uses_F[6]); // Message to 'vbool113_uses' from And factor this.vbool113_uses_B[4] = BooleanAndOp.BAverageConditional(this.vbool270_B, this.vbool269_uses_F[0]); // Message to 'vbool268_uses' from Or factor this.vbool268_uses_B[0] = BooleanOrOp.BAverageConditional(this.vbool271_B, this.vbool270_uses_F[0]); // Message to 'vbool268_marginal' from ReplicateWithMarginal factor this.vbool268_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool268_uses_B, this.vbool268_F, this.vbool268_marginal_B); // Message to 'vbool268' from ReplicateWithMarginal factor this.vbool268_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool268_uses_B, this.vbool268_B); // Message to 'vbool267_uses' from Or factor this.vbool267_uses_B[0] = BooleanOrOp.AAverageConditional(this.vbool268_B, this.vbool265_uses_F[0]); // Message to 'vbool267' from ReplicateWithMarginal factor this.vbool267_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool267_uses_B, this.vbool267_B); // Message to 'vbool266_uses' from And factor this.vbool266_uses_B[0] = BooleanAndOp.AAverageConditional(this.vbool267_B, this.vbool113_uses_F[6]); // Message to 'vbool266' from ReplicateWithMarginal factor this.vbool266_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool266_uses_B, this.vbool266_B); // Message to 'vbool108_uses' from And factor this.vbool108_uses_B[5] = BooleanAndOp.BAverageConditional(this.vbool266_B, this.vbool142_uses_F[2]); // Message to 'vbool142_uses' from And factor this.vbool142_uses_B[2] = BooleanAndOp.AAverageConditional(this.vbool266_B, this.vbool108_uses_F[5]); // Message to 'vbool142_uses' from UsesEqualDef factor this.vbool142_uses_F[0] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool142_uses_B, this.vbool142_F, 0, this.vbool142_uses_F[0]); // Message to 'vbool64_uses' from AreEqual factor this.vbool64_uses_B[0] = BooleanAreEqualOp.AAverageConditional(this.vbool378_B, this.vbool142_uses_F[0]); // Message to 'vbool142_uses' from UsesEqualDef factor this.vbool142_uses_F[4] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool142_uses_B, this.vbool142_F, 4, this.vbool142_uses_F[4]); // Message to 'vbool17_uses' from AreEqual factor this.vbool17_uses_B[0] = BooleanAreEqualOp.AAverageConditional(this.vbool196_B, this.vbool142_uses_F[4]); // Message to 'vbool17_uses' from UsesEqualDef factor this.vbool17_uses_F[1] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool17_uses_B, this.vbool17_F, 1, this.vbool17_uses_F[1]); // Message to 'vbool38_uses' from AreEqual factor this.vbool38_uses_B[0] = BooleanAreEqualOp.AAverageConditional(this.vbool202_B, this.vbool17_uses_F[1]); // Message to 'vbool38_uses' from UsesEqualDef factor this.vbool38_uses_F[1] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool38_uses_B, this.vbool38_F, 1, this.vbool38_uses_F[1]); // Message to 'vbool12_uses' from AreEqual factor this.vbool12_uses_B[1] = BooleanAreEqualOp.BAverageConditional(this.vbool412_B, this.vbool38_uses_F[1]); // Message to 'vbool12_uses' from UsesEqualDef factor this.vbool12_uses_F[0] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool12_uses_B, this.vbool12_F, 0, this.vbool12_uses_F[0]); // Message to 'vbool43_uses' from AreEqual factor this.vbool43_uses_B[1] = BooleanAreEqualOp.AAverageConditional(this.vbool186_B, this.vbool12_uses_F[0]); // Message to 'vbool43_uses' from UsesEqualDef factor this.vbool43_uses_F[0] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool43_uses_B, this.vbool43_F, 0, this.vbool43_uses_F[0]); // Message to 'vbool64_uses' from AreEqual factor this.vbool64_uses_B[1] = BooleanAreEqualOp.AAverageConditional(this.vbool207_B, this.vbool43_uses_F[0]); // Message to 'vbool64_uses' from UsesEqualDef factor this.vbool64_uses_F[2] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool64_uses_B, this.vbool64_F, 2, this.vbool64_uses_F[2]); // Message to 'vbool113_uses' from AreEqual factor this.vbool113_uses_B[2] = BooleanAreEqualOp.BAverageConditional(this.vbool381_B, this.vbool64_uses_F[2]); // Message to 'vbool64_uses' from UsesEqualDef factor this.vbool64_uses_F[3] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool64_uses_B, this.vbool64_F, 3, this.vbool64_uses_F[3]); // Message to 'vbool69_uses' from AreEqual factor this.vbool69_uses_B[0] = BooleanAreEqualOp.BAverageConditional(this.vbool383_B, this.vbool64_uses_F[3]); // Message to 'vbool69_uses' from UsesEqualDef factor this.vbool69_uses_F[1] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool69_uses_B, this.vbool69_F, 1, this.vbool69_uses_F[1]); // Message to 'vbool91_uses' from AreEqual factor this.vbool91_uses_B[0] = BooleanAreEqualOp.AAverageConditional(this.vbool212_B, this.vbool69_uses_F[1]); // Message to 'vbool91_uses' from UsesEqualDef factor this.vbool91_uses_F[1] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool91_uses_B, this.vbool91_F, 1, this.vbool91_uses_F[1]); // Message to 'vbool156_uses' from AreEqual factor this.vbool156_uses_B[1] = BooleanAreEqualOp.BAverageConditional(this.vbool453_B, this.vbool91_uses_F[1]); // Message to 'vbool156_uses' from UsesEqualDef factor this.vbool156_uses_F[0] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool156_uses_B, this.vbool156_F, 0, this.vbool156_uses_F[0]); // Message to 'vbool182_uses' from AreEqual factor this.vbool182_uses_B[2] = BooleanAreEqualOp.AAverageConditional(this.vbool443_B, this.vbool156_uses_F[0]); // Message to 'vbool182_uses' from UsesEqualDef factor this.vbool182_uses_F[0] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool182_uses_B, this.vbool182_F, 0, this.vbool182_uses_F[0]); // Message to 'vbool104_uses' from AreEqual factor this.vbool104_uses_B[1] = BooleanAreEqualOp.AAverageConditional(this.vbool448_B, this.vbool182_uses_F[0]); // Message to 'vbool104_uses' from UsesEqualDef factor this.vbool104_uses_F[0] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool104_uses_B, this.vbool104_F, 0, this.vbool104_uses_F[0]); // Message to 'vbool108_uses' from AreEqual factor this.vbool108_uses_B[2] = BooleanAreEqualOp.AAverageConditional(this.vbool191_B, this.vbool104_uses_F[0]); // Message to 'vbool182_uses' from UsesEqualDef factor this.vbool182_uses_F[1] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool182_uses_B, this.vbool182_F, 1, this.vbool182_uses_F[1]); // Message to 'vbool160_uses' from AreEqual factor this.vbool160_uses_B[0] = BooleanAreEqualOp.BAverageConditional(this.vbool422_B, this.vbool182_uses_F[1]); // Message to 'vbool160_uses' from UsesEqualDef factor this.vbool160_uses_F[1] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool160_uses_B, this.vbool160_F, 1, this.vbool160_uses_F[1]); // Message to 'vbool156_uses' from AreEqual factor this.vbool156_uses_B[2] = BooleanAreEqualOp.BAverageConditional(this.vbool416_B, this.vbool160_uses_F[1]); // Message to 'vbool156_uses' from UsesEqualDef factor this.vbool156_uses_F[1] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool156_uses_B, this.vbool156_F, 1, this.vbool156_uses_F[1]); // Message to 'vbool91_uses' from AreEqual factor this.vbool91_uses_B[1] = BooleanAreEqualOp.AAverageConditional(this.vbool453_B, this.vbool156_uses_F[1]); // Message to 'vbool91_marginal' from UsesEqualDef factor this.vbool91_marginal_B = UsesEqualDefOp.MarginalAverageConditional<Bernoulli>(this.vbool91_uses_B, this.vbool91_F, this.vbool91_marginal_B); // Message to 'vbool453' from AreEqual factor this.vbool453_F = BooleanAreEqualOp.AreEqualAverageConditional(this.vbool91_uses_F[1], this.vbool156_uses_F[1]); // Message to 'vbool453_marginal' from ReplicateWithMarginal factor this.vbool453_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool453_uses_B, this.vbool453_F, this.vbool453_marginal_B); // Message to 'vbool91_uses' from UsesEqualDef factor this.vbool91_uses_F[0] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool91_uses_B, this.vbool91_F, 0, this.vbool91_uses_F[0]); // Message to 'vbool69_uses' from AreEqual factor this.vbool69_uses_B[1] = BooleanAreEqualOp.BAverageConditional(this.vbool212_B, this.vbool91_uses_F[0]); // Message to 'vbool69_marginal' from UsesEqualDef factor this.vbool69_marginal_B = UsesEqualDefOp.MarginalAverageConditional<Bernoulli>(this.vbool69_uses_B, this.vbool69_F, this.vbool69_marginal_B); // Message to 'vbool212' from AreEqual factor this.vbool212_F = BooleanAreEqualOp.AreEqualAverageConditional(this.vbool91_uses_F[0], this.vbool69_uses_F[1]); // Message to 'vbool212_marginal' from ReplicateWithMarginal factor this.vbool212_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool212_uses_B, this.vbool212_F, this.vbool212_marginal_B); // Message to 'vbool69_uses' from UsesEqualDef factor this.vbool69_uses_F[0] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool69_uses_B, this.vbool69_F, 0, this.vbool69_uses_F[0]); // Message to 'vbool64_uses' from AreEqual factor this.vbool64_uses_B[3] = BooleanAreEqualOp.AAverageConditional(this.vbool383_B, this.vbool69_uses_F[0]); // Message to 'vbool383' from AreEqual factor this.vbool383_F = BooleanAreEqualOp.AreEqualAverageConditional(this.vbool64_uses_F[3], this.vbool69_uses_F[0]); // Message to 'vbool383_marginal' from ReplicateWithMarginal factor this.vbool383_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool383_uses_B, this.vbool383_F, this.vbool383_marginal_B); // Message to 'vbool383_uses' from ReplicateWithMarginal factor this.vbool383_uses_F[0] = ReplicateOp.UsesAverageConditional<Bernoulli>(this.vbool383_uses_B, this.vbool383_F, 0, this.vbool383_uses_F[0]); // Message to 'vbool64_uses' from UsesEqualDef factor this.vbool64_uses_F[0] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool64_uses_B, this.vbool64_F, 0, this.vbool64_uses_F[0]); // Message to 'vbool142_uses' from AreEqual factor this.vbool142_uses_B[0] = BooleanAreEqualOp.BAverageConditional(this.vbool378_B, this.vbool64_uses_F[0]); // Message to 'vbool378' from AreEqual factor this.vbool378_F = BooleanAreEqualOp.AreEqualAverageConditional(this.vbool64_uses_F[0], this.vbool142_uses_F[0]); // Message to 'vbool378_marginal' from ReplicateWithMarginal factor this.vbool378_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool378_uses_B, this.vbool378_F, this.vbool378_marginal_B); // Message to 'vbool378_uses' from ReplicateWithMarginal factor this.vbool378_uses_F[0] = ReplicateOp.UsesAverageConditional<Bernoulli>(this.vbool378_uses_B, this.vbool378_F, 0, this.vbool378_uses_F[0]); // Message to 'vbool142_uses' from UsesEqualDef factor this.vbool142_uses_F[1] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool142_uses_B, this.vbool142_F, 1, this.vbool142_uses_F[1]); // Message to 'vbool142_uses' from UsesEqualDef factor this.vbool142_uses_F[2] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool142_uses_B, this.vbool142_F, 2, this.vbool142_uses_F[2]); // Message to 'vbool142_uses' from UsesEqualDef factor this.vbool142_uses_F[3] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool142_uses_B, this.vbool142_F, 3, this.vbool142_uses_F[3]); // Message to 'vbool142_marginal' from UsesEqualDef factor this.vbool142_marginal_B = UsesEqualDefOp.MarginalAverageConditional<Bernoulli>(this.vbool142_uses_B, this.vbool142_F, this.vbool142_marginal_B); // Message to 'vbool64_uses' from UsesEqualDef factor this.vbool64_uses_F[1] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool64_uses_B, this.vbool64_F, 1, this.vbool64_uses_F[1]); // Message to 'vbool43_uses' from AreEqual factor this.vbool43_uses_B[0] = BooleanAreEqualOp.BAverageConditional(this.vbool207_B, this.vbool64_uses_F[1]); // Message to 'vbool43_marginal' from UsesEqualDef factor this.vbool43_marginal_B = UsesEqualDefOp.MarginalAverageConditional<Bernoulli>(this.vbool43_uses_B, this.vbool43_F, this.vbool43_marginal_B); // Message to 'vbool207' from AreEqual factor this.vbool207_F = BooleanAreEqualOp.AreEqualAverageConditional(this.vbool64_uses_F[1], this.vbool43_uses_F[0]); // Message to 'vbool207_marginal' from ReplicateWithMarginal factor this.vbool207_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool207_uses_B, this.vbool207_F, this.vbool207_marginal_B); // Message to 'vbool43_uses' from UsesEqualDef factor this.vbool43_uses_F[1] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool43_uses_B, this.vbool43_F, 1, this.vbool43_uses_F[1]); // Message to 'vbool12_uses' from AreEqual factor this.vbool12_uses_B[0] = BooleanAreEqualOp.BAverageConditional(this.vbool186_B, this.vbool43_uses_F[1]); // Message to 'vbool12_marginal' from UsesEqualDef factor this.vbool12_marginal_B = UsesEqualDefOp.MarginalAverageConditional<Bernoulli>(this.vbool12_uses_B, this.vbool12_F, this.vbool12_marginal_B); // Message to 'vbool186' from AreEqual factor this.vbool186_F = BooleanAreEqualOp.AreEqualAverageConditional(this.vbool43_uses_F[1], this.vbool12_uses_F[0]); // Message to 'vbool186_marginal' from ReplicateWithMarginal factor this.vbool186_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool186_uses_B, this.vbool186_F, this.vbool186_marginal_B); // Message to 'vbool12_uses' from UsesEqualDef factor this.vbool12_uses_F[1] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool12_uses_B, this.vbool12_F, 1, this.vbool12_uses_F[1]); // Message to 'vbool38_uses' from AreEqual factor this.vbool38_uses_B[1] = BooleanAreEqualOp.AAverageConditional(this.vbool412_B, this.vbool12_uses_F[1]); // Message to 'vbool38_marginal' from UsesEqualDef factor this.vbool38_marginal_B = UsesEqualDefOp.MarginalAverageConditional<Bernoulli>(this.vbool38_uses_B, this.vbool38_F, this.vbool38_marginal_B); // Message to 'vbool412' from AreEqual factor this.vbool412_F = BooleanAreEqualOp.AreEqualAverageConditional(this.vbool38_uses_F[1], this.vbool12_uses_F[1]); // Message to 'vbool412_marginal' from ReplicateWithMarginal factor this.vbool412_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool412_uses_B, this.vbool412_F, this.vbool412_marginal_B); // Message to 'vbool38_uses' from UsesEqualDef factor this.vbool38_uses_F[0] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool38_uses_B, this.vbool38_F, 0, this.vbool38_uses_F[0]); // Message to 'vbool17_uses' from AreEqual factor this.vbool17_uses_B[1] = BooleanAreEqualOp.BAverageConditional(this.vbool202_B, this.vbool38_uses_F[0]); // Message to 'vbool17_marginal' from UsesEqualDef factor this.vbool17_marginal_B = UsesEqualDefOp.MarginalAverageConditional<Bernoulli>(this.vbool17_uses_B, this.vbool17_F, this.vbool17_marginal_B); // Message to 'vbool202' from AreEqual factor this.vbool202_F = BooleanAreEqualOp.AreEqualAverageConditional(this.vbool38_uses_F[0], this.vbool17_uses_F[1]); // Message to 'vbool202_marginal' from ReplicateWithMarginal factor this.vbool202_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool202_uses_B, this.vbool202_F, this.vbool202_marginal_B); // Message to 'vbool17_uses' from UsesEqualDef factor this.vbool17_uses_F[0] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool17_uses_B, this.vbool17_F, 0, this.vbool17_uses_F[0]); // Message to 'vbool142_uses' from AreEqual factor this.vbool142_uses_B[4] = BooleanAreEqualOp.BAverageConditional(this.vbool196_B, this.vbool17_uses_F[0]); // Message to 'vbool196' from AreEqual factor this.vbool196_F = BooleanAreEqualOp.AreEqualAverageConditional(this.vbool17_uses_F[0], this.vbool142_uses_F[4]); // Message to 'vbool196_marginal' from ReplicateWithMarginal factor this.vbool196_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool196_uses_B, this.vbool196_F, this.vbool196_marginal_B); // Message to 'vbool64_marginal' from UsesEqualDef factor this.vbool64_marginal_B = UsesEqualDefOp.MarginalAverageConditional<Bernoulli>(this.vbool64_uses_B, this.vbool64_F, this.vbool64_marginal_B); // Message to 'vbool156_uses' from UsesEqualDef factor this.vbool156_uses_F[2] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool156_uses_B, this.vbool156_F, 2, this.vbool156_uses_F[2]); // Message to 'vbool160_uses' from AreEqual factor this.vbool160_uses_B[1] = BooleanAreEqualOp.AAverageConditional(this.vbool416_B, this.vbool156_uses_F[2]); // Message to 'vbool160_marginal' from UsesEqualDef factor this.vbool160_marginal_B = UsesEqualDefOp.MarginalAverageConditional<Bernoulli>(this.vbool160_uses_B, this.vbool160_F, this.vbool160_marginal_B); // Message to 'vbool416' from AreEqual factor this.vbool416_F = BooleanAreEqualOp.AreEqualAverageConditional(this.vbool160_uses_F[1], this.vbool156_uses_F[2]); // Message to 'vbool416_marginal' from ReplicateWithMarginal factor this.vbool416_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool416_uses_B, this.vbool416_F, this.vbool416_marginal_B); // Message to 'vbool160_uses' from UsesEqualDef factor this.vbool160_uses_F[0] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool160_uses_B, this.vbool160_F, 0, this.vbool160_uses_F[0]); // Message to 'vbool182_uses' from AreEqual factor this.vbool182_uses_B[1] = BooleanAreEqualOp.AAverageConditional(this.vbool422_B, this.vbool160_uses_F[0]); // Message to 'vbool422' from AreEqual factor this.vbool422_F = BooleanAreEqualOp.AreEqualAverageConditional(this.vbool182_uses_F[1], this.vbool160_uses_F[0]); // Message to 'vbool422_marginal' from ReplicateWithMarginal factor this.vbool422_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool422_uses_B, this.vbool422_F, this.vbool422_marginal_B); // Message to 'vbool182_uses' from UsesEqualDef factor this.vbool182_uses_F[2] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool182_uses_B, this.vbool182_F, 2, this.vbool182_uses_F[2]); // Message to 'vbool156_uses' from AreEqual factor this.vbool156_uses_B[0] = BooleanAreEqualOp.BAverageConditional(this.vbool443_B, this.vbool182_uses_F[2]); // Message to 'vbool156_marginal' from UsesEqualDef factor this.vbool156_marginal_B = UsesEqualDefOp.MarginalAverageConditional<Bernoulli>(this.vbool156_uses_B, this.vbool156_F, this.vbool156_marginal_B); // Message to 'vbool443' from AreEqual factor this.vbool443_F = BooleanAreEqualOp.AreEqualAverageConditional(this.vbool182_uses_F[2], this.vbool156_uses_F[0]); // Message to 'vbool443_marginal' from ReplicateWithMarginal factor this.vbool443_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool443_uses_B, this.vbool443_F, this.vbool443_marginal_B); // Message to 'vbool182_marginal' from UsesEqualDef factor this.vbool182_marginal_B = UsesEqualDefOp.MarginalAverageConditional<Bernoulli>(this.vbool182_uses_B, this.vbool182_F, this.vbool182_marginal_B); // Message to 'vbool269' from And factor this.vbool269_F = BooleanAndOp.AndAverageConditional(this.vbool142_uses_F[1], this.vbool110_uses_F[6]); // Message to 'vbool269_marginal' from ReplicateWithMarginal factor this.vbool269_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool269_uses_B, this.vbool269_F, this.vbool269_marginal_B); // Message to 'vbool269_uses' from ReplicateWithMarginal factor this.vbool269_uses_F[0] = ReplicateOp.UsesAverageConditional<Bernoulli>(this.vbool269_uses_B, this.vbool269_F, 0, this.vbool269_uses_F[0]); // Message to 'vbool266' from And factor this.vbool266_F = BooleanAndOp.AndAverageConditional(this.vbool142_uses_F[2], this.vbool108_uses_F[5]); // Message to 'vbool266_marginal' from ReplicateWithMarginal factor this.vbool266_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool266_uses_B, this.vbool266_F, this.vbool266_marginal_B); // Message to 'vbool266_uses' from ReplicateWithMarginal factor this.vbool266_uses_F[0] = ReplicateOp.UsesAverageConditional<Bernoulli>(this.vbool266_uses_B, this.vbool266_F, 0, this.vbool266_uses_F[0]); // Message to 'vbool113_uses' from And factor this.vbool113_uses_B[6] = BooleanAndOp.BAverageConditional(this.vbool267_B, this.vbool266_uses_F[0]); // Message to 'vbool272' from And factor this.vbool272_F = BooleanAndOp.AndAverageConditional(this.vbool142_uses_F[3], this.vbool108_uses_F[6]); // Message to 'vbool272_marginal' from ReplicateWithMarginal factor this.vbool272_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool272_uses_B, this.vbool272_F, this.vbool272_marginal_B); // Message to 'vbool272_uses' from ReplicateWithMarginal factor this.vbool272_uses_F[0] = ReplicateOp.UsesAverageConditional<Bernoulli>(this.vbool272_uses_B, this.vbool272_F, 0, this.vbool272_uses_F[0]); // Message to 'vbool273' from And factor this.vbool273_F = BooleanAndOp.AndAverageConditional(this.vbool272_uses_F[0], this.vbool115_uses_F[8]); // Message to 'vbool273_marginal' from ReplicateWithMarginal factor this.vbool273_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool273_uses_B, this.vbool273_F, this.vbool273_marginal_B); // Message to 'vbool273_uses' from ReplicateWithMarginal factor this.vbool273_uses_F[0] = ReplicateOp.UsesAverageConditional<Bernoulli>(this.vbool273_uses_B, this.vbool273_F, 0, this.vbool273_uses_F[0]); // Message to 'vbool270' from And factor this.vbool270_F = BooleanAndOp.AndAverageConditional(this.vbool269_uses_F[0], this.vbool113_uses_F[4]); // Message to 'vbool270_marginal' from ReplicateWithMarginal factor this.vbool270_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool270_uses_B, this.vbool270_F, this.vbool270_marginal_B); // Message to 'vbool270_uses' from ReplicateWithMarginal factor this.vbool270_uses_F[0] = ReplicateOp.UsesAverageConditional<Bernoulli>(this.vbool270_uses_B, this.vbool270_F, 0, this.vbool270_uses_F[0]); // Message to 'vbool267' from And factor this.vbool267_F = BooleanAndOp.AndAverageConditional(this.vbool266_uses_F[0], this.vbool113_uses_F[6]); // Message to 'vbool267_marginal' from ReplicateWithMarginal factor this.vbool267_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool267_uses_B, this.vbool267_F, this.vbool267_marginal_B); // Message to 'vbool267_uses' from ReplicateWithMarginal factor this.vbool267_uses_F[0] = ReplicateOp.UsesAverageConditional<Bernoulli>(this.vbool267_uses_B, this.vbool267_F, 0, this.vbool267_uses_F[0]); // Message to 'vbool265_uses' from Or factor this.vbool265_uses_B[0] = BooleanOrOp.BAverageConditional(this.vbool268_B, this.vbool267_uses_F[0]); // Message to 'vbool265_marginal' from ReplicateWithMarginal factor this.vbool265_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool265_uses_B, this.vbool265_F, this.vbool265_marginal_B); // Message to 'vbool265' from ReplicateWithMarginal factor this.vbool265_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool265_uses_B, this.vbool265_B); // Message to 'vbool264_uses' from Or factor this.vbool264_uses_B[0] = BooleanOrOp.AAverageConditional(this.vbool265_B, this.vbool262_uses_F[0]); // Message to 'vbool264' from ReplicateWithMarginal factor this.vbool264_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool264_uses_B, this.vbool264_B); // Message to 'vbool115_uses' from And factor this.vbool115_uses_B[7] = BooleanAndOp.BAverageConditional(this.vbool264_B, this.vbool263_uses_F[0]); // Message to 'vbool263_uses' from And factor this.vbool263_uses_B[0] = BooleanAndOp.AAverageConditional(this.vbool264_B, this.vbool115_uses_F[7]); // Message to 'vbool263' from ReplicateWithMarginal factor this.vbool263_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool263_uses_B, this.vbool263_B); // Message to 'vbool109_uses' from And factor this.vbool109_uses_B[4] = BooleanAndOp.BAverageConditional(this.vbool263_B, this.vbool141_uses_F[7]); // Message to 'vbool141_uses' from And factor this.vbool141_uses_B[7] = BooleanAndOp.AAverageConditional(this.vbool263_B, this.vbool109_uses_F[4]); // Message to 'vbool262_uses' from Or factor this.vbool262_uses_B[0] = BooleanOrOp.BAverageConditional(this.vbool265_B, this.vbool264_uses_F[0]); // Message to 'vbool262_marginal' from ReplicateWithMarginal factor this.vbool262_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool262_uses_B, this.vbool262_F, this.vbool262_marginal_B); // Message to 'vbool262' from ReplicateWithMarginal factor this.vbool262_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool262_uses_B, this.vbool262_B); // Message to 'vbool261_uses' from Or factor this.vbool261_uses_B[0] = BooleanOrOp.AAverageConditional(this.vbool262_B, this.vbool259_uses_F[0]); // Message to 'vbool261' from ReplicateWithMarginal factor this.vbool261_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool261_uses_B, this.vbool261_B); // Message to 'vbool260_uses' from And factor this.vbool260_uses_B[0] = BooleanAndOp.AAverageConditional(this.vbool261_B, this.vbool114_uses_F[3]); // Message to 'vbool260' from ReplicateWithMarginal factor this.vbool260_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool260_uses_B, this.vbool260_B); // Message to 'vbool110_uses' from And factor this.vbool110_uses_B[5] = BooleanAndOp.BAverageConditional(this.vbool260_B, this.vbool141_uses_F[3]); // Message to 'vbool141_uses' from And factor this.vbool141_uses_B[3] = BooleanAndOp.AAverageConditional(this.vbool260_B, this.vbool110_uses_F[5]); // Message to 'vbool114_uses' from And factor this.vbool114_uses_B[3] = BooleanAndOp.BAverageConditional(this.vbool261_B, this.vbool260_uses_F[0]); // Message to 'vbool259_uses' from Or factor this.vbool259_uses_B[0] = BooleanOrOp.BAverageConditional(this.vbool262_B, this.vbool261_uses_F[0]); // Message to 'vbool259_marginal' from ReplicateWithMarginal factor this.vbool259_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool259_uses_B, this.vbool259_F, this.vbool259_marginal_B); // Message to 'vbool259' from ReplicateWithMarginal factor this.vbool259_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool259_uses_B, this.vbool259_B); // Message to 'vbool258_uses' from Or factor this.vbool258_uses_B[0] = BooleanOrOp.AAverageConditional(this.vbool259_B, this.vbool256_uses_F[0]); // Message to 'vbool258' from ReplicateWithMarginal factor this.vbool258_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool258_uses_B, this.vbool258_B); // Message to 'vbool257_uses' from And factor this.vbool257_uses_B[0] = BooleanAndOp.AAverageConditional(this.vbool258_B, this.vbool114_uses_F[5]); // Message to 'vbool257' from ReplicateWithMarginal factor this.vbool257_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool257_uses_B, this.vbool257_B); // Message to 'vbool109_uses' from And factor this.vbool109_uses_B[3] = BooleanAndOp.BAverageConditional(this.vbool257_B, this.vbool141_uses_F[6]); // Message to 'vbool109_uses' from UsesEqualDef factor this.vbool109_uses_F[0] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool109_uses_B, this.vbool109_F, 0, this.vbool109_uses_F[0]); // Message to 'vbool109_uses' from UsesEqualDef factor this.vbool109_uses_F[1] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool109_uses_B, this.vbool109_F, 1, this.vbool109_uses_F[1]); // Message to 'vbool233' from And factor this.vbool233_F = BooleanAndOp.AndAverageConditional(this.vbool145_uses_F[9], this.vbool109_uses_F[0]); // Message to 'vbool233_uses' from ReplicateWithMarginal factor this.vbool233_uses_F[0] = ReplicateOp.UsesAverageConditional<Bernoulli>(this.vbool233_uses_B, this.vbool233_F, 0, this.vbool233_uses_F[0]); // Message to 'vbool239' from And factor this.vbool239_F = BooleanAndOp.AndAverageConditional(this.vbool145_uses_F[11], this.vbool109_uses_F[1]); // Message to 'vbool239_uses' from ReplicateWithMarginal factor this.vbool239_uses_F[0] = ReplicateOp.UsesAverageConditional<Bernoulli>(this.vbool239_uses_B, this.vbool239_F, 0, this.vbool239_uses_F[0]); // Message to 'vbool141_uses' from And factor this.vbool141_uses_B[6] = BooleanAndOp.AAverageConditional(this.vbool257_B, this.vbool109_uses_F[3]); // Message to 'vbool114_uses' from And factor this.vbool114_uses_B[5] = BooleanAndOp.BAverageConditional(this.vbool258_B, this.vbool257_uses_F[0]); // Message to 'vbool114_uses' from UsesEqualDef factor this.vbool114_uses_F[0] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool114_uses_B, this.vbool114_F, 0, this.vbool114_uses_F[0]); // Message to 'vbool234' from And factor this.vbool234_F = BooleanAndOp.AndAverageConditional(this.vbool233_uses_F[0], this.vbool114_uses_F[0]); // Message to 'vbool234_uses' from ReplicateWithMarginal factor this.vbool234_uses_F[0] = ReplicateOp.UsesAverageConditional<Bernoulli>(this.vbool234_uses_B, this.vbool234_F, 0, this.vbool234_uses_F[0]); // Message to 'vbool114_uses' from UsesEqualDef factor this.vbool114_uses_F[1] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool114_uses_B, this.vbool114_F, 1, this.vbool114_uses_F[1]); // Message to 'vbool237' from And factor this.vbool237_F = BooleanAndOp.AndAverageConditional(this.vbool236_uses_F[0], this.vbool114_uses_F[1]); // Message to 'vbool237_uses' from ReplicateWithMarginal factor this.vbool237_uses_F[0] = ReplicateOp.UsesAverageConditional<Bernoulli>(this.vbool237_uses_B, this.vbool237_F, 0, this.vbool237_uses_F[0]); // Message to 'vbool240' from And factor this.vbool240_F = BooleanAndOp.AndAverageConditional(this.vbool239_uses_F[0], this.vbool115_uses_F[2]); // Message to 'vbool240_uses' from ReplicateWithMarginal factor this.vbool240_uses_F[0] = ReplicateOp.UsesAverageConditional<Bernoulli>(this.vbool240_uses_B, this.vbool240_F, 0, this.vbool240_uses_F[0]); // Message to 'vbool256_uses' from Or factor this.vbool256_uses_B[0] = BooleanOrOp.BAverageConditional(this.vbool259_B, this.vbool258_uses_F[0]); // Message to 'vbool256_marginal' from ReplicateWithMarginal factor this.vbool256_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool256_uses_B, this.vbool256_F, this.vbool256_marginal_B); // Message to 'vbool256' from ReplicateWithMarginal factor this.vbool256_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool256_uses_B, this.vbool256_B); // Message to 'vbool255_uses' from Or factor this.vbool255_uses_B[0] = BooleanOrOp.AAverageConditional(this.vbool256_B, this.vbool253_uses_F[0]); // Message to 'vbool255' from ReplicateWithMarginal factor this.vbool255_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool255_uses_B, this.vbool255_B); // Message to 'vbool254_uses' from And factor this.vbool254_uses_B[0] = BooleanAndOp.AAverageConditional(this.vbool255_B, this.vbool113_uses_F[3]); // Message to 'vbool254' from ReplicateWithMarginal factor this.vbool254_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool254_uses_B, this.vbool254_B); // Message to 'vbool110_uses' from And factor this.vbool110_uses_B[4] = BooleanAndOp.BAverageConditional(this.vbool254_B, this.vbool141_uses_F[2]); // Message to 'vbool141_uses' from And factor this.vbool141_uses_B[2] = BooleanAndOp.AAverageConditional(this.vbool254_B, this.vbool110_uses_F[4]); // Message to 'vbool113_uses' from And factor this.vbool113_uses_B[3] = BooleanAndOp.BAverageConditional(this.vbool255_B, this.vbool254_uses_F[0]); // Message to 'vbool253_uses' from Or factor this.vbool253_uses_B[0] = BooleanOrOp.BAverageConditional(this.vbool256_B, this.vbool255_uses_F[0]); // Message to 'vbool253_marginal' from ReplicateWithMarginal factor this.vbool253_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool253_uses_B, this.vbool253_F, this.vbool253_marginal_B); // Message to 'vbool253' from ReplicateWithMarginal factor this.vbool253_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool253_uses_B, this.vbool253_B); // Message to 'vbool252_uses' from Or factor this.vbool252_uses_B[0] = BooleanOrOp.AAverageConditional(this.vbool253_B, this.vbool250_uses_F[0]); // Message to 'vbool252' from ReplicateWithMarginal factor this.vbool252_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool252_uses_B, this.vbool252_B); // Message to 'vbool115_uses' from And factor this.vbool115_uses_B[6] = BooleanAndOp.BAverageConditional(this.vbool252_B, this.vbool251_uses_F[0]); // Message to 'vbool251_uses' from And factor this.vbool251_uses_B[0] = BooleanAndOp.AAverageConditional(this.vbool252_B, this.vbool115_uses_F[6]); // Message to 'vbool251' from ReplicateWithMarginal factor this.vbool251_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool251_uses_B, this.vbool251_B); // Message to 'vbool108_uses' from And factor this.vbool108_uses_B[4] = BooleanAndOp.BAverageConditional(this.vbool251_B, this.vbool141_uses_F[5]); // Message to 'vbool141_uses' from And factor this.vbool141_uses_B[5] = BooleanAndOp.AAverageConditional(this.vbool251_B, this.vbool108_uses_F[4]); // Message to 'vbool250_uses' from Or factor this.vbool250_uses_B[0] = BooleanOrOp.BAverageConditional(this.vbool253_B, this.vbool252_uses_F[0]); // Message to 'vbool250_marginal' from ReplicateWithMarginal factor this.vbool250_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool250_uses_B, this.vbool250_F, this.vbool250_marginal_B); // Message to 'vbool250' from ReplicateWithMarginal factor this.vbool250_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool250_uses_B, this.vbool250_B); // Message to 'vbool249_uses' from Or factor this.vbool249_uses_B[0] = BooleanOrOp.AAverageConditional(this.vbool250_B, this.vbool247_uses_F[0]); // Message to 'vbool249' from ReplicateWithMarginal factor this.vbool249_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool249_uses_B, this.vbool249_B); // Message to 'vbool248_uses' from And factor this.vbool248_uses_B[0] = BooleanAndOp.AAverageConditional(this.vbool249_B, this.vbool113_uses_F[5]); // Message to 'vbool248' from ReplicateWithMarginal factor this.vbool248_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool248_uses_B, this.vbool248_B); // Message to 'vbool108_uses' from And factor this.vbool108_uses_B[3] = BooleanAndOp.BAverageConditional(this.vbool248_B, this.vbool141_uses_F[4]); // Message to 'vbool108_uses' from UsesEqualDef factor this.vbool108_uses_F[0] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool108_uses_B, this.vbool108_F, 0, this.vbool108_uses_F[0]); // Message to 'vbool108_uses' from UsesEqualDef factor this.vbool108_uses_F[1] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool108_uses_B, this.vbool108_F, 1, this.vbool108_uses_F[1]); // Message to 'vbool224' from And factor this.vbool224_F = BooleanAndOp.AndAverageConditional(this.vbool145_uses_F[6], this.vbool108_uses_F[0]); // Message to 'vbool224_uses' from ReplicateWithMarginal factor this.vbool224_uses_F[0] = ReplicateOp.UsesAverageConditional<Bernoulli>(this.vbool224_uses_B, this.vbool224_F, 0, this.vbool224_uses_F[0]); // Message to 'vbool227' from And factor this.vbool227_F = BooleanAndOp.AndAverageConditional(this.vbool145_uses_F[7], this.vbool108_uses_F[1]); // Message to 'vbool227_uses' from ReplicateWithMarginal factor this.vbool227_uses_F[0] = ReplicateOp.UsesAverageConditional<Bernoulli>(this.vbool227_uses_B, this.vbool227_F, 0, this.vbool227_uses_F[0]); // Message to 'vbool141_uses' from And factor this.vbool141_uses_B[4] = BooleanAndOp.AAverageConditional(this.vbool248_B, this.vbool108_uses_F[3]); // Message to 'vbool113_uses' from And factor this.vbool113_uses_B[5] = BooleanAndOp.BAverageConditional(this.vbool249_B, this.vbool248_uses_F[0]); // Message to 'vbool113_uses' from UsesEqualDef factor this.vbool113_uses_F[0] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool113_uses_B, this.vbool113_F, 0, this.vbool113_uses_F[0]); // Message to 'vbool225' from And factor this.vbool225_F = BooleanAndOp.AndAverageConditional(this.vbool224_uses_F[0], this.vbool113_uses_F[0]); // Message to 'vbool225_uses' from ReplicateWithMarginal factor this.vbool225_uses_F[0] = ReplicateOp.UsesAverageConditional<Bernoulli>(this.vbool225_uses_B, this.vbool225_F, 0, this.vbool225_uses_F[0]); // Message to 'vbool113_uses' from UsesEqualDef factor this.vbool113_uses_F[1] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool113_uses_B, this.vbool113_F, 1, this.vbool113_uses_F[1]); // Message to 'vbool228' from And factor this.vbool228_F = BooleanAndOp.AndAverageConditional(this.vbool227_uses_F[0], this.vbool115_uses_F[1]); // Message to 'vbool228_uses' from ReplicateWithMarginal factor this.vbool228_uses_F[0] = ReplicateOp.UsesAverageConditional<Bernoulli>(this.vbool228_uses_B, this.vbool228_F, 0, this.vbool228_uses_F[0]); // Message to 'vbool231' from And factor this.vbool231_F = BooleanAndOp.AndAverageConditional(this.vbool230_uses_F[0], this.vbool113_uses_F[1]); // Message to 'vbool231_uses' from ReplicateWithMarginal factor this.vbool231_uses_F[0] = ReplicateOp.UsesAverageConditional<Bernoulli>(this.vbool231_uses_B, this.vbool231_F, 0, this.vbool231_uses_F[0]); // Message to 'vbool247_uses' from Or factor this.vbool247_uses_B[0] = BooleanOrOp.BAverageConditional(this.vbool250_B, this.vbool249_uses_F[0]); // Message to 'vbool247_marginal' from ReplicateWithMarginal factor this.vbool247_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool247_uses_B, this.vbool247_F, this.vbool247_marginal_B); // Message to 'vbool247' from ReplicateWithMarginal factor this.vbool247_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool247_uses_B, this.vbool247_B); // Message to 'vbool246_uses' from Or factor this.vbool246_uses_B[0] = BooleanOrOp.AAverageConditional(this.vbool247_B, this.vbool244_uses_F[0]); // Message to 'vbool246' from ReplicateWithMarginal factor this.vbool246_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool246_uses_B, this.vbool246_B); // Message to 'vbool112_uses' from And factor this.vbool112_uses_B[2] = BooleanAndOp.BAverageConditional(this.vbool246_B, this.vbool245_uses_F[0]); // Message to 'vbool112_uses' from UsesEqualDef factor this.vbool112_uses_F[0] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool112_uses_B, this.vbool112_F, 0, this.vbool112_uses_F[0]); // Message to 'vbool112_uses' from UsesEqualDef factor this.vbool112_uses_F[1] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool112_uses_B, this.vbool112_F, 1, this.vbool112_uses_F[1]); // Message to 'vbool63_uses' from AreEqual factor this.vbool63_uses_B[2] = BooleanAreEqualOp.AAverageConditional(this.vbool373_B, this.vbool112_uses_F[1]); // Message to 'vbool222' from And factor this.vbool222_F = BooleanAndOp.AndAverageConditional(this.vbool221_uses_F[0], this.vbool112_uses_F[0]); // Message to 'vbool222_uses' from ReplicateWithMarginal factor this.vbool222_uses_F[0] = ReplicateOp.UsesAverageConditional<Bernoulli>(this.vbool222_uses_B, this.vbool222_F, 0, this.vbool222_uses_F[0]); // Message to 'vbool245_uses' from And factor this.vbool245_uses_B[0] = BooleanAndOp.AAverageConditional(this.vbool246_B, this.vbool112_uses_F[2]); // Message to 'vbool245' from ReplicateWithMarginal factor this.vbool245_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool245_uses_B, this.vbool245_B); // Message to 'vbool141_uses' from And factor this.vbool141_uses_B[9] = BooleanAndOp.AAverageConditional(this.vbool245_B, this.vbool115_uses_F[3]); // Message to 'vbool141_uses' from UsesEqualDef factor this.vbool141_uses_F[1] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool141_uses_B, this.vbool141_F, 1, this.vbool141_uses_F[1]); // Message to 'vbool141_uses' from UsesEqualDef factor this.vbool141_uses_F[0] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool141_uses_B, this.vbool141_F, 0, this.vbool141_uses_F[0]); // Message to 'vbool63_uses' from AreEqual factor this.vbool63_uses_B[0] = BooleanAreEqualOp.AAverageConditional(this.vbool370_B, this.vbool141_uses_F[0]); // Message to 'vbool63_uses' from UsesEqualDef factor this.vbool63_uses_F[1] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool63_uses_B, this.vbool63_F, 1, this.vbool63_uses_F[1]); // Message to 'vbool42_uses' from AreEqual factor this.vbool42_uses_B[0] = BooleanAreEqualOp.BAverageConditional(this.vbool206_B, this.vbool63_uses_F[1]); // Message to 'vbool42_uses' from UsesEqualDef factor this.vbool42_uses_F[1] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool42_uses_B, this.vbool42_F, 1, this.vbool42_uses_F[1]); // Message to 'vbool11_uses' from AreEqual factor this.vbool11_uses_B[0] = BooleanAreEqualOp.BAverageConditional(this.vbool185_B, this.vbool42_uses_F[1]); // Message to 'vbool11_uses' from UsesEqualDef factor this.vbool11_uses_F[1] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool11_uses_B, this.vbool11_F, 1, this.vbool11_uses_F[1]); // Message to 'vbool37_uses' from AreEqual factor this.vbool37_uses_B[1] = BooleanAreEqualOp.AAverageConditional(this.vbool411_B, this.vbool11_uses_F[1]); // Message to 'vbool37_uses' from UsesEqualDef factor this.vbool37_uses_F[0] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool37_uses_B, this.vbool37_F, 0, this.vbool37_uses_F[0]); // Message to 'vbool16_uses' from AreEqual factor this.vbool16_uses_B[1] = BooleanAreEqualOp.BAverageConditional(this.vbool201_B, this.vbool37_uses_F[0]); // Message to 'vbool16_uses' from UsesEqualDef factor this.vbool16_uses_F[0] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool16_uses_B, this.vbool16_F, 0, this.vbool16_uses_F[0]); // Message to 'vbool141_uses' from AreEqual factor this.vbool141_uses_B[8] = BooleanAreEqualOp.BAverageConditional(this.vbool195_B, this.vbool16_uses_F[0]); // Message to 'vbool63_uses' from UsesEqualDef factor this.vbool63_uses_F[3] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool63_uses_B, this.vbool63_F, 3, this.vbool63_uses_F[3]); // Message to 'vbool68_uses' from AreEqual factor this.vbool68_uses_B[0] = BooleanAreEqualOp.BAverageConditional(this.vbool375_B, this.vbool63_uses_F[3]); // Message to 'vbool68_uses' from UsesEqualDef factor this.vbool68_uses_F[1] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool68_uses_B, this.vbool68_F, 1, this.vbool68_uses_F[1]); // Message to 'vbool89_uses' from AreEqual factor this.vbool89_uses_B[0] = BooleanAreEqualOp.AAverageConditional(this.vbool211_B, this.vbool68_uses_F[1]); // Message to 'vbool89_uses' from UsesEqualDef factor this.vbool89_uses_F[1] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool89_uses_B, this.vbool89_F, 1, this.vbool89_uses_F[1]); // Message to 'vbool154_uses' from AreEqual factor this.vbool154_uses_B[1] = BooleanAreEqualOp.BAverageConditional(this.vbool452_B, this.vbool89_uses_F[1]); // Message to 'vbool154_uses' from UsesEqualDef factor this.vbool154_uses_F[0] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool154_uses_B, this.vbool154_F, 0, this.vbool154_uses_F[0]); // Message to 'vbool180_uses' from AreEqual factor this.vbool180_uses_B[2] = BooleanAreEqualOp.AAverageConditional(this.vbool442_B, this.vbool154_uses_F[0]); // Message to 'vbool180_uses' from UsesEqualDef factor this.vbool180_uses_F[0] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool180_uses_B, this.vbool180_F, 0, this.vbool180_uses_F[0]); // Message to 'vbool102_uses' from AreEqual factor this.vbool102_uses_B[1] = BooleanAreEqualOp.AAverageConditional(this.vbool447_B, this.vbool180_uses_F[0]); // Message to 'vbool102_uses' from UsesEqualDef factor this.vbool102_uses_F[0] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool102_uses_B, this.vbool102_F, 0, this.vbool102_uses_F[0]); // Message to 'vbool107_uses' from AreEqual factor this.vbool107_uses_B[1] = BooleanAreEqualOp.AAverageConditional(this.vbool190_B, this.vbool102_uses_F[0]); // Message to 'vbool107_uses' from UsesEqualDef factor this.vbool107_uses_F[0] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool107_uses_B, this.vbool107_F, 0, this.vbool107_uses_F[0]); // Message to 'vbool107_uses' from UsesEqualDef factor this.vbool107_uses_F[2] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool107_uses_B, this.vbool107_F, 2, this.vbool107_uses_F[2]); // Message to 'vbool242' from And factor this.vbool242_F = BooleanAndOp.AndAverageConditional(this.vbool141_uses_F[1], this.vbool107_uses_F[2]); // Message to 'vbool242_uses' from ReplicateWithMarginal factor this.vbool242_uses_F[0] = ReplicateOp.UsesAverageConditional<Bernoulli>(this.vbool242_uses_B, this.vbool242_F, 0, this.vbool242_uses_F[0]); // Message to 'vbool180_uses' from UsesEqualDef factor this.vbool180_uses_F[1] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool180_uses_B, this.vbool180_F, 1, this.vbool180_uses_F[1]); // Message to 'vbool159_uses' from AreEqual factor this.vbool159_uses_B[0] = BooleanAreEqualOp.BAverageConditional(this.vbool421_B, this.vbool180_uses_F[1]); // Message to 'vbool159_uses' from UsesEqualDef factor this.vbool159_uses_F[1] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool159_uses_B, this.vbool159_F, 1, this.vbool159_uses_F[1]); // Message to 'vbool154_uses' from AreEqual factor this.vbool154_uses_B[2] = BooleanAreEqualOp.BAverageConditional(this.vbool415_B, this.vbool159_uses_F[1]); // Message to 'vbool154_uses' from UsesEqualDef factor this.vbool154_uses_F[1] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool154_uses_B, this.vbool154_F, 1, this.vbool154_uses_F[1]); // Message to 'vbool89_uses' from AreEqual factor this.vbool89_uses_B[1] = BooleanAreEqualOp.AAverageConditional(this.vbool452_B, this.vbool154_uses_F[1]); // Message to 'vbool89_marginal' from UsesEqualDef factor this.vbool89_marginal_B = UsesEqualDefOp.MarginalAverageConditional<Bernoulli>(this.vbool89_uses_B, this.vbool89_F, this.vbool89_marginal_B); // Message to 'vbool452' from AreEqual factor this.vbool452_F = BooleanAreEqualOp.AreEqualAverageConditional(this.vbool89_uses_F[1], this.vbool154_uses_F[1]); // Message to 'vbool452_marginal' from ReplicateWithMarginal factor this.vbool452_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool452_uses_B, this.vbool452_F, this.vbool452_marginal_B); // Message to 'vbool89_uses' from UsesEqualDef factor this.vbool89_uses_F[0] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool89_uses_B, this.vbool89_F, 0, this.vbool89_uses_F[0]); // Message to 'vbool68_uses' from AreEqual factor this.vbool68_uses_B[1] = BooleanAreEqualOp.BAverageConditional(this.vbool211_B, this.vbool89_uses_F[0]); // Message to 'vbool68_marginal' from UsesEqualDef factor this.vbool68_marginal_B = UsesEqualDefOp.MarginalAverageConditional<Bernoulli>(this.vbool68_uses_B, this.vbool68_F, this.vbool68_marginal_B); // Message to 'vbool211' from AreEqual factor this.vbool211_F = BooleanAreEqualOp.AreEqualAverageConditional(this.vbool89_uses_F[0], this.vbool68_uses_F[1]); // Message to 'vbool211_marginal' from ReplicateWithMarginal factor this.vbool211_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool211_uses_B, this.vbool211_F, this.vbool211_marginal_B); // Message to 'vbool68_uses' from UsesEqualDef factor this.vbool68_uses_F[0] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool68_uses_B, this.vbool68_F, 0, this.vbool68_uses_F[0]); // Message to 'vbool63_uses' from AreEqual factor this.vbool63_uses_B[3] = BooleanAreEqualOp.AAverageConditional(this.vbool375_B, this.vbool68_uses_F[0]); // Message to 'vbool375' from AreEqual factor this.vbool375_F = BooleanAreEqualOp.AreEqualAverageConditional(this.vbool63_uses_F[3], this.vbool68_uses_F[0]); // Message to 'vbool375_marginal' from ReplicateWithMarginal factor this.vbool375_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool375_uses_B, this.vbool375_F, this.vbool375_marginal_B); // Message to 'vbool375_uses' from ReplicateWithMarginal factor this.vbool375_uses_F[0] = ReplicateOp.UsesAverageConditional<Bernoulli>(this.vbool375_uses_B, this.vbool375_F, 0, this.vbool375_uses_F[0]); // Message to 'vbool63_uses' from UsesEqualDef factor this.vbool63_uses_F[0] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool63_uses_B, this.vbool63_F, 0, this.vbool63_uses_F[0]); // Message to 'vbool141_uses' from AreEqual factor this.vbool141_uses_B[0] = BooleanAreEqualOp.BAverageConditional(this.vbool370_B, this.vbool63_uses_F[0]); // Message to 'vbool370' from AreEqual factor this.vbool370_F = BooleanAreEqualOp.AreEqualAverageConditional(this.vbool63_uses_F[0], this.vbool141_uses_F[0]); // Message to 'vbool370_marginal' from ReplicateWithMarginal factor this.vbool370_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool370_uses_B, this.vbool370_F, this.vbool370_marginal_B); // Message to 'vbool370_uses' from ReplicateWithMarginal factor this.vbool370_uses_F[0] = ReplicateOp.UsesAverageConditional<Bernoulli>(this.vbool370_uses_B, this.vbool370_F, 0, this.vbool370_uses_F[0]); // Message to 'vbool141_uses' from UsesEqualDef factor this.vbool141_uses_F[2] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool141_uses_B, this.vbool141_F, 2, this.vbool141_uses_F[2]); // Message to 'vbool141_uses' from UsesEqualDef factor this.vbool141_uses_F[3] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool141_uses_B, this.vbool141_F, 3, this.vbool141_uses_F[3]); // Message to 'vbool141_uses' from UsesEqualDef factor this.vbool141_uses_F[4] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool141_uses_B, this.vbool141_F, 4, this.vbool141_uses_F[4]); // Message to 'vbool141_uses' from UsesEqualDef factor this.vbool141_uses_F[5] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool141_uses_B, this.vbool141_F, 5, this.vbool141_uses_F[5]); // Message to 'vbool141_uses' from UsesEqualDef factor this.vbool141_uses_F[6] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool141_uses_B, this.vbool141_F, 6, this.vbool141_uses_F[6]); // Message to 'vbool141_uses' from UsesEqualDef factor this.vbool141_uses_F[7] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool141_uses_B, this.vbool141_F, 7, this.vbool141_uses_F[7]); // Message to 'vbool141_uses' from UsesEqualDef factor this.vbool141_uses_F[9] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool141_uses_B, this.vbool141_F, 9, this.vbool141_uses_F[9]); // Message to 'vbool115_uses' from And factor this.vbool115_uses_B[3] = BooleanAndOp.BAverageConditional(this.vbool245_B, this.vbool141_uses_F[9]); // Message to 'vbool141_uses' from UsesEqualDef factor this.vbool141_uses_F[8] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool141_uses_B, this.vbool141_F, 8, this.vbool141_uses_F[8]); // Message to 'vbool16_uses' from AreEqual factor this.vbool16_uses_B[0] = BooleanAreEqualOp.AAverageConditional(this.vbool195_B, this.vbool141_uses_F[8]); // Message to 'vbool16_marginal' from UsesEqualDef factor this.vbool16_marginal_B = UsesEqualDefOp.MarginalAverageConditional<Bernoulli>(this.vbool16_uses_B, this.vbool16_F, this.vbool16_marginal_B); // Message to 'vbool195' from AreEqual factor this.vbool195_F = BooleanAreEqualOp.AreEqualAverageConditional(this.vbool16_uses_F[0], this.vbool141_uses_F[8]); // Message to 'vbool195_marginal' from ReplicateWithMarginal factor this.vbool195_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool195_uses_B, this.vbool195_F, this.vbool195_marginal_B); // Message to 'vbool16_uses' from UsesEqualDef factor this.vbool16_uses_F[1] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool16_uses_B, this.vbool16_F, 1, this.vbool16_uses_F[1]); // Message to 'vbool37_uses' from AreEqual factor this.vbool37_uses_B[0] = BooleanAreEqualOp.AAverageConditional(this.vbool201_B, this.vbool16_uses_F[1]); // Message to 'vbool37_marginal' from UsesEqualDef factor this.vbool37_marginal_B = UsesEqualDefOp.MarginalAverageConditional<Bernoulli>(this.vbool37_uses_B, this.vbool37_F, this.vbool37_marginal_B); // Message to 'vbool201' from AreEqual factor this.vbool201_F = BooleanAreEqualOp.AreEqualAverageConditional(this.vbool37_uses_F[0], this.vbool16_uses_F[1]); // Message to 'vbool201_marginal' from ReplicateWithMarginal factor this.vbool201_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool201_uses_B, this.vbool201_F, this.vbool201_marginal_B); // Message to 'vbool37_uses' from UsesEqualDef factor this.vbool37_uses_F[1] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool37_uses_B, this.vbool37_F, 1, this.vbool37_uses_F[1]); // Message to 'vbool11_uses' from AreEqual factor this.vbool11_uses_B[1] = BooleanAreEqualOp.BAverageConditional(this.vbool411_B, this.vbool37_uses_F[1]); // Message to 'vbool11_marginal' from UsesEqualDef factor this.vbool11_marginal_B = UsesEqualDefOp.MarginalAverageConditional<Bernoulli>(this.vbool11_uses_B, this.vbool11_F, this.vbool11_marginal_B); // Message to 'vbool411' from AreEqual factor this.vbool411_F = BooleanAreEqualOp.AreEqualAverageConditional(this.vbool37_uses_F[1], this.vbool11_uses_F[1]); // Message to 'vbool411_marginal' from ReplicateWithMarginal factor this.vbool411_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool411_uses_B, this.vbool411_F, this.vbool411_marginal_B); // Message to 'vbool11_uses' from UsesEqualDef factor this.vbool11_uses_F[0] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool11_uses_B, this.vbool11_F, 0, this.vbool11_uses_F[0]); // Message to 'vbool42_uses' from AreEqual factor this.vbool42_uses_B[1] = BooleanAreEqualOp.AAverageConditional(this.vbool185_B, this.vbool11_uses_F[0]); // Message to 'vbool42_marginal' from UsesEqualDef factor this.vbool42_marginal_B = UsesEqualDefOp.MarginalAverageConditional<Bernoulli>(this.vbool42_uses_B, this.vbool42_F, this.vbool42_marginal_B); // Message to 'vbool185' from AreEqual factor this.vbool185_F = BooleanAreEqualOp.AreEqualAverageConditional(this.vbool42_uses_F[1], this.vbool11_uses_F[0]); // Message to 'vbool185_marginal' from ReplicateWithMarginal factor this.vbool185_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool185_uses_B, this.vbool185_F, this.vbool185_marginal_B); // Message to 'vbool42_uses' from UsesEqualDef factor this.vbool42_uses_F[0] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool42_uses_B, this.vbool42_F, 0, this.vbool42_uses_F[0]); // Message to 'vbool63_uses' from AreEqual factor this.vbool63_uses_B[1] = BooleanAreEqualOp.AAverageConditional(this.vbool206_B, this.vbool42_uses_F[0]); // Message to 'vbool63_marginal' from UsesEqualDef factor this.vbool63_marginal_B = UsesEqualDefOp.MarginalAverageConditional<Bernoulli>(this.vbool63_uses_B, this.vbool63_F, this.vbool63_marginal_B); // Message to 'vbool206' from AreEqual factor this.vbool206_F = BooleanAreEqualOp.AreEqualAverageConditional(this.vbool63_uses_F[1], this.vbool42_uses_F[0]); // Message to 'vbool206_marginal' from ReplicateWithMarginal factor this.vbool206_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool206_uses_B, this.vbool206_F, this.vbool206_marginal_B); // Message to 'vbool63_uses' from UsesEqualDef factor this.vbool63_uses_F[2] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool63_uses_B, this.vbool63_F, 2, this.vbool63_uses_F[2]); // Message to 'vbool112_uses' from AreEqual factor this.vbool112_uses_B[1] = BooleanAreEqualOp.BAverageConditional(this.vbool373_B, this.vbool63_uses_F[2]); // Message to 'vbool373' from AreEqual factor this.vbool373_F = BooleanAreEqualOp.AreEqualAverageConditional(this.vbool63_uses_F[2], this.vbool112_uses_F[1]); // Message to 'vbool373_marginal' from ReplicateWithMarginal factor this.vbool373_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool373_uses_B, this.vbool373_F, this.vbool373_marginal_B); // Message to 'vbool373_uses' from ReplicateWithMarginal factor this.vbool373_uses_F[0] = ReplicateOp.UsesAverageConditional<Bernoulli>(this.vbool373_uses_B, this.vbool373_F, 0, this.vbool373_uses_F[0]); // Message to 'vbool141_marginal' from UsesEqualDef factor this.vbool141_marginal_B = UsesEqualDefOp.MarginalAverageConditional<Bernoulli>(this.vbool141_uses_B, this.vbool141_F, this.vbool141_marginal_B); // Message to 'vbool112_uses' from UsesEqualDef factor this.vbool112_uses_F[2] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool112_uses_B, this.vbool112_F, 2, this.vbool112_uses_F[2]); // Message to 'vbool154_uses' from UsesEqualDef factor this.vbool154_uses_F[2] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool154_uses_B, this.vbool154_F, 2, this.vbool154_uses_F[2]); // Message to 'vbool159_uses' from AreEqual factor this.vbool159_uses_B[1] = BooleanAreEqualOp.AAverageConditional(this.vbool415_B, this.vbool154_uses_F[2]); // Message to 'vbool159_marginal' from UsesEqualDef factor this.vbool159_marginal_B = UsesEqualDefOp.MarginalAverageConditional<Bernoulli>(this.vbool159_uses_B, this.vbool159_F, this.vbool159_marginal_B); // Message to 'vbool415' from AreEqual factor this.vbool415_F = BooleanAreEqualOp.AreEqualAverageConditional(this.vbool159_uses_F[1], this.vbool154_uses_F[2]); // Message to 'vbool415_marginal' from ReplicateWithMarginal factor this.vbool415_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool415_uses_B, this.vbool415_F, this.vbool415_marginal_B); // Message to 'vbool159_uses' from UsesEqualDef factor this.vbool159_uses_F[0] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool159_uses_B, this.vbool159_F, 0, this.vbool159_uses_F[0]); // Message to 'vbool180_uses' from AreEqual factor this.vbool180_uses_B[1] = BooleanAreEqualOp.AAverageConditional(this.vbool421_B, this.vbool159_uses_F[0]); // Message to 'vbool421' from AreEqual factor this.vbool421_F = BooleanAreEqualOp.AreEqualAverageConditional(this.vbool180_uses_F[1], this.vbool159_uses_F[0]); // Message to 'vbool421_marginal' from ReplicateWithMarginal factor this.vbool421_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool421_uses_B, this.vbool421_F, this.vbool421_marginal_B); // Message to 'vbool180_uses' from UsesEqualDef factor this.vbool180_uses_F[2] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool180_uses_B, this.vbool180_F, 2, this.vbool180_uses_F[2]); // Message to 'vbool154_uses' from AreEqual factor this.vbool154_uses_B[0] = BooleanAreEqualOp.BAverageConditional(this.vbool442_B, this.vbool180_uses_F[2]); // Message to 'vbool154_marginal' from UsesEqualDef factor this.vbool154_marginal_B = UsesEqualDefOp.MarginalAverageConditional<Bernoulli>(this.vbool154_uses_B, this.vbool154_F, this.vbool154_marginal_B); // Message to 'vbool442' from AreEqual factor this.vbool442_F = BooleanAreEqualOp.AreEqualAverageConditional(this.vbool180_uses_F[2], this.vbool154_uses_F[0]); // Message to 'vbool442_marginal' from ReplicateWithMarginal factor this.vbool442_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool442_uses_B, this.vbool442_F, this.vbool442_marginal_B); // Message to 'vbool112_marginal' from UsesEqualDef factor this.vbool112_marginal_B = UsesEqualDefOp.MarginalAverageConditional<Bernoulli>(this.vbool112_uses_B, this.vbool112_F, this.vbool112_marginal_B); // Message to 'vbool180_marginal' from UsesEqualDef factor this.vbool180_marginal_B = UsesEqualDefOp.MarginalAverageConditional<Bernoulli>(this.vbool180_uses_B, this.vbool180_F, this.vbool180_marginal_B); // Message to 'vbool218' from And factor this.vbool218_F = BooleanAndOp.AndAverageConditional(this.vbool145_uses_F[4], this.vbool107_uses_F[0]); // Message to 'vbool218_uses' from ReplicateWithMarginal factor this.vbool218_uses_F[0] = ReplicateOp.UsesAverageConditional<Bernoulli>(this.vbool218_uses_B, this.vbool218_F, 0, this.vbool218_uses_F[0]); // Message to 'vbool219' from And factor this.vbool219_F = BooleanAndOp.AndAverageConditional(this.vbool218_uses_F[0], this.vbool115_uses_F[0]); // Message to 'vbool219_uses' from ReplicateWithMarginal factor this.vbool219_uses_F[0] = ReplicateOp.UsesAverageConditional<Bernoulli>(this.vbool219_uses_B, this.vbool219_F, 0, this.vbool219_uses_F[0]); // Message to 'vbool254' from And factor this.vbool254_F = BooleanAndOp.AndAverageConditional(this.vbool141_uses_F[2], this.vbool110_uses_F[4]); // Message to 'vbool254_marginal' from ReplicateWithMarginal factor this.vbool254_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool254_uses_B, this.vbool254_F, this.vbool254_marginal_B); // Message to 'vbool254_uses' from ReplicateWithMarginal factor this.vbool254_uses_F[0] = ReplicateOp.UsesAverageConditional<Bernoulli>(this.vbool254_uses_B, this.vbool254_F, 0, this.vbool254_uses_F[0]); // Message to 'vbool260' from And factor this.vbool260_F = BooleanAndOp.AndAverageConditional(this.vbool141_uses_F[3], this.vbool110_uses_F[5]); // Message to 'vbool260_marginal' from ReplicateWithMarginal factor this.vbool260_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool260_uses_B, this.vbool260_F, this.vbool260_marginal_B); // Message to 'vbool260_uses' from ReplicateWithMarginal factor this.vbool260_uses_F[0] = ReplicateOp.UsesAverageConditional<Bernoulli>(this.vbool260_uses_B, this.vbool260_F, 0, this.vbool260_uses_F[0]); // Message to 'vbool248' from And factor this.vbool248_F = BooleanAndOp.AndAverageConditional(this.vbool141_uses_F[4], this.vbool108_uses_F[3]); // Message to 'vbool248_marginal' from ReplicateWithMarginal factor this.vbool248_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool248_uses_B, this.vbool248_F, this.vbool248_marginal_B); // Message to 'vbool248_uses' from ReplicateWithMarginal factor this.vbool248_uses_F[0] = ReplicateOp.UsesAverageConditional<Bernoulli>(this.vbool248_uses_B, this.vbool248_F, 0, this.vbool248_uses_F[0]); // Message to 'vbool251' from And factor this.vbool251_F = BooleanAndOp.AndAverageConditional(this.vbool141_uses_F[5], this.vbool108_uses_F[4]); // Message to 'vbool251_marginal' from ReplicateWithMarginal factor this.vbool251_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool251_uses_B, this.vbool251_F, this.vbool251_marginal_B); // Message to 'vbool251_uses' from ReplicateWithMarginal factor this.vbool251_uses_F[0] = ReplicateOp.UsesAverageConditional<Bernoulli>(this.vbool251_uses_B, this.vbool251_F, 0, this.vbool251_uses_F[0]); // Message to 'vbool257' from And factor this.vbool257_F = BooleanAndOp.AndAverageConditional(this.vbool141_uses_F[6], this.vbool109_uses_F[3]); // Message to 'vbool257_marginal' from ReplicateWithMarginal factor this.vbool257_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool257_uses_B, this.vbool257_F, this.vbool257_marginal_B); // Message to 'vbool257_uses' from ReplicateWithMarginal factor this.vbool257_uses_F[0] = ReplicateOp.UsesAverageConditional<Bernoulli>(this.vbool257_uses_B, this.vbool257_F, 0, this.vbool257_uses_F[0]); // Message to 'vbool263' from And factor this.vbool263_F = BooleanAndOp.AndAverageConditional(this.vbool141_uses_F[7], this.vbool109_uses_F[4]); // Message to 'vbool263_marginal' from ReplicateWithMarginal factor this.vbool263_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool263_uses_B, this.vbool263_F, this.vbool263_marginal_B); // Message to 'vbool263_uses' from ReplicateWithMarginal factor this.vbool263_uses_F[0] = ReplicateOp.UsesAverageConditional<Bernoulli>(this.vbool263_uses_B, this.vbool263_F, 0, this.vbool263_uses_F[0]); // Message to 'vbool245' from And factor this.vbool245_F = BooleanAndOp.AndAverageConditional(this.vbool141_uses_F[9], this.vbool115_uses_F[3]); // Message to 'vbool245_marginal' from ReplicateWithMarginal factor this.vbool245_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool245_uses_B, this.vbool245_F, this.vbool245_marginal_B); // Message to 'vbool245_uses' from ReplicateWithMarginal factor this.vbool245_uses_F[0] = ReplicateOp.UsesAverageConditional<Bernoulli>(this.vbool245_uses_B, this.vbool245_F, 0, this.vbool245_uses_F[0]); // Message to 'vbool246' from And factor this.vbool246_F = BooleanAndOp.AndAverageConditional(this.vbool245_uses_F[0], this.vbool112_uses_F[2]); // Message to 'vbool246_marginal' from ReplicateWithMarginal factor this.vbool246_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool246_uses_B, this.vbool246_F, this.vbool246_marginal_B); // Message to 'vbool246_uses' from ReplicateWithMarginal factor this.vbool246_uses_F[0] = ReplicateOp.UsesAverageConditional<Bernoulli>(this.vbool246_uses_B, this.vbool246_F, 0, this.vbool246_uses_F[0]); // Message to 'vbool244_uses' from Or factor this.vbool244_uses_B[0] = BooleanOrOp.BAverageConditional(this.vbool247_B, this.vbool246_uses_F[0]); // Message to 'vbool244_marginal' from ReplicateWithMarginal factor this.vbool244_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool244_uses_B, this.vbool244_F, this.vbool244_marginal_B); // Message to 'vbool244' from ReplicateWithMarginal factor this.vbool244_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool244_uses_B, this.vbool244_B); // Message to 'vbool243_uses' from Or factor this.vbool243_uses_B[0] = BooleanOrOp.AAverageConditional(this.vbool244_B, this.vbool241_uses_F[0]); // Message to 'vbool243' from ReplicateWithMarginal factor this.vbool243_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool243_uses_B, this.vbool243_B); // Message to 'vbool115_uses' from And factor this.vbool115_uses_B[5] = BooleanAndOp.BAverageConditional(this.vbool243_B, this.vbool242_uses_F[0]); // Message to 'vbool115_uses' from UsesEqualDef factor this.vbool115_uses_F[0] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool115_uses_B, this.vbool115_F, 0, this.vbool115_uses_F[0]); // Message to 'vbool115_uses' from UsesEqualDef factor this.vbool115_uses_F[1] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool115_uses_B, this.vbool115_F, 1, this.vbool115_uses_F[1]); // Message to 'vbool115_uses' from UsesEqualDef factor this.vbool115_uses_F[2] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool115_uses_B, this.vbool115_F, 2, this.vbool115_uses_F[2]); // Message to 'vbool242_uses' from And factor this.vbool242_uses_B[0] = BooleanAndOp.AAverageConditional(this.vbool243_B, this.vbool115_uses_F[5]); // Message to 'vbool242_marginal' from ReplicateWithMarginal factor this.vbool242_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool242_uses_B, this.vbool242_F, this.vbool242_marginal_B); // Message to 'vbool242' from ReplicateWithMarginal factor this.vbool242_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool242_uses_B, this.vbool242_B); // Message to 'vbool107_uses' from And factor this.vbool107_uses_B[2] = BooleanAndOp.BAverageConditional(this.vbool242_B, this.vbool141_uses_F[1]); // Message to 'vbool141_uses' from And factor this.vbool141_uses_B[1] = BooleanAndOp.AAverageConditional(this.vbool242_B, this.vbool107_uses_F[2]); // Message to 'vbool107_uses' from UsesEqualDef factor this.vbool107_uses_F[1] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool107_uses_B, this.vbool107_F, 1, this.vbool107_uses_F[1]); // Message to 'vbool102_uses' from AreEqual factor this.vbool102_uses_B[0] = BooleanAreEqualOp.BAverageConditional(this.vbool190_B, this.vbool107_uses_F[1]); // Message to 'vbool102_marginal' from UsesEqualDef factor this.vbool102_marginal_B = UsesEqualDefOp.MarginalAverageConditional<Bernoulli>(this.vbool102_uses_B, this.vbool102_F, this.vbool102_marginal_B); // Message to 'vbool190' from AreEqual factor this.vbool190_F = BooleanAreEqualOp.AreEqualAverageConditional(this.vbool107_uses_F[1], this.vbool102_uses_F[0]); // Message to 'vbool190_marginal' from ReplicateWithMarginal factor this.vbool190_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool190_uses_B, this.vbool190_F, this.vbool190_marginal_B); // Message to 'vbool102_uses' from UsesEqualDef factor this.vbool102_uses_F[1] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool102_uses_B, this.vbool102_F, 1, this.vbool102_uses_F[1]); // Message to 'vbool180_uses' from AreEqual factor this.vbool180_uses_B[0] = BooleanAreEqualOp.BAverageConditional(this.vbool447_B, this.vbool102_uses_F[1]); // Message to 'vbool447' from AreEqual factor this.vbool447_F = BooleanAreEqualOp.AreEqualAverageConditional(this.vbool102_uses_F[1], this.vbool180_uses_F[0]); // Message to 'vbool447_marginal' from ReplicateWithMarginal factor this.vbool447_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool447_uses_B, this.vbool447_F, this.vbool447_marginal_B); // Message to 'vbool107_marginal' from UsesEqualDef factor this.vbool107_marginal_B = UsesEqualDefOp.MarginalAverageConditional<Bernoulli>(this.vbool107_uses_B, this.vbool107_F, this.vbool107_marginal_B); // Message to 'vbool243' from And factor this.vbool243_F = BooleanAndOp.AndAverageConditional(this.vbool242_uses_F[0], this.vbool115_uses_F[5]); // Message to 'vbool243_marginal' from ReplicateWithMarginal factor this.vbool243_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool243_uses_B, this.vbool243_F, this.vbool243_marginal_B); // Message to 'vbool243_uses' from ReplicateWithMarginal factor this.vbool243_uses_F[0] = ReplicateOp.UsesAverageConditional<Bernoulli>(this.vbool243_uses_B, this.vbool243_F, 0, this.vbool243_uses_F[0]); // Message to 'vbool241_uses' from Or factor this.vbool241_uses_B[0] = BooleanOrOp.BAverageConditional(this.vbool244_B, this.vbool243_uses_F[0]); // Message to 'vbool241_marginal' from ReplicateWithMarginal factor this.vbool241_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool241_uses_B, this.vbool241_F, this.vbool241_marginal_B); // Message to 'vbool241' from ReplicateWithMarginal factor this.vbool241_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool241_uses_B, this.vbool241_B); // Message to 'vbool240_uses' from Or factor this.vbool240_uses_B[0] = BooleanOrOp.AAverageConditional(this.vbool241_B, this.vbool238_uses_F[0]); // Message to 'vbool240_marginal' from ReplicateWithMarginal factor this.vbool240_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool240_uses_B, this.vbool240_F, this.vbool240_marginal_B); // Message to 'vbool238_uses' from Or factor this.vbool238_uses_B[0] = BooleanOrOp.BAverageConditional(this.vbool241_B, this.vbool240_uses_F[0]); // Message to 'vbool238_marginal' from ReplicateWithMarginal factor this.vbool238_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool238_uses_B, this.vbool238_F, this.vbool238_marginal_B); // Message to 'vbool240' from ReplicateWithMarginal factor this.vbool240_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool240_uses_B, this.vbool240_B); // Message to 'vbool239_uses' from And factor this.vbool239_uses_B[0] = BooleanAndOp.AAverageConditional(this.vbool240_B, this.vbool115_uses_F[2]); // Message to 'vbool239_marginal' from ReplicateWithMarginal factor this.vbool239_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool239_uses_B, this.vbool239_F, this.vbool239_marginal_B); // Message to 'vbool115_uses' from And factor this.vbool115_uses_B[2] = BooleanAndOp.BAverageConditional(this.vbool240_B, this.vbool239_uses_F[0]); // Message to 'vbool239' from ReplicateWithMarginal factor this.vbool239_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool239_uses_B, this.vbool239_B); // Message to 'vbool145_uses' from And factor this.vbool145_uses_B[11] = BooleanAndOp.AAverageConditional(this.vbool239_B, this.vbool109_uses_F[1]); // Message to 'vbool238' from ReplicateWithMarginal factor this.vbool238_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool238_uses_B, this.vbool238_B); // Message to 'vbool237_uses' from Or factor this.vbool237_uses_B[0] = BooleanOrOp.AAverageConditional(this.vbool238_B, this.vbool235_uses_F[0]); // Message to 'vbool237_marginal' from ReplicateWithMarginal factor this.vbool237_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool237_uses_B, this.vbool237_F, this.vbool237_marginal_B); // Message to 'vbool235_uses' from Or factor this.vbool235_uses_B[0] = BooleanOrOp.BAverageConditional(this.vbool238_B, this.vbool237_uses_F[0]); // Message to 'vbool235_marginal' from ReplicateWithMarginal factor this.vbool235_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool235_uses_B, this.vbool235_F, this.vbool235_marginal_B); // Message to 'vbool237' from ReplicateWithMarginal factor this.vbool237_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool237_uses_B, this.vbool237_B); // Message to 'vbool236_uses' from And factor this.vbool236_uses_B[0] = BooleanAndOp.AAverageConditional(this.vbool237_B, this.vbool114_uses_F[1]); // Message to 'vbool236' from ReplicateWithMarginal factor this.vbool236_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool236_uses_B, this.vbool236_B); // Message to 'vbool235' from ReplicateWithMarginal factor this.vbool235_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool235_uses_B, this.vbool235_B); // Message to 'vbool234_uses' from Or factor this.vbool234_uses_B[0] = BooleanOrOp.AAverageConditional(this.vbool235_B, this.vbool232_uses_F[0]); // Message to 'vbool234_marginal' from ReplicateWithMarginal factor this.vbool234_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool234_uses_B, this.vbool234_F, this.vbool234_marginal_B); // Message to 'vbool232_uses' from Or factor this.vbool232_uses_B[0] = BooleanOrOp.BAverageConditional(this.vbool235_B, this.vbool234_uses_F[0]); // Message to 'vbool232_marginal' from ReplicateWithMarginal factor this.vbool232_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool232_uses_B, this.vbool232_F, this.vbool232_marginal_B); // Message to 'vbool234' from ReplicateWithMarginal factor this.vbool234_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool234_uses_B, this.vbool234_B); // Message to 'vbool233_uses' from And factor this.vbool233_uses_B[0] = BooleanAndOp.AAverageConditional(this.vbool234_B, this.vbool114_uses_F[0]); // Message to 'vbool233_marginal' from ReplicateWithMarginal factor this.vbool233_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool233_uses_B, this.vbool233_F, this.vbool233_marginal_B); // Message to 'vbool114_uses' from And factor this.vbool114_uses_B[0] = BooleanAndOp.BAverageConditional(this.vbool234_B, this.vbool233_uses_F[0]); // Message to 'vbool233' from ReplicateWithMarginal factor this.vbool233_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool233_uses_B, this.vbool233_B); // Message to 'vbool145_uses' from And factor this.vbool145_uses_B[9] = BooleanAndOp.AAverageConditional(this.vbool233_B, this.vbool109_uses_F[0]); // Message to 'vbool232' from ReplicateWithMarginal factor this.vbool232_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool232_uses_B, this.vbool232_B); // Message to 'vbool231_uses' from Or factor this.vbool231_uses_B[0] = BooleanOrOp.AAverageConditional(this.vbool232_B, this.vbool229_uses_F[0]); // Message to 'vbool231_marginal' from ReplicateWithMarginal factor this.vbool231_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool231_uses_B, this.vbool231_F, this.vbool231_marginal_B); // Message to 'vbool229_uses' from Or factor this.vbool229_uses_B[0] = BooleanOrOp.BAverageConditional(this.vbool232_B, this.vbool231_uses_F[0]); // Message to 'vbool229_marginal' from ReplicateWithMarginal factor this.vbool229_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool229_uses_B, this.vbool229_F, this.vbool229_marginal_B); // Message to 'vbool231' from ReplicateWithMarginal factor this.vbool231_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool231_uses_B, this.vbool231_B); // Message to 'vbool230_uses' from And factor this.vbool230_uses_B[0] = BooleanAndOp.AAverageConditional(this.vbool231_B, this.vbool113_uses_F[1]); // Message to 'vbool230' from ReplicateWithMarginal factor this.vbool230_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool230_uses_B, this.vbool230_B); // Message to 'vbool229' from ReplicateWithMarginal factor this.vbool229_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool229_uses_B, this.vbool229_B); // Message to 'vbool228_uses' from Or factor this.vbool228_uses_B[0] = BooleanOrOp.AAverageConditional(this.vbool229_B, this.vbool226_uses_F[0]); // Message to 'vbool228_marginal' from ReplicateWithMarginal factor this.vbool228_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool228_uses_B, this.vbool228_F, this.vbool228_marginal_B); // Message to 'vbool226_uses' from Or factor this.vbool226_uses_B[0] = BooleanOrOp.BAverageConditional(this.vbool229_B, this.vbool228_uses_F[0]); // Message to 'vbool226_marginal' from ReplicateWithMarginal factor this.vbool226_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool226_uses_B, this.vbool226_F, this.vbool226_marginal_B); // Message to 'vbool228' from ReplicateWithMarginal factor this.vbool228_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool228_uses_B, this.vbool228_B); // Message to 'vbool227_uses' from And factor this.vbool227_uses_B[0] = BooleanAndOp.AAverageConditional(this.vbool228_B, this.vbool115_uses_F[1]); // Message to 'vbool227_marginal' from ReplicateWithMarginal factor this.vbool227_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool227_uses_B, this.vbool227_F, this.vbool227_marginal_B); // Message to 'vbool115_uses' from And factor this.vbool115_uses_B[1] = BooleanAndOp.BAverageConditional(this.vbool228_B, this.vbool227_uses_F[0]); // Message to 'vbool227' from ReplicateWithMarginal factor this.vbool227_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool227_uses_B, this.vbool227_B); // Message to 'vbool145_uses' from And factor this.vbool145_uses_B[7] = BooleanAndOp.AAverageConditional(this.vbool227_B, this.vbool108_uses_F[1]); // Message to 'vbool226' from ReplicateWithMarginal factor this.vbool226_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool226_uses_B, this.vbool226_B); // Message to 'vbool225_uses' from Or factor this.vbool225_uses_B[0] = BooleanOrOp.AAverageConditional(this.vbool226_B, this.vbool223_uses_F[0]); // Message to 'vbool225_marginal' from ReplicateWithMarginal factor this.vbool225_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool225_uses_B, this.vbool225_F, this.vbool225_marginal_B); // Message to 'vbool223_uses' from Or factor this.vbool223_uses_B[0] = BooleanOrOp.BAverageConditional(this.vbool226_B, this.vbool225_uses_F[0]); // Message to 'vbool223_marginal' from ReplicateWithMarginal factor this.vbool223_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool223_uses_B, this.vbool223_F, this.vbool223_marginal_B); // Message to 'vbool225' from ReplicateWithMarginal factor this.vbool225_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool225_uses_B, this.vbool225_B); // Message to 'vbool224_uses' from And factor this.vbool224_uses_B[0] = BooleanAndOp.AAverageConditional(this.vbool225_B, this.vbool113_uses_F[0]); // Message to 'vbool224_marginal' from ReplicateWithMarginal factor this.vbool224_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool224_uses_B, this.vbool224_F, this.vbool224_marginal_B); // Message to 'vbool113_uses' from And factor this.vbool113_uses_B[0] = BooleanAndOp.BAverageConditional(this.vbool225_B, this.vbool224_uses_F[0]); // Message to 'vbool224' from ReplicateWithMarginal factor this.vbool224_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool224_uses_B, this.vbool224_B); // Message to 'vbool145_uses' from And factor this.vbool145_uses_B[6] = BooleanAndOp.AAverageConditional(this.vbool224_B, this.vbool108_uses_F[0]); // Message to 'vbool223' from ReplicateWithMarginal factor this.vbool223_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool223_uses_B, this.vbool223_B); // Message to 'vbool222_uses' from Or factor this.vbool222_uses_B[0] = BooleanOrOp.AAverageConditional(this.vbool223_B, this.vbool220_uses_F[0]); // Message to 'vbool222_marginal' from ReplicateWithMarginal factor this.vbool222_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool222_uses_B, this.vbool222_F, this.vbool222_marginal_B); // Message to 'vbool220_uses' from Or factor this.vbool220_uses_B[0] = BooleanOrOp.BAverageConditional(this.vbool223_B, this.vbool222_uses_F[0]); // Message to 'vbool220_marginal' from ReplicateWithMarginal factor this.vbool220_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool220_uses_B, this.vbool220_F, this.vbool220_marginal_B); // Message to 'vbool222' from ReplicateWithMarginal factor this.vbool222_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool222_uses_B, this.vbool222_B); // Message to 'vbool221_uses' from And factor this.vbool221_uses_B[0] = BooleanAndOp.AAverageConditional(this.vbool222_B, this.vbool112_uses_F[0]); // Message to 'vbool221' from ReplicateWithMarginal factor this.vbool221_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool221_uses_B, this.vbool221_B); // Message to 'vbool220' from ReplicateWithMarginal factor this.vbool220_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool220_uses_B, this.vbool220_B); // Message to 'vbool217_uses' from Or factor this.vbool217_uses_B[0] = BooleanOrOp.BAverageConditional(this.vbool220_B, this.vbool219_uses_F[0]); // Message to 'vbool217_marginal' from ReplicateWithMarginal factor this.vbool217_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool217_uses_B, this.vbool217_F, this.vbool217_marginal_B); // Message to 'vbool219_uses' from Or factor this.vbool219_uses_B[0] = BooleanOrOp.AAverageConditional(this.vbool220_B, this.vbool217_uses_F[0]); // Message to 'vbool219_marginal' from ReplicateWithMarginal factor this.vbool219_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool219_uses_B, this.vbool219_F, this.vbool219_marginal_B); // Message to 'vbool217' from ReplicateWithMarginal factor this.vbool217_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool217_uses_B, this.vbool217_B); // Message to 'vbool215_uses' from Or factor this.vbool215_uses_B[0] = BooleanOrOp.BAverageConditional(this.vbool217_B, this.vbool216_uses_F[0]); // Message to 'vbool215_marginal' from ReplicateWithMarginal factor this.vbool215_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool215_uses_B, this.vbool215_F, this.vbool215_marginal_B); // Message to 'vbool216_uses' from Or factor this.vbool216_uses_B[0] = BooleanOrOp.AAverageConditional(this.vbool217_B, this.vbool215_uses_F[0]); // Message to 'vbool216_marginal' from ReplicateWithMarginal factor this.vbool216_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool216_uses_B, this.vbool216_F, this.vbool216_marginal_B); // Message to 'vbool215' from ReplicateWithMarginal factor this.vbool215_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool215_uses_B, this.vbool215_B); // Message to 'vbool145_uses' from And factor this.vbool145_uses_B[2] = BooleanAndOp.AAverageConditional(this.vbool215_B, this.vbool111_uses_F[0]); // Message to 'vbool216' from ReplicateWithMarginal factor this.vbool216_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool216_uses_B, this.vbool216_B); // Message to 'vbool145_uses' from And factor this.vbool145_uses_B[3] = BooleanAndOp.AAverageConditional(this.vbool216_B, this.vbool116_uses_F[1]); // Message to 'vbool219' from ReplicateWithMarginal factor this.vbool219_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool219_uses_B, this.vbool219_B); // Message to 'vbool218_uses' from And factor this.vbool218_uses_B[0] = BooleanAndOp.AAverageConditional(this.vbool219_B, this.vbool115_uses_F[0]); // Message to 'vbool218_marginal' from ReplicateWithMarginal factor this.vbool218_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool218_uses_B, this.vbool218_F, this.vbool218_marginal_B); // Message to 'vbool115_uses' from And factor this.vbool115_uses_B[0] = BooleanAndOp.BAverageConditional(this.vbool219_B, this.vbool218_uses_F[0]); // Message to 'vbool115_marginal' from UsesEqualDef factor this.vbool115_marginal_B = UsesEqualDefOp.MarginalAverageConditional<Bernoulli>(this.vbool115_uses_B, this.vbool115_F, this.vbool115_marginal_B); // Message to 'vbool218' from ReplicateWithMarginal factor this.vbool218_B = ReplicateOp.DefAverageConditional<Bernoulli>(this.vbool218_uses_B, this.vbool218_B); // Message to 'vbool145_uses' from And factor this.vbool145_uses_B[4] = BooleanAndOp.AAverageConditional(this.vbool218_B, this.vbool107_uses_F[0]); // Message to 'vbool115_uses' from UsesEqualDef factor this.vbool115_uses_F[3] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool115_uses_B, this.vbool115_F, 3, this.vbool115_uses_F[3]); // Message to 'vbool115_uses' from UsesEqualDef factor this.vbool115_uses_F[4] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool115_uses_B, this.vbool115_F, 4, this.vbool115_uses_F[4]); // Message to 'vbool66_uses' from AreEqual factor this.vbool66_uses_B[2] = BooleanAreEqualOp.AAverageConditional(this.vbool397_B, this.vbool115_uses_F[4]); // Message to 'vbool397' from AreEqual factor this.vbool397_F = BooleanAreEqualOp.AreEqualAverageConditional(this.vbool66_uses_F[2], this.vbool115_uses_F[4]); // Message to 'vbool397_marginal' from ReplicateWithMarginal factor this.vbool397_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool397_uses_B, this.vbool397_F, this.vbool397_marginal_B); // Message to 'vbool397_uses' from ReplicateWithMarginal factor this.vbool397_uses_F[0] = ReplicateOp.UsesAverageConditional<Bernoulli>(this.vbool397_uses_B, this.vbool397_F, 0, this.vbool397_uses_F[0]); // Message to 'vbool115_uses' from UsesEqualDef factor this.vbool115_uses_F[5] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool115_uses_B, this.vbool115_F, 5, this.vbool115_uses_F[5]); // Message to 'vbool115_uses' from UsesEqualDef factor this.vbool115_uses_F[10] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool115_uses_B, this.vbool115_F, 10, this.vbool115_uses_F[10]); // Message to 'vbool115_uses' from UsesEqualDef factor this.vbool115_uses_F[6] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool115_uses_B, this.vbool115_F, 6, this.vbool115_uses_F[6]); // Message to 'vbool252' from And factor this.vbool252_F = BooleanAndOp.AndAverageConditional(this.vbool251_uses_F[0], this.vbool115_uses_F[6]); // Message to 'vbool252_marginal' from ReplicateWithMarginal factor this.vbool252_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool252_uses_B, this.vbool252_F, this.vbool252_marginal_B); // Message to 'vbool115_uses' from UsesEqualDef factor this.vbool115_uses_F[8] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool115_uses_B, this.vbool115_F, 8, this.vbool115_uses_F[8]); // Message to 'vbool115_uses' from UsesEqualDef factor this.vbool115_uses_F[7] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool115_uses_B, this.vbool115_F, 7, this.vbool115_uses_F[7]); // Message to 'vbool264' from And factor this.vbool264_F = BooleanAndOp.AndAverageConditional(this.vbool263_uses_F[0], this.vbool115_uses_F[7]); // Message to 'vbool264_marginal' from ReplicateWithMarginal factor this.vbool264_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool264_uses_B, this.vbool264_F, this.vbool264_marginal_B); // Message to 'vbool115_uses' from UsesEqualDef factor this.vbool115_uses_F[9] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool115_uses_B, this.vbool115_F, 9, this.vbool115_uses_F[9]); // Message to 'vbool252_uses' from ReplicateWithMarginal factor this.vbool252_uses_F[0] = ReplicateOp.UsesAverageConditional<Bernoulli>(this.vbool252_uses_B, this.vbool252_F, 0, this.vbool252_uses_F[0]); // Message to 'vbool264_uses' from ReplicateWithMarginal factor this.vbool264_uses_F[0] = ReplicateOp.UsesAverageConditional<Bernoulli>(this.vbool264_uses_B, this.vbool264_F, 0, this.vbool264_uses_F[0]); // Message to 'vbool113_uses' from UsesEqualDef factor this.vbool113_uses_F[2] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool113_uses_B, this.vbool113_F, 2, this.vbool113_uses_F[2]); // Message to 'vbool64_uses' from AreEqual factor this.vbool64_uses_B[2] = BooleanAreEqualOp.AAverageConditional(this.vbool381_B, this.vbool113_uses_F[2]); // Message to 'vbool381' from AreEqual factor this.vbool381_F = BooleanAreEqualOp.AreEqualAverageConditional(this.vbool64_uses_F[2], this.vbool113_uses_F[2]); // Message to 'vbool381_marginal' from ReplicateWithMarginal factor this.vbool381_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool381_uses_B, this.vbool381_F, this.vbool381_marginal_B); // Message to 'vbool381_uses' from ReplicateWithMarginal factor this.vbool381_uses_F[0] = ReplicateOp.UsesAverageConditional<Bernoulli>(this.vbool381_uses_B, this.vbool381_F, 0, this.vbool381_uses_F[0]); // Message to 'vbool114_uses' from UsesEqualDef factor this.vbool114_uses_F[2] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool114_uses_B, this.vbool114_F, 2, this.vbool114_uses_F[2]); // Message to 'vbool65_uses' from AreEqual factor this.vbool65_uses_B[2] = BooleanAreEqualOp.AAverageConditional(this.vbool389_B, this.vbool114_uses_F[2]); // Message to 'vbool389' from AreEqual factor this.vbool389_F = BooleanAreEqualOp.AreEqualAverageConditional(this.vbool65_uses_F[2], this.vbool114_uses_F[2]); // Message to 'vbool389_marginal' from ReplicateWithMarginal factor this.vbool389_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool389_uses_B, this.vbool389_F, this.vbool389_marginal_B); // Message to 'vbool389_uses' from ReplicateWithMarginal factor this.vbool389_uses_F[0] = ReplicateOp.UsesAverageConditional<Bernoulli>(this.vbool389_uses_B, this.vbool389_F, 0, this.vbool389_uses_F[0]); // Message to 'vbool113_uses' from UsesEqualDef factor this.vbool113_uses_F[3] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool113_uses_B, this.vbool113_F, 3, this.vbool113_uses_F[3]); // Message to 'vbool255' from And factor this.vbool255_F = BooleanAndOp.AndAverageConditional(this.vbool254_uses_F[0], this.vbool113_uses_F[3]); // Message to 'vbool255_marginal' from ReplicateWithMarginal factor this.vbool255_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool255_uses_B, this.vbool255_F, this.vbool255_marginal_B); // Message to 'vbool255_uses' from ReplicateWithMarginal factor this.vbool255_uses_F[0] = ReplicateOp.UsesAverageConditional<Bernoulli>(this.vbool255_uses_B, this.vbool255_F, 0, this.vbool255_uses_F[0]); // Message to 'vbool114_uses' from UsesEqualDef factor this.vbool114_uses_F[3] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool114_uses_B, this.vbool114_F, 3, this.vbool114_uses_F[3]); // Message to 'vbool261' from And factor this.vbool261_F = BooleanAndOp.AndAverageConditional(this.vbool260_uses_F[0], this.vbool114_uses_F[3]); // Message to 'vbool261_marginal' from ReplicateWithMarginal factor this.vbool261_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool261_uses_B, this.vbool261_F, this.vbool261_marginal_B); // Message to 'vbool261_uses' from ReplicateWithMarginal factor this.vbool261_uses_F[0] = ReplicateOp.UsesAverageConditional<Bernoulli>(this.vbool261_uses_B, this.vbool261_F, 0, this.vbool261_uses_F[0]); // Message to 'vbool113_uses' from UsesEqualDef factor this.vbool113_uses_F[4] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool113_uses_B, this.vbool113_F, 4, this.vbool113_uses_F[4]); // Message to 'vbool114_uses' from UsesEqualDef factor this.vbool114_uses_F[4] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool114_uses_B, this.vbool114_F, 4, this.vbool114_uses_F[4]); // Message to 'vbool113_uses' from UsesEqualDef factor this.vbool113_uses_F[5] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool113_uses_B, this.vbool113_F, 5, this.vbool113_uses_F[5]); // Message to 'vbool249' from And factor this.vbool249_F = BooleanAndOp.AndAverageConditional(this.vbool248_uses_F[0], this.vbool113_uses_F[5]); // Message to 'vbool249_marginal' from ReplicateWithMarginal factor this.vbool249_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool249_uses_B, this.vbool249_F, this.vbool249_marginal_B); // Message to 'vbool249_uses' from ReplicateWithMarginal factor this.vbool249_uses_F[0] = ReplicateOp.UsesAverageConditional<Bernoulli>(this.vbool249_uses_B, this.vbool249_F, 0, this.vbool249_uses_F[0]); // Message to 'vbool113_uses' from UsesEqualDef factor this.vbool113_uses_F[6] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool113_uses_B, this.vbool113_F, 6, this.vbool113_uses_F[6]); // Message to 'vbool114_uses' from UsesEqualDef factor this.vbool114_uses_F[5] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool114_uses_B, this.vbool114_F, 5, this.vbool114_uses_F[5]); // Message to 'vbool258' from And factor this.vbool258_F = BooleanAndOp.AndAverageConditional(this.vbool257_uses_F[0], this.vbool114_uses_F[5]); // Message to 'vbool258_marginal' from ReplicateWithMarginal factor this.vbool258_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool258_uses_B, this.vbool258_F, this.vbool258_marginal_B); // Message to 'vbool258_uses' from ReplicateWithMarginal factor this.vbool258_uses_F[0] = ReplicateOp.UsesAverageConditional<Bernoulli>(this.vbool258_uses_B, this.vbool258_F, 0, this.vbool258_uses_F[0]); // Message to 'vbool114_uses' from UsesEqualDef factor this.vbool114_uses_F[6] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool114_uses_B, this.vbool114_F, 6, this.vbool114_uses_F[6]); // Message to 'vbool113_marginal' from UsesEqualDef factor this.vbool113_marginal_B = UsesEqualDefOp.MarginalAverageConditional<Bernoulli>(this.vbool113_uses_B, this.vbool113_F, this.vbool113_marginal_B); // Message to 'vbool114_marginal' from UsesEqualDef factor this.vbool114_marginal_B = UsesEqualDefOp.MarginalAverageConditional<Bernoulli>(this.vbool114_uses_B, this.vbool114_F, this.vbool114_marginal_B); // Message to 'vbool145_uses' from UsesEqualDef factor this.vbool145_uses_F[5] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool145_uses_B, this.vbool145_F, 5, this.vbool145_uses_F[5]); // Message to 'vbool110_uses' from And factor this.vbool110_uses_B[0] = BooleanAndOp.BAverageConditional(this.vbool221_B, this.vbool145_uses_F[5]); // Message to 'vbool110_uses' from UsesEqualDef factor this.vbool110_uses_F[1] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool110_uses_B, this.vbool110_F, 1, this.vbool110_uses_F[1]); // Message to 'vbool145_uses' from And factor this.vbool145_uses_B[8] = BooleanAndOp.AAverageConditional(this.vbool230_B, this.vbool110_uses_F[1]); // Message to 'vbool145_uses' from UsesEqualDef factor this.vbool145_uses_F[10] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool145_uses_B, this.vbool145_F, 10, this.vbool145_uses_F[10]); // Message to 'vbool110_uses' from And factor this.vbool110_uses_B[2] = BooleanAndOp.BAverageConditional(this.vbool236_B, this.vbool145_uses_F[10]); // Message to 'vbool110_uses' from UsesEqualDef factor this.vbool110_uses_F[0] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool110_uses_B, this.vbool110_F, 0, this.vbool110_uses_F[0]); // Message to 'vbool145_uses' from And factor this.vbool145_uses_B[5] = BooleanAndOp.AAverageConditional(this.vbool221_B, this.vbool110_uses_F[0]); // Message to 'vbool221' from And factor this.vbool221_F = BooleanAndOp.AndAverageConditional(this.vbool145_uses_F[5], this.vbool110_uses_F[0]); // Message to 'vbool221_marginal' from ReplicateWithMarginal factor this.vbool221_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool221_uses_B, this.vbool221_F, this.vbool221_marginal_B); // Message to 'vbool221_uses' from ReplicateWithMarginal factor this.vbool221_uses_F[0] = ReplicateOp.UsesAverageConditional<Bernoulli>(this.vbool221_uses_B, this.vbool221_F, 0, this.vbool221_uses_F[0]); // Message to 'vbool112_uses' from And factor this.vbool112_uses_B[0] = BooleanAndOp.BAverageConditional(this.vbool222_B, this.vbool221_uses_F[0]); // Message to 'vbool145_uses' from UsesEqualDef factor this.vbool145_uses_F[0] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool145_uses_B, this.vbool145_F, 0, this.vbool145_uses_F[0]); // Message to 'vbool67_uses' from AreEqual factor this.vbool67_uses_B[2] = BooleanAreEqualOp.AAverageConditional(this.vbool402_B, this.vbool145_uses_F[0]); // Message to 'vbool402' from AreEqual factor this.vbool402_F = BooleanAreEqualOp.AreEqualAverageConditional(this.vbool67_uses_F[2], this.vbool145_uses_F[0]); // Message to 'vbool402_marginal' from ReplicateWithMarginal factor this.vbool402_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool402_uses_B, this.vbool402_F, this.vbool402_marginal_B); // Message to 'vbool402_uses' from ReplicateWithMarginal factor this.vbool402_uses_F[0] = ReplicateOp.UsesAverageConditional<Bernoulli>(this.vbool402_uses_B, this.vbool402_F, 0, this.vbool402_uses_F[0]); // Message to 'vbool145_uses' from UsesEqualDef factor this.vbool145_uses_F[3] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool145_uses_B, this.vbool145_F, 3, this.vbool145_uses_F[3]); // Message to 'vbool116_uses' from And factor this.vbool116_uses_B[1] = BooleanAndOp.BAverageConditional(this.vbool216_B, this.vbool145_uses_F[3]); // Message to 'vbool145_uses' from UsesEqualDef factor this.vbool145_uses_F[1] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool145_uses_B, this.vbool145_F, 1, this.vbool145_uses_F[1]); // Message to 'vbool20_uses' from AreEqual factor this.vbool20_uses_B[0] = BooleanAreEqualOp.AAverageConditional(this.vbool199_B, this.vbool145_uses_F[1]); // Message to 'vbool20_marginal' from UsesEqualDef factor this.vbool20_marginal_B = UsesEqualDefOp.MarginalAverageConditional<Bernoulli>(this.vbool20_uses_B, this.vbool20_F, this.vbool20_marginal_B); // Message to 'vbool199' from AreEqual factor this.vbool199_F = BooleanAreEqualOp.AreEqualAverageConditional(this.vbool20_uses_F[0], this.vbool145_uses_F[1]); // Message to 'vbool199_marginal' from ReplicateWithMarginal factor this.vbool199_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool199_uses_B, this.vbool199_F, this.vbool199_marginal_B); // Message to 'vbool20_uses' from UsesEqualDef factor this.vbool20_uses_F[1] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool20_uses_B, this.vbool20_F, 1, this.vbool20_uses_F[1]); // Message to 'vbool41_uses' from AreEqual factor this.vbool41_uses_B[1] = BooleanAreEqualOp.AAverageConditional(this.vbool200_B, this.vbool20_uses_F[1]); // Message to 'vbool41_marginal' from UsesEqualDef factor this.vbool41_marginal_B = UsesEqualDefOp.MarginalAverageConditional<Bernoulli>(this.vbool41_uses_B, this.vbool41_F, this.vbool41_marginal_B); // Message to 'vbool200' from AreEqual factor this.vbool200_F = BooleanAreEqualOp.AreEqualAverageConditional(this.vbool41_uses_F[1], this.vbool20_uses_F[1]); // Message to 'vbool200_marginal' from ReplicateWithMarginal factor this.vbool200_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool200_uses_B, this.vbool200_F, this.vbool200_marginal_B); // Message to 'vbool41_uses' from UsesEqualDef factor this.vbool41_uses_F[0] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool41_uses_B, this.vbool41_F, 0, this.vbool41_uses_F[0]); // Message to 'vbool15_uses' from AreEqual factor this.vbool15_uses_B[1] = BooleanAreEqualOp.BAverageConditional(this.vbool410_B, this.vbool41_uses_F[0]); // Message to 'vbool15_marginal' from UsesEqualDef factor this.vbool15_marginal_B = UsesEqualDefOp.MarginalAverageConditional<Bernoulli>(this.vbool15_uses_B, this.vbool15_F, this.vbool15_marginal_B); // Message to 'vbool410' from AreEqual factor this.vbool410_F = BooleanAreEqualOp.AreEqualAverageConditional(this.vbool41_uses_F[0], this.vbool15_uses_F[1]); // Message to 'vbool410_marginal' from ReplicateWithMarginal factor this.vbool410_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool410_uses_B, this.vbool410_F, this.vbool410_marginal_B); // Message to 'vbool15_uses' from UsesEqualDef factor this.vbool15_uses_F[0] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool15_uses_B, this.vbool15_F, 0, this.vbool15_uses_F[0]); // Message to 'vbool46_uses' from AreEqual factor this.vbool46_uses_B[1] = BooleanAreEqualOp.AAverageConditional(this.vbool189_B, this.vbool15_uses_F[0]); // Message to 'vbool46_marginal' from UsesEqualDef factor this.vbool46_marginal_B = UsesEqualDefOp.MarginalAverageConditional<Bernoulli>(this.vbool46_uses_B, this.vbool46_F, this.vbool46_marginal_B); // Message to 'vbool189' from AreEqual factor this.vbool189_F = BooleanAreEqualOp.AreEqualAverageConditional(this.vbool46_uses_F[1], this.vbool15_uses_F[0]); // Message to 'vbool189_marginal' from ReplicateWithMarginal factor this.vbool189_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool189_uses_B, this.vbool189_F, this.vbool189_marginal_B); // Message to 'vbool46_uses' from UsesEqualDef factor this.vbool46_uses_F[0] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool46_uses_B, this.vbool46_F, 0, this.vbool46_uses_F[0]); // Message to 'vbool67_uses' from AreEqual factor this.vbool67_uses_B[1] = BooleanAreEqualOp.AAverageConditional(this.vbool205_B, this.vbool46_uses_F[0]); // Message to 'vbool67_marginal' from UsesEqualDef factor this.vbool67_marginal_B = UsesEqualDefOp.MarginalAverageConditional<Bernoulli>(this.vbool67_uses_B, this.vbool67_F, this.vbool67_marginal_B); // Message to 'vbool205' from AreEqual factor this.vbool205_F = BooleanAreEqualOp.AreEqualAverageConditional(this.vbool67_uses_F[1], this.vbool46_uses_F[0]); // Message to 'vbool205_marginal' from ReplicateWithMarginal factor this.vbool205_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool205_uses_B, this.vbool205_F, this.vbool205_marginal_B); // Message to 'vbool67_uses' from UsesEqualDef factor this.vbool67_uses_F[0] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool67_uses_B, this.vbool67_F, 0, this.vbool67_uses_F[0]); // Message to 'vbool72_uses' from AreEqual factor this.vbool72_uses_B[1] = BooleanAreEqualOp.BAverageConditional(this.vbool407_B, this.vbool67_uses_F[0]); // Message to 'vbool72_marginal' from UsesEqualDef factor this.vbool72_marginal_B = UsesEqualDefOp.MarginalAverageConditional<Bernoulli>(this.vbool72_uses_B, this.vbool72_F, this.vbool72_marginal_B); // Message to 'vbool407' from AreEqual factor this.vbool407_F = BooleanAreEqualOp.AreEqualAverageConditional(this.vbool67_uses_F[0], this.vbool72_uses_F[1]); // Message to 'vbool407_marginal' from ReplicateWithMarginal factor this.vbool407_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool407_uses_B, this.vbool407_F, this.vbool407_marginal_B); // Message to 'vbool72_uses' from UsesEqualDef factor this.vbool72_uses_F[0] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool72_uses_B, this.vbool72_F, 0, this.vbool72_uses_F[0]); // Message to 'vbool90_uses' from AreEqual factor this.vbool90_uses_B[0] = BooleanAreEqualOp.AAverageConditional(this.vbool210_B, this.vbool72_uses_F[0]); // Message to 'vbool90_marginal' from UsesEqualDef factor this.vbool90_marginal_B = UsesEqualDefOp.MarginalAverageConditional<Bernoulli>(this.vbool90_uses_B, this.vbool90_F, this.vbool90_marginal_B); // Message to 'vbool210' from AreEqual factor this.vbool210_F = BooleanAreEqualOp.AreEqualAverageConditional(this.vbool90_uses_F[0], this.vbool72_uses_F[0]); // Message to 'vbool210_marginal' from ReplicateWithMarginal factor this.vbool210_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool210_uses_B, this.vbool210_F, this.vbool210_marginal_B); // Message to 'vbool90_uses' from UsesEqualDef factor this.vbool90_uses_F[1] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool90_uses_B, this.vbool90_F, 1, this.vbool90_uses_F[1]); // Message to 'vbool155_uses' from AreEqual factor this.vbool155_uses_B[0] = BooleanAreEqualOp.BAverageConditional(this.vbool451_B, this.vbool90_uses_F[1]); // Message to 'vbool451' from AreEqual factor this.vbool451_F = BooleanAreEqualOp.AreEqualAverageConditional(this.vbool90_uses_F[1], this.vbool155_uses_F[0]); // Message to 'vbool451_marginal' from ReplicateWithMarginal factor this.vbool451_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool451_uses_B, this.vbool451_F, this.vbool451_marginal_B); // Message to 'vbool67_uses' from UsesEqualDef factor this.vbool67_uses_F[3] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool67_uses_B, this.vbool67_F, 3, this.vbool67_uses_F[3]); // Message to 'vbool116_uses' from AreEqual factor this.vbool116_uses_B[0] = BooleanAreEqualOp.BAverageConditional(this.vbool405_B, this.vbool67_uses_F[3]); // Message to 'vbool116_marginal' from UsesEqualDef factor this.vbool116_marginal_B = UsesEqualDefOp.MarginalAverageConditional<Bernoulli>(this.vbool116_uses_B, this.vbool116_F, this.vbool116_marginal_B); // Message to 'vbool405' from AreEqual factor this.vbool405_F = BooleanAreEqualOp.AreEqualAverageConditional(this.vbool67_uses_F[3], this.vbool116_uses_F[0]); // Message to 'vbool405_marginal' from ReplicateWithMarginal factor this.vbool405_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool405_uses_B, this.vbool405_F, this.vbool405_marginal_B); // Message to 'vbool405_uses' from ReplicateWithMarginal factor this.vbool405_uses_F[0] = ReplicateOp.UsesAverageConditional<Bernoulli>(this.vbool405_uses_B, this.vbool405_F, 0, this.vbool405_uses_F[0]); // Message to 'vbool407_uses' from ReplicateWithMarginal factor this.vbool407_uses_F[0] = ReplicateOp.UsesAverageConditional<Bernoulli>(this.vbool407_uses_B, this.vbool407_F, 0, this.vbool407_uses_F[0]); // Message to 'vbool116_uses' from UsesEqualDef factor this.vbool116_uses_F[2] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool116_uses_B, this.vbool116_F, 2, this.vbool116_uses_F[2]); // Message to 'vbool145_uses' from UsesEqualDef factor this.vbool145_uses_F[2] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool145_uses_B, this.vbool145_F, 2, this.vbool145_uses_F[2]); // Message to 'vbool111_uses' from And factor this.vbool111_uses_B[0] = BooleanAndOp.BAverageConditional(this.vbool215_B, this.vbool145_uses_F[2]); // Message to 'vbool145_uses' from UsesEqualDef factor this.vbool145_uses_F[4] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool145_uses_B, this.vbool145_F, 4, this.vbool145_uses_F[4]); // Message to 'vbool107_uses' from And factor this.vbool107_uses_B[0] = BooleanAndOp.BAverageConditional(this.vbool218_B, this.vbool145_uses_F[4]); // Message to 'vbool145_uses' from UsesEqualDef factor this.vbool145_uses_F[8] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool145_uses_B, this.vbool145_F, 8, this.vbool145_uses_F[8]); // Message to 'vbool110_uses' from And factor this.vbool110_uses_B[1] = BooleanAndOp.BAverageConditional(this.vbool230_B, this.vbool145_uses_F[8]); // Message to 'vbool110_marginal' from UsesEqualDef factor this.vbool110_marginal_B = UsesEqualDefOp.MarginalAverageConditional<Bernoulli>(this.vbool110_uses_B, this.vbool110_F, this.vbool110_marginal_B); // Message to 'vbool230' from And factor this.vbool230_F = BooleanAndOp.AndAverageConditional(this.vbool145_uses_F[8], this.vbool110_uses_F[1]); // Message to 'vbool230_marginal' from ReplicateWithMarginal factor this.vbool230_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool230_uses_B, this.vbool230_F, this.vbool230_marginal_B); // Message to 'vbool110_uses' from UsesEqualDef factor this.vbool110_uses_F[2] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool110_uses_B, this.vbool110_F, 2, this.vbool110_uses_F[2]); // Message to 'vbool145_uses' from And factor this.vbool145_uses_B[10] = BooleanAndOp.AAverageConditional(this.vbool236_B, this.vbool110_uses_F[2]); // Message to 'vbool145_marginal' from UsesEqualDef factor this.vbool145_marginal_B = UsesEqualDefOp.MarginalAverageConditional<Bernoulli>(this.vbool145_uses_B, this.vbool145_F, this.vbool145_marginal_B); // Message to 'vbool236' from And factor this.vbool236_F = BooleanAndOp.AndAverageConditional(this.vbool145_uses_F[10], this.vbool110_uses_F[2]); // Message to 'vbool236_marginal' from ReplicateWithMarginal factor this.vbool236_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool236_uses_B, this.vbool236_F, this.vbool236_marginal_B); // Message to 'vbool145_uses' from UsesEqualDef factor this.vbool145_uses_F[6] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool145_uses_B, this.vbool145_F, 6, this.vbool145_uses_F[6]); // Message to 'vbool108_uses' from And factor this.vbool108_uses_B[0] = BooleanAndOp.BAverageConditional(this.vbool224_B, this.vbool145_uses_F[6]); // Message to 'vbool145_uses' from UsesEqualDef factor this.vbool145_uses_F[7] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool145_uses_B, this.vbool145_F, 7, this.vbool145_uses_F[7]); // Message to 'vbool108_uses' from And factor this.vbool108_uses_B[1] = BooleanAndOp.BAverageConditional(this.vbool227_B, this.vbool145_uses_F[7]); // Message to 'vbool108_marginal' from UsesEqualDef factor this.vbool108_marginal_B = UsesEqualDefOp.MarginalAverageConditional<Bernoulli>(this.vbool108_uses_B, this.vbool108_F, this.vbool108_marginal_B); // Message to 'vbool145_uses' from UsesEqualDef factor this.vbool145_uses_F[9] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool145_uses_B, this.vbool145_F, 9, this.vbool145_uses_F[9]); // Message to 'vbool109_uses' from And factor this.vbool109_uses_B[0] = BooleanAndOp.BAverageConditional(this.vbool233_B, this.vbool145_uses_F[9]); // Message to 'vbool145_uses' from UsesEqualDef factor this.vbool145_uses_F[11] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool145_uses_B, this.vbool145_F, 11, this.vbool145_uses_F[11]); // Message to 'vbool109_uses' from And factor this.vbool109_uses_B[1] = BooleanAndOp.BAverageConditional(this.vbool239_B, this.vbool145_uses_F[11]); // Message to 'vbool109_marginal' from UsesEqualDef factor this.vbool109_marginal_B = UsesEqualDefOp.MarginalAverageConditional<Bernoulli>(this.vbool109_uses_B, this.vbool109_F, this.vbool109_marginal_B); // Message to 'vbool110_uses' from UsesEqualDef factor this.vbool110_uses_F[4] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool110_uses_B, this.vbool110_F, 4, this.vbool110_uses_F[4]); // Message to 'vbool110_uses' from UsesEqualDef factor this.vbool110_uses_F[5] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool110_uses_B, this.vbool110_F, 5, this.vbool110_uses_F[5]); // Message to 'vbool108_uses' from UsesEqualDef factor this.vbool108_uses_F[3] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool108_uses_B, this.vbool108_F, 3, this.vbool108_uses_F[3]); // Message to 'vbool108_uses' from UsesEqualDef factor this.vbool108_uses_F[4] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool108_uses_B, this.vbool108_F, 4, this.vbool108_uses_F[4]); // Message to 'vbool109_uses' from UsesEqualDef factor this.vbool109_uses_F[3] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool109_uses_B, this.vbool109_F, 3, this.vbool109_uses_F[3]); // Message to 'vbool109_uses' from UsesEqualDef factor this.vbool109_uses_F[4] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool109_uses_B, this.vbool109_F, 4, this.vbool109_uses_F[4]); // Message to 'vbool110_uses' from UsesEqualDef factor this.vbool110_uses_F[6] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool110_uses_B, this.vbool110_F, 6, this.vbool110_uses_F[6]); // Message to 'vbool108_uses' from UsesEqualDef factor this.vbool108_uses_F[5] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool108_uses_B, this.vbool108_F, 5, this.vbool108_uses_F[5]); // Message to 'vbool108_uses' from UsesEqualDef factor this.vbool108_uses_F[6] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool108_uses_B, this.vbool108_F, 6, this.vbool108_uses_F[6]); // Message to 'vbool110_uses' from UsesEqualDef factor this.vbool110_uses_F[7] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool110_uses_B, this.vbool110_F, 7, this.vbool110_uses_F[7]); // Message to 'vbool109_uses' from UsesEqualDef factor this.vbool109_uses_F[5] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool109_uses_B, this.vbool109_F, 5, this.vbool109_uses_F[5]); // Message to 'vbool109_uses' from UsesEqualDef factor this.vbool109_uses_F[6] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool109_uses_B, this.vbool109_F, 6, this.vbool109_uses_F[6]); // Message to 'vbool110_uses' from UsesEqualDef factor this.vbool110_uses_F[8] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool110_uses_B, this.vbool110_F, 8, this.vbool110_uses_F[8]); // Message to 'vbool110_uses' from UsesEqualDef factor this.vbool110_uses_F[3] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool110_uses_B, this.vbool110_F, 3, this.vbool110_uses_F[3]); // Message to 'vbool106_uses' from AreEqual factor this.vbool106_uses_B[0] = BooleanAreEqualOp.BAverageConditional(this.vbool193_B, this.vbool110_uses_F[3]); // Message to 'vbool106_marginal' from UsesEqualDef factor this.vbool106_marginal_B = UsesEqualDefOp.MarginalAverageConditional<Bernoulli>(this.vbool106_uses_B, this.vbool106_F, this.vbool106_marginal_B); // Message to 'vbool193' from AreEqual factor this.vbool193_F = BooleanAreEqualOp.AreEqualAverageConditional(this.vbool110_uses_F[3], this.vbool106_uses_F[0]); // Message to 'vbool193_marginal' from ReplicateWithMarginal factor this.vbool193_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool193_uses_B, this.vbool193_F, this.vbool193_marginal_B); // Message to 'vbool108_uses' from UsesEqualDef factor this.vbool108_uses_F[2] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool108_uses_B, this.vbool108_F, 2, this.vbool108_uses_F[2]); // Message to 'vbool104_uses' from AreEqual factor this.vbool104_uses_B[0] = BooleanAreEqualOp.BAverageConditional(this.vbool191_B, this.vbool108_uses_F[2]); // Message to 'vbool104_marginal' from UsesEqualDef factor this.vbool104_marginal_B = UsesEqualDefOp.MarginalAverageConditional<Bernoulli>(this.vbool104_uses_B, this.vbool104_F, this.vbool104_marginal_B); // Message to 'vbool191' from AreEqual factor this.vbool191_F = BooleanAreEqualOp.AreEqualAverageConditional(this.vbool108_uses_F[2], this.vbool104_uses_F[0]); // Message to 'vbool191_marginal' from ReplicateWithMarginal factor this.vbool191_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool191_uses_B, this.vbool191_F, this.vbool191_marginal_B); // Message to 'vbool230_uses' from ReplicateWithMarginal factor this.vbool230_uses_F[0] = ReplicateOp.UsesAverageConditional<Bernoulli>(this.vbool230_uses_B, this.vbool230_F, 0, this.vbool230_uses_F[0]); // Message to 'vbool113_uses' from And factor this.vbool113_uses_B[1] = BooleanAndOp.BAverageConditional(this.vbool231_B, this.vbool230_uses_F[0]); // Message to 'vbool109_uses' from UsesEqualDef factor this.vbool109_uses_F[2] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool109_uses_B, this.vbool109_F, 2, this.vbool109_uses_F[2]); // Message to 'vbool105_uses' from AreEqual factor this.vbool105_uses_B[0] = BooleanAreEqualOp.BAverageConditional(this.vbool192_B, this.vbool109_uses_F[2]); // Message to 'vbool105_marginal' from UsesEqualDef factor this.vbool105_marginal_B = UsesEqualDefOp.MarginalAverageConditional<Bernoulli>(this.vbool105_uses_B, this.vbool105_F, this.vbool105_marginal_B); // Message to 'vbool192' from AreEqual factor this.vbool192_F = BooleanAreEqualOp.AreEqualAverageConditional(this.vbool109_uses_F[2], this.vbool105_uses_F[0]); // Message to 'vbool192_marginal' from ReplicateWithMarginal factor this.vbool192_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool192_uses_B, this.vbool192_F, this.vbool192_marginal_B); // Message to 'vbool236_uses' from ReplicateWithMarginal factor this.vbool236_uses_F[0] = ReplicateOp.UsesAverageConditional<Bernoulli>(this.vbool236_uses_B, this.vbool236_F, 0, this.vbool236_uses_F[0]); // Message to 'vbool114_uses' from And factor this.vbool114_uses_B[1] = BooleanAndOp.BAverageConditional(this.vbool237_B, this.vbool236_uses_F[0]); // Message to 'vbool106_uses' from UsesEqualDef factor this.vbool106_uses_F[1] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool106_uses_B, this.vbool106_F, 1, this.vbool106_uses_F[1]); // Message to 'vbool184_uses' from AreEqual factor this.vbool184_uses_B[0] = BooleanAreEqualOp.BAverageConditional(this.vbool450_B, this.vbool106_uses_F[1]); // Message to 'vbool450' from AreEqual factor this.vbool450_F = BooleanAreEqualOp.AreEqualAverageConditional(this.vbool106_uses_F[1], this.vbool184_uses_F[0]); // Message to 'vbool450_marginal' from ReplicateWithMarginal factor this.vbool450_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool450_uses_B, this.vbool450_F, this.vbool450_marginal_B); // Message to 'vbool104_uses' from UsesEqualDef factor this.vbool104_uses_F[1] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool104_uses_B, this.vbool104_F, 1, this.vbool104_uses_F[1]); // Message to 'vbool182_uses' from AreEqual factor this.vbool182_uses_B[0] = BooleanAreEqualOp.BAverageConditional(this.vbool448_B, this.vbool104_uses_F[1]); // Message to 'vbool448' from AreEqual factor this.vbool448_F = BooleanAreEqualOp.AreEqualAverageConditional(this.vbool104_uses_F[1], this.vbool182_uses_F[0]); // Message to 'vbool448_marginal' from ReplicateWithMarginal factor this.vbool448_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool448_uses_B, this.vbool448_F, this.vbool448_marginal_B); // Message to 'vbool105_uses' from UsesEqualDef factor this.vbool105_uses_F[1] = UsesEqualDefOp.UsesAverageConditional<Bernoulli>(this.vbool105_uses_B, this.vbool105_F, 1, this.vbool105_uses_F[1]); // Message to 'vbool183_uses' from AreEqual factor this.vbool183_uses_B[0] = BooleanAreEqualOp.BAverageConditional(this.vbool449_B, this.vbool105_uses_F[1]); // Message to 'vbool449' from AreEqual factor this.vbool449_F = BooleanAreEqualOp.AreEqualAverageConditional(this.vbool105_uses_F[1], this.vbool183_uses_F[0]); // Message to 'vbool449_marginal' from ReplicateWithMarginal factor this.vbool449_marginal_B = ReplicateOp.MarginalAverageConditional<Bernoulli>(this.vbool449_uses_B, this.vbool449_F, this.vbool449_marginal_B); } /// <summary> /// Returns the marginal distribution for 'vbool163' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool163Marginal() { return this.vbool163_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool420' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool420Marginal() { return this.vbool420_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool419' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool419Marginal() { return this.vbool419_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool181' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool181Marginal() { return this.vbool181_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool441' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool441Marginal() { return this.vbool441_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool103' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool103Marginal() { return this.vbool103_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool446' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool446Marginal() { return this.vbool446_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool194' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool194Marginal() { return this.vbool194_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool155' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool155Marginal() { return this.vbool155_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool111' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool111Marginal() { return this.vbool111_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool287' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool287Marginal() { return this.vbool287_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool0' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool0Marginal() { return this.vbool0_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool369' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool369Marginal() { return this.vbool369_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool382' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool382Marginal() { return this.vbool382_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool380' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool380Marginal() { return this.vbool380_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool404' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool404Marginal() { return this.vbool404_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool368' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool368Marginal() { return this.vbool368_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool372' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool372Marginal() { return this.vbool372_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool1' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool1Marginal() { return this.vbool1_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool456' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool456Marginal() { return this.vbool456_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool2' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool2Marginal() { return this.vbool2_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool406' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool406Marginal() { return this.vbool406_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool408' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool408Marginal() { return this.vbool408_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool403' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool403Marginal() { return this.vbool403_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool409' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool409Marginal() { return this.vbool409_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool371' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool371Marginal() { return this.vbool371_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool379' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool379Marginal() { return this.vbool379_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool387' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool387Marginal() { return this.vbool387_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool395' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool395Marginal() { return this.vbool395_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool374' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool374Marginal() { return this.vbool374_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool376' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool376Marginal() { return this.vbool376_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool377' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool377Marginal() { return this.vbool377_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool384' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool384Marginal() { return this.vbool384_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool385' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool385Marginal() { return this.vbool385_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool388' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool388Marginal() { return this.vbool388_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool390' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool390Marginal() { return this.vbool390_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool392' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool392Marginal() { return this.vbool392_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool393' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool393Marginal() { return this.vbool393_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool396' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool396Marginal() { return this.vbool396_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool398' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool398Marginal() { return this.vbool398_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool400' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool400Marginal() { return this.vbool400_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool401' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool401Marginal() { return this.vbool401_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool93' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool93Marginal() { return this.vbool93_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool455' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool455Marginal() { return this.vbool455_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool71' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool71Marginal() { return this.vbool71_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool214' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool214Marginal() { return this.vbool214_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool399' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool399Marginal() { return this.vbool399_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool394' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool394Marginal() { return this.vbool394_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool45' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool45Marginal() { return this.vbool45_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool209' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool209Marginal() { return this.vbool209_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool14' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool14Marginal() { return this.vbool14_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool188' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool188Marginal() { return this.vbool188_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool40' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool40Marginal() { return this.vbool40_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool414' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool414Marginal() { return this.vbool414_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool19' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool19Marginal() { return this.vbool19_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool204' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool204Marginal() { return this.vbool204_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool144' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool144Marginal() { return this.vbool144_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool198' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool198Marginal() { return this.vbool198_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool66' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool66Marginal() { return this.vbool66_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool162' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool162Marginal() { return this.vbool162_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool418' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool418Marginal() { return this.vbool418_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool424' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool424Marginal() { return this.vbool424_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool158' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool158Marginal() { return this.vbool158_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool445' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool445Marginal() { return this.vbool445_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool184' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool184Marginal() { return this.vbool184_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool284' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool284Marginal() { return this.vbool284_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool285' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool285Marginal() { return this.vbool285_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool277' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool277Marginal() { return this.vbool277_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool92' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool92Marginal() { return this.vbool92_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool454' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool454Marginal() { return this.vbool454_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool70' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool70Marginal() { return this.vbool70_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool213' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool213Marginal() { return this.vbool213_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool391' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool391Marginal() { return this.vbool391_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool386' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool386Marginal() { return this.vbool386_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool143' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool143Marginal() { return this.vbool143_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool44' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool44Marginal() { return this.vbool44_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool208' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool208Marginal() { return this.vbool208_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool13' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool13Marginal() { return this.vbool13_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool187' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool187Marginal() { return this.vbool187_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool39' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool39Marginal() { return this.vbool39_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool413' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool413Marginal() { return this.vbool413_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool18' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool18Marginal() { return this.vbool18_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool203' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool203Marginal() { return this.vbool203_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool197' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool197Marginal() { return this.vbool197_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool65' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool65Marginal() { return this.vbool65_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool161' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool161Marginal() { return this.vbool161_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool417' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool417Marginal() { return this.vbool417_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool423' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool423Marginal() { return this.vbool423_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool157' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool157Marginal() { return this.vbool157_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool444' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool444Marginal() { return this.vbool444_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool183' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool183Marginal() { return this.vbool183_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool278' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool278Marginal() { return this.vbool278_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool275' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool275Marginal() { return this.vbool275_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool281' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool281Marginal() { return this.vbool281_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool282' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool282Marginal() { return this.vbool282_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool279' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool279Marginal() { return this.vbool279_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool280' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool280Marginal() { return this.vbool280_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool283' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool283Marginal() { return this.vbool283_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool286' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool286Marginal() { return this.vbool286_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool276' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool276Marginal() { return this.vbool276_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool274' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool274Marginal() { return this.vbool274_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool271' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool271Marginal() { return this.vbool271_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool268' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool268Marginal() { return this.vbool268_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool91' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool91Marginal() { return this.vbool91_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool453' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool453Marginal() { return this.vbool453_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool69' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool69Marginal() { return this.vbool69_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool212' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool212Marginal() { return this.vbool212_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool383' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool383Marginal() { return this.vbool383_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool378' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool378Marginal() { return this.vbool378_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool142' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool142Marginal() { return this.vbool142_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool43' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool43Marginal() { return this.vbool43_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool207' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool207Marginal() { return this.vbool207_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool12' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool12Marginal() { return this.vbool12_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool186' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool186Marginal() { return this.vbool186_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool38' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool38Marginal() { return this.vbool38_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool412' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool412Marginal() { return this.vbool412_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool17' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool17Marginal() { return this.vbool17_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool202' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool202Marginal() { return this.vbool202_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool196' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool196Marginal() { return this.vbool196_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool64' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool64Marginal() { return this.vbool64_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool160' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool160Marginal() { return this.vbool160_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool416' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool416Marginal() { return this.vbool416_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool422' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool422Marginal() { return this.vbool422_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool156' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool156Marginal() { return this.vbool156_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool443' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool443Marginal() { return this.vbool443_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool182' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool182Marginal() { return this.vbool182_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool269' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool269Marginal() { return this.vbool269_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool266' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool266Marginal() { return this.vbool266_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool272' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool272Marginal() { return this.vbool272_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool273' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool273Marginal() { return this.vbool273_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool270' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool270Marginal() { return this.vbool270_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool267' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool267Marginal() { return this.vbool267_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool265' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool265Marginal() { return this.vbool265_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool262' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool262Marginal() { return this.vbool262_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool259' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool259Marginal() { return this.vbool259_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool256' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool256Marginal() { return this.vbool256_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool253' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool253Marginal() { return this.vbool253_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool250' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool250Marginal() { return this.vbool250_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool247' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool247Marginal() { return this.vbool247_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool89' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool89Marginal() { return this.vbool89_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool452' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool452Marginal() { return this.vbool452_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool68' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool68Marginal() { return this.vbool68_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool211' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool211Marginal() { return this.vbool211_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool375' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool375Marginal() { return this.vbool375_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool370' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool370Marginal() { return this.vbool370_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool16' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool16Marginal() { return this.vbool16_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool195' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool195Marginal() { return this.vbool195_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool37' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool37Marginal() { return this.vbool37_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool201' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool201Marginal() { return this.vbool201_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool11' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool11Marginal() { return this.vbool11_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool411' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool411Marginal() { return this.vbool411_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool42' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool42Marginal() { return this.vbool42_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool185' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool185Marginal() { return this.vbool185_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool63' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool63Marginal() { return this.vbool63_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool206' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool206Marginal() { return this.vbool206_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool373' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool373Marginal() { return this.vbool373_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool141' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool141Marginal() { return this.vbool141_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool159' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool159Marginal() { return this.vbool159_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool415' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool415Marginal() { return this.vbool415_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool421' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool421Marginal() { return this.vbool421_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool154' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool154Marginal() { return this.vbool154_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool442' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool442Marginal() { return this.vbool442_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool112' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool112Marginal() { return this.vbool112_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool180' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool180Marginal() { return this.vbool180_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool254' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool254Marginal() { return this.vbool254_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool260' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool260Marginal() { return this.vbool260_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool248' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool248Marginal() { return this.vbool248_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool251' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool251Marginal() { return this.vbool251_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool257' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool257Marginal() { return this.vbool257_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool263' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool263Marginal() { return this.vbool263_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool245' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool245Marginal() { return this.vbool245_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool246' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool246Marginal() { return this.vbool246_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool244' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool244Marginal() { return this.vbool244_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool242' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool242Marginal() { return this.vbool242_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool102' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool102Marginal() { return this.vbool102_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool190' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool190Marginal() { return this.vbool190_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool447' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool447Marginal() { return this.vbool447_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool107' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool107Marginal() { return this.vbool107_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool243' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool243Marginal() { return this.vbool243_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool241' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool241Marginal() { return this.vbool241_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool240' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool240Marginal() { return this.vbool240_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool238' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool238Marginal() { return this.vbool238_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool239' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool239Marginal() { return this.vbool239_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool237' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool237Marginal() { return this.vbool237_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool235' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool235Marginal() { return this.vbool235_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool234' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool234Marginal() { return this.vbool234_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool232' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool232Marginal() { return this.vbool232_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool233' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool233Marginal() { return this.vbool233_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool231' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool231Marginal() { return this.vbool231_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool229' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool229Marginal() { return this.vbool229_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool228' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool228Marginal() { return this.vbool228_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool226' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool226Marginal() { return this.vbool226_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool227' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool227Marginal() { return this.vbool227_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool225' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool225Marginal() { return this.vbool225_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool223' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool223Marginal() { return this.vbool223_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool224' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool224Marginal() { return this.vbool224_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool222' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool222Marginal() { return this.vbool222_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool220' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool220Marginal() { return this.vbool220_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool217' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool217Marginal() { return this.vbool217_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool219' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool219Marginal() { return this.vbool219_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool215' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool215Marginal() { return this.vbool215_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool216' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool216Marginal() { return this.vbool216_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool218' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool218Marginal() { return this.vbool218_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool115' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool115Marginal() { return this.vbool115_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool397' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool397Marginal() { return this.vbool397_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool252' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool252Marginal() { return this.vbool252_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool264' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool264Marginal() { return this.vbool264_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool381' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool381Marginal() { return this.vbool381_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool389' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool389Marginal() { return this.vbool389_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool255' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool255Marginal() { return this.vbool255_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool261' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool261Marginal() { return this.vbool261_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool249' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool249Marginal() { return this.vbool249_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool258' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool258Marginal() { return this.vbool258_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool113' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool113Marginal() { return this.vbool113_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool114' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool114Marginal() { return this.vbool114_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool221' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool221Marginal() { return this.vbool221_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool402' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool402Marginal() { return this.vbool402_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool20' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool20Marginal() { return this.vbool20_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool199' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool199Marginal() { return this.vbool199_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool41' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool41Marginal() { return this.vbool41_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool200' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool200Marginal() { return this.vbool200_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool15' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool15Marginal() { return this.vbool15_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool410' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool410Marginal() { return this.vbool410_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool46' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool46Marginal() { return this.vbool46_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool189' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool189Marginal() { return this.vbool189_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool67' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool67Marginal() { return this.vbool67_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool205' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool205Marginal() { return this.vbool205_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool72' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool72Marginal() { return this.vbool72_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool407' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool407Marginal() { return this.vbool407_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool90' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool90Marginal() { return this.vbool90_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool210' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool210Marginal() { return this.vbool210_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool451' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool451Marginal() { return this.vbool451_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool116' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool116Marginal() { return this.vbool116_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool405' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool405Marginal() { return this.vbool405_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool110' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool110Marginal() { return this.vbool110_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool230' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool230Marginal() { return this.vbool230_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool145' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool145Marginal() { return this.vbool145_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool236' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool236Marginal() { return this.vbool236_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool108' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool108Marginal() { return this.vbool108_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool109' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool109Marginal() { return this.vbool109_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool106' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool106Marginal() { return this.vbool106_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool193' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool193Marginal() { return this.vbool193_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool104' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool104Marginal() { return this.vbool104_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool191' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool191Marginal() { return this.vbool191_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool105' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool105Marginal() { return this.vbool105_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool192' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool192Marginal() { return this.vbool192_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool450' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool450Marginal() { return this.vbool450_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool448' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool448Marginal() { return this.vbool448_marginal_B; } /// <summary> /// Returns the marginal distribution for 'vbool449' given by the current state of the /// message passing algorithm. /// </summary> /// <returns>The marginal distribution</returns> public Bernoulli Vbool449Marginal() { return this.vbool449_marginal_B; } #endregion } }
plaidgroup/plural
AnekSource/GraphLoader/GraphLoader/GeneratedSource/Model35_EP.cs
C#
gpl-2.0
588,696
<?php $gt3pb_tabs = new Tabs(); $gt3pb_tabs->add(new Tab(array( 'name' => 'General', 'desc' => '', 'icon' => 'general.png', 'icon_active' => 'general_active.png', 'icon_hover' => 'general_hover.png' ), array( new UploadOption(array( 'name' => 'Header logo', 'id' => 'logo', 'desc' => 'Default: 101px x 112px', 'default' => '/img/logo.png' )), new textOption(array( 'name' => 'Header logo width', 'id' => 'header_logo_standart_width', 'not_empty' => true, 'width' => '100px', 'textalign' => 'center', 'default' => '101' )), new SelectOption(array( 'name' => 'Header type', 'id' => 'header_type', 'desc' => '', 'default' => 'head_type1', 'options' => array( 'head_type1' => 'Default', 'head_type2' => 'Type 2', 'head_type3' => 'Type 3', 'head_type4' => 'Type 4', 'head_type5' => 'Type 5' ) )), new TextareaOption(array( 'name' => 'Custom CSS', 'id' => 'custom_css', 'default' => '' )), new ColorOption(array( 'name' => 'Theme color', 'id' => 'theme_color1', 'desc' => '', 'not_empty' => 'true', 'default' => '0aa4ca' )), ))); ?>
dannychan4277/teak
wp-content/plugins/gt3-pagebuilder-custom/core/plugin-settings/options.php
PHP
gpl-2.0
1,341
/* SPDX-License-Identifier: LGPL-2.1+ */ #pragma once #include "sd-network.h" bool network_is_online(void);
fbuihuu/systemd
src/libsystemd/sd-network/network-util.h
C
gpl-2.0
111
/********************************************************************** * * FreeDoko a Doppelkopf-Game * * Copyright (C) 2001-2013 by Diether Knof and Borg Enders * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of * the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You can find this license in the file 'gpl.txt'. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * MA 02111-1307 USA * * Contact: * Diether Knof dknof@gmx.de * Borg Enders borg@borgsoft.de * *********************************************************************/ #include "constants.h" #ifdef USE_UI_GTKMM #include "htin.h" #include "table.h" #include "../../player/player.h" namespace UI_GTKMM_NS { /** ** ** Constructor ** ** @param table the table ** @param player the player ** ** @return - ** ** @author Diether Knof ** ** @version 0.6.0 ** **/ HTIN::HTIN(Table* const table, Player const* const player) : Base(table), player(player) { return ; } // HTIN::HTIN(Table* const table, Player const* const player) /** ** ** Destruktor ** ** @param - ** ** @return - ** ** @author Diether Knof ** ** @version 0.6.0 ** **/ HTIN::~HTIN() { return ; } // HTIN::~HTIN() /** ** ** -> result ** ** @param - ** ** @return the table ** ** @version 0.6.0 ** ** @author Diether Knof ** **/ Table& HTIN::table() { return *dynamic_cast<Table*>(this->parent); } // Table& HTIN::table() /** ** ** -> result ** ** @param - ** ** @return the table ** ** @version 0.6.0 ** ** @author Diether Knof ** **/ Table const& HTIN::table() const { return *dynamic_cast<Table*>(this->parent); } // Table const& HTIN::table() const /** ** ** -> result ** ** @param - ** ** @return the position of the object ** ** @version 0.6.0 ** ** @author Diether Knof ** **/ Position HTIN::position() const { return this->table().position(*this->player); } // Position HTIN::position() const /** ** ** -> result ** ** @param - ** ** @return the rotation of the object ** ** @version 0.6.0 ** ** @author Diether Knof ** **/ Rotation HTIN::rotation() const { return this->table().rotation(*this->player); } // Rotation HTIN::rotation() const /** ** ** -> result ** ** @param position the position ** ** @return the rotation of the object at 'position' ** ** @version 0.6.0 ** ** @author Diether Knof ** **/ Rotation HTIN::rotation(Position const position) const { return this->table().rotation(position); } // Rotation HTIN::rotation(Position const position) const /** ** ** -> result ** ** @param - ** ** @return the corresponding hand ** ** @version 0.6.0 ** ** @author Diether Knof ** **/ Hand& HTIN::hand() { return this->table().hand(*(this->player)); } // Hand& HTIN::hand() /** ** ** -> result ** ** @param - ** ** @return the corresponding hand ** ** @version 0.6.0 ** ** @author Diether Knof ** **/ Hand const& HTIN::hand() const { return this->table().hand(*(this->player)); } // Hand const& HTIN::hand() const /** ** ** -> result ** ** @param position the position ** ** @return the hand at 'position' ** ** @version 0.6.3 ** ** @author Diether Knof ** **/ Hand& HTIN::hand(Position const position) { return this->table().hand(position); } // Hand& HTIN::hand(Position const position) /** ** ** -> result ** ** @param - ** ** @return the corresponding trickpile ** ** @version 0.6.0 ** ** @author Diether Knof ** **/ TrickPile& HTIN::trickpile() { return this->table().trickpile(*(this->player)); } // TrickPile& HTIN::trickpile() /** ** ** -> result ** ** @param - ** ** @return the corresponding trickpile ** ** @version 0.6.0 ** ** @author Diether Knof ** **/ TrickPile const& HTIN::trickpile() const { return this->table().trickpile(*(this->player)); } // TrickPile const& HTIN::trickpile() const /** ** ** -> result ** ** @param position the position ** ** @return the trickpile at 'position' ** ** @version 0.6.3 ** ** @author Diether Knof ** **/ TrickPile& HTIN::trickpile(Position const position) { return this->table().trickpile(position); } // TrickPile& HTIN::trickpile(Position const position) /** ** ** -> result ** ** @param - ** ** @return the corresponding icongroup ** ** @version 0.6.1 ** ** @author Diether Knof ** **/ Icongroup& HTIN::icongroup() { return this->table().icongroup(*(this->player)); } // Icongroup& HTIN::icongroup() /** ** ** -> result ** ** @param - ** ** @return the corresponding icongroup ** ** @version 0.6.1 ** ** @author Diether Knof ** **/ Icongroup const& HTIN::icongroup() const { return this->table().icongroup(*(this->player)); } // Icongroup const& HTIN::icongroup() const /** ** ** -> result ** ** @param position the position ** ** @return the icongroup at 'position' ** ** @version 0.6.3 ** ** @author Diether Knof ** **/ Icongroup& HTIN::icongroup(Position const position) { return this->table().icongroup(position); } // Icongroup& HTIN::icongroup(Position const position) /** ** ** -> result ** ** @param - ** ** @return the corresponding name ** ** @version 0.6.1 ** ** @author Diether Knof ** **/ Name& HTIN::name() { return this->table().name(*(this->player)); } // Name& HTIN::name() /** ** ** -> result ** ** @param - ** ** @return the corresponding name ** ** @version 0.6.1 ** ** @author Diether Knof ** **/ Name const& HTIN::name() const { return this->table().name(*(this->player)); } // Name const& HTIN::name() const /** ** ** -> result ** ** @param position the position ** ** @return the name at 'position' ** ** @version 0.6.3 ** ** @author Diether Knof ** **/ Name& HTIN::name(Position const position) { return this->table().name(position); } // Name& HTIN::name(Position const position) } // namespace UI_GTKMM_NS #endif // #ifdef USE_UI_GTKMM
svenihoney/freedoko
src/ui/gtkmm/htin.cpp
C++
gpl-2.0
7,522
/* * The Mana World * Copyright (C) 2004 The Mana World Development Team * * This file is part of The Mana World. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "gui/updatewindow.h" #include "gui/widgets/browserbox.h" #include "gui/widgets/button.h" #include "gui/widgets/label.h" #include "gui/widgets/layout.h" #include "gui/widgets/progressbar.h" #include "gui/widgets/scrollarea.h" #include "configuration.h" #include "log.h" #include "main.h" #include "resources/resourcemanager.h" #include "utils/gettext.h" #include "utils/stringutils.h" #include <iostream> #include <SDL.h> #include <SDL_thread.h> #include <zlib.h> #include <curl/curl.h> /** * Calculates the Alder-32 checksum for the given file. */ static unsigned long fadler32(FILE *file) { // Obtain file size fseek(file, 0, SEEK_END); long fileSize = ftell(file); rewind(file); // Calculate Adler-32 checksum char *buffer = (char*) malloc(fileSize); const size_t read = fread(buffer, 1, fileSize, file); unsigned long adler = adler32(0L, Z_NULL, 0); adler = adler32(adler, (Bytef*) buffer, read); free(buffer); return adler; } /** * Load the given file into a vector of strings. */ std::vector<std::string> loadTextFile(const std::string &fileName) { std::vector<std::string> lines; std::ifstream fin(fileName.c_str()); if (!fin) { logger->log("Couldn't load text file: %s", fileName.c_str()); return lines; } std::string line; while (getline(fin, line)) lines.push_back(line); return lines; } UpdaterWindow::UpdaterWindow(const std::string &updateHost, const std::string &updatesDir): Window(_("Updating...")), mThread(NULL), mDownloadStatus(UPDATE_NEWS), mUpdateHost(updateHost), mUpdatesDir(updatesDir), mCurrentFile("news.txt"), mCurrentChecksum(0), mStoreInMemory(true), mDownloadComplete(true), mUserCancel(false), mDownloadedBytes(0), mMemoryBuffer(NULL), mCurlError(new char[CURL_ERROR_SIZE]), mLineIndex(0) { mCurlError[0] = 0; mBrowserBox = new BrowserBox; mScrollArea = new ScrollArea(mBrowserBox); mLabel = new Label(_("Connecting...")); mProgressBar = new ProgressBar(0.0, 310, 20, gcn::Color(168, 116, 31)); mCancelButton = new Button(_("Cancel"), "cancel", this); mPlayButton = new Button(_("Play"), "play", this); mBrowserBox->setOpaque(false); mPlayButton->setEnabled(false); ContainerPlacer place; place = getPlacer(0, 0); place(0, 0, mScrollArea, 5, 3).setPadding(3); place(0, 3, mLabel, 5); place(0, 4, mProgressBar, 5); place(3, 5, mCancelButton); place(4, 5, mPlayButton); reflowLayout(320, 240); Layout &layout = getLayout(); layout.setRowHeight(0, Layout::AUTO_SET); center(); setVisible(true); mCancelButton->requestFocus(); // Try to download the updates list download(); } UpdaterWindow::~UpdaterWindow() { if (mThread) SDL_WaitThread(mThread, NULL); free(mMemoryBuffer); // Remove possibly leftover temporary download ::remove((mUpdatesDir + "/download.temp").c_str()); delete[] mCurlError; } void UpdaterWindow::setProgress(float p) { mProgressBar->setProgress(p); } void UpdaterWindow::setLabel(const std::string &str) { // Do delayed label text update, since Guichan isn't thread-safe MutexLocker lock(&mLabelMutex); mNewLabelCaption = str; } void UpdaterWindow::enable() { mCancelButton->setEnabled(false); mPlayButton->setEnabled(true); mPlayButton->requestFocus(); } void UpdaterWindow::action(const gcn::ActionEvent &event) { if (event.getId() == "cancel") { // Register the user cancel mUserCancel = true; // Skip the updating process if (mDownloadStatus != UPDATE_COMPLETE) { mDownloadStatus = UPDATE_ERROR; } } else if (event.getId() == "play") { state = STATE_LOADDATA; } } void UpdaterWindow::loadNews() { if (!mMemoryBuffer) { logger->log("Couldn't load news"); return; } // Reallocate and include terminating 0 character mMemoryBuffer = (char*)realloc(mMemoryBuffer, mDownloadedBytes + 1); mMemoryBuffer[mDownloadedBytes] = '\0'; mBrowserBox->clearRows(); // Tokenize and add each line separately char *line = strtok(mMemoryBuffer, "\n"); while (line) { mBrowserBox->addRow(line); line = strtok(NULL, "\n"); } // Free the memory buffer now that we don't need it anymore free(mMemoryBuffer); mMemoryBuffer = NULL; mScrollArea->setVerticalScrollAmount(0); } int UpdaterWindow::updateProgress(void *ptr, double dt, double dn, double ut, double un) { float progress = dn / dt; UpdaterWindow *uw = reinterpret_cast<UpdaterWindow *>(ptr); if (progress != progress) progress = 0.0f; // check for NaN if (progress < 0.0f) progress = 0.0f; // no idea how this could ever happen, but why not check for it anyway. if (progress > 1.0f) progress = 1.0f; uw->setLabel( uw->mCurrentFile + " (" + toString((int) (progress * 100)) + "%)"); uw->setProgress(progress); if (state != STATE_UPDATE || uw->mDownloadStatus == UPDATE_ERROR) { // If the action was canceled return an error code to stop the mThread return -1; } return 0; } size_t UpdaterWindow::memoryWrite(void *ptr, size_t size, size_t nmemb, FILE *stream) { UpdaterWindow *uw = reinterpret_cast<UpdaterWindow *>(stream); size_t totalMem = size * nmemb; uw->mMemoryBuffer = (char*) realloc(uw->mMemoryBuffer, uw->mDownloadedBytes + totalMem); if (uw->mMemoryBuffer) { memcpy(&(uw->mMemoryBuffer[uw->mDownloadedBytes]), ptr, totalMem); uw->mDownloadedBytes += totalMem; } return totalMem; } int UpdaterWindow::downloadThread(void *ptr) { int attempts = 0; UpdaterWindow *uw = reinterpret_cast<UpdaterWindow *>(ptr); CURL *curl; CURLcode res; std::string outFilename; std::string url(uw->mUpdateHost + "/" + uw->mCurrentFile); while (attempts < 3 && !uw->mDownloadComplete) { FILE *outfile = NULL; FILE *newfile = NULL; uw->setLabel(uw->mCurrentFile + " (0%)"); curl = curl_easy_init(); if (curl) { logger->log("Downloading: %s", url.c_str()); if (uw->mStoreInMemory) { uw->mDownloadedBytes = 0; curl_easy_setopt(curl, CURLOPT_FAILONERROR, 1); curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, UpdaterWindow::memoryWrite); curl_easy_setopt(curl, CURLOPT_WRITEDATA, ptr); } else { outFilename = uw->mUpdatesDir + "/download.temp"; outfile = fopen(outFilename.c_str(), "w+b"); curl_easy_setopt(curl, CURLOPT_WRITEDATA, outfile); } #ifdef PACKAGE_VERSION curl_easy_setopt(curl, CURLOPT_USERAGENT, "TMW/" PACKAGE_VERSION); #else curl_easy_setopt(curl, CURLOPT_USERAGENT, "TMW"); #endif curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, uw->mCurlError); curl_easy_setopt(curl, CURLOPT_URL, url.c_str()); curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 0); curl_easy_setopt(curl, CURLOPT_PROGRESSFUNCTION, UpdaterWindow::updateProgress); curl_easy_setopt(curl, CURLOPT_PROGRESSDATA, ptr); curl_easy_setopt(curl, CURLOPT_NOSIGNAL, 1); curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT, 15); struct curl_slist *pHeaders = NULL; if (uw->mDownloadStatus != UPDATE_RESOURCES) { // Make sure the resources2.txt and news.txt aren't cached, // in order to always get the latest version. pHeaders = curl_slist_append(pHeaders, "pragma: no-cache"); pHeaders = curl_slist_append(pHeaders, "Cache-Control: no-cache"); curl_easy_setopt(curl, CURLOPT_HTTPHEADER, pHeaders); } if ((res = curl_easy_perform(curl)) != 0) { uw->mDownloadStatus = UPDATE_ERROR; switch (res) { case CURLE_COULDNT_CONNECT: default: std::cerr << _("curl error ") << res << ": " << uw->mCurlError << _(" host: ") << url.c_str() << std::endl; break; } if (!uw->mStoreInMemory) { fclose(outfile); ::remove(outFilename.c_str()); } attempts++; continue; } curl_easy_cleanup(curl); if (uw->mDownloadStatus != UPDATE_RESOURCES) { curl_slist_free_all(pHeaders); } if (!uw->mStoreInMemory) { // Don't check resources2.txt checksum if (uw->mDownloadStatus == UPDATE_RESOURCES) { unsigned long adler = fadler32(outfile); if (uw->mCurrentChecksum != adler) { fclose(outfile); // Remove the corrupted file ::remove(outFilename.c_str()); logger->log( "Checksum for file %s failed: (%lx/%lx)", uw->mCurrentFile.c_str(), adler, uw->mCurrentChecksum); attempts++; continue; // Bail out here to avoid the renaming } } fclose(outfile); // Give the file the proper name const std::string newName = uw->mUpdatesDir + "/" + uw->mCurrentFile; // Any existing file with this name is deleted first, otherwise // the rename will fail on Windows. ::remove(newName.c_str()); ::rename(outFilename.c_str(), newName.c_str()); // Check if we can open it and no errors were encountered // during renaming newfile = fopen(newName.c_str(), "rb"); if (newfile) { fclose(newfile); uw->mDownloadComplete = true; } } else { // It's stored in memory, we're done uw->mDownloadComplete = true; } } attempts++; } if (!uw->mDownloadComplete) { uw->mDownloadStatus = UPDATE_ERROR; } return 0; } void UpdaterWindow::download() { mDownloadComplete = false; mThread = SDL_CreateThread(UpdaterWindow::downloadThread, this); if (!mThread) { logger->log("Unable to create mThread"); mDownloadStatus = UPDATE_ERROR; } } void UpdaterWindow::logic() { // Update Scroll logic mScrollArea->logic(); // Synchronize label caption when necessary { MutexLocker lock(&mLabelMutex); if (mLabel->getCaption() != mNewLabelCaption) { mLabel->setCaption(mNewLabelCaption); mLabel->adjustSize(); } } switch (mDownloadStatus) { case UPDATE_ERROR: if (mThread) { if (mUserCancel) { // Kill the thread, because user has canceled SDL_KillThread(mThread); // Set the flag to false again mUserCancel = false; } else { SDL_WaitThread(mThread, NULL); } mThread = NULL; } mBrowserBox->addRow(""); mBrowserBox->addRow(_("##1 The update process is incomplete.")); mBrowserBox->addRow(_("##1 It is strongly recommended that")); mBrowserBox->addRow(_("##1 you try again later")); mBrowserBox->addRow(mCurlError); mScrollArea->setVerticalScrollAmount( mScrollArea->getVerticalMaxScroll()); mDownloadStatus = UPDATE_COMPLETE; break; case UPDATE_NEWS: if (mDownloadComplete) { // Parse current memory buffer as news and dispose of the data loadNews(); mCurrentFile = "resources2.txt"; mStoreInMemory = false; mDownloadStatus = UPDATE_LIST; download(); // download() changes mDownloadComplete to false } break; case UPDATE_LIST: if (mDownloadComplete) { mLines = loadTextFile(mUpdatesDir + "/resources2.txt"); mStoreInMemory = false; mDownloadStatus = UPDATE_RESOURCES; } break; case UPDATE_RESOURCES: if (mDownloadComplete) { if (mThread) { SDL_WaitThread(mThread, NULL); mThread = NULL; } if (mLineIndex < mLines.size()) { std::stringstream line(mLines[mLineIndex]); line >> mCurrentFile; std::string checksum; line >> checksum; std::stringstream ss(checksum); ss >> std::hex >> mCurrentChecksum; std::ifstream temp( (mUpdatesDir + "/" + mCurrentFile).c_str()); if (!temp.is_open()) { temp.close(); download(); } else { logger->log("%s already here", mCurrentFile.c_str()); } mLineIndex++; } else { // Download of updates completed mDownloadStatus = UPDATE_COMPLETE; } } break; case UPDATE_COMPLETE: enable(); setLabel(_("Completed")); break; case UPDATE_IDLE: break; } }
kai62656/manabot
src/gui/updatewindow.cpp
C++
gpl-2.0
15,501
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>6.6. Konfigurationsübersicht Icinga Web</title> <link rel="stylesheet" href="../stylesheets/icinga-docs.css" type="text/css"> <meta name="generator" content="DocBook XSL Stylesheets V1.75.1"> <meta name="keywords" content="Supervision, Icinga, Nagios, Linux"> <link rel="home" href="index.html" title="Icinga Version 1.14 Dokumentation"> <link rel="up" href="ch06.html" title="Kapitel 6. Die Benutzeroberflächen"> <link rel="prev" href="icinga-web-scratch.html" title="6.5. Installation des Icinga Web Frontend"> <link rel="next" href="upgrading_icingaweb.html" title="6.7. Aktualisierung von Icinga Web und Icinga Web Datenbank"> <script src="../js/jquery-min.js" type="text/javascript"></script><script src="../js/icinga-docs.js" type="text/javascript"></script> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <CENTER><IMG src="../images/logofullsize.png" border="0" alt="Icinga" title="Icinga"></CENTER> <div class="navheader"> <table width="100%" summary="Navigation header"> <tr><th colspan="3" align="center">6.6. Konfigurationsübersicht Icinga Web</th></tr> <tr> <td width="20%" align="left"> <a accesskey="p" href="icinga-web-scratch.html">Zurück</a> </td> <th width="60%" align="center">Kapitel 6. Die Benutzeroberflächen</th> <td width="20%" align="right"> <a accesskey="n" href="upgrading_icingaweb.html">Weiter</a> </td> </tr> </table> <hr> </div> <div class="section" title="6.6. Konfigurationsübersicht Icinga Web"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <a name="icinga-web-config"></a>6.6. Konfigurationsübersicht Icinga Web</h2></div></div></div> <div class="toc"><dl> <dt><span class="section">6.6.1. <a href="icinga-web-config.html#configfilelocation">Wo sind meine Konfigurationsdateien?</a></span></dt> <dt><span class="section">6.6.2. <a href="icinga-web-config.html#configfileindex">Index</a></span></dt> <dt><span class="section">6.6.3. <a href="icinga-web-config.html#globalconfig">Globale Konfiguration</a></span></dt> <dt><span class="section">6.6.4. <a href="icinga-web-config.html#troubleshooting">Fehlersuche</a></span></dt> <dt><span class="section">6.6.5. <a href="icinga-web-config.html#moduleconfig">Modul-Konfiguration:</a></span></dt> <dt><span class="section">6.6.6. <a href="icinga-web-config.html#customconfig">Benutzerdefinierte Konfiguration</a></span></dt> </dl></div> <div class="section" title="6.6.1. Wo sind meine Konfigurationsdateien?"> <div class="titlepage"><div><div><h3 class="title"> <a name="configfilelocation"></a>6.6.1. Wo sind meine Konfigurationsdateien?</h3></div></div></div> <p>Die von Icinga Web bereitgestellten Konfigurationsdateien stehen unter <code class="filename">app/config</code>, aber Site-spezifische stehen im Web-Konfigurationsordner (per Default <code class="filename">etc/conf.d</code>), der bei Aktualisierungen nicht überschrieben wird. Der Ordner kann während der Installation mit Hilfe von --with-conf-dir geändert werden. Die Namen der Dateien sind identisch zu denen in <code class="filename">app/config</code>.</p> <p>Icinga Web arbeitet mit Modulen und jedes Modul hat seine eigene Konfiguration. Das gilt ebenfalls für die Libraries. Wenn Sie weitere Informationen zu den Cronk-Libraries benötigen, schauen Sie in <code class="filename">app/modules/Cronks/lib</code> (für js in <code class="filename">app/modules/Cronks/lib/js</code>).</p> <p>Ein Modul von Icinga Web ist wie folgt aufgebaut:</p> <pre class="programlisting"> tree -d -L 1 app/modules/AppKit/ app/modules/AppKit/ |-- actions |-- config |-- lib |-- models |-- templates |-- validate |-- views</pre> </div> <div class="section" title="6.6.2. Index"> <div class="titlepage"><div><div><h3 class="title"> <a name="configfileindex"></a>6.6.2. Index</h3></div></div></div> <table border="1" id="idm139734667609280"> <caption>Tabelle 6.1. Konfigurationsdateien</caption> <tr> <td><span class="bold"><strong>Dateiname</strong></span></td> <td><span class="bold"><strong>Ablageort</strong></span></td> <td><span class="bold"><strong>Bemerkung</strong></span></td> </tr> <tr> <td><a class="link" href="icinga-web-config.html#configweb-access">access.xml</a></td> <td>app/modules/Api/config/</td> <td>Controls commands and where Icinga commands goes to</td> </tr> <tr> <td><a class="link" href="icinga-web-config.html#configweb-auth">auth.xml</a></td> <td>app/modules/AppKit/config/</td> <td>Authentication configuration</td> </tr> <tr> <td>cronks.xml</td> <td>app/modules/Cronks/config/</td> <td>System cronk and categories which are not changeable by users</td> </tr> <tr> <td><a class="link" href="icinga-web-config.html#configweb-databases">databases.xml</a></td> <td>app/config/</td> <td>Upgrade safe database connections</td> </tr> <tr> <td><a class="link" href="icinga-web-config.html#configweb-factories">factories.xml</a></td> <td>app/config/</td> <td>Agavi system config, storage and session configuration</td> </tr> <tr> <td>icinga.xml</td> <td>app/config/</td> <td>Icinga settings, e.g. version and prefixes / version name</td> </tr> <tr> <td><a class="link" href="icinga-web-config.html#configweb-logging">logging.xml</a></td> <td>app/config/</td> <td>Disable log levels or write new logfiles</td> </tr> <tr> <td>module_appkit.xml</td> <td>app/modules/AppKit/config/</td> <td>Overwrite settings for AppKit module (ajax timeout, SQL query logging)</td> </tr> <tr> <td>module_cronks.xml</td> <td>app/modules/Cronks/config/</td> <td>Overwrite settings for Cronks module</td> </tr> <tr> <td>module_reporting.xml</td> <td>app/modules/Reporting/config/</td> <td>Overwrite settings for Reporting (multiple JasperServer ...)</td> </tr> <tr> <td>module_web.xml</td> <td>app/modules/Web/config/</td> <td>Overwrite setting for Web module</td> </tr> <tr> <td><a class="link" href="icinga-web-config.html#configweb-settings">settings.xml</a></td> <td>app/config/</td> <td>Change agavi core settings (Title, availability, debug-mode, ...)</td> </tr> <tr> <td>sla.xml</td> <td>app/modules/Api/config/</td> <td>SLA settings for the provider (Only used by tackle view)</td> </tr> <tr> <td>exclude_customvars.xml</td> <td>app/modules/Api/config/</td> <td>Exclude sensitive customvars from API queries</td> </tr> <tr> <td>translation.xml</td> <td>app/config/</td> <td>Default language, date and time formats and settings</td> </tr> <tr> <td>module.xml</td> <td>app/modules/Appkit/config/</td> <td>Overwrite user preferences using userpreferences.xml (in etc/conf.d)</td> </tr> </table> <div class="itemizedlist"><ul class="itemizedlist" type="disc"> <li class="listitem"> <p><a class="link" href="icinga-web-config.html#globalconfig" title="6.6.3. Globale Konfiguration">Globale Konfiguration</a></p> <div class="itemizedlist"><ul class="itemizedlist" type="circle"> <li class="listitem"> <p><a class="link" href="icinga-web-config.html#configweb-access">access.xml</a></p> </li> <li class="listitem"> <p><a class="link" href="icinga-web-config.html#configweb-databases">databases.xml</a></p> </li> <li class="listitem"> <p><a class="link" href="icinga-web-config.html#configweb-factories">factories.xml</a></p> <div class="itemizedlist"><ul class="itemizedlist" type="square"><li class="listitem"> <p><a class="link" href="icinga-web-config.html#configweb-session-lifetime">Session Cookie Lifetime</a></p> </li></ul></div> </li> <li class="listitem"> <p><a class="link" href="icinga-web-config.html#configweb-logging">logging.xml</a></p> </li> <li class="listitem"> <p><a class="link" href="icinga-web-config.html#configweb-settings">settings.xml</a></p> </li> <li class="listitem"> <p><a class="link" href="icinga-web-config.html#configweb-translation">translation.xml</a></p> </li> <li class="listitem"> <p><a class="link" href="icinga-web-config.html#configweb-views">views.xml</a></p> </li> </ul></div> </li> <li class="listitem"> <p><a class="link" href="icinga-web-config.html#configweb-timezone">Default-Zeitzone ändern</a></p> </li> <li class="listitem"> <p><a class="link" href="icinga-web-config.html#configweb-userprefs">Benutzervorgaben ändern</a></p> </li> <li class="listitem"> <p><a class="link" href="icinga-web-config.html#configweb-module">Module-Konfiguration</a></p> </li> <li class="listitem"> <p><a class="link" href="icinga-web-config.html#configweb-auth">Authentifizierung</a></p> </li> <li class="listitem"> <p><a class="link" href="icinga-web-config.html#customconfig" title="6.6.6. Benutzerdefinierte Konfiguration">Benutzerdefinierte Konfiguration</a></p> </li> </ul></div> </div> <div class="section" title="6.6.3. Globale Konfiguration"> <div class="titlepage"><div><div><h3 class="title"> <a name="globalconfig"></a>6.6.3. Globale Konfiguration</h3></div></div></div> <p><span class="bold"><strong>app/config</strong></span></p> <p>Hier finden Sie die globalen Konfigurationsdateien für z.B. die Web-Session, den Icinga-Web-Pfad und die Datenbankinformationen.</p> <p>Die wichtigsten Dateien:</p> <div class="itemizedlist"><ul class="itemizedlist" type="disc"> <li class="listitem"> <p><a name="configweb-access"></a>access.xml</p> <p>Die Konfigurationsdatei <code class="filename">access.xml</code> hat zwei Hauptzwecke:</p> <div class="itemizedlist"><ul class="itemizedlist" type="circle"> <li class="listitem"> <p>definieren von Hosts, auf die von Icinga-Web (via System oder ssh) zugegriffen werden kann und definieren von Dateien, auf die lesend/schreibend zugegriffen werden kann bzw. auszuführenden Programmen</p> </li> <li class="listitem"> <p>zuordnen von Icinga-Instanzen zu diesen Hosts</p> </li> </ul></div> <p>Die <code class="filename">access.xml</code>-Konfiguration wird von Icinga-Webs Console-Handler-Implementation genutzt und bietet zusätzliche Sicherheit, weil sie willkürliche Ausführung/Manipulation von Dateien in letzter Instanz verhindert.</p> <p><span class="bold"><strong>Abschnitte</strong></span></p> <div class="itemizedlist"><ul class="itemizedlist" type="circle"> <li class="listitem"> <p><span class="emphasis"><em>Instanzen</em></span></p> <p>Das Einrichten von Instanzen erfolgt im &lt;instances&gt;-Abschnitt:</p> <p>Beispiel: Zuordnen der Instanz 'default' zum Host 'localhost' </p> <pre class="screen">&lt;!-- Map your instances to hosts here --&gt; &lt;instances&gt; &lt;instance name="default"&gt;localhost&lt;/instance&gt; &lt;/instances&gt;</pre> <p>Zulässige Unterelemente</p> <div class="itemizedlist"><ul class="itemizedlist" type="square"><li class="listitem"> <p>instance: Nur "instance" ist als Unterelement zulässig. Dieser Knoten ordnet einem Host (s.u.) einen Instanznamen zu, der durch den Wert des Attributs "name" festgelegt ist: </p> <pre class="screen"> &lt;instance name="%icinga instance name%"&gt;%host name%&lt;/instance&gt;</pre> </li></ul></div> </li> <li class="listitem"> <p><span class="emphasis"><em>Standardwerte</em></span></p> <p>Der "default"-Abschnitt definiert Standardwerte für Host-Einstellungen, z.B. auf welche Dateien schreibend/lesend zugegriffen werden bzw. welche ausgeführt werden können. Auch der Standard-Host, der von Icinga-Web benutzt werden soll, wird hier definiert.</p> <p>Zulässige Unterelemente</p> <div class="itemizedlist"><ul class="itemizedlist" type="square"> <li class="listitem"> <p>defaultHost: definiert den Host, der für Aktionen benutzt wird, wenn kein Host angegeben ist. Dies nur für einige Module wichtig und es betrifft nicht Icinga-Webs Standardleistungsumfang. </p> <pre class="screen"> &lt;defaultHost&gt;localhost&lt;/defaultHost&gt;</pre> <p>Der Host muss im hosts-Abschnitt definiert werden.</p> </li> <li class="listitem"> <p>access: Icinga-Web (und Module, wenn sie korrekt geschrieben sind) greifen nicht direkt auf System-Ressourcen zu, sondern über ein Console-Interface, das sich um die Sicherheit kümmert. Im Zugriffsabschnitt definieren Sie, welche System-Ressources von dieser Behandlungsroutine aufgerufen werden dürfen und wo sie sich befinden. Außerdem geben Sie System-Ressourcen einen Ressourcen-Namen. Der Console-Handler bspw. greift auf die Icinga-Pipe nur über den Ressource-Namen "icinga_pipe" zu.</p> <p>Der Zugriffsabschnitt hat vier zulässige Unterelemente: 'readwrite', 'read', 'write' und 'execute', die die Zugriffsebene für darunterliegende Ressourcen definieren. Ressourcen selbst werden unter den Tags 'folders' oder 'files' definiert und mit 'resource' eingeschlossen: Das folgende Beispiel erlaubt Schreib-/Lesezugriff auf Icingas <code class="filename">objects</code>-Ordner. Schreiben, Lesen und Ausführen funktionieren analog, das 'readwrite'-Tag wird jeweils durch das entsprechende Tag ausgetauscht.</p> </li> </ul></div> <pre class="screen"> &lt;readwrite&gt; &lt;folders&gt; &lt;resource name="icinga_objects"&gt;/usr/local/icinga/etc/objects&lt;/resource&gt; &lt;/folders&gt; &lt;files&gt; &lt;resource name="icinga_cfg"&gt;/usr/local/icinga/etc/icinga.cfg&lt;/resource&gt; &lt;/files&gt; &lt;/readwrite&gt;</pre> <p>Wie oben erwähnt ordnet jede Ressource ein Ressourcen-Symbol (Name) einem Pfad zu. Dies ist optional, wird aber empfohlen. Wenn ein Symbol mehrfach existiert, dann wird das letzte benutzt.</p> <div class="note" title="Anmerkung" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note"> <tr> <td rowspan="2" align="center" valign="top" width="25"><img alt="[Anmerkung]" src="../images/note.png"></td> <th align="left">Anmerkung</th> </tr> <tr><td align="left" valign="top"> <p><span class="emphasis"><em>Eigene Default-Definitionen in Ihrem Konfigurationsordner</em></span></p> <p>If you override a custom section, like readwrite, all previously set definitions will be ignored and must be redefined if you want to use them. Das betrifft nicht Modul-KonfigurationenThis doesn't affect module configurations.</p> </td></tr> </table></div> </li> <li class="listitem"> <p><span class="emphasis"><em>Hosts</em></span></p> <p>Im host-Abschnitt werden Zugriffsmethoden und Anmeldeinformation, aber auch spezifische Rechte für Hosts definiert.</p> <p>Zulässige Unterelemente:</p> <div class="itemizedlist"><ul class="itemizedlist" type="square"> <li class="listitem"> <p>host: definiert einen einzelnen Host und gibt ihm einen Namen, der benutzt werden kann, um auf diesen Host zu referenzieren (wie z.B. im "instance"-Abschnitt). </p> <pre class="screen"> &lt;!-- Example for ssh connection with user/password auth --&gt; &lt;host name="vm_host1"&gt; &lt;type&gt;ssh&lt;/type&gt; &lt;ssh-config&gt; &lt;host&gt;localhost&lt;/host&gt; &lt;port&gt;22&lt;/port&gt; &lt;auth&gt; &lt;type&gt;password&lt;/type&gt; &lt;user&gt;john_doe&lt;/user&gt; &lt;password&gt;foobar&lt;/password&gt; &lt;/auth&gt; &lt;/ssh-config&gt; &lt;access useDefaults="true" /&gt; &lt;/host&gt;</pre> <p> Das 'host'-Tag hat eine Reihe von Unterelementen:</p> </li> <li class="listitem"> <p>type: Entweder "local" oder "ssh". Definiert, ob Befehl direkt auf der Maschine ausgeführt werden, auf der Icinga-Web läuft, oder via ssh.</p> </li> <li class="listitem"> <p>access: sh. den "access"-Abschnitt weiter oben. Zusätzlich kann 'useDefaults' gesetzt werden, um dem Command-Interface mitzuteilen, dass alle Standardzugriffsdefinitionen benutzt werden sollen (wenn sie nicht in diesem Abschnitt überschrieben werden).</p> </li> <li class="listitem"> <p>ssh-config: (nur falls type:ssh) Dies legt fest, wie auf den Host per ssh zugegriffen werden soll. Es gibt drei Authentifizierungsmethoden für ssh: 'none', 'password' oder 'key', die im folgenden Abschnitt erläutert werden. Unabhängig davon, welche Methode Sie wählen, müssen die 'host'- und 'port'-Einträge für jeden Host gesetzt werden.</p> </li> </ul></div> </li> <li class="listitem"> <p><span class="emphasis"><em>SSH-Config auth</em></span></p> <p>Dieser Abschnitt erklärt den Authentifizierungsblock der ssh-Konfigurationseinstellungen, die wir im vorigen Anschnitt angesprochen haben. Die Elemente unterhalb des 'auth'-Tags sind abhängig vom ausgewählten Authentifizierungstyp.</p> <div class="itemizedlist"><ul class="itemizedlist" type="square"> <li class="listitem"> <p>Auth type: none</p> <p>Dies teilt der Console-Verbindung mit, dass nur ein Benutzername für die Authentifizierung verwendet wird:</p> <pre class="screen"> &lt;ssh-config&gt; &lt;host&gt;localhost&lt;/host&gt; &lt;port&gt;22&lt;/port&gt; &lt;auth&gt; &lt;type&gt;none&lt;/type&gt; &lt;user&gt;john_doe&lt;/user&gt; &lt;/auth&gt; &lt;/ssh-config&gt;</pre> <p>In diesem Beispiel wird nur der Benutzername 'john_doe' für die Authentifizierung geliefert. Dies kann sinnvoll sein, wenn Ihre Maschinen automatische Schlüssel-Authentifizierung benutzen.</p> </li> <li class="listitem"> <p>Auth type: password</p> <p>Dies teilt der Console-Verbindung mit, dass Benutzername und Passwort für die Authentifizierung verwendet werden:</p> <pre class="screen"> &lt;ssh-config&gt; &lt;host&gt;localhost&lt;/host&gt; &lt;port&gt;22&lt;/port&gt; &lt;auth&gt; &lt;type&gt;password&lt;/type&gt; &lt;user&gt;john_doe&lt;/user&gt; &lt;password&gt;foobar&lt;/password&gt; &lt;/auth&gt; &lt;/ssh-config&gt;</pre> <p>In diesem Beispiel werden nur der Benutzername 'john_doe' und das Passwort 'foobar' für die Authentifizierung verwendet.</p> </li> <li class="listitem"> <p>Auth type: key</p> <div class="important" title="Wichtig" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Important"> <tr> <td rowspan="2" align="center" valign="top" width="25"><img alt="[Wichtig]" src="../images/important.png"></td> <th align="left">Wichtig</th> </tr> <tr><td align="left" valign="top"> <p>Experimentell! Probieren Sie es aus und öffnen Sie ein Ticket, wenn Sie Probleme haben!</p> </td></tr> </table></div> <p>Dies teilt der Console-Verbindung mit, eine Schlüsseldatei für die Authentifizierung zu benutzen, die optional mit einem Password geschützt ist</p> <pre class="screen"> &lt;ssh-config&gt; &lt;host&gt;localhost&lt;/host&gt; &lt;port&gt;22&lt;/port&gt; &lt;auth&gt; &lt;type&gt;key&lt;/type&gt; &lt;user&gt;testuser&lt;/user&gt; &lt;private-key&gt;/usr/local/icinga-web/app/modules/Api/lib/.ssh/host1_rsa&lt;/private-key&gt; &lt;password&gt;secret123&lt;/password&gt; &lt;/auth&gt; &lt;/ssh-config&gt;</pre> <p> Hier wird der private Schlüssel benutzt, der im 'private-key'-Tag definiert wird. Sie sollten und müssen diesen Pfad <span class="emphasis"><em>nicht</em></span> im host-Zugriffsabschnitt definieren!</p> </li> </ul></div> </li> </ul></div> </li> <li class="listitem"> <p><a name="configweb-databases"></a><code class="filename">databases.xml</code> - enthält die Verbindungseinstellungen für Ihre Icinga Web-Datenbank</p> <div class="itemizedlist"><ul class="itemizedlist" type="circle"> <li class="listitem"> <p><a name="configweb-general"></a> <span class="emphasis"><em>Allgemeine Einstellungen</em></span></p> <p>Die folgenden Einstellungen gelten für jede in Icinga Web definierte Datenbank.</p> <p>Wenn Sie sich die Standarddefinition der icinga_web-Datenbank ansehen, dann finden Sie dort die meisten Einstellungen einer generischen Datenbankverbindung:</p> <pre class="screen">&lt;db:database name="icinga_web" class="AppKitDoctrineDatabase"&gt; &lt;ae:parameter name="dsn"&gt;mysql://icinga_web:icinga_web@localhost:3306/icinga_web&lt;/ae:parameter&gt; &lt;ae:parameter name="charset"&gt;utf8&lt;/ae:parameter&gt; &lt;ae:parameter name="manager_attributes"&gt; &lt;ae:parameter name="Doctrine_Core::ATTR_MODEL_LOADING"&gt;CONSERVATIVE&lt;/ae:parameter&gt; &lt;/ae:parameter&gt; &lt;ae:parameter name="load_models"&gt;%core.module_dir%/AppKit/lib/database/models/generated&lt;/ae:parameter&gt; &lt;ae:parameter name="models_directory"&gt;%core.module_dir%/AppKit/lib/database/models&lt;/ae:parameter&gt; &lt;ae:parameter name="date_format"&gt;&lt;![CDATA[YYYY-MM-DD HH24:MI:SS]]&gt;&lt;/ae:parameter&gt; &lt;ae:parameter name="caching"&gt; &lt;ae:parameter name="enabled"&gt;false&lt;/ae:parameter&gt; &lt;ae:parameter name="driver"&gt;apc&lt;/ae:parameter&gt; &lt;ae:parameter name="use_query_cache"&gt;true&lt;/ae:parameter&gt; &lt;ae:parameter name="use_result_cache"&gt;true&lt;/ae:parameter&gt; &lt;ae:parameter name="result_cache_lifespan"&gt;60&lt;/ae:parameter&gt; &lt;/ae:parameter&gt; &lt;/db:database&gt;</pre> <div class="itemizedlist"><ul class="itemizedlist" type="square"> <li class="listitem"> <p>Datenbank-Identifier</p> <pre class="screen">&lt;db:database name="%Database name%" class="%Handler%"&gt; ... &lt;/db:database&gt;</pre> <p>Mit dem db:database-Tag informieren Sie Icinga Web, dass es sich um eine Datenbankdefinition handelt. Dieses Tag muss zwei Attribute haben:</p> <div class="itemizedlist"><ul class="itemizedlist" type="disc"> <li class="listitem"> <p>name: Der Name für Ihre Datenbank. Zu dieser Zeit (&gt;= v1.5) ist 'icinga-web' für die interne Icinga-Web-Datenbank reserviert, die Benutzer- und Anmeldeinformationen, Persistenz-Einstellungen usw. enthält, und 'icinga' für die Datenbank, die von ido2db genutzt wird, um die Informationen von Icinga zu speichern.</p> </li> <li class="listitem"> <p>class: Benutzen Sie immer "AppKitDoctrineDatabase", nur die 'icinga'-Datenbank erfordert 'IcingaDoctrineDatabase' (siehe unten)</p> </li> </ul></div> </li> <li class="listitem"> <p>dsn (Data Source Name):</p> <p>Definiert die Anmeldeinformationen, den Typ und Standort der Datenbank:</p> <p>Für MySQL, PostgreSQL und Oracle:</p> <pre class="screen">&lt;db:database ...&gt; ... &lt;ae:parameter name="dsn"&gt;%driver%://%username%:%password%@%host%:%port%/%database name%&lt;/ae:parameter&gt; ... &lt;/db:database&gt;</pre> <p>Für sqlite3:</p> <pre class="screen">&lt;db:database ...&gt; ... &lt;ae:parameter name="dsn"&gt;sqlite:///%path to your db file%&lt;/ae:parameter&gt; ... &lt;/db:database&gt;</pre> <div class="note" title="Anmerkung" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note"> <tr> <td rowspan="2" align="center" valign="top" width="25"><img alt="[Anmerkung]" src="../images/note.png"></td> <th align="left">Anmerkung</th> </tr> <tr><td align="left" valign="top"> <p>SQLite-Datenbanken müssen für den Webserver-Benutzern les- und beschreibbar sein, außerdem das Verzeichnis, in dem sich die Datei befindet.</p> </td></tr> </table></div> <div class="itemizedlist"><ul class="itemizedlist" type="disc"> <li class="listitem"> <p>%driver%: Das zu benutzende Datenbank-Backend</p> <div class="itemizedlist"><ul class="itemizedlist" type="circle"> <li class="listitem"> <p>mysql: Eine MySQL-Datenbank</p> </li> <li class="listitem"> <p>pgsql: Eine PostgreSQL-Datenbank</p> </li> <li class="listitem"> <p>oracle: Eine Oracle-Datenbank, auf die über den <a class="link" href="http://www.php.net/manual/de/book.oci8.php" target="_top">oci8</a>-Treiber zugegriffen wird</p> <p>Benutzen Sie nicht den PDO-Treiber, denn dieser ist weit von produktiver Nutzung entfernt.</p> </li> <li class="listitem"> <p>icingaOracle: Eine spezielle Implementation, die genutzt werden muss, wenn eine Icinga-Datenbank verwendet wird (einige Tabellennamen sind unterschiedlich und die Längen von Bezeichnern muss automatisch berücksichtigt werden, um sicherzustellen, dass sich kein Entwickler während der Entwicklung umbringt).</p> </li> </ul></div> </li> <li class="listitem"> <p>%username%: Der Benutzername zur DB-Authentifizierung</p> </li> <li class="listitem"> <p>%password%: Das Passwort zur DB-Authentifizierung</p> </li> <li class="listitem"> <p>%host%: Der Host Ihres DB-Servers</p> </li> <li class="listitem"> <p>%port%: Der Port Ihres DB-Servers</p> <div class="itemizedlist"><ul class="itemizedlist" type="circle"> <li class="listitem"> <p>mysql-default: 3306</p> </li> <li class="listitem"> <p>postgresql-default: 5432</p> </li> <li class="listitem"> <p>oracle-default: 1521</p> </li> </ul></div> </li> <li class="listitem"> <p>%database name%: Der Name Ihrer Datenbank</p> </li> </ul></div> </li> <li class="listitem"> <p>charset</p> <pre class="screen">&lt;db:database ...&gt; ... &lt;ae:parameter name="charset"&gt;utf8&lt;/ae:parameter&gt; ... &lt;/db:database&gt;</pre> <p>Im Allgemeinen sollte Ihr Datenbank-Zeichensatz utf8 sein.</p> </li> <li class="listitem"> <p>manager_attributes, load_models, models_directory</p> <pre class="screen">&lt;db:database ...&gt; ... &lt;ae:parameter name="manager_attributes"&gt; &lt;ae:parameter name="Doctrine_Core::ATTR_MODEL_LOADING"&gt;CONSERVATIVE&lt;/ae:parameter&gt; &lt;/ae:parameter&gt; ... &lt;/db:database&gt;</pre> <p>Sie können beruhigt diesen Abschnitt ignorieren und ihn einfach kopieren. Er enthält lediglich Doctrine-spezifische Einstellungen (insbesondere wie Datenbankmodelle geladen werden und wo sie zu finden sind. Wenn Sie mehr wissen möchten, dann schauen Sie in die <a class="link" href="http://www.doctrine-project.org/projects/orm/1.2/docs/manual/introduction-to-models/en#autoloading-models" target="_top">doctrine documentation</a>).</p> </li> <li class="listitem"> <p>date_formate</p> <p>Dies ist erforderlich, um sauber auf Oracle-Datenbanken zuzugreifen. Es setzt das für die Datenbank zu benutzende Datumsformat.</p> <pre class="screen">&lt;db:database ...&gt; ... &lt;ae:parameter name="date_format"&gt;&lt;![CDATA[YYYY-MM-DD HH24:MI:SS]]&gt;&lt;/ae:parameter&gt; ... &lt;/db:database&gt;</pre> </li> <li class="listitem"> <p>Caching</p> <pre class="screen">&lt;db:database ...&gt; ... &lt;ae:parameter name="caching"&gt; &lt;ae:parameter name="enabled"&gt;false&lt;/ae:parameter&gt; &lt;ae:parameter name="driver"&gt;apc&lt;/ae:parameter&gt; &lt;ae:parameter name="use_query_cache"&gt;true&lt;/ae:parameter&gt; &lt;ae:parameter name="use_result_cache"&gt;true&lt;/ae:parameter&gt; &lt;ae:parameter name="result_cache_lifespan"&gt;60&lt;/ae:parameter&gt; &lt;/ae:parameter&gt; &lt;db:database&gt;</pre> <p>Wenn Sie apc oder memcache benutzen, dann können Sie entweder Datenbankabfragen oder -ergebnisse zwischenspeichern. Während das Zwischenspeichern von Abfragen eigentlich nie eine schlechte Sache ist (solange Sie nicht entwickeln), ist das Zwischenspeichern von Ergebnissen ein ziemlich spezieller Fall - denn Sie könnten veraltete Daten aus Ihrer Datenbank bekommen. <span class="bold"><strong>Also benutzen Sie es bitte nie für Ihre Icinga-Datenbank!</strong></span> </p> <div class="itemizedlist"><ul class="itemizedlist" type="disc"> <li class="listitem"> <p>enabled: Caching für diese Datenbank ein- oder ausschalten</p> </li> <li class="listitem"> <p>driver: apc oder memcache, wobei memcache experimentell ist (also probieren Sie es aus !)</p> </li> <li class="listitem"> <p>use_query_cache: Abfragen zwischenspeichern (nur die SQL-Abfragen, nicht die Ergebnisse)</p> </li> <li class="listitem"> <p>use_result_cache: Datenbankergebnisse zwischenspeichern (<span class="bold"><strong>Gefahr!</strong></span>)</p> </li> <li class="listitem"> <p>result_cache_lifespan: Wie lange Ergebnisse zwischengespeichert werden sollen (in Sekunden), wenn use_result_cache benutzt wird</p> </li> </ul></div> </li> </ul></div> </li> <li class="listitem"> <p><span class="emphasis"><em>Die "icinga_web"-Datenbank</em></span></p> <p>Sie müssen eine Icinga-Web-Datenbank haben, die Informationen über Benutzer, Anmeldeinformationen, View-Persistenz, etc. enthält. Diese Datenbank muss 'icinga_web' heißen. Alle Einstellungen sind im vorigen Abschnitt beschrieben.</p> </li> <li class="listitem"> <p><span class="emphasis"><em>Die "icinga"-Datenbank</em></span></p> <p>Ab Icinga-Web v1.5 wird die Icinga-API über Doctrine angesprochen (vorher gab es ein eigenes Projekt, die 'icinga-api'). Im Folgenden werden nur spezielle bzw. zusätzliche Einstellungen erklärt. Solange nicht anders erwähnt, gelten alle Regeln aus <a class="link" href="icinga-web-config.html#configweb-general">"Allgemeine Einstellungen"</a>.</p> <div class="itemizedlist"><ul class="itemizedlist" type="square"> <li class="listitem"> <p>Datenbank-Identifier</p> <p>Der Icinga-Datenbank-Identifier muss "IcingaDoctrineDatabase" als 'class'-Attribut und 'icinga' als Datenbankname benutzen, also:</p> <pre class="screen">&lt;db:database name="icinga" class="IcingaDoctrineDatabase"&gt; ... &lt;/db:database&gt;</pre> </li> <li class="listitem"> <p>dsn</p> <p>Sie können die gleichen Anmeldeinformationen wie in der <code class="filename">ido2db.cfg</code> benutzen, aber als Sicherheitsgründen ist es sehr ratsam, einen Benutzer nur mit Leserechten für Icinga-Web anzulegen. Nachfolgend ein Beispiel, welche Werte aus der <code class="filename">ido2db.cfg</code> passen.</p> <pre class="screen"> &lt;ae:parameter name="dsn"&gt;mysql://db_user:db_pass@db_host:db_port/db_name&lt;/ae:parameter&gt;</pre> </li> <li class="listitem"> <p>prefix</p> <p>Definiert den Präfix wie in <code class="filename">ido2db.cfg</code> angegeben</p> <pre class="screen">&lt;db:database name="icinga" class="IcingaDoctrineDatabase"&gt; ... &lt;ae:parameter name="prefix"&gt;icinga_&lt;/ae:parameter&gt; ... &lt;/db:database&gt;</pre> <p>Für Oracle benutzen Sie einen leeren Wert</p> <pre class="screen">&lt;db:database name="icinga" class="IcingaDoctrineDatabase"&gt; ... &lt;ae:parameter name="prefix"&gt;&lt;/ae:parameter&gt; ... &lt;/db:database&gt;</pre> </li> <li class="listitem"> <p>use_retained</p> <p>Whether to use retained or original data dumps (see the value in idomod.cfg)</p> <pre class="screen">&lt;db:database name="icinga" class="IcingaDoctrineDatabase"&gt; ... &lt;ae:parameter name="use_retained"&gt;true&lt;/ae:parameter&gt; &lt;/db:database&gt;</pre> </li> </ul></div> </li> <li class="listitem"> <p><span class="emphasis"><em>Komplettes Listing</em></span></p> <pre class="screen">&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;databases xmlns:db="http://agavi.org/agavi/config/parts/databases/1.0" xmlns:ae="http://agavi.org/agavi/config/global/envelope/1.0"&gt; &lt;db:database name="icinga_web" class="AppKitDoctrineDatabase"&gt; &lt;ae:parameter name="dsn"&gt;mysql://icinga_web:icinga_web@localhost:3306/icinga_web&lt;/ae:parameter&gt; &lt;ae:parameter name="charset"&gt;utf8&lt;/ae:parameter&gt; &lt;ae:parameter name="manager_attributes"&gt; &lt;ae:parameter name="Doctrine_Core::ATTR_MODEL_LOADING"&gt;CONSERVATIVE&lt;/ae:parameter&gt; &lt;/ae:parameter&gt; &lt;ae:parameter name="load_models"&gt;%core.module_dir%/AppKit/lib/database/models/generated&lt;/ae:parameter&gt; &lt;ae:parameter name="models_directory"&gt;%core.module_dir%/AppKit/lib/database/models&lt;/ae:parameter&gt; &lt;ae:parameter name="date_format"&gt;&lt;![CDATA[YYYY-MM-DD HH24:MI:SS]]&gt;&lt;/ae:parameter&gt; &lt;ae:parameter name="caching"&gt; &lt;ae:parameter name="enabled"&gt;false&lt;/ae:parameter&gt; &lt;ae:parameter name="driver"&gt;apc&lt;/ae:parameter&gt; &lt;ae:parameter name="use_query_cache"&gt;true&lt;/ae:parameter&gt; &lt;ae:parameter name="use_result_cache"&gt;true&lt;/ae:parameter&gt; &lt;ae:parameter name="result_cache_lifespan"&gt;60&lt;/ae:parameter&gt; &lt;/ae:parameter&gt; &lt;/db:database&gt; &lt;db:database xmlns="http://agavi.org/agavi/config/parts/databases/1.0" name="icinga" class="IcingaDoctrineDatabase"&gt; &lt;ae:parameter name="dsn"&gt;mysql://icinga:icinga@localhost:3306/icinga&lt;/ae:parameter&gt; &lt;ae:parameter name="prefix"&gt;icinga_&lt;/ae:parameter&gt; &lt;ae:parameter name="charset"&gt;utf8&lt;/ae:parameter&gt; &lt;ae:parameter name="use_retained"&gt;true&lt;/ae:parameter&gt; &lt;ae:parameter name="manager_attributes"&gt; &lt;ae:parameter name="Doctrine_Core::ATTR_MODEL_LOADING"&gt;CONSERVATIVE&lt;/ae:parameter&gt; &lt;/ae:parameter&gt; &lt;ae:parameter name="load_models"&gt;%core.module_dir%/Api/lib/database/models/generated&lt;/ae:parameter&gt; &lt;ae:parameter name="models_directory"&gt;%core.module_dir%/Api/lib/database/models&lt;/ae:parameter&gt; &lt;ae:parameter name="caching"&gt; &lt;ae:parameter name="enabled"&gt;false&lt;/ae:parameter&gt; &lt;ae:parameter name="driver"&gt;apc&lt;/ae:parameter&gt; &lt;ae:parameter name="use_query_cache"&gt;true&lt;/ae:parameter&gt; &lt;/ae:parameter&gt; &lt;/db:database&gt; &lt;/databases&gt;</pre> </li> </ul></div> </li> <li class="listitem"> <p><a name="configweb-factories"></a><code class="filename">factories.xml</code> - Agavi Systemkonfiguration, Storage- und Session-Konfiguration</p> <p>holds the config for your web session, e.g. the session_cookie_lifetime-parameter</p> <p><a name="configweb-session-lifetime"></a> <span class="bold"><strong>Session Cookie Lifetime</strong></span></p> <p>Beispiel: Ändern von session_cookie_lifetime</p> <p>Die Session Lifetime ist die Zeit in Sekunden, bis die Icinga Web-Session abläuft. Sie kann auf globaler Ebene in der Datei <code class="filename">app/config/factories.xml</code> konfiguriert werden.</p> <pre class="programlisting">&lt;ae:parameter name="session_cookie_lifetime"&gt;3600&lt;ae:parameter&gt;</pre> <p>Wenn Sie die session_cookie_lifetime ändern möchten, editieren Sie bitte <code class="filename">app/config/factories.site.xml</code></p> </li> <li class="listitem"> <p><a name="configweb-logging"></a><code class="filename">logging.xml</code> - deaktivieren von Log-Ebenen oder schreiben von neuen Log-Dateien</p> </li> <li class="listitem"> <p><a name="configweb-settings"></a><code class="filename">settings.xml</code> - Icinga-Einstellungen, z.B. Version und Präfixe / Versionsname</p> <p>enthält auch <code class="filename">icinga.xml</code> (enthält die Konfiguration für Ihr Icinga Web ROOT-Verzeichnis und den Icinga-Web Pfad)</p> </li> <li class="listitem"> <p><a name="configweb-translation"></a><code class="filename">translation.xml</code> - Default-Sprache, Datum- und Zeitformate und Einstellungen</p> <p>Falls Ihre Zeitzone von GMT abweicht, dann müssen Sie ggf. die entsprechenden Einstellungen in <code class="filename">php.ini</code> (oder in <code class="filename">translation.xml</code>, falls Sie dort nicht ändern können). Anderenfalls erhalten Sie möglicherweise eine Fehlermeldung ähnlich der folgenden:</p> <div class="figure"> <a name="idm139734667428688"></a><p class="title"><b>Abbildung 6.1. Icinga Web instance down</b></p> <div class="figure-contents"> <div class="mediaobject"><img src="../images/icinga-web-instance-down.png" alt="Icinga Web instance down"></div> </div> </div> <br class="figure-break"> <p>Setzen Sie die Direktive auf einen gültigen Wert (z.B. 'Europe/Berlin').</p> </li> <li class="listitem"> <p><a name="configweb-views"></a><code class="filename">views.xml</code> - erlaubt dem Benutzer das Hinzufügen/Ändern von API-Ansichten.</p> </li> </ul></div> </div> <div class="section" title="6.6.4. Fehlersuche"> <div class="titlepage"><div><div><h3 class="title"> <a name="troubleshooting"></a>6.6.4. Fehlersuche</h3></div></div></div> <div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"> <p>Ich kann keine Befehle senden/ausführen!</p> <p>Stellen Sie sicher, dass der WebServer-Benutzer Schreibberechtigung auf die Icinga-Pipe besitzt und dass das "icinga_pipe"-Symbol im "readwrite"- oder "write"-Abschnitt Ihres Host (oder im default-Abschnitt) vorhanden ist. Stellen Sie sicher, dass der Pfad korrekt ist.</p> </li></ul></div> <p><a name="configweb-timezone"></a> <span class="bold"><strong>Icinga Web-Zeitzone</strong></span></p> <p>Wenn die Zeitzone von Icinga Web von Ihrer lokalen Zeitzone abweicht, überprüfen Sie bitte den Parameter "date.timezone" in Ihrer <code class="filename">php.ini</code>. Alternativ überprüfen Sie den Eintrag in <code class="filename">app/modules/AppKit/config/module.xml</code> (z.B. 'Europe/Berlin')</p> <pre class="programlisting">#&gt; vi app/modules/AppKit/config/module.xml &lt;ae:parameter name="date.timezone"&gt;Europe/Berlin&lt;/ae:parameter&gt;</pre> <p><a name="configweb-userprefs"></a> <span class="bold"><strong>Benutzervorgaben ändern</strong></span></p> <p>Die Datei <code class="filename">module.xml</code> enthält verschiedene Einstellungen, die durch eigene Werte überschrieben werden können, die in der Datei <code class="filename">userpreferences.xml</code> (im Ordner <code class="filename">etc/config</code> einzutragen sind).</p> </div> <div class="section" title="6.6.5. Modul-Konfiguration:"> <div class="titlepage"><div><div><h3 class="title"> <a name="moduleconfig"></a>6.6.5. <a name="configweb-module"></a>Modul-Konfiguration:</h3></div></div></div> <div class="itemizedlist"><ul class="itemizedlist" type="disc"> <li class="listitem"> <p><span class="bold"><strong>app/modules/AppKit</strong></span></p> <p>Hier "lebt" das Framework: Authentifikation, Menüs und weiteres.</p> <p><a name="configweb-auth"></a> <span class="bold"><strong>Authentifizierung</strong></span></p> <p>Beispiel: LDAP-Authentifizierung</p> <p>Öffnen Sie <code class="filename">app/modules/AppKit/config/auth.xml</code>.</p> <p>Ein Anbieter ist wie folgt aufgebaut:</p> <pre class="programlisting"> &lt;ae:parameter name="msad-ldap1"&gt; &lt;ae:parameter name="auth_module"&gt;AppKit&lt;/ae:parameter&gt; &lt;ae:parameter name="auth_provider"&gt;Auth.Provider.LDAP&lt;/ae:parameter&gt; &lt;ae:parameter name="auth_enable"&gt;true&lt;/ae:parameter&gt; &lt;ae:parameter name="auth_authoritative"&gt;true&lt;/ae:parameter&gt; &lt;ae:parameter name="auth_create"&gt;true&lt;/ae:parameter&gt; &lt;ae:parameter name="auth_update"&gt;true&lt;/ae:parameter&gt; &lt;ae:parameter name="auth_map"&gt; &lt;ae:parameter name="user_firstname"&gt;givenName&lt;/ae:parameter&gt; &lt;ae:parameter name="user_lastname"&gt;sn&lt;/ae:parameter&gt; &lt;ae:parameter name="user_email"&gt;mail&lt;/ae:parameter&gt; &lt;/ae:parameter&gt; &lt;ae:parameter name="ldap_dsn"&gt;ldap://ad.icinga.org&lt;/ae:parameter&gt; &lt;ae:parameter name="ldap_basedn"&gt;DC=ad,DC=icinga,DC=org&lt;/ae:parameter&gt; &lt;ae:parameter name="ldap_binddn"&gt;ldap@AD.ICINGA.ORG&lt;/ae:parameter&gt; &lt;ae:parameter name="ldap_bindpw"&gt;&lt;![CDATA[XXXXXXXXX]]&gt;&lt;/ae:parameter&gt; &lt;ae:parameter name="ldap_userattr"&gt;uid&lt;/ae:parameter&gt; &lt;ae:parameter name="ldap_filter_user"&gt;&lt;![CDATA[(&amp;(sAmAccountName=__USERNAME__))]]&gt;&lt;/ae:parameter&gt; &lt;/ae:parameter&gt;</pre> <p>Die <code class="filename">auth.xml</code> hält die Dokumentation für die globale Konfiguration. Die LDAP-Authentifizierung sollte mit einigen grundlegenden LDAP-Kenntnissen möglich sein.</p> <p>Sie können die Anbieter duplizieren und so Ihre Authentifizierungs-Basis vergrößern.</p> <p>Bitte speichern Sie Ihre Konfiguration in <code class="filename">auth.site.xml</code>!</p> </li> <li class="listitem"> <p><span class="bold"><strong>app/modules/Cronks</strong></span></p> <p>Alle Cronks werden hier implementiert: Grids und iframes. Sie sind einfache HTML-Seiten, die ExtJS-Komponenten-Code enthalten. Wenn Sie einen neuen Cronk hinzufügen möchten, wird dieses Modul Ihr Freund sein.</p> <p>Wenn Sie einen neuen Cronk entwickeln möchten, schauen Sie hier: <a class="link" href="https://dev.icinga.org/projects/icinga-development/wiki/HowToDevelopCronks" target="_top">HowToDevelopCronks</a></p> <p>Die Konfiguration können Sie im Cronk-Module ändern:</p> <pre class="programlisting">#&gt; ls app/modules/Cronks/config autoload.xml config_handlers.xml cronks.xml module.xml validators.xml</pre> <div class="itemizedlist"><ul class="itemizedlist" type="circle"> <li class="listitem"> <p><code class="filename">module.xml</code> - definieren von neuen Kategorien in denen die Cronks erscheinen, die Datei <code class="filename">module.xml</code> hält dazu alle Informationen</p> </li> <li class="listitem"> <p><code class="filename">cronks.xml</code> - um auf neue Cronks zu zugreifen, definieren von neuen iframe Cronks</p> </li> </ul></div> </li> <li class="listitem"> <p><span class="bold"><strong>app/modules/Web</strong></span></p> <p>Oder besser:<span class="bold"><strong> Icinga</strong></span>. Dieses Modul enthält alle Icinga relevanten Dinge wie IcingaAPI2Json und die Statusinformationen.</p> </li> </ul></div> </div> <div class="section" title="6.6.6. Benutzerdefinierte Konfiguration"> <div class="titlepage"><div><div><h3 class="title"> <a name="customconfig"></a>6.6.6. Benutzerdefinierte Konfiguration</h3></div></div></div> <p><span class="bold"><strong>Bitte beachten:</strong></span></p> <p>Wenn Sie Konfigurationsdateien ändern oder erstellen, denken Sie bitte an folgendes:</p> <div class="itemizedlist"><ul class="itemizedlist" type="disc"> <li class="listitem"> <p>Zeilen die mit &lt;!-- beginnen und enden mit --&gt; werden als Kommentare interpretiert.</p> </li> <li class="listitem"> <p>Variablennamen sind case-sensitive</p> </li> </ul></div> <div class="note" title="Anmerkung" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note"> <tr> <td rowspan="2" align="center" valign="top" width="25"><img alt="[Anmerkung]" src="../images/note.png"></td> <th align="left">Anmerkung</th> </tr> <tr><td align="left" valign="top"> <p>Nach dem Ändern von Konfigurationsdateien leeren Sie bitte den Cache!</p> </td></tr> </table></div> <pre class="programlisting"> #&gt; rm -rf app/cache/config/*.php</pre> <p>oder</p> <pre class="programlisting"> #&gt; /usr/local/icinga-web/bin/clearcache.sh</pre> <p>Benötigen Sie weitere Informationen? Schauen Sie bitte in unserem<a class="link" href="https://dev.icinga.org/projects/icinga-development/wiki/" target="_top"> Development Wiki.</a></p> <a class="indexterm" name="idm139734667383856"></a> <a class="indexterm" name="idm139734667385168"></a> <a class="indexterm" name="idm139734667381616"></a> <a class="indexterm" name="idm139734667380384"></a> <a class="indexterm" name="idm139734667379136"></a> <a class="indexterm" name="idm139734667377408"></a> </div> </div> <div class="navfooter"> <hr> <table width="100%" summary="Navigation footer"> <tr> <td width="40%" align="left"> <a accesskey="p" href="icinga-web-scratch.html">Zurück</a> </td> <td width="20%" align="center"><a accesskey="u" href="ch06.html">Nach oben</a></td> <td width="40%" align="right"> <a accesskey="n" href="upgrading_icingaweb.html">Weiter</a> </td> </tr> <tr> <td width="40%" align="left" valign="top">6.5. Installation des Icinga Web Frontend </td> <td width="20%" align="center"><a accesskey="h" href="index.html">Zum Anfang</a></td> <td width="40%" align="right" valign="top"> 6.7. Aktualisierung von Icinga Web und Icinga Web Datenbank</td> </tr> </table> </div> <P class="copyright">© 1999-2009 Ethan Galstad, 2009-2017 Icinga Development Team, https://www.icinga.com</P> </body> </html>
Icinga/icinga-core
html/docs/de/icinga-web-config.html
HTML
gpl-2.0
48,995
<?php /******************************************************************************* Copyright 2001, 2004 Wedge Community Co-op This file is part of IT CORE. IT CORE is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. IT CORE is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License in the file license.txt along with IT CORE; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *********************************************************************************/ use COREPOS\pos\lib\gui\NoInputCorePage; use COREPOS\pos\lib\Database; use COREPOS\pos\lib\DisplayLib; use COREPOS\pos\lib\PrintHandlers\PrintHandler; use COREPOS\pos\lib\ReceiptLib; include_once(dirname(__FILE__).'/../lib/AutoLoader.php'); class rplist extends NoInputCorePage { private function printReceipt($trans) { $PRINT = PrintHandler::factory($this->session->get('ReceiptDriver')); $saved = $this->session->get('receiptToggle'); $this->session->set('receiptToggle', 1); $receipt = ReceiptLib::printReceipt('reprint', $trans); $this->session->set('receiptToggle', $saved); if (session_id() != '') { session_write_close(); } if(is_array($receipt)) { if (!empty($receipt['any'])) { $PRINT->writeLine($receipt['any']); } if (!empty($receipt['print'])) { $PRINT->writeLine($receipt['print']); } } elseif(!empty($receipt)) { $PRINT->writeLine($receipt); } } function preprocess() { if ($this->form->tryGet('selectlist', false) !== false) { if (!empty($this->form->selectlist)) { $this->printReceipt($this->form->selectlist); } $this->change_page($this->page_url."gui-modules/pos2.php"); return false; } elseif ($this->form->tryGet('preview') !== '') { echo $this->previewTrans($this->form->preview); return false; } return true; } function head_content() { ?> <script type="text/javascript" src="../js/selectSubmit.js"></script> <script type="text/javascript"> function updatePreview(trans) { $.ajax({ data: 'preview='+trans }).done(function(resp) { $('#receipt-preview').html(resp); }); } </script> <?php $this->addOnloadCommand("selectSubmit('#selectlist', '#selectform')\n"); $this->addOnloadCommand("\$('#selectlist').focus();\n"); } private function getTransactions() { $dbc = Database::tDataConnect(); $query = " SELECT register_no, emp_no, trans_no, SUM(CASE WHEN trans_type='T' AND department=0 THEN -1 * total ELSE 0 END) AS total FROM localtranstoday WHERE register_no = ? AND emp_no = ? AND datetime >= " . $dbc->curdate() . " GROUP BY register_no, emp_no, trans_no ORDER BY trans_no DESC"; $args = array($this->session->get('laneno'), $this->session->get('CashierNo')); $prep = $dbc->prepare($query); $result = $dbc->execute($prep, $args); $ret = array(); while ($row = $dbc->fetchRow($result)) { $ret[] = $row; } return $ret; } private function previewTrans($trans) { list($reg, $emp, $tID) = explode('::', $trans); $dbc = Database::tDataConnect(); $previewP = $dbc->prepare(" SELECT description FROM localtranstoday WHERE emp_no=? AND register_no=? AND trans_no=? AND trans_type <> 'L' ORDER BY trans_id"); $previewR = $dbc->execute($previewP, array($emp, $reg, $tID)); $ret = ''; $count = 0; while ($row = $dbc->fetchRow($previewR)) { $ret .= $row['description'] . '<br />'; $count++; if ($count > 10) { break; } } return $ret; } function body_content() { ?> <div class="baseHeight"> <div class="listbox"> <form name="selectform" method="post" id="selectform" action="<?php echo AutoLoader::ownURL(); ?>" > <select name="selectlist" size="15" id="selectlist" onblur="$('#selectlist').focus()" onchange="updatePreview(this.value);" > <?php $selected = "selected"; $first = false; foreach ($this->getTransactions() as $row) { echo "<option value='".$row["emp_no"]."::".$row["register_no"]."::".$row["trans_no"]."'"; echo $selected; echo ">lane ".substr(100 + $row["register_no"], -2)." Cashier ".substr(100 + $row["emp_no"], -2) ." #".$row["trans_no"]." -- $". sprintf('%.2f',$row["total"]); $selected = ""; if (!$first) { $first = $row['emp_no'] . '::' . $row['register_no'] . '::' . $row['trans_no']; } } ?> </select> </div> <div class="listbox" id="receipt-preview" style="height: 15; font-size: 85%;"> <?php echo ($first) ? $this->previewTrans($first) : ''; ?> </div> <?php if ($this->session->get('touchscreen')) { echo '<div class="listbox listboxText">' . DisplayLib::touchScreenScrollButtons('#selectlist') . '</div>'; } ?> <div class="listboxText coloredText centerOffset"> <?php echo _("use arrow keys to navigate"); ?><br /> <p> <button type="submit" class="pos-button wide-button coloredArea"> <?php echo _('Reprint'); ?> <span class="smaller"><?php echo _('[enter]'); ?></span> </button> </p> <p> <button type="submit" class="pos-button wide-button errorColoredArea" onclick="$('#selectlist').append($('<option>').val(''));$('#selectlist').val('');"> <?php echo _('Cancel'); ?> <span class="smaller"><?php echo _('[clear]'); ?></span> </button></p> </div> </form> <div class="clear"></div> </div> <?php } // END body_content() FUNCTION public function unitTest($phpunit) { $this->printReceipt('1-1-1'); // just coverage $this->form = new COREPOS\common\mvc\ValueContainer(); $phpunit->assertEquals(true, $this->preprocess()); $this->form->selectlist = ''; $phpunit->assertEquals(false, $this->preprocess()); } } AutoLoader::dispatch();
hayes042/IS4C
pos/is4c-nf/gui-modules/rplist.php
PHP
gpl-2.0
7,407
/* * linux/ipc/util.c * Copyright (C) 1992 Krishna Balasubramanian * * Sep 1997 - Call suser() last after "normal" permission checks so we * get BSD style process accounting right. * Occurs in several places in the IPC code. * Chris Evans, <chris@ferret.lmh.ox.ac.uk> * Nov 1999 - ipc helper functions, unified SMP locking * Manfred Spraul <manfred@colorfullife.com> * Oct 2002 - One lock per IPC id. RCU ipc_free for lock-free grow_ary(). * Mingming Cao <cmm@us.ibm.com> * Mar 2006 - support for audit of ipc object properties * Dustin Kirkland <dustin.kirkland@us.ibm.com> * Jun 2006 - namespaces ssupport * OpenVZ, SWsoft Inc. * Pavel Emelianov <xemul@openvz.org> * * General sysv ipc locking scheme: * rcu_read_lock() * obtain the ipc object (kern_ipc_perm) by looking up the id in an idr * tree. * - perform initial checks (capabilities, auditing and permission, * etc). * - perform read-only operations, such as STAT, INFO commands. * acquire the ipc lock (kern_ipc_perm.lock) through * ipc_lock_object() * - perform data updates, such as SET, RMID commands and * mechanism-specific operations (semop/semtimedop, * msgsnd/msgrcv, shmat/shmdt). * drop the ipc lock, through ipc_unlock_object(). * rcu_read_unlock() * * The ids->rwsem must be taken when: * - creating, removing and iterating the existing entries in ipc * identifier sets. * - iterating through files under /proc/sysvipc/ * * Note that sems have a special fast path that avoids kern_ipc_perm.lock - * see sem_lock(). */ #include <linux/mm.h> #include <linux/shm.h> #include <linux/init.h> #include <linux/msg.h> #include <linux/vmalloc.h> #include <linux/slab.h> #include <linux/notifier.h> #include <linux/capability.h> #include <linux/highuid.h> #include <linux/security.h> #include <linux/rcupdate.h> #include <linux/workqueue.h> #include <linux/seq_file.h> #include <linux/proc_fs.h> #include <linux/audit.h> #include <linux/nsproxy.h> #include <linux/rwsem.h> #include <linux/memory.h> #include <linux/ipc_namespace.h> #include <asm/unistd.h> #include "util.h" struct ipc_proc_iface { const char *path; const char *header; int ids; int (*show)(struct seq_file *, void *); }; static void ipc_memory_notifier(struct work_struct *work) { ipcns_notify(IPCNS_MEMCHANGED); } static int ipc_memory_callback(struct notifier_block *self, unsigned long action, void *arg) { static DECLARE_WORK(ipc_memory_wq, ipc_memory_notifier); switch (action) { case MEM_ONLINE: /* memory successfully brought online */ case MEM_OFFLINE: /* or offline: it's time to recompute msgmni */ /* * This is done by invoking the ipcns notifier chain with the * IPC_MEMCHANGED event. * In order not to keep the lock on the hotplug memory chain * for too long, queue a work item that will, when waken up, * activate the ipcns notification chain. * No need to keep several ipc work items on the queue. */ if (!work_pending(&ipc_memory_wq)) schedule_work(&ipc_memory_wq); break; case MEM_GOING_ONLINE: case MEM_GOING_OFFLINE: case MEM_CANCEL_ONLINE: case MEM_CANCEL_OFFLINE: default: break; } return NOTIFY_OK; } static struct notifier_block ipc_memory_nb = { .notifier_call = ipc_memory_callback, .priority = IPC_CALLBACK_PRI, }; /** * ipc_init - initialise IPC subsystem * * The various system5 IPC resources (semaphores, messages and shared * memory) are initialised * A callback routine is registered into the memory hotplug notifier * chain: since msgmni scales to lowmem this callback routine will be * called upon successful memory add / remove to recompute msmgni. */ static int __init ipc_init(void) { sem_init(); msg_init(); shm_init(); register_hotmemory_notifier(&ipc_memory_nb); register_ipcns_notifier(&init_ipc_ns); return 0; } __initcall(ipc_init); /** * ipc_init_ids - initialise IPC identifiers * @ids: Identifier set * * Set up the sequence range to use for the ipc identifier range (limited * below IPCMNI) then initialise the ids idr. */ void ipc_init_ids(struct ipc_ids *ids) { init_rwsem(&ids->rwsem); ids->in_use = 0; ids->seq = 0; ids->next_id = -1; { int seq_limit = INT_MAX/SEQ_MULTIPLIER; if (seq_limit > USHRT_MAX) ids->seq_max = USHRT_MAX; else ids->seq_max = seq_limit; } idr_init(&ids->ipcs_idr); } #ifdef CONFIG_PROC_FS static const struct file_operations sysvipc_proc_fops; /** * ipc_init_proc_interface - Create a proc interface for sysipc types using a seq_file interface. * @path: Path in procfs * @header: Banner to be printed at the beginning of the file. * @ids: ipc id table to iterate. * @show: show routine. */ void __init ipc_init_proc_interface(const char *path, const char *header, int ids, int (*show)(struct seq_file *, void *)) { struct proc_dir_entry *pde; struct ipc_proc_iface *iface; iface = kmalloc(sizeof(*iface), GFP_KERNEL); if (!iface) return; iface->path = path; iface->header = header; iface->ids = ids; iface->show = show; pde = proc_create_data(path, S_IRUGO, /* world readable */ NULL, /* parent dir */ &sysvipc_proc_fops, iface); if (!pde) { kfree(iface); } } #endif /** * ipc_findkey - find a key in an ipc identifier set * @ids: Identifier set * @key: The key to find * * Requires ipc_ids.rwsem locked. * Returns the LOCKED pointer to the ipc structure if found or NULL * if not. * If key is found ipc points to the owning ipc structure */ static struct kern_ipc_perm *ipc_findkey(struct ipc_ids *ids, key_t key) { struct kern_ipc_perm *ipc; int next_id; int total; for (total = 0, next_id = 0; total < ids->in_use; next_id++) { ipc = idr_find(&ids->ipcs_idr, next_id); if (ipc == NULL) continue; if (ipc->key != key) { total++; continue; } rcu_read_lock(); ipc_lock_object(ipc); return ipc; } return NULL; } /** * ipc_get_maxid - get the last assigned id * @ids: IPC identifier set * * Called with ipc_ids.rwsem held. */ int ipc_get_maxid(struct ipc_ids *ids) { struct kern_ipc_perm *ipc; int max_id = -1; int total, id; if (ids->in_use == 0) return -1; if (ids->in_use == IPCMNI) return IPCMNI - 1; /* Look for the last assigned id */ total = 0; for (id = 0; id < IPCMNI && total < ids->in_use; id++) { ipc = idr_find(&ids->ipcs_idr, id); if (ipc != NULL) { max_id = id; total++; } } return max_id; } /** * ipc_addid - add an IPC identifier * @ids: IPC identifier set * @new: new IPC permission set * @size: limit for the number of used ids * * Add an entry 'new' to the IPC ids idr. The permissions object is * initialised and the first free entry is set up and the id assigned * is returned. The 'new' entry is returned in a locked state on success. * On failure the entry is not locked and a negative err-code is returned. * * Called with writer ipc_ids.rwsem held. */ int ipc_addid(struct ipc_ids* ids, struct kern_ipc_perm* new, int size) { kuid_t euid; kgid_t egid; int id; int next_id = ids->next_id; if (size > IPCMNI) size = IPCMNI; if (ids->in_use >= size) return -ENOSPC; idr_preload(GFP_KERNEL); spin_lock_init(&new->lock); new->deleted = false; rcu_read_lock(); spin_lock(&new->lock); current_euid_egid(&euid, &egid); new->cuid = new->uid = euid; new->gid = new->cgid = egid; id = idr_alloc(&ids->ipcs_idr, new, (next_id < 0) ? 0 : ipcid_to_idx(next_id), 0, GFP_NOWAIT); idr_preload_end(); if (id < 0) { spin_unlock(&new->lock); rcu_read_unlock(); return id; } ids->in_use++; if (next_id < 0) { new->seq = ids->seq++; if (ids->seq > ids->seq_max) ids->seq = 0; } else { new->seq = ipcid_to_seqx(next_id); ids->next_id = -1; } new->id = ipc_buildid(id, new->seq); return id; } /** * ipcget_new - create a new ipc object * @ns: namespace * @ids: IPC identifer set * @ops: the actual creation routine to call * @params: its parameters * * This routine is called by sys_msgget, sys_semget() and sys_shmget() * when the key is IPC_PRIVATE. */ static int ipcget_new(struct ipc_namespace *ns, struct ipc_ids *ids, struct ipc_ops *ops, struct ipc_params *params) { int err; down_write(&ids->rwsem); err = ops->getnew(ns, params); up_write(&ids->rwsem); return err; } /** * ipc_check_perms - check security and permissions for an IPC * @ns: IPC namespace * @ipcp: ipc permission set * @ops: the actual security routine to call * @params: its parameters * * This routine is called by sys_msgget(), sys_semget() and sys_shmget() * when the key is not IPC_PRIVATE and that key already exists in the * ids IDR. * * On success, the IPC id is returned. * * It is called with ipc_ids.rwsem and ipcp->lock held. */ static int ipc_check_perms(struct ipc_namespace *ns, struct kern_ipc_perm *ipcp, struct ipc_ops *ops, struct ipc_params *params) { int err; if (ipcperms(ns, ipcp, params->flg)) err = -EACCES; else { err = ops->associate(ipcp, params->flg); if (!err) err = ipcp->id; } return err; } /** * ipcget_public - get an ipc object or create a new one * @ns: namespace * @ids: IPC identifer set * @ops: the actual creation routine to call * @params: its parameters * * This routine is called by sys_msgget, sys_semget() and sys_shmget() * when the key is not IPC_PRIVATE. * It adds a new entry if the key is not found and does some permission * / security checkings if the key is found. * * On success, the ipc id is returned. */ static int ipcget_public(struct ipc_namespace *ns, struct ipc_ids *ids, struct ipc_ops *ops, struct ipc_params *params) { struct kern_ipc_perm *ipcp; int flg = params->flg; int err; /* * Take the lock as a writer since we are potentially going to add * a new entry + read locks are not "upgradable" */ down_write(&ids->rwsem); ipcp = ipc_findkey(ids, params->key); if (ipcp == NULL) { /* key not used */ if (!(flg & IPC_CREAT)) err = -ENOENT; else err = ops->getnew(ns, params); } else { /* ipc object has been locked by ipc_findkey() */ if (flg & IPC_CREAT && flg & IPC_EXCL) err = -EEXIST; else { err = 0; if (ops->more_checks) err = ops->more_checks(ipcp, params); if (!err) /* * ipc_check_perms returns the IPC id on * success */ err = ipc_check_perms(ns, ipcp, ops, params); } ipc_unlock(ipcp); } up_write(&ids->rwsem); return err; } /** * ipc_rmid - remove an IPC identifier * @ids: IPC identifier set * @ipcp: ipc perm structure containing the identifier to remove * * ipc_ids.rwsem (as a writer) and the spinlock for this ID are held * before this function is called, and remain locked on the exit. */ void ipc_rmid(struct ipc_ids *ids, struct kern_ipc_perm *ipcp) { int lid = ipcid_to_idx(ipcp->id); idr_remove(&ids->ipcs_idr, lid); ids->in_use--; ipcp->deleted = true; return; } /** * ipc_alloc - allocate ipc space * @size: size desired * * Allocate memory from the appropriate pools and return a pointer to it. * NULL is returned if the allocation fails */ void *ipc_alloc(int size) { void *out; if(size > PAGE_SIZE) out = vmalloc(size); else out = kmalloc(size, GFP_KERNEL); return out; } /** * ipc_free - free ipc space * @ptr: pointer returned by ipc_alloc * @size: size of block * * Free a block created with ipc_alloc(). The caller must know the size * used in the allocation call. */ void ipc_free(void* ptr, int size) { if(size > PAGE_SIZE) vfree(ptr); else kfree(ptr); } /** * ipc_rcu_alloc - allocate ipc and rcu space * @size: size desired * * Allocate memory for the rcu header structure + the object. * Returns the pointer to the object or NULL upon failure. */ void *ipc_rcu_alloc(int size) { /* * We prepend the allocation with the rcu struct */ struct ipc_rcu *out = ipc_alloc(sizeof(struct ipc_rcu) + size); if (unlikely(!out)) return NULL; atomic_set(&out->refcount, 1); return out + 1; } int ipc_rcu_getref(void *ptr) { struct ipc_rcu *p = ((struct ipc_rcu *)ptr) - 1; return atomic_inc_not_zero(&p->refcount); } void ipc_rcu_putref(void *ptr, void (*func)(struct rcu_head *head)) { struct ipc_rcu *p = ((struct ipc_rcu *)ptr) - 1; if (!atomic_dec_and_test(&p->refcount)) return; call_rcu(&p->rcu, func); } void ipc_rcu_free(struct rcu_head *head) { struct ipc_rcu *p = container_of(head, struct ipc_rcu, rcu); if (is_vmalloc_addr(p)) vfree(p); else kfree(p); } /** * ipcperms - check IPC permissions * @ns: IPC namespace * @ipcp: IPC permission set * @flag: desired permission set. * * Check user, group, other permissions for access * to ipc resources. return 0 if allowed * * @flag will most probably be 0 or S_...UGO from <linux/stat.h> */ int ipcperms(struct ipc_namespace *ns, struct kern_ipc_perm *ipcp, short flag) { kuid_t euid = current_euid(); int requested_mode, granted_mode; audit_ipc_obj(ipcp); requested_mode = (flag >> 6) | (flag >> 3) | flag; granted_mode = ipcp->mode; if (uid_eq(euid, ipcp->cuid) || uid_eq(euid, ipcp->uid)) granted_mode >>= 6; else if (in_group_p(ipcp->cgid) || in_group_p(ipcp->gid)) granted_mode >>= 3; /* is there some bit set in requested_mode but not in granted_mode? */ if ((requested_mode & ~granted_mode & 0007) && !ns_capable(ns->user_ns, CAP_IPC_OWNER)) return -1; return security_ipc_permission(ipcp, flag); } /* * Functions to convert between the kern_ipc_perm structure and the * old/new ipc_perm structures */ /** * kernel_to_ipc64_perm - convert kernel ipc permissions to user * @in: kernel permissions * @out: new style IPC permissions * * Turn the kernel object @in into a set of permissions descriptions * for returning to userspace (@out). */ void kernel_to_ipc64_perm (struct kern_ipc_perm *in, struct ipc64_perm *out) { out->key = in->key; out->uid = from_kuid_munged(current_user_ns(), in->uid); out->gid = from_kgid_munged(current_user_ns(), in->gid); out->cuid = from_kuid_munged(current_user_ns(), in->cuid); out->cgid = from_kgid_munged(current_user_ns(), in->cgid); out->mode = in->mode; out->seq = in->seq; } /** * ipc64_perm_to_ipc_perm - convert new ipc permissions to old * @in: new style IPC permissions * @out: old style IPC permissions * * Turn the new style permissions object @in into a compatibility * object and store it into the @out pointer. */ void ipc64_perm_to_ipc_perm (struct ipc64_perm *in, struct ipc_perm *out) { out->key = in->key; SET_UID(out->uid, in->uid); SET_GID(out->gid, in->gid); SET_UID(out->cuid, in->cuid); SET_GID(out->cgid, in->cgid); out->mode = in->mode; out->seq = in->seq; } /** * ipc_obtain_object * @ids: ipc identifier set * @id: ipc id to look for * * Look for an id in the ipc ids idr and return associated ipc object. * * Call inside the RCU critical section. * The ipc object is *not* locked on exit. */ struct kern_ipc_perm *ipc_obtain_object(struct ipc_ids *ids, int id) { struct kern_ipc_perm *out; int lid = ipcid_to_idx(id); out = idr_find(&ids->ipcs_idr, lid); if (!out) return ERR_PTR(-EINVAL); return out; } /** * ipc_lock - Lock an ipc structure without rwsem held * @ids: IPC identifier set * @id: ipc id to look for * * Look for an id in the ipc ids idr and lock the associated ipc object. * * The ipc object is locked on successful exit. */ struct kern_ipc_perm *ipc_lock(struct ipc_ids *ids, int id) { struct kern_ipc_perm *out; rcu_read_lock(); out = ipc_obtain_object(ids, id); if (IS_ERR(out)) goto err1; spin_lock(&out->lock); /* ipc_rmid() may have already freed the ID while ipc_lock * was spinning: here verify that the structure is still valid */ if (ipc_valid_object(out)) return out; spin_unlock(&out->lock); out = ERR_PTR(-EINVAL); err1: rcu_read_unlock(); return out; } /** * ipc_obtain_object_check * @ids: ipc identifier set * @id: ipc id to look for * * Similar to ipc_obtain_object() but also checks * the ipc object reference counter. * * Call inside the RCU critical section. * The ipc object is *not* locked on exit. */ struct kern_ipc_perm *ipc_obtain_object_check(struct ipc_ids *ids, int id) { struct kern_ipc_perm *out = ipc_obtain_object(ids, id); if (IS_ERR(out)) goto out; if (ipc_checkid(out, id)) return ERR_PTR(-EIDRM); out: return out; } /** * ipcget - Common sys_*get() code * @ns : namsepace * @ids : IPC identifier set * @ops : operations to be called on ipc object creation, permission checks * and further checks * @params : the parameters needed by the previous operations. * * Common routine called by sys_msgget(), sys_semget() and sys_shmget(). */ int ipcget(struct ipc_namespace *ns, struct ipc_ids *ids, struct ipc_ops *ops, struct ipc_params *params) { if (params->key == IPC_PRIVATE) return ipcget_new(ns, ids, ops, params); else return ipcget_public(ns, ids, ops, params); } /** * ipc_update_perm - update the permissions of an IPC. * @in: the permission given as input. * @out: the permission of the ipc to set. */ int ipc_update_perm(struct ipc64_perm *in, struct kern_ipc_perm *out) { kuid_t uid = make_kuid(current_user_ns(), in->uid); kgid_t gid = make_kgid(current_user_ns(), in->gid); if (!uid_valid(uid) || !gid_valid(gid)) return -EINVAL; out->uid = uid; out->gid = gid; out->mode = (out->mode & ~S_IRWXUGO) | (in->mode & S_IRWXUGO); return 0; } /** * ipcctl_pre_down_nolock - retrieve an ipc and check permissions for some IPC_XXX cmd * @ns: the ipc namespace * @ids: the table of ids where to look for the ipc * @id: the id of the ipc to retrieve * @cmd: the cmd to check * @perm: the permission to set * @extra_perm: one extra permission parameter used by msq * * This function does some common audit and permissions check for some IPC_XXX * cmd and is called from semctl_down, shmctl_down and msgctl_down. * It must be called without any lock held and * - retrieves the ipc with the given id in the given table. * - performs some audit and permission check, depending on the given cmd * - returns a pointer to the ipc object or otherwise, the corresponding error. * * Call holding the both the rwsem and the rcu read lock. */ struct kern_ipc_perm *ipcctl_pre_down_nolock(struct ipc_namespace *ns, struct ipc_ids *ids, int id, int cmd, struct ipc64_perm *perm, int extra_perm) { kuid_t euid; int err = -EPERM; struct kern_ipc_perm *ipcp; ipcp = ipc_obtain_object_check(ids, id); if (IS_ERR(ipcp)) { err = PTR_ERR(ipcp); goto err; } audit_ipc_obj(ipcp); if (cmd == IPC_SET) audit_ipc_set_perm(extra_perm, perm->uid, perm->gid, perm->mode); euid = current_euid(); if (uid_eq(euid, ipcp->cuid) || uid_eq(euid, ipcp->uid) || ns_capable(ns->user_ns, CAP_SYS_ADMIN)) return ipcp; /* successful lookup */ err: return ERR_PTR(err); } #ifdef CONFIG_ARCH_WANT_IPC_PARSE_VERSION /** * ipc_parse_version - IPC call version * @cmd: pointer to command * * Return IPC_64 for new style IPC and IPC_OLD for old style IPC. * The @cmd value is turned from an encoding command and version into * just the command code. */ int ipc_parse_version (int *cmd) { if (*cmd & IPC_64) { *cmd ^= IPC_64; return IPC_64; } else { return IPC_OLD; } } #endif /* CONFIG_ARCH_WANT_IPC_PARSE_VERSION */ #ifdef CONFIG_PROC_FS struct ipc_proc_iter { struct ipc_namespace *ns; struct ipc_proc_iface *iface; }; /* * This routine locks the ipc structure found at least at position pos. */ static struct kern_ipc_perm *sysvipc_find_ipc(struct ipc_ids *ids, loff_t pos, loff_t *new_pos) { struct kern_ipc_perm *ipc; int total, id; total = 0; for (id = 0; id < pos && total < ids->in_use; id++) { ipc = idr_find(&ids->ipcs_idr, id); if (ipc != NULL) total++; } if (total >= ids->in_use) return NULL; for ( ; pos < IPCMNI; pos++) { ipc = idr_find(&ids->ipcs_idr, pos); if (ipc != NULL) { *new_pos = pos + 1; rcu_read_lock(); ipc_lock_object(ipc); return ipc; } } /* Out of range - return NULL to terminate iteration */ return NULL; } static void *sysvipc_proc_next(struct seq_file *s, void *it, loff_t *pos) { struct ipc_proc_iter *iter = s->private; struct ipc_proc_iface *iface = iter->iface; struct kern_ipc_perm *ipc = it; /* If we had an ipc id locked before, unlock it */ if (ipc && ipc != SEQ_START_TOKEN) ipc_unlock(ipc); return sysvipc_find_ipc(&iter->ns->ids[iface->ids], *pos, pos); } /* * File positions: pos 0 -> header, pos n -> ipc id = n - 1. * SeqFile iterator: iterator value locked ipc pointer or SEQ_TOKEN_START. */ static void *sysvipc_proc_start(struct seq_file *s, loff_t *pos) { struct ipc_proc_iter *iter = s->private; struct ipc_proc_iface *iface = iter->iface; struct ipc_ids *ids; ids = &iter->ns->ids[iface->ids]; /* * Take the lock - this will be released by the corresponding * call to stop(). */ down_read(&ids->rwsem); /* pos < 0 is invalid */ if (*pos < 0) return NULL; /* pos == 0 means header */ if (*pos == 0) return SEQ_START_TOKEN; /* Find the (pos-1)th ipc */ return sysvipc_find_ipc(ids, *pos - 1, pos); } static void sysvipc_proc_stop(struct seq_file *s, void *it) { struct kern_ipc_perm *ipc = it; struct ipc_proc_iter *iter = s->private; struct ipc_proc_iface *iface = iter->iface; struct ipc_ids *ids; /* If we had a locked structure, release it */ if (ipc && ipc != SEQ_START_TOKEN) ipc_unlock(ipc); ids = &iter->ns->ids[iface->ids]; /* Release the lock we took in start() */ up_read(&ids->rwsem); } static int sysvipc_proc_show(struct seq_file *s, void *it) { struct ipc_proc_iter *iter = s->private; struct ipc_proc_iface *iface = iter->iface; if (it == SEQ_START_TOKEN) return seq_puts(s, iface->header); return iface->show(s, it); } static const struct seq_operations sysvipc_proc_seqops = { .start = sysvipc_proc_start, .stop = sysvipc_proc_stop, .next = sysvipc_proc_next, .show = sysvipc_proc_show, }; static int sysvipc_proc_open(struct inode *inode, struct file *file) { int ret; struct seq_file *seq; struct ipc_proc_iter *iter; ret = -ENOMEM; iter = kmalloc(sizeof(*iter), GFP_KERNEL); if (!iter) goto out; ret = seq_open(file, &sysvipc_proc_seqops); if (ret) goto out_kfree; seq = file->private_data; seq->private = iter; iter->iface = PDE_DATA(inode); iter->ns = get_ipc_ns(current->nsproxy->ipc_ns); out: return ret; out_kfree: kfree(iter); goto out; } static int sysvipc_proc_release(struct inode *inode, struct file *file) { struct seq_file *seq = file->private_data; struct ipc_proc_iter *iter = seq->private; put_ipc_ns(iter->ns); return seq_release_private(inode, file); } static const struct file_operations sysvipc_proc_fops = { .open = sysvipc_proc_open, .read = seq_read, .llseek = seq_lseek, .release = sysvipc_proc_release, }; #endif /* CONFIG_PROC_FS */
cneira/ebpf-backports
linux-3.10.0-514.21.1.el7.x86_64/ipc/util.c
C
gpl-2.0
23,132
package gceschat; import java.io.IOException; import java.net.Socket; public class GreetingClient { private String serverName; private int port; private Socket client; private DataOutputStream Dout; private DataInputStream Din; public GreetingClient(String serverName, int port) throws IOException{ this.serverName = serverName ; this.port = port; client = new Socket(serverName,port); System.out.println("Connected to" + Client); din= new DataInputStream(client.getInputStream()); dout= new DataOutputStream(client.getOutputStream()); new Thread(this).start(); } private void processMessage(String message) throws IOException{ dout.writeUTF(message); } public void run() throws IOException{ while(true){ String message=din.readUTF(); ta.append(message + "\n"); } } public static void main(String[] args){ GreetingClient greetingClient = new GreetingClient("localhost", 8888); } }
DBBA/gceschat
src/gceschat/GreetingClient.java
Java
gpl-2.0
1,130
<?php $captcha_word = 'S3DY'; ?>
CoordCulturaDigital-Minc/culturadigital.br
wp-content/plugins/si-captcha-for-wordpress/captcha-secureimage/captcha-temp/PR67TIE3lMaEl9Tv.php
PHP
gpl-2.0
32
#ifndef BUILD_LK #include <linux/string.h> #include <mach/upmu_common_sw.h> #endif #include "lcm_drv.h" #ifdef BUILD_LK #include <platform/mt_gpio.h> #include <platform/mt_i2c.h> #include <platform/mt_pmic.h> #elif defined(BUILD_UBOOT) #include <asm/arch/mt_gpio.h> #else #include <mach/mt_gpio.h> #endif #include <cust_gpio_usage.h> #include <cust_i2c.h> #define LCM_DSI_CMD_MODE 1 #define FRAME_WIDTH (1440) #define FRAME_HEIGHT (2560) #define GPIO_65132_EN GPIO_LCD_BIAS_ENP_PIN #define REGFLAG_PORT_SWAP 0xFFFA #define REGFLAG_DELAY 0xFFFC #define REGFLAG_END_OF_TABLE 0xFFFD #ifndef TRUE #define TRUE (1) #endif #ifndef FALSE #define FALSE (0) #endif #define PWM_MIN 0x5 #define PWM_DEFAULT 0x46 #define PWM_MAX 0xD4 static const unsigned int BL_MIN_LEVEL = 20; static LCM_UTIL_FUNCS lcm_util; #define SET_RESET_PIN(v) (lcm_util.set_reset_pin((v))) #define MDELAY(n) (lcm_util.mdelay(n)) #define dsi_set_cmd_by_cmdq_dual(handle,cmd,count,ppara,force_update) lcm_util.dsi_set_cmdq_V23(handle,cmd,count,ppara,force_update) #define dsi_set_cmdq_V2(cmd, count, ppara, force_update) lcm_util.dsi_set_cmdq_V2(cmd, count, ppara, force_update) #define dsi_set_cmdq(pdata, queue_size, force_update) lcm_util.dsi_set_cmdq(pdata, queue_size, force_update) #define wrtie_cmd(cmd) lcm_util.dsi_write_cmd(cmd) #define write_regs(addr, pdata, byte_nums) lcm_util.dsi_write_regs(addr, pdata, byte_nums) #define read_reg(cmd) lcm_util.dsi_dcs_read_lcm_reg(cmd) #define read_reg_v2(cmd, buffer, buffer_size) lcm_util.dsi_dcs_read_lcm_reg_v2(cmd, buffer, buffer_size) #define dsi_swap_port(swap) lcm_util.dsi_swap_port(swap) #ifdef BUILD_LK #define TPS65132_SLAVE_ADDR_WRITE 0x7C static struct mt_i2c_t TPS65132_i2c; static int TPS65132_write_byte(kal_uint8 addr, kal_uint8 value) { kal_uint32 ret_code = I2C_OK; kal_uint8 write_data[2]; kal_uint16 len; write_data[0]= addr; write_data[1] = value; TPS65132_i2c.id = I2C_I2C_LCD_BIAS_CHANNEL; TPS65132_i2c.addr = (TPS65132_SLAVE_ADDR_WRITE >> 1); TPS65132_i2c.mode = ST_MODE; TPS65132_i2c.speed = 100; len = 2; ret_code = i2c_write(&TPS65132_i2c, write_data, len); if(ret_code) LCD_LOG("[LK]r63423----tps6132----addr=%0x--i2c write error----\n",addr); else LCD_LOG("[LK]r63423----tps6132----addr=%0x--i2c write success----\n",addr); return ret_code; } #define TPS65132_WRITE_BYTE TPS65132_write_byte #else #include <linux/kernel.h> #include <linux/module.h> #include <linux/fs.h> #include <linux/slab.h> #include <linux/init.h> #include <linux/list.h> #include <linux/i2c.h> #include <linux/irq.h> #include <linux/uaccess.h> #include <linux/interrupt.h> #include <linux/io.h> #include <linux/platform_device.h> #define TPS_I2C_BUSNUM I2C_I2C_LCD_BIAS_CHANNEL #define I2C_ID_NAME "tps65132" #define TPS_ADDR 0x3E static struct i2c_board_info __initdata tps65132_board_info = {I2C_BOARD_INFO(I2C_ID_NAME, TPS_ADDR)}; static struct i2c_client *tps65132_i2c_client = NULL; static int tps65132_probe(struct i2c_client *client, const struct i2c_device_id *id); static int tps65132_remove(struct i2c_client *client); struct tps65132_dev { struct i2c_client *client; }; static const struct i2c_device_id tps65132_id[] = { { I2C_ID_NAME, 0 }, { } }; static struct i2c_driver tps65132_iic_driver = { .id_table = tps65132_id, .probe = tps65132_probe, .remove = tps65132_remove, .driver = { .owner = THIS_MODULE, .name = "tps65132", }, }; static int tps65132_probe(struct i2c_client *client, const struct i2c_device_id *id) { tps65132_i2c_client = client; return 0; } static int tps65132_remove(struct i2c_client *client) { tps65132_i2c_client = NULL; i2c_unregister_device(client); return 0; } static int tps65132_write_bytes(unsigned char addr, unsigned char value) { int ret = 0; struct i2c_client *client = tps65132_i2c_client; if(client == NULL) { return 0; } char write_data[2]={0}; write_data[0]= addr; write_data[1] = value; ret=i2c_master_send(client, write_data, 2); if(ret < 0) LCD_LOG("[KERNEL]r63423----tps6132---addr=%0x-- i2c write error-----\n",addr); else LCD_LOG("[KERNEL]r63423----tps6132---addr=%0x-- i2c write success-----\n",addr); if(ret<0) return ret ; } static int __init tps65132_iic_init(void) { i2c_register_board_info(TPS_I2C_BUSNUM, &tps65132_board_info, 1); i2c_add_driver(&tps65132_iic_driver); return 0; } static void __exit tps65132_iic_exit(void) { i2c_del_driver(&tps65132_iic_driver); } module_init(tps65132_iic_init); module_exit(tps65132_iic_exit); MODULE_AUTHOR("Xiaokuan Shi"); MODULE_DESCRIPTION("MTK TPS65132 I2C Driver"); MODULE_LICENSE("GPL"); #define TPS65132_WRITE_BYTE tps65132_write_bytes #endif struct LCM_setting_table { unsigned int cmd; unsigned char count; unsigned char para_list[64]; }; static struct LCM_setting_table lcm_initialization_setting[] = { {0x2A, 4, {0x00, 0x00, 0x05, 0x9F}}, {0x2B, 4, {0x00, 0x00, 0x09, 0xFF}}, {0x11, 0, {}}, {REGFLAG_DELAY, 80, {}}, {0xB0, 1, {0x04}}, {0xD6, 1, {0x01}}, {0xC6,21, {0x5B, 0x5B, 0x5B, 0x04, 0x4D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4A, 0x0B, 0x00, 0x00, 0x00, 0x00, 0x03, 0x15, 0x04, 0x5B}}, {0xCA,36, {0x81, 0xC0, 0xC0, 0xBC, 0xB0, 0xA0, 0xA0, 0x0A, 0x20, 0x80, 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x4A, 0x37, 0x80, 0x55, 0xC8, 0x0C, 0x0C, 0x0C, 0x08, 0x0C, 0x08, 0x10, 0x10, 0x3F, 0x3F, 0x3F, 0x3F}}, {0xC7,30, {0x00, 0x13, 0x1D, 0x2A, 0x3B, 0x4A, 0x55, 0x65, 0x4B, 0x53, 0x5E, 0x69, 0x70, 0x76, 0x7F, 0x00, 0x13, 0x1D, 0x2A, 0x3B, 0x4A, 0x55, 0x65, 0x4B, 0x53, 0x5E, 0x69, 0x70, 0x76, 0x7F}}, {0xCE,25, {0x55, 0x40, 0x49, 0x53, 0x59, 0x5E, 0x63, 0x68, 0x6E, 0x74, 0x7E, 0x8A, 0x98, 0xA8, 0xBB, 0xD0, 0xFF, 0x04, 0x00, 0x04, 0x04, 0x00, 0x00, 0x69, 0x5A}}, {0x44, 2, {0x00, 0x00}}, {0x35, 1, {0x00}}, {0x36, 1, {0x00}}, {0x3A, 1, {0x77}}, {0x29, 0, {}}, {REGFLAG_DELAY, 50, {}}, {0x53, 1, {0x24}}, {0x5E, 1, {0x22}}, {0x55, 1, {0x02}}, {0xB9, 7, {0x6F, 0x3D, 0x28, 0x3C, 0x14, 0xC8, 0xC8}}, {REGFLAG_END_OF_TABLE, 0x00, {}} }; static struct LCM_setting_table lcm_suspend_setting[] = { {0x28,0,{}}, {REGFLAG_DELAY, 24, {}}, {0x34, 1, {0x00}}, {0x10,0,{}}, {REGFLAG_DELAY, 80, {}}, {0x53, 1, {0x00}}, {0x55, 1, {0x00}}, {REGFLAG_END_OF_TABLE, 0x00, {}} }; static void push_table(struct LCM_setting_table *table, unsigned int count, unsigned char force_update) { unsigned int i; for(i = 0; i < count; i++) { unsigned cmd; cmd = table[i].cmd; switch (cmd) { case REGFLAG_DELAY : if(table[i].count <= 10) MDELAY(table[i].count); else MDELAY(table[i].count); break; case REGFLAG_END_OF_TABLE : break; case REGFLAG_PORT_SWAP: dsi_swap_port(1); break; default: dsi_set_cmdq_V2(cmd, table[i].count, table[i].para_list, force_update); } } } static void lcm_set_util_funcs(const LCM_UTIL_FUNCS *util) { memcpy(&lcm_util, util, sizeof(LCM_UTIL_FUNCS)); } static const LCM_UTIL_FUNCS* lcm_get_util_funcs(void) { return &lcm_util; } static void lcm_get_params(LCM_PARAMS *params) { memset(params, 0, sizeof(LCM_PARAMS)); params->type = LCM_TYPE_DSI; params->width = FRAME_WIDTH; params->height = FRAME_HEIGHT; #if defined(CONFIG_CUSTOM_KERNEL_LCM_PHY_WIDTH) && defined(CONFIG_CUSTOM_KERNEL_LCM_PHY_HEIGHT) params->physical_width = CONFIG_CUSTOM_KERNEL_LCM_PHY_WIDTH; params->physical_height = CONFIG_CUSTOM_KERNEL_LCM_PHY_HEIGHT; #endif params->lcm_if = LCM_INTERFACE_DSI_DUAL; params->lcm_cmd_if = LCM_INTERFACE_DSI0; #if (LCM_DSI_CMD_MODE) params->dsi.mode = CMD_MODE; #else params->dsi.mode = SYNC_PULSE_VDO_MODE; #endif params->dsi.dual_dsi_type = DUAL_DSI_CMD; params->dsi.LANE_NUM = LCM_FOUR_LANE; params->dsi.data_format.color_order = LCM_COLOR_ORDER_RGB; params->dsi.data_format.trans_seq = LCM_DSI_TRANS_SEQ_MSB_FIRST; params->dsi.data_format.padding = LCM_DSI_PADDING_ON_LSB; params->dsi.data_format.format = LCM_DSI_FORMAT_RGB888; params->dsi.packet_size = 256; params->dsi.ssc_disable = 0; params->dsi.ssc_range = 5; params->dsi.PS = LCM_PACKED_PS_24BIT_RGB888; params->dsi.vertical_sync_active = 1; params->dsi.vertical_backporch = 7; params->dsi.vertical_frontporch = 7; params->dsi.vertical_active_line = FRAME_HEIGHT; params->dsi.horizontal_sync_active = 40; params->dsi.horizontal_backporch = 80; params->dsi.horizontal_frontporch = 100; params->dsi.horizontal_active_pixel = FRAME_WIDTH; params->dsi.PLL_CLOCK = 416; params->dsi.ufoe_enable = 1; params->dsi.ufoe_params.lr_mode_en = 1; params->dsi.esd_check_enable = 0; params->dsi.customization_esd_check_enable = 0; params->dsi.lcm_esd_check_table[2].cmd = 0xb0; params->dsi.lcm_esd_check_table[2].count = 1; params->dsi.lcm_esd_check_table[2].para_list[0] = 0x04; params->dsi.lcm_esd_check_table[1].cmd = 0x36; params->dsi.lcm_esd_check_table[1].count = 1; params->dsi.lcm_esd_check_table[1].para_list[0] = 0x40; params->dsi.lcm_esd_check_table[0].cmd = 0xd6; params->dsi.lcm_esd_check_table[0].count = 1; params->dsi.lcm_esd_check_table[0].para_list[0] = 0x01; params->dsi.clk_lp_per_line_enable = 0; params->dsi.lane_swap_en = 0; params->dsi.lane_swap[MIPITX_PHY_PORT_1][MIPITX_PHY_LANE_0] = MIPITX_PHY_LANE_2; params->dsi.lane_swap[MIPITX_PHY_PORT_1][MIPITX_PHY_LANE_1] = MIPITX_PHY_LANE_CK; params->dsi.lane_swap[MIPITX_PHY_PORT_1][MIPITX_PHY_LANE_2] = MIPITX_PHY_LANE_0; params->dsi.lane_swap[MIPITX_PHY_PORT_1][MIPITX_PHY_LANE_3] = MIPITX_PHY_LANE_1; params->dsi.lane_swap[MIPITX_PHY_PORT_1][MIPITX_PHY_LANE_CK] = MIPITX_PHY_LANE_3; params->dsi.lane_swap[MIPITX_PHY_PORT_1][MIPITX_PHY_LANE_RX] = MIPITX_PHY_LANE_2; params->dsi.lane_swap[MIPITX_PHY_PORT_0][MIPITX_PHY_LANE_0] = MIPITX_PHY_LANE_0; params->dsi.lane_swap[MIPITX_PHY_PORT_0][MIPITX_PHY_LANE_1] = MIPITX_PHY_LANE_3; params->dsi.lane_swap[MIPITX_PHY_PORT_0][MIPITX_PHY_LANE_2] = MIPITX_PHY_LANE_2; params->dsi.lane_swap[MIPITX_PHY_PORT_0][MIPITX_PHY_LANE_3] = MIPITX_PHY_LANE_1; params->dsi.lane_swap[MIPITX_PHY_PORT_0][MIPITX_PHY_LANE_CK] = MIPITX_PHY_LANE_CK; params->dsi.lane_swap[MIPITX_PHY_PORT_0][MIPITX_PHY_LANE_RX] = MIPITX_PHY_LANE_0; #if defined(CONFIG_CUSTOM_KERNEL_PWM_MIN) && defined(CONFIG_CUSTOM_KERNEL_PWM_DEF) && defined(CONFIG_CUSTOM_KERNEL_PWM_MAX) && defined(CONFIG_CUSTOM_KERNEL_CAM_AP_LEVEL) params->pwm_min = CONFIG_CUSTOM_KERNEL_PWM_MIN; params->pwm_default = CONFIG_CUSTOM_KERNEL_PWM_DEF; params->pwm_max = CONFIG_CUSTOM_KERNEL_PWM_MAX; params->camera_blk = CONFIG_CUSTOM_KERNEL_CAM_AP_LEVEL; params->camera_dua_blk = CONFIG_CUSTOM_KERNEL_CAM_AP_LEVEL; #endif } static void lcm_power_on(void) { unsigned char cmd = 0x0; unsigned char data = 0xFF; mt_set_gpio_mode((GPIO62 | 0x80000000), GPIO_MODE_00); mt_set_gpio_dir((GPIO62 | 0x80000000), GPIO_DIR_OUT); mt_set_gpio_out((GPIO62 | 0x80000000), GPIO_OUT_ONE); MDELAY(10); #ifdef BUILD_LK mt6331_upmu_set_rg_vgp1_en(1); mt6331_upmu_set_rg_vcam_io_en(1); #endif mt_set_gpio_mode(GPIO_LCD_BIAS_ENP_PIN, GPIO_MODE_00); mt_set_gpio_dir(GPIO_LCD_BIAS_ENP_PIN, GPIO_DIR_OUT); mt_set_gpio_out(GPIO_LCD_BIAS_ENP_PIN, GPIO_OUT_ONE); MDELAY(1); cmd = 0x00; data = 0x12; TPS65132_WRITE_BYTE(cmd, data); MDELAY(10); mt_set_gpio_mode(GPIO_LCD_BIAS_ENN_PIN, GPIO_MODE_00); mt_set_gpio_dir(GPIO_LCD_BIAS_ENN_PIN, GPIO_DIR_OUT); mt_set_gpio_out(GPIO_LCD_BIAS_ENN_PIN, GPIO_OUT_ONE); MDELAY(1); cmd = 0x01; data = 0x12; TPS65132_WRITE_BYTE(cmd, data); MDELAY(10); mt_set_gpio_mode(GPIO_LCM_RST, GPIO_MODE_01); SET_RESET_PIN(1); MDELAY(10); SET_RESET_PIN(0); MDELAY(10); SET_RESET_PIN(1); MDELAY(10); } static void lcm_power_off(void) { mt_set_gpio_mode(GPIO_LCD_BIAS_ENN_PIN, GPIO_MODE_00); mt_set_gpio_dir(GPIO_LCD_BIAS_ENN_PIN, GPIO_DIR_OUT); mt_set_gpio_out(GPIO_LCD_BIAS_ENN_PIN, GPIO_OUT_ZERO); MDELAY(10); mt_set_gpio_mode(GPIO_LCD_BIAS_ENP_PIN, GPIO_MODE_00); mt_set_gpio_dir(GPIO_LCD_BIAS_ENP_PIN, GPIO_DIR_OUT); mt_set_gpio_out(GPIO_LCD_BIAS_ENP_PIN, GPIO_OUT_ZERO); MDELAY(10); SET_RESET_PIN(1); MDELAY(10); SET_RESET_PIN(0); MDELAY(10); mt_set_gpio_mode((GPIO62 | 0x80000000), GPIO_MODE_00); mt_set_gpio_dir((GPIO62 | 0x80000000), GPIO_DIR_OUT); mt_set_gpio_out((GPIO62 | 0x80000000), GPIO_OUT_ZERO); } static void lcm_init_power(void) { lcm_power_on(); } static void lcm_resume_power(void) { lcm_power_on(); } static void lcm_suspend_power(void) { lcm_power_off(); } static void lcm_init(void) { push_table(lcm_initialization_setting, sizeof(lcm_initialization_setting) / sizeof(struct LCM_setting_table), 1); } static void lcm_suspend(void) { push_table(lcm_suspend_setting, sizeof(lcm_suspend_setting) / sizeof(struct LCM_setting_table), 1); } static void lcm_resume(void) { lcm_init(); } static void lcm_update(unsigned int x, unsigned int y, unsigned int width, unsigned int height) { unsigned int x0 = x; unsigned int y0 = y; unsigned int x1 = x0 + width - 1; unsigned int y1 = y0 + height - 1; unsigned char x0_MSB = ((x0>>8)&0xFF); unsigned char x0_LSB = (x0&0xFF); unsigned char x1_MSB = ((x1>>8)&0xFF); unsigned char x1_LSB = (x1&0xFF); unsigned char y0_MSB = ((y0>>8)&0xFF); unsigned char y0_LSB = (y0&0xFF); unsigned char y1_MSB = ((y1>>8)&0xFF); unsigned char y1_LSB = (y1&0xFF); unsigned int data_array[16]; data_array[0]= 0x00053902; data_array[1]= (x1_MSB<<24)|(x0_LSB<<16)|(x0_MSB<<8)|0x2a; data_array[2]= (x1_LSB); dsi_set_cmdq(data_array, 3, 1); data_array[0]= 0x00053902; data_array[1]= (y1_MSB<<24)|(y0_LSB<<16)|(y0_MSB<<8)|0x2b; data_array[2]= (y1_LSB); dsi_set_cmdq(data_array, 3, 1); data_array[0]= 0x002c3909; dsi_set_cmdq(data_array, 1, 0); } static unsigned int lcm_compare_id(void) { return 1; } static unsigned int lcm_check_id(void) { unsigned int retval = (which_lcd_module_triple() == 0) ? 1 : 0; return retval; } static void lcm_setbacklight_cmdq(void* handle,unsigned int level) { LCD_LOG("%s, backlight: level = %d\n", __func__, level); unsigned int cmd = 0x51; unsigned int count =1; unsigned int value = level; dsi_set_cmd_by_cmdq_dual(handle, cmd, count, &value, 1); } static void lcm_pmic_setting() { mt6332_upmu_set_rg_iwled_ovp(1); } LCM_DRIVER r63423_wqhd_jdi_lcm_55_drv = { .name = "r63423_wqhd_jdi_55", .set_util_funcs = lcm_set_util_funcs, .get_util_funcs = lcm_get_util_funcs, .get_params = lcm_get_params, .init = lcm_init, .suspend = lcm_suspend, .resume = lcm_resume, .compare_id = lcm_compare_id, .check_id = lcm_check_id, .init_power = lcm_init_power, .resume_power = lcm_resume_power, .suspend_power = lcm_suspend_power, .set_backlight_cmdq = lcm_setbacklight_cmdq, #if (LCM_DSI_CMD_MODE) .update = lcm_update, #endif .pmic_setting = lcm_pmic_setting, };
lbule/kernel_htc_mtk
drivers/misc/mediatek/lcm/r63423_wqhd_jdi_2k_cmd_55/r63423_wqhd_jdi_2k_cmd_55.c
C
gpl-2.0
14,766
/* * File : devfs.c * This file is part of Device File System in RT-Thread RTOS * COPYRIGHT (C) 2004-2011, RT-Thread Development Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * Change Logs: * Date Author Notes */ #include <rtthread.h> #include <rtdevice.h> #include <dfs.h> #include <dfs_fs.h> #include <dfs_file.h> #include "devfs.h" struct device_dirent { rt_device_t *devices; rt_uint16_t read_index; rt_uint16_t device_count; }; int dfs_device_fs_mount(struct dfs_filesystem *fs, unsigned long rwflag, const void *data) { return RT_EOK; } int dfs_device_fs_ioctl(struct dfs_fd *file, int cmd, void *args) { rt_err_t result; rt_device_t dev_id; RT_ASSERT(file != RT_NULL); /* get device handler */ dev_id = (rt_device_t)file->data; RT_ASSERT(dev_id != RT_NULL); /* close device handler */ result = rt_device_control(dev_id, cmd, args); if (result == RT_EOK) return RT_EOK; return result; } int dfs_device_fs_read(struct dfs_fd *file, void *buf, size_t count) { int result; rt_device_t dev_id; RT_ASSERT(file != RT_NULL); /* get device handler */ dev_id = (rt_device_t)file->data; RT_ASSERT(dev_id != RT_NULL); /* read device data */ result = rt_device_read(dev_id, file->pos, buf, count); file->pos += result; return result; } int dfs_device_fs_write(struct dfs_fd *file, const void *buf, size_t count) { int result; rt_device_t dev_id; RT_ASSERT(file != RT_NULL); /* get device handler */ dev_id = (rt_device_t)file->data; RT_ASSERT(dev_id != RT_NULL); /* read device data */ result = rt_device_write(dev_id, file->pos, buf, count); file->pos += result; return result; } int dfs_device_fs_close(struct dfs_fd *file) { rt_err_t result; rt_device_t dev_id; RT_ASSERT(file != RT_NULL); if (file->type == FT_DIRECTORY) { struct device_dirent *root_dirent; root_dirent = (struct device_dirent *)file->data; RT_ASSERT(root_dirent != RT_NULL); /* release dirent */ rt_free(root_dirent); return RT_EOK; } /* get device handler */ dev_id = (rt_device_t)file->data; RT_ASSERT(dev_id != RT_NULL); /* close device handler */ result = rt_device_close(dev_id); if (result == RT_EOK) { file->data = RT_NULL; return RT_EOK; } return -EIO; } int dfs_device_fs_open(struct dfs_fd *file) { rt_err_t result; rt_device_t device; if (file->flags & O_CREAT) return -EINVAL; /* open root directory */ if ((file->path[0] == '/') && (file->path[1] == '\0') && (file->flags & O_DIRECTORY)) { struct rt_object *object; struct rt_list_node *node; struct rt_object_information *information; struct device_dirent *root_dirent; rt_uint32_t count = 0; extern struct rt_object_information rt_object_container[]; /* lock scheduler */ rt_enter_critical(); /* traverse device object */ information = &rt_object_container[RT_Object_Class_Device]; for (node = information->object_list.next; node != &(information->object_list); node = node->next) { count ++; } root_dirent = (struct device_dirent *)rt_malloc(sizeof(struct device_dirent) + count * sizeof(rt_device_t)); if (root_dirent != RT_NULL) { root_dirent->devices = (rt_device_t *)(root_dirent + 1); root_dirent->read_index = 0; root_dirent->device_count = count; count = 0; /* get all device node */ for (node = information->object_list.next; node != &(information->object_list); node = node->next) { object = rt_list_entry(node, struct rt_object, list); root_dirent->devices[count] = (rt_device_t)object; count ++; } } rt_exit_critical(); /* set data */ file->data = root_dirent; return RT_EOK; } device = rt_device_find(&file->path[1]); if (device == RT_NULL) return -ENODEV; #ifdef RT_USING_POSIX if (device->fops) { /* use device fops */ file->fops = device->fops; file->data = (void*)device; /* use fops */ if (file->fops->open) { result = file->fops->open(file); if (result == RT_EOK || result == -RT_ENOSYS) { return 0; } } } else #endif { result = rt_device_open(device, RT_DEVICE_OFLAG_RDWR); if (result == RT_EOK || result == -RT_ENOSYS) { file->data = device; return RT_EOK; } } file->data = RT_NULL; /* open device failed. */ return -EIO; } int dfs_device_fs_stat(struct dfs_filesystem *fs, const char *path, struct stat *st) { /* stat root directory */ if ((path[0] == '/') && (path[1] == '\0')) { st->st_dev = 0; st->st_mode = S_IFREG | S_IRUSR | S_IRGRP | S_IROTH | S_IWUSR | S_IWGRP | S_IWOTH; st->st_mode &= ~S_IFREG; st->st_mode |= S_IFDIR | S_IXUSR | S_IXGRP | S_IXOTH; st->st_size = 0; st->st_mtime = 0; return RT_EOK; } else { rt_device_t dev_id; dev_id = rt_device_find(&path[1]); if (dev_id != RT_NULL) { st->st_dev = 0; st->st_mode = S_IRUSR | S_IRGRP | S_IROTH | S_IWUSR | S_IWGRP | S_IWOTH; if (dev_id->type == RT_Device_Class_Char) st->st_mode |= S_IFCHR; else if (dev_id->type == RT_Device_Class_Block) st->st_mode |= S_IFBLK; else if (dev_id->type == RT_Device_Class_Pipe) st->st_mode |= S_IFIFO; else st->st_mode |= S_IFREG; st->st_size = 0; st->st_mtime = 0; return RT_EOK; } } return -ENOENT; } int dfs_device_fs_getdents(struct dfs_fd *file, struct dirent *dirp, uint32_t count) { rt_uint32_t index; rt_object_t object; struct dirent *d; struct device_dirent *root_dirent; root_dirent = (struct device_dirent *)file->data; RT_ASSERT(root_dirent != RT_NULL); /* make integer count */ count = (count / sizeof(struct dirent)); if (count == 0) return -EINVAL; for (index = 0; index < count && index + root_dirent->read_index < root_dirent->device_count; index ++) { object = (rt_object_t)root_dirent->devices[root_dirent->read_index + index]; d = dirp + index; d->d_type = DT_REG; d->d_namlen = RT_NAME_MAX; d->d_reclen = (rt_uint16_t)sizeof(struct dirent); rt_strncpy(d->d_name, object->name, RT_NAME_MAX); } root_dirent->read_index += index; return index * sizeof(struct dirent); } static int dfs_device_fs_poll(struct dfs_fd *fd, struct rt_pollreq *req) { int mask = 0; return mask; } static const struct dfs_file_ops _device_fops = { dfs_device_fs_open, dfs_device_fs_close, dfs_device_fs_ioctl, dfs_device_fs_read, dfs_device_fs_write, RT_NULL, /* flush */ RT_NULL, /* lseek */ dfs_device_fs_getdents, dfs_device_fs_poll, }; static const struct dfs_filesystem_ops _device_fs = { "devfs", DFS_FS_FLAG_DEFAULT, &_device_fops, dfs_device_fs_mount, RT_NULL, RT_NULL, RT_NULL, RT_NULL, dfs_device_fs_stat, RT_NULL, }; int devfs_init(void) { /* register rom file system */ dfs_register(&_device_fs); return 0; }
blueskycoco/rtt
components/dfs/filesystems/devfs/devfs.c
C
gpl-2.0
8,538
<?php /** * Linkback helper plugin * * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * @author Gina Haeussge <osd@foosel.net> */ // must be run within Dokuwiki if (!defined('DOKU_INC')) die(); if (!defined('DOKU_LF')) define('DOKU_LF', "\n"); if (!defined('DOKU_TAB')) define('DOKU_TAB', "\t"); class helper_plugin_linkback extends DokuWiki_Plugin { function getMethods() { $result = array (); $result[] = array ( 'name' => 'th', 'desc' => 'returns the header of the linkback column for pagelist', 'return' => array ( 'header' => 'string' ), ); $result[] = array ( 'name' => 'td', 'desc' => 'returns the link to the linkback section with number of comments', 'params' => array ( 'id' => 'string', 'number of linkbacks (optional)' => 'integer' ), 'return' => array ( 'link' => 'string' ), ); $result[] = array ( 'name' => 'getLinkbacks', 'desc' => 'returns recently added linkbacks individually', 'params' => array ( 'namespace' => 'string', 'number (optional)' => 'integer' ), 'return' => array ( 'pages' => 'array' ), ); return $result; } /** * Returns the header of the linkback column for the pagelist */ function th() { return $this->getLang('linkbacks'); } /** * Returns the link to the linkback section with number of comments */ function td($ID, $number = NULL) { $section = '#linkback__section'; if (!isset ($number)) { $lfile = metaFN($ID, '.linkbacks'); $linkbacks = unserialize(io_readFile($lfile, false)); $number = $linkbacks['number']; if (!$linkbacks['display']) return ''; } if ($number == 0) $linkback = '0&nbsp;' . $this->getLang('linkback_plural'); elseif ($number == 1) $linkback = '1&nbsp;' . $this->getLang('linkback_singular'); else $linkback = $number . '&nbsp;' . $this->getLang('linkback_plural'); return '<a href="' . wl($ID) . $section . '" class="wikilink1" title="' . $ID . $section . '">' . $linkback . '</a>'; } /** * Returns recently added linkbacks individually */ function getLinkbacks($ns, $num = NULL) { global $conf; $first = $_REQUEST['first']; if (!is_numeric($first)) $first = 0; if ((!$num) || (!is_numeric($num))) $num = $conf['recent']; $result = array (); $count = 0; if (!@ file_exists($conf['metadir'] . '/_linkbacks.changes')) return $result; // read all recent changes. (kept short) $lines = file($conf['metadir'] . '/_linkbacks.changes'); // handle lines for ($i = count($lines) - 1; $i >= 0; $i--) { $rec = $this->_handleRecentLinkback($lines[$i], $ns); if ($rec !== false) { if (-- $first >= 0) continue; // skip first entries $result[$rec['date']] = $rec; $count++; // break when we have enough entries if ($count >= $num) break; } } // finally sort by time of last comment krsort($result); return $result; } /** * Internal function used by $this->getLinkbacks() * * don't call directly * * @see getRecentComments() * @author Andreas Gohr <andi@splitbrain.org> * @author Ben Coburn <btcoburn@silicodon.net> * @author Esther Brunner <wikidesign@gmail.com> * @author Gina Haeussge <osd@foosel.net> */ function _handleRecentLinkback($line, $ns) { static $seen = array (); //caches seen pages and skip them if (empty ($line)) return false; //skip empty lines // split the line into parts $recent = parseChangelogLine($line); if ($recent === false) return false; $lid = $recent['extra']; $fulllid = $recent['id'] . '#' . $recent['extra']; // skip seen ones if (isset ($seen[$fulllid])) return false; // skip 'show comment' log entries if ($recent['type'] === 'sc') return false; // remember in seen to skip additional sights $seen[$fulllid] = 1; // check if it's a hidden page or comment if (isHiddenPage($recent['id'])) return false; if ($recent['type'] === 'hl') return false; // filter namespace or id if (($ns) && (strpos($recent['id'] . ':', $ns . ':') !== 0)) return false; // check ACL $recent['perm'] = auth_quickaclcheck($recent['id']); if ($recent['perm'] < AUTH_READ) return false; // check existance $recent['file'] = wikiFN($recent['id']); $recent['exists'] = @ file_exists($recent['file']); if (!$recent['exists']) return false; if ($recent['type'] === 'dc') return false; // get linkback meta file name $data = unserialize(io_readFile(metaFN($recent['id'], '.linkbacks'), false)); // check if discussion is turned off if (!$data['display']) return false; // okay, then add some additional info $recent['name'] = $data['receivedpings'][$lid]['url']; $recent['desc'] = $data['receivedpings'][$lid]['excerpt']; return $recent; } }
dokufreaks/plugin-linkback
helper.php
PHP
gpl-2.0
5,841
/* * Theme Name: LAVA * * Layout: Content-Sidebar * * Learn more: https://developer.wordpress.org/themes/basics/template-files/ */ .content-area { float: left; margin: 0 -25% 0 0; width: 100%; } .site-main { margin: 0 25% 0 0; } .site-content .widget-area { float: right; overflow: hidden; width: 25%; } .site-footer { clear: both; width: 100%; }
ExplorerT/LAVA
layouts/content-sidebar.css
CSS
gpl-2.0
361
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!--NewPage--> <HTML> <HEAD> <!-- Generated by javadoc (build 1.6.0_10) on Fri Feb 20 23:13:27 ARST 2009 --> <META http-equiv="Content-Type" content="text/html; charset=UTF-8"> <TITLE> IDeviceController </TITLE> <META NAME="date" CONTENT="2009-02-20"> <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"> <SCRIPT type="text/javascript"> function windowTitle() { if (location.href.indexOf('is-external=true') == -1) { parent.document.title="IDeviceController"; } } </SCRIPT> <NOSCRIPT> </NOSCRIPT> </HEAD> <BODY BGCOLOR="white" onload="windowTitle();"> <HR> <!-- ========= START OF TOP NAVBAR ======= --> <A NAME="navbar_top"><!-- --></A> <A HREF="#skip-navbar_top" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_top_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/IDeviceController.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> &nbsp;<A HREF="../../../com/mxme/common/EventQueue.html" title="class in com.mxme.common"><B>PREV CLASS</B></A>&nbsp; &nbsp;<A HREF="../../../com/mxme/common/IPainter.html" title="interface in com.mxme.common"><B>NEXT CLASS</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../index.html?com/mxme/common/IDeviceController.html" target="_top"><B>FRAMES</B></A> &nbsp; &nbsp;<A HREF="IDeviceController.html" target="_top"><B>NO FRAMES</B></A> &nbsp; &nbsp;<SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--> </SCRIPT> <NOSCRIPT> <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> <TR> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_top"></A> <!-- ========= END OF TOP NAVBAR ========= --> <HR> <!-- ======== START OF CLASS DATA ======== --> <H2> <FONT SIZE="-1"> com.mxme.common</FONT> <BR> Interface IDeviceController</H2> <DL> <DT><B>All Known Implementing Classes:</B> <DD><A HREF="../../../com/mxme/common/midp20/DeviceController.html" title="class in com.mxme.common.midp20">DeviceController</A></DD> </DL> <HR> <DL> <DT><PRE>public interface <B>IDeviceController</B></DL> </PRE> <P> <HR> <P> <!-- ========== METHOD SUMMARY =========== --> <A NAME="method_summary"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> <B>Method Summary</B></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>&nbsp;boolean</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/mxme/common/IDeviceController.html#isVibrationSupported()">isVibrationSupported</A></B>()</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Checks whether vibration is supported or not</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>&nbsp;void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/mxme/common/IDeviceController.html#setGame(javax.microedition.midlet.MIDlet)">setGame</A></B>(javax.microedition.midlet.MIDlet&nbsp;game)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets a game to control</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>&nbsp;void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/mxme/common/IDeviceController.html#vibrate(int)">vibrate</A></B>(int&nbsp;duration)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Makes the phone vibrate for the specified time</TD> </TR> </TABLE> &nbsp; <P> <!-- ============ METHOD DETAIL ========== --> <A NAME="method_detail"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> <B>Method Detail</B></FONT></TH> </TR> </TABLE> <A NAME="isVibrationSupported()"><!-- --></A><H3> isVibrationSupported</H3> <PRE> boolean <B>isVibrationSupported</B>()</PRE> <DL> <DD>Checks whether vibration is supported or not <P> <DD><DL> <DT><B>Returns:</B><DD></DL> </DD> </DL> <HR> <A NAME="vibrate(int)"><!-- --></A><H3> vibrate</H3> <PRE> void <B>vibrate</B>(int&nbsp;duration)</PRE> <DL> <DD>Makes the phone vibrate for the specified time <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>duration</CODE> - Time</DL> </DD> </DL> <HR> <A NAME="setGame(javax.microedition.midlet.MIDlet)"><!-- --></A><H3> setGame</H3> <PRE> void <B>setGame</B>(javax.microedition.midlet.MIDlet&nbsp;game)</PRE> <DL> <DD>Sets a game to control <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>game</CODE> - Game to control</DL> </DD> </DL> <!-- ========= END OF CLASS DATA ========= --> <HR> <!-- ======= START OF BOTTOM NAVBAR ====== --> <A NAME="navbar_bottom"><!-- --></A> <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_bottom_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/IDeviceController.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> &nbsp;<A HREF="../../../com/mxme/common/EventQueue.html" title="class in com.mxme.common"><B>PREV CLASS</B></A>&nbsp; &nbsp;<A HREF="../../../com/mxme/common/IPainter.html" title="interface in com.mxme.common"><B>NEXT CLASS</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../index.html?com/mxme/common/IDeviceController.html" target="_top"><B>FRAMES</B></A> &nbsp; &nbsp;<A HREF="IDeviceController.html" target="_top"><B>NO FRAMES</B></A> &nbsp; &nbsp;<SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--> </SCRIPT> <NOSCRIPT> <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> <TR> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_bottom"></A> <!-- ======== END OF BOTTOM NAVBAR ======= --> <HR> </BODY> </HTML>
matias-pequeno/ikea-calc-j2me-java
lib/doc/com/mxme/common/IDeviceController.html
HTML
gpl-2.0
9,905
/* Template: Header Optin Variant 2 - City Skyline ( Bundled Template #4 ) Description : This is the .css file associated with the above template. This file gets loaded when using the above template to display a custom opt-in form for YIKES Inc. Easy MailChimp Extender. Author : YIKES Inc. Author Contact : http://www.yikesinc.com */ /* Container **/ .large-optin-template { background: url("./images/city_skyline.jpg"); background-size: cover; } .large-optin-template { display: inline-block; width: 100%; } /** Font Declerations **/ .large-optin-template h4 { font-size: 20px; margin: 0; color: rgba(248, 248, 248, 0.90); text-align: center; } .large-optin-template h3 { text-align:center; margin: 0; font-size: 30px; color: #FECB00; } .large-optin-template p { font-size: 17px; margin: auto; color: #8DB8C0; } .large-optin-template p.disclaimer { font-size: 14px; } /** Submit Button **/ .ykfmc-submit { border:none !important; display:block; margin:0 auto; } /** Error + Confirmation Messages **/ #yks_form_error_message { color: #fefefe; margin-bottom: 0; } .large-optin-template #wrapper { display: table; max-width: 30%; min-width: 225px; margin-left: 15%; background: rgba(60, 58, 58, 0.66); border-radius: 5px; margin-top: 5.5em; margin-bottom: 5.5em; padding: 1em; } /* Right Container */ .large-optin-template #box { float: center; max-width: 100%; } /** When the wrapper is within the content, let's center #wrapper element **/ .entry-content .large-optin-template #wrapper { max-width: 75%; display:block; margin: 0 auto; margin-top: 2em; margin-bottom: 2.5em; } /** Break Point **/ /* When the screen is 800px or smaller, we'll center the #wrapper element **/ @media only screen and (max-width: 800px) { .large-optin-template #wrapper { max-width: 75%; display:block; margin: 0 auto; margin-top: 2em; margin-bottom: 2.5em; } }
Scalechange/scalesite
wp-content/plugins/yikes-inc-easy-mailchimp-extender/templates/yikes-mailchimp-bundled-templates/Header_Optin_-_City_Skyline/header_optin_template_city_skyline.css
CSS
gpl-2.0
2,041
/** * Created by Lucian Tuca on 11/05/15. */ var DeleteSelectedCommand = function(commandString) { this.commandString = commandString; }; DeleteSelectedCommand.prototype.execute = function(context) { // Map with the action from the context - basically what the command does. context.deleteShape(); }; // Command's name DeleteSelectedCommand.prototype.NAME = "Delete selected"; // Command's regexp DeleteSelectedCommand.prototype.REGEXP = new RegExp('delete\\sselected', 'i'); // Command's help DeleteSelectedCommand.prototype.HELP = "delete selected";
EDU-Soft/hci-project
vgp-web/js/commands/DeleteSelected.js
JavaScript
gpl-2.0
570
using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("UnderstandingInheritance")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("UnderstandingInheritance")] [assembly: AssemblyCopyright("Copyright © 2013")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("7ab4efaa-de22-4f2d-9db6-c23f2e084f2f")] // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")]
EricNachtigal/Test-Code-Please-Ignore
C#/Learning Materials/C# For Absolute Beginners/0 Course Code Collection/Lesson17/UnderstandingInheritance/UnderstandingInheritance/Properties/AssemblyInfo.cs
C#
gpl-2.0
1,424
<?php session_start(); /** * Main Template File * * If WordPress is set to load blog posts on the homepage, it loads the blog posts. * Otherwise, it loads the launch.php include for the Launch page * * @package WordPress * @subpackage Launch_Effect * */ // STORE REFERRED BY CODE $_SESSION['referredBy'] = $referralindex; include('header.php'); // using this instead of get_header so we can pass $referralindex variable // LOG VISITS AND CONVERSIONS logVisits($referralindex, $stats_table); // IF REFERRAL LINK, GET LAUNCH PAGE if (isset($_GET['ref'])): include(TEMPLATEPATH . '/inc/launch.php'); elseif(is_home()): ?> <?php if(lefx_version() == 'premium'): include(TEMPLATEPATH . '/premium/theme-header.php'); ?> <div id="main"> <?php get_template_part( 'loop', 'index' );?> </div> <?php include(TEMPLATEPATH . '/inc/launch-footer.php'); ?> </div> <!-- end #wrapper --> <?php else: ?> <div id="wrapper"> <header> <h1><a href="#">LAUNCH EFFECT</a></h1> </header> <div id="main"> <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <div class="lepost"> <h2 class="posttitle"><a href="#"><?php the_title(); ?></a></h2> <?php the_content(); ?> </div> <?php endwhile; else: endif; ?> </div> </div> <!-- end #wrapper --> <?php endif; // since we transitioned referral codes to be query strings we should remove the below after people have had time to transition. else: include(TEMPLATEPATH . '/inc/launch.php'); endif; get_footer(); ?>
robbfitzsimmons/px-launch-WP
wp-content/themes/launcheffect/index.php
PHP
gpl-2.0
1,559
// // gmrf.h // physher // // Created by Mathieu Fourment on 18/03/2019. // Copyright © 2019 Mathieu Fourment. All rights reserved. // #ifndef gmrf_h #define gmrf_h #include <stdio.h> #include "hashtable.h" #include "mjson.h" #include "parameters.h" Model* new_GMRFModel_from_json(json_node* node, Hashtable* hash); #endif /* gmrf_h */
4ment/physher
src/phyc/gmrf.h
C
gpl-2.0
346
# CMAKE generated file: DO NOT EDIT! # Generated by "Unix Makefiles" Generator, CMake Version 2.4 # Force unix paths in dependencies. SET(CMAKE_FORCE_UNIX_PATHS 1) # The C and CXX include file search paths: SET(CMAKE_C_INCLUDE_PATH "taglib/ogg/vorbis" "taglib/toolkit" "taglib/mpeg" "taglib/ogg" "taglib/flac" "taglib/mpc" "taglib/mpeg/id3v2" "taglib/mpeg/id3v1" "taglib/ape" "taglib/taglib" "taglib/.." "/usr/include" ) SET(CMAKE_CXX_INCLUDE_PATH ${CMAKE_C_INCLUDE_PATH}) # The C and CXX include file regular expressions for this directory. SET(CMAKE_C_INCLUDE_REGEX_SCAN "^.*$") SET(CMAKE_C_INCLUDE_REGEX_COMPLAIN "^$") SET(CMAKE_CXX_INCLUDE_REGEX_SCAN ${CMAKE_C_INCLUDE_REGEX_SCAN}) SET(CMAKE_CXX_INCLUDE_REGEX_COMPLAIN ${CMAKE_C_INCLUDE_REGEX_COMPLAIN})
paulcbetts/Estelle
ext/taglib/taglib/ogg/vorbis/CMakeFiles/CMakeDirectoryInformation.cmake
CMake
gpl-2.0
787
; ; ADTPro - Apple Disk Transfer ProDOS ; Copyright (C) 2013 - 2020 by David Schmidt ; 1110325+david-schmidt@users.noreply.github.com ; ; This program is free software; you can redistribute it and/or modify it ; under the terms of the GNU General Public License as published by the ; Free Software Foundation; either version 2 of the License, or (at your ; option) any later version. ; ; This program is distributed in the hope that it will be useful, but ; WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ; for more details. ; ; You should have received a copy of the GNU General Public License along ; with this program; if not, write to the Free Software Foundation, Inc., ; 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ; ; Zero page variables (all unused by DOS, BASIC and Monitor) UTILPTR = $6 b_p = $8 ; Apple constants CHR_ESC = $9b ; ESCAPE KEY home = $fc58 ; CLEAR WHOLE SCREEN cout = $fded ; Output character delay = $fca8 ; Monitor delay: # cycles = (5*A*A + 27*A + 26)/2 rdkey = $fd0c ; CHARACTER INPUT ; Local constants slotnumloc = $058b ; Location on screen of slot number .org $7000 ; Make the listing more legible init: jmp main fail: INITPAS: jsr msg .byte " NO SERIAL SLOT.",$00 rts main: jsr home jsr msg .byte $8d,"VSDRIVE SERIAL BOOTSTRAPPER",$8d,$8d,"FOUND",$00 jsr FindSlot ; Sniff out a likely comm slot lda COMMSLOT bmi fail clc adc #$b1 ; Make number printable; also increment (zero-indexed slot) sta slotnumloc ; Show the discovered slot number jsr msg .byte " SLOT",$8d,$00 jsr PARMINT jsr RESETIO jsr msg .byte "LOADING ",$00 lda NextTask beq GoMLI ; Zero? GoMLI cmp #$01 bne :+ jmp GoDriver ; One? GoDriver : cmp #$02 bne :+ jmp GoBASIC ; Two? GoBASIC : jsr home jsr RESETIO ; Else? All done! jmp $E000 ; BASIC GoMLI: jsr msg .byte "MLI:",$00 lda #$0d ; Update location for MLI sta UpdateLoc+1 lda #$B2 ; Ask for MLI ("2") sta Payload lda #$50 ; First character will be "P" sta FirstChar+1 jmp PullFile GoDriver: jsr msg .byte "VSDRIVE:",$00 lda #$11 ; Update location for driver sta UpdateLoc+1 lda #$B7 ; Ask for Driver ("7") sta Payload lda #$56 ; First character will be "V" for VSDRIVE sta FirstChar+1 jmp PullFile GoBASIC: jsr msg .byte "BASIC:",$00 lda #$0f ; Update location for BASIC sta UpdateLoc+1 lda #$B8 ; Ask for BASIC ("8") sta Payload lda #$42 ; First character will be "B" for BASIC sta FirstChar+1 jmp PullFile PullFile: bit $c010 ; Clear the keyboard strobe ldx #$00 : lda Envelope,x jsr PUTC inx cpx #$06 bne :- jsr PUTC ; The final byte of payload is repeated ; Poll the port until we get a magic incantation ldy #$20 ; Prepare to store file at $2000 sty b_p+1 ldy #$00 ; Prep y reg with zero for pointer ops later sty b_p Poll: jsr GETC bcs PullFile FirstChar: cmp #$00 ; Compare to the desired first character beq PullGo jmp Poll PullGo: jsr GETC ; LSB of length bcs PullFile sta size jsr GETC ; MSB of length bcs PullFile beq Poll ; Better not be zero sta size+1 ; We're ready to read everything else now ReadFile: ; We got the magic signature; start reading data jsr GETC ; Pull a byte bcs PullFile sta (b_p),y ; Save it UpdateLoc: ; Print it in the status area sta $0600 ; (self-modifying) iny cpy #$00 ; Check for page increment bne :+ inc b_p+1 ; Increment another page dec size+1 : cpy size ; Is y equal to the LSB of our target? bne ReadFile ; No, loop around for more lda size+1 ; LSB is equal; is MSB? bne ReadFile ; No; go back for more ReadDone: inc NextTask ; Get ready for the next task when we swing back around jmp $2000 ; Fire up the file ;*********************************************** ; ; msg -- print an in-line message ; msg: pla sta UTILPTR pla sta UTILPTR+1 ldy #0 msg1: inc UTILPTR bne :+ inc UTILPTR+1 : lda (UTILPTR),y beq msgx ora #%10000000 jsr cout jmp msg1 msgx: lda UTILPTR+1 pha lda UTILPTR pha rts ;--------------------------------------------------------- ; PUTC - SEND ACC OVER THE SERIAL LINE (AXY UNCHANGED) ;--------------------------------------------------------- PUTC: jmp $0000 ; Pseudo-indirect JSR - self-modified ;--------------------------------------------------------- ; GETC - GET A CHARACTER FROM SERIAL LINE (XY UNCHANGED) ;--------------------------------------------------------- GETC: jmp $0000 ; Pseudo-indirect JSR - self-modified ;--------------------------------------------------------- ; RESETIO - clean up the I/O device ;--------------------------------------------------------- RESETIO: jsr $0000 ; Pseudo-indirect JSR to reset the I/O device rts ;--------------------------------------------------------- ; abort - stop everything ;--------------------------------------------------------- PABORT: ldx #$ff ; POP GOES THE STACKPTR txs jmp main ; Let NextTask sort 'em out ;--------------------------------------------------------- ; Variables ;--------------------------------------------------------- size: .res 2 ; Size of file to transfer (in bytes) PSPEED: .byte BPS1152K; 0 = 19200, 1 = 115200 COMMSLOT: DEFAULT: .byte $ff ; Start with -1 for a slot number so we can tell when we find no slot NextTask: .byte $00 ; Tasks: ; 00 = Initial startup, need to seek the serial hardware and wait for ProDOS ; 01 = Load VSDrive client ; 02 = Load BASIC interpreter Envelope: .byte $c1, $01, $00, $c6, $06 Payload: .byte $00
ADTPro/ADTPro
src/client/prodos/serial/grub2/grub_vsdrive_main.asm
Assembly
gpl-2.0
5,559
.wrap { font-family: dotum, '돋움';} .wrap h3 {font-family: gulim, '굴림체'; font-size: 16px; font-weight:800} .postbox .inside {padding-bottom:0; margin-bottom:0 !important} .form-table th span {font-weight: 700; padding-left: 10px} .form-table .even { background-color : #f6f6f6;} .form-table td p, .form-table label {font-size: 13px;line-height: 1.5; margin: 0.5em 0;} .inside .message {background-color:#f6f6f6; padding:3px; font-weight: 800} .inside p.message {padding:10px 15px;} .inside p.syndication_ajax { padding: 0 5px 10px 0 } #configCheckResult {border-color:#CEE1EF; border-style:solid; border-width:2px; height:10em; margin:5px 0px 5px 0px; overflow:auto; padding:0.5em 0.5em; background-color:#fff; display:none;} #configCheckResult br{ line-height: 1.2; margin:0;} /* wp-list-table */ .column-date { width: 150px} /* post box */ .postbox { margin:0 10px 10px 0;} .postbox#usefullink {border: 2px;}
sleeping-lion/dojisa
wp-content/plugins/badr-naver-syndication/css/style.css
CSS
gpl-2.0
920
############################################################################ # This file is part of "Velox Linux Build Environment" # # Copyright (C) 2012-2017 Stewart Maguire <stewart.maguire@s2ack.com> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, USA. # ############################################################################ ifeq ($(VELOX_COREDIR),) $(error error : VELOX_COREDIR undefined, source configure-velox-project.sh in Velox Project) else include $(VELOX_COREDIR)/etc/common_defines.mk include $(VELOX_COREDIR)/$(LOCAL_PORTS_DIR)/etc/defines.mk include $(VELOX_COREDIR)/$(LOCAL_PORTS_DIR)/etc/kernel_module.mk endif PORTNAME=ft6x06 PORTVERSION=1.0 DISTNAME=$(PORTNAME)-$(PORTVERSION) MAINTAINER=Stewart Maguire <stewart.maguire@s2ack.com> DISTMTS=yes ifneq ($(VELOX_ARCH), $(VELOX_ARCH_NATIVE)) all: build else all: build endif extract: @$(ECHO_TARGET_NOTHING) $(CONFIGURE): mkdir -p $(VELOX_WORK)/$(DISTNAME) cp -R files/* $(VELOX_WORK)/$(DISTNAME) build: configure cd $(VELOX_WORK)/$(DISTNAME) && $(MAKE) $(JOBS) $(KERNEL_MAKE_ARGS) install_modules: cd $(VELOX_WORK)/$(DISTNAME) && $(MAKE) $(KERNEL_MAKE_ARGS) modules_install install: $(PORTINSTALL) $(MAKE) install_modules $(MAKE) portinstalled include $(VELOX_COREDIR)/$(LOCAL_PORTS_DIR)/etc/rules.mk
s2ack/velox-core
ports/linux/drivers/ft6x06_ts/Makefile
Makefile
gpl-2.0
1,955
/* * For small machines it's cheaper to simply allocate banks in the size * needed for the largest swapout of the application as that'll be under * 64K. For split I/D we can allocate pairs of swap banks. * * It's possible to be a lot smarter about this and for 32bit systems * it becomes a necessity not to use this simple swap logic. */ #include <kernel.h> #include <kdata.h> #include <printf.h> #undef DEBUG #ifdef SWAPDEV uint16_t swappage; /* Target page */ /* Table of available maps */ static uint8_t swapmap[MAX_SWAPS]; static uint8_t swapptr = 0; static char maxswap[] = PANIC_MAXSWAP; void swapmap_add(uint8_t swap) { if (swapptr == MAX_SWAPS) panic(maxswap); swapmap[swapptr++] = swap; sysinfo.swapusedk -= SWAP_SIZE / 2; } int swapmap_alloc(void) { if (swapptr) { sysinfo.swapusedk += SWAP_SIZE / 2; return swapmap[--swapptr]; } else return 0; } void swapmap_init(uint8_t swap) { if (swapptr == MAX_SWAPS) panic(maxswap); swapmap[swapptr++] = swap; sysinfo.swapk += SWAP_SIZE / 2; } /* We can re-use udata.u_block and friends as we can never be swapped while we are in the middle of an I/O (at least for now). If we rework the kernel for sleepable I/O this will change */ int swapread(uint16_t dev, blkno_t blkno, usize_t nbytes, uaddr_t buf, uint16_t page) { udata.u_dptr = swap_map(buf); udata.u_block = blkno; if (nbytes & BLKMASK) panic("swprd"); udata.u_nblock = nbytes >> BLKSHIFT; swappage = page; return ((*dev_tab[major(dev)].dev_read) (minor(dev), 2, 0)); } int swapwrite(uint16_t dev, blkno_t blkno, usize_t nbytes, uaddr_t buf, uint16_t page) { /* FIXME: duplication here */ udata.u_dptr = swap_map(buf); udata.u_block = blkno; if (nbytes & BLKMASK) panic("swpwr"); udata.u_nblock = nbytes >> BLKSHIFT; swappage = page; return ((*dev_tab[major(dev)].dev_write) (minor(dev), 2, 0)); } /* * Swap out process. As we have them all the same size we ignore * p for now. For a single memory image system most of this can go! */ static ptptr swapvictim(ptptr p, int notself) { #ifdef CONFIG_MULTI ptptr c; ptptr r = NULL; ptptr f = NULL; uint16_t sc = 0; uint16_t s; extern ptptr getproc_nextp; /* Eww.. */ c = getproc_nextp; do { if (c->p_page) { /* No point swapping someone in swap! */ /* Find the last entry before us */ if (c->p_status == P_READY) r = c; if (c->p_status > P_READY && c->p_status <= P_FORKING) { /* relative position in order of waits, bigger is longer, can wrap but shouldn't really matter to us much if it does */ s = (waitno - c->p_waitno); if (s >= sc) { sc = s; f = c; } } } c++; if (c == ptab_end) c = ptab; } while (c != getproc_nextp); /* Oldest waiter gets the boot */ if (f) { #ifdef DEBUG kprintf("swapvictim %x (page %d, state %d\n)", f, f->p_page, f->p_status); #endif return f; } /* No waiters.. the scheduler cycles so we will be the last to run again, failing that the one before us that was ready */ if (notself == 0) return udata.u_ptab; return r; #else used(p); if (notself) panic(PANIC_NOTSELF); return udata.u_ptab; #endif } ptptr swapneeded(ptptr p, int notself) { ptptr n = swapvictim(p, notself); if (n) if (swapout(n)) n = NULL; return n; } void swapper2(ptptr p, uint16_t map) { #ifdef DEBUG kprintf("Swapping in %p (page %d), utab.ptab %p\n", p, p->p_page, udata.u_ptab); #endif swapin(p, map); swapmap_add(map); #ifdef DEBUG kprintf("Swapped in %p (page %d), udata.ptab %p\n", p, p->p_page, udata.u_ptab); #endif } /* * Called from switchin when we discover that we want to run * a swapped process. We let pagemap_alloc cause any needed swap * out of idle processes. */ void swapper(ptptr p) { uint16_t map = p->p_page2; pagemap_alloc(p); /* May cause a swapout. May also destroy the old value of p->page2 */ swapper2(p, map); } #endif
jameszhan/FUZIX
Kernel/swap.c
C
gpl-2.0
4,013
var infoCtrl = require('../controllers/infoCtrl.js'); module.exports = [ { method: 'GET', path: '/info/all', config: { handler: infoCtrl.getAll } } ];
Limezest/dockerController
src/app/routes/info.js
JavaScript
gpl-2.0
173
#include <linux/module.h> #include <linux/kernel.h> #include <linux/init.h> #include <linux/interrupt.h> #include <linux/platform_device.h> #include <linux/switch.h> #include <linux/workqueue.h> #include <linux/gpio.h> #include <linux/delay.h> #include <linux/slab.h> #include <asm/io.h> #include <plat/imapx.h> #ifdef CONFIG_IG_WIFI_SDIO #define __mmc_rescan(x) sdhci_mmc##x##_detect_change() #define _mmc_rescan(x) __mmc_rescan(x) extern void _mmc_rescan(CONFIG_IG_WIFI_SDIO_CHANNEL); #endif struct wifi_switch_data { struct switch_dev sdev; unsigned gpio_power0; unsigned gpio_power1; unsigned gpio_switch; const char *name_on; const char *name_off; const char *state_on; const char *state_off; int irq; //struct work_struct *work; }; static struct wifi_switch_data *switch_data; static struct work_struct switch_wifi_work; void wifi_power(int power) { if (power == 1) { printk(KERN_INFO "IN WIFI POWER 1"); imapx_gpio_setpin(switch_data->gpio_power0, 1, IG_NMSL); imapx_gpio_setpin(switch_data->gpio_power1, 1, IG_NMSL); #ifdef CONFIG_IG_WIFI_SDIO msleep(1000); _mmc_rescan(CONFIG_IG_WIFI_SDIO_CHANNEL); #endif } else { printk(KERN_INFO "IN WIFI POWER 0"); imapx_gpio_setpin(switch_data->gpio_power0, 0, IG_NMSL); imapx_gpio_setpin(switch_data->gpio_power1, 0, IG_NMSL); } } EXPORT_SYMBOL(wifi_power); static void gpio_switch_work(struct work_struct *work) { // printk("enter function %s, at line %d \n", __func__, __LINE__); switch_set_state(&switch_data->sdev, imapx_gpio_getpin(switch_data->gpio_switch, IG_NORMAL)); } static irqreturn_t gpio_irq_handler(int irq, void *dev_id) { // printk("enter function %s, at line %d \n", __func__, __LINE__); if(imapx_gpio_is_pending(switch_data->gpio_switch, 1)) schedule_work(&switch_wifi_work); return IRQ_HANDLED; } static ssize_t switch_wifi_print_state(struct switch_dev *sdev, char *buf) { const char *state; //printk("enter function %s, at line %d \n", __func__, __LINE__); if (switch_get_state(sdev)) state = switch_data->state_on; else state = switch_data->state_off; if (state) return sprintf(buf, "%s\n", state); return -1; } static int wifi_switch_probe(struct platform_device *pdev) { struct gpio_switch_platform_data *pdata = pdev->dev.platform_data; // struct wifi_switch_data *switch_data; int ret; //printk("enter function %s, at line %d \n", __func__, __LINE__); if (!pdata) return -EBUSY; switch_data = kzalloc(sizeof(struct wifi_switch_data), GFP_KERNEL); if (!switch_data) return -ENOMEM; switch_data->gpio_power0 = __imapx_name_to_gpio(CONFIG_IG_WIFI_POWER0); switch_data->gpio_power1 = __imapx_name_to_gpio(CONFIG_IG_WIFI_POWER1); #if 0 #ifdef CONFIG_IG_KEYS_POWERS switch_data->gpio_switch = __imapx_name_to_gpio(CONFIG_IG_KEYS_WIFI); #else switch_data->gpio_switch = IMAPX_GPIO_ERROR; #endif #endif imapx_gpio_setcfg(switch_data->gpio_power0, IG_OUTPUT, IG_NMSL); imapx_gpio_setcfg(switch_data->gpio_power1, IG_OUTPUT, IG_NMSL); printk(KERN_INFO "get into wifi_power"); wifi_power(1); /* if(switch_data->gpio_switch == IMAPX_GPIO_ERROR) { printk(KERN_ERR "get wifi powers/switch pins failed.\n"); return -ENOTTY; } */ switch_data->sdev.name = pdata->name; // switch_data->gpio = pdata->gpio; switch_data->name_on = pdata->name_on; switch_data->name_off = pdata->name_off; switch_data->state_on = pdata->state_on; switch_data->state_off = pdata->state_off; switch_data->sdev.print_state = switch_wifi_print_state; // printk("switch_gpio is %d\n", switch_data->gpio); INIT_WORK(&switch_wifi_work, gpio_switch_work); switch_data->irq = imapx_gpio_to_irq(switch_data->gpio_switch); ret = request_irq(switch_data->irq, gpio_irq_handler, IRQF_DISABLED, pdev->name, switch_data); if (ret < 0) return ret; ret = switch_dev_register(&switch_data->sdev); if (ret < 0) return ret; imapx_gpio_setcfg(switch_data->gpio_switch, IG_INPUT, IG_NORMAL); /* Perform initial detection */ schedule_work(&switch_wifi_work); // gpio_switch_work(&switch_wifi_work); imapx_gpio_setirq(switch_data->gpio_switch, FILTER_MAX, IG_BOTH, 1); // printk("enter function %s, at line %d \n", __func__, __LINE__); return 0; } static int __devexit wifi_switch_remove(struct platform_device *pdev) { struct wifi_switch_data *switch_data = platform_get_drvdata(pdev); cancel_work_sync(&switch_wifi_work); switch_dev_unregister(&switch_data->sdev); kfree(switch_data); return 0; } static int wifi_switch_suspend(struct platform_device *pdev, pm_message_t state) { //struct wifi_switch_data *switch_data = platform_get_drvdata(pdev); //schedule_work(&switch_wifi_work); return 0; } static int wifi_switch_resume(struct platform_device *pdev) { //struct wifi_switch_data *switch_data = platform_get_drvdata(pdev); schedule_work(&switch_wifi_work); return 0; } static struct platform_driver wifi_switch_driver = { .probe = wifi_switch_probe, .remove = __devexit_p(wifi_switch_remove), .suspend = wifi_switch_suspend, .resume = wifi_switch_resume, .driver = { .name = "switch-wifi", .owner = THIS_MODULE, }, }; static int __init wifi_switch_init(void) { printk("wifi_switch module init\n"); return platform_driver_register(&wifi_switch_driver); } static void __exit wifi_switch_exit(void) { platform_driver_unregister(&wifi_switch_driver); } module_init(wifi_switch_init); //late_initcall(wifi_switch_init); module_exit(wifi_switch_exit); MODULE_AUTHOR("Bob.yang <Bob.yang@infotmic.com.cn>"); /* modified by warits on apr.28 to fit new gpio structure */ MODULE_DESCRIPTION("WIFI Switch driver"); MODULE_LICENSE("GPL");
wRieDen/imapx210-nb-linux-kernel
drivers/switch/switch_wifi.c
C
gpl-2.0
5,625
"use strict"; /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=Study.js.map
QuantiModo/quantimodo-android-chrome-ios-web-app
src/api/node/models/Study.js
JavaScript
gpl-2.0
179
.App-logo { animation: App-logo-spin infinite 20s linear; height: 80px; } .App-header { background-color: #222; height: 150px; padding: 20px; color: white; } @keyframes App-logo-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
okristian1/react-info
src/style/App.css
CSS
gpl-2.0
274
/* include/linux/msm_mdp.h * * Copyright (C) 2007 Google Incorporated * Copyright (c) 2012 Code Aurora Forum. All rights reserved. * * This software is licensed under the terms of the GNU General Public * License version 2, as published by the Free Software Foundation, and * may be copied, distributed, and modified under those terms. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. */ #ifndef _MSM_MDP_H_ #define _MSM_MDP_H_ #include <linux/types.h> #include <linux/fb.h> #define MSMFB_IOCTL_MAGIC 'm' #define MSMFB_GRP_DISP _IOW(MSMFB_IOCTL_MAGIC, 1, unsigned int) #define MSMFB_BLIT _IOW(MSMFB_IOCTL_MAGIC, 2, unsigned int) #define MSMFB_SUSPEND_SW_REFRESHER _IOW(MSMFB_IOCTL_MAGIC, 128, unsigned int) #define MSMFB_RESUME_SW_REFRESHER _IOW(MSMFB_IOCTL_MAGIC, 129, unsigned int) #define MSMFB_CURSOR _IOW(MSMFB_IOCTL_MAGIC, 130, struct fb_cursor) #define MSMFB_SET_LUT _IOW(MSMFB_IOCTL_MAGIC, 131, struct fb_cmap) #define MSMFB_HISTOGRAM _IOWR(MSMFB_IOCTL_MAGIC, 132, struct mdp_histogram_data) /* new ioctls's for set/get ccs matrix */ #define MSMFB_GET_CCS_MATRIX _IOWR(MSMFB_IOCTL_MAGIC, 133, struct mdp_ccs) #define MSMFB_SET_CCS_MATRIX _IOW(MSMFB_IOCTL_MAGIC, 134, struct mdp_ccs) #define MSMFB_OVERLAY_SET _IOWR(MSMFB_IOCTL_MAGIC, 135, \ struct mdp_overlay) #define MSMFB_OVERLAY_UNSET _IOW(MSMFB_IOCTL_MAGIC, 136, unsigned int) #define MSMFB_OVERLAY_PLAY _IOW(MSMFB_IOCTL_MAGIC, 137, \ struct msmfb_overlay_data) #define MSMFB_OVERLAY_QUEUE MSMFB_OVERLAY_PLAY #define MSMFB_GET_PAGE_PROTECTION _IOR(MSMFB_IOCTL_MAGIC, 138, \ struct mdp_page_protection) #define MSMFB_SET_PAGE_PROTECTION _IOW(MSMFB_IOCTL_MAGIC, 139, \ struct mdp_page_protection) #define MSMFB_OVERLAY_GET _IOR(MSMFB_IOCTL_MAGIC, 140, \ struct mdp_overlay) #define MSMFB_OVERLAY_PLAY_ENABLE _IOW(MSMFB_IOCTL_MAGIC, 141, unsigned int) #define MSMFB_OVERLAY_BLT _IOWR(MSMFB_IOCTL_MAGIC, 142, \ struct msmfb_overlay_blt) #define MSMFB_OVERLAY_BLT_OFFSET _IOW(MSMFB_IOCTL_MAGIC, 143, unsigned int) #define MSMFB_HISTOGRAM_START _IOR(MSMFB_IOCTL_MAGIC, 144, \ struct mdp_histogram_start_req) #define MSMFB_HISTOGRAM_STOP _IOR(MSMFB_IOCTL_MAGIC, 145, unsigned int) #define MSMFB_NOTIFY_UPDATE _IOW(MSMFB_IOCTL_MAGIC, 146, unsigned int) #define MSMFB_OVERLAY_3D _IOWR(MSMFB_IOCTL_MAGIC, 147, \ struct msmfb_overlay_3d) #define MSMFB_MIXER_INFO _IOWR(MSMFB_IOCTL_MAGIC, 148, \ struct msmfb_mixer_info_req) #define MSMFB_OVERLAY_PLAY_WAIT _IOWR(MSMFB_IOCTL_MAGIC, 149, \ struct msmfb_overlay_data) #define MSMFB_WRITEBACK_INIT _IO(MSMFB_IOCTL_MAGIC, 150) #define MSMFB_WRITEBACK_START _IO(MSMFB_IOCTL_MAGIC, 151) #define MSMFB_WRITEBACK_STOP _IO(MSMFB_IOCTL_MAGIC, 152) #define MSMFB_WRITEBACK_QUEUE_BUFFER _IOW(MSMFB_IOCTL_MAGIC, 153, \ struct msmfb_data) #define MSMFB_WRITEBACK_DEQUEUE_BUFFER _IOW(MSMFB_IOCTL_MAGIC, 154, \ struct msmfb_data) #define MSMFB_WRITEBACK_TERMINATE _IO(MSMFB_IOCTL_MAGIC, 155) #define MSMFB_MDP_PP _IOWR(MSMFB_IOCTL_MAGIC, 156, struct msmfb_mdp_pp) #define MSMFB_OVERLAY_VSYNC_CTRL _IOW(MSMFB_IOCTL_MAGIC, 160, unsigned int) #define FB_TYPE_3D_PANEL 0x10101010 #define MDP_IMGTYPE2_START 0x10000 #define MSMFB_DRIVER_VERSION 0xF9E8D701 enum { NOTIFY_UPDATE_START, NOTIFY_UPDATE_STOP, }; enum { MDP_RGB_565, /* RGB 565 planer */ MDP_XRGB_8888, /* RGB 888 padded */ MDP_Y_CBCR_H2V2, /* Y and CbCr, pseudo planer w/ Cb is in MSB */ MDP_Y_CBCR_H2V2_ADRENO, MDP_ARGB_8888, /* ARGB 888 */ MDP_RGB_888, /* RGB 888 planer */ MDP_Y_CRCB_H2V2, /* Y and CrCb, pseudo planer w/ Cr is in MSB */ MDP_YCRYCB_H2V1, /* YCrYCb interleave */ MDP_Y_CRCB_H2V1, /* Y and CrCb, pseduo planer w/ Cr is in MSB */ MDP_Y_CBCR_H2V1, /* Y and CrCb, pseduo planer w/ Cr is in MSB */ MDP_Y_CRCB_H1V2, MDP_Y_CBCR_H1V2, MDP_RGBA_8888, /* ARGB 888 */ MDP_BGRA_8888, /* ABGR 888 */ MDP_RGBX_8888, /* RGBX 888 */ MDP_Y_CRCB_H2V2_TILE, /* Y and CrCb, pseudo planer tile */ MDP_Y_CBCR_H2V2_TILE, /* Y and CbCr, pseudo planer tile */ MDP_Y_CR_CB_H2V2, /* Y, Cr and Cb, planar */ MDP_Y_CR_CB_GH2V2, /* Y, Cr and Cb, planar aligned to Android YV12 */ MDP_Y_CB_CR_H2V2, /* Y, Cb and Cr, planar */ MDP_Y_CRCB_H1V1, /* Y and CrCb, pseduo planer w/ Cr is in MSB */ MDP_Y_CBCR_H1V1, /* Y and CbCr, pseduo planer w/ Cb is in MSB */ MDP_YCRCB_H1V1, /* YCrCb interleave */ MDP_YCBCR_H1V1, /* YCbCr interleave */ MDP_BGR_565, /* BGR 565 planer */ MDP_IMGTYPE_LIMIT, MDP_RGB_BORDERFILL, /* border fill pipe */ MDP_FB_FORMAT = MDP_IMGTYPE2_START, /* framebuffer format */ MDP_IMGTYPE_LIMIT2 /* Non valid image type after this enum */ }; enum { PMEM_IMG, FB_IMG, }; enum { HSIC_HUE = 0, HSIC_SAT, HSIC_INT, HSIC_CON, NUM_HSIC_PARAM, }; #define MDSS_MDP_ROT_ONLY 0x80 #define MDSS_MDP_RIGHT_MIXER 0x100 /* mdp_blit_req flag values */ #define MDP_ROT_NOP 0 #define MDP_FLIP_LR 0x1 #define MDP_FLIP_UD 0x2 #define MDP_ROT_90 0x4 #define MDP_ROT_180 (MDP_FLIP_UD|MDP_FLIP_LR) #define MDP_ROT_270 (MDP_ROT_90|MDP_FLIP_UD|MDP_FLIP_LR) #define MDP_DITHER 0x8 #define MDP_BLUR 0x10 #define MDP_BLEND_FG_PREMULT 0x20000 #define MDP_DEINTERLACE 0x80000000 #define MDP_SHARPENING 0x40000000 #define MDP_NO_DMA_BARRIER_START 0x20000000 #define MDP_NO_DMA_BARRIER_END 0x10000000 #define MDP_NO_BLIT 0x08000000 #define MDP_BLIT_WITH_DMA_BARRIERS 0x000 #define MDP_BLIT_WITH_NO_DMA_BARRIERS \ (MDP_NO_DMA_BARRIER_START | MDP_NO_DMA_BARRIER_END) #define MDP_BLIT_SRC_GEM 0x04000000 #define MDP_BLIT_DST_GEM 0x02000000 #define MDP_BLIT_NON_CACHED 0x01000000 #define MDP_OV_PIPE_SHARE 0x00800000 #define MDP_DEINTERLACE_ODD 0x00400000 #define MDP_OV_PLAY_NOWAIT 0x00200000 #define MDP_SOURCE_ROTATED_90 0x00100000 #define MDP_OVERLAY_PP_CFG_EN 0x00080000 #define MDP_BACKEND_COMPOSITION 0x00040000 #define MDP_BORDERFILL_SUPPORTED 0x00010000 #define MDP_SECURE_OVERLAY_SESSION 0x00008000 #define MDP_MEMORY_ID_TYPE_FB 0x00001000 #define MDP_TRANSP_NOP 0xffffffff #define MDP_ALPHA_NOP 0xff #define MDP_FB_PAGE_PROTECTION_NONCACHED (0) #define MDP_FB_PAGE_PROTECTION_WRITECOMBINE (1) #define MDP_FB_PAGE_PROTECTION_WRITETHROUGHCACHE (2) #define MDP_FB_PAGE_PROTECTION_WRITEBACKCACHE (3) #define MDP_FB_PAGE_PROTECTION_WRITEBACKWACACHE (4) /* Sentinel: Don't use! */ #define MDP_FB_PAGE_PROTECTION_INVALID (5) /* Count of the number of MDP_FB_PAGE_PROTECTION_... values. */ #define MDP_NUM_FB_PAGE_PROTECTION_VALUES (5) struct mdp_rect { uint32_t x; uint32_t y; uint32_t w; uint32_t h; }; struct mdp_img { uint32_t width; uint32_t height; uint32_t format; uint32_t offset; int memory_id; /* the file descriptor */ uint32_t priv; }; /* * {3x3} + {3} ccs matrix */ #define MDP_CCS_RGB2YUV 0 #define MDP_CCS_YUV2RGB 1 #define MDP_CCS_SIZE 9 #define MDP_BV_SIZE 3 struct mdp_ccs { int direction; /* MDP_CCS_RGB2YUV or YUV2RGB */ uint16_t ccs[MDP_CCS_SIZE]; /* 3x3 color coefficients */ uint16_t bv[MDP_BV_SIZE]; /* 1x3 bias vector */ }; struct mdp_csc { int id; uint32_t csc_mv[9]; uint32_t csc_pre_bv[3]; uint32_t csc_post_bv[3]; uint32_t csc_pre_lv[6]; uint32_t csc_post_lv[6]; }; /* The version of the mdp_blit_req structure so that * user applications can selectively decide which functionality * to include */ #define MDP_BLIT_REQ_VERSION 2 struct mdp_blit_req { struct mdp_img src; struct mdp_img dst; struct mdp_rect src_rect; struct mdp_rect dst_rect; uint32_t alpha; uint32_t transp_mask; uint32_t flags; int sharpening_strength; /* -127 <--> 127, default 64 */ }; struct mdp_blit_req_list { uint32_t count; struct mdp_blit_req req[]; }; #define MSMFB_DATA_VERSION 2 struct msmfb_data { uint32_t offset; int memory_id; int id; uint32_t flags; uint32_t priv; uint32_t iova; }; #define MSMFB_NEW_REQUEST -1 struct msmfb_overlay_data { uint32_t id; struct msmfb_data data; uint32_t version_key; struct msmfb_data plane1_data; struct msmfb_data plane2_data; struct msmfb_data dst_data; }; struct msmfb_img { uint32_t width; uint32_t height; uint32_t format; }; #define MSMFB_WRITEBACK_DEQUEUE_BLOCKING 0x1 struct msmfb_writeback_data { struct msmfb_data buf_info; struct msmfb_img img; }; #define MDP_PP_OPS_READ 0x2 #define MDP_PP_OPS_WRITE 0x4 struct mdp_qseed_cfg { uint32_t table_num; uint32_t ops; uint32_t len; uint32_t *data; }; struct mdp_qseed_cfg_data { uint32_t block; struct mdp_qseed_cfg qseed_data; }; #define MDP_OVERLAY_PP_CSC_CFG 0x1 #define MDP_OVERLAY_PP_QSEED_CFG 0x2 #define MDP_CSC_FLAG_ENABLE 0x1 #define MDP_CSC_FLAG_YUV_IN 0x2 #define MDP_CSC_FLAG_YUV_OUT 0x4 struct mdp_csc_cfg { /* flags for enable CSC, toggling RGB,YUV input/output */ uint32_t flags; uint32_t csc_mv[9]; uint32_t csc_pre_bv[3]; uint32_t csc_post_bv[3]; uint32_t csc_pre_lv[6]; uint32_t csc_post_lv[6]; }; struct mdp_csc_cfg_data { uint32_t block; struct mdp_csc_cfg csc_data; }; struct mdp_overlay_pp_params { uint32_t config_ops; struct mdp_csc_cfg csc_cfg; struct mdp_qseed_cfg qseed_cfg[2]; }; struct mdp_overlay { struct msmfb_img src; struct mdp_rect src_rect; struct mdp_rect dst_rect; uint32_t z_order; /* stage number */ uint32_t is_fg; /* control alpha & transp */ uint32_t alpha; uint32_t transp_mask; uint32_t flags; uint32_t id; uint32_t user_data[8]; struct mdp_overlay_pp_params overlay_pp_cfg; }; struct msmfb_overlay_3d { uint32_t is_3d; uint32_t width; uint32_t height; }; struct msmfb_overlay_blt { uint32_t enable; uint32_t offset; uint32_t width; uint32_t height; uint32_t bpp; }; struct mdp_histogram { uint32_t frame_cnt; uint32_t bin_cnt; uint32_t *r; uint32_t *g; uint32_t *b; }; /* mdp_block_type defines the identifiers for each of pipes in MDP 4.3 MDP_BLOCK_RESERVED is provided for backward compatibility and is deprecated. It corresponds to DMA_P. So MDP_BLOCK_DMA_P should be used instead. */ enum { MDP_BLOCK_RESERVED = 0, MDP_BLOCK_OVERLAY_0, MDP_BLOCK_OVERLAY_1, MDP_BLOCK_VG_1, MDP_BLOCK_VG_2, MDP_BLOCK_RGB_1, MDP_BLOCK_RGB_2, MDP_BLOCK_DMA_P, MDP_BLOCK_DMA_S, MDP_BLOCK_DMA_E, MDP_BLOCK_OVERLAY_2, MDP_BLOCK_MAX, }; /* * mdp_histogram_start_req is used to provide the parameters for * histogram start request */ struct mdp_histogram_start_req { uint32_t block; uint8_t frame_cnt; uint8_t bit_mask; uint8_t num_bins; }; /* * mdp_histogram_data is used to return the histogram data, once * the histogram is done/stopped/cance */ struct mdp_histogram_data { uint32_t block; uint8_t bin_cnt; uint32_t *c0; uint32_t *c1; uint32_t *c2; uint32_t *extra_info; }; struct mdp_pcc_coeff { uint32_t c, r, g, b, rr, gg, bb, rg, gb, rb, rgb_0, rgb_1; }; struct mdp_pcc_cfg_data { uint32_t block; uint32_t ops; struct mdp_pcc_coeff r, g, b; }; enum { mdp_lut_igc, mdp_lut_pgc, mdp_lut_hist, mdp_lut_max, }; struct mdp_igc_lut_data { uint32_t block; uint32_t len, ops; uint32_t *c0_c1_data; uint32_t *c2_data; }; struct mdp_ar_gc_lut_data { uint32_t x_start; uint32_t slope; uint32_t offset; }; struct mdp_pgc_lut_data { uint32_t block; uint32_t flags; uint8_t num_r_stages; uint8_t num_g_stages; uint8_t num_b_stages; struct mdp_ar_gc_lut_data *r_data; struct mdp_ar_gc_lut_data *g_data; struct mdp_ar_gc_lut_data *b_data; }; struct mdp_hist_lut_data { uint32_t block; uint32_t ops; uint32_t len; uint32_t *data; }; struct mdp_lut_cfg_data { uint32_t lut_type; union { struct mdp_igc_lut_data igc_lut_data; struct mdp_pgc_lut_data pgc_lut_data; struct mdp_hist_lut_data hist_lut_data; } data; }; struct mdp_bl_scale_data { uint32_t min_lvl; uint32_t scale; }; enum { mdp_op_pcc_cfg, mdp_op_csc_cfg, mdp_op_lut_cfg, mdp_op_qseed_cfg, mdp_bl_scale_cfg, mdp_op_max, }; struct msmfb_mdp_pp { uint32_t op; union { struct mdp_pcc_cfg_data pcc_cfg_data; struct mdp_csc_cfg_data csc_cfg_data; struct mdp_lut_cfg_data lut_cfg_data; struct mdp_qseed_cfg_data qseed_cfg_data; struct mdp_bl_scale_data bl_scale_data; } data; }; struct mdp_page_protection { uint32_t page_protection; }; struct mdp_mixer_info { int pndx; int pnum; int ptype; int mixer_num; int z_order; }; #define MAX_PIPE_PER_MIXER 4 struct msmfb_mixer_info_req { int mixer_num; int cnt; struct mdp_mixer_info info[MAX_PIPE_PER_MIXER]; }; enum { DISPLAY_SUBSYSTEM_ID, ROTATOR_SUBSYSTEM_ID, }; #ifdef __KERNEL__ /* get the framebuffer physical address information */ int get_fb_phys_info(unsigned long *start, unsigned long *len, int fb_num, int subsys_id); struct fb_info *msm_fb_get_writeback_fb(void); int msm_fb_writeback_init(struct fb_info *info); int msm_fb_writeback_start(struct fb_info *info); int msm_fb_writeback_queue_buffer(struct fb_info *info, struct msmfb_data *data); int msm_fb_writeback_dequeue_buffer(struct fb_info *info, struct msmfb_data *data); int msm_fb_writeback_stop(struct fb_info *info); int msm_fb_writeback_terminate(struct fb_info *info); #endif #endif /*_MSM_MDP_H_*/
samarthp/sam-tenderloin-kernel-3.4
include/linux/msm_mdp.h
C
gpl-2.0
13,317
/**************************************************************************** ** ** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: ** ** "Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions are ** met: ** * Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** * Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names ** of its contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." ** ** $QT_END_LICENSE$ ** ****************************************************************************/ #include <QtWidgets> #include <QtConcurrent/QtConcurrent> #include "imageviewer.h" #include "ibf.h" ImageViewer::ImageViewer() : ibfLoadedFutureWatcher(this) { canvas = new Canvas; canvas->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored); setCentralWidget(canvas); createActions(); createMenus(); createToolBars(); resize(QGuiApplication::primaryScreen()->availableSize() * 3 / 5); connect(&ibfLoadedFutureWatcher, SIGNAL(finished()), this, SLOT(ibLoadFinished())); statusBar()->showMessage(tr("Ready")); // debug mode //loadFile("c:\\Users\\Public\\Pictures\\Jellyfish.ibf"); } bool ImageViewer::loadFile(const QString& filename) { try { if (ibfLoadedFutureWatcher.isRunning()) return false; QFuture<IBF*> ibfLoadedFuture = QtConcurrent::run(LoadFromDisk, filename); ibfLoadedFutureWatcher.setFuture(ibfLoadedFuture); loadedFile = filename; return true; } catch (...) { QMessageBox::information(this, QGuiApplication::applicationDisplayName(), tr("Cannot load %1.").arg(QDir::toNativeSeparators(filename))); } return false; } bool ImageViewer::loadFile(const IBF& ibf) { QPixmap orig; if (!ibf.ToPixmap(&orig)) return false; canvas->SetPixmap(orig); canvas->adjustSize(); setWindowFilePath(ibf.name()); xformPending = ibf.Transform().toTransform(); canvas->Transform(xformPending); saveAct->setEnabled(true); xformToolBar->setEnabled(true); return true; } IBF* ImageViewer::LoadFromDisk(const QString &filename) { try { IBF* ibf = new IBF(filename); return ibf; } catch (...) { return 0; } } void ImageViewer::ibLoadFinished() { IBF* ibf = ibfLoadedFutureWatcher.result(); loadFile(*ibf); delete ibf; } bool ImageViewer::saveFile(const QImage& image, const QMatrix4x4& xform, const QString& name, const QString& targetFilename) { IBF ibf(image, name, xform); if (ibf.save(targetFilename)) return loadFile(targetFilename); return false; } void ImageViewer::load() { const QStringList picturesLocations = QStandardPaths::standardLocations(QStandardPaths::PicturesLocation); QFileDialog dialog(this, tr("Load File"), picturesLocations.isEmpty() ? QDir::currentPath() : picturesLocations.first()); dialog.setAcceptMode(QFileDialog::AcceptOpen); dialog.setNameFilter(tr("IBF files (*.ibf)")); while (dialog.exec() == QDialog::Accepted && !loadFile(dialog.selectedFiles().first())) {} } void ImageViewer::saveAs() { if (loadedFile.isNull() || loadedFile.isEmpty()) return; if (canvas->GetPixmap().isNull()) return; QString targetFilename = QFileDialog::getSaveFileName(this, tr("Select target"), loadedFile, tr("IBF files (*.ibf)")); if (targetFilename.isNull() || targetFilename.isEmpty()) return; bool ok; QFileInfo targetInfo(loadedFile); QString targetName = QInputDialog::getText(this, tr("IBF Viewer"), tr("Image name"), QLineEdit::Normal, targetInfo.baseName(), &ok); if (!ok || targetName.isNull() || targetName.isEmpty()) return; saveFile(canvas->GetPixmap().toImage(), xformPending, targetName, targetFilename); } void ImageViewer::encode() { QMimeDatabase db; QString all("All image files ("); foreach (const QByteArray &mimeTypeName, QImageReader::supportedMimeTypes()) { QMimeType type = db.mimeTypeForName(mimeTypeName); const QStringList exts = type.suffixes(); for (int i=0; i<exts.length(); ++i) { all.append("*." + exts[i] + " "); } } all = all.left(all.length()-1) + ")"; const QStringList picturesLocations = QStandardPaths::standardLocations(QStandardPaths::PicturesLocation); QFileDialog dialog(this, tr("Open File"), picturesLocations.isEmpty() ? QDir::currentPath() : picturesLocations.first()); dialog.setAcceptMode(QFileDialog::AcceptOpen); dialog.setNameFilter(all); if (dialog.exec() == QDialog::Accepted) { QString selected = dialog.selectedFiles().first(); QImage image(selected); QFileInfo selectedTargetInfo(selected); bool ok; QString targetName = QInputDialog::getText(this, tr("IBF Viewer"), tr("Image name"), QLineEdit::Normal, selectedTargetInfo.baseName(), &ok); if (ok) { IBF ibf(image, targetName, QMatrix4x4()); QString targetFilename = QFileDialog::getSaveFileName(this, tr("Select target"), selectedTargetInfo.canonicalPath() + "/" + selectedTargetInfo.baseName(), tr("IBF files (*.ibf)")); if (targetFilename.isNull() || targetFilename.isEmpty()) return; if (!ibf.save(targetFilename)) return; loadFile(ibf); loadedFile = targetFilename; } } } void ImageViewer::about() { QMessageBox::about(this, tr("About Image Viewer"), tr("<p>The <b>Image Viewer</b>!</p>")); } void ImageViewer::setXFormTranslation() { xformControl = TRANSLATE; } void ImageViewer::setXFormRotation() { xformControl = ROTATE; } void ImageViewer::setXFormScale() { xformControl = SCALE; } void ImageViewer::resetTransformations() { xformPending.reset(); canvas->Transform(xformPending); } void ImageViewer::mousePressEvent(QMouseEvent *event) { lastMousePos = event->pos(); firstMousePos = event->pos(); } void ImageViewer::mouseMoveEvent(QMouseEvent *e) { int dx = e->x() - lastMousePos.x(); int dy = e->y() - lastMousePos.y(); float fdx = (float)dx; float fdy = (float)dy; if (e->buttons() & Qt::LeftButton) { QTransform x; switch (xformControl) { case TRANSLATE: { x.translate(fdx, fdy); QString msg; msg.sprintf("Translating (%.2f,%.2f)", fdx, fdy); statusBar()->showMessage(msg); break; } case ROTATE: { const float fValue = fdx + fdy; // very naive x.rotate(fValue); QString msg; msg.sprintf("Rotating %.2f degrees", fValue); statusBar()->showMessage(msg); break; } case SCALE: { const float dW = fdx / canvas->GetPixmap().width(); const float dH = fdy / canvas->GetPixmap().height(); const float xScale = 1.0f + dW; const float yScale = 1.0f + dH; x.scale(xScale, yScale); // TODO avoid shearing QString msg; msg.sprintf("scaling (%.2f,%.2f)", xScale, yScale); statusBar()->showMessage(msg); break; } } xformPending = xformPending * x; canvas->Transform(xformPending); } lastMousePos = e->pos(); } void ImageViewer::createActions() { loadAct = new QAction(tr("&Load..."), this); loadAct->setShortcut(tr("Ctrl+L")); connect(loadAct, SIGNAL(triggered()), this, SLOT(load())); encodeAct = new QAction(tr("&Encode..."), this); encodeAct->setShortcut(tr("Ctrl+E")); connect(encodeAct, SIGNAL(triggered()), this, SLOT(encode())); saveAct = new QAction(tr("&Save as..."), this); saveAct->setShortcut(tr("Ctrl+S")); connect(saveAct, SIGNAL(triggered()), this, SLOT(saveAs())); saveAct->setEnabled(false); exitAct = new QAction(tr("E&xit"), this); exitAct->setShortcut(tr("Ctrl+Q")); connect(exitAct, SIGNAL(triggered()), this, SLOT(close())); aboutAct = new QAction(tr("&About"), this); connect(aboutAct, SIGNAL(triggered()), this, SLOT(about())); aboutQtAct = new QAction(tr("About &Qt"), this); connect(aboutQtAct, SIGNAL(triggered()), qApp, SLOT(aboutQt())); // image controls resetXFormAct = new QAction(tr("Reset"), this); resetXFormAct->setIcon(QPixmap(":/images/Action Undo.png")); resetXFormAct->setStatusTip(tr("Reset all transformations")); resetXFormAct->setCheckable(false); connect(resetXFormAct, SIGNAL(triggered()), this, SLOT(resetTransformations())); translateAct = new QAction(tr("Translate"), this); translateAct->setIcon(QPixmap(":/images/transform-move-icon.png")); translateAct->setStatusTip(tr("Translate the image")); translateAct->setCheckable(true); connect(translateAct, SIGNAL(triggered()), this, SLOT(setXFormTranslation())); rotateAct = new QAction(tr("Rotate"), this); rotateAct->setIcon(QPixmap(":/images/transform-rotate-icon.png")); rotateAct->setStatusTip(tr("Rotate the image")); rotateAct->setCheckable(true); connect(rotateAct, SIGNAL(triggered()), this, SLOT(setXFormRotation())); scaleAct = new QAction(tr("Scale"), this); scaleAct->setIcon(QPixmap(":/images/transform-scale-icon.png")); scaleAct->setStatusTip(tr("Scale the image")); scaleAct->setCheckable(true); connect(scaleAct, SIGNAL(triggered()), this, SLOT(setXFormScale())); } void ImageViewer::createMenus() { fileMenu = new QMenu(tr("&File"), this); fileMenu->addAction(loadAct); fileMenu->addAction(saveAct); fileMenu->addAction(encodeAct); fileMenu->addSeparator(); fileMenu->addAction(exitAct); helpMenu = new QMenu(tr("&Help"), this); helpMenu->addAction(aboutAct); helpMenu->addAction(aboutQtAct); menuBar()->addMenu(fileMenu); menuBar()->addMenu(helpMenu); } void ImageViewer::createToolBars() { xformToolBar = new QToolBar(tr("Transformation"), this); xformActGroup = new QActionGroup(xformToolBar); xformActGroup->addAction(translateAct); xformActGroup->addAction(rotateAct); xformActGroup->addAction(scaleAct); xformToolBar->addAction(translateAct); xformToolBar->addAction(rotateAct); xformToolBar->addAction(scaleAct); xformToolBar->addSeparator(); xformToolBar->addAction(resetXFormAct); translateAct->setChecked(true); xformControl = TRANSLATE; addToolBar(xformToolBar); xformToolBar->setEnabled(false); }
liorda/ImageViewer
imageviewer.cpp
C++
gpl-2.0
12,169
#!/bin/bash # #BSUB -a poe # set parallel operating environment #BSUB -J u2g2pos # job name ###BSUB -J u2g2pos[24-120:24] # job name #BSUB -W 06:00 # wall-clock time (hrs:mins) #BSUB -n 16 # number of tasks in job (max task in one node) #BSUB -x # exclusive mode #BSUB -R span[ptile=16] # task per node #BSUB -q ultra # queue #BSUB -e /gpfs3/home/umfcst/UMRiderLogs/post/bsub/um2grb2.fcst.12hr.err.%J.hybrid # error file name in which %J is replaced by the job ID #BSUB -o /gpfs3/home/umfcst/UMRiderLogs/post/bsub/um2grb2.fcst.12hr.out.%J.hybrid # output file name in which %J is replaced by the job ID # find out the directory of this bash script after submitted to bsub DIR="$( cd "$( dirname "${BASH_SOURCE[1]}" )" && pwd )" # get the absolute path of the local table localTable_relative_dir="$DIR/../../tables/local/ncmr/v1/" localTable_absolute_dir="$( cd "$localTable_relative_dir" && pwd )" localTable=$localTable_absolute_dir/ncmr_grib2_local_table # get the absolute path of the script for forecast 12utc g2scripts_relative_dir="$DIR/../../g2scripts/" g2scripts_absolute_dir="$( cd "$g2scripts_relative_dir" && pwd )" g2script=$g2scripts_absolute_dir/um2grb2_fcst_12Z.py # export the configure paths to needed variables export UMRIDER_SETUP=$DIR/ncum_global_post_um2grb2_setup.cfg export UMRIDER_VARS=$DIR/ncum_global_post_um2grb2_vars.cfg export GRIB2TABLE=$localTable echo "export UMRIDER_SETUP="$UMRIDER_SETUP echo "export UMRIDER_VARS="$UMRIDER_VARS echo "export GRIB2TABLE="$GRIB2TABLE export SHELL=/bin/bash # get the hour to pass command line argument (from based on JOB index) hour=$(printf "%02d" ${LSB_JOBINDEX}) # 2-digit number starting with 0 hour0=$(expr $hour - 18) # sourcing umtid_bashrc to load module python-uvcdat-iris! source "$DIR/../umtid_bashrc" # execute the script #python $g2script --start_long_fcst_hour=${hour0} --end_long_fcst_hour=${hour} python $g2script
arulalant/UMRider
bsubScripts/ncum_global_post/ncum_global_post_fcst_12Z.bash
Shell
gpl-2.0
2,022
--幻竜星-チョウホウ function c19048328.initial_effect(c) --synchro summon aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1) c:EnableReviveLimit() --mat check local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_MATERIAL_CHECK) e1:SetValue(c19048328.matcheck) c:RegisterEffect(e1) --act limit local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetCondition(c19048328.regcon) e2:SetOperation(c19048328.regop) e2:SetLabelObject(e1) c:RegisterEffect(e2) --search local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(19048328,0)) e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP) e3:SetCode(EVENT_TO_GRAVE) e3:SetCondition(c19048328.thcon) e3:SetTarget(c19048328.thtg) e3:SetOperation(c19048328.thop) c:RegisterEffect(e3) --spsummon local e4=Effect.CreateEffect(c) e4:SetDescription(aux.Stringid(19048328,1)) e4:SetCategory(CATEGORY_SPECIAL_SUMMON) e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e4:SetCode(EVENT_DESTROYED) e4:SetRange(LOCATION_MZONE) e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP) e4:SetCountLimit(1) e4:SetCondition(c19048328.spcon) e4:SetTarget(c19048328.sptg) e4:SetOperation(c19048328.spop) c:RegisterEffect(e4) end function c19048328.matcheck(e,c) local g=c:GetMaterial():Filter(Card.IsSetCard,nil,0x9e) local att=0 local tc=g:GetFirst() while tc do att=bit.bor(att,tc:GetOriginalAttribute()) tc=g:GetNext() end e:SetLabel(att) end function c19048328.regcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) end function c19048328.regop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetCode(EFFECT_CANNOT_ACTIVATE) e1:SetRange(LOCATION_MZONE) e1:SetTargetRange(0,1) e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetValue(c19048328.aclimit) e1:SetLabelObject(e:GetLabelObject()) c:RegisterEffect(e1) local att=e:GetLabelObject():GetLabel() if bit.band(att,ATTRIBUTE_EARTH)~=0 then c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(19048328,2)) end if bit.band(att,ATTRIBUTE_WATER)~=0 then c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(19048328,3)) end if bit.band(att,ATTRIBUTE_FIRE)~=0 then c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(19048328,4)) end if bit.band(att,ATTRIBUTE_WIND)~=0 then c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(19048328,5)) end if bit.band(att,ATTRIBUTE_LIGHT)~=0 then c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(19048328,6)) end if bit.band(att,ATTRIBUTE_DARK)~=0 then c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(19048328,7)) end if bit.band(att,ATTRIBUTE_DEVINE)~=0 then c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(19048328,8)) end end function c19048328.aclimit(e,re,tp) local att=e:GetLabelObject():GetLabel() return re:IsActiveType(TYPE_MONSTER) and bit.band(att,re:GetHandler():GetOriginalAttribute())~=0 end function c19048328.thcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsSummonType(SUMMON_TYPE_SYNCHRO) end function c19048328.thfilter(c) return c:IsType(TYPE_TUNER) and c:IsAbleToHand() end function c19048328.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(c19048328.thfilter,tp,LOCATION_DECK,0,1,nil) end Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) end function c19048328.thop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local g=Duel.SelectMatchingCard(tp,c19048328.thfilter,tp,LOCATION_DECK,0,1,1,nil) if g:GetCount()>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end end function c19048328.cfilter(c,p) return c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:GetOriginalAttribute()~=0 and c:IsPreviousLocation(LOCATION_MZONE) and c:GetPreviousControler()==p end function c19048328.spcon(e,tp,eg,ep,ev,re,r,rp) local g=eg:Filter(c19048328.cfilter,nil,1-tp) if g:GetCount()>0 then local att=0 local tc=g:GetFirst() while tc do att=bit.bor(att,tc:GetOriginalAttribute()) tc=g:GetNext() end e:SetLabel(att) return true else return false end end function c19048328.spfilter(c,e,tp,att) return c:IsRace(RACE_WYRM) and bit.band(att,c:GetOriginalAttribute())~=0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end function c19048328.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c19048328.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp,e:GetLabel()) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) end function c19048328.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.SelectMatchingCard(tp,c19048328.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,e:GetLabel()) if g:GetCount()>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end end
mercury233/ygopro-scripts
c19048328.lua
Lua
gpl-2.0
5,617
package stoneserver; public class StoneServer { public static void main(String[] args){ MinecraftServer s = new MinecraftServer(25565, 2, "StoneServer, Testing!"); s.Start(); } }
jython234/StoneServer
src/stoneserver/StoneServer.java
Java
gpl-2.0
189
<?php /** * File containing the oauthadmin/edit view definition * * @copyright Copyright (C) 1999-2012 eZ Systems AS. All rights reserved. * @license http://www.gnu.org/licenses/gpl-2.0.txt GNU General Public License v2 * @version 2012.2 * @package kernel */ $session = ezcPersistentSessionInstance::get(); $module = $Params['Module']; // @todo Instanciate the session maybe ? $applicationId = $Params['ApplicationID']; $application = $session->load( 'ezpRestClient', $applicationId ); $tpl = eZTemplate::factory(); $tpl->setVariable( 'module', $module ); $tpl->setVariable( 'application', $application ); $Result['path'] = array( array( 'url' => false, 'text' => ezpI18n::tr( 'kernel/oauthadmin', 'oAuth admin' ) ), array( 'url' => false, 'text' => ezpI18n::tr( 'kernel/oauthadmin', 'REST application: %application_name%', null, array( '%application_name%' => $application->name ) ) ), ); $Result['content'] = $tpl->fetch( 'design:oauthadmin/view.tpl' ); return $Result; ?>
jim835/qscene_ez
kernel/private/modules/oauthadmin/view.php
PHP
gpl-2.0
1,113
(function (e, t, n) { t.fn.touchwipe = function (e) { var n = { min_move_x: 20, min_move_y: 20, wipeLeft: function () {}, wipeRight: function () {}, wipeUp: function () {}, wipeDown: function () {}, preventDefaultEvents: !0 }; e && t.extend(n, e); this.each(function () { function i() { this.removeEventListener("touchmove", s); e = null; r = !1 } function s(s) { n.preventDefaultEvents && s.preventDefault(); if (r) { var o = s.touches[0].pageX, u = s.touches[0].pageY, a = e - o, f = t - u; if (Math.abs(a) >= n.min_move_x) { i(); a > 0 ? n.wipeLeft() : n.wipeRight() } else if (Math.abs(f) >= n.min_move_y) { i(); f > 0 ? n.wipeDown() : n.wipeUp() } } } function o(n) { if (n.touches.length == 1) { e = n.touches[0].pageX; t = n.touches[0].pageY; r = !0; this.addEventListener("touchmove", s, !1) } } var e, t, r = !1; "ontouchstart" in document.documentElement && this.addEventListener("touchstart", o, !1) }); return this }; t.elastislide = function (e, n) { this.$el = t(n); this._init(e) }; t.elastislide.defaults = { speed: 450, easing: "", imageW: 190, margin: 3, border: 2, minItems: 1, current: 0, onClick: function () { return !1 } }; t.elastislide.prototype = { _init: function (e) { this.options = t.extend(!0, {}, t.elastislide.defaults, e); this.$slider = this.$el.find("ul"); this.$items = this.$slider.children("li"); this.itemsCount = this.$items.length; this.$esCarousel = this.$slider.parent(); this._validateOptions(); this._configure(); this._addControls(); this._initEvents(); this.$slider.show(); this._slideToCurrent(!1) }, _validateOptions: function () { this.options.speed < 0 && (this.options.speed = 450); this.options.margin < 0 && (this.options.margin = 4); this.options.border < 0 && (this.options.border = 1); if (this.options.minItems < 1 || this.options.minItems > this.itemsCount) this.options.minItems = 1; this.options.current > this.itemsCount - 1 && (this.options.current = 0) }, _configure: function () { this.current = this.options.current; this.visibleWidth = this.$esCarousel.width(); if (this.visibleWidth < this.options.minItems * (this.options.imageW + 2 * this.options.border) + (this.options.minItems - 1) * this.options.margin) { this._setDim((this.visibleWidth - (this.options.minItems - 1) * this.options.margin) / this.options.minItems); this._setCurrentValues(); this.fitCount = this.options.minItems } else { this._setDim(); this._setCurrentValues() } this.$slider.css({ width: this.sliderW + 24 }) }, _setDim: function (e) { this.$items.css({ marginRight: this.options.margin, width: e ? e : this.options.imageW + 2 * this.options.border }).children("a").css({ borderWidth: this.options.border }) }, _setCurrentValues: function () { this.itemW = this.$items.outerWidth(!0); this.sliderW = this.itemW * this.itemsCount; this.visibleWidth = this.$esCarousel.width(); this.fitCount = Math.floor(this.visibleWidth / this.itemW) }, _addControls: function () { this.$navNext = t('<span class="es-nav-next"><i class="icon-right-open"></i><span>Next</span></span>'); this.$navPrev = t('<span class="es-nav-prev"><i class="icon-left-open"></i><span>Previous</span></span>'); t('<div class="es-nav"/>').append(this.$navPrev).append(this.$navNext).appendTo(this.$el) }, _toggleControls: function (e, t) { e && t ? t === 1 ? e === "right" ? this.$navNext.show() : this.$navPrev.show() : e === "right" ? this.$navNext.hide() : this.$navPrev.hide() : (this.current === this.itemsCount - 1 || this.fitCount >= this.itemsCount) && this.$navNext.hide() }, _initEvents: function () { var n = this; t(e).bind("resize.elastislide", function (e) { refresh(); }); this.$navNext.bind("click.elastislide", function (e) { n._slide("right") }); this.$navPrev.bind("click.elastislide", function (e) { n._slide("left") }); this.$items.bind("click.elastislide", function (e) { n.options.onClick(t(this)); return !1 }); n.$slider.touchwipe({ wipeLeft: function () { n._slide("right") }, wipeRight: function () { n._slide("left") } }) }, _slide: function (e, r, i, s) { if (this.$slider.is(":animated")) return !1; var o = parseFloat(this.$slider.css("margin-left")); if (r === n) { var u = this.fitCount * this.itemW, r; if (u < 0) return !1; if (e === "right" && this.sliderW - (Math.abs(o) + u) < this.visibleWidth) { u = this.sliderW - (Math.abs(o) + this.visibleWidth) - this.options.margin; this._toggleControls("right", -1); this._toggleControls("left", 1) } else if (e === "left" && Math.abs(o) - u < 0) { u = Math.abs(o); this._toggleControls("left", -1); this._toggleControls("right", 1) } else { var a; e === "right" ? a = Math.abs(o) + this.options.margin + Math.abs(u) : a = Math.abs(o) - this.options.margin - Math.abs(u); a > 0 ? this._toggleControls("left", 1) : this._toggleControls("left", -1); a < this.sliderW - this.visibleWidth ? this._toggleControls("right", 1) : this._toggleControls("right", -1) } e === "right" ? r = "-=" + u : r = "+=" + u } else { var a = Math.abs(r); if (Math.max(this.sliderW, this.visibleWidth) - a < this.visibleWidth) { r = -(Math.max(this.sliderW, this.visibleWidth) - this.visibleWidth); r !== 0 && (r += this.options.margin); this._toggleControls("right", -1); a = Math.abs(r) } a > 0 ? this._toggleControls("left", 1) : this._toggleControls("left", -1); Math.max(this.sliderW, this.visibleWidth) - this.visibleWidth > a + this.options.margin ? this._toggleControls("right", 1) : this._toggleControls("right", -1) } t.fn.applyStyle = i === n ? t.fn.animate : t.fn.css; var f = { marginLeft: r }, l = this; this.$slider.applyStyle(f, t.extend(!0, [], { duration: this.options.speed, easing: this.options.easing, complete: function () { s && s.call() } })) }, _slideToCurrent: function (e) { var t = this.current * this.itemW; this._slide("", -t, e) }, add: function (e, t) { this.$items = this.$items.add(e); this.itemsCount = this.$items.length; this._setDim(); this._setCurrentValues(); this.$slider.css({ width: this.sliderW }); this._slideToCurrent(); t && t.call(e) }, destroy: function (e) { this._destroy(e) }, _destroy: function (n) { this.$el.unbind(".elastislide").removeData("elastislide"); t(e).unbind(".elastislide"); n && n.call() }, refresh: function(n) { var n = this; n._setCurrentValues(); if (n.visibleWidth < n.options.minItems * (n.options.imageW + 2 * n.options.border) + (n.options.minItems - 1) * n.options.margin) { n._setDim((n.visibleWidth - (n.options.minItems - 1) * n.options.margin) / n.options.minItems); n._setCurrentValues(); n.fitCount = n.options.minItems } else { n._setDim(); n._setCurrentValues() } n.$slider.css({ width: n.sliderW + 10 }); clearTimeout(n.resetTimeout); n.resetTimeout = setTimeout(function () { n._slideToCurrent() }, 200); } }; var r = function (e) { this.console && console.error(e) }; t.fn.elastislide = function (e) { if (typeof e == "string") { var n = Array.prototype.slice.call(arguments, 1); this.each(function () { var i = t.data(this, "elastislide"); if (!i) { r("cannot call methods on elastislide prior to initialization; attempted to call method '" + e + "'"); return } if (!t.isFunction(i[e]) || e.charAt(0) === "_") { r("no such method '" + e + "' for elastislide instance"); return } i[e].apply(i, n) }) } else this.each(function () { var n = t.data(this, "elastislide"); n || t.data(this, "elastislide", new t.elastislide(e, this)) }); return this } })(window, jQuery);
tamu-geosciences/future-test.tamu.edu
modules/mod_zentools/media/js/carousel/jquery.elastislide.js
JavaScript
gpl-2.0
10,651
<?php /** * @package Joomla.UnitTest * @subpackage Document * * @copyright Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE */ /** * Test class for JDocumentRendererAtom. * Generated by PHPUnit on 2009-10-09 at 12:23:19. * * @package Joomla.UnitTest * @subpackage Document * @since 11.1 */ class JDocumentRendererAtomTest extends TestCase { /** * @var JDocumentRendererAtom * @access protected */ protected $object; /** * Sets up the fixture, for example, opens a network connection. * This method is called before a test is executed. * * @TODO Once the coupling has been loosed, revisit and build a test harness we can use * * @access protected * * @return void */ protected function setUp() { parent::setUp(); $this->markTestSkipped("Too tightly coupled to internals to be testable now"); require_once JPATH_PLATFORM . '/joomla/application/router.php'; require_once JPATH_PLATFORM . '/joomla/environment/request.php'; require_once JPATH_PLATFORM . '/joomla/document/feed/feed.php'; require_once JPATH_PLATFORM . '/joomla/environment/response.php'; $this->saveFactoryState(); JFactory::$application = $this->getMock( 'JApplication', array( 'get', 'getCfg', 'getRouter', ) ); JFactory::$application ->expects($this->any()) ->method('getRouter') ->will( $this->returnValue(new JRouter) ); JFactory::$config = $this->getMock( 'JConfig', array('get') ); $_SERVER['REQUEST_METHOD'] = 'get'; JRequest::setVar('type', 'atom'); $this->object = new JDocumentFeed; $_SERVER['HTTP_HOST'] = 'localhost'; $_SERVER['REQUEST_URI'] = '/index.php?format=feed&amp;type=atom'; // $_SERVER['SCRIPT_NAME'] = '/index.php'; } /** * Tears down the fixture, for example, closes a network connection. * This method is called after a test is executed. * * @return void */ protected function tearDown() { $this->restoreFactoryState(); } /** * testRender method * * @return void */ public function testRender() { $item = new JFeedItem( array( 'title' => 'Joomla!', 'link' => 'http://www.joomla.org', 'description' => 'Joomla main site', 'author' => 'Joomla', 'authorEmail' => 'joomla@joomla.org', 'category' => 'CMS', 'comments' => 'No comment', 'guid' => 'joomla', 'date' => 'Mon, 20 Jan 03 18:05:41 +0400', 'source' => 'http://www.joomla.org' ) ); $this->object->addItem($item); $this->assertThat( // Use original 'id' and 'name' here (from XML definition of the form field) preg_replace('#(\t)*<updated>[^<]*</updated>\n#', '', $this->object->render()), $this->equalTo('<?xml version="1.0" encoding="utf-8"?> <!-- generator="Joomla! 1.6 - Open Source Content Management" --> <feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb"> <title type="text"></title> <subtitle type="text"></subtitle> <link rel="alternate" type="text/html" href="http://localhost"/> <id></id> <generator uri="http://joomla.org" version="1.6">Joomla! 1.6 - Open Source Content Management</generator> <link rel="self" type="application/atom+xml" href="http://localhost/index.php?format=feed&amp;type=atom"/> <entry> <title>Joomla!</title> <link rel="alternate" type="text/html" href="http://localhosthttp://www.joomla.org"/> <published>2003-01-20T14:05:41+00:00</published> <id>joomla</id> <author> <name>Joomla</name> <email>joomla@joomla.org</email> </author> <summary type="html">Joomla main site</summary> <content type="html">Joomla main site</content> <category term="CMS" /> </entry> </feed> '), 'Line:' . __LINE__ . ' The feed does not generate properly.' ); } }
vothequang113/Joomla
tests/suites/unit/joomla/document/feed/renderer/JDocumentRendererAtomTest.php
PHP
gpl-2.0
3,801
/* * This is the source code of Telegram for Android v. 3.x.x * It is licensed under GNU GPL v. 2 or later. * You should have received a copy of the license in this archive (see LICENSE). * * Copyright Nikolai Kudashov, 2013-2016. */ package org.cafemember.ui.Components; public class Rect { public float x; public float y; public float width; public float height; public Rect() { } public Rect(float x, float y, float width, float height) { this.x = x; this.y = y; this.width = width; this.height = height; } }
Teleburna/teleburna-gram
TMessagesProj/src/main/java/org/cafemember/ui/Components/Rect.java
Java
gpl-2.0
588
<?php if ( !function_exists( 'shortcode_vc_product_tabs' ) ): function shortcode_vc_product_tabs( $atts, $content = null ){ $defaults = array( 'tab_title_1' => '', 'tab_content_1' => '', 'tab_title_2' => '', 'tab_content_2' => '', 'tab_title_3' => '', 'tab_content_3' => '', 'style' => '', ); $atts = shortcode_atts( $defaults , $atts ); extract( $atts ); $tabs = array( array( 'shortcode' => $tab_content_1, 'title' => $tab_title_1, ), array( 'shortcode' => $tab_content_2, 'title' => $tab_title_2, ), array( 'shortcode' => $tab_content_3, 'title' => $tab_title_3, ), ); $html = ''; if( function_exists( 'sportexx_homepage_tabs' ) ) { ob_start(); sportexx_homepage_tabs( $tabs, $style ); $html = ob_get_clean(); } return $html; } add_shortcode( 'sportexx_product_tabs' , 'shortcode_vc_product_tabs' ); endif;
bonfil1/masmuscular
wp-content/plugins/sportexx-extensions/modules/js_composer/include/shortcodes/shortcode_sportexx_product_tabs.php
PHP
gpl-2.0
914
Traditional board with dead alive 1 : alive 0 : dead (1) -> 0 : if not 2 or 3 (1) neighbors then 0 (1)-> 1 : if it has 3 (1) neighbors
rahul30des/mycpp
aliveOrDead/README.md
Markdown
gpl-2.0
137
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <!-- !! MOE 2010.10 On-Line Manuals !! COPYRIGHT (C) 2010 !! CHEMICAL COMPUTING GROUP INC. ALL RIGHTS RESERVED. !!--> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <link rel="stylesheet" type="text/css" href="../../manstyle.css" /> <meta keywords> <meta functions Message> <title>Miscellaneous Functions: Message</title> </head> <body bgcolor="#ffffff"> <a href="../../index.htm"><img src="../../images/logo.gif" alt="CCG Logo" align="right" width="174" height="55" border="0" /></a> <h4>MOE 2010.10</h4> <h2>Miscellaneous Functions</h2> <hr noshade="noshade" /> <h2>Syntax</h2> <pre> msg_key = <a class="fcnlink" href="#Message">Message</a> [msg_key, 'message'] </pre> <p><a name="Message"></a></p> <h2>Description</h2> <p>Handles the creation, modification and deletion of messages that are displayed in the MOE Window. The behavior of the function is summarized as follows:</p> <center> <table border="1" cellpadding="5" cellspacing=0> <tr> <td>&nbsp;</td> <td><tt>'message' == []</tt></td> <td><tt>'message' &lt;&gt; []</tt></td> </tr> <tr> <td><tt>msg_key == 0</tt></td> <td>Does nothing</td> <td>Creates new message</td> </tr> <tr> <td><tt>msg_key &lt;&gt; 0</tt></td> <td>Destroys message</td> <td>Modifies message</td> </tr> </table> </center> <p>Whenever <tt>Message</tt> is called with <tt>'message'</tt>&lt;&gt;<tt>[]</tt>, <tt>'message'</tt> is displayed in the MOE Window. The message is removed as soon as the task that created the message is completed. As a consequence, a call to <tt>Message</tt> at the CLI on its own will result in the associated message token being put up and removed in such rapid succession that the message will not appear to have been displayed in the MOE window at all. <p>Messages are meant to be used within a function that wants to display progress messages while a long operation is being performed. The key of the message is returned if the message survived the operation (the message was not destroyed).</p> <p>The following function illustrates the use of the <tt>Message</tt> function: </p> <pre> global function message_example [] local msgkey = <span class="fcndef">Message</span> [ 0, 'Performing a long operation' ]; // msgkey is destroyed when the task is finished. // Sleep here for 5 seconds in order to see the // message in the MOE Window. sleep 5; endfunction </pre> <h2>See Also</h2> <p> <a class="svl" href="../../svl/svlgui/fcnref/beep.html">Beep</a><br /> <a class="svl" href="../../svl/svlgui/fcnref/yesno.html">NoYes</a><br /> <a class="svl" href="../../svl/svlgui/fcnref/yesno.html">OKCancel</a><br /> <a class="svl" href="quit.html">Quit</a><br /> <a class="svl" href="../../svl/svlgui/fcnref/yesno.html">YesNo</a><br /> <a class="svl" href="../../svl/svlgui/fcnref/yesno.html">YesNoCancel</a><br /> <a class="svl" href="../../svl/svlgui/fcnref/yesno.html">Warning</a> </p> <p><a href="../../index.htm">MOE Table of Contents</a>&nbsp;&nbsp;<a href="../../fcnindex.html">SVL Function Index</a></p> <hr noshade="noshade" /> <a href="http://www.chemcomp.com"><img src="../../images/flogo.gif" alt="CCG Logo" align="left" width="30" height="30" border="1" hspace="5" vspace="3" /></a> <font size="2"> <a href="../../legal.html">Copyright</a> &copy; 1997-2010 <a href="http://www.chemcomp.com">Chemical Computing Group Inc.</a><br /> <a href="mailto:info@chemcomp.com"><i>info@chemcomp.com</i></a> </font> </body> </html>
platinhom/ManualHom
_draft/MOE/moe2010/html/moe/fcnref/message.html
HTML
gpl-2.0
3,742
<?php /** * @file * Definition of Drupal\contact\CategoryFormController. */ namespace Drupal\contact; use Drupal\Core\Entity\EntityInterface; use Drupal\Core\Entity\EntityFormController; /** * Base form controller for category edit forms. */ class CategoryFormController extends EntityFormController { /** * Overrides Drupal\Core\Entity\EntityFormController::form(). */ public function form(array $form, array &$form_state, EntityInterface $category) { $form = parent::form($form, $form_state, $category); $default_category = config('contact.settings')->get('default_category'); $form['label'] = array( '#type' => 'textfield', '#title' => t('Label'), '#maxlength' => 255, '#default_value' => $category->label(), '#description' => t("Example: 'website feedback' or 'product information'."), '#required' => TRUE, ); $form['id'] = array( '#type' => 'machine_name', '#default_value' => $category->id(), '#machine_name' => array( 'exists' => 'contact_category_load', 'source' => array('label'), ), '#disabled' => !$category->isNew(), ); $form['recipients'] = array( '#type' => 'textarea', '#title' => t('Recipients'), '#default_value' => implode(', ', $category->recipients), '#description' => t("Example: 'webmaster@example.com' or 'sales@example.com,support@example.com' . To specify multiple recipients, separate each e-mail address with a comma."), '#required' => TRUE, ); $form['reply'] = array( '#type' => 'textarea', '#title' => t('Auto-reply'), '#default_value' => $category->reply, '#description' => t('Optional auto-reply. Leave empty if you do not want to send the user an auto-reply message.'), ); $form['weight'] = array( '#type' => 'weight', '#title' => t('Weight'), '#default_value' => $category->weight, '#description' => t('When listing categories, those with lighter (smaller) weights get listed before categories with heavier (larger) weights. Categories with equal weights are sorted alphabetically.'), ); $form['selected'] = array( '#type' => 'checkbox', '#title' => t('Make this the default category.'), '#default_value' => $default_category === $category->id(), ); $form['actions'] = array('#type' => 'actions'); $form['actions']['submit'] = array( '#type' => 'submit', '#value' => t('Save'), ); return $form; } /** * Overrides Drupal\Core\Entity\EntityFormController::validate(). */ public function validate(array $form, array &$form_state) { parent::validate($form, $form_state); // Validate and each e-mail recipient. $recipients = explode(',', $form_state['values']['recipients']); foreach ($recipients as &$recipient) { $recipient = trim($recipient); if (!valid_email_address($recipient)) { form_set_error('recipients', t('%recipient is an invalid e-mail address.', array('%recipient' => $recipient))); } } $form_state['values']['recipients'] = $recipients; } /** * Overrides Drupal\Core\Entity\EntityFormController::submit(). */ public function submit(array $form, array &$form_state) { // @todo We should not be calling contact_category_delete_form() from // within the form builder. if ($form_state['triggering_element']['#value'] == t('Delete')) { // Rebuild the form to confirm category deletion. $form_state['redirect'] = 'admin/structure/contact/manage/' . $form_state['values']['id'] . '/delete'; return NULL; } return parent::submit($form, $form_state); } /** * Overrides Drupal\Core\Entity\EntityFormController::save(). */ public function save(array $form, array &$form_state) { $category = $this->getEntity($form_state); // Property enforceIsNew is not supported by config entity. So this is only // way to make sure that entity is not saved. $is_new = !$category->getOriginalID(); $category->save(); $id = $category->id(); if ($is_new) { drupal_set_message(t('Category %label has been added.', array('%label' => $category->label()))); watchdog('contact', 'Category %label has been added.', array('%label' => $category->label()), WATCHDOG_NOTICE, l(t('Edit'), 'admin/structure/contact/manage/' . $id . '/edit')); } else { drupal_set_message(t('Category %label has been updated.', array('%label' => $category->label()))); watchdog('contact', 'Category %label has been updated.', array('%label' => $category->label()), WATCHDOG_NOTICE, l(t('Edit'), 'admin/structure/contact/manage/' . $id . '/edit')); } // Update the default category. $contact_config = config('contact.settings'); if ($form_state['values']['selected']) { $contact_config ->set('default_category', $id) ->save(); } // If it was the default category, empty out the setting. elseif ($contact_config->get('default_category') == $id) { $contact_config ->clear('default_category') ->save(); } // Remove the 'selected' value, which is not part of the Category. unset($form_state['values']['selected']); $form_state['redirect'] = 'admin/structure/contact'; } }
dusik/realejuventudfan
core/modules/contact/lib/Drupal/contact/CategoryFormController.php
PHP
gpl-2.0
5,322