/// \constructor_initializer_list{multi_polygon} inline multi_polygon(std::initializer_list<Polygon> l) : base_type(l.begin(), l.end()) {}
linear_vector(std::initializer_list<T> list) : pool(nullptr), poolsize(0), objectsize(0) { for(const T *p = list.begin(); p != list.end(); ++p) append(*p); }
Polynomial PolyDomain::operator()(const std::initializer_list<FieldElement>& c) const { return makeElement(std::vector<FieldElement>(c.begin(), c.end())); }
/// \constructor_initializer_list{multi_point} inline multi_point(std::initializer_list<Point> l) : base_type(l.begin(), l.end()) {}
static void AddRange(TCollection &collection, std::initializer_list<TItem> initializerList) { collection.insert(collection.end(), initializerList.begin(), initializerList.end()); }
myarray(std::initializer_list<T> list): std::array<T,Size>() { if(list.size()!=Size) throw std::out_of_range("wrong number of values in initializer list"); std::copy(list.begin(), list.end(), this->begin()); }
StarMap::StarMap(const std::initializer_list<Star>& l) : StarMap(l.begin(), l.end()) { }
vector(std::initializer_list<double> values) : my_size(values.size()), data(new double[my_size]) { std::copy(values.begin(), values.end(), data); std::cout << "Init constructor called.\n"; }
IndType add(std::initializer_list<T> neigs) { return add(neigs.begin(), neigs.end()); }
Vector(std::initializer_list<double> lst): elem{new double[lst.size()]}, sz(lst.size()) { std::copy(lst.begin(), lst.end(), elem); }
ExplicitEquidistantColorGradient::ExplicitEquidistantColorGradient(const std::string & name, bool discrete, std::initializer_list<reflectionzeug::Color> colors) : AbstractColorGradient(name) , m_colors(colors.begin(), colors.end()) , m_discrete(discrete) { }
str_vec::str_vec(const std::initializer_list<std::string> &s) { auto r = alloc_n_copy((std::string *)s.begin(),(std::string *)s.end()); elements = r.first; cap = first_free = r.second; }
/// \constructor_initializer_list{polygon} inline polygon(std::initializer_list<ring_type> l) : m_outer(l.size() > 0 ? *l.begin() : ring_type()) , m_inners(l.size() > 0 ? l.begin() + 1 : l.begin(), l.end()) {}
StrVec::StrVec(std::initializer_list<std::string> il) { auto newdata = alloc_n_copy(il.begin(), il.end()); elements = newdata.first; first_free = cap = newdata.second; }
RadialTerrain(std::initializer_list<Zone> T) : _terrains(T.begin(), T.end()) { }
void the::plotter::addPolyLine(const std::initializer_list<vec3> &l,const vec4 &color ) { for (auto v = l.begin(); v < l.end()-1; v++) addLine(*(v), *(v+1),color); }
list(std::initializer_list<Z> values) : list() { for (auto x = values.begin(); x != values.end(); ++x) push_back(*x); }
left_vector (const std::initializer_list<T>& init) : left_vector(init.begin(), init.end()) {}
static void check_action(lua_State * L, int idx, std::initializer_list<action_kind> const & ks) { action_kind k = to_notation_action(L, idx).kind(); if (std::find(ks.begin(), ks.end(), k) == ks.end()) throw exception(sstream() << "arg #" << idx << " is a notation action, but it has an unexpected kind"); }
inline void insert_flattened(const std::initializer_list<T>& list, Vec& vec) { insert_flattened(list.begin(), list.end(), vec); }
/// \constructor_initializer_list{ring} inline ring(std::initializer_list<Point> l) : base_type(l.begin(), l.end()) {}
byte_array::byte_array(std::initializer_list<uint8_t> data) { resize(data.size()); uninitialized_copy(data.begin(), data.end(), value.begin()); }
inline iterator insert (const_iterator pos, std::initializer_list<char> ilist) { return base_class::insert<std::initializer_list<char>::const_iterator>(pos , ilist.begin(), ilist.end()); }
void CDialogProcSelect::ListRunningProcs( ) { if (m_bLoadingProcesses) return; m_ProcessIcons.DeleteImageList( ); m_ProcessIcons.Create( 15, 15, ILC_COLOR32, 1, 1 ); m_ProcessIcons.SetBkColor( RGB( 255, 255, 255 ) ); m_ProcessList.SetImageList( &m_ProcessIcons, LVSIL_SMALL ); m_ProcessList.DeleteAllItems( ); m_ProcessInfos.clear( ); PSYSTEM_PROCESS_INFORMATION ProcessInfo = NULL; std::unique_ptr<uint8_t[]> BufferArray; ULONG BufferSize = 0; NTSTATUS status; status = ntdll::NtQuerySystemInformation( SystemProcessInformation, NULL, NULL, &BufferSize ); if (status != STATUS_SUCCESS && status != STATUS_INFO_LENGTH_MISMATCH) { #ifdef _DEBUG PrintOut( _T( "[CDialogProcSelect::RefreshRunningProcesses] Failed to get size for system process list from ProcessBasicInformation" ) ); #endif return; } BufferArray = std::make_unique<uint8_t[]>( BufferSize + 1 ); if (NT_SUCCESS( ntdll::NtQuerySystemInformation( SystemProcessInformation, (PVOID)BufferArray.get( ), BufferSize, &BufferSize ) )) { int CurrentProcessIndex = 0; m_bLoadingProcesses = TRUE; ProcessInfo = (PSYSTEM_PROCESS_INFORMATION)BufferArray.get( ); while (ProcessInfo) { if (ProcessInfo->ImageName.Buffer && ProcessInfo->ImageName.Length > 0) { if (m_FilterCheck.GetCheck( ) != BST_CHECKED || CommonProcesses.end( ) == std::find_if( CommonProcesses.begin( ), CommonProcesses.end( ), [ProcessInfo] ( const wchar_t* proc ) { return _wcsnicmp( proc, ProcessInfo->ImageName.Buffer, ProcessInfo->ImageName.MaximumLength / sizeof(wchar_t) ) == 0; } ) ) { HANDLE hProcess = ReClassOpenProcess( PROCESS_QUERY_INFORMATION | PROCESS_VM_READ, FALSE, (DWORD)ProcessInfo->UniqueProcessId ); #ifdef _WIN64 if (hProcess && Utils::GetProcessPlatform( hProcess ) == Utils::ProcessPlatformX64) #else if (hProcess && Utils::GetProcessPlatform( hProcess ) == Utils::ProcessPlatformX86) #endif { ProcessInfoStack Info = { 0 }; TCHAR tcsProcessId[16] = { 0 }; TCHAR tcsProcessPath[MAX_PATH] = { 0 }; SHFILEINFO FileInfo = { 0 }; LVITEM lvi = { 0 }; int pos; Info.dwProcessId = (DWORD)ProcessInfo->UniqueProcessId; #ifdef UNICODE Info.strProcessName = ProcessInfo->ImageName.Buffer; #else Info.strProcessName = CW2A( ProcessInfo->ImageName.Buffer ); #endif GetModuleFileNameEx( hProcess, NULL, tcsProcessPath, MAX_PATH ); SHGetFileInfo( tcsProcessPath, NULL, &FileInfo, sizeof( SHFILEINFO ), SHGFI_ICON ); m_ProcessIcons.Add( FileInfo.hIcon ); lvi.mask = LVIF_TEXT | LVIF_IMAGE; lvi.pszText = Info.strProcessName.GetBuffer( ); lvi.cchTextMax = Info.strProcessName.GetLength( ); lvi.iImage = CurrentProcessIndex++; lvi.iItem = m_ProcessList.GetItemCount( ); pos = m_ProcessList.InsertItem( &lvi ); _ui64tot_s( Info.dwProcessId, tcsProcessId, 16, 10 ); m_ProcessList.SetItemText( pos, COLUMN_PROCESSID, (LPTSTR)tcsProcessId ); m_ProcessInfos.push_back( Info ); } CloseHandle( hProcess ); } } // Make sure not to loop infinitely (Fix for issue where refresh wasnt updating closed applications) if (ProcessInfo->NextEntryOffset == 0) break; ProcessInfo = (PSYSTEM_PROCESS_INFORMATION)((uint8_t*)ProcessInfo + ProcessInfo->NextEntryOffset); } } m_bLoadingProcesses = FALSE; }
Vector::Vector(std::initializer_list<double> lst) { elem = new double[lst.size()]; sz = lst.size(); std::copy(lst.begin(), lst.end(), elem); }
Mat33::Mat33(std::initializer_list<scalar> lst) { copy(lst.begin(), lst.end(), v); }
NeuronDatareader::NeuronDatareader(std::initializer_list<std::initializer_list< int>> data, std::initializer_list<std::initializer_list< int>> labels) { try { if(data.size() != labels.size()) { throw _EXP_FLAG_DATA; } _nmb_items = data.size(); _lnmb_items = labels.size(); _ldimensions = 1; _dimensions = 1; _size[0] = _size[1] =_size[2] = 1; _inputsize = _size[0] = (*data.begin()).size(); _lsize[0] = _lsize[1] =_lsize[2] = 1; _linputsize = _lsize[0] = (*labels.begin()).size(); _item_size = 1; _litem_size = 1; _item_type = 1; _litem_type = 1; Filetype value; Imagetype img; for(std::initializer_list<std::initializer_list< int>>::iterator it_data_=data.begin(), it_label_=labels.begin(); it_data_ !=data.end(); it_data_++, it_label_++) { img.val = new Filetype[_inputsize]; int run_=0; for(std::initializer_list< int>::iterator it_data_in = (*it_data_).begin(); it_data_in != (*it_data_).end(); it_data_in++) { value.sfloat = (float)*it_data_in; img.val[run_] = value; run_++; } img.img_size = _size[0]*_size[1]*_size[2]; _data.push_back(img); PrintValue(_data.back()); img.val = new Filetype[_linputsize]; run_=0; int label_val = 0; for(std::initializer_list< int>::iterator it_label_in = (*it_label_).begin(); it_label_in != (*it_label_).end(); it_label_in++) { value.sfloat = (float)*it_label_in; img.val[run_] = value; run_++; //label_val += (*it_label_in)?(run_):(0); } img.img_size = _lsize[0]*_lsize[1]*_lsize[2]; _ldata_vec.push_back(img); //_ldata.push_back(label_val-1); } _indexes.resize(_ldata_vec.size()); for (unsigned int i = 0; i < _indexes.size(); ++i) _indexes.at(i) = i; std::random_shuffle(_indexes.begin(), _indexes.end()); } catch(std::exception & exp) { std::cout << exp.what() << std::endl; } }
ActionMap(std::initializer_list<std::pair<Key, Action>> l) noexcept: actions(l.begin(), l.end()) {}
actor spawn_in_groups(std::initializer_list<group> gs, F fun, Ts&&... xs) { actor_config cfg{context()}; return eval_opts(Os, system().spawn_in_groups_impl<make_unbound(Os)>(cfg, gs.begin(), gs.end(), fun, std::forward<Ts>(xs)...)); }
inline void load_section(std::vector<Item> &items, const std::initializer_list<Item> §ion) { items.reserve(items.size() + section.size()); std::copy(section.begin(), section.end(), std::back_inserter(items)); }